/* GarmentOS — neutral, light-first app shell; editorial client board.
   References: Air / Runway (library), Front / Lemni (inbox), Squarespace (review), ZARA / H&M (client). */

:root {
  --bg: #ffffff;
  --sidebar: #f7f7f5;
  --surface: #ffffff;
  --surface-2: #f4f4f2;
  --tile: #f1f0ed;
  --ink: #18181b;
  --ink-2: #3f3f46;
  --muted: #71717a;
  --faint: #a1a1aa;
  --line: #e8e7e3;
  --line-2: #d6d5d0;
  --primary: #18181b;
  --primary-ink: #ffffff;
  --select: #2563eb;
  --heart: #e0442b;
  --good: #15803d;
  --good-bg: #ecfdf3;
  --warn: #b45309;
  --warn-bg: #fff7ed;
  --info-bg: #eff4ff;
  --radius: 10px;
  --radius-sm: 7px;
  --shadow-pop: 0 1px 2px rgba(0,0,0,.05), 0 12px 32px rgba(0,0,0,.12);
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not(.light) {
    --bg: #111112;
    --sidebar: #18181a;
    --surface: #18181a;
    --surface-2: #222225;
    --tile: #232326;
    --ink: #f4f4f5;
    --ink-2: #d4d4d8;
    --muted: #a1a1aa;
    --faint: #71717a;
    --line: #2a2a2e;
    --line-2: #3a3a3f;
    --primary: #f4f4f5;
    --primary-ink: #111112;
    --select: #60a5fa;
    --good-bg: #0f2a1a;
    --good: #4ade80;
    --warn-bg: #2d1d0b;
    --warn: #fbbf24;
    --info-bg: #172036;
    --shadow-pop: 0 12px 32px rgba(0,0,0,.5);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--ink); font: 14px/1.45 var(--sans); -webkit-font-smoothing: antialiased; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 20px; font-weight: 650; letter-spacing: -.01em; }
h2 { font-size: 16px; font-weight: 650; }
h3 { font-size: 14px; font-weight: 650; }
a { color: inherit; }
code { font: 12px var(--mono); }
svg.i { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.row { display: flex; gap: 8px; align-items: center; }
.grow { flex: 1; min-width: 0; }

input, textarea, select {
  font: inherit; color: inherit; background: var(--surface); border: 1px solid var(--line-2);
  border-radius: var(--radius-sm); padding: 8px 10px; min-width: 0;
}
textarea { resize: vertical; line-height: 1.5; }
input:focus-visible, textarea:focus-visible, select:focus-visible, button:focus-visible { outline: 2px solid var(--select); outline-offset: 1px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; cursor: pointer; white-space: nowrap;
  font: 550 13.5px var(--sans); height: 34px; padding: 0 13px; border-radius: var(--radius-sm);
  border: 1px solid var(--line-2); background: var(--surface); color: var(--ink);
}
.btn:hover { background: var(--surface-2); }
.btn.primary { background: var(--primary); color: var(--primary-ink); border-color: var(--primary); }
.btn.primary:hover { opacity: .88; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--surface-2); }
.btn.sm { height: 28px; padding: 0 10px; font-size: 12.5px; }
.btn.icon { width: 34px; padding: 0; }
.btn:disabled { opacity: .5; cursor: progress; }
.link { background: none; border: 0; color: var(--ink-2); cursor: pointer; font: inherit; padding: 2px 4px; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-2); }
.link:hover { color: var(--ink); text-decoration-color: currentColor; }

.chip { display: inline-flex; gap: 5px; align-items: center; height: 24px; padding: 0 9px; border-radius: 999px; background: var(--surface-2); font-size: 12px; color: var(--ink-2); white-space: nowrap; }
.chip b { font-weight: 500; color: var(--muted); }
.chip.match { background: var(--good-bg); color: var(--good); }
.pill { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 11.5px; font-weight: 600; background: var(--surface-2); color: var(--ink-2); white-space: nowrap; }
.pill.blue { background: var(--info-bg); color: var(--select); }
.pill.green { background: var(--good-bg); color: var(--good); }
.pill.amber { background: var(--warn-bg); color: var(--warn); }
.pill.red { background: #fef2f2; color: #b91c1c; }
.notice { padding: 10px 12px; border-radius: var(--radius-sm); background: var(--warn-bg); color: var(--warn); font-size: 13px; }
.speed { color: var(--good); font-weight: 600; font-variant-numeric: tabular-nums; }

/* ---- app shell ---------------------------------------------------------------- */
.app { display: grid; grid-template-columns: 232px minmax(0, 1fr); height: 100vh; }
.sidebar { background: var(--sidebar); border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 14px 10px; gap: 18px; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 9px; padding: 4px 8px; }
.brand .mark { width: 26px; height: 26px; border-radius: 7px; background: var(--primary); color: var(--primary-ink); display: grid; place-items: center; }
.brand .mark svg { width: 15px; height: 15px; }
.brand b { font-size: 15px; font-weight: 650; letter-spacing: -.01em; }
.nav { display: grid; gap: 1px; }
.nav button { display: flex; align-items: center; gap: 10px; width: 100%; height: 34px; padding: 0 10px; border: 0; border-radius: var(--radius-sm); background: none; color: var(--ink-2); font: 500 13.5px var(--sans); cursor: pointer; text-align: left; }
.nav button:hover { background: var(--surface-2); }
.nav button[aria-current="page"] { background: var(--surface); color: var(--ink); box-shadow: 0 0 0 1px var(--line), 0 1px 2px rgba(0,0,0,.04); }
.nav .count { margin-left: auto; font-size: 12px; color: var(--faint); font-variant-numeric: tabular-nums; }
.nav .count.alert { color: #fff; background: var(--heart); border-radius: 99px; padding: 0 7px; line-height: 18px; font-weight: 600; }
.side-head { font-size: 11.5px; font-weight: 600; color: var(--faint); padding: 0 10px 6px; text-transform: uppercase; letter-spacing: .06em; }
.side-list { display: grid; gap: 1px; }
.side-list button { display: flex; align-items: center; gap: 9px; height: 30px; padding: 0 10px; border: 0; border-radius: var(--radius-sm); background: none; color: var(--ink-2); font: 13px var(--sans); cursor: pointer; text-align: left; overflow: hidden; }
.side-list button span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-list button:hover { background: var(--surface-2); }
.side-list button.on { background: var(--surface-2); color: var(--ink); font-weight: 550; }
.side-foot { margin-top: auto; padding: 10px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); font-size: 12px; color: var(--muted); display: grid; gap: 4px; }
.side-foot .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--good); display: inline-block; margin-right: 6px; }
.side-foot .dot.off { background: var(--faint); }

.main { overflow-y: auto; min-width: 0; }
.view { min-height: 100%; }
.topbar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 12px; padding: 12px 24px; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.topbar h1 { margin-right: 6px; }
.page { padding: 18px 24px 120px; }

/* ---- library -------------------------------------------------------------------- */
.search { flex: 1; max-width: 640px; display: flex; align-items: center; gap: 6px; height: 38px; padding: 0 6px 0 12px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface); }
.search:focus-within { border-color: var(--select); box-shadow: 0 0 0 3px color-mix(in srgb, var(--select) 15%, transparent); }
.search input { border: 0; padding: 0; height: 100%; flex: 1; background: none; outline: none; }
.search svg { color: var(--muted); }
.search .exact { display: inline-flex; gap: 5px; align-items: center; font-size: 12.5px; color: var(--muted); padding: 0 6px; cursor: pointer; white-space: nowrap; }
.search .btn.icon { height: 28px; width: 28px; }
.toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; min-height: 32px; }
.toolbar .meta { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; color: var(--muted); font-size: 13px; margin-right: auto; }
.select-chip { appearance: none; height: 30px; padding: 0 28px 0 11px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' fill='none' stroke='%2371717a' stroke-width='1.6'%3E%3Cpath d='m1 1 4 4 4-4'/%3E%3C/svg%3E") no-repeat right 11px center; font-size: 13px; cursor: pointer; }
.select-chip.on { border-color: var(--ink); color: var(--ink); font-weight: 550; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: 22px 14px; }
.tile { position: relative; cursor: pointer; min-width: 0; }
.tile .ph { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--tile); aspect-ratio: 3 / 4; }
.tile img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .25s ease; }
.tile:hover img { transform: scale(1.025); }
.tile .title { margin-top: 8px; font-size: 13px; font-weight: 550; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile .sub { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.tile .why { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 6px; }
.tile .pick { position: absolute; top: 8px; left: 8px; width: 22px; height: 22px; border-radius: 6px; border: 1.5px solid rgba(255,255,255,.95); background: rgba(0,0,0,.18); display: grid; place-items: center; color: #fff; opacity: 0; transition: opacity .12s; }
.tile .pick svg { width: 14px; height: 14px; stroke-width: 2.6; opacity: 0; }
.tile:hover .pick, .tile.selected .pick, .selecting .tile .pick { opacity: 1; }
.tile.selected .ph { box-shadow: 0 0 0 2.5px var(--select); }
.tile.selected .pick { background: var(--select); border-color: var(--select); }
.tile.selected .pick svg { opacity: 1; }
.tile .tag { position: absolute; top: 8px; right: 8px; font-size: 11px; font-weight: 600; padding: 2px 7px; border-radius: 5px; background: rgba(255,255,255,.92); color: #18181b; }
.tile .tag.concept { background: #18181b; color: #fff; }
.more { text-align: center; margin: 28px 0 0; }

.empty { display: grid; justify-items: center; text-align: center; gap: 10px; padding: 48px 16px; color: var(--muted); }
.empty img { width: min(420px, 100%); aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--radius); margin-bottom: 6px; }
.empty h2 { color: var(--ink); }
.empty p { max-width: 46ch; }

/* upload */
.drop-overlay { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; background: color-mix(in srgb, var(--bg) 80%, transparent); backdrop-filter: blur(4px); }
.drop-overlay div { border: 2px dashed var(--ink); border-radius: 16px; padding: 48px 64px; font-size: 18px; font-weight: 600; background: var(--surface); display: grid; justify-items: center; gap: 10px; }
.drop-overlay svg { width: 28px; height: 28px; }
dialog { border: 1px solid var(--line); border-radius: 14px; padding: 0; width: min(460px, calc(100vw - 32px)); box-shadow: var(--shadow-pop); background: var(--surface); color: var(--ink); }
dialog::backdrop { background: rgba(0,0,0,.3); }
.dialog-body { padding: 20px; display: grid; gap: 12px; }
.dialog-body label { display: grid; gap: 5px; font-size: 12.5px; color: var(--muted); }
.drop-zone { border: 1.5px dashed var(--line-2); border-radius: var(--radius); padding: 26px 16px; text-align: center; color: var(--muted); display: grid; gap: 8px; justify-items: center; cursor: pointer; }
.drop-zone:hover, .drop-zone.drag { border-color: var(--ink); color: var(--ink); background: var(--surface-2); }
.drop-zone svg { width: 22px; height: 22px; }
.dialog-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 20px; border-top: 1px solid var(--line); background: var(--sidebar); border-radius: 0 0 14px 14px; }

.toast { position: fixed; right: 20px; bottom: 20px; z-index: 40; width: 320px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-pop); padding: 12px 14px; display: grid; gap: 8px; font-size: 13px; }
.bar { height: 4px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.bar span { display: block; height: 100%; width: 0; background: var(--ink); transition: width .2s; }

/* selection bar (floating) */
.selbar { position: fixed; left: calc(50% + 116px); bottom: 20px; transform: translateX(-50%); z-index: 30; display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 14px; background: #18181b; color: #fafafa; border-radius: 12px; box-shadow: var(--shadow-pop); max-width: calc(100vw - 280px); }
.selbar .count { font-weight: 600; font-size: 13px; white-space: nowrap; }
.selbar input { background: #27272a; border-color: #3f3f46; color: #fafafa; height: 32px; width: 190px; }
.selbar .btn { background: #27272a; border-color: #3f3f46; color: #fafafa; height: 32px; }
.selbar .btn:hover { background: #3f3f46; }
.selbar .btn.primary { background: #fafafa; color: #18181b; border-color: #fafafa; }
.selbar .out a { color: #93c5fd; font-size: 12.5px; }
.selbar .btn.icon { width: 32px; }

/* inspector (design detail) */
.scrim { position: fixed; inset: 0; background: rgba(0,0,0,.25); z-index: 34; }
.inspector { position: fixed; top: 0; right: 0; bottom: 0; width: min(520px, 100vw); z-index: 35; background: var(--surface); border-left: 1px solid var(--line); box-shadow: var(--shadow-pop); overflow-y: auto; }
.inspector header { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 8px; padding: 10px 12px 10px 18px; border-bottom: 1px solid var(--line); background: var(--surface); }
.inspector .body { padding: 18px; display: grid; gap: 18px; }
.inspector .hero { border-radius: var(--radius); overflow: hidden; background: var(--tile); }
.inspector .hero img { display: block; width: 100%; max-height: 520px; object-fit: contain; }
.props { display: grid; grid-template-columns: 136px 1fr; gap: 6px 12px; align-items: center; font-size: 13px; }
.props > span { color: var(--muted); display: flex; align-items: center; gap: 6px; }
.props select, .props input { height: 32px; padding: 0 8px; width: 100%; }
.src { white-space: nowrap; font-size: 10.5px; font-weight: 600; padding: 1px 6px; border-radius: 5px; background: var(--surface-2); color: var(--muted); }
.src.human, .src.brief { background: var(--good-bg); color: var(--good); }
.src.claude { background: var(--info-bg); color: var(--select); }
.section-title { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 8px; }
.similar-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.similar-grid .tile .title, .similar-grid .tile .sub, .similar-grid .tile .pick { display: none; }

/* ---- inbox (three panes) ------------------------------------------------------- */
.inbox { display: grid; grid-template-columns: 300px minmax(0, 1fr) 280px; height: 100vh; }
.pane { border-right: 1px solid var(--line); overflow-y: auto; min-width: 0; }
.pane:last-child { border-right: 0; }
.pane-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 8px; height: 56px; padding: 0 16px; background: var(--bg); border-bottom: 1px solid var(--line); }
.inq-list { list-style: none; margin: 0; padding: 8px; display: grid; gap: 2px; }
.inq-list li { padding: 10px 10px; border-radius: var(--radius-sm); cursor: pointer; display: grid; gap: 3px; }
.inq-list li:hover { background: var(--surface-2); }
.inq-list li.on { background: var(--surface-2); box-shadow: inset 2px 0 0 var(--ink); }
.inq-list .from { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; font-weight: 600; }
.inq-list .from time { font-weight: 400; color: var(--faint); font-size: 12px; white-space: nowrap; }
.inq-list .subj { font-size: 13px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inq-list .pill { justify-self: start; margin-top: 2px; }
.thread { padding: 20px 24px 40px; display: grid; gap: 18px; align-content: start; }
.mail { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.mail-head { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--surface-2); display: grid; place-items: center; font-weight: 600; font-size: 13px; color: var(--ink-2); flex: none; }
.mail-body { padding: 14px; white-space: pre-wrap; font-size: 13.5px; color: var(--ink-2); max-height: 260px; overflow-y: auto; }
.compose { display: grid; gap: 10px; }
.compose .fields { border: 1px solid var(--line-2); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.compose .fields input, .compose .fields textarea { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; width: 100%; padding: 10px 14px; }
.compose .fields textarea { border-bottom: 0; min-height: 220px; }
.compose .foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.qgroup h3 { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; text-transform: capitalize; }
.qgroup h3 small { font-weight: 400; font-size: 12.5px; color: var(--muted); text-transform: none; }
.qgroup .chips { display: flex; gap: 4px; flex-wrap: wrap; margin: 6px 0 10px; }
.qgroup .grid { grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 14px 10px; }
.qgroup .tile .title { font-size: 12.5px; }
.actionbar { position: sticky; bottom: 0; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 12px 0; background: linear-gradient(transparent, var(--bg) 30%); }
.reply { border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--surface); }
.reply-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; border-bottom: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }
.reply textarea { border: 0; width: 100%; min-height: 150px; border-radius: 0 0 var(--radius) var(--radius); padding: 12px 14px; }
.cmd { display: flex; gap: 6px; align-items: center; background: var(--surface-2); border-radius: var(--radius-sm); padding: 6px 6px 6px 12px; }
.cmd code { flex: 1; overflow-x: auto; white-space: nowrap; }
.details { padding: 16px; display: grid; gap: 18px; align-content: start; }
.details .props { grid-template-columns: 92px 1fr; gap: 9px 10px; }
.details .props b { font-weight: 550; overflow: hidden; text-overflow: ellipsis; }
.conf { display: flex; align-items: center; gap: 8px; }
.conf .bar { flex: 1; }

/* ---- studio --------------------------------------------------------------------- */
.segmented { display: inline-flex; gap: 2px; padding: 3px; background: var(--surface-2); border-radius: 9px; }
.segmented button { height: 28px; padding: 0 12px; border: 0; border-radius: 7px; background: none; font: 550 13px var(--sans); color: var(--muted); cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.segmented button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.segmented .n { font-size: 11.5px; color: var(--faint); font-variant-numeric: tabular-nums; }
.provider { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius); background: var(--sidebar); border: 1px solid var(--line); font-size: 13px; color: var(--ink-2); margin-bottom: 16px; }
.reviews { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.review { display: grid; grid-template-columns: 132px minmax(0, 1fr) auto; gap: 18px; padding: 16px; border-bottom: 1px solid var(--line); align-items: start; background: var(--surface); }
.review:last-child { border-bottom: 0; }
.review .shot { width: 132px; aspect-ratio: 3/4; border-radius: var(--radius-sm); overflow: hidden; background: var(--tile); display: grid; place-items: center; color: var(--muted); font-size: 12px; text-align: center; padding: 0; }
.review .shot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.review .who { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 13px; }
.review .req { font-size: 15px; margin: 6px 0 10px; color: var(--ink); }
.review .refs { display: flex; gap: 6px; align-items: center; font-size: 12px; color: var(--muted); }
.review .refs img { width: 34px; height: 45px; object-fit: cover; border-radius: 5px; background: var(--tile); }
.review .acts { display: grid; gap: 6px; min-width: 120px; }
.review .codex { margin-top: 12px; display: grid; gap: 8px; }
.shimmer { background: linear-gradient(110deg, var(--tile) 30%, var(--surface-2) 50%, var(--tile) 70%); background-size: 300% 100%; animation: shimmer 1.6s linear infinite; }
@keyframes shimmer { to { background-position: -100% 0; } }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 550; font-size: 12px; background: var(--sidebar); }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table-wrap { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; overflow-x: auto; }

/* ---- insights ------------------------------------------------------------------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 18px; }
.stat { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; background: var(--surface); }
.stat .k { font-size: 12.5px; color: var(--muted); }
.stat .v { font-size: 26px; font-weight: 650; letter-spacing: -.02em; margin-top: 4px; font-variant-numeric: tabular-nums; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 16px; }
.card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 16px; }
.card h2 { margin-bottom: 2px; }
.hbar { display: flex; align-items: center; gap: 10px; }
.hbar span { height: 6px; border-radius: 99px; background: var(--ink); display: inline-block; min-width: 2px; }
.gap { color: var(--warn); font-weight: 650; }

/* ---- responsive ----------------------------------------------------------------- */
@media (max-width: 1100px) {
  .inbox { grid-template-columns: 260px minmax(0, 1fr); }
  .inbox .details-pane { display: none; }
}
@media (max-width: 820px) {
  .app { grid-template-columns: 1fr; height: auto; }
  .sidebar { position: sticky; top: 0; z-index: 20; flex-direction: row; align-items: center; padding: 8px 10px; gap: 8px; border-right: 0; border-bottom: 1px solid var(--line); overflow-x: auto; }
  .sidebar .side-section, .sidebar .side-foot, .brand b { display: none; }
  .nav { display: flex; gap: 2px; }
  .nav button { height: 32px; padding: 0 10px; }
  .nav .count:not(.alert) { display: none; }
  .main { overflow: visible; }
  .topbar { flex-wrap: wrap; padding: 10px 14px; top: 49px; }
  .search { order: 3; flex-basis: 100%; max-width: none; }
  .page { padding: 14px 14px 120px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 10px; }
  .inbox { grid-template-columns: 1fr; height: auto; }
  .inbox .pane { border-right: 0; }
  .inbox .list-pane { max-height: 260px; border-bottom: 1px solid var(--line); }
  .thread { padding: 16px 14px 40px; }
  .review { grid-template-columns: 96px minmax(0, 1fr); }
  .review .shot { width: 96px; }
  .review .acts { grid-column: 1 / -1; grid-auto-flow: column; }
  .selbar { left: 50%; max-width: calc(100vw - 20px); flex-wrap: wrap; bottom: 10px; }
  .selbar input { width: 100%; order: 5; }
  .toast { left: 10px; right: 10px; width: auto; }
}

/* ===================================================================================
   Client board — editorial, always light (brand-facing).
   =================================================================================== */
body.client { --bg: #ffffff; --surface: #ffffff; --surface-2: #f6f5f2; --ink: #111111; --ink-2: #333333; --muted: #6b6b6b; --faint: #9a9a9a;
  --line: #e6e6e6; --line-2: #d6d6d6; --tile: #f3f2ef; --primary: #111111; --primary-ink: #ffffff; --select: #2563eb; color-scheme: light; background: #fff; color: #111; padding-bottom: 200px; }
.cl-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px clamp(16px, 4vw, 48px); border-bottom: 1px solid #eee; }
.wordmark { font-size: 15px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; }
.cl-top .for { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: #6b6b6b; }
.cl-hero { padding: clamp(28px, 5vw, 56px) clamp(16px, 4vw, 48px) 8px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: end; }
.cl-hero h1 { font-size: clamp(30px, 5.2vw, 56px); line-height: 1; font-weight: 700; letter-spacing: -.025em; text-transform: uppercase; }
.cl-hero p { margin-top: 14px; color: #555; max-width: 56ch; font-size: 15px; }
.cl-hero .swatch { width: clamp(160px, 22vw, 300px); aspect-ratio: 3/2; object-fit: cover; border-radius: 2px; }
.cl-tabs { position: sticky; top: 0; z-index: 10; display: flex; gap: 26px; padding: 0 clamp(16px, 4vw, 48px); background: #fff; border-bottom: 1px solid #eee; margin-top: 24px; overflow-x: auto; }
.cl-tabs button { height: 48px; border: 0; background: none; font: 600 12.5px var(--sans); letter-spacing: .1em; text-transform: uppercase; color: #8a8a8a; cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; padding: 0; }
.cl-tabs button[aria-selected="true"] { color: #111; border-bottom-color: #111; }
.cl-main { padding: 22px clamp(16px, 4vw, 48px); }
.cl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 34px 18px; }
.prod { position: relative; min-width: 0; }
.prod .ph { position: relative; background: #f3f2ef; aspect-ratio: 3/4; overflow: hidden; }
.prod .ph img { width: 100%; height: 100%; object-fit: cover; display: block; cursor: zoom-in; }
.prod .ph .new { position: absolute; left: 0; top: 12px; background: #111; color: #fff; font-size: 10.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; padding: 4px 8px; }
.prod .ph .new.ok { background: #1f6f43; }
.prod .cap { display: flex; justify-content: space-between; gap: 10px; margin-top: 10px; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }
.prod .cap .t { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prod .cap .c { color: #8a8a8a; white-space: nowrap; }
.prod .attrs { font-size: 12.5px; color: #6b6b6b; margin-top: 3px; }
.prod .req { font-size: 13px; color: #444; margin-top: 8px; font-style: italic; }
.heart { position: absolute; top: 10px; right: 10px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(255,255,255,.9); display: grid; place-items: center; cursor: pointer; color: #111; transition: transform .12s; }
.heart svg { width: 18px; height: 18px; }
.heart:active { transform: scale(.88); }
.heart.on { color: var(--heart); }
.heart.on svg { fill: currentColor; }
.useref { margin-top: 10px; width: 100%; height: 36px; border: 1px solid #111; background: #fff; color: #111; font: 600 11.5px var(--sans); letter-spacing: .1em; text-transform: uppercase; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; justify-content: center; }
.useref:hover { background: #f6f6f6; }
.useref.on { background: #111; color: #fff; }
.useref svg { width: 14px; height: 14px; }
.prod.ref .ph { outline: 2px solid #111; outline-offset: -2px; }
.pending { display: grid; place-items: center; height: 100%; padding: 18px; text-align: center; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: #6b6b6b; }
.pending.failed { color: #b45309; }
.cl-empty { padding: 56px 16px; display: grid; justify-items: center; gap: 12px; text-align: center; color: #6b6b6b; }
.cl-empty img { width: min(460px, 100%); aspect-ratio: 3/2; object-fit: cover; }
.cl-empty h2 { color: #111; font-size: 18px; letter-spacing: .02em; }
.request { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 20; width: min(820px, calc(100vw - 24px)); background: #fff; border: 1px solid #e3e3e3; box-shadow: 0 16px 48px rgba(0,0,0,.14); padding: 14px; display: grid; gap: 10px; }
.request .lbl { font-size: 11.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.request-refs { display: flex; gap: 6px; align-items: center; min-height: 44px; font-size: 13px; color: #6b6b6b; }
.request-refs img { width: 33px; height: 44px; object-fit: cover; background: #f3f2ef; }
.request-row { display: flex; gap: 8px; }
.request-row textarea { flex: 1; border-radius: 0; border-color: #d6d6d6; resize: none; }
.request-row .go { border-radius: 0; height: auto; padding: 0 22px; background: #111; color: #fff; border: 0; font: 700 12px var(--sans); letter-spacing: .12em; text-transform: uppercase; cursor: pointer; }
.request-row .go:disabled { opacity: .4; }
.request .small { color: #8a8a8a; }
.lightbox { position: fixed; inset: 0; background: rgba(255,255,255,.96); z-index: 40; display: grid; place-items: center; padding: 24px; cursor: zoom-out; }
.lightbox img { max-width: 100%; max-height: 100%; }
@media (max-width: 640px) {
  .cl-hero { grid-template-columns: 1fr; }
  .cl-hero .swatch { display: none; }
  .cl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 10px; }
  .prod .cap { flex-direction: column; gap: 2px; }
  .request-row { flex-direction: column; }
  .request-row .go { height: 44px; }
}

/* ---- refinements after browser review ------------------------------------------- */
.details-pane { overflow-x: hidden; }
.details { grid-template-columns: minmax(0, 1fr); }
.details .props { grid-template-columns: 92px minmax(0, 1fr); }
.details .props > * { min-width: 0; }
.details .cmd { min-width: 0; }
.details .cmd code { min-width: 0; text-overflow: ellipsis; overflow: hidden; }
.qgroup h3 { text-transform: none; }
.qgroup h3::first-letter { text-transform: uppercase; }
/* matched designs are included by default: show the check, dim what's been left out */
.qgroup .tile .pick { opacity: 1; }
.qgroup .tile.selected .ph { box-shadow: none; }
.qgroup .tile:not(.selected) img { opacity: .35; filter: grayscale(.6); }
.qgroup .tile:not(.selected) .title, .qgroup .tile:not(.selected) .sub { opacity: .5; }
.actionbar { background: var(--bg); border-top: 1px solid var(--line); margin: 0 -24px; padding: 12px 24px; }
.actionbar #inq-title { flex: 1 1 180px; }

/* client request panel: a pill until the client starts a request */
.req-open { display: none; }
.request.collapsed { width: auto; padding: 0; border: 0; background: none; box-shadow: none; }
.request.collapsed > :not(.req-open) { display: none; }
.request.collapsed .req-open { display: block; height: 46px; padding: 0 26px; border: 0; background: #111; color: #fff; font: 700 12px var(--sans); letter-spacing: .12em; text-transform: uppercase; cursor: pointer; box-shadow: 0 10px 30px rgba(0,0,0,.2); }
.req-close { border: 0; background: none; font-size: 22px; line-height: 1; color: #6b6b6b; cursor: pointer; padding: 0 4px; }
.request.collapsed .req-open { white-space: nowrap; }
.cl-tabs { scrollbar-width: none; }
.cl-tabs::-webkit-scrollbar { display: none; }
@media (max-width: 820px) {
  .sidebar { scrollbar-width: none; }
  .sidebar::-webkit-scrollbar { display: none; }
  .topbar #open-upload { margin-left: auto; }
}

/* ===================================================================================
   Capture screen (/add) — phone-first, for the factory floor: big targets, few words.
   =================================================================================== */
body.capture { --bg: #ffffff; --surface: #ffffff; --surface-2: #f4f4f2; --ink: #111111; --ink-2: #333; --muted: #666; --line: #e6e6e3; --line-2: #d4d4d0;
  --tile: #f1f0ed; color-scheme: light; background: #f7f7f5; color: #111; font-size: 17px; padding-bottom: 120px; max-width: 640px; margin: 0 auto; }
.cap-top { position: sticky; top: 0; z-index: 10; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; height: 56px; padding: 0 14px; background: #fff; border-bottom: 1px solid #e6e6e3; }
.cap-top b { font-size: 17px; }
.cap-back { text-decoration: none; color: #333; font-size: 16px; }
.cap-count { justify-self: end; font-size: 14px; color: #666; }
.cap-step { padding: 18px 16px; display: grid; gap: 12px; }
.cap-hero { text-align: center; padding: 22px 8px 10px; display: grid; justify-items: center; gap: 10px; }
.cap-illus { width: 92px; height: 92px; border-radius: 28px; background: #fff; border: 1px solid #e6e6e3; display: grid; place-items: center; color: #111; }
.cap-illus svg { width: 46px; height: 46px; }
.cap-hero h1 { font-size: 26px; line-height: 1.15; letter-spacing: -.02em; }
.cap-hero p { color: #555; font-size: 16px; max-width: 30ch; }
.big-btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 56px; padding: 0 18px; border-radius: 14px; border: 2px solid #111;
  background: #fff; color: #111; font: 650 18px var(--sans); cursor: pointer; text-align: center; -webkit-tap-highlight-color: transparent; }
.big-btn:active { transform: scale(.985); }
.big-btn.primary { background: #111; color: #fff; }
.big-btn.ghost { border-color: #d4d4d0; }
.big-btn.xl { min-height: 68px; font-size: 20px; border-radius: 18px; }
.big-btn.busy { opacity: .6; pointer-events: none; }
.cap-sticky-fields, .cap-fields { display: grid; gap: 10px; margin-top: 8px; }
.cap-sticky-fields label, .cap-fields label, .gsm { display: grid; gap: 6px; font-size: 14px; color: #555; }
.capture input { height: 52px; font-size: 17px; border-radius: 12px; border: 1.5px solid #d4d4d0; padding: 0 14px; background: #fff; }
.cap-photo { position: relative; border-radius: 18px; overflow: hidden; background: #ebeae6; aspect-ratio: 4 / 3; }
.cap-photo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.cap-reading { position: absolute; inset: auto 12px 12px 12px; padding: 12px; border-radius: 12px; background: rgba(17,17,17,.85); color: #fff; font-weight: 600; text-align: center; }
.cap-dup { background: #fff7ed; color: #9a3412; padding: 12px 14px; border-radius: 12px; font-size: 15px; }
.cap-h { font-size: 19px; margin-top: 14px; }
.cap-sub { color: #666; font-size: 15px; margin-top: -6px; }
.cap-sub.inline { margin: 0; font-weight: 400; }
.cap-sub.center { text-align: center; margin: 2px 0; }
.badge-check { display: inline-block; padding: 1px 8px; border-radius: 6px; background: #fef3c7; color: #92400e; font-weight: 650; font-size: 13px; }
.attr-list { display: grid; background: #fff; border: 1px solid #e6e6e3; border-radius: 16px; overflow: hidden; }
.attr-row { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; min-height: 62px; padding: 8px 14px; border: 0; border-bottom: 1px solid #efefec;
  background: #fff; text-align: left; font: inherit; color: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.attr-row:last-child { border-bottom: 0; }
.attr-row:active { background: #f4f4f2; }
.attr-row.check { background: #fffbeb; }
.attr-row.skeleton { height: 62px; background: linear-gradient(110deg, #f4f4f2 30%, #fff 50%, #f4f4f2 70%); background-size: 300% 100%; animation: shimmer 1.4s linear infinite; }
.attr-label { font-size: 15px; color: #555; text-align: left; justify-self: start; }
.attr-value { font-size: 18px; font-weight: 650; text-align: right; }
.attr-value .muted { font-weight: 400; color: #999; font-size: 16px; }
.attr-badge { font-size: 12.5px; font-weight: 700; padding: 4px 9px; border-radius: 8px; min-width: 52px; text-align: center; }
.attr-badge.ai { background: #eef2ff; color: #3730a3; }
.attr-badge.check { background: #fde68a; color: #78350f; }
.attr-badge.you { background: #dcfce7; color: #166534; }
.attr-badge.empty { background: #f4f4f2; color: #666; }
.fabric-card { background: #fff; border: 1px solid #e6e6e3; border-radius: 16px; padding: 14px; display: grid; gap: 12px; }
.comp-summary { text-align: center; padding: 6px 0 2px; }
.comp-big { font-size: 22px; font-weight: 700; letter-spacing: -.01em; }
.comp-src { color: #166534; font-size: 14px; margin-top: 4px; }
.comp-src .link { font-size: 14px; }
.comp-empty { color: #999; font-size: 16px; }
.opt-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.opt { min-height: 54px; padding: 8px 10px; border-radius: 12px; border: 1.5px solid #d4d4d0; background: #fff; font: 600 16px var(--sans); color: #111; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.opt:active { transform: scale(.98); }
.opt.on { background: #111; color: #fff; border-color: #111; }
.comp-editor { display: grid; gap: 8px; border-top: 1px solid #efefec; padding-top: 12px; }
.fib-row { display: grid; grid-template-columns: minmax(0, 1fr) 48px 60px 14px 48px 30px; gap: 5px; align-items: center; }
.fib-name { font-weight: 650; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fabric-card, .attr-list { min-width: 0; }
.cap-step { min-width: 0; }
.fib-row .step { height: 50px; border-radius: 12px; border: 1.5px solid #d4d4d0; background: #fff; font-size: 26px; line-height: 1; cursor: pointer; color: #111; }
.fib-row .fib-pct { width: 100%; text-align: center; font-weight: 700; padding: 0 4px; }
.pct-sign { color: #666; }
.fib-del { height: 40px; border: 0; background: none; font-size: 24px; color: #999; cursor: pointer; }
.fib-foot { display: flex; gap: 10px; align-items: center; }
.fib-foot .big-btn { width: auto; flex: 1; min-height: 50px; font-size: 16px; }
.fib-total { font-weight: 700; font-size: 16px; white-space: nowrap; }
.fib-total.ok { color: #166534; }
.fib-total.bad { color: #b45309; }
.fib-picker { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.fib-picker .opt { min-height: 48px; font-size: 15px; }
.link.danger { color: #b91c1c; justify-self: center; margin-top: 10px; font-size: 15px; }
.cap-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: linear-gradient(transparent, #f7f7f5 28%); max-width: 640px; margin: 0 auto; }
.sheet-scrim { position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 30; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 31; max-height: 82vh; overflow-y: auto; background: #fff; border-radius: 22px 22px 0 0; padding: 8px 16px calc(16px + env(safe-area-inset-bottom));
  max-width: 640px; margin: 0 auto; box-shadow: 0 -10px 40px rgba(0,0,0,.18); display: grid; gap: 12px; }
.sheet-head { position: sticky; top: 0; display: flex; align-items: center; justify-content: space-between; padding: 10px 0 6px; background: #fff; }
.sheet-head b { font-size: 19px; }
.sheet-x { width: 44px; height: 44px; border: 0; border-radius: 50%; background: #f4f4f2; font-size: 26px; cursor: pointer; color: #333; }
.cap-toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: 100px; z-index: 40; background: #111; color: #fff; padding: 12px 18px; border-radius: 999px; font-weight: 600; font-size: 15px; box-shadow: 0 8px 24px rgba(0,0,0,.25); white-space: nowrap; max-width: calc(100vw - 32px); overflow: hidden; text-overflow: ellipsis; }

/* inspector: composition + multi-select details */
.side-add { width: 100%; height: 38px; }
.comp-box { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; background: var(--sidebar); }
.comp-editor.compact { margin-top: 10px; }
.comp-editor.compact .fib-row { display: grid; grid-template-columns: 1fr 34px 64px 14px 34px 28px; gap: 4px; align-items: center; margin-bottom: 4px; }
.comp-editor.compact .step { height: 32px; border-radius: 7px; border: 1px solid var(--line-2); background: var(--surface); font-size: 18px; cursor: pointer; color: var(--ink); }
.comp-editor.compact .fib-pct { height: 32px; text-align: center; padding: 0 4px; }
.comp-editor.compact .fib-del { border: 0; background: none; font-size: 18px; color: var(--muted); cursor: pointer; }
.comp-editor.compact .fib-foot { display: flex; gap: 8px; align-items: center; margin-top: 4px; }
.comp-editor.compact .big-btn { all: unset; cursor: pointer; font-size: 13px; color: var(--ink-2); text-decoration: underline; }
.comp-editor.compact .fib-total { font-size: 13px; font-weight: 650; }
.comp-editor.compact .fib-total.ok { color: var(--good); }
.comp-editor.compact .fib-total.bad { color: var(--warn); }
.comp-editor.compact .fib-picker { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.comp-editor.compact .fib-picker .opt { height: 28px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); font-size: 12.5px; cursor: pointer; color: var(--ink); }
.chips-edit { display: flex; flex-wrap: wrap; gap: 4px; }
.chip-toggle { height: 26px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); font-size: 12.5px; cursor: pointer; color: var(--ink-2); }
.chip-toggle.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.src.check { background: #fef3c7; color: #92400e; }
.src.label { background: var(--good-bg); color: var(--good); }
.side-add { text-decoration: none; }

/* ===================================================================================
   Accounts, onboarding, home, settings
   =================================================================================== */
.mark-sq { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 7px; background: #111; color: #fff; font-weight: 800; font-size: 14px; margin-right: 9px; }
.auth-brand { display: inline-flex; align-items: center; font-weight: 700; font-size: 16px; text-decoration: none; color: inherit; }
body.auth, body.onb, body.landing, body.platform { --bg: #fff; --surface: #fff; --surface-2: #f4f4f2; --ink: #111; --ink-2: #333; --muted: #666; --line: #e8e7e3; --line-2: #d4d4d0; color-scheme: light; background: #fff; color: #111; }
.auth-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: 100vh; }
.auth-art { background: #f3f2ef; padding: 32px; display: grid; grid-template-rows: auto 1fr auto; gap: 24px; }
.auth-art img { width: 100%; height: 100%; object-fit: cover; border-radius: 14px; min-height: 0; }
.auth-art p { font-size: 18px; max-width: 34ch; color: #333; }
.auth-main { display: grid; place-items: center; padding: 32px 20px; }
.auth-card { width: min(380px, 100%); display: grid; gap: 14px; }
.auth-card h1 { font-size: 28px; letter-spacing: -.02em; }
.auth-card label { display: grid; gap: 6px; font-size: 13px; font-weight: 550; color: #444; }
.auth-card input { height: 44px; font-size: 15px; }
.auth-submit { height: 46px; font-size: 15px; margin-top: 4px; }
.auth-switch { font-size: 14px; color: #666; text-align: center; }
.auth-switch a { color: #111; font-weight: 600; }
.auth-error { color: #b91c1c; font-size: 14px; background: #fef2f2; padding: 10px 12px; border-radius: 8px; }
.invite-note { background: #eff6ff; color: #1e3a8a; padding: 12px 14px; border-radius: 10px; font-size: 14px; }
.invite-note.bad { background: #fef2f2; color: #991b1b; }
.auth-brand.mobile { display: none; }
@media (max-width: 820px) { .auth-split { grid-template-columns: 1fr; } .auth-art { display: none; } .auth-brand.mobile { display: inline-flex; margin-bottom: 8px; } }

.onb-top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 20px; padding: 16px 24px; background: #fff; border-bottom: 1px solid #eee; }
.onb-progress { flex: 1; height: 4px; background: #eee; border-radius: 99px; overflow: hidden; max-width: 420px; }
.onb-progress span { display: block; height: 100%; background: #111; transition: width .25s; }
.onb-main { max-width: 760px; margin: 0 auto; padding: 40px 20px 140px; }
.onb-step { display: grid; gap: 16px; }
.onb-step h1 { font-size: clamp(26px, 4vw, 34px); letter-spacing: -.02em; }
.onb-label { font-weight: 650; margin-top: 10px; }
.onb-field { display: grid; gap: 6px; font-weight: 600; font-size: 14px; max-width: 420px; }
.onb-field input { height: 46px; font-size: 16px; }
.onb-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.onb-card { display: grid; gap: 4px; text-align: left; padding: 16px; border: 1.5px solid #ddd; border-radius: 14px; background: #fff; cursor: pointer; font: inherit; color: inherit; min-height: 84px; align-content: start; }
.onb-cards.compact .onb-card { min-height: 0; }
.onb-card b { font-size: 15.5px; }
.onb-card span { font-size: 13.5px; color: #666; }
.onb-card:hover { border-color: #999; }
.onb-card.on { border-color: #111; box-shadow: inset 0 0 0 1px #111; background: #fafaf9; }
.onb-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.onb-chip { height: 40px; padding: 0 16px; border-radius: 999px; border: 1.5px solid #ddd; background: #fff; font: 550 14.5px var(--sans); cursor: pointer; color: #111; }
.onb-chips.big .onb-chip { height: 48px; padding: 0 18px; font-size: 15.5px; }
.onb-chip.on { background: #111; color: #fff; border-color: #111; }
.onb-foot { position: fixed; left: 0; right: 0; bottom: 0; display: flex; justify-content: flex-end; gap: 10px; padding: 14px 24px; background: #fff; border-top: 1px solid #eee; }
.onb-next { height: 46px; padding: 0 26px; font-size: 15px; }

.user-box { display: flex; align-items: center; gap: 9px; padding: 8px; border-radius: var(--radius); }
.user-box b { font-size: 13px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-box .avatar { width: 30px; height: 30px; font-size: 12px; }
#company-switch { margin: 0 8px; }

.home-sub { margin: -4px 0 16px; }
.home-layout { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; align-items: start; }
.home-span { grid-column: 1 / -1; }
.home-layout .card { display: grid; gap: 10px; align-content: start; }
.home-layout .stats { margin: 0; }
.big-num { font-size: 30px; font-weight: 700; letter-spacing: -.02em; }
.big-num .small { font-weight: 500; letter-spacing: 0; }
.capture-card { grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); align-items: center; gap: 22px !important; }
.capture-card img { width: 100%; aspect-ratio: 3/2; object-fit: cover; border-radius: 10px; }
.btn.lg { height: 44px; padding: 0 18px; font-size: 15px; }
.home-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; }
.home-search { max-width: none; }
.home-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.home-list li { padding: 8px; border-radius: 8px; cursor: pointer; font-size: 13.5px; }
.home-list li:hover { background: var(--surface-2); }
.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 14px; }
.checklist li { display: flex; align-items: center; gap: 10px; }
.checklist .tick { width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--line-2); display: grid; place-items: center; flex: none; }
.checklist .done .tick { background: var(--good); border-color: var(--good); color: #fff; }
.checklist .done .tick svg { width: 12px; height: 12px; stroke-width: 3; }
.checklist .done { color: var(--muted); text-decoration: line-through; }
.checklist a { color: var(--ink); }
@media (max-width: 820px) { .capture-card { grid-template-columns: 1fr; } }

.settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); gap: 16px; align-items: start; }
.settings-grid .card { display: grid; gap: 12px; }
.settings-form { display: grid; gap: 12px; }
.settings-form label { display: grid; gap: 5px; font-size: 13px; color: var(--muted); }
.settings-form .select-chip { width: 100%; border-radius: var(--radius-sm); }
.key-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 12px 0; border-top: 1px solid var(--line); }
.team-table td { vertical-align: top; }
@media (max-width: 820px) { .settings-grid { grid-template-columns: 1fr; } .key-row input { width: 100% !important; } }

/* ===================================================================================
   Landing page
   =================================================================================== */
body.landing { font-size: 16px; }
.ln-nav { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 28px; padding: 14px clamp(16px, 4vw, 56px); background: rgba(255,255,255,.92); backdrop-filter: blur(10px); border-bottom: 1px solid #eee; }
.ln-nav nav { display: flex; gap: 22px; margin-right: auto; }
.ln-nav nav a, .ln-link { color: #444; text-decoration: none; font-size: 14.5px; }
.ln-nav nav a:hover, .ln-link:hover { color: #111; }
.ln-actions { display: flex; gap: 16px; align-items: center; }
.ln-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(24px, 4vw, 64px); align-items: center; padding: clamp(36px, 7vw, 96px) clamp(16px, 4vw, 56px) 40px; max-width: 1360px; margin: 0 auto; }
.ln-eyebrow { font-size: 13px; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; color: #8a5a3b; }
.ln-hero h1 { font-size: clamp(40px, 6vw, 72px); line-height: 1; letter-spacing: -.035em; margin-top: 14px; font-weight: 750; }
.ln-lede { font-size: clamp(17px, 1.6vw, 20px); color: #444; margin-top: 20px; max-width: 34em; line-height: 1.5; }
.ln-cta { display: flex; gap: 10px; margin-top: 28px; flex-wrap: wrap; }
.ln-hero-img { width: 100%; aspect-ratio: 3/2; object-fit: cover; border-radius: 18px; }
.ln-features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; padding: 56px clamp(16px, 4vw, 56px); max-width: 1360px; margin: 0 auto; }
.ln-features img, .ln-board-mock { width: 100%; aspect-ratio: 3/2; object-fit: cover; border-radius: 14px; background: #f3f2ef; }
.ln-features h2 { font-size: 21px; margin-top: 16px; letter-spacing: -.01em; }
.ln-features p { color: #555; margin-top: 8px; line-height: 1.55; }
.ln-board-mock { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; padding: 22px; }
.ln-board-mock span { position: relative; background: #e7e5e0; border-radius: 4px; }
.ln-board-mock span.liked::after { content: "♥"; position: absolute; top: 6px; right: 7px; color: #e0442b; font-size: 15px; }
.ln-factory { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: clamp(24px, 5vw, 80px); align-items: center; margin: 32px clamp(16px, 4vw, 56px); padding: clamp(28px, 5vw, 64px); background: #111; color: #fafafa; border-radius: 24px; }
.ln-factory h2 { font-size: clamp(28px, 3.4vw, 42px); letter-spacing: -.02em; }
.ln-factory ul { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 14px; font-size: 17px; color: #d4d4d8; }
.ln-factory b { color: #fff; }
.ln-phone { background: #fff; color: #111; border-radius: 30px; padding: 22px 16px; display: grid; gap: 0; max-width: 300px; justify-self: center; width: 100%; box-shadow: 0 20px 60px rgba(0,0,0,.4); border: 8px solid #2a2a2a; }
.ln-phone-row { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: center; padding: 13px 4px; border-bottom: 1px solid #eee; font-size: 14px; }
.ln-phone-row span { color: #666; }
.ln-phone-row.check { background: #fffbeb; }
.ln-phone-row i { font-style: normal; font-size: 11px; font-weight: 700; padding: 3px 7px; border-radius: 6px; }
.ln-phone-row .ai { background: #eef2ff; color: #3730a3; }
.ln-phone-row .chk { background: #fde68a; color: #78350f; }
.ln-phone-comp { text-align: center; font-weight: 700; font-size: 17px; padding: 16px 0 6px; display: grid; gap: 3px; }
.ln-phone-comp small { color: #166534; font-weight: 500; font-size: 12px; }
.ln-phone-btn { margin-top: 12px; background: #111; color: #fff; text-align: center; padding: 15px; border-radius: 14px; font-weight: 650; }
.ln-modules { padding: 64px clamp(16px, 4vw, 56px); max-width: 1100px; margin: 0 auto; }
.ln-modules h2 { font-size: clamp(26px, 3vw, 36px); letter-spacing: -.02em; }
.ln-mod-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 24px; }
.ln-mod-cols > div { border: 1px solid #e8e7e3; border-radius: 16px; padding: 22px; }
.ln-mod-cols h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: #666; }
.ln-mod-cols ul { margin: 12px 0 0; padding-left: 18px; display: grid; gap: 8px; font-size: 16px; }
.ln-mod-cols ul.next li::marker { content: "○  "; }
.ln-final { text-align: center; padding: 64px 16px 80px; display: grid; gap: 20px; justify-items: center; }
.ln-final h2 { font-size: clamp(28px, 3.6vw, 44px); letter-spacing: -.02em; }
.ln-foot { display: flex; justify-content: space-between; gap: 16px; padding: 22px clamp(16px, 4vw, 56px); border-top: 1px solid #eee; font-size: 14px; flex-wrap: wrap; }
@media (max-width: 900px) {
  .ln-nav nav { display: none; }
  .ln-nav { justify-content: space-between; }
  .ln-hero, .ln-factory { grid-template-columns: 1fr; }
  .ln-features { grid-template-columns: 1fr; }
  .ln-mod-cols { grid-template-columns: 1fr; }
}
a.btn { text-decoration: none; }
.settings-grid > *, .settings-grid .cmd, .settings-grid .cmd code { min-width: 0; }
