/* Pass the Floor -- Clean Studio.
   A calm, work-focused tool. Neutral surfaces, generous whitespace, and the
   logo colours reserved for meaning: each person in the room owns one colour. */
:root {
  --yellow: #F5B400; --blue: #0A8FE0; --purple: #7B3FF2; --green: #10A26E; --orange: #F2641A; --red: #D93A3A;
  --bg: #F7F7F5;
  --panel: #FFFFFF;
  --text: #16181D;
  --muted: #6B7080;
  --faint: #9EA2AF;
  --line: #E7E7E3;
  --hover: #F1F1EE;
  --accent: var(--purple);
  --code: #F4F4F1;
  --shadow: 0 12px 32px -8px rgba(0,0,0,.18);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0F1013;
  --panel: #17181D;
  --text: #ECECEF;
  --muted: #9A9DAA;
  --faint: #6B6E7A;
  --line: #26272E;
  --hover: #1F2026;
  --accent: #9E74FF;
  --code: #1F2026;
  --shadow: 0 12px 32px -8px rgba(0,0,0,.6);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: "Plus Jakarta Sans", system-ui, sans-serif; color: var(--text); background: var(--bg); font-size: 14.5px; display: flex; flex-direction: column; }
a { color: var(--accent); }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; }
button:disabled { cursor: not-allowed; opacity: .5; }
input, textarea, select { font: inherit; color: inherit; }
code, pre, .mono { font-family: "IBM Plex Mono", ui-monospace, monospace; }
[hidden] { display: none !important; }
.rainbow { height: 4px; background: linear-gradient(90deg, var(--yellow) 0 20%, var(--blue) 20% 40%, var(--purple) 40% 60%, var(--green) 60% 80%, var(--orange) 80%); flex: none; }
.c-yellow { background: var(--yellow); } .c-blue { background: var(--blue); } .c-purple { background: var(--purple); }
.c-green { background: var(--green); } .c-orange { background: var(--orange); } .c-ai { background: var(--text); color: var(--panel) !important; }

/* ---- header ---- */
header { height: 60px; display: flex; align-items: center; gap: 12px; padding: 0 18px; border-bottom: 1px solid var(--line); background: var(--panel); flex: none; position: relative; z-index: 5; }
header .logo-link { display: flex; align-items: center; }
header .logo { height: 54px; }
header .spacer { flex: 1; }
.icon-btn { width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center; color: var(--muted); border: 1px solid var(--line); }
.icon-btn:hover { background: var(--hover); color: var(--text); }
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn .moon { display: none; } :root[data-theme="dark"] .icon-btn .moon { display: block; } :root[data-theme="dark"] .icon-btn .sun { display: none; }
.balance { font-family: "IBM Plex Mono", monospace; font-size: 13px; font-weight: 500; color: var(--text); text-decoration: none; padding: 7px 11px; border-radius: 9px; border: 1px solid var(--line); display: inline-flex; gap: 7px; align-items: center; transition: background .4s; }
.balance:hover { background: var(--hover); }
.balance .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.balance.low .dot { background: var(--red); }
.balance.flash { background: color-mix(in srgb, var(--accent) 16%, transparent); }
.user { position: relative; }
.userbtn { display: flex; align-items: center; gap: 8px; padding: 5px 10px 5px 5px; border-radius: 10px; border: 1px solid var(--line); font-weight: 600; }
.userbtn:hover { background: var(--hover); }
.userbtn .badge { min-width: 18px; height: 18px; border-radius: 9px; background: var(--orange); color: #fff; font-size: 11px; display: grid; place-items: center; padding: 0 5px; }
.av { width: 28px; height: 28px; border-radius: 8px; display: inline-grid; place-items: center; color: #fff; font-weight: 700; font-size: 12px; flex: none; position: relative; }
.av.lg { width: 40px; height: 40px; border-radius: 11px; font-size: 16px; }
.menu { position: absolute; right: 0; top: calc(100% + 6px); width: 220px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 6px; box-shadow: var(--shadow); display: none; z-index: 10; }
.menu.open { display: block; }
.menu a, .menu button { display: flex; width: 100%; gap: 10px; align-items: center; padding: 9px 10px; border-radius: 8px; color: inherit; text-decoration: none; font-weight: 500; text-align: left; }
.menu a:hover, .menu button:hover { background: var(--hover); }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 6px 0; }
.menu .dot { width: 8px; height: 8px; border-radius: 50%; }
.menu .count { margin-left: auto; font-size: 11px; font-weight: 700; color: #fff; background: var(--orange); border-radius: 9px; padding: 1px 7px; }
.login { padding: 8px 16px; border-radius: 9px; background: var(--text); color: var(--panel); font-weight: 700; text-decoration: none; }

/* ---- buttons & inputs ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 8px 14px; border-radius: 9px; border: 1px solid var(--line); font-weight: 600; font-size: 13.5px; background: var(--panel); color: var(--text); text-decoration: none; white-space: nowrap; }
.btn:hover:not(:disabled) { background: var(--hover); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover:not(:disabled) { background: color-mix(in srgb, var(--accent) 88%, #000); }
.btn.dark { background: var(--text); border-color: var(--text); color: var(--panel); }
.btn.danger { color: var(--red); }
.btn.danger.solid { background: var(--red); border-color: var(--red); color: #fff; }
.btn.small { padding: 5px 10px; font-size: 12.5px; border-radius: 7px; }
.input { width: 100%; padding: 9px 12px; border-radius: 9px; border: 1px solid var(--line); background: var(--panel); outline: 0; }
.input:focus { border-color: var(--accent); }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-weight: 600; font-size: 13px; }
.hint { font-size: 12.5px; color: var(--muted); }
.hint.ok { color: var(--green); } .hint.bad { color: var(--red); }
.row { display: flex; gap: 8px; align-items: center; }
.row .grow { flex: 1; }

/* ---- chat layout ---- */
.app { flex: 1; display: grid; grid-template-columns: 250px 1fr 260px; min-height: 0; }
.app.no-right { grid-template-columns: 250px 1fr; }
.side { background: var(--panel); border-right: 1px solid var(--line); padding: 14px 10px; overflow: auto; }
.side.right { border-right: 0; border-left: 1px solid var(--line); padding: 16px; }
.new { width: 100%; display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 10px; background: var(--text); color: var(--panel); font-weight: 600; text-decoration: none; }
.label { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); margin: 20px 10px 6px; }
.conv { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--muted); font-weight: 500; white-space: nowrap; overflow: hidden; text-decoration: none; }
.conv span.t { overflow: hidden; text-overflow: ellipsis; }
.conv:hover { background: var(--hover); color: var(--text); }
.conv.active { background: var(--hover); color: var(--text); font-weight: 600; }
.conv .k { font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 5px; background: color-mix(in srgb, var(--purple) 14%, transparent); color: var(--accent); margin-left: auto; flex: none; }
.side .empty { color: var(--faint); font-size: 13px; padding: 8px 10px; }

.center { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.topic { display: flex; align-items: center; gap: 10px; padding: 14px 28px; border-bottom: 1px solid var(--line); min-height: 57px; }
.topic h1 { font-size: 16px; margin: 0; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topic .spacer { flex: 1; }
.tbtn { padding: 6px 10px; border-radius: 8px; border: 1px solid var(--line); color: var(--muted); font-size: 13px; font-weight: 500; text-decoration: none; white-space: nowrap; }
.tbtn:hover { background: var(--hover); color: var(--text); }

.canvas { flex: 1; overflow: auto; }
.thread { max-width: 780px; margin: 0 auto; padding: 26px 28px 40px; display: flex; flex-direction: column; gap: 28px; }
.hero { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 40px 20px; text-align: center; }
.hero h2 { font-size: 30px; font-weight: 800; margin: 0; letter-spacing: -.02em; }
.hero p { color: var(--muted); margin: 0; }
.hero .chips { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 12px; }
.hero .chip { padding: 7px 12px; border-radius: 99px; border: 1px solid var(--line); background: var(--panel); color: var(--muted); font-size: 13px; }
.hero .chip:hover { color: var(--text); border-color: var(--accent); }

.m { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 14px; }
.m .who { font-weight: 700; display: flex; align-items: baseline; gap: 8px; margin-bottom: 3px; }
.m .who small { color: var(--faint); font-weight: 500; font-size: 12px; }
.m .text { line-height: 1.65; overflow-wrap: anywhere; }
.m.human .text { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; display: inline-block; max-width: 100%; }
.m.human .text > :first-child { margin-top: 0; } .m.human .text > :last-child { margin-bottom: 0; }
.m.human .acts { opacity: 0; transition: opacity .15s; margin-top: 2px; margin-bottom: -14px; }
.m.human:hover .acts { opacity: 1; }
.m.hidden-for-regen { opacity: .35; }

.ai .body { border-left: 2px solid var(--accent); padding-left: 16px; line-height: 1.65; overflow-wrap: anywhere; min-height: 24px; }
.ai .row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.ai .row .spacer { flex: 1; }
.trace { font-size: 12px; color: var(--muted); padding: 3px 8px; border-radius: 6px; border: 1px solid var(--line); display: inline-flex; gap: 6px; align-items: center; }
.trace:hover { color: var(--text); background: var(--hover); }
.trace.on { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.tracebox { font-size: 13px; color: var(--muted); background: var(--code); border-radius: 10px; padding: 10px 14px; margin-bottom: 10px; max-height: 360px; overflow: auto; line-height: 1.55; }
.tracebox > :first-child { margin-top: 0; } .tracebox > :last-child { margin-bottom: 0; }
.thinking { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; font-weight: 500; }
.thinking .dots { display: inline-flex; gap: 3px; }
.thinking .dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); animation: bounce 1.2s infinite ease-in-out; }
.thinking .dots i:nth-child(2) { animation-delay: .15s; background: var(--blue); }
.thinking .dots i:nth-child(3) { animation-delay: .3s; background: var(--green); }
@keyframes bounce { 0%, 80%, 100% { transform: scale(.5); opacity: .4; } 40% { transform: scale(1); opacity: 1; } }

.body table, .text table { width: 100%; border-collapse: separate; border-spacing: 0; margin: 12px 0; font-size: 13.5px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; display: block; overflow-x: auto; }
.body th, .text th { text-align: left; font-weight: 600; color: var(--muted); background: var(--hover); }
.body th, .body td, .text th, .text td { padding: 9px 12px; border-bottom: 1px solid var(--line); }
.body tr:last-child td, .text tr:last-child td { border-bottom: 0; }
.body p { margin: 8px 0; }
.body h1, .body h2, .body h3, .body h4 { margin: 18px 0 8px; line-height: 1.3; }
.body h1 { font-size: 20px; } .body h2 { font-size: 18px; } .body h3 { font-size: 16px; }
.body blockquote { margin: 10px 0; padding: 2px 14px; border-left: 3px solid var(--line); color: var(--muted); }
.body hr { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }
.body img, .text img { max-width: 100%; border-radius: 8px; }
:not(pre) > code { font-size: .9em; background: var(--code); padding: 1px 5px; border-radius: 5px; }
.codeblock { position: relative; margin: 10px 0; }
.codeblock pre { margin: 0; background: var(--code); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; overflow: auto; font-size: 13px; line-height: 1.5; }
.codeblock pre code.hljs { background: transparent; padding: 0; }
.codeblock .lang { position: absolute; top: 6px; right: 8px; display: flex; gap: 6px; align-items: center; font-size: 11px; color: var(--faint); }
.codeblock .lang button { font-size: 11px; padding: 2px 7px; border-radius: 5px; border: 1px solid var(--line); background: var(--panel); color: var(--muted); }
.svgfig { margin: 10px 0; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); text-align: center; }
.svgfig svg { max-width: 100%; height: auto; }
.katex-display { overflow-x: auto; overflow-y: hidden; padding: 4px 0; }
.math-error { color: var(--red); font-family: "IBM Plex Mono", monospace; font-size: 12.5px; }

.acts { display: flex; gap: 2px; margin-top: 8px; align-items: center; flex-wrap: wrap; }
.act { padding: 5px 8px; border-radius: 6px; color: var(--faint); font-size: 12.5px; font-weight: 500; display: inline-flex; gap: 5px; align-items: center; }
.act:hover { background: var(--hover); color: var(--text); }
.acts .spacer { flex: 1; }
.acts .cost { font-size: 12px; color: var(--faint); font-family: "IBM Plex Mono", monospace; }
.edited { font-size: 11.5px; color: var(--faint); font-style: italic; }

.steps { border: 1px solid var(--line); border-radius: 10px; background: var(--panel); padding: 6px; margin-bottom: 10px; }
.step { display: flex; align-items: center; gap: 10px; padding: 6px 8px; font-size: 13px; color: var(--muted); }
.step .st { width: 16px; height: 16px; border-radius: 50%; display: grid; place-items: center; font-size: 10px; flex: none; }
.step.done .st { background: color-mix(in srgb, var(--green) 18%, transparent); color: var(--green); }
.step.failed .st { background: color-mix(in srgb, var(--red) 18%, transparent); color: var(--red); }
.step.running { color: var(--text); font-weight: 500; }
.step.running .st { border: 2px solid var(--line); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.caret { display: inline-block; width: 7px; height: 16px; background: var(--accent); vertical-align: -3px; animation: blink 1s steps(2) infinite; border-radius: 1px; margin-left: 2px; }
@keyframes blink { 50% { opacity: 0; } }
.gen-error { color: var(--red); font-size: 13px; margin-top: 8px; }

.files { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.file { display: inline-flex; align-items: center; gap: 7px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel); font-size: 12.5px; color: var(--text); text-decoration: none; max-width: 260px; }
.file span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file:hover { border-color: var(--accent); }
.file small { color: var(--faint); }
.shot { display: block; max-width: min(100%, 520px); border: 1px solid var(--line); border-radius: 10px; margin-top: 8px; background: repeating-conic-gradient(var(--hover) 0 25%, transparent 0 50%) 50% / 16px 16px; }

.editbox textarea { width: 100%; min-height: 120px; border: 1px solid var(--accent); border-radius: 10px; padding: 10px 12px; background: var(--panel); resize: vertical; outline: 0; font: 14px/1.55 "IBM Plex Mono", monospace; }
.editbox .row { margin-top: 8px; }
.editbox .lbl { font-size: 12px; font-weight: 600; color: var(--muted); margin: 8px 0 4px; }

.compose-wrap { padding: 0 28px 16px; }
.compose { max-width: 780px; margin: 0 auto; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 4px 24px -12px rgba(0,0,0,.15); }
.compose:focus-within { border-color: var(--accent); }
.compose.drag { border-color: var(--accent); border-style: dashed; }
.compose textarea { width: 100%; border: 0; outline: 0; resize: none; background: transparent; color: inherit; font: 15px "Plus Jakarta Sans", sans-serif; padding: 14px 16px 6px; min-height: 58px; max-height: 280px; display: block; }
.pending { display: flex; gap: 6px; flex-wrap: wrap; padding: 4px 12px 0; }
.pending .file button { color: var(--faint); font-size: 14px; line-height: 1; padding: 0 2px; }
.cbar { display: flex; align-items: center; gap: 6px; padding: 8px 10px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.cbar .spacer { flex: 1; }
.sel { display: inline-flex; align-items: center; gap: 7px; padding: 6px 10px; border-radius: 8px; border: 1px solid var(--line); font-size: 13px; font-weight: 600; max-width: 260px; }
.sel > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sel:hover { background: var(--hover); }
.sel .d { width: 8px; height: 8px; border-radius: 50%; background: var(--orange); flex: none; }
.send { padding: 7px 14px; border-radius: 8px; background: var(--accent); color: #fff; font-weight: 600; font-size: 13px; }
.send.alt { background: var(--text); color: var(--panel); }
.send.stop { background: var(--red); }
.pricebar { max-width: 780px; margin: 8px auto 0; display: flex; gap: 18px; font-size: 12px; color: var(--faint); font-family: "IBM Plex Mono", monospace; flex-wrap: wrap; }
.pricebar b { color: var(--muted); font-weight: 500; }
.pricebar .who { margin-left: auto; font-family: "Plus Jakarta Sans", sans-serif; }

.dropdown { position: relative; }
.dropdown .panel { position: absolute; bottom: calc(100% + 6px); left: 0; min-width: 300px; max-height: 360px; overflow: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 6px; box-shadow: var(--shadow); z-index: 20; }
.dropdown .panel.right { left: auto; right: 0; min-width: 180px; }
.dropdown .panel input { margin-bottom: 6px; }
.opt { display: flex; width: 100%; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; text-align: left; }
.opt:hover, .opt.focus { background: var(--hover); }
.opt.on { color: var(--accent); font-weight: 600; }
.opt small { margin-left: auto; color: var(--faint); font-size: 11.5px; font-family: "IBM Plex Mono", monospace; }
.opt .prov { color: var(--faint); font-size: 12px; }

.right h2 { font-size: 13px; font-weight: 700; margin: 0 0 12px; display: flex; justify-content: space-between; align-items: center; }
.right h2 span { color: var(--faint); font-weight: 500; }
.person { display: flex; align-items: center; gap: 10px; padding: 7px 0; }
.person .n { font-weight: 600; line-height: 1.2; }
.person .u { font-size: 12px; color: var(--faint); }
.person .s { margin-left: auto; font-size: 11px; color: var(--faint); display: flex; gap: 6px; align-items: center; }
.person .s button { color: var(--faint); font-size: 15px; padding: 0 4px; border-radius: 5px; }
.person .s button:hover { color: var(--red); background: var(--hover); }
.person.dim { opacity: .55; }
.online::after { content: ""; position: absolute; right: -2px; bottom: -2px; width: 9px; height: 9px; border-radius: 50%; background: var(--green); border: 2px solid var(--panel); }
.invite { width: 100%; margin-top: 10px; padding: 8px; border-radius: 9px; border: 1px dashed var(--faint); color: var(--muted); font-weight: 600; }
.invite:hover { border-color: var(--accent); color: var(--accent); }
.kv { display: grid; grid-template-columns: 1fr auto; gap: 8px; font-size: 13px; margin-top: 8px; }
.kv > span:nth-child(odd) { color: var(--muted); }
.kv > span:nth-child(even) { font-family: "IBM Plex Mono", monospace; font-size: 12.5px; }
.mini { display: flex; gap: 6px; margin-top: 8px; }
.mini .input { padding: 6px 9px; font-size: 13px; }

/* ---- modal & toast ---- */
.modal-back { position: fixed; inset: 0; background: rgba(10,10,14,.45); display: grid; place-items: center; z-index: 50; padding: 20px; }
.modal { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; width: min(480px, 100%); padding: 22px; box-shadow: var(--shadow); max-height: 90vh; overflow: auto; }
.modal h3 { margin: 0 0 6px; font-size: 18px; }
.modal p { color: var(--muted); margin: 0 0 14px; line-height: 1.5; }
.modal .actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.modal .warn { background: color-mix(in srgb, var(--red) 10%, transparent); color: var(--red); border-radius: 10px; padding: 10px 12px; font-weight: 600; font-size: 13px; margin-bottom: 14px; }
.radio { display: flex; gap: 10px; align-items: flex-start; padding: 10px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 8px; cursor: pointer; }
.radio:has(input:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 6%, transparent); }
.radio b { display: block; font-size: 13.5px; } .radio span { font-size: 12.5px; color: var(--muted); }
#toasts { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 60; align-items: center; pointer-events: none; }
.toast { background: var(--text); color: var(--panel); padding: 10px 16px; border-radius: 10px; font-weight: 600; font-size: 13.5px; box-shadow: var(--shadow); max-width: 520px; animation: rise .2s ease-out; }
.toast.bad { background: var(--red); color: #fff; }
@keyframes rise { from { transform: translateY(8px); opacity: 0; } }

/* ---- menu pages ---- */
.pagewrap { flex: 1; overflow: auto; scrollbar-gutter: stable; }
.pagegrid { max-width: 1120px; margin: 0 auto; padding: 28px; display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 28px; align-items: start; }
.pagenav { position: sticky; top: 0; display: flex; flex-direction: column; gap: 2px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 8px; }
.pagenav a { display: flex; gap: 10px; align-items: center; padding: 9px 10px; border-radius: 8px; color: var(--muted); text-decoration: none; font-weight: 500; }
.pagenav a:hover { background: var(--hover); color: var(--text); }
.pagenav a.active { background: var(--hover); color: var(--text); font-weight: 700; }
.pagenav .dot { width: 8px; height: 8px; border-radius: 50%; }
.pagenav hr { border: 0; border-top: 1px solid var(--line); margin: 6px 0; width: 100%; }
.pagehead h1 { font-size: 24px; margin: 0 0 4px; letter-spacing: -.01em; }
.pagehead p { margin: 0 0 20px; color: var(--muted); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 20px; margin-bottom: 18px; }
.card h2 { font-size: 15px; margin: 0 0 4px; display: flex; align-items: center; gap: 8px; }
.card h2 .n { font-size: 12px; color: var(--faint); font-weight: 600; }
.card > p.sub { color: var(--muted); margin: 0 0 14px; font-size: 13.5px; }
.card.danger { border-color: color-mix(in srgb, var(--red) 35%, var(--line)); }
.list { display: flex; flex-direction: column; }
.list .item { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.list .item:first-child { border-top: 0; }
.list .item .who { flex: 1; min-width: 0; }
.list .item .who b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list .item .who small { color: var(--faint); }
.list .item a.title { color: var(--text); text-decoration: none; font-weight: 600; }
.list .item a.title:hover { color: var(--accent); }
.list .empty { color: var(--faint); font-size: 13.5px; padding: 6px 0; }
details.more summary { cursor: pointer; color: var(--muted); font-weight: 600; font-size: 13px; margin-top: 10px; }
table.grid { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.grid th { text-align: left; font-weight: 600; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; padding: 8px 10px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--panel); }
table.grid td { padding: 9px 10px; border-bottom: 1px solid var(--line); }
table.grid tr:last-child td { border-bottom: 0; }
table.grid th.num { text-align: right; }
table.grid td.num { text-align: right; font-family: "IBM Plex Mono", monospace; font-size: 12.5px; }
table.grid tr:hover td { background: var(--hover); }
.plus { color: var(--green); } .minus { color: var(--text); }
.pill { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: var(--hover); color: var(--muted); }
.pill.ok { background: color-mix(in srgb, var(--green) 16%, transparent); color: var(--green); }
.pill.bad { background: color-mix(in srgb, var(--red) 14%, transparent); color: var(--red); }
.pill.wait { background: color-mix(in srgb, var(--yellow) 22%, transparent); color: color-mix(in srgb, var(--yellow) 60%, var(--text)); }
.checkbox { width: 17px; height: 17px; accent-color: var(--accent); cursor: pointer; }
.toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; }
.money-in { font: 600 34px "IBM Plex Mono", monospace; text-align: right; padding: 14px 16px; letter-spacing: -.02em; }
.money-out { font: 600 22px "IBM Plex Mono", monospace; text-align: right; padding: 12px 16px; background: var(--hover); color: var(--muted); border-color: transparent; }
.big-status { text-align: center; padding: 30px 20px; }
.big-status .icon { font-size: 44px; }
.big-status h2 { font-size: 22px; justify-content: center; margin: 10px 0 6px; }

/* ---- landing & documents ---- */
.landing { flex: 1; overflow: auto; }
.landing .heroL { max-width: 1040px; margin: 0 auto; padding: 56px 28px 28px; display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; }
.landing h1 { font-size: 46px; line-height: 1.08; letter-spacing: -.03em; margin: 0 0 16px; font-weight: 800; }
.landing h1 em { font-style: normal; background: linear-gradient(90deg, var(--yellow), var(--orange), var(--purple), var(--blue)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.landing .lead { font-size: 17px; color: var(--muted); line-height: 1.6; margin: 0 0 26px; max-width: 520px; }
.landing .cta { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.landing .signin-note { margin: 10px 0 0; max-width: 460px; }
.gbtn { display: inline-flex; align-items: center; gap: 10px; padding: 12px 20px; border-radius: 11px; background: var(--text); color: var(--panel); font-weight: 700; text-decoration: none; font-size: 15px; }
.gbtn svg { width: 18px; height: 18px; }
.landing .art { justify-self: center; width: 100%; max-width: 380px; }
.feats { max-width: 1040px; margin: 0 auto; padding: 12px 28px 50px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feat { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 20px; }
.feat .ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: #fff; font-weight: 800; margin-bottom: 12px; }
.feat h3 { margin: 0 0 6px; font-size: 15px; }
.feat p { margin: 0; color: var(--muted); line-height: 1.55; font-size: 13.5px; }
.doc { max-width: 760px; margin: 0 auto; padding: 36px 28px 60px; line-height: 1.7; }
.doc h1 { font-size: 28px; margin: 0 0 6px; }
.doc h2 { font-size: 17px; margin: 26px 0 6px; }
.doc .meta { color: var(--faint); font-size: 13px; }
.welcome { max-width: 460px; margin: 60px auto; padding: 0 20px; }

footer { display: flex; gap: 20px; justify-content: center; padding: 10px; font-size: 12px; border-top: 1px solid var(--line); background: var(--panel); flex: none; }
footer a { color: var(--faint); text-decoration: none; }
footer a:hover { color: var(--text); }

@media (max-width: 1100px) { .app { grid-template-columns: 220px 1fr; } .app .side.right { display: none; } }
@media (max-width: 760px) {
  .app, .app.no-right { grid-template-columns: 1fr; } .app .side { display: none; }
  .pagegrid { grid-template-columns: 1fr; padding: 16px; } .pagenav { position: static; flex-direction: row; overflow-x: auto; }
  .landing .heroL { grid-template-columns: 1fr; } .feats { grid-template-columns: 1fr; }
  .thread, .compose-wrap, .topic { padding-left: 16px; padding-right: 16px; }
  header .logo { height: 40px; }
}
