/* Superintelligence reference sites: shared stylesheet. The accent block below is
   the only per-site difference; everything else is identical across the three. */
:root {
  /* SITE ACCENT */
  --accent: #1f5c4f;
  --accent-dark: #154238;
  --accent-light: #ecf5f2;
  --accent-mid: #bfdcd3;
  --footer-bg: #f6f8fa;
  --accent-on-dark: #7fcab5;
  --accent-on-dark-hover: #a9ddcf;
  --accent-light-on-dark: #15241f;
  --accent-mid-on-dark: #355a4e;
  --accent-2: #0e7490;      /* theme.css second hue: gradients, jurisdiction tags */
  /* END SITE ACCENT */

  --ink: #1f252d;
  --ink-body: #2e353e;     /* body copy, a shade softer than headings (11:1 on --bg) */
  --ink-soft: #3f4853;
  --ink-faint: #59626d;      /* 5.9:1 on --bg */
  --bg: #fcfcfb;
  --bg-soft: #f4f4f2;
  --border: #e2e2de;
  --footer-ink: #c8ccd3;
  --radius: 10px;
  --maxw: 1080px;
  --maxw-text: 620px;        /* 572px text column = ~74 characters at 18px */
  /* Type scale (body 18px desktop / 17px mobile, ratio ~1.2-1.25) */
  --fs-xs: 0.8125rem;     /* 13px uppercase labels, tags */
  --fs-sm: 0.9375rem;     /* 15px meta, crumbs, sources, nav, footer */
  --fs-ui: 1rem;          /* 16px buttons, card blurbs */
  --fs-base: 1.125rem;    /* 18px body */
  --fs-lg: 1.25rem;       /* 20px definition, card titles, FAQ questions, glossary terms */
  --fs-h3: 1.3125rem;     /* 21px */
  --fs-h2: 1.625rem;      /* 26px */
  --fs-h1: 2.25rem;       /* 36px */
  --fs-display: 2.7rem;   /* 43px home hero */
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  --serif: Charter, 'Bitstream Charter', 'Sitka Text', Cambria, Georgia, serif;
}

/* Light only: these are reading references, so they stay light whatever the OS theme. */

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }
body {
  overflow-wrap: break-word;
  font-family: var(--serif);
  color: var(--ink-body);
  background: var(--bg);
  line-height: 1.78;
  font-size: var(--fs-base);
}
h1, h2, h3, h4, .sans { font-family: var(--sans); color: var(--ink); }
h1 { font-size: var(--fs-h1); line-height: 1.2; letter-spacing: -0.015em; font-weight: 600; }
h2 { font-size: var(--fs-h2); line-height: 1.32; letter-spacing: -0.005em; font-weight: 600; }
h3 { font-size: var(--fs-h3); line-height: 1.4; font-weight: 600; }
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { color: var(--accent-dark); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.site-footer :focus-visible { outline-color: var(--accent); }

.skip-link { position: absolute; left: -999px; top: 8px; background: var(--bg); padding: 12px 16px; z-index: 100; font-family: var(--sans); font-weight: 650; border: 2px solid var(--accent); border-radius: 6px; }
.skip-link:focus { left: 8px; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.container-text { max-width: var(--maxw-text); margin: 0 auto; padding: 0 24px; }

/* ---------- Header ---------- */
.site-header { border-bottom: 1px solid var(--border); background: var(--bg); }
.header-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 14px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.logo { font-family: var(--sans); font-weight: 650; font-size: 1.08rem; color: var(--ink); text-decoration: none; letter-spacing: -0.01em; line-height: 1.2; }
.logo-tld { color: var(--accent); }
.logo small { display: block; font-weight: 500; font-size: var(--fs-xs); color: var(--ink-faint); letter-spacing: 0; }
.main-nav { display: flex; gap: 6px; flex-wrap: wrap; font-family: var(--sans); font-size: var(--fs-sm); }
.main-nav a { color: var(--ink-soft); text-decoration: none; padding: 10px 12px; border-radius: 8px; min-height: 44px; display: inline-flex; align-items: center; }
.main-nav a:hover { background: var(--bg-soft); color: var(--ink); }
.main-nav .nav-cta { color: var(--accent); font-weight: 600; }

/* ---------- Home hero ---------- */
.hero { padding: 88px 0 64px; border-bottom: 1px solid var(--border); }
.hero .kicker, .kicker { font-family: var(--sans); font-size: var(--fs-xs); font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; color: var(--accent); margin-bottom: 16px; }
.lede { color: var(--ink-soft); }
.hero h1 { font-size: var(--fs-display); max-width: 18ch; }
.hero .lede { max-width: 60ch; margin-top: 28px; }
.article-hero .lede { max-width: 64ch; margin-top: 14px; }
.definition-box { margin-top: 36px; max-width: 64ch; border-left: 3px solid var(--accent); background: var(--accent-light); padding: 22px 26px; border-radius: 0 var(--radius) var(--radius) 0; }
.definition-box p { font-size: var(--fs-lg); line-height: 1.6; }
.definition-box .attribution { font-family: var(--sans); font-size: var(--fs-sm); line-height: 1.55; color: var(--ink-faint); margin-top: 8px; }
.btn-row { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 36px; }
.btn { font-family: var(--sans); font-weight: 550; font-size: var(--fs-ui); text-decoration: none; padding: 12px 20px; border-radius: 8px; display: inline-block; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); color: #fff; }
.btn-secondary { border: 1px solid var(--accent-mid); color: var(--accent); }

/* ---------- Sections and cards ---------- */
.section { padding: 80px 0; }
.section-head { max-width: 64ch; margin-bottom: 36px; }
.section-head p { color: var(--ink-soft); margin-top: 12px; }
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.card-grid > * { min-width: 0; }
.card { border: 1px solid var(--border); border-radius: var(--radius); padding: 26px 28px; background: var(--bg); }
.card:hover { border-color: var(--accent-mid); }
.card h3 { font-size: var(--fs-lg); margin-bottom: 10px; }
.card h3 a { color: var(--ink); text-decoration: none; }
.card h3 a:hover { color: var(--accent); text-decoration: underline; }
.card p { font-size: var(--fs-ui); color: var(--ink-soft); line-height: 1.65; }
.card-tag { font-family: var(--sans); font-size: var(--fs-xs); font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent); display: block; margin-bottom: 10px; }
.prose-section { max-width: calc(var(--maxw-text) - 48px); }
.prose-section p { margin-bottom: 22px; }
.prose-section h2 { margin: 56px 0 18px; }
.prose-section h2:first-child { margin-top: 0; }
/* Odd card counts: let the first card span the row so the last row is never a lone orphan */
.card-grid-lead > .card:first-child { grid-column: 1 / -1; }
.card-grid-lead > .card:first-child p { max-width: 64ch; }

/* ---------- Article ---------- */
.article-hero { padding: 64px 0 32px; }
.crumb { font-family: var(--sans); font-size: var(--fs-sm); color: var(--ink-faint); margin-bottom: 12px; }
.crumb a { color: var(--ink-faint); }
.meta-line { font-family: var(--sans); font-size: var(--fs-sm); color: var(--ink-faint); margin-top: 14px; line-height: 1.55; }
.meta-line a { color: var(--ink-faint); }
.article-body { padding-bottom: 48px; }
.article-body p { margin-bottom: 22px; }
.article-body .answer-first { font-size: var(--fs-lg); color: var(--ink); margin-bottom: 24px; }
.article-body h2 { margin: 60px 0 18px; }
.article-body > .container-text > h2:first-child { margin-top: 12px; }
.article-body h3 { margin: 36px 0 12px; }
.article-body ul, .article-body ol { margin: 0 0 24px 1.3em; }
.article-body li { margin-bottom: 10px; }
.article-body blockquote { border-left: 3px solid var(--accent-mid); padding: 4px 0 4px 18px; margin: 18px 0; color: var(--ink-soft); font-style: italic; }
.article-body blockquote cite, .article-body blockquote footer { display: block; font-style: normal; font-family: var(--sans); font-size: var(--fs-sm); color: var(--ink-faint); margin-top: 6px; }
.article-body blockquote p { margin-bottom: 8px; }
.article-body blockquote p:last-child { margin-bottom: 0; }
/* Attribution line (second paragraph) reads as a caption, not a second quote */
.article-body blockquote p + p:last-child { font-style: normal; font-family: var(--sans); font-size: var(--fs-sm); color: var(--ink-faint); margin-top: 6px; }
.at-a-glance { background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 22px 8px; margin: 8px 0 28px; }
.article-body .at-a-glance h2 { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent); margin: 0 0 10px; }
.callout { border-left: 4px solid var(--accent); background: var(--accent-light); padding: 16px 20px; border-radius: 0 var(--radius) var(--radius) 0; margin: 22px 0; }
.article-body .callout p:last-child { margin-bottom: 0; }
.checklist { list-style: none; }
.article-body .checklist { margin-left: 0; }
.checklist li { padding-left: 28px; position: relative; }
.checklist li::before { content: "☐"; content: "☐" / ""; position: absolute; left: 0; color: var(--accent); font-family: var(--sans); }

.table-wrap { overflow-x: auto; margin: 20px 0 24px; border: 1px solid var(--border); border-radius: var(--radius); }
/* Scroll cue: an edge shadow appears only on a side that has hidden columns (pure CSS, no JS) */
.table-wrap {
  background:
    linear-gradient(90deg, var(--bg) 30%, transparent) left / 40px 100% no-repeat local,
    linear-gradient(270deg, var(--bg) 30%, transparent) right / 40px 100% no-repeat local,
    radial-gradient(farthest-side at 0 50%, color-mix(in srgb, var(--ink) 22%, transparent), transparent) left / 14px 100% no-repeat scroll,
    radial-gradient(farthest-side at 100% 50%, color-mix(in srgb, var(--ink) 22%, transparent), transparent) right / 14px 100% no-repeat scroll;
}
.article-body table { border-collapse: collapse; width: 100%; font-family: var(--sans); font-size: var(--fs-sm); line-height: 1.5; }
.article-body th, .article-body td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.article-body th { background: var(--bg-soft); font-weight: 600; }
.article-body tr:last-child td { border-bottom: 0; }
.article-body td { overflow-wrap: break-word; hyphens: auto; }
/* Wide comparison tables (5+ columns) break out of the 572px text column on desktop instead of scrolling */
@media (min-width: 940px) {
  .article-body .table-wrap:has(th:nth-child(4)) { width: 860px; margin-left: calc(50% - 430px); }
}
/* Long unbroken words (domain names in headings) must not push the page sideways on phones */
h1, h2, h3 { overflow-wrap: break-word; }
/* Superscripts (10^25, 10^26) must not stretch the line they sit in */
sup, sub { line-height: 0; }

.faq { border-top: 1px solid var(--border); margin-top: 40px; padding-top: 8px; }
.faq-item h3 { font-size: var(--fs-lg); }
.related { margin-top: 32px; }
.related-list { list-style: none; margin: 0 !important; }
.related-list li { border-top: 1px solid var(--border); padding: 12px 0; margin: 0; }
.related-list a { font-family: var(--sans); font-weight: 550; }
.related-list p { font-size: var(--fs-ui); color: var(--ink-soft); margin: 4px 0 0; }
.sources { margin-top: 44px; font-size: var(--fs-sm); color: var(--ink-soft); }
.article-body .sources h2 { font-size: var(--fs-lg); }
.sources li { margin-bottom: 6px; overflow-wrap: anywhere; }

/* ---------- Glossary ---------- */
.az { font-family: var(--sans); display: flex; flex-wrap: wrap; gap: 4px; margin: 8px 0 24px; }
.az a { display: inline-flex; min-width: 36px; min-height: 36px; align-items: center; justify-content: center; border: 1px solid var(--border); border-radius: 6px; text-decoration: none; font-weight: 550; }
.glossary dt { font-family: var(--sans); font-weight: 600; font-size: var(--fs-lg); line-height: 1.35; margin-top: 28px; scroll-margin-top: 16px; }
.glossary dd { margin: 6px 0 0; color: var(--ink); }
.term-source { font-family: var(--sans); font-size: var(--fs-xs); margin-left: 6px; }
.glossary dt:target { color: var(--accent); }

/* ---------- Footer ---------- */
.site-footer { background: var(--bg-soft); color: var(--ink-soft); border-top: 1px solid var(--border); margin-top: 80px; padding: 64px 0 40px; font-size: var(--fs-sm); font-family: var(--sans); line-height: 1.6; }
.site-footer a { color: var(--accent); }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1.15fr; gap: 28px; }
.footer-grid > * { min-width: 0; }
.site-footer a { overflow-wrap: anywhere; }
.footer-brand { font-weight: 650; color: var(--ink); font-size: 1.08rem; margin-bottom: 8px; }
.footer-brand .logo-tld { color: var(--accent); }
.footer-heading { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-faint); margin-bottom: 12px; font-weight: 600; }
.site-footer ul { list-style: none; }
.site-footer li { margin-bottom: 6px; }
.site-footer ul a { display: inline-block; padding: 2px 0; }
.related-note { color: var(--ink-faint); font-size: var(--fs-xs); }
.footer-note { border-top: 1px solid var(--border); margin-top: 32px; padding-top: 20px; font-size: var(--fs-sm); }

@media (max-width: 860px) {
  .card-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 620px) {
  :root { --fs-base: 1.0625rem; --fs-lg: 1.1875rem; --fs-h3: 1.1875rem; --fs-h2: 1.4375rem; --fs-h1: 1.9rem; --fs-display: 1.9rem; }
  .hero { padding: 56px 0 44px; }
  .section { padding: 56px 0; }
  .article-hero { padding: 44px 0 24px; }
  .container, .container-text, .header-inner { padding-left: 16px; padding-right: 16px; }
  .card-grid { grid-template-columns: 1fr; }
  .header-inner { row-gap: 4px; padding-top: 12px; padding-bottom: 4px; }
  .main-nav { width: 100%; gap: 0; margin-left: -8px; }
  .main-nav a { padding: 10px 8px; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  /* Phones: 4+ column tables keep readable cell widths and scroll, with the row label pinned */
  .article-body table:has(th:nth-child(4)) { min-width: 36em; }
  .article-body table:has(th:nth-child(4)) :is(th, td) { min-width: 8em; }
  .article-body table:has(th:nth-child(4)) :is(th, td):first-child { position: sticky; left: 0; z-index: 1; background: var(--bg); box-shadow: inset -1px 0 var(--border); }
  .article-body table:has(th:nth-child(4)) th:first-child { background: var(--bg-soft); }
}

@media print {
  .site-header, .site-footer, .skip-link, .related { display: none; }
  body { background: #fff; color: #000; font-size: 11pt; }
}
.mt { margin-top: 18px; font-family: var(--sans); }
.article-body caption { caption-side: top; text-align: left; font-family: var(--sans); font-weight: 600; font-size: var(--fs-sm, 15px); color: var(--ink-soft); padding: 10px 12px 6px; }
