/* pocketBrain website. Built on the design system's tokens (tokens.css, copied from
   pocketbrain-design/): system font, near-monochrome, one blue accent for links and focus only,
   no shadows, no gradients, sentence case, status as a dot and a word. */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 var(--t-16)/var(--l-16) var(--font); }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }
img { max-width: 100%; }
h1, h2, h3 { font-weight: 600; margin: 0; text-wrap: balance; }
p { margin: 0; }
code, pre, .mono { font-family: var(--mono); font-size: 0.875em; }
code { background: var(--well); padding: 1px 4px; border-radius: var(--r-4); }
@media (prefers-reduced-motion: no-preference) { a, button, .btn { transition: background-color 120ms, border-color 120ms, color 120ms; } }

.wrap { max-width: 1200px; margin: 0 auto; padding-inline: var(--s-24); }
@media (max-width: 600px) { .wrap { padding-inline: var(--s-16); } }
.narrow { max-width: 720px; }

/* header and footer */
.site-head { border-bottom: 1px solid var(--line); background: var(--bg); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: var(--s-16); min-height: 56px; flex-wrap: wrap; padding-block: var(--s-8); }
.logo { display: inline-flex; align-items: center; }
.logo img { height: 26px; width: auto; display: block; }
.logo .dark { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .logo .light { display: none; } :root:not([data-theme="light"]) .logo .dark { display: block; } }
.nav { display: flex; gap: var(--s-4); flex-wrap: wrap; font-size: var(--t-13); line-height: var(--l-13); }
.nav a { color: var(--text); text-decoration: none; padding: 6px 10px; border-radius: var(--r-4); }
.nav a:hover, .nav a[aria-current="page"] { background: var(--hover); }
.site-foot { border-top: 1px solid var(--line); margin-top: var(--s-64); padding-block: var(--s-32); font-size: var(--t-13); line-height: var(--l-13); color: var(--text-2); }
.site-foot .wrap { display: flex; flex-wrap: wrap; gap: var(--s-16) var(--s-32); justify-content: space-between; }
.site-foot nav { display: flex; gap: var(--s-16); flex-wrap: wrap; }
.site-foot a { color: var(--text-2); }

/* type helpers */
.hero { padding-block: var(--s-64) var(--s-48); display: grid; gap: var(--s-24); }
.hero h1 { font-size: var(--t-48); line-height: var(--l-48); max-width: 18ch; letter-spacing: -0.01em; }
@media (max-width: 600px) { .hero h1 { font-size: var(--t-32); line-height: var(--l-32); } }
.lede { font-size: 18px; line-height: 28px; color: var(--text-2); max-width: 62ch; }
.kicker { font-size: var(--t-13); line-height: var(--l-13); color: var(--muted); font-weight: 500; }
.section { padding-block: var(--s-48); border-top: 1px solid var(--line); display: grid; gap: var(--s-24); }
.section > h2 { font-size: var(--t-32); line-height: var(--l-32); max-width: 24ch; }
.section > p, .prose p { max-width: 64ch; color: var(--text-2); }
.page-title { font-size: var(--t-24); line-height: var(--l-24); }
.prose { display: grid; gap: var(--s-16); }
.prose h2 { font-size: var(--t-24); line-height: var(--l-24); margin-top: var(--s-32); }
.prose h3 { font-size: var(--t-16); line-height: var(--l-16); margin-top: var(--s-16); }
.prose ul, .prose ol { margin: 0; padding-left: 1.25em; color: var(--text-2); display: grid; gap: var(--s-8); max-width: 64ch; }
.prose li strong, .prose p strong { color: var(--text); font-weight: 600; }

/* buttons */
.btns { display: flex; gap: var(--s-8); flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; height: 40px; padding: 0 var(--s-16); border-radius: var(--r-4); font: 500 var(--t-14)/1 var(--font); text-decoration: none; border: 1px solid var(--line-strong); background: var(--bg); color: var(--text); cursor: pointer; }
.btn:hover { border-color: var(--text-2); }
.btn.primary { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.btn.primary:hover { opacity: 0.88; }
.btn.danger { color: var(--bad); }
.btn.danger:hover { border-color: var(--bad); }
.btn.small { height: var(--row); font-size: var(--t-13); padding: 0 12px; }

/* cards, tags, status */
.card { border: 1px solid var(--line); border-radius: var(--r-6); padding: var(--s-16); background: var(--bg); min-width: 0; }
.card.well { background: var(--well); }
.tag { display: inline-block; font-size: var(--t-12); line-height: var(--l-12); font-weight: 500; padding: 2px 6px; border-radius: var(--r-4); background: var(--well); color: var(--text-2); white-space: nowrap; }
.tag.bad { background: var(--bad-soft); color: var(--bad); }
.tag.warn { background: var(--warn-soft); color: var(--warn); }
.tag.good { background: var(--good-soft); color: var(--good); }
.status { display: inline-flex; align-items: center; gap: 6px; font-size: var(--t-13); }
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--good); }
.status.off::before { background: var(--bad); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-24); }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-16); }
@media (max-width: 860px) { .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) { .grid-2 { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 560px) { .grid-3 { grid-template-columns: minmax(0, 1fr); } }

/* the walls demo */
.tabs { display: flex; gap: var(--s-4); flex-wrap: wrap; }
.tab { font: 500 var(--t-13)/var(--l-13) var(--font); border: 0; background: transparent; color: var(--text); padding: 6px 10px; border-radius: var(--r-4); cursor: pointer; text-align: left; }
.tab span { display: block; font-weight: 400; color: var(--muted); font-size: var(--t-12); }
.tab:hover { background: var(--hover); }
.tab[aria-pressed="true"] { background: var(--hover); box-shadow: inset 0 0 0 1px var(--line-strong); }
.note { display: grid; gap: var(--s-8); align-content: start; }
.note h3 { font-size: var(--t-14); line-height: var(--l-14); }
.note .meta { font-size: var(--t-12); line-height: var(--l-12); color: var(--muted); }
.note .body { font-size: var(--t-14); line-height: var(--l-14); color: var(--text-2); }
.note.hidden { background: var(--well); border-style: dashed; }
.note.hidden .bars { display: grid; gap: 6px; }
.note.hidden .bars i { display: block; height: 10px; background: var(--text); border-radius: 2px; opacity: 0.85; }
.note .said { font-size: var(--t-12); line-height: var(--l-12); color: var(--bad); }
.summary { font-size: var(--t-13); line-height: var(--l-13); color: var(--text-2); min-height: var(--l-13); }

/* chat and dashboard illustrations */
.chat { display: grid; gap: var(--s-8); }
.bubble { max-width: 88%; padding: 8px 12px; border-radius: var(--r-6); font-size: var(--t-14); line-height: var(--l-14); }
.bubble.you { justify-self: end; background: var(--ink); color: var(--on-ink); }
.bubble.ai { justify-self: start; background: var(--well); }
.bubble small { display: block; margin-top: 4px; font-size: var(--t-12); line-height: var(--l-12); color: var(--muted); }
.panel-head { display: flex; justify-content: space-between; gap: var(--s-8); flex-wrap: wrap; font-size: var(--t-12); line-height: var(--l-12); color: var(--muted); padding-bottom: var(--s-8); border-bottom: 1px solid var(--line); margin-bottom: var(--s-8); }
.rows { display: grid; }
.rows .r { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding-block: 8px; border-top: 1px solid var(--line); font-size: var(--t-13); line-height: var(--l-13); }
.rows .r:first-child { border-top: 0; }
.caption { font-size: var(--t-12); line-height: var(--l-12); color: var(--muted); }

/* lists of works / not yet */
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s-8); font-size: var(--t-14); line-height: var(--l-14); color: var(--text-2); }
.checklist li { display: grid; grid-template-columns: 16px minmax(0, 1fr); gap: var(--s-8); }
.checklist li::before { font-family: var(--mono); font-weight: 600; }
.checklist.yes li::before { content: "+"; color: var(--good); }
.checklist.no li::before { content: "–"; color: var(--bad); }

/* code blocks */
.code { position: relative; background: var(--well); border: 1px solid var(--line); border-radius: var(--r-6); }
.code pre { margin: 0; padding: var(--s-16); padding-right: 88px; overflow-x: auto; font-size: var(--t-13); line-height: var(--l-13); }
.code button { position: absolute; top: var(--s-8); right: var(--s-8); }

/* forms */
form { display: grid; gap: var(--s-16); max-width: 640px; }
label { display: grid; gap: var(--s-4); font-size: var(--t-14); font-weight: 500; }
label .hint { font-weight: 400; color: var(--muted); font-size: var(--t-13); }
input[type=text], input[type=email], textarea, select { font: 400 var(--t-14)/var(--l-14) var(--font); color: var(--text); background: var(--bg); border: 1px solid var(--line-strong); border-radius: var(--r-4); padding: 6px 10px; min-height: var(--row); width: 100%; }
textarea { min-height: 96px; resize: vertical; }
fieldset { border: 1px solid var(--line); border-radius: var(--r-6); padding: var(--s-16); margin: 0; display: grid; gap: var(--s-8); }
legend { font-size: var(--t-14); font-weight: 500; padding: 0 var(--s-4); }
.check { display: flex; gap: var(--s-8); align-items: flex-start; font-weight: 400; }
.check input { margin-top: 3px; }
.flash { border: 1px solid var(--line); border-radius: var(--r-6); padding: 10px 12px; font-size: var(--t-14); }
.flash.bad { border-color: var(--bad); color: var(--bad); }
.draft { border: 1px solid var(--warn); background: var(--warn-soft); color: var(--warn); border-radius: var(--r-6); padding: 10px 12px; font-size: var(--t-14); }

/* tables */
.table { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-6); }
table { border-collapse: collapse; width: 100%; font-size: var(--t-13); line-height: var(--l-13); }
th { background: var(--well); font-size: var(--t-12); font-weight: 500; color: var(--text-2); text-align: left; padding: 8px 12px; }
td { padding: 8px 12px; border-top: 1px solid var(--line); vertical-align: top; }
td.num { text-align: right; font-variant-numeric: tabular-nums; }
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; min-height: 0 !important; padding: 0 !important; border: 0 !important; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.prose > *, .hero > *, .section > *, .grid-2 > *, form > * { min-width: 0; }
.prose { align-content: start; }
