/* Palette lifted hex-for-hex from hand-review-platform/anno-platform (the family look), IBM Plex Sans/Mono. */
:root, :root[data-theme="light"] {
  --bg: #f4f3f0; --surface: #ffffff; --surface-2: #f8f7f3; --border: #e6e3dc; --border-2: #d4d2cd;
  --text: #1a1a1a; --text-2: #7a7670; --text-3: #a8a39a; --accent: #1a1a1a; --accent-fg: #ffffff;
  --green: #1a6e3a; --green-bg: rgba(26,110,58,0.10); --red: #c4302b; --red-bg: rgba(196,48,43,0.10);
  --interactive: #2563eb; --interactive-bg: rgba(37,99,235,0.10); --interactive-border: rgba(37,99,235,0.45);
  --amber: #9a6700; --amber-bg: rgba(154,103,0,0.12);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #14130f; --surface: #1f1d18; --surface-2: #25231d; --border: #2e2b24; --border-2: #3a362d;
  --text: #ece9e0; --text-2: #8c8676; --text-3: #5e594d; --accent: #ece9e0; --accent-fg: #14130f;
  --green: #5ec77e; --green-bg: rgba(94,199,126,0.14); --red: #e96a64; --red-bg: rgba(233,106,100,0.14);
  --interactive: #60a5fa; --interactive-bg: rgba(96,165,250,0.12); --interactive-border: rgba(96,165,250,0.45);
  --amber: #e0b04a; --amber-bg: rgba(224,176,74,0.14);
  color-scheme: dark;
}
html, body { margin: 0; padding: 0; }
body { background: var(--bg); color: var(--text); font: 14px/1.5 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, sans-serif; font-variant-numeric: tabular-nums; min-height: 100vh; }
* { box-sizing: border-box; }
a { color: var(--interactive); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--interactive); outline-offset: 1px; }
button { cursor: pointer; font-family: inherit; }
button:disabled { cursor: not-allowed; opacity: 0.6; }
input, select { font-family: inherit; font-size: 14px; color: var(--text); background: var(--surface); border: 1px solid var(--border-2); border-radius: 8px; padding: 8px 10px; min-width: 0; }
h1, h2, h3 { margin: 0; letter-spacing: -0.02em; }
h1 { font-size: 22px; font-weight: 700; }
h2 { font-size: 16px; font-weight: 600; }
h3 { font-size: 14px; font-weight: 600; letter-spacing: -0.01em; }
.mono { font-family: 'IBM Plex Mono', ui-monospace, monospace; }
.muted { color: var(--text-2); }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { border-radius: 4px; background: var(--border-2); }

/* Header: same structure as hand-review's AppShell. */
.app-header { display: flex; align-items: center; gap: 16px; padding: 10px 20px; border-bottom: 1px solid var(--border); background: var(--surface); flex-wrap: wrap; row-gap: 8px; position: sticky; top: 0; z-index: 5; }
.brand { font-weight: 700; font-size: 15px; letter-spacing: -0.01em; color: var(--text); }
.brand:hover { text-decoration: none; }
.app-header nav { display: flex; gap: 4px; }
.app-header nav a { padding: 6px 10px; border-radius: 8px; font-size: 13px; color: var(--text-2); white-space: nowrap; }
.app-header nav a.active { color: var(--interactive); background: var(--interactive-bg); }
.app-header nav a:hover { text-decoration: none; color: var(--text); }
.spacer { flex: 1; }
.email { font-size: 12px; color: var(--text-2); }
.ghost { background: transparent; border: 1px solid var(--border-2); border-radius: 8px; padding: 5px 10px; font-size: 12px; color: var(--text-2); white-space: nowrap; }
.ghost:hover { color: var(--text); }
main { padding: 16px 20px 48px; max-width: 1500px; width: 100%; margin: 0 auto; display: grid; gap: 16px; }

/* Login: same card as hand-review's Login page. */
.login-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.login-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 32px; width: 380px; max-width: 100%; display: flex; flex-direction: column; gap: 10px; }
.login-card h1 { text-align: center; }
.login-card .sub { font-size: 13px; color: var(--text-2); margin: 0 0 8px; text-align: center; }
.login-card #fields { display: flex; flex-direction: column; gap: 10px; }
.login-card input { width: 100%; }
.login-error { padding: 8px 10px; background: var(--red-bg); border-radius: 8px; color: var(--red); font-size: 13px; }
.primary { background: var(--accent); color: var(--accent-fg); border: none; border-radius: 8px; padding: 10px; font-size: 14px; font-weight: 600; }

/* Overview */
.page-head { display: grid; gap: 4px; }
.page-head p { margin: 0; color: var(--text-2); max-width: 90ch; }
.figs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.fig { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; display: grid; gap: 2px; }
.fig b { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }
.fig span { color: var(--text-2); font-size: 12px; }
.bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.bar input { flex: 1 1 240px; }
.bar .count { font: 500 12px 'IBM Plex Mono', ui-monospace, monospace; color: var(--text-2); margin-left: auto; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr)); gap: 12px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; display: grid; grid-template-rows: auto 1fr; color: var(--text); }
.card:hover { border-color: var(--interactive-border); text-decoration: none; }
.thumb { aspect-ratio: 16 / 10; background: #000; display: grid; grid-template-columns: repeat(2, 1fr); grid-template-rows: repeat(2, 1fr); gap: 1px; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb .none { grid-column: 1 / -1; grid-row: 1 / -1; display: grid; place-items: center; color: var(--text-3); font-size: 13px; background: var(--surface-2); }
.card-body { padding: 10px 12px 12px; display: grid; gap: 6px; align-content: start; }
.where { color: var(--text-2); font-size: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font: 500 11px 'IBM Plex Mono', ui-monospace, monospace; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2); white-space: nowrap; }
.chip.meta { background: var(--green-bg); border-color: transparent; color: var(--green); }
.chip.nometa { background: var(--amber-bg); border-color: transparent; color: var(--amber); }
.chip.qa-low { background: var(--red-bg); border-color: transparent; color: var(--red); }

/* Business page */
.crumbs { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 13px; }
.biz-head { display: grid; gap: 12px; }
.biz-head .eyebrow { margin: 0 0 4px; font-size: 12px; color: var(--text-2); }
.biz-head .lede { margin: 4px 0 0; color: var(--text-2); }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 0; }
.stats div { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; }
dt { font-size: 12px; color: var(--text-2); }
dd { margin: 0; font-weight: 600; }
.mix { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 12px; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; }
.mix ul { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 2px; font-size: 13px; }
.mix li { display: flex; justify-content: space-between; gap: 10px; }
.mix li span:last-child { color: var(--text-2); white-space: nowrap; }
.section { display: grid; gap: 10px; }
.section-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: end; }
.note { color: var(--text-2); font-size: 13px; max-width: 90ch; margin: 2px 0 0; }
.clips { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 400px), 1fr)); gap: 12px; }
.clip { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; display: grid; margin: 0; }
.clip video { width: 100%; aspect-ratio: 16 / 10; background: #000; display: block; object-fit: contain; }
.clip .info { padding: 8px 12px 12px; display: grid; gap: 3px; font-size: 13px; }
.clip .info .row { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.clip .tasks { color: var(--text-2); }
.clip .id { font: 400 11px 'IBM Plex Mono', ui-monospace, monospace; color: var(--text-3); word-break: break-all; }
.reel { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 12px; align-items: start; }
.reel video { width: 100%; aspect-ratio: 8 / 5; background: #000; border-radius: 10px; }
.reel ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.reel button { width: 100%; text-align: left; font-size: 13px; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 6px 8px; display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 8px; }
.reel button.on { border-color: var(--interactive-border); background: var(--interactive-bg); }
.reel button b { font: 600 12px 'IBM Plex Mono', ui-monospace, monospace; color: var(--interactive); }
@media (max-width: 760px) { .figs { grid-template-columns: repeat(2, minmax(0, 1fr)); } .reel { grid-template-columns: 1fr; } main { padding: 12px 12px 40px; } .app-header { padding: 10px 12px; } }
