/* Applied AI FDE — shared styles for every page, hand-written and generated. */

:root {
  --bg: #ffffff;
  --surface: #f8fafc;
  --fg: #0f172a;
  --muted: #52606d;
  --faint: #8b97a5;
  --accent: #1d4ed8;
  --accent-fg: #ffffff;
  --border: #e2e8f0;
  --rule: #cbd5e1;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a0e17;
    --surface: #121826;
    --fg: #f1f5f9;
    --muted: #a3aec0;
    --faint: #6b7889;
    --accent: #6395ff;
    --accent-fg: #06101f;
    --border: #1e2636;
    --rule: #2b3445;
  }
}
:root[data-theme="dark"] {
  --bg: #0a0e17;
  --surface: #121826;
  --fg: #f1f5f9;
  --muted: #a3aec0;
  --faint: #6b7889;
  --accent: #6395ff;
  --accent-fg: #06101f;
  --border: #1e2636;
  --rule: #2b3445;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
.wrap { max-width: 1020px; margin: 0 auto; padding: 0 16px; }
.wrap-narrow { max-width: 720px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 680px) {
  .wrap { padding: 0 32px; }
  .wrap-narrow { padding: 0 32px; }
}
a { color: var(--accent); }

/* ---- Header ---- */
header {
  position: sticky; top: 0; z-index: 10;
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 0; flex-wrap: wrap; }
.logo { font-weight: 700; letter-spacing: -0.015em; font-size: 1.05rem; color: var(--fg); text-decoration: none; }
.logo span { color: var(--faint); font-weight: 500; }
.navlinks { display: flex; gap: 22px; flex-wrap: wrap; }
.navlinks a { color: var(--muted); text-decoration: none; font-size: 0.95rem; }
.navlinks a:hover, .navlinks a[aria-current="page"] { color: var(--fg); }
/* The wrapped two-row nav eats too much of a phone viewport to stay pinned. */
@media (max-width: 679px) {
  header { position: static; }
  .navlinks { gap: 16px; }
  .navlinks a { font-size: 0.9rem; }
}

/* ---- Type ---- */
.eyebrow {
  text-transform: uppercase; letter-spacing: 0.12em;
  font-size: 0.74rem; font-weight: 700; color: var(--faint);
  margin: 0 0 14px;
}
h1 {
  font-size: clamp(2.1rem, 5.4vw, 3.4rem);
  line-height: 1.08; letter-spacing: -0.03em;
  margin: 0 0 20px; max-width: 20ch;
}
h2 {
  font-size: clamp(1.45rem, 3vw, 1.9rem);
  line-height: 1.2; letter-spacing: -0.02em; margin: 0 0 10px;
}
h3 { font-size: 1.02rem; margin: 0 0 6px; letter-spacing: -0.01em; }
.lede { font-size: clamp(1.05rem, 2.1vw, 1.2rem); color: var(--muted); max-width: 58ch; margin: 0 0 30px; }
.sectionintro { color: var(--muted); max-width: 62ch; margin: 0 0 32px; }
p { margin: 0 0 16px; }

.btn {
  display: inline-block; background: var(--accent); color: var(--accent-fg);
  padding: 13px 26px; border-radius: 7px; text-decoration: none;
  font-weight: 600; font-size: 1rem;
}
.btn:hover { filter: brightness(1.08); }
.btn-row { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.btn-quiet { color: var(--muted); text-decoration: none; font-weight: 500; }
.btn-quiet:hover { color: var(--fg); }

/* ---- Sections ---- */
.hero { padding: 84px 0 64px; }
section { padding: 64px 0; border-top: 1px solid var(--border); scroll-margin-top: 72px; }

.claim {
  font-size: clamp(1.2rem, 2.6vw, 1.55rem);
  line-height: 1.45; letter-spacing: -0.015em;
  max-width: 48ch; margin: 0 0 20px;
}

/* ---- Cards ---- */
.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.card {
  border: 1px solid var(--border); background: var(--surface);
  border-radius: 10px; padding: 22px;
}
.card p { color: var(--muted); font-size: 0.95rem; margin: 0 0 12px; }
.card .meta {
  font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--faint); font-weight: 600; margin: 0;
}
.card-accent { border-color: var(--accent); }

/* ---- Numbered steps ---- */
ol.steps { list-style: none; counter-reset: s; margin: 0; padding: 0; display: grid; gap: 26px; }
ol.steps li { counter-increment: s; display: grid; grid-template-columns: 38px 1fr; gap: 16px; align-items: start; }
ol.steps li::before {
  content: counter(s);
  font-variant-numeric: tabular-nums; font-weight: 700; font-size: 0.9rem;
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid var(--rule); color: var(--muted);
}
ol.steps p { color: var(--muted); margin: 0; }

/* ---- Fit lists ---- */
.fit { display: grid; gap: 28px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.fit ul { list-style: none; margin: 0; padding: 0; }
.fit li { padding-left: 26px; position: relative; margin-bottom: 10px; color: var(--muted); }
.fit li::before { position: absolute; left: 0; font-weight: 700; }
.yes li::before { content: "\2713"; color: var(--accent); }
.no li::before { content: "\2715"; color: var(--faint); }

.note {
  border-left: 3px solid var(--rule); padding: 2px 0 2px 16px;
  color: var(--muted); font-size: 0.95rem; max-width: 62ch;
}

/* ---- Tables ---- */
.tablewrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--faint); }
td { color: var(--muted); }
td:first-child { color: var(--fg); font-weight: 600; }

/* ---- Blog ---- */
.postlist { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.postlist li { border-bottom: 1px solid var(--border); }
.postlist a { display: block; padding: 22px 0; text-decoration: none; color: inherit; }
.postlist a:hover h3 { color: var(--accent); }
.postlist h3 { font-size: 1.22rem; margin: 0 0 6px; letter-spacing: -0.015em; }
.postlist p { color: var(--muted); margin: 0 0 8px; font-size: 0.97rem; }
.postmeta { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--faint); font-weight: 600; margin: 0; }

.post { padding: 56px 0 72px; }
.post h1 { font-size: clamp(1.9rem, 4.6vw, 2.7rem); max-width: 24ch; margin-bottom: 14px; }
.post .postmeta { margin-bottom: 36px; }
.prose { font-size: 1.07rem; }
.prose h2 { font-size: 1.42rem; margin: 40px 0 12px; }
.prose h3 { font-size: 1.12rem; margin: 30px 0 8px; }
.prose p { margin: 0 0 18px; }
.prose ul, .prose ol { margin: 0 0 18px; padding-left: 24px; }
.prose li { margin-bottom: 8px; }
.prose blockquote {
  margin: 0 0 18px; padding: 2px 0 2px 18px;
  border-left: 3px solid var(--rule); color: var(--muted);
}
.prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.89em; background: var(--surface);
  border: 1px solid var(--border); border-radius: 4px; padding: 1px 5px;
}
.prose pre {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; padding: 16px; overflow-x: auto; margin: 0 0 18px;
}
.prose pre code { background: none; border: none; padding: 0; font-size: 0.88rem; }
.prose hr { border: none; border-top: 1px solid var(--border); margin: 32px 0; }
.prose img { max-width: 100%; height: auto; border-radius: 8px; }
.prose table { margin-bottom: 18px; }

.postnav { border-top: 1px solid var(--border); padding-top: 24px; margin-top: 48px; }

/* ---- Footer ---- */
footer { border-top: 1px solid var(--border); margin-top: 24px; }
footer .inner { padding: 26px 16px; color: var(--faint); font-size: 0.9rem; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; max-width: 1020px; margin: 0 auto; }
@media (min-width: 680px) { footer .inner { padding: 26px 32px; } }
footer a { color: var(--muted); text-decoration: none; }
