/* Matches phuembeli.com: monospace, warm off-white, quiet rules, lowercase section headings.
   Status colours (System 1 green, unsure amber, System 2 blue) are the only accents. */
:root {
  --bg: #faf8f5; --surface: #fffefc; --sunk: #f0ece6; --fg: #222; --muted: #777; --rule: #ddd;
  --s1: #3d8b5a; --unsure: #b5791a; --s2: #3f6fa8; --bad: #b0433a; --paper: #fffefa; --ink: #222;
  --mono: 'Lucida Console', 'Monaco', 'Courier New', monospace;
  --display: var(--mono); --body: var(--mono);
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--fg); font: 16px/1.7 var(--mono); }
.wrap { max-width: 1040px; margin: 0 auto; padding-block: 0 60px;
  padding-left: max(40px, env(safe-area-inset-left, 0px)); padding-right: max(40px, env(safe-area-inset-right, 0px)); }
@media (max-width: 600px) { body { font-size: 14px; } .wrap { padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); } }

nav.top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 16px; padding: 20px 0; font-size: 0.85em; border-bottom: 1px solid var(--rule); margin-bottom: 40px; }
nav.top a { color: var(--fg); text-decoration: none; margin: 0 8px; }
nav.top a:hover { color: #888; }
nav.top a[aria-current="page"] { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: #bbb; }
nav.top .brand { margin-right: auto; margin-left: 0; }
@media (max-width: 600px) { nav.top { flex-direction: column; align-items: flex-start; } nav.top a { margin: 0 8px 0 0; } }

h1, h2, h3 { font-family: var(--mono); font-weight: 400; margin: 0; text-wrap: balance; }
h1 { font-size: 2.1em; letter-spacing: -0.02em; line-height: 1.2; max-width: 26ch; }
h2 { font-size: 1.2em; text-transform: lowercase; }
h3 { font-size: 1em; font-weight: 700; }
@media (max-width: 600px) { h1 { font-size: 1.6em; } }
p { margin: 0; max-width: 72ch; }
.lede { color: #555; }
.eyebrow { font-size: 0.8em; color: #999; font-style: italic; }
.stack { display: grid; gap: 14px; }
.note { font-size: 0.85em; color: var(--muted); }
.pill { display: inline-block; font-size: 0.78em; padding: 1px 8px; border: 1px solid currentColor; border-radius: 3px; }
.pill.s1 { color: var(--s1); } .pill.s2 { color: var(--s2); } .pill.unsure { color: var(--unsure); } .pill.bad { color: var(--bad); }
.teach { background: var(--sunk); border-left: 3px solid #999; border-radius: 4px; padding: 0.8em 1.2em; font-size: 0.88em; }
.teach b { font-weight: 700; }
hr { border: none; height: 1px; background: var(--rule); margin: 40px 0; }

button { font: 0.88em var(--mono); padding: 8px 14px; border: 1px solid var(--fg); background: var(--fg); color: var(--bg); cursor: pointer; border-radius: 3px; }
button.ghost { background: transparent; color: var(--fg); }
button.s1 { background: var(--fg); border-color: var(--fg); color: var(--bg); }
button.s2 { background: var(--s2); border-color: var(--s2); color: #fff; }
button:hover { opacity: 0.85; }
button:disabled { opacity: 0.4; cursor: default; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--s2); outline-offset: 2px; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.tabs { display: flex; gap: 0; border-bottom: 1px solid var(--rule); }
.tabs button { background: transparent; color: var(--muted); border: 0; border-bottom: 2px solid transparent; border-radius: 0; padding: 8px 12px; }
.tabs button[aria-selected="true"] { color: var(--fg); border-bottom-color: var(--fg); }

table { border-collapse: collapse; width: 100%; font-size: 0.88em; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: 0.4em 1.2em 0.4em 0; border-bottom: 1px solid var(--rule); }
th { font-weight: 400; color: var(--muted); font-style: italic; }
td.num { white-space: nowrap; }
.tbl { overflow-x: auto; }
video { width: 100%; max-width: 100%; display: block; background: #000; border-radius: 4px; }
a { color: var(--fg); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: #bbb; }
a:hover { color: #888; }
footer.site { margin-top: 40px; padding: 20px 0 0; border-top: 1px solid var(--rule); color: #999; font-size: 0.82em; }
pre, code { font-family: var(--mono); }
[hidden] { display: none !important; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* Top bar: Vision · Demos (dropdown) · Roadmap */
nav.top .menu { position: relative; margin: 0 8px; }
nav.top .menu > button { font: inherit; background: none; border: 0; padding: 0; color: var(--fg); cursor: pointer; border-radius: 0; }
nav.top .menu > button::after { content: " ▾"; font-size: 0.8em; color: var(--muted); }
nav.top .menu > button[aria-current="page"] { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: #bbb; }
nav.top .menu ul { list-style: none; margin: 0; padding: 6px 0; position: absolute; right: -8px; top: calc(100% + 8px); min-width: 15em; background: var(--surface); border: 1px solid var(--rule); border-radius: 4px; box-shadow: 0 6px 18px rgba(0,0,0,.06); z-index: 20; display: none; }
nav.top .menu ul::before { content: ""; position: absolute; left: 0; right: 0; top: -10px; height: 10px; }
nav.top .menu:hover ul, nav.top .menu:focus-within ul, nav.top .menu.open ul { display: block; }
nav.top .menu li a { display: block; margin: 0; padding: 5px 14px; white-space: nowrap; }
nav.top .menu li a:hover { background: var(--sunk); color: var(--fg); }
nav.top .menu li.sep { border-top: 1px solid var(--rule); margin: 4px 0; }
@media (max-width: 600px) { nav.top .menu { margin: 0 8px 0 0; } nav.top .menu ul { left: 0; right: auto; } }

/* one-line result at the top of each demo page */
.result { border-left: 3px solid var(--s1); padding: 2px 0 2px 12px; max-width: 72ch; }
.result b { font-weight: 700; }

/* Faint pastel tints for boxes */
:root { --t-mint: #eef6f0; --t-sky: #edf3f9; --t-lav: #f2effa; --t-peach: #fbf1e8; }
.t-mint { background: var(--t-mint) !important; } .t-sky { background: var(--t-sky) !important; }
.t-lav { background: var(--t-lav) !important; } .t-peach { background: var(--t-peach) !important; }
.proof > a:nth-child(4n+1), .three > .box:nth-child(4n+1), .team > .box:nth-child(4n+1), .qs > .box:nth-child(4n+1), .grid4 > .box:nth-child(4n+1) { background: var(--t-mint); }
.proof > a:nth-child(4n+2), .three > .box:nth-child(4n+2), .team > .box:nth-child(4n+2), .qs > .box:nth-child(4n+2), .grid4 > .box:nth-child(4n+2) { background: var(--t-sky); }
.proof > a:nth-child(4n+3), .three > .box:nth-child(4n+3), .team > .box:nth-child(4n+3), .grid4 > .box:nth-child(4n+3) { background: var(--t-lav); }
.proof > a:nth-child(4n+4), .grid4 > .box:nth-child(4n+4) { background: var(--t-peach); }
.box.s1 { background: var(--t-mint); } .box.s2 { background: var(--t-sky); }
.box.gap { background: var(--t-peach); }
.qs > .box:nth-child(2) { background: var(--t-lav); }
.calc { background: var(--t-sky); }
.faq { background: var(--t-peach) !important; }
a.card { background: var(--surface); }
.demos > a.card:nth-child(4n+1) .body { background: var(--t-mint); } .demos > a.card:nth-child(4n+2) .body { background: var(--t-sky); }
.demos > a.card:nth-child(4n+3) .body { background: var(--t-lav); } .demos > a.card:nth-child(4n+4) .body { background: var(--t-peach); }
