/* calx: an app shell. Sidebar, a quiet centre, a live panel on the right. */

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 15px/1.55 var(--font-sans); -webkit-font-smoothing: antialiased; overflow: hidden; }
img, svg { display: block; max-width: 100%; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, ol, ul, dl, dd, figure { margin: 0; }
ol, ul { padding: 0; list-style: none; }
:focus-visible { outline: 1.5px solid var(--ink-2); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--ink); color: var(--on-ink); }
em { font-family: var(--font-serif); font-style: italic; font-weight: 400; color: var(--serif-ink); letter-spacing: -0.01em; }
.mono, code, kbd { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.ember { color: var(--ember); }
.dim { color: var(--ink-2); }
.cap { font: 400 11px/1.5 var(--font-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-2); }
code { font-size: 0.88em; background: var(--muted-bg); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; overflow-wrap: anywhere; }
.icon { width: 16px; height: 16px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- shell ---------- */
.app { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr) var(--panel-w); height: 100vh; height: 100dvh; }
.app.panel-off { grid-template-columns: var(--side-w) minmax(0, 1fr) 0; }
.app.panel-off .panel { display: none; }

/* sidebar */
.side { background: var(--side); border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; padding: 12px 8px; gap: 4px; }
.side-top { display: flex; align-items: center; justify-content: space-between; padding: 4px 8px 12px; }
.side-top img { height: 19px; width: auto; }
.icon-btn { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; border: 0; background: transparent; color: var(--ink-2); }
.icon-btn:hover { background: var(--hover); color: var(--ink); }
.side-btn { display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 10px; border-radius: 10px; font-size: 13.5px; color: var(--ink); border: 1px solid var(--line-2); background: transparent; width: 100%; }
.side-btn:hover { background: var(--hover); }
.side-btn kbd, .side-link kbd { margin-left: auto; font-size: 10.5px; color: var(--ink-2); border: 1px solid var(--line-2); border-radius: 6px; padding: 1px 6px; }
.side-link { display: flex; align-items: center; gap: 10px; height: 34px; padding: 0 10px; border-radius: 10px; font-size: 13.5px; color: var(--ink-2); transition: background 160ms var(--ease), color 160ms var(--ease); border: 0; background: transparent; width: 100%; text-align: left; }
.side-link:hover { background: var(--hover); color: var(--ink); }
.side-link[aria-current] { background: var(--hover); color: var(--ink); }
.side-gap { height: 14px; }
.side-label { padding: 6px 10px 4px; font-size: 12px; color: var(--muted); }
.recents { display: grid; gap: 1px; overflow-y: auto; min-height: 0; }
.recents .side-link { font: 400 12.5px/1 var(--font-mono); }
.side-empty { padding: 4px 10px; font-size: 12.5px; color: var(--ink-2); }
.side-fill { flex: 1; }
.status-card { border: 1px solid var(--line); background: var(--card); border-radius: 14px; padding: 12px; display: grid; gap: 6px; font-size: 12.5px; color: var(--ink-2); line-height: 1.5; }
.status-card[hidden] { display: none; }
.status-card .row { display: flex; justify-content: space-between; align-items: center; color: var(--ink); font-size: 13px; }
.status-card a { color: var(--ink); font-size: 12.5px; }
.pill { display: inline-flex; align-items: center; gap: 6px; font: 400 10.5px/1.4 var(--font-sans); color: var(--ink-2); border: 1px solid var(--line-2); border-radius: 999px; padding: 2px 8px; white-space: nowrap; }
.pill i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.pill.warn { color: var(--warn); }
.pill.good { color: var(--good); }
.pill.ex { color: var(--warn); }

/* main */
.main { position: relative; min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.top { height: var(--top-h); flex: none; display: flex; align-items: center; gap: 12px; padding: 0 16px 0 24px; }
.top .title { display: flex; align-items: baseline; gap: 8px; font-size: 15px; }
.top .title b { font-weight: 500; }
.top .title span { color: var(--ink-2); }
.top .right { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.ca { display: inline-flex; align-items: center; gap: 8px; font: 400 11px/1.5 var(--font-mono); color: var(--ink-2); border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; background: transparent; letter-spacing: -0.02em; }
.ca:hover { color: var(--ink); border-color: var(--line-2); }
.ca .icon { width: 12px; height: 12px; }
.menu-btn { display: none; }
.scroll { flex: 1; min-height: 0; overflow-y: auto; }

/* ---------- home: the prompt ---------- */
.center { width: min(760px, 100% - 32px); margin: 0 auto; }
.hero { padding-top: clamp(64px, 14vh, 150px); display: grid; justify-items: center; text-align: center; gap: 0; }
.tile { width: 56px; height: 56px; border-radius: 18px; background: var(--card); box-shadow: 0 0 0 1px var(--line-2), 0 8px 30px -10px rgba(0, 0, 0, 0.9); display: grid; place-items: center; margin-bottom: 28px; }
.tile svg { width: 38px; height: 38px; }
.hero h1 { font: 500 36px/1.25 var(--font-sans); letter-spacing: -0.035em; text-wrap: balance; }
.hero h1 em { display: inline-block; min-width: 4.2ch; text-align: left; }
.hero h1 em.swap { animation: word-in 420ms var(--ease); }
@keyframes word-in { from { opacity: 0; transform: translateY(6px); filter: blur(3px); } }
.hero .sub { margin-top: 10px; font-size: 14px; color: var(--ink-2); }

.composer { margin-top: 40px; background: var(--input); border-radius: 28px; box-shadow: 0 0 0 1px var(--ring), 0 18px 50px -24px rgba(0, 0, 0, 0.9); padding: 10px; text-align: left; transition: box-shadow 200ms var(--ease); }
.composer:focus-within { box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.34), 0 18px 50px -24px rgba(0, 0, 0, 0.9); }
.composer textarea { display: block; width: 100%; min-height: 60px; max-height: 160px; resize: none; border: 0; outline: 0; background: transparent; padding: 10px 12px 0; font: 400 15.5px/1.6 var(--font-sans); color: var(--ink); }
.composer textarea::placeholder { color: var(--muted); }
.composer .extra { display: none; padding: 4px 12px 2px; }
.composer.with-team .extra { display: block; }
.composer .extra input { width: 100%; height: 34px; border: 1px solid var(--line-2); border-radius: 10px; background: transparent; padding: 0 12px; font: 400 13px/1 var(--font-mono); outline: 0; }
.composer .extra input:focus { border-color: var(--ring); }
.composer .bar { display: flex; align-items: center; gap: 8px; padding: 8px 2px 0; }
.chip-btn { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-2); background: transparent; font-size: 13px; color: var(--ink-2); }
.chip-btn:hover { color: var(--ink); background: var(--hover); }
.chip-btn .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--good); }
.round-btn { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line-2); display: grid; place-items: center; background: transparent; color: var(--ink-2); }
.round-btn:hover { color: var(--ink); background: var(--hover); }
.hint { margin-left: auto; font-size: 12px; color: var(--muted); }
.send { width: 36px; height: 36px; border-radius: 50%; border: 0; display: grid; place-items: center; background: #3a3b3d; color: #0b0b0c; transition: background 160ms var(--ease); }
.send.ready { background: var(--ink); }
.send .icon { stroke-width: 2.2; }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 18px; }
.chip { height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: transparent; font-size: 13px; color: var(--ink-2); }
.chip:hover { color: var(--ink); border-color: var(--line-2); background: var(--hover); }
.below { display: grid; justify-items: center; gap: 12px; margin-top: 40px; padding-bottom: 60px; font-size: 13px; color: var(--ink-2); }
.below a { display: inline-flex; align-items: center; gap: 8px; }
.below a:hover { color: var(--ink); }

/* conversation */
.thread { display: none; padding: 28px 0 24px; gap: 26px; }
.chatting .hero, .chatting .chips, .chatting .below { display: none; }
.chatting .thread { display: grid; }
.chatting .dock { position: sticky; bottom: 0; padding: 10px 0 18px; background: linear-gradient(to top, var(--bg) 70%, transparent); }
.chatting .composer { margin-top: 0; }
.msg-you { justify-self: end; max-width: 80%; background: var(--muted-bg); border: 1px solid var(--line); border-radius: 18px 18px 6px 18px; padding: 9px 14px; font-size: 14px; overflow-wrap: anywhere; }
.msg-you.addr { font: 400 13px/1.5 var(--font-mono); }
.msg { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 14px; align-items: start; }
.avatar { width: 30px; height: 30px; border-radius: 10px; background: var(--card); box-shadow: 0 0 0 1px var(--line-2); display: grid; place-items: center; }
.avatar svg { width: 20px; height: 20px; }
.answer { min-width: 0; display: grid; gap: 14px; font-size: 14.5px; color: var(--ink); }
.answer > p { color: var(--ink-2); }
.answer > p b { color: var(--ink); font-weight: 500; }
.verdict { font: 500 20px/1.3 var(--font-sans); letter-spacing: -0.02em; }
.verdict.pass { color: var(--good); }
.verdict.fail { color: var(--bad); }
.meta { font: 400 11.5px/1.6 var(--font-mono); color: var(--muted); overflow-wrap: anywhere; }
.grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--card); }
.grid4 > div { padding: 14px 16px; border-left: 1px solid var(--line); min-width: 0; }
.grid4 > div:first-child { border-left: 0; }
.grid4 .k { font-size: 12px; color: var(--ink-2); }
.grid4 .v { margin-top: 6px; font: 500 21px/1.15 var(--font-sans); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.grid4 .d { margin-top: 4px; font-size: 11.5px; color: var(--muted); }
.list { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--card); }
.list > div { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 12px; padding: 12px 16px; border-top: 1px solid var(--line); }
.list > div:first-child { border-top: 0; }
.list b { font-weight: 500; }
.list p { color: var(--ink-2); font-size: 13.5px; margin-top: 2px; }
.list.plain > div { grid-template-columns: 28px minmax(0, 1fr); }
.list .n { font: 400 12px/1.6 var(--font-mono); color: var(--muted); }
.tag { font: 400 11px/1.6 var(--font-mono); color: var(--ink-2); }
.tag.pass { color: var(--good); }
.tag.fail { color: var(--bad); }
.tag.warn { color: var(--warn); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.box { border: 1px solid var(--line); border-radius: 16px; background: var(--card); padding: 14px 16px; }
.box .tag { display: block; margin-bottom: 8px; }
.box li { color: var(--ink-2); font-size: 13.5px; padding: 3px 0; }
.tbl { border: 1px solid var(--line); border-radius: 16px; overflow-x: auto; background: var(--card); }
.tbl table { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { text-align: left; font-weight: 400; font-size: 11.5px; color: var(--ink-2); padding: 11px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 11px 14px; border-top: 1px solid var(--line); color: var(--ink-2); white-space: nowrap; }
.tbl tr:first-child td { border-top: 0; }
.tbl .num { text-align: right; font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.tbl .strong { color: var(--ink); }
.tbl .burn { color: var(--ember); }
.breaks { border: 1px solid rgba(242, 119, 107, 0.25); border-radius: 16px; background: var(--card); overflow: hidden; }
.breaks > li { padding: 12px 16px; border-top: 1px solid var(--line); }
.breaks > li:first-child { border-top: 0; }
.breaks .sig { font: 400 12px/1.5 var(--font-mono); overflow-wrap: anywhere; }
.breaks ul { margin-top: 6px; }
.breaks ul li { color: var(--ink-2); font-size: 13px; padding-left: 12px; position: relative; }
.breaks ul li::before { content: ""; position: absolute; left: 0; top: 0.7em; width: 5px; height: 1px; background: var(--bad); }
.followups { display: flex; flex-wrap: wrap; gap: 8px; }
.followups .chip { height: 30px; font-size: 12.5px; }
.skel { height: 11px; border-radius: 3px; background: var(--muted-bg); }
.skel + .skel { margin-top: 9px; }

/* ---------- reading pages (inside the shell) ---------- */
.page { width: min(720px, 100% - 32px); margin: 0 auto; padding: 48px 0 80px; }
.page .crumb { font: 400 12px/1 var(--font-mono); color: var(--ink-2); }
.page h1 { margin: 16px 0 14px; font: 500 40px/1.15 var(--font-sans); letter-spacing: -0.035em; }
.page .lede { color: var(--ink-2); font-size: 15px; max-width: 38em; }
.page section { margin-top: 44px; display: grid; gap: 12px; }
.page h2 { font: 500 19px/1.3 var(--font-sans); letter-spacing: -0.02em; }
.page h2 .n { font: 400 12px/1 var(--font-mono); color: var(--muted); margin-right: 10px; vertical-align: 2px; }
.page p, .page li { color: var(--ink-2); font-size: 14.5px; line-height: 1.7; }
.page p b, .page li b { color: var(--ink); font-weight: 500; }
.page ul.dash li { position: relative; padding-left: 18px; }
.page ul.dash li + li { margin-top: 6px; }
.page ul.dash li::before { content: ""; position: absolute; left: 0; top: 0.85em; width: 8px; height: 1px; background: var(--ink-2); }
.page details { border-top: 1px solid var(--line); padding: 12px 0; }
.page details:last-of-type { border-bottom: 1px solid var(--line); }
.page summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 12px; font-size: 14.5px; }
.page summary::-webkit-details-marker { display: none; }
.page summary::after { content: "+"; font-family: var(--font-mono); color: var(--muted); }
.page details[open] summary::after { content: "−"; }
.page details p { margin-top: 8px; }
.kit { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.kit > a, .kit > div { border: 1px solid var(--line); border-radius: 16px; background: var(--card); overflow: hidden; display: grid; }
.kit .p { height: 170px; display: grid; place-items: center; border-bottom: 1px solid var(--line); background: var(--bg); padding: 16px; }
.kit .p.light { background: #f4f2ee; }
.kit .p img { max-width: 80%; max-height: 120px; width: auto; height: auto; object-fit: contain; }
.kit .p img[src$='.svg'] { height: 110px; }
.kit .p img[src*='lockup'] { height: auto; width: 62%; }
.kit .p img.round { border-radius: 50%; height: 130px; }
.kit .p img.full { width: 100%; height: 100%; max-width: none; max-height: none; object-fit: contain; }
.kit .t { display: flex; justify-content: space-between; gap: 10px; padding: 10px 14px; font-size: 13px; }
.kit .t span:last-child { font: 400 11px/1.7 var(--font-mono); color: var(--muted); }
.kit .rec { color: var(--ember) !important; }
.wide { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.swatches { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.swatches div { font: 400 11px/1.6 var(--font-mono); color: var(--muted); }
.swatches i { display: block; height: 40px; border-radius: 10px; border: 1px solid var(--line-2); margin-bottom: 8px; }
.swatches b { display: block; font: 500 13px/1.4 var(--font-sans); color: var(--ink); }
.btn { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 16px; border-radius: 999px; font-size: 13.5px; font-weight: 500; border: 1px solid transparent; background: transparent; color: var(--ink); }
.btn.primary { background: var(--ink); color: var(--on-ink); }
.btn.secondary { border-color: var(--line-2); }
.btn.secondary:hover { background: var(--hover); }
.lost { display: grid; justify-items: center; text-align: center; gap: 14px; padding-top: 18vh; }
.lost .tile { width: 72px; height: 72px; margin-bottom: 10px; }
.lost .tile svg { width: 50px; height: 50px; }
.lost h1 { font: 500 36px/1.2 var(--font-sans); letter-spacing: -0.035em; }

/* ---------- the panel ---------- */
.panel { background: var(--side); border-left: 1px solid var(--line); min-height: 0; overflow-y: auto; }
.panel-head { height: var(--top-h); display: flex; align-items: center; justify-content: space-between; padding: 0 12px 0 17px; border-bottom: 1px solid var(--line); }
.panel-head b { font-size: 13.5px; font-weight: 500; }
.psec { padding: 16px 17px 18px; border-bottom: 1px solid var(--line); display: grid; gap: 10px; }
.psec .head { display: flex; justify-content: space-between; align-items: center; }
.psec .head a { font-size: 12px; color: var(--ink-2); }
.psec .head a:hover { color: var(--ink); }
.big { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.big b { font: 500 26px/1.1 var(--font-sans); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.big span { font-size: 13px; color: var(--ink-2); }
.live { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--ink-2); }
.live .ring { width: 22px; height: 22px; flex: none; }
.kv { display: grid; gap: 8px; }
.kv > div { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 12.5px; }
.kv > div span:first-child { color: var(--ink-2); }
.kv .v { font-family: var(--font-mono); font-size: 12px; }
.rows { display: grid; gap: 2px; }
.rows > a, .rows > div { display: flex; align-items: center; gap: 10px; padding: 6px 4px; border-radius: 8px; font-size: 12.5px; }
.rows > a:hover { background: var(--hover); }
.rows .ico { width: 28px; height: 28px; border-radius: 8px; border: 1px solid var(--line-2); display: grid; place-items: center; flex: none; color: var(--ink-2); }
.rows .ico svg { width: 14px; height: 14px; }
.rows .mid { min-width: 0; flex: 1; }
.rows .mid b { display: block; font-weight: 500; font-size: 13px; }
.rows .mid span { font-size: 11.5px; color: var(--ink-2); }
.pnote { padding: 14px 17px 24px; font-size: 11.5px; color: var(--muted); line-height: 1.6; }

/* ---------- motion ---------- */
.motion-off *, .motion-off *::before, .motion-off *::after { animation: none !important; transition: none !important; }

/* ---------- smaller screens ---------- */
@media (max-width: 1180px) {
  .app { grid-template-columns: var(--side-w) minmax(0, 1fr) 0; }
  .app .panel { display: none; }
  .app.panel-on .panel { display: block; position: fixed; top: 0; right: 0; bottom: 0; width: min(var(--panel-w), 92vw); z-index: 40; box-shadow: -20px 0 60px rgba(0, 0, 0, 0.7); }
}
@media (max-width: 820px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; top: 0; bottom: 0; left: 0; width: min(var(--side-w), 86vw); z-index: 50; transform: translateX(-102%); transition: transform 240ms var(--ease); box-shadow: 20px 0 60px rgba(0, 0, 0, 0.7); }
  .app.side-on .side { transform: none; }
  .menu-btn { display: grid; }
  .top { padding: 0 10px; }
  .top .title span { display: none; }
  .hero { padding-top: 48px; }
  .hero h1 { font-size: 30px; }
  .grid4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid4 > div:nth-child(3) { border-left: 0; }
  .grid4 > div:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .two-col, .kit { grid-template-columns: minmax(0, 1fr); }
  .swatches { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hint { display: none; }
  .send { margin-left: auto; }
  .composer .bar .team-label { display: none; }
  .page h1 { font-size: 32px; }
}
.scrim { display: none; }
@media (max-width: 1180px) {
  .app.panel-on .scrim, .app.side-on .scrim { display: block; position: fixed; inset: 0; background: rgba(0, 0, 0, 0.55); z-index: 30; }
}

/* ---------- checkout ---------- */
.notice { margin-top: 22px; display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; border: 1px solid var(--line); border-radius: 14px; background: var(--card); padding: 12px 14px; font-size: 13.5px; color: var(--ink-2); }
.packs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.pack { display: grid; gap: 10px; text-align: left; border: 1px solid var(--line); border-radius: 16px; background: var(--card); padding: 14px 16px 16px; color: var(--ink); transition: border-color 160ms var(--ease), background 160ms var(--ease); }
.pack:hover { border-color: var(--line-2); }
.pack.on { border-color: var(--ring); background: var(--input); box-shadow: 0 0 0 1px var(--ring); }
.pack-top { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--ink-2); }
.pack-top b { color: var(--ink); font-weight: 500; }
.pack-price { font: 500 24px/1.1 var(--font-sans); letter-spacing: -0.02em; }
.pack-sol { margin-top: -6px; font-size: 12px; color: var(--muted); }
.pack .bar { display: flex; height: 6px; border-radius: 3px; overflow: hidden; gap: 2px; }
.pack .bar span:first-child { background: var(--ember); }
.pack .bar span:last-child { background: var(--muted); }
.pack-split { display: flex; justify-content: space-between; gap: 8px; font: 400 11.5px/1.4 var(--font-mono); color: var(--ink-2); }
.sum { border: 1px solid var(--line); border-radius: 16px; background: var(--card); overflow: hidden; }
.sum > div { display: flex; justify-content: space-between; gap: 16px; padding: 11px 16px; border-top: 1px solid var(--line); font-size: 13.5px; }
.sum > div:first-child { border-top: 0; }
.sum > div > span:first-child { color: var(--ink-2); flex: none; }
.sum > div > span:last-child { text-align: right; overflow-wrap: anywhere; }
.sum b { font-weight: 500; }
.sum .sum-top { align-items: baseline; padding: 14px 16px; }
.sum .sum-top b { font: 500 22px/1.1 var(--font-sans); letter-spacing: -0.02em; }
.pay-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.btn.lg { height: 44px; padding: 0 20px; font-size: 14px; }
.btn { cursor: pointer; }
.who { font-size: 13px; color: var(--ink-2); display: inline-flex; gap: 8px; align-items: center; }
.link-btn { background: none; border: 0; padding: 0; color: var(--ink-2); font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }
.link-btn:hover { color: var(--ink); }
.fine-note { font-size: 12.5px; color: var(--muted); line-height: 1.6; }
.paid { margin-top: 12px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: 13.5px; color: var(--ink-2); }
.paid a { color: var(--ink); }
.err-line { color: var(--bad); font-size: 13.5px; margin-top: 10px; }
.modal-back { position: fixed; inset: 0; z-index: 80; background: rgba(0, 0, 0, 0.7); display: grid; place-items: center; padding: 16px; }
.modal-back[hidden] { display: none; }
.modal { width: min(480px, 100%); max-height: calc(100dvh - 32px); overflow-y: auto; background: var(--card); border: 1px solid var(--line-2); border-radius: 20px; padding: 16px 18px 20px; display: grid; gap: 14px; box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.9); }
.modal-head { display: flex; justify-content: space-between; align-items: center; }
.modal-head b { font-weight: 500; }
.modal p { font-size: 14px; color: var(--ink-2); line-height: 1.6; }
.modal p b { color: var(--ink); font-weight: 500; }
.confirm { display: grid; gap: 12px; }
.wallet-list { display: grid; gap: 8px; }
.wallet { display: flex; align-items: center; gap: 12px; height: 48px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line-2); background: transparent; font-size: 14px; }
.wallet:hover { background: var(--hover); }
.wallet img { border-radius: 8px; }
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.steps li { display: grid; gap: 6px; font-size: 11.5px; color: var(--muted); }
.steps li span { height: 3px; border-radius: 2px; background: var(--line-2); }
.steps li.done { color: var(--ink-2); }
.steps li.done span { background: var(--good); }
.steps li.now { color: var(--ink); }
.steps li.now span { background: var(--ink); }
.steps li.fail { color: var(--bad); }
.steps li.fail span { background: var(--bad); }
@media (max-width: 820px) {
  .packs { grid-template-columns: minmax(0, 1fr); }
  .sum > div { flex-direction: column; gap: 2px; }
  .sum > div > span:last-child { text-align: left; }
}

/* ---------- the X look: obsidian depth, dark glass, heavy type ---------- */
/* Static art only (no animation, no backdrop-filter), so it stays smooth without a GPU. */
.main { container-type: inline-size; }
.scroll { position: relative; }
.center, .page, .lost { position: relative; z-index: 1; }

/* obsidian coins behind a header, fading out downward */
.depth { position: absolute; left: 0; right: 0; top: 0; height: 520px; pointer-events: none; z-index: 0; overflow: hidden;
  -webkit-mask-image: linear-gradient(#000 40%, transparent 96%); mask-image: linear-gradient(#000 40%, transparent 96%); }
.depth .rings { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .78; }
.depth::after { content: ""; position: absolute; inset: 0; background: radial-gradient(46% 62% at 50% 46%, rgba(2,2,2,.86), rgba(2,2,2,0) 100%); }
.page-depth .rings { opacity: .55; }
.scroll:has(.chatting) .depth { display: none; }

/* real calx screens on dark glass, floating beside the home prompt */
.depth .stage { position: absolute; inset: 0; perspective: 1400px; z-index: 1; }
.gl { position: absolute; width: 270px; border-radius: 16px; padding: 15px 17px; color: var(--ink); text-align: left;
  background: linear-gradient(180deg, rgba(30,30,34,.9), rgba(9,9,11,.94)); border: 1px solid rgba(255,255,255,.09);
  box-shadow: 0 40px 80px rgba(0,0,0,.7), inset 0 1px 0 rgba(255,255,255,.09); }
.gl-verifier { left: 2%; top: 46px; transform: rotateY(24deg) rotateX(7deg) rotateZ(-3deg) scale(var(--gl-s, .8)); transform-origin: left top; opacity: .8; }
.gl-receipt { right: 2%; top: 58px; transform: rotateY(-24deg) rotateX(6deg) rotateZ(2deg) scale(var(--gl-s, .8)); transform-origin: right top; opacity: .8; }
.gl-top { display: flex; align-items: center; gap: 8px; font: 400 11px/1 var(--font-mono); color: var(--ink-2); }
.gl-top svg { width: 14px; height: 14px; color: var(--ink); }
.gl-r { margin-left: auto; }
.gl-tag { margin-left: auto; font: 400 10px/1 var(--font-mono); padding: 4px 7px; border-radius: 999px; border: 1px solid rgba(255,255,255,.14); color: var(--ink-2); }
.gl-row .gl-tag { margin-left: 0; }
.gl-tag.ex { color: var(--warn); border-color: rgba(232,178,90,.35); }
.gl-tag.pass { color: var(--good); border-color: rgba(127,207,154,.3); }
.gl-big { font: 500 34px/1 var(--font-mono); letter-spacing: -.03em; margin: 14px 0 5px; }
.gl-sub { font-size: 12.5px; color: var(--ink-2); }
.gl-h { margin: 12px 0 2px; font: 500 19px/1.15 var(--font-sans); letter-spacing: -.02em; }
.gl-row { display: flex; justify-content: space-between; align-items: center; padding: 9px 0; margin-top: 10px; border-top: 1px solid rgba(255,255,255,.07); font-size: 12.5px; color: var(--ink-2); }
.gl-row + .gl-row { margin-top: 0; }
.gl-row b { color: var(--ink); font-weight: 500; }
@container (max-width: 980px) { .depth .stage { --gl-s: .66; } .gl { opacity: .62; } }
@container (max-width: 760px) { .depth .stage { display: none; } }

/* the home hero: the coin as obsidian, the quiet spaced tagline */
.coin { width: 104px; height: 104px; margin-bottom: 20px; display: grid; place-items: center; }
.coin svg { width: 104px; height: 104px; }
.coin img { width: 64px; height: 64px; }
.tagline { margin-top: 16px; font: 400 12px/1 var(--font-mono); letter-spacing: .3em; padding-left: .3em; color: var(--muted); }

/* reading pages: a spaced label, one heavy uppercase line with the ember as its full stop, the serif line under it */
.page .crumb { font: 400 11px/1 var(--font-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.page h1, .lost h1 { margin: 20px 0 18px; font: 800 clamp(42px, 7.2cqi, 76px)/.9 var(--font-sans); letter-spacing: -.045em; text-transform: uppercase; text-wrap: balance; }
.page h1 em { display: block; margin-top: .26em; font-size: .52em; line-height: 1.1; text-transform: none; letter-spacing: -.01em; color: var(--serif-ink); }
.stop { display: inline-block; width: .19em; height: .19em; margin-left: .05em; border-radius: 50%; background: var(--ember); font-style: normal; }
.lost h1 { margin: 6px 0 4px; }

/* dark glass on every card */
.composer, .grid4, .list, .box, .tbl, .breaks, .sum, .pack, .notice, .kit > a, .kit > div, .status-card, .modal, .msg-you, .lost .tile {
  background: linear-gradient(180deg, rgba(22,22,25,.95), rgba(7,7,9,.97));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 24px 60px -32px rgba(0,0,0,.95); }
.composer { box-shadow: 0 0 0 1px var(--ring), inset 0 1px 0 rgba(255,255,255,.07), 0 30px 70px -30px rgba(0,0,0,.95); }
.composer:focus-within { box-shadow: 0 0 0 1px rgba(255,255,255,.34), inset 0 1px 0 rgba(255,255,255,.07), 0 30px 70px -30px rgba(0,0,0,.95); }
.pack.on { background: linear-gradient(180deg, rgba(34,34,38,.96), rgba(10,10,12,.98)); box-shadow: 0 0 0 1px var(--ring), inset 0 1px 0 rgba(255,255,255,.09); }
.kit .p { background: var(--bg); }
.kit .p.light { background: #f4f2ee; }

@media (max-width: 820px) {
  .depth { height: 380px; }
  .coin, .coin svg { width: 84px; height: 84px; }
  .page-depth .rings { opacity: .38; }
  .page h1, .lost h1 { font-size: clamp(38px, 11vw, 52px); }
}

/* ---------- memory: the account box, the composer's Save/Find, memory cards, the library ---------- */
.acct { margin-bottom: 8px; }
.acct-in { width: 100%; height: 38px; border-radius: 12px; border: 1px solid var(--line-2); background: transparent; color: var(--ink); font-size: 13px; }
.acct-in:hover { background: var(--hover); }
.acct-who { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 10px; border-radius: 12px; border: 1px solid var(--line); font-size: 12.5px; color: var(--ink-2); }
.acct-who:hover { background: var(--hover); }
.acct-who code { font: 400 12px/1 var(--font-mono); color: var(--ink); }
.acct-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--good); flex: none; }
.acct-cr { margin-left: auto; white-space: nowrap; }
.acct-cr b { color: var(--ink); font-weight: 500; }

.seg { display: inline-flex; padding: 3px; border-radius: 999px; border: 1px solid var(--line-2); }
.seg button { height: 26px; padding: 0 12px; border: 0; border-radius: 999px; background: transparent; color: var(--ink-2); font-size: 12.5px; }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--on-ink); }
.cat-pick { padding: 0 6px 0 4px; }
.cat-pick[hidden] { display: none; }
.cat-pick select { appearance: none; border: 0; background: transparent; color: inherit; font: inherit; font-size: 13px; padding: 0 8px; cursor: pointer; }
.cat-pick select option { background: var(--card); color: var(--ink); }
.guest-note { margin-top: 10px; text-align: center; font-size: 12.5px; color: var(--muted); }
.avatar img { width: 16px; height: 16px; }
.fu-label { align-self: center; font-size: 12px; color: var(--muted); margin-right: 2px; }

.recent-mem { margin-top: 34px; text-align: left; }
.recent-mem .head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; font-size: 13px; }
.recent-mem .head a { color: var(--ink-2); }
.recent-mem .head a:hover { color: var(--ink); }
.chatting .recent-mem { display: none; }
.mem-list { display: grid; gap: 8px; }
.mem { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; display: grid; gap: 8px; text-align: left;
  background: linear-gradient(180deg, rgba(22,22,25,.95), rgba(7,7,9,.97)); box-shadow: inset 0 1px 0 rgba(255,255,255,.06); }
.mem-text { font-size: 14.5px; line-height: 1.55; color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; }
.mem-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; font-size: 12px; color: var(--muted); }
.mem-tag { font: 400 11px/1 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); padding: 4px 7px; border: 1px solid var(--line-2); border-radius: 999px; }
.mem-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; border-top: 1px solid var(--line); padding-top: 8px; font-size: 12.5px; }
.mem-actions button { height: 28px; padding: 0 11px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--ink-2); font-size: 12.5px; }
.mem-actions button:hover { color: var(--ink); background: var(--hover); }
.mem-actions [data-act="really"] { color: var(--bad); border-color: rgba(242,119,107,.35); }
.mem-actions [aria-expanded="true"] { color: var(--ink); border-color: var(--line-2); }
.mem-edit { display: grid; gap: 8px; }
.mem-edit textarea { width: 100%; resize: vertical; min-height: 70px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--input); padding: 10px 12px; font: 400 14px/1.5 var(--font-sans); color: var(--ink); outline: 0; }
.mem-edit textarea:focus { border-color: var(--ring); }
.mem-edit .row, .danger .row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.mem-edit select, .danger input { height: 38px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--input); color: var(--ink); padding: 0 12px; font-size: 13px; }
.mem-edit select { margin-right: auto; }
.replay { list-style: none; display: grid; gap: 0; border-left: 1px solid var(--line-2); margin: 2px 0 0 6px; padding-left: 14px; }
.replay li { position: relative; padding: 6px 0 10px; }
.replay li::before { content: ""; position: absolute; left: -18.5px; top: 11px; width: 8px; height: 8px; border-radius: 50%; background: var(--bg); border: 1px solid var(--ink-2); }
.replay li:first-child::before { background: var(--ink); border-color: var(--ink); }
.rp-meta { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 12px; color: var(--muted); }
.rp-meta b { color: var(--ink); font-weight: 500; font-family: var(--font-mono); }
.rp-now { color: var(--ink-2); }
.replay p { margin-top: 4px; font-size: 13.5px; color: var(--ink-2); white-space: pre-wrap; overflow-wrap: anywhere; }

.lib-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin: 26px 0 14px; }
.tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.tabs button { height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--ink-2); font-size: 12.5px; }
.tabs button span { color: var(--muted); margin-left: 2px; font-family: var(--font-mono); font-size: 11.5px; }
.tabs button[aria-selected="true"] { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.tabs button[aria-selected="true"] span { color: var(--on-ink); opacity: .6; }
.lib-q { height: 36px; min-width: 220px; flex: 1 1 220px; max-width: 320px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--input); color: var(--ink); padding: 0 14px; font-size: 13px; outline: 0; }
.lib-q:focus { border-color: var(--ring); }

.grid4.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 22px; }
.mono-v { font-family: var(--font-mono); font-size: 20px; letter-spacing: -.02em; }
.danger { margin-top: 18px; border: 1px solid rgba(242,119,107,.25); border-radius: 14px; padding: 14px 16px; display: grid; gap: 10px; }
.danger p { font-size: 13.5px; color: var(--ink-2); line-height: 1.6; }
.danger p b { color: var(--ink); font-weight: 500; }
.danger-btn { border: 1px solid rgba(242,119,107,.45); color: var(--bad); background: transparent; }
.danger-btn:hover { background: rgba(242,119,107,.08); }

@media (max-width: 820px) {
  .grid4.g3 { grid-template-columns: 1fr; }
  .grid4.g3 > div + div { border-left: 0; border-top: 1px solid var(--line); }
  .lib-q { max-width: none; }
  .composer .bar .hint { display: none; }
}

/* ---------- AI: the recall button and answer, the import box ---------- */
.ask-ai { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; font-size: 12.5px; }
.ai-answer { display: grid; gap: 10px; border-left: 2px solid var(--line-2); padding-left: 14px; }
.ai-answer > p:first-child { color: var(--ink); font-size: 15px; line-height: 1.6; }
.import-box { margin-top: 22px; border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; display: grid; gap: 12px;
  background: linear-gradient(180deg, rgba(22,22,25,.95), rgba(7,7,9,.97)); box-shadow: inset 0 1px 0 rgba(255,255,255,.06); }
.import-head { display: grid; gap: 4px; font-size: 13px; }
.import-head b { font-weight: 500; font-size: 14px; }
#import-body { display: grid; gap: 10px; justify-items: start; font-size: 13.5px; color: var(--ink-2); }
#import-body p b { color: var(--ink); font-weight: 500; }
#import-body .row { display: flex; gap: 8px; flex-wrap: wrap; }
.file-btn { position: relative; cursor: pointer; }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.file-btn:focus-within { box-shadow: 0 0 0 2px var(--ring); }
