:root {
  --bg: #f6f6f3; --panel: #ffffff; --raised: #fbfbf9; --ink: #1b1c1a; --muted: #686963; --faint: #8f908a; --line: #e5e4df; --line-strong: #d3d2cc;
  --accent: #3b5bdb; --accent-ink: #ffffff; --ok: #177245; --warn: #9a5b00; --bad: #b3261e;
  --ok-bg: #e7f4ec; --warn-bg: #fbf0dc; --bad-bg: #fbe9e7; --side: #f0efeb;
  --radius: 12px; --radius-sm: 8px; --shadow: 0 1px 2px rgba(20,20,15,.05), 0 6px 20px rgba(20,20,15,.05); --shadow-lg: 0 12px 48px rgba(20,20,15,.18);
  --accent-soft: color-mix(in srgb, var(--accent) 11%, var(--panel)); --accent-line: color-mix(in srgb, var(--accent) 35%, var(--line));
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #131412; --panel: #1c1d1b; --raised: #212220; --ink: #ecebe6; --muted: #a5a49d; --faint: #7c7b75; --line: #2e2f2b; --line-strong: #3d3e39;
  --accent: #8ea2f7; --accent-ink: #0c0f1c; --ok: #62c592; --warn: #e2ab55; --bad: #f28b82; --ok-bg: #16281e; --warn-bg: #2c2414; --bad-bg: #2f1a18; --side: #181917;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 6px 20px rgba(0,0,0,.25); color-scheme: dark; } }
:root[data-theme="dark"] {
  --bg: #131412; --panel: #1c1d1b; --raised: #212220; --ink: #ecebe6; --muted: #a5a49d; --faint: #7c7b75; --line: #2e2f2b; --line-strong: #3d3e39;
  --accent: #8ea2f7; --accent-ink: #0c0f1c; --ok: #62c592; --warn: #e2ab55; --bad: #f28b82; --ok-bg: #16281e; --warn-bg: #2c2414; --bad-bg: #2f1a18; --side: #181917;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 6px 20px rgba(0,0,0,.25); color-scheme: dark; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 14.5px/1.55 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-underline-offset: 2px; }
.skip { position: absolute; left: -999px; } .skip:focus { left: 8px; top: 8px; background: var(--panel); padding: 6px 10px; z-index: 99; }
svg.ic { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* shell */
.shell { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100%; }
.shell.bare { grid-template-columns: minmax(0, 1fr); } .shell.bare .side, .shell.bare .topbar { display: none; }
.side { background: var(--side); border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 14px 10px; position: sticky; top: 0; height: 100vh; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 650; font-size: 15.5px; letter-spacing: -.01em; color: var(--ink); text-decoration: none; padding: 6px 8px 14px; }
.mark { width: 28px; height: 28px; border-radius: 8px; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-weight: 700; font-size: 14px; }
nav { display: flex; flex-direction: column; gap: 2px; flex: 1; overflow: auto; }
nav .group { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); padding: 16px 10px 5px; }
nav a { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--muted); padding: 7px 10px; border-radius: var(--radius-sm); font-weight: 500; }
nav a:hover { color: var(--ink); background: color-mix(in srgb, var(--ink) 6%, transparent); }
nav a.on { color: var(--ink); background: var(--panel); box-shadow: 0 0 0 1px var(--line), 0 1px 2px rgba(0,0,0,.04); }
nav a.on svg { color: var(--accent); }
nav a .count { margin-left: auto; font-size: 11.5px; background: var(--accent-soft); color: var(--accent); border-radius: 999px; padding: 0 7px; font-weight: 600; }
.side-foot { display: flex; align-items: center; gap: 6px; border-top: 1px solid var(--line); padding: 10px 4px 0; }
.me { display: flex; align-items: center; gap: 9px; min-width: 0; flex: 1; } .me-text { min-width: 0; line-height: 1.25; }
.me-text > div { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } #me-name { font-weight: 600; font-size: 13.5px; }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-weight: 650; font-size: 12px; flex: none; }
.topbar { display: none; align-items: center; gap: 10px; padding: 8px 12px; background: var(--panel); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 6; }
.brand-sm { font-weight: 650; }
main { max-width: 1080px; margin: 0 auto; padding: 30px 28px 90px; outline: none; }
.scrim { position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 7; }
@media (max-width: 860px) {
  .shell { grid-template-columns: minmax(0, 1fr); } .topbar { display: flex; } main { padding: 20px 16px 90px; }
  .side { position: fixed; z-index: 8; width: 250px; transform: translateX(-100%); transition: transform .18s ease; box-shadow: var(--shadow-lg); } .side.open { transform: none; }
}

/* type */
h1 { font-size: 24px; margin: 0 0 4px; letter-spacing: -.02em; font-weight: 650; line-height: 1.2; }
h2 { font-size: 15px; margin: 26px 0 10px; font-weight: 650; letter-spacing: -.005em; } h3 { font-size: 14px; margin: 0 0 4px; font-weight: 650; }
.sub { color: var(--muted); margin: 0 0 22px; max-width: 70ch; } .muted { color: var(--muted); } .small { font-size: 13px; } .tiny { font-size: 12px; }
.page-head { display: flex; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 4px; } .page-head > div:first-child { flex: 1; min-width: 240px; }
.eyebrow { font-size: 11.5px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--accent); margin-bottom: 6px; }
code, pre { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; }
code { background: color-mix(in srgb, var(--ink) 7%, transparent); padding: 1px 5px; border-radius: 5px; word-break: break-all; }

/* surfaces */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); margin-bottom: 14px; }
.card.flat { box-shadow: none; } .card.pad0 { padding: 0; overflow: hidden; } .card > h2:first-child, .card > h3:first-child { margin-top: 0; }
.card-head { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); } .card-head h2 { margin: 0; flex: 1; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; } .grow { flex: 1; min-width: 180px; } .right { margin-left: auto; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; } .grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; } .grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
@media (max-width: 900px) { .grid3, .grid4 { grid-template-columns: 1fr 1fr; } } @media (max-width: 640px) { .grid2, .grid3 { grid-template-columns: 1fr; } }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; text-decoration: none; color: var(--ink); display: block; }
a.stat:hover, .tile:hover { border-color: var(--accent-line); } .stat b { display: block; font-size: 24px; font-weight: 650; letter-spacing: -.02em; line-height: 1.2; } .stat span { color: var(--muted); font-size: 13px; }
.banner { display: flex; gap: 12px; align-items: flex-start; border: 1px solid var(--line); background: var(--raised); border-radius: var(--radius); padding: 12px 14px; margin-bottom: 14px; }
.banner.warn { background: var(--warn-bg); border-color: color-mix(in srgb, var(--warn) 30%, var(--line)); } .banner.ok { background: var(--ok-bg); border-color: color-mix(in srgb, var(--ok) 30%, var(--line)); }
.banner.bad { background: var(--bad-bg); border-color: color-mix(in srgb, var(--bad) 30%, var(--line)); }

/* forms */
input, select, textarea { font: inherit; color: var(--ink); background: var(--panel); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); padding: 8px 11px; width: 100%; }
input[type=checkbox], input[type=radio] { width: auto; accent-color: var(--accent); } input[type=color] { padding: 2px; height: 36px; width: 56px; }
input::placeholder, textarea::placeholder { color: var(--faint); } textarea { min-height: 90px; resize: vertical; }
label { display: block; font-size: 13px; font-weight: 550; color: var(--ink); margin: 12px 0 5px; } label .hint, .hint { font-weight: 400; color: var(--muted); font-size: 12.5px; }
label.inline { display: inline-flex; gap: 7px; align-items: center; margin: 4px 14px 4px 0; font-weight: 400; font-size: 14px; }
label.choice { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; margin: 8px 0; font-weight: 400; cursor: pointer; }
label.choice:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); } label.choice input { margin-top: 3px; } label.choice b { display: block; font-weight: 600; }
button, .btn { font: inherit; font-weight: 550; border: 1px solid var(--line-strong); background: var(--panel); color: var(--ink); padding: 7px 13px; border-radius: var(--radius-sm); cursor: pointer; display: inline-flex; align-items: center; gap: 7px; text-decoration: none; white-space: nowrap; }
button:hover, .btn:hover { background: var(--raised); border-color: var(--faint); }
button.primary, .btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); } button.primary:hover, .btn.primary:hover { filter: brightness(1.07); background: var(--accent); }
button.danger { color: var(--bad); } button.ghost { border-color: transparent; background: none; } button.ghost:hover { background: color-mix(in srgb, var(--ink) 7%, transparent); }
button.link { border: 0; background: none; color: var(--accent); padding: 0; font-weight: 500; } button.link:hover { text-decoration: underline; background: none; } button.link.danger { color: var(--bad); }
button.icon-btn { padding: 6px; } button.sm { padding: 4px 9px; font-size: 13px; } button:disabled { opacity: .5; cursor: default; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); overflow: hidden; background: var(--panel); } .seg button { border: 0; border-radius: 0; padding: 5px 11px; font-size: 13px; color: var(--muted); }
.seg button.on { background: var(--accent-soft); color: var(--accent); }
.tabs { display: flex; gap: 2px; margin-bottom: 16px; flex-wrap: wrap; border-bottom: 1px solid var(--line); } .tabs button { border: 0; border-radius: 0; background: none; color: var(--muted); padding: 8px 12px; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs button:hover { color: var(--ink); background: none; } .tabs button.on { color: var(--ink); border-bottom-color: var(--accent); }

/* tables, chips */
table { width: 100%; border-collapse: collapse; } th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; } th { font-size: 11.5px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; background: var(--raised); white-space: nowrap; }
tr.click { cursor: pointer; } tr.click:hover td { background: var(--raised); } .scroll-x { overflow-x: auto; }
.chip { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 550; padding: 2px 9px; border-radius: 999px; background: color-mix(in srgb, var(--ink) 7%, transparent); color: var(--muted); margin: 2px 4px 2px 0; white-space: nowrap; }
.chip.ok { color: var(--ok); background: var(--ok-bg); } .chip.warn { color: var(--warn); background: var(--warn-bg); } .chip.bad { color: var(--bad); background: var(--bad-bg); } .chip.accent { color: var(--accent); background: var(--accent-soft); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); display: inline-block; flex: none; } .dot.ok { background: var(--ok); } .dot.bad { background: var(--bad); } .dot.warn { background: var(--warn); }
.empty { text-align: center; color: var(--muted); padding: 38px 16px; } .empty b { display: block; color: var(--ink); font-size: 15px; margin-bottom: 4px; } .empty .row { justify-content: center; margin-top: 14px; }
.list > * { display: flex; gap: 12px; align-items: flex-start; padding: 11px 18px; border-bottom: 1px solid var(--line); } .list > *:last-child { border-bottom: 0; } .list .grow { min-width: 0; }
a.item-row { color: inherit; text-decoration: none; cursor: pointer; } a.item-row:hover, .list > .click:hover { background: var(--raised); }
.clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* tiles (connections, templates) */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 12px; }
.tile { text-align: left; display: flex; gap: 12px; align-items: flex-start; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; cursor: pointer; white-space: normal; font-weight: 400; width: 100%; }
.tile b { display: block; font-weight: 600; } .tile .small { color: var(--muted); line-height: 1.4; display: block; margin-top: 2px; }
.logo { width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 14px; flex: none; letter-spacing: -.02em; }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 12px 0; } .steps > li { counter-increment: s; position: relative; padding: 0 0 16px 38px; }
.steps > li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 24px; height: 24px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.steps > li:not(:last-child)::after { content: ""; position: absolute; left: 11.5px; top: 28px; bottom: 4px; width: 1px; background: var(--line); }
.steps.done-list > li.done::before { content: "✓"; background: var(--ok-bg); color: var(--ok); } .steps > li.done > .t { color: var(--muted); text-decoration: line-through; }
.codeblock { position: relative; background: #17181c; color: #e8e8e3; border-radius: var(--radius-sm); margin: 8px 0; } .codeblock pre { margin: 0; padding: 12px 44px 12px 14px; overflow-x: auto; white-space: pre; line-height: 1.5; }
.codeblock button { position: absolute; right: 6px; top: 6px; color: #c9c9c2; border-color: transparent; background: rgba(255,255,255,.08); padding: 4px 8px; font-size: 12px; } .codeblock button:hover { background: rgba(255,255,255,.16); border-color: transparent; }
.copyline { display: flex; gap: 8px; align-items: center; } .copyline input { font-family: ui-monospace, Menlo, monospace; font-size: 12.5px; background: var(--raised); }
.bigcode { font: 600 30px/1 ui-monospace, Menlo, monospace; letter-spacing: .08em; background: var(--raised); border: 1px dashed var(--line-strong); border-radius: var(--radius); padding: 16px; text-align: center; }

/* ask */
.ask-wrap { max-width: 780px; margin: 0 auto; }
.chat { display: flex; flex-direction: column; gap: 16px; padding-bottom: 8px; }
.msg { padding: 12px 15px; border-radius: 14px; max-width: 88%; } .msg.user { align-self: flex-end; background: var(--accent); color: var(--accent-ink); border-bottom-right-radius: 5px; white-space: pre-wrap; }
.msg.assistant { align-self: stretch; max-width: 100%; background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow); }
.md p { margin: 0 0 9px; } .md p:last-child { margin-bottom: 0; } .md h4 { margin: 14px 0 4px; font-size: 14.5px; } .md ul, .md ol { margin: 4px 0 9px; padding-left: 22px; } .md li { margin: 2px 0; }
.cites { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 6px; } .cites button { font-size: 12.5px; padding: 4px 10px; border-radius: 999px; background: var(--raised); font-weight: 500; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.cites button .n { color: var(--accent); font-weight: 700; } .msg-tools { display: flex; gap: 14px; margin-top: 10px; padding-top: 9px; border-top: 1px solid var(--line); font-size: 13px; }
.composer { position: sticky; bottom: 14px; background: var(--panel); border: 1px solid var(--line-strong); border-radius: 16px; padding: 10px 12px; box-shadow: var(--shadow-lg); margin-top: 18px; }
.composer textarea { border: 0; padding: 4px 2px; min-height: 28px; resize: none; background: none; outline: none; } .composer .row { justify-content: space-between; margin-top: 6px; }
.composer:focus-within { border-color: var(--accent); }
.dots span { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--faint); margin-right: 4px; animation: blink 1.2s infinite both; } .dots span:nth-child(2) { animation-delay: .2s; } .dots span:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } } @media (prefers-reduced-motion: reduce) { .dots span { animation: none; } .side { transition: none; } }
.suggest { display: flex; flex-wrap: wrap; gap: 8px; } .suggest button { border-radius: 999px; font-weight: 450; color: var(--muted); background: var(--panel); white-space: normal; text-align: left; } .suggest button:hover { color: var(--ink); border-color: var(--accent-line); }
.hero { background: linear-gradient(135deg, var(--accent-soft), var(--panel) 70%); border: 1px solid var(--accent-line); border-radius: 16px; padding: 26px; margin-bottom: 18px; }
.hero h1 { font-size: 26px; } .hero .composer { position: static; box-shadow: var(--shadow); margin-top: 16px; }

/* overlay: drawer + modal */
.overlay { position: fixed; inset: 0; background: rgba(15,15,12,.42); display: flex; justify-content: flex-end; z-index: 20; }
.overlay .panel { width: min(680px, 100%); height: 100%; overflow: auto; background: var(--panel); padding: 26px 24px; position: relative; box-shadow: var(--shadow-lg); }
.overlay.modal { align-items: center; justify-content: center; padding: 16px; } .overlay.modal .panel { height: auto; max-height: calc(100vh - 32px); width: min(560px, 100%); border-radius: 16px; }
.overlay.modal.wide .panel { width: min(760px, 100%); }
.close { position: absolute; right: 12px; top: 12px; } .panel h1 { font-size: 20px; padding-right: 36px; }
.body { white-space: pre-wrap; background: var(--raised); border: 1px solid var(--line); padding: 14px; border-radius: var(--radius-sm); max-height: 360px; overflow: auto; font-size: 14px; }
.notes h3 { margin: 16px 0 4px; text-transform: capitalize; } .notes ul { margin: 4px 0; padding-left: 20px; }
#toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%) translateY(8px); background: var(--ink); color: var(--bg); padding: 9px 16px; border-radius: 10px; opacity: 0; transition: opacity .18s, transform .18s; pointer-events: none; z-index: 40; max-width: 90vw; box-shadow: var(--shadow-lg); }
#toast.on { opacity: 1; transform: translateX(-50%); }
.center-card { max-width: 440px; margin: 9vh auto 0; } .center-card .card { padding: 28px; }
.login-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; } .login-brand .mark { width: 40px; height: 40px; font-size: 19px; border-radius: 11px; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; font-size: 13.5px; } .kv dt { color: var(--muted); } .kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
details > summary { cursor: pointer; font-weight: 600; } details[open] > summary { margin-bottom: 10px; }
.swatch { width: 18px; height: 18px; border-radius: 5px; border: 1px solid var(--line-strong); display: inline-block; vertical-align: -4px; }
main:focus, main:focus-visible { outline: none; }
td code { white-space: nowrap; word-break: normal; }
#main:focus, #main:focus-visible { outline: none; }
code { word-break: normal; overflow-wrap: anywhere; }
.codeblock pre { padding-right: 88px; } .codeblock.wrap pre { white-space: pre-wrap; }
.hero .composer textarea { overflow: hidden; }
/* people */
.person { display: flex; gap: 10px; align-items: center; text-align: left; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; font-weight: 400; white-space: normal; min-width: 210px; max-width: 280px; }
.person:hover { border-color: var(--accent-line); background: var(--panel); } .person b { display: block; font-weight: 600; line-height: 1.25; } .person .small { color: var(--muted); display: block; line-height: 1.3; } .person.off { opacity: .55; }
.tiles .person { max-width: none; width: 100%; }
.tree, .tree ul { list-style: none; margin: 0; padding: 0; } .tree ul { margin-left: 22px; padding-left: 20px; border-left: 1.5px solid var(--line-strong); }
.tree li { position: relative; padding: 5px 0; } .tree ul > li::before { content: ""; position: absolute; left: -20px; top: 28px; width: 18px; border-top: 1.5px solid var(--line-strong); }
.tree ul > li:last-child::after { content: ""; position: absolute; left: -22px; top: 29px; bottom: 0; width: 3px; background: var(--panel); }
/* setup wizard */
.wizard { max-width: 720px; margin: 3vh auto 0; } .wizard > .card { padding: 30px; } .wizard h1 { font-size: 23px; }
.wizard-steps { display: flex; gap: 6px; margin-bottom: 16px; flex-wrap: wrap; } .ws { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--faint); padding-right: 12px; }
.ws span { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 11.5px; font-weight: 700; background: color-mix(in srgb, var(--ink) 8%, transparent); }
.ws.on { color: var(--ink); font-weight: 600; } .ws.on span { background: var(--accent); color: var(--accent-ink); } .ws.done span { background: var(--ok-bg); color: var(--ok); }
.suggest button.picked { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); font-weight: 600; }

/* ---------- rulebook, review, teach ---------- */
.quote { border-left: 3px solid var(--accent-line); background: var(--raised); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; padding: 10px 14px; margin: 12px 0 4px; }
.quote .q { font-size: 15px; line-height: 1.5; margin-bottom: 4px; overflow-wrap: anywhere; } .quote .found { color: var(--ok); font-weight: 550; white-space: nowrap; } .quote .found svg { width: 14px; height: 14px; vertical-align: -2px; }
.tiles.areas { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); } .tile.on { border-color: var(--accent); background: var(--accent-soft); } .tile .grow { min-width: 0; }
.tile .small svg { width: 12px; height: 12px; vertical-align: -1px; }
.review-card { max-width: 760px; margin: 0 auto 10px; padding: 22px; } .review-card .card-meta { margin-bottom: 14px; flex-wrap: wrap; }
.review-card .actions, .interview .actions { margin-top: 18px; flex-wrap: wrap; } .review-card textarea, .interview textarea { font-size: 15.5px; line-height: 1.5; }
.question { font-size: 19px; font-weight: 600; letter-spacing: -.01em; line-height: 1.35; margin: 2px 0 10px; overflow-wrap: anywhere; } .question::first-letter { text-transform: uppercase; }
.sides { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; } @media (max-width: 640px) { .sides { grid-template-columns: 1fr; } }
.cside.a, .cside.b { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; border-left: 3px solid var(--accent); min-width: 0; } .cside.b { border-left-color: var(--warn); }
.cside .st { font-size: 15.5px; font-weight: 550; margin-top: 4px; overflow-wrap: anywhere; } .sides + textarea { margin-top: 12px; }
.interview { max-width: 760px; } .history > div { padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; } .history > div:last-child { border: 0; } .history .undone { opacity: .55; text-decoration: line-through; }
.meter { height: 8px; border-radius: 999px; background: color-mix(in srgb, var(--ink) 9%, transparent); overflow: hidden; margin: 10px 0 12px; } .meter span { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.cites button.rule { border-color: color-mix(in srgb, var(--ok) 40%, var(--line)); background: var(--ok-bg); } .cites button.rule svg { width: 13px; height: 13px; vertical-align: -2px; color: var(--ok); }
a.chip { text-decoration: none; }
.filters { display: flex; gap: 10px; align-items: center; margin: 16px 0 12px; flex-wrap: wrap; } .filters input { flex: 1 1 220px; width: auto; } .filters select { width: auto; flex: 0 0 auto; }

/* ---------- polish pass (refs: ChatGPT/Gemini answers, Dropbox Dash/Featurebase connection catalogs) ---------- */
h1 { font-size: 26px; letter-spacing: -.025em; }
.sub { font-size: 14.5px; line-height: 1.6; }
.card { box-shadow: 0 1px 2px rgba(20,20,15,.04); transition: box-shadow .15s, border-color .15s; }
nav a { transition: background .12s, color .12s; }
nav a.on { font-weight: 600; }

/* ask: flat answers, tidy sources, composer that never covers text */
.chat { gap: 22px; padding-bottom: 30px; }
.msg.assistant { background: none; border: 0; box-shadow: none; padding: 2px 2px 0; font-size: 15px; line-height: 1.7; }
.msg.assistant.muted { padding: 4px 2px; }
.msg.user { padding: 10px 16px; border-radius: 18px; border-bottom-right-radius: 6px; }
.md p { margin-bottom: 12px; }
.cites { margin-top: 14px; gap: 7px; }
.cites button { font-size: 12.5px; padding: 3px 11px 3px 5px; border-radius: 999px; background: var(--panel); border-color: var(--line); color: var(--muted); transition: border-color .12s, color .12s; }
.cites button:hover { border-color: var(--accent-line); color: var(--ink); background: var(--panel); }
.cites button .n { display: inline-block; min-width: 19px; height: 19px; line-height: 19px; margin-right: 4px; padding: 0 5px; text-align: center; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 11.5px; }
.msg-tools { border-top: 0; margin-top: 8px; padding-top: 0; gap: 4px; }
.msg-tools button.link { color: var(--faint); padding: 4px 8px; border-radius: 6px; display: inline-flex; align-items: center; gap: 5px; }
.msg-tools button.link:hover { color: var(--ink); background: color-mix(in srgb, var(--ink) 7%, transparent); text-decoration: none; }
.msg-tools svg.ic { width: 14px; height: 14px; }
.composer { z-index: 3; border-radius: 18px; box-shadow: 0 0 0 16px var(--bg), var(--shadow-lg); bottom: 22px; }
.hero .composer { box-shadow: var(--shadow); }

/* connections catalog */
.cat-search { position: relative; max-width: 420px; margin: 4px 0 6px; }
.cat-search svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--faint); }
.cat-search input { padding-left: 36px; border-radius: 10px; }
.tile.connect { position: relative; padding-right: 46px; transition: border-color .15s, box-shadow .15s, transform .15s; }
.tile.connect::after { content: "+"; position: absolute; right: 12px; top: 13px; width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--line-strong); display: grid; place-items: center; color: var(--muted); font-size: 17px; line-height: 1; transition: background .15s, color .15s, border-color .15s; }
.tile.connect:hover { border-color: var(--accent-line); box-shadow: var(--shadow); transform: translateY(-1px); }
.tile.connect:hover::after { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.cgroup[hidden] { display: none !important; }
.no-match { color: var(--muted); padding: 18px 2px; }
.list > * { padding: 14px 18px; }
@media (prefers-reduced-motion: reduce) { .tile.connect { transition: none; transform: none !important; } }
