/* tenfinity – shared styles (brand v5). Light, flat, mobile-first. Self-hosted fonts, no external requests. */
@font-face { font-family: "Plus Jakarta Sans"; src: url("fonts/plus-jakarta-sans-var.woff2") format("woff2"); font-weight: 200 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/inter-var.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }

:root {
  /* Brand palette (style guide v5) */
  --navy: #0B1020;
  --blue: #3B82F6;
  --light-gray: #E5EAF5;
  --yellow: #F6C945;
  --pink: #FF6B6B;

  --bg: #ffffff;
  --bg-soft: #F7F9FD;
  --surface: #ffffff;
  --text: #0B1020;
  --muted: #4A5368;
  --border: #E5EAF5;
  --brand: #3B82F6;
  --brand-ink: #1D5FD6;        /* AA-contrast blue for text links on white */
  --brand-strong: #1A4FB8;
  --brand-soft: #EEF4FE;
  --focus: #1D5FD6;
  --radius: 16px;
  --max: 70rem;
  --read: 42rem;
  --font-head: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); font-size: 1.0625rem; line-height: 1.7;
  color: var(--text); background: var(--bg); display: flex; flex-direction: column; min-height: 100vh;
  -webkit-font-smoothing: antialiased; font-feature-settings: "cv11";
}
main { flex: 1; }
img, svg { max-width: 100%; height: auto; }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.2; margin: 0 0 .6em; color: var(--navy); font-weight: 700; }
h1 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3.25rem); letter-spacing: -.02em; font-weight: 800; }
h2 { font-size: clamp(1.35rem, 1.15rem + .8vw, 1.7rem); letter-spacing: -.005em; }
h3 { font-size: 1.15rem; letter-spacing: 0; }
p { margin: 0 0 1em; }
a { color: var(--brand-ink); text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { color: var(--brand-strong); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 4px; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 1.25rem; }
@media (min-width: 48rem) { .container { padding: 0 2rem; } }
.narrow { max-width: var(--read); }
@media (min-width: 48rem) { .container.narrow { max-width: calc(var(--read) + 4rem); } }

.skip-link { position: absolute; left: 1rem; top: -4rem; z-index: 100; background: var(--navy); color: #fff; padding: .6rem 1rem; border-radius: 8px; text-decoration: none; }
.skip-link:focus { top: 1rem; color: #fff; }

/* Header & nav */
.site-header { border-bottom: 1px solid var(--border); background: rgba(255,255,255,.96); position: sticky; top: 0; z-index: 50; }
.header-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .5rem; min-height: 4.25rem; }
.brand { display: inline-flex; align-items: center; gap: .55rem; text-decoration: none; color: var(--navy); }
.brand-mark { width: 34px; height: 34px; color: var(--blue); flex: none; }
.brand-name { font-family: var(--font-head); font-weight: 700; font-size: 1.35rem; letter-spacing: -.02em; line-height: 1; padding-bottom: .12em; }
.brand:hover { color: var(--navy); }
.nav-toggle { display: none; font: inherit; font-size: .95rem; font-weight: 600; background: #fff; color: var(--navy); border: 1px solid var(--border); border-radius: 10px; padding: .45rem .9rem; cursor: pointer; min-height: 44px; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: .25rem; flex-wrap: wrap; }
.site-nav a { display: block; padding: .5rem .85rem; border-radius: 999px; text-decoration: none; color: var(--muted); font-weight: 500; font-size: .97rem; }
.site-nav a:hover { color: var(--navy); background: var(--bg-soft); }
.site-nav a[aria-current="page"] { color: var(--brand-ink); background: var(--brand-soft); }
@media (max-width: 47.99rem) {
  .js .nav-toggle { display: inline-block; }
  .js .site-nav { display: none; width: 100%; padding-bottom: .9rem; }
  .js .site-nav.is-open { display: block; }
  .js .site-nav ul { flex-direction: column; }
  .js .site-nav a { border-radius: 10px; }
}

/* Hero */
.hero { padding: 3.5rem 0 3rem; }
.eyebrow { display: inline-flex; align-items: center; gap: .55rem; font-weight: 600; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--brand-ink); margin-bottom: 1rem; }
.eyebrow::before { content: ""; width: 1.25rem; height: 2px; background: var(--yellow); border-radius: 2px; }
.hero h1 { max-width: 16ch; }
.hero .lede { font-size: 1.2rem; color: var(--muted); max-width: 36rem; }
.btn-row { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: 1.75rem; }
.btn { display: inline-flex; align-items: center; padding: .7rem 1.25rem; border-radius: 12px; font-weight: 600; font-size: 1rem; text-decoration: none; border: 1px solid var(--brand); min-height: 46px; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: #2F6FDB; border-color: #2F6FDB; color: #fff; }
.btn-secondary { color: var(--navy); background: #fff; border-color: var(--border); }
.btn-secondary:hover { color: var(--navy); border-color: #C9D3EA; background: var(--bg-soft); }
.hero-card { margin-top: 2.5rem; background: var(--navy); color: #C9D2E6; border-radius: 20px; padding: 1.75rem 1.75rem 1.5rem; }
.hero-num { font-family: var(--font-head); font-weight: 800; font-size: 4rem; line-height: 1; letter-spacing: -.04em; color: var(--blue); margin: 0; }
.hero-card-title { font-family: var(--font-head); font-weight: 600; font-size: 1.2rem; color: #fff; margin: .35rem 0 1rem; }
.hero-card ul { list-style: none; margin: 0; padding: 1rem 0 0; border-top: 1px solid rgba(255,255,255,.12); display: grid; gap: .5rem; font-size: .97rem; }
.hero-card li { display: flex; gap: .65rem; align-items: baseline; }
.hero-card li::before { content: ""; flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--blue); transform: translateY(-.1em); }
.hero-card li:last-child::before { background: var(--pink); }
@media (min-width: 48rem) {
  .hero { padding: 5.5rem 0 4.5rem; }
  .hero .container { display: grid; grid-template-columns: 1.55fr 1fr; align-items: center; gap: 4rem; }
  .hero-card { margin-top: 0; }
}

.section { padding: 3rem 0; }
@media (min-width: 48rem) { .section { padding: 4.5rem 0; } }
.section-alt { background: var(--bg-soft); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.intro p { font-size: 1.1rem; color: #2A3247; }

/* Cards */
.card-grid { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; gap: 1.25rem; grid-template-columns: 1fr; }
@media (min-width: 40rem) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 64rem) { .card-grid { grid-template-columns: repeat(3, 1fr); } }
.card { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.6rem; display: flex; flex-direction: column; gap: .6rem; transition: border-color .15s ease; }
.card:hover, .card:focus-within { border-color: var(--brand); }
.card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: .6rem; }
.card-icon { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--brand-soft); color: var(--blue); flex: none; }
.card-icon svg { width: 24px; height: 24px; }
.card .num { font-weight: 600; font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.card h3 { margin: 0; font-size: 1.15rem; line-height: 1.35; }
.card h3 a { color: var(--navy); text-decoration: none; }
.card h3 a::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); }
.card h3 a:focus-visible { outline: none; }
.card h3 a:focus-visible::after { outline: 2px solid var(--focus); outline-offset: 3px; }
.card p { margin: 0; color: var(--muted); font-size: .97rem; line-height: 1.6; }
.card .meta { margin-top: auto; padding-top: .75rem; font-size: .85rem; }
.section .center { margin: 2rem 0 0; }
.section .center a { font-weight: 600; text-decoration: none; }
.section .center a:hover { text-decoration: underline; }

/* Archive list */
.archive { list-style: none; padding: 0; margin: 1rem 0 2.5rem; display: grid; gap: .9rem; }
.archive li { border: 1px solid var(--border); border-radius: var(--radius); padding: 1.15rem 1.3rem; background: var(--surface); }
.archive li.has-icon { display: flex; gap: 1rem; align-items: flex-start; position: relative; transition: border-color .15s ease; }
.archive li.has-icon:hover, .archive li.has-icon:focus-within { border-color: var(--brand); }
.archive li.has-icon h3 a::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); }
.archive h3 { margin: 0 0 .3rem; font-size: 1.08rem; line-height: 1.4; }
.archive h3 a { color: var(--navy); text-decoration: none; }
.archive p { margin: 0; color: var(--muted); font-size: .97rem; }
.archive .soon { background: var(--bg-soft); }
.archive .soon h3 { color: #2A3247; }
.badge { display: inline-flex; align-items: center; gap: .4rem; font-size: .72rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; padding: .15rem .6rem; border-radius: 999px; margin-bottom: .45rem; border: 1px solid var(--border); background: #fff; color: var(--muted); }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; }
.badge-live { color: var(--brand-ink); border-color: #CFE0FC; background: var(--brand-soft); }
.badge-live::before { background: var(--blue); }
.badge-soon::before { background: var(--yellow); }

/* Article */
.article-header { padding: 3rem 0 1.25rem; }
@media (min-width: 48rem) { .article-header { padding: 4rem 0 1.5rem; } }
.breadcrumb { font-size: .9rem; margin-bottom: 1.25rem; color: var(--muted); }
.breadcrumb ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.breadcrumb a { color: var(--muted); }
.breadcrumb li + li::before { content: "/"; margin-right: .4rem; color: #A3ADC4; }
.article-meta { color: var(--muted); font-size: .93rem; display: flex; flex-wrap: wrap; gap: .35rem 1.25rem; }
.article-body { padding-bottom: 3rem; }
.article-body > p:first-of-type { font-size: 1.15rem; }
.article-body h2 { margin-top: 1.6em; }
.toc { background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem 1.5rem; margin: 2rem 0 2.25rem; }
.toc h2 { font-family: var(--font); font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin: 0 0 .6rem; }
.toc ol { margin: 0; padding-left: 1.5rem; }
.toc li { margin: .25rem 0; }
.toc li::marker { color: var(--blue); font-weight: 600; font-variant-numeric: tabular-nums; }
.toc a { color: var(--navy); text-decoration: none; }
.toc a:hover { color: var(--brand-ink); text-decoration: underline; }
.way { padding: 1.75rem 0; border-top: 1px solid var(--border); scroll-margin-top: 5.5rem; }
.way h2 { display: flex; gap: .75rem; align-items: baseline; margin-top: 0; font-size: clamp(1.25rem, 1.1rem + .6vw, 1.5rem); }
.way-num { flex: none; font-family: var(--font-head); font-weight: 800; font-size: 1.05em; color: var(--blue); min-width: 1.5em; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.example { margin: 1.1rem 0 0; background: var(--bg-soft); border: 1px solid var(--border); border-radius: 12px; padding: 1rem 1.15rem; }
.example figcaption { font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .12em; color: var(--brand-ink); margin-bottom: .4rem; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.example .prompt { margin: 0; font-family: var(--mono); font-size: .9rem; line-height: 1.6; color: #1F2740; white-space: pre-wrap; overflow-wrap: anywhere; }
.copy-btn { font: inherit; font-size: .72rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; background: #fff; color: var(--navy); border: 1px solid var(--border); border-radius: 8px; padding: .3rem .65rem; cursor: pointer; min-height: 32px; }
.copy-btn:hover { border-color: var(--brand); color: var(--brand-ink); }
.callout { border-radius: var(--radius); padding: 1.35rem 1.5rem; margin: 1.5rem 0; border: 1px solid var(--border); }
.callout h2 { font-size: 1.15rem; margin: 0 0 .45rem; }
.callout p { margin: 0; }
.callout-tip { background: var(--navy); border-color: var(--navy); color: #D3DAEA; }
.callout-tip h2 { color: #fff; }
.callout-warn { background: #fff; border-left: 3px solid var(--yellow); }
.pager { display: grid; gap: 1rem; grid-template-columns: 1fr; margin: 2.5rem 0 0; }
@media (min-width: 40rem) { .pager { grid-template-columns: 1fr 1fr; } }
.pager a { display: block; border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.2rem; text-decoration: none; background: var(--surface); color: var(--navy); font-weight: 600; font-family: var(--font-head); }
.pager a:hover { border-color: var(--brand); }
.pager small { display: block; color: var(--muted); font-weight: 500; font-family: var(--font); margin-bottom: .15rem; }
.pager .next { text-align: right; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); background: var(--bg-soft); padding: 2.5rem 0; font-size: .93rem; color: var(--muted); }
.footer-inner { display: grid; gap: 1.5rem; }
@media (min-width: 48rem) { .footer-inner { grid-template-columns: 1fr auto; align-items: center; } }
.footer-brand { font-family: var(--font-head); font-weight: 700; color: var(--navy); margin-bottom: .2rem; }
.footer-inner p { margin: 0; }
.social { list-style: none; padding: 0; margin: 0; display: flex; gap: .5rem; flex-wrap: wrap; }
.social a { display: inline-flex; align-items: center; gap: .45rem; padding: .5rem .85rem; min-height: 44px; border-radius: 999px; border: 1px solid var(--border); background: #fff; color: var(--navy); text-decoration: none; font-weight: 500; }
.social a:hover { border-color: var(--brand); color: var(--brand-ink); }
.social svg { width: 16px; height: 16px; fill: currentColor; }
.footer-links { list-style: none; padding: 0; margin: .6rem 0 .6rem; display: flex; gap: 1.25rem; flex-wrap: wrap; }
.footer-links a { color: var(--navy); }

.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; }
.center { text-align: center; }
.notfound { padding: 5rem 0; }
.notfound .btn-row { justify-content: center; }
.lede { font-size: 1.15rem; color: var(--muted); }
@media (prefers-reduced-motion: reduce) { .card, .archive li { transition: none; } }
