/* Shared styles for the legal pages (terms/, privacy/, legal/).
   Tokens and the header/footer match index.html. */
@font-face { font-family: "InterVariable"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("../fonts/inter/InterVariable-subset.woff2") format("woff2"); }

:root {
  --bg: #f6f7f3;
  --surface: #ffffff;
  --surface-2: #eeefeb;
  --ink: #37363e;
  --muted: #62616a;
  --border: #e9e9e6;
  --rail: #cfd7ca;
  --accent: #26252c;
  --green: #b9f462;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: "InterVariable", "Inter", system-ui, sans-serif; font-size: 16px; line-height: 1.5; letter-spacing: -0.01em; font-feature-settings: "cv01", "cv05", "cv09", "cv11"; -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.wrap { width: 100%; max-width: 1380px; margin-inline: auto; padding-inline: 24px; }

/* Header */
.nav { position: sticky; top: 0; z-index: 20; backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px); background: color-mix(in srgb, var(--bg) 60%, transparent); border-bottom: .5px solid var(--rail); }
.nav .wrap { height: 64px; display: flex; align-items: center; }
.nav .bar { display: flex; align-items: center; justify-content: space-between; width: 100%; height: 100%; padding-inline: 20px; border-inline: .5px solid var(--rail); }
.brand { display: inline-flex; align-items: center; line-height: 0; color: var(--ink); text-decoration: none; }
.brand .logo { height: 30px; width: auto; display: block; margin-left: -2px; }
/* Sign up button: same as index.html */
.btn { display: inline-flex; align-items: center; justify-content: center; height: 38px; padding: 0 16px; border-radius: 8px; background: #b9f462; color: #26252c; font: 500 14px/1 "InterVariable", "Inter", system-ui, sans-serif; white-space: nowrap; text-decoration: none; transition: transform .2s cubic-bezier(.23, 1, .32, 1); }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: scale(.98); }

/* Document */
main.wrap > .legal { border-inline: .5px solid var(--rail); }
.legal { padding: 64px 20px 96px; }
.legal > * { max-width: 760px; margin-inline: auto; }
.legal h1 { font-size: clamp(32px, 5vw, 48px); line-height: 1.1; letter-spacing: -.035em; font-weight: 600; margin-top: 0; margin-bottom: 40px; }
.legal h2 { font-size: 22px; line-height: 1.3; letter-spacing: -.02em; font-weight: 600; margin-top: 48px; margin-bottom: 16px; }
.legal h3 { font-size: 17px; line-height: 1.4; font-weight: 600; margin-top: 32px; margin-bottom: 12px; }
.legal h4 { font-size: 16px; line-height: 1.4; font-weight: 600; margin-top: 24px; margin-bottom: 10px; }
/* legal.html: each policy is its own section, separated like the Terms appendix */
.policy > * { max-width: 760px; margin-inline: auto; }
.policy + .policy { margin-top: 80px; padding-top: 48px; border-top: .5px solid var(--rail); }
.policy > h2 { font-size: clamp(26px, 3vw, 32px); line-height: 1.15; letter-spacing: -.03em; margin-top: 0; margin-bottom: 24px; }
.legal h2.appendix { margin-top: 80px; padding-top: 48px; border-top: .5px solid var(--rail); }
.legal p, .legal li { font-size: 15px; line-height: 1.65; }
.legal p { margin-top: 0; margin-bottom: 14px; }
.legal ul, .legal ol { padding-left: 24px; margin-top: 0; margin-bottom: 16px; }
.legal li { margin-bottom: 8px; }
.legal li > ul, .legal li > ol { margin-top: 8px; }
.legal strong { font-weight: 600; }
.legal a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--rail); text-underline-offset: 3px; overflow-wrap: anywhere; }
.legal a:hover { text-decoration-color: currentColor; }
.legal figure { margin: 8px auto 20px; }
.legal figure img { max-width: 480px; width: 100%; }

/* Contents list at the top of the Terms of Use */
.toc { margin-bottom: 40px; }
.toc ul { list-style: none; padding: 0; margin: 0; }
.toc li { font-size: 14px; line-height: 1.4; margin: 0; padding: 4px 0; }
/* Numbers in a fixed-width column with equal-width digits, so the titles line up */
.toc a { display: grid; grid-template-columns: 2.5em 1fr; text-decoration: none; color: var(--muted); }
.toc-num { font-variant-numeric: tabular-nums; }
.toc a:hover { color: var(--ink); }

/* Tables scroll sideways on small screens instead of widening the page */
.table { overflow-x: auto; margin-bottom: 24px; border: .5px solid var(--border); border-radius: 12px; background: var(--surface); }
.table table { width: 100%; border-collapse: collapse; font-size: 13px; line-height: 1.55; }
.table th, .table td { text-align: left; vertical-align: top; padding: 12px 16px; border-bottom: .5px solid var(--border); min-width: 180px; }
.table th { font-weight: 600; background: var(--surface-2); }
.table ul { margin: 0; padding-left: 18px; }
.table li { font-size: 13px; line-height: 1.55; margin-bottom: 4px; }
.table tr:last-child td { border-bottom: 0; }

/* Footer: same layout as index.html */
footer.wrap > .foot { border-inline: .5px solid var(--rail); border-top: .5px solid var(--rail); }
.foot { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px 24px; padding: 24px 20px; color: color-mix(in srgb, var(--muted) 72%, var(--bg)); font-size: 12px; }
.foot nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px 20px; }
.foot .made-by { justify-self: center; }
/* Small screens: stacked and centred, copyright last */
@media (max-width: 767px) { .foot { grid-template-columns: 1fr; justify-items: center; text-align: center; } .foot nav { justify-content: center; } .foot .copy { order: 3; } }
/* Scoro credit, plain text under the links (as on index.html) */
.made-by { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.made-by img { width: 12px; height: 12px; position: relative; top: -1px; }
.foot .made-by a { color: var(--ink); font-weight: 500; }
.foot a { text-decoration: none; }
.foot a:hover, .foot a[aria-current="page"] { color: var(--ink); }

@media (max-width: 767px) {
  .wrap { padding-inline: 16px; }
  .legal { padding: 40px 16px 64px; }
}

