/* AI NumScan — legal site styles.
   Dark by default to match the app; light palette follows the system setting. */

:root {
  color-scheme: dark;
  --bg: #0a0a0c;
  --panel: #141419;
  --panel-soft: #101015;
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #ececf2;
  --text-secondary: #b4b4c2;
  --muted: #8c8c9c;
  --accent: #3de0b0;
  --accent-soft: rgba(61, 224, 176, 0.12);
  --accent-border: rgba(61, 224, 176, 0.34);
  --accent-ink: #062a20;
  --header-bg: rgba(10, 10, 12, 0.84);
  --shadow: 0 18px 60px rgba(0, 0, 0, 0.45);
}

@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --bg: #f7f8f8;
    --panel: #ffffff;
    --panel-soft: #ffffff;
    --border: rgba(10, 10, 12, 0.09);
    --border-strong: rgba(10, 10, 12, 0.16);
    --text: #16161c;
    --text-secondary: #41414d;
    --muted: #64646f;
    --accent: #0b8f6c;
    --accent-soft: rgba(11, 143, 108, 0.1);
    --accent-border: rgba(11, 143, 108, 0.3);
    --accent-ink: #ffffff;
    --header-bg: rgba(247, 248, 248, 0.86);
    --shadow: 0 18px 50px rgba(16, 24, 40, 0.1);
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans SC",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  background: var(--accent);
  color: var(--accent-ink);
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  text-decoration-thickness: 2px;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px max(20px, calc((100vw - 1120px) / 2));
  background: var(--header-bg);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 15px;
  font-weight: 700;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
}

.site-nav a {
  padding: 7px 11px;
  border-radius: 999px;
  color: var(--text-secondary);
  text-decoration: none;
  white-space: nowrap;
}

.site-nav a:hover {
  background: var(--accent-soft);
  color: var(--text);
}

.site-nav a[aria-current="page"] {
  background: var(--accent-soft);
  color: var(--accent);
}

.site-nav .lang-switch {
  margin-left: 6px;
  border: 1px solid var(--border-strong);
  color: var(--text);
}

/* ---------- Layout ---------- */

.shell {
  width: min(100% - 40px, 1120px);
  margin: 0 auto;
}

.doc {
  width: min(100% - 40px, 780px);
  margin: 0 auto;
  padding: 56px 0 80px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(30px, 4.6vw, 44px);
  line-height: 1.15;
  letter-spacing: -0.025em;
}

.doc-meta {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.lede {
  margin: 22px 0 0;
  color: var(--text-secondary);
  font-size: 17px;
  line-height: 1.7;
}

/* ---------- Table of contents ---------- */

.toc {
  margin: 34px 0 8px;
  padding: 20px 22px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
}

.toc-title {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.toc ol {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 26px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: toc;
}

.toc li {
  counter-increment: toc;
  font-size: 14px;
}

.toc li::before {
  content: counter(toc) ". ";
  color: var(--muted);
}

.toc a {
  color: var(--text-secondary);
  text-decoration: none;
}

.toc a:hover {
  color: var(--accent);
}

/* ---------- Document body ---------- */

.doc-body {
  margin-top: 44px;
}

.doc-body h2 {
  margin: 52px 0 16px;
  padding-top: 8px;
  font-size: 23px;
  line-height: 1.3;
  letter-spacing: -0.015em;
}

.doc-body h2:first-child {
  margin-top: 0;
}

.doc-body h3 {
  margin: 30px 0 10px;
  font-size: 17px;
  line-height: 1.4;
}

.doc-body p {
  margin: 0 0 16px;
  color: var(--text-secondary);
}

.doc-body strong {
  color: var(--text);
  font-weight: 600;
}

.doc-body ul,
.doc-body ol {
  margin: 0 0 18px;
  padding-left: 22px;
  color: var(--text-secondary);
}

.doc-body li {
  margin: 7px 0;
}

.doc-body li::marker {
  color: var(--accent);
}

.callout {
  margin: 26px 0;
  padding: 18px 20px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  border-radius: 12px;
}

.callout p {
  margin: 0;
  color: var(--text);
  font-size: 15px;
}

.callout p + p {
  margin-top: 10px;
}

.summary-list {
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}

.summary-list li {
  position: relative;
  margin: 0;
  padding: 13px 0 13px 30px;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
}

.summary-list li:last-child {
  border-bottom: 0;
}

.summary-list li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 22px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
}

.summary-list strong {
  color: var(--text);
}

.contact-box {
  margin-top: 18px;
  padding: 22px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
}

.contact-box p {
  margin: 0;
}

.contact-box p + p {
  margin-top: 8px;
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 28px 0 40px;
  color: var(--muted);
  font-size: 12.5px;
}

.site-footer .shell {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.site-footer a {
  color: var(--muted);
}

.site-footer a:hover {
  color: var(--accent);
}

.footer-links {
  display: flex;
  gap: 18px;
}

/* ---------- Home ---------- */

.home-main {
  padding: 72px 0 90px;
}

.home-hero {
  max-width: 720px;
}

.home-hero h1 {
  font-size: clamp(34px, 5.6vw, 56px);
}

.home-hero .lede {
  max-width: 620px;
  font-size: 18px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 20px;
  padding: 5px 11px 5px 9px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  color: var(--text-secondary);
  font-size: 12px;
}

.badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 44px;
}

.card {
  display: block;
  padding: 26px 24px 24px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  color: inherit;
  text-decoration: none;
  transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.card-kicker {
  color: var(--accent);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.card h2 {
  margin: 10px 0 8px;
  font-size: 20px;
  letter-spacing: -0.01em;
}

.card p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 14px;
}

.card-arrow {
  display: inline-block;
  margin-top: 18px;
  color: var(--accent);
  font-size: 13px;
}

.features {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-top: 56px;
  padding-top: 34px;
  border-top: 1px solid var(--border);
}

.feature h3 {
  margin: 0 0 6px;
  font-size: 14px;
}

.feature p {
  margin: 0;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.65;
}

/* ---------- Landing ---------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 64px;
  align-items: center;
}

.hero h1 {
  max-width: 26ch;
  font-size: clamp(34px, 5.2vw, 54px);
  text-wrap: balance;
}

.hero .lede {
  max-width: 54ch;
  margin-top: 18px;
  font-size: 17.5px;
}

.hero-note {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.hero-art {
  justify-self: end;
  width: 100%;
}

.hero-art img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 26px;
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.cta-center {
  justify-content: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  padding: 13px 24px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 28px var(--accent-soft);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  padding: 13px 22px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  color: var(--text);
  font-size: 15px;
  text-decoration: none;
  background: transparent;
  transition: border-color 0.16s ease, background 0.16s ease;
}

.btn-ghost:hover {
  border-color: var(--accent-border);
  background: var(--accent-soft);
}

.section {
  margin-top: 76px;
  padding-top: 56px;
  border-top: 1px solid var(--border);
}

.section h2 {
  margin: 0;
  text-wrap: balance;
  font-size: clamp(23px, 2.9vw, 31px);
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.section-lede {
  max-width: 62ch;
  margin: 14px 0 0;
  color: var(--text-secondary);
  font-size: 15.5px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 28px;
}

.tile {
  padding: 22px 20px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--panel);
}

.tile h3 {
  margin: 0 0 8px;
  font-size: 15px;
  letter-spacing: -0.01em;
}

.tile p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.68;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}

.step {
  padding: 22px 20px;
  border: 1px dashed var(--border-strong);
  border-radius: 16px;
}

.step-n {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  margin-bottom: 12px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
}

.step h3 {
  margin: 0 0 8px;
  font-size: 15px;
}

.step p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.68;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 48px;
  align-items: center;
}

.split .btn-ghost {
  margin-top: 26px;
}

.check {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 24px 22px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--panel-soft);
  list-style: none;
}

.check li {
  position: relative;
  padding-left: 26px;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.6;
}

.check li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 11px;
  height: 6px;
  border-left: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg);
}

.faq {
  margin-top: 26px;
  border-top: 1px solid var(--border);
}

.faq details {
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  cursor: pointer;
  font-size: 15.5px;
  font-weight: 600;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  flex: none;
  color: var(--accent);
  font-size: 19px;
  font-weight: 400;
  line-height: 1;
}

.faq details[open] summary::after {
  content: "–";
}

.faq p {
  max-width: 74ch;
  margin: 10px 0 0;
  color: var(--text-secondary);
  font-size: 14.5px;
}

.cta-band {
  text-align: center;
}

.cta-band p {
  max-width: 52ch;
  margin: 14px auto 0;
  color: var(--text-secondary);
  font-size: 15.5px;
}

/* ---------- 404 ---------- */

.not-found {
  padding: 120px 0;
  text-align: center;
}

.not-found p {
  color: var(--text-secondary);
}

@media (max-width: 720px) {
  .site-header {
    padding: 12px 18px;
  }

  .brand-name {
    display: none;
  }

  .site-nav {
    gap: 2px;
  }

  .site-nav a {
    padding: 7px 9px;
    font-size: 12.5px;
  }

  .doc {
    width: calc(100% - 36px);
    padding: 40px 0 64px;
  }

  .toc ol {
    grid-template-columns: 1fr;
  }

  .doc-body h2 {
    margin-top: 42px;
  }

  .card-grid,
  .features {
    grid-template-columns: 1fr;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .hero h1 {
    max-width: none;
  }

  .hero-art {
    justify-self: center;
    max-width: 280px;
  }

  .grid-3,
  .steps,
  .split {
    grid-template-columns: 1fr;
  }

  .split {
    gap: 26px;
  }

  .section {
    margin-top: 56px;
    padding-top: 40px;
  }

  .section h2 {
    font-size: 23px;
  }

  .check {
    padding: 20px 18px;
  }

  .cta-row {
    gap: 10px;
  }

  .btn,
  .btn-ghost {
    flex: 1 1 auto;
    justify-content: center;
  }

  .features {
    gap: 20px;
  }

  .home-main {
    padding: 48px 0 70px;
  }
}

@media (max-width: 560px) {
  .site-nav .nav-anchor {
    display: none;
  }

  .site-nav a {
    padding: 7px 8px;
  }
}

@media print {
  .site-header,
  .site-footer,
  .toc {
    display: none;
  }

  body {
    background: #fff;
    color: #000;
  }

  .doc-body p,
  .doc-body li {
    color: #222;
  }
}

/* ---------- Scenario pages ---------- */

.breadcrumb {
  margin-top: 34px;
  color: var(--muted);
  font-size: 12.5px;
}

.breadcrumb a {
  color: var(--muted);
}

.breadcrumb a:hover {
  color: var(--accent);
}

.breadcrumb span {
  margin: 0 8px;
  opacity: 0.55;
}

.page-head {
  margin-top: 18px;
}

.page-head h1 {
  max-width: 32ch;
  font-size: clamp(30px, 4.4vw, 46px);
  text-wrap: balance;
}

.page-head .lede {
  max-width: 64ch;
}

.card h3 {
  margin: 10px 0 8px;
  font-size: 19px;
  letter-spacing: -0.01em;
}

.card p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.65;
}

.prose {
  max-width: 74ch;
}

.prose p {
  margin: 14px 0 0;
  color: var(--text-secondary);
  font-size: 16.5px;
}

.prose ul {
  margin: 16px 0 0;
  padding-inline-start: 20px;
  color: var(--text-secondary);
}

.prose li {
  margin-bottom: 8px;
}

.lang-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin-top: 14px;
  font-size: 12px;
}

.lang-list a {
  color: var(--muted);
  text-decoration: none;
}

.lang-list a:hover,
.lang-list a[aria-current="page"] {
  color: var(--accent);
}

/* ---------- RTL ---------- */

[dir="rtl"] .check li {
  padding-left: 0;
  padding-right: 26px;
}

[dir="rtl"] .check li::before {
  left: auto;
  right: 0;
}
