/* Adalyze AI static SEO pages (/tools/, /benchmarks/). Brand Guide v1 tokens. */
:root {
  --indigo: #2b2e6d;
  --indigo-600: #24275c;
  --indigo-700: #1c1f49;
  --indigo-50: #eeeff7;
  --indigo-100: #d9dbec;
  --green: #35c759;
  --green-600: #2aa048;
  --green-700: #207937;
  --green-50: #eaf9ee;
  --offwhite: #f8fafb;
  --teal: #4fd1c5;
  --yellow: #ffb800;
  --slate: #6b7280;
  --slate-700: #374151;
  --line: #e5e7eb;
  --white: #fff;
  --danger: #b42318;
  --radius: 14px;
  --shadow: 0 10px 40px -12px rgba(43, 46, 109, 0.22);
  --font-head: 'Poppins', 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-body: 'Source Sans 3', 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'Roboto Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--offwhite);
  color: var(--slate-700);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; }
a { color: var(--indigo); text-underline-offset: 3px; }
a:hover { color: var(--green-700); }
:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--font-head); color: var(--indigo); line-height: 1.2; margin: 0 0 0.6em; }
h1 { font-size: clamp(1.9rem, 5vw, 2.9rem); font-weight: 700; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.35rem, 3vw, 1.8rem); font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 600; }
p { margin: 0 0 1em; }
code { font-family: var(--font-mono); font-size: 0.92em; }
.num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip { position: absolute; left: -999px; top: 8px; background: var(--white); padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.wrap.narrow { max-width: 820px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-head); font-weight: 600; font-size: 1rem; line-height: 1;
  padding: 14px 22px; border-radius: 999px; border: 2px solid transparent;
  text-decoration: none; cursor: pointer; transition: background 0.15s, transform 0.15s, box-shadow 0.15s;
}
.btn-cta { background: var(--green); color: var(--indigo-700); }
.btn-cta:hover { background: var(--green-600); color: var(--white); }
.btn-primary { background: var(--indigo); color: var(--white); width: 100%; margin-top: 4px; }
.btn-primary:hover { background: var(--indigo-600); color: var(--white); }
.btn-ghost { border-color: rgba(255, 255, 255, 0.55); color: var(--white); background: transparent; }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.1); color: var(--white); }
.btn-sm { padding: 10px 16px; font-size: 0.9rem; }
.btn-lg { padding: 16px 28px; font-size: 1.05rem; }

/* Header */
.site-header { background: var(--white); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.header-row { display: flex; align-items: center; gap: 16px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--font-head); font-weight: 700; font-size: 1.15rem; color: var(--indigo); }
.brand:hover { color: var(--indigo); }
.brand-light, .brand-light:hover { color: var(--white); }
.main-nav { display: none; gap: 22px; margin-left: 12px; }
.main-nav a { text-decoration: none; font-weight: 600; color: var(--slate-700); }
.main-nav a:hover { color: var(--indigo); }
.header-row .btn { margin-left: auto; }
@media (min-width: 640px) { .main-nav { display: flex; } }

/* Hero */
.hero {
  background: linear-gradient(135deg, var(--indigo) 0%, var(--indigo-600) 55%, #23407a 100%);
  color: var(--indigo-100);
  padding: 36px 0 44px;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: ''; position: absolute; right: -120px; top: -120px; width: 360px; height: 360px; border-radius: 50%;
  background: radial-gradient(circle, rgba(53, 199, 89, 0.28), rgba(79, 209, 197, 0) 70%);
  pointer-events: none;
}
.hero .wrap { position: relative; z-index: 1; }
.hero h1 { color: var(--white); max-width: 22ch; }
.hero .lede { font-size: 1.15rem; max-width: 62ch; color: #e6e8f5; margin: 0; }
.hero .lede strong { color: var(--green); font-weight: 600; }
.eyebrow { font-family: var(--font-head); font-weight: 600; font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--teal); margin: 0 0 10px; }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0 0 18px; font-size: 0.9rem; }
.breadcrumbs li + li::before { content: '/'; margin-right: 6px; color: rgba(255, 255, 255, 0.45); }
.breadcrumbs a { color: #cfd3ee; }
.breadcrumbs a:hover { color: var(--white); }
.breadcrumbs [aria-current] { color: var(--white); }
@media (min-width: 900px) { .hero { padding: 56px 0 64px; } }

/* Sections */
.section { padding: 44px 0; }
.section.alt { background: var(--white); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.prose { max-width: 70ch; }
.prose ol, .prose ul { padding-left: 1.3em; }
.prose li { margin-bottom: 0.6em; }
.label-note { display: inline-block; font-size: 0.85rem; font-weight: 600; color: #7a5a00; background: #fff8e5; border: 1px solid #ffefc2; border-radius: 999px; padding: 2px 12px; }
.arrow-link { font-weight: 600; text-decoration: none; }
.arrow-link::after { content: ' \2192'; }
@media (min-width: 900px) { .section { padding: 64px 0; } }

/* Cards */
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; }
.card-title { font-size: 1.1rem; margin-bottom: 16px; }
.card-dark { background: var(--indigo); border-color: var(--indigo); color: #e6e8f5; }
.card-dark .card-title { color: var(--white); }
.card-grid { list-style: none; padding: 0; margin: 0 0 20px; display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .card-grid { grid-template-columns: repeat(3, 1fr); } }
.link-card { padding: 0; box-shadow: none; transition: box-shadow 0.15s, border-color 0.15s, transform 0.15s; }
.link-card > a, .link-card > div { display: block; height: 100%; padding: 20px 22px; text-decoration: none; color: var(--slate-700); }
.link-card h3 { margin-bottom: 6px; }
.link-card p { margin: 0; }
.link-card .more { display: inline-block; margin-top: 12px; font-weight: 600; color: var(--green-700); }
.link-card:hover { border-color: var(--green); box-shadow: var(--shadow); transform: translateY(-2px); }
.link-card.muted { background: var(--offwhite); box-shadow: none; }
.link-card.muted:hover { transform: none; border-color: var(--line); }
.link-card.muted h3 { color: var(--slate); }

/* Calculator */
.calc-section { padding-top: 0; margin-top: -24px; position: relative; z-index: 2; }
.calc-grid { display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 860px) { .calc-grid { grid-template-columns: 1.1fr 0.9fr; align-items: start; } .results { position: sticky; top: 84px; } }
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 700; color: var(--indigo); margin-bottom: 6px; }
.field .hint { font-size: 0.9rem; color: var(--slate); margin: 6px 0 0; }
.field .err { font-size: 0.9rem; color: var(--danger); font-weight: 600; margin: 6px 0 0; }
.input-wrap { position: relative; display: flex; align-items: center; }
.input-wrap input, .field select {
  width: 100%; font: inherit; font-family: var(--font-mono); font-size: 1.05rem; color: var(--indigo-700);
  background: var(--offwhite); border: 1.5px solid #d1d5db; border-radius: 10px; padding: 12px 14px; min-height: 48px;
}
.field select { font-family: var(--font-body); appearance: auto; }
.input-wrap.has-pre input { padding-left: 30px; }
.input-wrap.has-post input { padding-right: 34px; }
.affix { position: absolute; color: var(--slate); font-family: var(--font-mono); pointer-events: none; }
.affix.pre { left: 13px; }
.affix.post { right: 14px; }
.input-wrap input:focus, .field select:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 4px rgba(53, 199, 89, 0.18); background: var(--white); }
.input-wrap input[aria-invalid='true'] { border-color: var(--danger); }
.note { font-size: 0.95rem; background: #fff8e5; border-radius: 10px; padding: 10px 12px; margin: 14px 0 0; }
.results-empty { color: #c9cce6; margin: 0; }
.results-error { color: #ffd7d3; font-weight: 600; margin: 0; }
.results-list { margin: 0; }
.result { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 12px 0; border-top: 1px solid rgba(255, 255, 255, 0.14); }
.result:first-child { border-top: 0; }
.result[hidden] { display: none; }
.result dt { color: #d7daf0; }
.result dd { margin: 0; font-size: 1.2rem; font-weight: 600; color: var(--white); text-align: right; }
.result.primary { flex-direction: column; align-items: flex-start; gap: 2px; }
.result.primary dd { font-size: clamp(2.2rem, 7vw, 3rem); color: var(--green); line-height: 1.1; text-align: left; }

.steps { counter-reset: step; list-style: none; padding-left: 0 !important; }
.steps li { counter-increment: step; position: relative; padding-left: 44px; }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: 0; width: 30px; height: 30px; border-radius: 50%;
  background: var(--indigo-50); color: var(--indigo); font-family: var(--font-mono); font-weight: 600;
  display: flex; align-items: center; justify-content: center; font-size: 0.9rem;
}
.formula { margin: 0; display: grid; gap: 10px; }
.formula > div { background: var(--offwhite); border: 1px solid var(--line); border-left: 4px solid var(--green); border-radius: 10px; padding: 12px 14px; }
.formula dt { font-weight: 700; color: var(--indigo); }
.formula dd { margin: 4px 0 0; }
.formula code { color: var(--indigo-700); overflow-wrap: anywhere; }

/* Tables */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 0 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); }
.data-table { width: 100%; border-collapse: collapse; font-size: 0.98rem; }
.data-table caption { text-align: left; padding: 12px 16px; font-size: 0.9rem; color: var(--slate); border-bottom: 1px solid var(--line); }
.data-table th, .data-table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.data-table tbody tr:last-child th, .data-table tbody tr:last-child td { border-bottom: 0; }
.data-table thead th { font-family: var(--font-head); font-size: 0.82rem; font-weight: 600; color: var(--indigo); background: var(--indigo-50); white-space: nowrap; }
.data-table tbody th { font-weight: 600; color: var(--indigo); min-width: 150px; }
.data-table td.num { text-align: right; white-space: nowrap; }
.data-table thead th:not(:first-child) { text-align: right; }
.data-table td.strong { font-weight: 600; color: var(--indigo); background: var(--green-50); }
.data-table .better { display: block; font-weight: 400; font-size: 0.8rem; color: var(--slate); }
.data-table td.na, .data-table tr.na td { color: var(--slate); font-style: italic; text-align: right; }
.grid-table thead th:not(:first-child), .grid-table td { text-align: left; }
.grid-table td a { font-weight: 600; }
.grid-table td .sub { display: block; font-size: 0.85rem; color: var(--slate); font-family: var(--font-mono); }
.grid-table td.na { text-align: left; }
.grid-table tbody tr:target { background: var(--green-50); }
.data-note { font-size: 0.92rem; color: var(--slate); }
@media (max-width: 520px) {
  .data-table { font-size: 0.92rem; }
  .data-table th, .data-table td { padding: 10px 10px; }
  .data-table tbody th { min-width: 118px; }
}

/* Definitions + checks */
.defs { margin: 0 0 20px; display: grid; gap: 12px; }
.defs > div { background: var(--white); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; }
.defs dt { font-weight: 700; color: var(--indigo); }
.defs dd { margin: 4px 0 0; }
.checks { list-style: none; padding-left: 0 !important; }
.checks li { position: relative; padding-left: 30px; }
.checks li::before {
  content: ''; position: absolute; left: 2px; top: 6px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/12px no-repeat;
}
.checks strong { color: var(--indigo); }

/* FAQ */
.faq details { background: var(--white); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 10px; }
.faq summary {
  cursor: pointer; list-style: none; padding: 16px 48px 16px 18px; position: relative;
  font-family: var(--font-head); font-weight: 600; color: var(--indigo); font-size: 1.02rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; position: absolute; right: 18px; top: 50%; transform: translateY(-50%); font-family: var(--font-mono); font-size: 1.3rem; color: var(--green-700); }
.faq details[open] summary::after { content: '\2212'; }
.faq-a { padding: 0 18px 4px; }

/* CTA band */
.cta-band { background: linear-gradient(135deg, var(--indigo) 0%, #23407a 60%, #1f6a6a 100%); color: #e6e8f5; padding: 48px 0; }
.cta-band h2 { color: var(--white); }
.cta-inner { display: grid; gap: 20px; align-items: center; }
.cta-inner p { margin: 0; max-width: 60ch; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 12px; }
@media (min-width: 860px) { .cta-inner { grid-template-columns: 1.4fr 1fr; } .cta-actions { justify-content: flex-end; } }

/* Footer */
.site-footer { background: var(--indigo-700); color: #c9cce6; padding: 40px 0 24px; font-size: 0.95rem; }
.footer-row { display: grid; gap: 20px; }
.footer-brand p { margin: 8px 0 0; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 12px 22px; }
.site-footer nav a { color: var(--white); text-decoration: none; }
.site-footer nav a:hover { color: var(--green); }
.footer-legal { margin-top: 24px; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, 0.12); }
.footer-legal p { margin: 0; font-size: 0.85rem; }
@media (min-width: 760px) { .footer-row { grid-template-columns: 1fr auto; align-items: start; } }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
