/* Hybrid Creative Systems Portal
   Design language: functional product design of the late 1950s —
   warm white housings, charcoal type, a single orange signal, grille dots, dial scales.
   "Less, but better." */

:root {
  --paper: #EFECE5;
  --housing: #F8F6F1;
  --panel-quiet: #E9E6DE;
  --line: #D8D3C8;
  --line-strong: #BCB6A9;
  --ink: #1F1E1B;
  --ink-2: #55524B;
  --ink-3: #8B877D;
  --charcoal: #2A2926;
  --key: #E4E0D6;
  --key-hi: #EEEBE3;
  --orange: #E0561C;
  --orange-ink: #B8420F;
  --green: #4C8A3C;
  --amber: #D9A21B;
  --font: "Helvetica Neue", Helvetica, "Akzidenz-Grotesk", "Nimbus Sans", Arial, sans-serif;
  --mono: "SF Mono", "Menlo", "IBM Plex Mono", ui-monospace, monospace;
  --r: 6px;
  --r-lg: 14px;
  --shadow: 0 1px 0 rgba(255,255,255,.8) inset, 0 1px 2px rgba(40,36,28,.06), 0 8px 24px -12px rgba(40,36,28,.12);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--paper); color: var(--ink);
  font: 400 15px/1.5 var(--font); letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased; font-feature-settings: "tnum" 1;
}
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--orange-ink); }
h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -0.02em; }
p { margin: 0; }
img { max-width: 100%; }
::selection { background: var(--orange); color: #fff; }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }

.wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding: 32px 32px 64px; flex: 1; }
.muted { color: var(--ink-3); }
.nowrap { white-space: nowrap; }
.small { font-size: 13px; }
.mono { font-family: var(--mono); font-size: 12px; letter-spacing: .02em; color: var(--ink-3); }
.eyebrow { font-size: 12px; color: var(--ink-3); letter-spacing: .04em; margin-bottom: 8px; }
.eyebrow a { text-decoration: none; }
.eyebrow a:hover { text-decoration: underline; }
.lede { color: var(--ink-2); font-size: 16px; margin-top: 8px; max-width: 60ch; }
.lbl { display: block; font-size: 11px; color: var(--ink-3); text-transform: capitalize; letter-spacing: .05em; }

/* ── wordmark ───────────────────────────── */
.wordmark { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.wm-dot { width: 22px; height: 22px; border-radius: 50%; background: var(--charcoal); position: relative; flex: none; }
.wm-dot::after { content: ""; position: absolute; width: 8px; height: 8px; border-radius: 50%; background: var(--orange); top: 7px; left: 7px; }
.wm-text { display: flex; flex-direction: column; line-height: 1.1; }
.wm-text b { font-size: 14px; letter-spacing: -0.01em; }
.wm-text span { font-size: 11px; color: var(--ink-3); text-transform: capitalize; letter-spacing: .08em; }
.wordmark-lg .wm-dot { width: 36px; height: 36px; }
.wordmark-lg .wm-dot::after { width: 12px; height: 12px; top: 12px; left: 12px; }
.wordmark-lg .wm-text b { font-size: 20px; }
.wordmark-lg .wm-text span { font-size: 13px; }

/* ── top bar ───────────────────────────── */
.topbar { background: var(--housing); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.topbar-in { max-width: 1240px; margin: 0 auto; padding: 0 32px; height: 68px; display: flex; align-items: center; gap: 40px; }
.home-link { text-decoration: none; }
.home-link:hover { color: inherit; }
.nav { display: flex; gap: 4px; flex: 1; }
.nav a { text-decoration: none; font-size: 14px; color: var(--ink-2); padding: 8px 14px; border-radius: 20px; position: relative; }
.nav a:hover { color: var(--ink); background: var(--key-hi); }
.nav a.is-active { color: var(--ink); font-weight: 600; }
.nav a.is-active::before { content: ""; position: absolute; left: 50%; bottom: -2px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--orange); }
.userbox { display: flex; align-items: center; gap: 14px; }
.who { display: flex; flex-direction: column; text-align: right; line-height: 1.2; font-size: 13px; }
.who small { color: var(--ink-3); font-size: 11px; text-transform: capitalize; letter-spacing: .05em; }

/* ── footer ───────────────────────────── */
.foot { border-top: 1px solid var(--line); background: var(--housing); }
.foot-in { max-width: 1240px; margin: 0 auto; padding: 18px 32px; display: flex; align-items: center; gap: 24px; font-size: 12px; color: var(--ink-3); }
.grille-strip { flex: 1; height: 8px; background-image: radial-gradient(circle, var(--line-strong) 1.3px, transparent 1.7px); background-size: 8px 8px; }

/* ── grille ───────────────────────────── */
.grille { background-image: radial-gradient(circle, var(--charcoal) 1.6px, transparent 2px); background-size: 9px 9px; }
.grille-lg { background-size: 12px 12px; background-image: radial-gradient(circle, var(--charcoal) 2.2px, transparent 2.7px); }
.grille-md { width: 120px; height: 120px; border-radius: 50%; margin: 0 auto 24px; opacity: .85; }

/* ── buttons & keys ───────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 40px; padding: 0 18px; border-radius: var(--r);
  font: 500 14px/1 var(--font); color: var(--ink); text-decoration: none; cursor: pointer;
  background: linear-gradient(var(--key-hi), var(--key));
  border: 1px solid var(--line-strong);
  box-shadow: 0 1px 0 rgba(255,255,255,.9) inset, 0 2px 0 rgba(40,36,28,.08);
  transition: transform .06s ease, box-shadow .06s ease, background .15s;
  white-space: nowrap;
}
.btn:hover { color: var(--ink); background: var(--key-hi); }
.btn:active { transform: translateY(1px); box-shadow: 0 1px 0 rgba(255,255,255,.6) inset; }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; }
.btn-block { width: 100%; }
.btn-dark { background: var(--charcoal); color: #F4F1EA; border-color: #121110; box-shadow: 0 1px 0 rgba(255,255,255,.12) inset, 0 2px 0 rgba(0,0,0,.25); }
.btn-dark:hover { background: #3A3935; color: #fff; }
.btn-orange { background: var(--orange); border-color: var(--orange-ink); color: #fff; box-shadow: 0 1px 0 rgba(255,255,255,.25) inset, 0 2px 0 rgba(120,40,0,.25); }
.btn-orange:hover { background: #EA6428; color: #fff; }
.btn-ghost { background: transparent; border-color: transparent; box-shadow: none; color: var(--ink-3); }
.btn-ghost:hover { background: var(--key); color: var(--ink); }
.key-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 2px rgba(224,86,28,.2); }
.link-btn { background: none; border: 0; padding: 0; font: inherit; font-size: 13px; color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-strong); cursor: pointer; }
.link-btn:hover { color: var(--orange-ink); text-decoration-color: currentColor; }

/* ── lamps (status indicators) ───────────────────────────── */
.lamp { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--ink-2); white-space: nowrap; }
.lamp i, .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--line-strong); box-shadow: inset 0 -1px 1px rgba(0,0,0,.15); flex: none; display: inline-block; }
.lamp-ok i, .dot-ok { background: var(--green); box-shadow: 0 0 0 3px rgba(76,138,60,.16), inset 0 -1px 1px rgba(0,0,0,.2); }
.lamp-on i { background: var(--green); }
.lamp-wait i, .dot-wait { background: var(--amber); box-shadow: 0 0 0 3px rgba(217,162,27,.18), inset 0 -1px 1px rgba(0,0,0,.2); }
.lamp-alert i, .dot-alert { background: var(--orange); box-shadow: 0 0 0 3px rgba(224,86,28,.18), inset 0 -1px 1px rgba(0,0,0,.2); }
.lamp-done i { background: var(--charcoal); }
.counts { display: flex; gap: 14px; }
.badge { display: inline-block; font-size: 11px; padding: 2px 8px; border-radius: 10px; background: var(--key); color: var(--ink-2); font-weight: 600; }
.badge-orange { background: var(--orange); color: #fff; }

/* ── panels ───────────────────────────── */
.panel { background: var(--housing); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 24px; box-shadow: var(--shadow); }
.panel-quiet { background: var(--panel-quiet); box-shadow: none; }
.panel-flush { padding: 0; overflow: hidden; }
.panel-flush .panel-head { padding: 20px 24px 16px; margin: 0; border-bottom: 1px solid var(--line); }
.panel-narrow { max-width: 760px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.panel-head .panel-title { margin: 0; }
.panel-title { font-size: 13px; font-weight: 600; letter-spacing: .01em; margin-bottom: 16px; color: var(--ink); }
.panel-signal { border-color: rgba(224,86,28,.45); box-shadow: var(--shadow), 0 0 0 4px rgba(224,86,28,.07); margin-bottom: 32px; }
.section { margin-top: 8px; }
.section-title { font-size: 13px; font-weight: 600; margin-bottom: 16px; }

.cols { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; align-items: start; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
.side { display: flex; flex-direction: column; gap: 24px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.stack-lg { display: flex; flex-direction: column; gap: 24px; min-width: 0; }

/* ── page heads & hero ───────────────────────────── */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin: 8px 0 28px; flex-wrap: wrap; }
.page-head h1 { font-size: 34px; line-height: 1.1; }
.meta-row { display: flex; gap: 32px; margin-top: 16px; align-items: flex-end; flex-wrap: wrap; }
.meta-row > span { font-size: 14px; }

.hero { display: grid; grid-template-columns: 1fr 280px; gap: 32px; align-items: center; background: var(--housing); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 36px 40px; margin-bottom: 24px; box-shadow: var(--shadow); overflow: hidden; }
.hero h1 { font-size: 40px; line-height: 1.05; letter-spacing: -0.03em; }
.hero-face { position: relative; height: 140px; display: flex; align-items: center; justify-content: flex-end; gap: 28px; }
.hero-face .grille { width: 180px; height: 120px; border-radius: 10px; opacity: .9; }
.hero-knob { width: 56px; height: 56px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff, var(--key) 60%, #D2CDC1); border: 1px solid var(--line-strong); box-shadow: 0 3px 0 rgba(40,36,28,.1); position: relative; flex: none; }
.hero-knob::after { content: ""; position: absolute; width: 3px; height: 14px; border-radius: 2px; background: var(--orange); top: 7px; left: 50%; margin-left: -1.5px; transform-origin: 50% 21px; transform: rotate(32deg); }

/* ── counters ───────────────────────────── */
.counters { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; margin-bottom: 24px; }
.counter { background: var(--housing); padding: 20px 24px; display: flex; flex-direction: column; gap: 6px; }
.counter .num { font-size: 44px; font-weight: 300; letter-spacing: -0.04em; line-height: 1; }
.counter .lbl { display: flex; align-items: center; gap: 8px; font-size: 12px; }

/* ── tables ───────────────────────────── */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 11px; font-weight: 500; color: var(--ink-3); text-transform: capitalize; letter-spacing: .05em; padding: 12px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table th:first-child, .table td:first-child { padding-left: 24px; }
.table th:last-child, .table td:last-child { padding-right: 24px; }
.table tbody tr { transition: background .12s; }
.table tbody tr:hover { background: #FCFBF8; }
.table tr.is-dim td { opacity: .55; }
.row-link { text-decoration: none; }
.sub { display: block; color: var(--ink-3); font-size: 12px; margin-top: 2px; }
.num-cell { text-align: right; font-variant-numeric: tabular-nums; }

.mini-scale { display: inline-flex; gap: 3px; }
.mini-scale i { width: 14px; height: 6px; border-radius: 2px; background: var(--key); border: 1px solid var(--line); }
.mini-scale i.on { background: var(--charcoal); border-color: var(--charcoal); }
.mini-scale i.cur { background: var(--orange); border-color: var(--orange); }

.due { white-space: nowrap; }
.due-soon { color: var(--orange-ink); }
.due-late { color: var(--orange-ink); font-weight: 600; }
.due-late::before { content: "● "; font-size: 9px; vertical-align: 2px; }

/* ── stage scale (radio dial) ───────────────────────────── */
.scale-panel { padding: 28px 32px 22px; margin-bottom: 24px; }
.scale-dial { position: relative; height: 34px; border-bottom: 2px solid var(--charcoal); margin: 0 0 14px; }
.scale-ticks { position: absolute; inset: 0; }
.scale-ticks { background:
  repeating-linear-gradient(90deg, var(--charcoal) 0 2px, transparent 2px calc(100% / 6)) left bottom / 100% 22px no-repeat,
  repeating-linear-gradient(90deg, var(--line-strong) 0 1px, transparent 1px calc(100% / 36)) left bottom / 100% 10px no-repeat; }
.scale-needle { position: absolute; top: -6px; bottom: -8px; width: 3px; margin-left: -1.5px; background: var(--orange); border-radius: 2px; box-shadow: 0 0 0 4px rgba(224,86,28,.12); transition: left .5s cubic-bezier(.3,1.4,.5,1); }
.scale-needle::before { content: ""; position: absolute; top: -6px; left: -4px; width: 11px; height: 11px; border-radius: 50%; background: var(--orange); }
.scale-labels { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(var(--n), 1fr); }
.scale-labels li { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; color: var(--ink-3); }
.scale-labels li button { all: unset; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px 8px; border-radius: 6px; }
.scale-labels li button:hover { background: var(--key-hi); color: var(--ink); }
.scale-labels li button:focus-visible { outline: 2px solid var(--orange); }
.scale-labels .num { font-family: var(--mono); font-size: 10px; }
.scale-labels .name { font-size: 13px; }
.scale-labels li.past { color: var(--ink-2); }
.scale-labels li.cur { color: var(--ink); }
.scale-labels li.cur .name { font-weight: 700; }
.scale-labels li.cur .num { color: var(--orange-ink); }

/* ── project cards (client) ───────────────────────────── */
.pcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.pcard { display: flex; flex-direction: column; gap: 14px; text-decoration: none; background: var(--housing); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px 24px; box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s; }
.pcard:hover { color: inherit; transform: translateY(-2px); box-shadow: var(--shadow), 0 14px 30px -18px rgba(40,36,28,.35); }
.pcard h3 { font-size: 20px; line-height: 1.2; }
.pcard-top { display: flex; justify-content: space-between; align-items: center; }
.pcard-scale { position: relative; height: 18px; border-bottom: 2px solid var(--charcoal); }
.pcard-scale .ticks { position: absolute; inset: 0; background: repeating-linear-gradient(90deg, var(--line-strong) 0 1px, transparent 1px calc(100% / 24)) left bottom / 100% 8px no-repeat; }
.pcard-scale .needle { position: absolute; top: 0; bottom: -5px; width: 3px; margin-left: -1.5px; background: var(--orange); border-radius: 2px; }
.pcard-foot { display: flex; gap: 32px; font-size: 14px; }

/* ── lists ───────────────────────────── */
.activity { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.activity li { display: grid; grid-template-columns: 10px 1fr; gap: 12px; font-size: 13px; }
.activity .act-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--line-strong); margin-top: 7px; }
.activity li:first-child .act-dot { background: var(--orange); }
.activity time { font-size: 11px; color: var(--ink-3); }

.att-list, .wait-list, .plist, .people { list-style: none; margin: 0; padding: 0; }
.att-list li + li, .wait-list li + li, .plist li + li, .people li + li { border-top: 1px solid var(--line); }
.att-list a { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; text-decoration: none; font-size: 14px; }
.att-list small { display: block; color: var(--ink-3); font-size: 12px; }
.att-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.wait-list a { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 16px; padding: 14px 0; text-decoration: none; }
.wait-list small { display: block; color: var(--ink-3); font-size: 13px; }
.wait-key { width: 12px; height: 12px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 0 4px rgba(217,162,27,.18); }
.plist li { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; gap: 12px; }
.plist a { text-decoration: none; }
.person { display: grid; grid-template-columns: 36px 1fr auto; gap: 14px; align-items: center; padding: 12px 0; }
.person-main small { display: block; font-size: 12px; color: var(--ink-3); }
.person-actions { display: flex; gap: 6px; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--charcoal); color: #F4F1EA; display: grid; place-items: center; font-weight: 600; font-size: 14px; }

/* review rows */
.review-list { display: flex; flex-direction: column; }
.review-row { display: grid; grid-template-columns: 64px 1fr auto; gap: 16px; align-items: center; padding: 12px 0; text-decoration: none; border-top: 1px solid var(--line); }
.review-row:first-child { border-top: 0; padding-top: 0; }
.review-row small { display: block; color: var(--ink-3); font-size: 12px; }
.review-row:hover b { color: var(--orange-ink); }
.thumb { width: 64px; height: 48px; border-radius: 6px; background: var(--key); border: 1px solid var(--line); overflow: hidden; display: grid; place-items: center; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb-kind { font-family: var(--mono); font-size: 10px; color: var(--ink-2); letter-spacing: .06em; }

/* tasks */
.tasks { list-style: none; margin: 0 0 12px; padding: 0; }
.tasks li { display: grid; grid-template-columns: 22px 1fr auto; gap: 12px; align-items: start; padding: 10px 0; border-top: 1px solid var(--line); font-size: 14px; }
.tasks li:first-child { border-top: 0; padding-top: 0; }
.tasks li.done .task-main > span { color: var(--ink-3); text-decoration: line-through; text-decoration-color: var(--line-strong); }
.task-main small { display: block; font-size: 12px; color: var(--ink-3); }
.check { all: unset; width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--line-strong); display: inline-block; cursor: pointer; margin-top: 1px; background: var(--housing); position: relative; }
span.check { cursor: default; }
.check:hover { border-color: var(--ink-2); }
.check.is-done { background: var(--charcoal); border-color: var(--charcoal); }
.check.is-done::after { content: ""; position: absolute; width: 6px; height: 6px; border-radius: 50%; background: var(--orange); top: 4.5px; left: 4.5px; }
.x { all: unset; cursor: pointer; color: var(--ink-3); font-size: 18px; line-height: 1; padding: 0 4px; }
.x:hover { color: var(--orange-ink); }
.task-add { display: grid; grid-template-columns: 1fr 140px; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); }
.task-add .tiny-check { grid-column: 1; }
.task-add .btn { grid-column: 2; grid-row: 2; }

/* ── forms ───────────────────────────── */
.field { display: flex; flex-direction: column; gap: 6px; }
.field .lbl { font-size: 12px; }
.hint { font-size: 12px; color: var(--ink-3); }
input[type=text], input[type=email], input[type=password], input[type=date], input:not([type]), select, textarea {
  width: 100%; font: 400 15px/1.4 var(--font); color: var(--ink);
  background: #FDFCFA; border: 1px solid var(--line-strong); border-radius: var(--r);
  padding: 10px 12px; min-height: 42px; box-shadow: inset 0 1px 2px rgba(40,36,28,.06);
  transition: border-color .15s, box-shadow .15s;
}
textarea { resize: vertical; min-height: 80px; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink-2) 50%), linear-gradient(135deg, var(--ink-2) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--charcoal); box-shadow: 0 0 0 3px rgba(224,86,28,.18); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid .field:last-child:nth-child(odd) { grid-column: 1 / -1; }
.form-error { background: #FBE9E0; color: var(--orange-ink); border-radius: var(--r); padding: 10px 14px; font-size: 14px; }
.tiny-check { display: inline-flex; gap: 6px; align-items: center; font-size: 12px; color: var(--ink-2); }
.tiny-check input { accent-color: var(--charcoal); margin: 0; }
.danger-zone { margin-top: 20px; padding-top: 16px; border-top: 1px dashed var(--line-strong); }

.drop { position: relative; display: flex; align-items: center; gap: 16px; padding: 18px 20px; border: 1.5px dashed var(--line-strong); border-radius: var(--r-lg); background: var(--paper); cursor: pointer; transition: border-color .15s, background .15s; }
.drop:hover, .drop.is-over { border-color: var(--charcoal); background: var(--key-hi); }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop-knob { width: 40px; height: 40px; border-radius: 50%; flex: none; background: radial-gradient(circle at 35% 30%, #fff, var(--key) 65%); border: 1px solid var(--line-strong); position: relative; }
.drop-knob::after { content: ""; position: absolute; inset: 0; margin: auto; width: 2px; height: 14px; background: var(--charcoal); box-shadow: 0 0 0 0 transparent; }
.drop-knob::before { content: ""; position: absolute; inset: 0; margin: auto; width: 14px; height: 2px; background: var(--charcoal); }
.drop.has-file { border-style: solid; border-color: var(--green); }
.drop.has-file .drop-knob::after { display: none; }
.drop.has-file .drop-knob::before { width: 10px; height: 10px; border-radius: 50%; background: var(--green); }
.drop-text { display: flex; flex-direction: column; font-size: 14px; }
.drop-name { font-size: 12px; color: var(--ink-3); }

details.editor summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; }
details.editor summary::-webkit-details-marker { display: none; }
details.editor summary .panel-title { margin: 0; }
details.editor summary::after { content: "+"; font-size: 20px; color: var(--ink-3); }
details.editor[open] summary::after { content: "–"; }
details.editor[open] summary { margin-bottom: 20px; }

/* ── specs ───────────────────────────── */
.specs { display: grid; grid-template-columns: 120px 1fr; gap: 10px 16px; margin: 0; font-size: 14px; }
.specs dt { color: var(--ink-3); font-size: 12px; text-transform: capitalize; letter-spacing: .04em; padding-top: 2px; }
.specs dd { margin: 0; }

/* ── flash & notice ───────────────────────────── */
.flash, .notice { display: flex; gap: 12px; align-items: center; background: var(--charcoal); color: #F4F1EA; padding: 14px 18px; border-radius: var(--r-lg); margin-bottom: 24px; font-size: 14px; animation: drop .35s ease-out; word-break: break-word; }
.flash i, .notice i { width: 9px; height: 9px; border-radius: 50%; background: var(--orange); flex: none; }
.notice { background: #FBE9E0; color: var(--orange-ink); }
@keyframes drop { from { transform: translateY(-6px); opacity: 0; } }

.empty { padding: 48px 24px; text-align: center; color: var(--ink-2); display: flex; flex-direction: column; align-items: center; gap: 16px; }
.empty-state { max-width: 460px; margin: 80px auto; text-align: center; display: flex; flex-direction: column; gap: 14px; align-items: center; }
.empty-state .code { font-size: 72px; font-weight: 300; letter-spacing: -0.04em; color: var(--orange); line-height: 1; }

/* ── login ───────────────────────────── */
body.bare { background: var(--paper); }
body.bare .wrap { display: grid; place-items: center; padding: 32px; }
.login { width: 100%; max-width: 940px; display: grid; grid-template-columns: 1.1fr 1fr; background: var(--housing); border: 1px solid var(--line); border-radius: 22px; overflow: hidden; box-shadow: var(--shadow), 0 40px 80px -40px rgba(40,36,28,.35); }
.login-face { background: var(--panel-quiet); padding: 40px; display: flex; flex-direction: column; justify-content: space-between; gap: 40px; border-right: 1px solid var(--line); min-height: 520px; }
.login-face .grille { flex: 1; border-radius: 14px; min-height: 220px; }
.login-brand p { margin-top: 16px; color: var(--ink-2); font-size: 15px; }
.login-form { padding: 0 44px 48px; display: flex; flex-direction: column; }
/* the headline fills the space above the email field and sits centred in it */
/* equal free space above the headline, between headline and fields, and between fields and button */
.login-head, .login-fields, .login-form > .btn { margin-top: auto; }
.login-fields { display: flex; flex-direction: column; gap: 18px; }
.login-form > .hint { margin-top: 18px; }
.login-form h1 { font-size: 33px; margin: 0; }

/* ── review page ───────────────────────────── */
.review-head-right { display: flex; align-items: center; gap: 20px; }
.tabs { display: inline-flex; padding: 3px; background: var(--key); border: 1px solid var(--line); border-radius: 20px; }
.tabs a { text-decoration: none; font-family: var(--mono); font-size: 12px; padding: 6px 12px; border-radius: 16px; color: var(--ink-2); }
.tabs a.is-active { background: var(--charcoal); color: #F4F1EA; }
.review-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 24px; align-items: start; }
.review-main { position: sticky; top: 92px; }
.stage { background: #DCD8CF; border-radius: var(--r-lg); border: 1px solid var(--line-strong); padding: 28px; display: flex; justify-content: center; align-items: center; min-height: 420px; box-shadow: inset 0 2px 10px rgba(40,36,28,.08); }
.stage-image { padding: 32px; }
.pinwrap { position: relative; display: inline-block; line-height: 0; cursor: crosshair; max-width: 100%; }
.pinwrap img { max-height: calc(100vh - 260px); width: auto; max-width: 100%; box-shadow: 0 12px 30px -12px rgba(0,0,0,.3); user-select: none; background: #fff; }
.pin { position: absolute; transform: translate(-50%, -50%); width: 28px; height: 28px; border-radius: 50%; border: 2px solid #fff; background: var(--orange); color: #fff; font: 700 12px/1 var(--font); display: grid; place-items: center; cursor: pointer; box-shadow: 0 2px 6px rgba(0,0,0,.3); transition: transform .15s; padding: 0; }
.pin:hover, .pin.is-hot { transform: translate(-50%, -50%) scale(1.25); z-index: 2; }
.pin.is-resolved { background: var(--ink-3); }
.pin-new { background: var(--charcoal); animation: pulse 1.4s infinite; pointer-events: none; }
@keyframes pulse { 50% { box-shadow: 0 0 0 8px rgba(224,86,28,.25); } }
.stage-pdf { padding: 0; overflow: hidden; }
.stage-pdf iframe { width: 100%; height: calc(100vh - 220px); min-height: 520px; border: 0; background: #fff; }
.stage-media video { width: 100%; max-height: calc(100vh - 260px); border-radius: 8px; background: #000; }
.stage-audio { flex-direction: column; }
.stage-audio audio { width: min(100%, 520px); }
.file-card { background: var(--housing); border-radius: var(--r-lg); padding: 36px 48px; display: flex; flex-direction: column; align-items: center; gap: 10px; box-shadow: var(--shadow); text-align: center; }
.file-card .thumb-kind { font-size: 14px; width: 64px; height: 64px; border-radius: 50%; background: var(--key); display: grid; place-items: center; margin-bottom: 4px; }
.file-card small { color: var(--ink-3); margin-bottom: 10px; }
.file-bar { display: flex; justify-content: space-between; gap: 16px; padding: 12px 4px; font-size: 13px; color: var(--ink-2); flex-wrap: wrap; }

.decide-keys { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.key { all: unset; box-sizing: border-box; display: flex; align-items: center; justify-content: center; gap: 10px; height: 52px; border-radius: 10px; cursor: pointer; font: 600 14px/1 var(--font); border: 1px solid var(--line-strong); background: linear-gradient(var(--key-hi), var(--key)); box-shadow: 0 1px 0 #fff inset, 0 3px 0 rgba(40,36,28,.12); transition: transform .06s, box-shadow .06s; }
.key:active { transform: translateY(2px); box-shadow: 0 1px 0 rgba(40,36,28,.12); }
.key:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
.key i { width: 10px; height: 10px; border-radius: 50%; }
.key-ok { background: var(--charcoal); color: #F4F1EA; border-color: #111; box-shadow: 0 1px 0 rgba(255,255,255,.12) inset, 0 3px 0 #000; }
.key-ok i { background: var(--green); box-shadow: 0 0 0 3px rgba(76,138,60,.3); }
.key-alert i { background: var(--orange); box-shadow: 0 0 0 3px rgba(224,86,28,.2); }
.decide p { margin-bottom: 8px; }
.decide .lamp { font-size: 15px; color: var(--ink); }

.note-form { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
.note-form-foot { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.note-form-foot .hint { flex: 1 1 100%; }
.note-form-foot .btn { margin-left: auto; }
.notes { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.note { display: grid; grid-template-columns: 26px 1fr; gap: 12px; padding: 14px 8px; border-top: 1px solid var(--line); font-size: 14px; border-radius: 8px; transition: background .15s; scroll-margin-top: 100px; }
.note.is-hot, .note:target { background: #FBF1EA; }
.note.is-resolved { opacity: .55; }
.note-pin { width: 22px; height: 22px; border-radius: 50%; background: var(--orange); color: #fff; font: 700 11px/22px var(--font); text-align: center; }
.note-pin-plain { background: var(--key); color: var(--ink-2); }
.note.is-resolved .note-pin { background: var(--ink-3); }
.note-head { display: flex; gap: 8px; align-items: baseline; margin-bottom: 4px; flex-wrap: wrap; }
.note-head time { font-size: 11px; color: var(--ink-3); margin-left: auto; }
.role { font-size: 10px; text-transform: capitalize; letter-spacing: .06em; padding: 1px 6px; border-radius: 8px; background: var(--key); color: var(--ink-2); }
.role-admin { background: var(--charcoal); color: #F4F1EA; }
.note-body form { margin-top: 6px; }
.stamp { all: unset; cursor: pointer; font-family: var(--mono); font-size: 11px; background: var(--charcoal); color: #F4F1EA; padding: 2px 7px; border-radius: 8px; margin-right: 6px; }
.notes-empty { padding: 8px 0; }

.history { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; font-size: 13px; }
.history li { display: grid; grid-template-columns: 16px 1fr; gap: 8px; }
.history .lamp { margin-top: 0; height: 21px; }
.history time { font-size: 11px; color: var(--ink-3); }
.quote { color: var(--ink-2); font-style: italic; margin: 4px 0; }
.brief p { color: var(--ink-2); max-width: 70ch; }

/* ── responsive ───────────────────────────── */
@media (max-width: 1020px) {
  .cols, .review-layout { grid-template-columns: 1fr; }
  .review-main { position: static; }
  .hero { grid-template-columns: 1fr; }
  .hero-face { display: none; }
}
@media (max-width: 760px) {
  .wrap { padding: 20px 16px 48px; }
  .topbar-in { padding: 0 16px; height: auto; min-height: 60px; flex-wrap: wrap; gap: 8px 16px; padding-top: 10px; padding-bottom: 10px; }
  .nav { order: 3; flex-basis: 100%; overflow-x: auto; margin: 0 -8px; }
  .userbox { margin-left: auto; }
  .who { display: none; }
  .wm-text b { font-size: 13px; }
  .foot-in { padding: 16px; flex-wrap: wrap; }
  .grille-strip { display: none; }
  .hero { padding: 24px; }
  .hero h1, .page-head h1 { font-size: 28px; }
  .counters { grid-template-columns: 1fr 1fr; }
  .counter .num { font-size: 34px; }
  .grid-2, .form-grid { grid-template-columns: 1fr; }
  .login { grid-template-columns: 1fr; }
  .login-face { min-height: 0; padding: 28px; }
  .login-face .grille { min-height: 90px; }
  .login-form { padding: 32px 24px; }
  .login-fields, .login-form > .btn { margin-top: 28px; }
  .scale-panel { padding: 20px 16px 16px; }
  .scale-labels .name { font-size: 11px; }
  .scale-labels li button { padding: 4px 2px; }
  .stage, .stage-image { padding: 12px; min-height: 240px; }
  .person { grid-template-columns: 36px 1fr; }
  .person-actions { grid-column: 2; }
  .review-head-right { flex-wrap: wrap; }
  .table th:nth-child(7), .table td:nth-child(7) { display: none; }
}

/* ── slide switch (notifications) ───────────────────────────── */
.switch-row { display: flex; gap: 16px; align-items: center; margin-bottom: 16px; }
.switch-row small { display: block; font-size: 12px; color: var(--ink-3); max-width: 42ch; }
.switch { all: unset; box-sizing: border-box; flex: none; width: 52px; height: 28px; border-radius: 14px; cursor: pointer; position: relative;
  background: var(--key); border: 1px solid var(--line-strong); box-shadow: inset 0 1px 3px rgba(40,36,28,.15); transition: background .2s; }
.switch i { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff, var(--key-hi) 70%); border: 1px solid var(--line-strong);
  box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: left .2s cubic-bezier(.3,1.3,.5,1); }
.switch.is-on { background: var(--charcoal); border-color: #111; }
.switch.is-on i { left: 27px; }
.switch.is-on i::after { content: ""; position: absolute; inset: 0; margin: auto; width: 6px; height: 6px; border-radius: 50%; background: var(--orange); }
.switch:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }

/* ── Title Case for interface text (labels, headings, controls). User content is left as typed. ── */
.panel-title, .section-title, .btn, .key, .link-btn, .nav a, .lamp, .tiny-check, .field .lbl,
.scale-labels .name, details.editor summary, .decide-keys, .switch-row b { text-transform: capitalize; }

/* budget input: currency selector fused to the amount */
.money-input { display: flex; align-items: stretch; }
.money-prefix, .money-suffix { display: grid; place-items: center; padding: 0 12px; background: var(--key-hi); border: 1px solid var(--line-strong); color: var(--ink-2); font-size: 14px; }
.money-prefix { border-radius: var(--r) 0 0 var(--r); border-right: 0; font-weight: 600; color: var(--ink); }
.money-suffix { border-radius: 0 var(--r) var(--r) 0; border-left: 0; font-family: var(--mono); font-size: 11px; letter-spacing: .04em; }
.money-input input { border-radius: 0; font-variant-numeric: tabular-nums; }
.studio-only .lbl::after { content: " · studio"; color: var(--orange-ink); }

/* ── studio overview: instruments (clocks · weather) ───────────────────────────── */
.hero-studio { grid-template-columns: minmax(0, 1fr) 280px; align-items: center; gap: 36px; }
.instruments { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 18px; margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); }
.instrument { display: flex; align-items: center; gap: 9px; min-width: 0; }
.inst-text { display: flex; flex-direction: column; line-height: 1.2; }
.inst-text b { font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; white-space: nowrap; }
.inst-text small { font-size: 11px; color: var(--ink-3); letter-spacing: .03em; white-space: nowrap; }
.inst-divider { width: 1px; align-self: stretch; background: var(--line); }

.clock-face { width: 44px; height: 44px; flex: none; filter: drop-shadow(0 1px 1.5px rgba(40,36,28,.18)); }
.clock-face line { stroke-linecap: round; transform-box: view-box; transform-origin: 24px 24px; }
.clock-face .cf-s { transform-box: view-box; transform-origin: 24px 24px; }
.cf-rim { fill: #FBFAF6; stroke: var(--line-strong); stroke-width: 1; }
.cf-ticks line { stroke: var(--charcoal); stroke-width: 1.3; }
.cf-h { stroke: var(--charcoal); stroke-width: 2.6; }
.cf-m { stroke: var(--charcoal); stroke-width: 1.7; }
.cf-s line { stroke: var(--orange); stroke-width: .9; }
.cf-s circle { fill: var(--orange); }
.cf-pin { fill: var(--charcoal); }
.clock.is-night .cf-rim { fill: var(--charcoal); stroke: #111; }
.clock.is-night .cf-ticks line, .clock.is-night .cf-h, .clock.is-night .cf-m { stroke: #EFECE5; }
.clock.is-night .cf-pin { fill: #EFECE5; }

.weather-icon { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--key-hi); border: 1px solid var(--line); }
.weather-icon svg { width: 30px; height: 30px; }
.weather-icon svg * { fill: none; stroke: var(--charcoal); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.weather-icon svg .sun { fill: var(--orange); stroke: none; }
.weather-icon svg .ray { stroke: var(--orange); }
.weather-icon svg .bolt { stroke: var(--orange); }
.weather-icon svg .cloud { fill: #FBFAF6; }
.weather-icon svg .flake { fill: var(--charcoal); stroke: none; }
.weather .weather-temp { cursor: pointer; }
.weather.is-loading .weather-icon { animation: breathe 1.4s ease-in-out infinite; }
@keyframes breathe { 50% { opacity: .45; } }
.weather-enable { font-size: 12px; }

@media (max-width: 1020px) {
  .hero-studio { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .instruments { gap: 16px 18px; }
  .inst-divider { display: none; }
  .instrument { flex: 1 1 40%; }
  .inst-text small { white-space: normal; }
}

.nav a { white-space: nowrap; }
