/* AI-OS blog · direction B "Blue precision". Tokens mirror page.css :root (the standalone pages) and
 * design-demos/aios-v4/site.css; keep them in step by hand. Styles the shared blog engine's markup. */
:root {
  --ground: #f5f6f8;
  --paper: #ffffff;
  --tone: #eaecf0;
  --ink: #0b0c0f;
  --ink-2: #565b66;
  --ink-3: #9196a1;
  --blue: #1f5bff;
  --blue-press: #1448e0;
  --blue-tint: #e9efff;
  --blue-soft: #c9d8ff;
  --line: rgba(11, 12, 15, 0.08);
  --font: "Geist", ui-sans-serif, sans-serif;
  --mono: "Geist Mono", ui-monospace, monospace;
  --head: clamp(40px, 1rem + 4.4vw, 72px);
  --lead: clamp(18px, 0.95rem + 0.45vw, 21px);
  --body: clamp(16px, 0.95rem + 0.15vw, 18px);
  --m: 32px;
  --r: 24px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}
@media (max-width: 760px) { :root { --m: 16px; --r: 20px; } }

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  min-height: 100vh; min-height: 100dvh;
  background: var(--ground); color: var(--ink);
  font: 400 var(--body) / 1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  font-feature-settings: "ss01", "cv11";
  overflow-x: hidden;
}
a { color: var(--blue); text-decoration: none; }
@media (hover: hover) { a:hover { text-decoration: underline; text-underline-offset: 3px; } }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 8px; }
.shell { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 var(--m); }

/* ---------- top (matches .top in page.css) ---------- */
.site-nav {
  position: sticky; top: 0; z-index: 30; max-width: none;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px var(--m); background: rgba(245, 246, 248, 0.86);
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
}
.brand { display: inline-flex; align-items: center; gap: 9px; color: var(--ink); font-weight: 600; font-size: 17px; letter-spacing: -0.02em; white-space: nowrap; }
.brand:hover { text-decoration: none; }
/* the bead is the one place a gradient lives (DESIGN.md "The orb") */
.brand::before { /* taste-skill-ignore */
  content: ""; width: 16px; height: 16px; border-radius: 50%; flex: 0 0 auto;
  background: radial-gradient(circle at 34% 30%, #dce7ff 0, #6f98ff 32%, var(--blue) 60%, #0b2a96 100%); /* taste-skill-ignore */
}
.nav-links { display: flex; align-items: center; gap: 22px; font-size: 14.5px; }
.nav-links a:not(.button) { color: var(--ink-2); transition: color 0.2s; }
@media (hover: hover) { .nav-links a:not(.button):hover { color: var(--ink); text-decoration: none; } }

.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 52px; padding: 0 26px; border-radius: 999px;
  background: var(--blue); color: #fff; font-weight: 500; font-size: 16px; letter-spacing: -0.01em;
  transition: transform 0.25s var(--ease-out), background-color 0.2s;
  white-space: nowrap; user-select: none; -webkit-user-select: none;
}
@media (hover: hover) { .button:hover { background: var(--blue-press); transform: translateY(-1px); text-decoration: none; } }
.button:active { transform: scale(0.97); transition-duration: 0.08s; }
.nav-links .button { height: 38px; padding: 0 16px; font-size: 14px; }

/* ---------- index ---------- */
.hero { padding: clamp(56px, 9vw, 120px) 0 clamp(36px, 5vw, 64px); max-width: 860px; }
.eyebrow { display: inline-block; font: 500 13px/1 var(--mono); letter-spacing: 0.04em; text-transform: uppercase; color: var(--blue); }
.hero h1, .article h1 { font-weight: 500; letter-spacing: -0.045em; line-height: 0.98; text-wrap: balance; color: var(--ink); }
.hero h1 { font-size: var(--head); margin: 18px 0 20px; }
.hero p { font-size: var(--lead); line-height: 1.4; color: var(--ink-2); letter-spacing: -0.01em; max-width: 46ch; text-wrap: pretty; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; padding-bottom: clamp(56px, 8vw, 104px); }
.post-card {
  display: flex; flex-direction: column; gap: 12px; padding: 28px; border-radius: var(--r);
  background: var(--paper); color: var(--ink); box-shadow: 0 0 0 1px var(--line);
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s;
}
@media (hover: hover) { .post-card:hover { text-decoration: none; transform: translateY(-2px); box-shadow: 0 0 0 1px var(--blue-soft), 0 18px 40px -24px rgba(31, 91, 255, 0.35); } }
.post-card h2 { font-size: 23px; font-weight: 500; letter-spacing: -0.03em; line-height: 1.15; text-wrap: balance; }
.post-card p { color: var(--ink-2); font-size: 15.5px; line-height: 1.5; }
.post-card .meta { margin-top: auto; }
.meta { font: 400 13px/1.5 var(--mono); color: var(--ink-3); }

/* ---------- article ---------- */
.article { max-width: calc(68ch + 2 * var(--m)); margin: 0 auto; padding: clamp(32px, 5vw, 64px) var(--m) clamp(56px, 8vw, 104px); }
.article > a:first-child { font-size: 14.5px; color: var(--ink-2); }
.article header { margin: 28px 0 32px; }
.article header .eyebrow { margin-bottom: 16px; }
.article h1 { font-size: clamp(36px, 1rem + 3.4vw, 60px); margin-bottom: 18px; }
.article h2 { font-size: clamp(26px, 1rem + 1.2vw, 34px); font-weight: 500; letter-spacing: -0.035em; line-height: 1.12; margin: 56px 0 16px; text-wrap: balance; }
.article h3 { font-size: 21px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.25; margin: 36px 0 10px; }
.article p, .article ul, .article ol, .article blockquote { margin: 0 0 18px; color: #2a2e36; }
.article ul, .article ol { padding-left: 1.3em; }
.article li { margin-bottom: 8px; padding-left: 2px; }
.article li::marker { color: var(--blue); }
.article strong { font-weight: 600; color: var(--ink); }
.article code { font: 0.9em var(--mono); background: var(--tone); border-radius: 6px; padding: 2px 6px; }
.article pre { background: #0a0b0e; color: #f1f2f4; border-radius: 16px; padding: 18px 20px; overflow-x: auto; margin: 0 0 22px; font-size: 14px; line-height: 1.6; }
.article pre code { background: none; padding: 0; color: inherit; }
.article blockquote { border-left: 3px solid var(--blue); padding: 4px 0 4px 18px; color: var(--ink-2); }
.article hr { border: 0; height: 1px; background: var(--line); margin: 40px 0; }
.article img { max-width: 100%; height: auto; border-radius: 16px; }

/* comparison tables scroll sideways on a phone instead of crushing their columns */
.article table {
  display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%;
  border-collapse: separate; border-spacing: 0; margin: 8px 0 28px; font-size: 15px; line-height: 1.45;
  background: var(--paper); border-radius: 16px; box-shadow: 0 0 0 1px var(--line);
}
.article th, .article td { padding: 12px 16px; text-align: left; vertical-align: top; min-width: 140px; border-bottom: 1px solid var(--line); }
.article th { font-weight: 600; color: var(--ink); background: #fafbfc; white-space: nowrap; }
.article tr:last-child td { border-bottom: 0; }

.disclosure, .draft-notice {
  margin: 0 0 32px; padding: 16px 20px; border-radius: 16px;
  background: var(--blue-tint); color: #1d2a55; font-size: 15px; line-height: 1.5;
}
.disclosure strong { color: var(--blue); }
.draft-notice { background: #fff4d6; color: #5a4300; }

.cta {
  margin: 40px 0; padding: clamp(24px, 4vw, 36px); border-radius: var(--r);
  background: var(--blue); color: #fff;
}
.cta h2 { color: #fff; margin: 0 0 10px; font-size: clamp(24px, 1rem + 1vw, 30px); }
.cta p { color: rgba(255, 255, 255, 0.82); margin-bottom: 22px; max-width: 52ch; }
.cta .button { background: #fff; color: var(--ink); }
@media (hover: hover) { .cta .button:hover { background: var(--blue-tint); } }

.related { margin-top: 56px; padding-top: 28px; border-top: 1px solid var(--line); }
.related h2 { font-size: 20px; margin: 0 0 12px; letter-spacing: -0.02em; }
.related ul { list-style: none; padding: 0; }
.related li { padding: 10px 0; border-bottom: 1px solid var(--line); margin: 0; }

/* ---------- footer (matches .foot in page.css) ---------- */
footer .foot {
  display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; max-width: none;
  padding: 26px var(--m) 28px; font-size: 14px; color: var(--ink-2);
}
footer .foot > span:first-child { margin-right: auto; }
footer .foot a { color: var(--ink-2); }
@media (hover: hover) { footer .foot a:hover { color: var(--ink); text-decoration: none; } }

@media (max-width: 760px) {
  .brand { font-size: 15.5px; gap: 8px; }
  .nav-links { gap: 14px; }
  .nav-links a:not(.button) { display: none; }
  .grid { grid-template-columns: 1fr; }
  .post-card { padding: 22px; }
  footer .foot > span:first-child { flex-basis: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
