/* Shared by the legal, contact, how-it-works and guide pages. Builds on the tokens in styles.css. */
main.legal { max-width: 860px; }
main.legal > h1 { font-size: clamp(30px, 4.6vw, 44px); margin-top: 18px; }
main.legal h2 { margin-top: 40px; font-size: clamp(20px, 2.6vw, 25px); }
main.legal h3 { margin: 24px 0 6px; font-size: 1.08rem; }
main.legal p, main.legal li { font-size: 16px; }
main.legal li { margin: 7px 0; }
main.legal .meta { color: var(--muted); margin-top: -2px; font-weight: 500; }
main.legal .toc { font-size: .95rem; }
main.legal .summary, main.legal .card-lite {
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
  padding: 16px 20px; margin: 18px 0; line-height: 1.65; box-shadow: var(--shadow); position: relative; overflow: hidden;
}
main.legal .summary { padding-left: 24px; }
main.legal .summary::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 5px; background: var(--grad); }
main.legal table { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: .95rem; background: var(--surface); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); }
main.legal th, main.legal td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--border); }
main.legal th { width: 30%; }
main.legal .contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
main.legal .contact-grid h3 { margin-top: 0; }
main.legal .steps { counter-reset: s; list-style: none; padding: 0; }
main.legal .steps li { counter-increment: s; position: relative; padding: 4px 0 12px 50px; }
main.legal .steps li::before {
  content: counter(s); position: absolute; left: 0; top: 0; width: 34px; height: 34px; border-radius: 11px;
  background: var(--grad); color: #fff; font-weight: 800; display: grid; place-items: center;
  box-shadow: 0 8px 18px -10px color-mix(in srgb, var(--accent) 80%, transparent);
}
main.legal .steps li:nth-child(4n+2)::before { background: var(--grad-warm); }
main.legal .steps li:nth-child(4n+3)::before { background: var(--grad-cool); }
main.legal pre.share { white-space: pre-wrap; background: var(--surface); border: 1.5px dashed color-mix(in srgb, var(--accent) 40%, var(--border)); border-radius: 14px; padding: 16px; font: inherit; }
main.legal blockquote { margin: 18px 0; padding: 14px 18px; border-radius: 14px; background: var(--accent-soft); border-left: 4px solid var(--accent); }

/* Guide articles */
.crumbs { font-size: 13.5px; color: var(--muted); margin-top: 6px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent); }
.article-hero {
  border-radius: 22px; padding: clamp(22px, 4vw, 38px); margin: 12px 0 22px; color: #fff;
  background: var(--grad); box-shadow: var(--shadow-lg); position: relative; overflow: hidden;
}
.article-hero.warm { background: var(--grad-warm); }
.article-hero.cool { background: var(--grad-cool); }
.article-hero::after { content: ""; position: absolute; width: 260px; height: 260px; right: -60px; top: -80px; border-radius: 50%; background: rgba(255,255,255,.14); }
.article-hero h1 { color: #fff; margin: 0 0 10px; font-size: clamp(28px, 4.4vw, 42px); position: relative; }
.article-hero p { margin: 0; opacity: .95; font-size: 17px; max-width: 62ch; position: relative; }
.article-hero .tag { display: inline-block; background: rgba(255,255,255,.2); border-radius: 999px; padding: 4px 12px; font-size: 12.5px; font-weight: 700; margin-bottom: 12px; position: relative; }
.keypoints { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin: 22px 0; }
.keypoints div { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 16px; box-shadow: var(--shadow); border-top: 4px solid var(--accent); }
.keypoints div:nth-child(2) { border-top-color: var(--accent-2); }
.keypoints div:nth-child(3) { border-top-color: var(--accent-3); }
.keypoints div:nth-child(4) { border-top-color: var(--accent-4); }
.keypoints b { display: block; font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.keypoints span { color: var(--muted); font-size: 14px; }
.cta-box { margin: 36px 0 10px; padding: 24px; border-radius: 20px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); text-align: center; }
.cta-box h2 { margin-top: 0 !important; }
.cta-box .button { margin: 6px; }
.guide-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 18px; margin: 22px 0; }
.guide-card { display: block; text-decoration: none; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 18px; overflow: hidden; box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s; }
.guide-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.guide-card .band { height: 8px; background: var(--grad); }
.guide-card:nth-child(4n+2) .band { background: var(--grad-warm); }
.guide-card:nth-child(4n+3) .band { background: var(--grad-cool); }
.guide-card:nth-child(4n+4) .band { background: linear-gradient(120deg, #a347f5, #2d9cff); }
.guide-card div { padding: 18px; }
.guide-card h3 { margin: 0 0 6px !important; }
.guide-card p { margin: 0; color: var(--muted); font-size: 14.5px !important; }
.guide-card .more { display: inline-block; margin-top: 10px; color: var(--accent); font-weight: 700; font-size: 14px; }

.legal-footer { max-width: 1080px; margin: 48px auto 0; padding: 22px 16px 30px; display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: .92rem; border-top: 1px solid var(--border); position: relative; }
.legal-footer::before { content: ""; position: absolute; left: 16px; right: 16px; top: -1px; height: 3px; border-radius: 3px; background: var(--grad); opacity: .7; }
.legal-footer a { color: var(--muted); text-decoration: none; font-weight: 600; }
.legal-footer a:hover { color: var(--accent); }
.legal-footer span { margin-left: auto; color: var(--muted); }
@media (max-width: 600px) { main.legal th { width: auto; } .legal-footer span { margin-left: 0; width: 100%; } }
main.legal .checklist { list-style: none; padding: 0; margin: 10px 0; }
main.legal .checklist li { padding: 9px 0 9px 32px; position: relative; border-bottom: 1px solid var(--border); }
main.legal .checklist li::before { position: absolute; left: 4px; top: 9px; font-weight: 800; }
main.legal .checklist.yes li::before { content: "✓"; color: var(--accent-4); }
main.legal .checklist.no li::before { content: "✕"; color: var(--danger); }
main.legal code { background: var(--accent-soft); color: var(--accent); border-radius: 6px; padding: 1px 6px; font-size: .92em; }
