/* Breeze — by Alden Bernstein. Dark, modern. Static, no build. */
:root {
  --bg: #060608;
  --bg-elev: #111317;
  --bg-elev2: #16191f;
  --border: #222a36;
  --border-soft: #1a212b;
  --text: #e8eef6;
  --text-soft: #aab6c6;
  --muted: #6f7d8f;
  --accent: #c4d4e6;       /* frost — cool near-white */
  --accent-bright: #e2ecf6;
  --accent-soft: rgba(196, 212, 230, 0.14);
  --green: #3fb950;
  --red: #f0603a;
  --gold: #e3b341;
  --radius: 9px;
  --maxw: 1240px;
  --shadow: 0 16px 50px rgba(0,0,0,0.55);
  /* glassmorphism */
  --glass: rgba(255,255,255,0.045);
  --glass-strong: rgba(255,255,255,0.07);
  --glass-border: rgba(255,255,255,0.09);
  --glass-blur: blur(20px) saturate(135%);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent-bright); text-decoration: none; }
a:hover { color: #ffffff; }
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(20px, 4.5vw, 56px); }
@media (min-width: 1500px) { :root { --maxw: 1360px; } }

/* ---------- Global top bar (every page) ---------- */
.topbar { position: sticky; top: 0; z-index: 50; background: rgba(8,8,10,0.6); backdrop-filter: var(--glass-blur); border-bottom: 1px solid var(--glass-border); }
.topbar .inner { display: flex; align-items: center; gap: 2px; max-width: var(--maxw); margin: 0 auto; padding: 11px clamp(20px, 4.5vw, 56px); }
.topbar .mark { display: flex; align-items: center; margin-right: auto; }
.topbar .mark img { width: 26px; height: 26px; border-radius: 7px; box-shadow: 0 2px 8px rgba(0,0,0,0.5); display: block; }
.topbar .mark .wordmark { font-weight: 600; font-size: 1.02rem; color: var(--text); margin-left: 9px; letter-spacing: -0.01em; }
.topbar a.link { color: var(--text-soft); padding: 7px 11px; border-radius: 7px; font-size: 0.92rem; }
.topbar a.link:hover { color: var(--text); text-decoration: none; }
.topbar a.link.active { color: var(--accent-bright); background: var(--accent-soft); }
.topbar a.dl { background: #ffffff; color: #0a1622; padding: 7px 16px; border-radius: 7px; font-weight: 600; font-size: 0.92rem; margin-left: 8px; }
.topbar a.dl:hover { background: var(--accent-bright); color: #06121f; text-decoration: none; }
.docs-badge { font-weight: 600; font-size: 0.78rem; color: var(--text-soft); background: var(--glass); border: 1px solid var(--glass-border); padding: 1px 8px; border-radius: 3px; margin-left: 8px; }
.container.docs-wide { max-width: none; }
.topbar.docs .inner { max-width: none; }
@media (max-width: 720px) {
  .topbar .inner { gap: 0; padding: 9px 14px; }
  .topbar a.link { padding: 6px 8px; font-size: 0.85rem; }
  .topbar a.dl { padding: 6px 12px; }
}
/* section anchors clear the sticky bar when scrolled to */
section[id], [id].anchor { scroll-margin-top: 74px; }

/* ---------- Hero ---------- */
.hero { text-align: center; padding: 60px 0 56px; position: relative; }
.hero > .container, .hero > * { position: relative; z-index: 1; }
.hero .appicon { display: block; width: 116px; height: 116px; border-radius: 26px; box-shadow: 0 14px 40px rgba(0,0,0,0.55); margin: 0 auto 26px; }
.hero .ice { display: block; width: 360px; height: 200px; margin: 0 auto 20px; }
@media (max-width: 720px) { .hero .ice { width: 280px; height: 150px; } }
.hero h1 { font-size: clamp(2.9rem, 6.6vw, 4.5rem); line-height: 1.03; margin: 0 0 16px; letter-spacing: -0.038em; font-weight: 800; }
/* "battery-efficient" — carved from ice: one clean top-lit gradient clipped to the text.
   Nothing else — no stroke, no shadow, no glow, no glint. Just clean ice on dark. */
.hero h1 .grad {
  background-image: linear-gradient(180deg, #f2f9ff 0%, #dcecff 18%, #a8cdf6 38%, #5aa0ff 62%, #2f73c8 86%, #245fa6 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

.headline-wrap { position: relative; display: inline-block; }
.headline-wrap h1 { position: relative; z-index: 1; }
.hero .tag { font-size: 1.22rem; color: var(--text-soft); max-width: 540px; margin: 0 auto 8px; }
.hero .tag-oss { font-size: 0.95rem; color: var(--accent-bright); font-weight: 600; margin: 0 auto 30px; }
.cta { display: inline-flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.btn { display: inline-block; padding: 12px 24px; border-radius: 9px; font-weight: 600; font-size: 1rem; background: var(--accent-bright); color: #0b1320; border: 1px solid rgba(255,255,255,0.5); backdrop-filter: var(--glass-blur); transition: all .15s ease; }
.btn:hover { background: var(--accent-bright); color: #06121f; }
.btn.secondary { background: var(--glass); color: var(--text); border: 1px solid var(--glass-border); backdrop-filter: var(--glass-blur); }
.btn.secondary:hover { border-color: var(--accent); color: var(--text); }
.btn.disabled { background: var(--glass); color: var(--muted); border: 1px solid var(--glass-border); cursor: default; }
.btn.disabled:hover { background: var(--glass); color: var(--muted); }
.availability { margin-top: 16px; font-size: 0.86rem; color: var(--muted); display: inline-flex; flex-wrap: wrap; gap: 8px; justify-content: center; align-items: center; }
.availability .avail-item.ok { color: var(--accent-bright); font-weight: 600; }
.availability .avail-sep { opacity: 0.5; }
.availability a { color: inherit; text-decoration: underline; }
.availability a:hover { color: var(--text); }
#dl-detected a { color: var(--accent-bright); text-decoration: underline; }
/* Download CTA: flat frost gradient, square, no glow. */
.btn.block {
  color: #0a1622;
  border: 1px solid rgba(255,255,255,0.7);
  background: #ffffff;
  box-shadow: none;
}
.btn.block:hover { background: #eef4fb; }

/* ---------- Sections ---------- */
section.block { padding: 46px 0; border-top: 1px solid var(--border-soft); }
section.block:first-of-type { border-top: none; }
h2 { font-size: 1.9rem; letter-spacing: -0.02em; margin: 0 0 8px; }
h3 { font-size: 1.12rem; margin: 0 0 6px; color: var(--text); }
.lead { color: var(--text-soft); max-width: 740px; font-size: 1.05rem; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.16em; font-size: 0.76rem; color: var(--accent-bright); font-weight: 700; margin-bottom: 10px; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 22px; margin-top: 26px; }
.card { background: var(--glass); backdrop-filter: var(--glass-blur); border: 1px solid var(--glass-border); border-radius: var(--radius); padding: 28px 30px; box-shadow: var(--shadow); transition: border-color .15s ease; }
.card:hover { border-color: var(--border); }
.card .ico { font-size: 1.6rem; }
.card h3 { margin-top: 10px; }
.card p { color: var(--text-soft); margin: 8px 0 0; font-size: 0.97rem; }
.card code, .qa code, .lead code, .note code, pre code, td code { font-family: ui-monospace, "SF Mono", Menlo, monospace; }
code { color: var(--accent-bright); background: rgba(111,180,240,0.10); padding: 1px 6px; border-radius: 3px; font-size: 0.88em; }
/* code inside a heading shouldn't render as a chip — drop the box, keep monospace inline */
h1 code, h2 code, h3 code, .qa h3 code, .docs-content h1 code, .docs-content h2 code, .docs-content h3 code {
  background: none; color: inherit; padding: 0; border-radius: 0; font-size: 0.92em; font-weight: inherit;
}

/* ---------- Architecture diagram ---------- */
.diagram-wrap { background: var(--glass); backdrop-filter: var(--glass-blur); border: 1px solid var(--glass-border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; margin-top: 26px; overflow-x: auto; }
.diagram-wrap svg { width: 100%; height: auto; min-width: 740px; display: block; }
.arch-node { fill: #161c26; stroke: #2f6db5; stroke-width: 1.5; }
.arch-node.endpoint { fill: #16263a; stroke: var(--accent); stroke-width: 2; }
.arch-label { fill: var(--text); font-size: 15px; font-weight: 600; font-family: inherit; }
.arch-sub { fill: var(--muted); font-size: 12px; font-family: ui-monospace, Menlo, monospace; }
.arch-line { stroke: #3a73b0; stroke-width: 1.8; fill: none; }
.layer-label { fill: var(--accent-bright); font-size: 12px; font-weight: 700; letter-spacing: 0.16em; font-family: inherit; opacity: 0.8; }
.band { fill: rgba(255,255,255,0.018); }

/* ---------- Comparison table ---------- */
.compare { width: 100%; border-collapse: collapse; margin-top: 24px; background: var(--glass); backdrop-filter: var(--glass-blur); border: 1px solid var(--glass-border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.compare th, .compare td { padding: 13px 16px; text-align: center; border-bottom: 1px solid var(--border-soft); font-size: 0.95rem; }
.compare thead th { background: var(--bg-elev2); color: var(--text); font-weight: 700; }
.compare thead th:first-child, .compare td.feat { text-align: left; }
.compare th.us { color: var(--accent-bright); }
.compare td.feat { font-weight: 600; color: var(--text); }
.compare td.col-us { background: rgba(196,212,230,0.08); }
.compare .yes { color: var(--green); font-weight: 800; }
.compare .no { color: var(--muted); font-weight: 500; }
.compare .mid { color: var(--accent-bright); font-weight: 800; }
.compare tr:last-child td { border-bottom: none; }
.note { color: var(--muted); font-size: 0.9rem; margin-top: 12px; }

/* ---------- FAQ / docs ---------- */
.qa { border-bottom: 1px solid var(--border-soft); padding: 20px 0; }
.qa:last-child { border-bottom: none; }
.qa p { color: var(--text-soft); margin: 6px 0 0; }
.kbd { font-family: ui-monospace, Menlo, monospace; background: var(--bg-elev2); border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 3px; padding: 1px 7px; font-size: 0.85em; color: var(--text); }
pre { background: #0c1017; border: 1px solid var(--border); color: #cfe1f2; padding: 16px 18px; border-radius: 8px; overflow-x: auto; font-size: 0.9rem; }
pre code { color: #cfe1f2; background: none; padding: 0; }
ul.tight { color: var(--text-soft); } ul.tight li { margin: 5px 0; }

.changelog { list-style: none; padding: 0; }
.changelog li { background: var(--glass); backdrop-filter: var(--glass-blur); border: 1px solid var(--glass-border); border-left: 3px solid var(--accent); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 14px; box-shadow: var(--shadow); }
.changelog .date { color: var(--accent-bright); font-weight: 700; font-size: 0.78rem; letter-spacing: 0.08em; }

/* ---------- Docs section (sidebar + content) ---------- */
.docs-layout { display: grid; grid-template-columns: 232px minmax(0,1fr); gap: 44px; align-items: start; padding: 30px 0 10px; }
/* right-hand "On this page" TOC — highlights the section in view (IntersectionObserver, no polling) */
.docs-toc { position: sticky; top: 84px; align-self: start; font-size: 0.86rem; max-height: calc(100vh - 110px); overflow: auto; }
.docs-toc .toc-title { text-transform: uppercase; letter-spacing: 0.11em; font-size: 0.68rem; color: var(--muted); font-weight: 700; margin-bottom: 10px; }
.docs-toc a { display: block; color: var(--text-soft); padding: 4px 0 4px 12px; border-left: 2px solid transparent; line-height: 1.35; }
.docs-toc a.sub { padding-left: 24px; font-size: 0.82rem; }
.docs-toc a:hover { color: var(--text); text-decoration: none; }
.docs-toc a.active { color: var(--accent-bright); border-left-color: var(--accent); }
@media (max-width: 1100px) { .docs-layout { grid-template-columns: 232px minmax(0,1fr); } .docs-toc { display: none; } }
.docs-sidebar { position: sticky; top: 84px; font-size: 0.92rem; }
.docs-sidebar .group { margin-bottom: 20px; }
.docs-sidebar .group-title { text-transform: uppercase; letter-spacing: 0.11em; font-size: 0.7rem; color: var(--muted); font-weight: 700; margin: 0 0 8px 10px; }
.docs-sidebar a { display: block; color: var(--text-soft); padding: 6px 10px; border-radius: 6px; }
.docs-sidebar a:hover { color: var(--text); text-decoration: none; }
.docs-sidebar a.active { background: var(--accent-soft); color: var(--accent-bright); font-weight: 600; }
.docs-sidebar a.sub { padding-left: 22px; font-size: 0.89rem; }
.docs-content { min-width: 0; padding-bottom: 20px; }
.breadcrumb { color: var(--muted); font-size: 0.84rem; margin-bottom: 14px; }
.breadcrumb a { color: var(--muted); text-decoration: none; transition: color .15s ease; }
.breadcrumb a:hover { color: var(--text-soft); text-decoration: underline; }
.breadcrumb .current { color: var(--text-soft); text-decoration: underline; }
.docs-content h1 { font-size: 2.1rem; letter-spacing: -0.02em; margin: 0 0 14px; }
.docs-content h2 { font-size: 1.4rem; margin: 32px 0 10px; }
.docs-content h3 { font-size: 1.08rem; margin: 22px 0 6px; }
.docs-content p, .docs-content li { color: var(--text-soft); }
.docs-content ul { padding-left: 20px; }
.docs-content ul li { margin: 6px 0; }
.callout { background: rgba(196,212,230,0.08); backdrop-filter: var(--glass-blur); border: 1px solid rgba(196,212,230,0.28); border-radius: 9px; padding: 18px 20px; margin: 18px 0; color: var(--text-soft); }
.callout.tip { background: rgba(63,185,80,0.08); border-color: rgba(63,185,80,0.28); }
.callout strong { color: var(--text); }
.edit-github { text-align: center; margin-top: 44px; padding-top: 24px; border-top: 1px solid var(--border-soft); }
.edit-github a { color: var(--text-soft); font-size: 0.92rem; }
.docs-nextprev { display: flex; justify-content: space-between; gap: 14px; margin-top: 26px; }
.docs-nextprev a { flex: 1; background: var(--glass); backdrop-filter: var(--glass-blur); border: 1px solid var(--glass-border); border-radius: 9px; padding: 12px 16px; color: var(--text); font-size: 0.92rem; }
.docs-nextprev a:hover { border-color: var(--accent); text-decoration: none; }
.docs-nextprev .nextprev-label { display: block; color: var(--muted); font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 2px; }
.docs-nextprev a.next { text-align: right; }
@media (max-width: 820px) {
  .docs-layout { grid-template-columns: 1fr; gap: 18px; }
  .docs-sidebar { position: static; border-bottom: 1px solid var(--border-soft); padding-bottom: 14px; }
}

/* ---------- Feature rows (benefit-led) ---------- */
.feature-row { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 44px; padding: 46px 0; border-top: 1px solid var(--border-soft); align-items: start; }
.feature-row .lhs { position: sticky; top: 90px; }
.feature-row .lhs .eyebrow { margin-bottom: 12px; }
.feature-row .lhs h2 { font-size: 1.7rem; line-height: 1.15; }
.feature-row .lhs p { color: var(--text-soft); margin: 10px 0 0; }
.feature-list { display: flex; flex-direction: column; gap: 16px; }
.feature-list .item { background: var(--glass); backdrop-filter: var(--glass-blur); border: 1px solid var(--glass-border); border-radius: 9px; padding: 22px 24px; transition: border-color .15s ease; }
.feature-list .item:hover { border-color: var(--border); }
.feature-list .item h3 { font-size: 1.05rem; margin: 0 0 4px; }
.feature-list .item p { color: var(--text-soft); margin: 0; font-size: 0.95rem; }
.feature-list .item .tech { display: block; margin-top: 8px; color: var(--muted); font-size: 0.85rem; }
@media (max-width: 820px) {
  .feature-row { grid-template-columns: 1fr; gap: 20px; padding: 34px 0; }
  .feature-row .lhs { position: static; }
}

/* ---------- Release notes (News) ---------- */
.releases { max-width: 780px; margin-top: 28px; }
.release { background: var(--glass); backdrop-filter: var(--glass-blur); border: 1px solid var(--glass-border); border-radius: var(--radius); padding: 22px 26px; margin-bottom: 18px; box-shadow: var(--shadow); }
.release-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.pill { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.06em; padding: 3px 11px; border-radius: 4px; background: var(--accent-soft); color: var(--accent-bright); border: 1px solid rgba(74,144,226,0.32); text-transform: uppercase; }
.pill.now { background: rgba(63,185,80,0.12); color: var(--green); border-color: rgba(63,185,80,0.32); }
.release-date { color: var(--muted); font-size: 0.85rem; margin-left: auto; }
.release h3 { font-size: 1.22rem; margin: 0 0 4px; }
.release ul { margin: 12px 0 0; padding-left: 20px; color: var(--text-soft); }
.release ul li { margin: 6px 0; }

/* ---------- Article / post ---------- */
.article { max-width: 720px; margin: 0 auto; padding: 14px 0 24px; }
.article .eyebrow { margin-bottom: 12px; }
.article h1 { font-size: clamp(2rem, 4vw, 2.7rem); letter-spacing: -0.025em; line-height: 1.12; margin: 0 0 12px; }
.article .meta { color: var(--muted); font-size: 0.9rem; margin-bottom: 30px; }
.article p { color: var(--text-soft); font-size: 1.08rem; line-height: 1.8; margin: 0 0 18px; }
.article p strong, .article li strong { color: var(--text); }
.article h2 { font-size: 1.5rem; margin: 36px 0 10px; }
.article ul { color: var(--text-soft); padding-left: 20px; } .article ul li { margin: 7px 0; }
.article .pullquote { border-left: 3px solid var(--accent); padding: 8px 0 8px 20px; margin: 28px 0; color: var(--text); font-size: 1.25rem; font-weight: 600; line-height: 1.4; }
.article .endcta { margin-top: 38px; padding-top: 26px; border-top: 1px solid var(--border-soft); }

/* ---------- Footer (iTerm2-style) ---------- */
footer.site { margin-top: 64px; border-top: 1px solid var(--border-soft); background: #07090d; }
footer.site .inner { max-width: var(--maxw); margin: 0 auto; padding: 34px 24px 54px; color: var(--text-soft); font-size: 0.92rem; }
footer.site p { margin: 4px 0; }
footer.site .sponsors { margin-top: 18px; font-weight: 700; color: var(--text); }
footer.site .lic { color: var(--muted); }
