/* ─────────────────────── Key Voices · PM dashboard ─────────────────────── */

/* ───────────── auth screens ───────────── */

.auth-wrap {
  min-height: 100vh; display: grid; place-items: center; padding: 32px 16px;
  background:
    radial-gradient(900px 700px at 0% 0%, rgba(70, 4, 0, .55), transparent 70%),
    radial-gradient(800px 700px at 100% 100%, rgba(58, 5, 0, .45), transparent 70%),
    var(--charcoal);
}
.auth-card {
  width: min(420px, 100%); background: var(--surface); border: 1px solid var(--line-soft);
  border-radius: 22px; padding: 36px 34px 32px; box-shadow: var(--edge), 0 40px 80px -40px rgba(0,0,0,.7);
}
.auth-logo { height: 22px; display: block; margin-bottom: 30px; }
.auth-title { font-family: var(--font-head); font-size: 28px; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; margin-bottom: 8px; }
.auth-sub { color: var(--stone); font-size: 15px; margin-bottom: 26px; }
.auth-card form { display: grid; gap: 16px; }
.auth-card .btn { width: 100%; margin-top: 6px; padding: 14px; }
.form-error { color: var(--vermillion-bright); font-size: 14px; }

/* ───────────── shell ───────────── */

.shell { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; gap: 4px;
  padding: 26px 16px 20px; border-right: 1px solid var(--line-soft); background: #151311;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 0 10px 28px; text-decoration: none; }
.brand img { height: 17px; }
.brand-divider { width: 1px; height: 16px; background: var(--line); }
.brand-text { font-family: var(--font-head); font-size: 11.5px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--stone); }

.nav-link {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 12px; border-radius: 10px; text-decoration: none;
  font-size: 14.5px; font-weight: 500; color: var(--stone);
  transition: background .2s, color .2s;
}
.nav-link:hover { background: var(--surface); color: var(--linen); }
.nav-link.is-on { background: var(--surface-2); color: var(--linen); }
.nav-link svg { width: 17px; height: 17px; flex: 0 0 17px; }
.nav-link.is-on svg { color: var(--vermillion-bright); }
.sidebar-foot { margin-top: auto; padding: 14px 12px 0; border-top: 1px solid var(--line-soft); }
.me-name { font-size: 14px; font-weight: 600; }
.me-email { font-size: 12.5px; color: var(--stone-deep); margin-bottom: 10px; overflow-wrap: anywhere; }

.main { min-width: 0; padding: 34px 44px 80px; }
.page { max-width: 1160px; margin: 0 auto; }

@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; padding: 14px 16px; border-right: none; border-bottom: 1px solid var(--line-soft); }
  .brand { padding: 0 10px 0 0; margin-right: auto; }
  .sidebar-foot { margin: 0; padding: 0; border: none; display: flex; gap: 12px; align-items: center; }
  .me-name, .me-email { display: none; }
  .main { padding: 24px 16px 60px; }
}

/* ───────────── page header ───────────── */

.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 13px; color: var(--stone-deep); margin-bottom: 12px; }
.crumbs a { color: var(--stone); text-decoration: none; }
.crumbs a:hover { color: var(--linen); }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 28px; }
.page-title { font-family: var(--font-head); font-size: clamp(26px, 3vw, 36px); font-weight: 700; letter-spacing: -.02em; line-height: 1.08; }
.page-title-row { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; }
.page-sub { color: var(--stone); font-size: 15px; margin-top: 6px; }
.head-actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* ───────────── cards & layout ───────────── */

.card { background: var(--surface); border: 1px solid var(--line-soft); border-radius: 18px; padding: 24px 26px; box-shadow: var(--edge); min-width: 0; }
.card + .card { margin-top: 18px; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; margin-bottom: 16px; flex-wrap: wrap; }
.card-title { font-family: var(--font-head); font-size: 17px; font-weight: 600; letter-spacing: .005em; }
.card-sub { font-size: 13.5px; color: var(--stone); }
.muted { color: var(--stone); }
.faint { color: var(--stone-deep); }
.small { font-size: 13px; }

.grid-2 { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.grid-2 > div > .card + .card { margin-top: 18px; }
@media (max-width: 1000px) { .grid-2 { grid-template-columns: 1fr; } }

.stack { display: grid; gap: 16px; }
.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.spacer { flex: 1; }

/* ───────────── clients list ───────────── */

.toolbar { display: flex; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.toolbar .field { max-width: 320px; }

.client-list { display: grid; gap: 10px; }
.client-row {
  display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1.2fr) minmax(0, 1fr) 24px;
  align-items: center; gap: 18px;
  padding: 18px 22px; border-radius: 16px; text-decoration: none;
  background: var(--surface); border: 1px solid var(--line-soft); box-shadow: var(--edge);
  transition: border-color .2s, transform .25s var(--ease-out);
}
.client-row:hover { border-color: #5e1206; transform: translateY(-1px); }
.client-name { font-family: var(--font-head); font-weight: 600; font-size: 17px; }
.client-meta { font-size: 13px; color: var(--stone-deep); }
.client-stat { font-size: 13.5px; color: var(--stone); }
.client-stat strong { color: var(--linen); font-weight: 600; }
.chev { color: var(--stone-deep); }
@media (max-width: 760px) {
  .client-row { grid-template-columns: 1fr auto; }
  .client-row > :nth-child(2), .client-row > :nth-child(4) { display: none; }
  .client-row .chev { display: none; }
}

.empty {
  text-align: center; padding: 64px 24px; border: 1.5px dashed var(--line); border-radius: 20px;
}
.empty h3 { font-family: var(--font-head); font-size: 21px; margin-bottom: 8px; }
.empty p { color: var(--stone); max-width: 46ch; margin: 0 auto 22px; }

.bar { height: 5px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--vermillion-bright); border-radius: inherit; transition: width .6s var(--ease-out); }
.bar.ok > span { background: var(--ok); }

/* ───────────── tabs ───────────── */

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line-soft); margin-bottom: 24px; overflow-x: auto; }
.tab {
  padding: 12px 16px; font-size: 14.5px; font-weight: 500; color: var(--stone); text-decoration: none;
  border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap;
}
.tab:hover { color: var(--linen); }
.tab.is-on { color: var(--linen); border-color: var(--vermillion-bright); }
.tab .count { font-size: 12px; color: var(--stone-deep); margin-left: 6px; }

/* ───────────── modules ───────────── */

.module-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.module {
  position: relative; text-align: left; cursor: pointer;
  background: var(--surface-2); border: 1.5px solid var(--line-soft); border-radius: 14px; padding: 16px 16px 14px;
  transition: border-color .2s, background .2s;
}
.module:hover:not(:disabled) { border-color: #6b1a0a; }
.module.is-on { background: var(--vermillion-soft); border-color: var(--vermillion); }
.module:disabled { cursor: default; opacity: 1; }
.module-name { font-family: var(--font-head); font-weight: 600; font-size: 16px; display: flex; justify-content: space-between; gap: 10px; }
.module-mins { font-size: 12.5px; color: var(--stone); margin-top: 3px; }
.module-tick {
  width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid var(--stone-deep); display: grid; place-items: center; flex: 0 0 20px;
}
.module.is-on .module-tick, .module.is-locked .module-tick { background: var(--vermillion); border-color: var(--vermillion); }
.module.is-locked .module-tick { background: var(--stone-deep); border-color: var(--stone-deep); }
.module-tick svg { width: 12px; height: 12px; opacity: 0; }
.module.is-on .module-tick svg, .module.is-locked .module-tick svg { opacity: 1; }
.total-mins { font-family: var(--font-head); font-size: 15px; margin-top: 16px; color: var(--stone); }
.total-mins strong { color: var(--linen); }

.outline { list-style: none; counter-reset: page; display: grid; gap: 2px; }
.outline li {
  counter-increment: page; display: flex; align-items: center; gap: 12px;
  padding: 9px 4px; border-bottom: 1px solid var(--line-soft); font-size: 14.5px;
}
.outline li:last-child { border-bottom: none; }
.outline li::before {
  content: counter(page); width: 24px; height: 24px; border-radius: 50%; flex: 0 0 24px;
  display: grid; place-items: center; font-size: 12px; font-weight: 600; background: var(--surface-3); color: var(--stone);
}
.outline li.is-addon::before { background: var(--vermillion-soft); color: var(--vermillion-bright); }
.outline .tag { margin-left: auto; font-size: 12px; color: var(--stone-deep); white-space: nowrap; }

.share-box { display: flex; gap: 10px; align-items: stretch; }
.share-url {
  flex: 1; min-width: 0; font-family: ui-monospace, "SF Mono", Consolas, monospace; font-size: 13.5px;
  background: var(--charcoal); border: 1.5px solid var(--line); border-radius: 12px; padding: 11px 14px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--linen);
}
.share-box.is-off .share-url { color: var(--stone-deep); }
@media (max-width: 560px) { .share-box { flex-direction: column; } }

.callout {
  border: 1px solid var(--line); border-left: 3px solid var(--stone-deep); border-radius: 12px;
  padding: 14px 16px; font-size: 14px; color: var(--stone); background: var(--surface-2);
}
.callout strong { color: var(--linen); }
.callout.warn { border-left-color: var(--warn); }
.callout.alert { border-left-color: var(--vermillion-bright); background: #1f1412; }

/* ───────────── tables ───────────── */

.table-wrap { overflow-x: auto; margin: 0 -6px; }
table.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th {
  text-align: left; font-size: 11.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  color: var(--stone-deep); padding: 8px 6px 10px; border-bottom: 1px solid var(--line);
}
.table td { padding: 12px 6px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.table tr:last-child td { border-bottom: none; }
.table td.num, .table th.num { text-align: center; font-feature-settings: "tnum"; }
.cell-name { font-weight: 600; }
.cell-sub { font-size: 12.5px; color: var(--stone-deep); }
.badge-final {
  display: inline-block; font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--linen); background: var(--vermillion); border-radius: 6px; padding: 2px 7px; margin-left: 8px; vertical-align: 2px;
}
.progress-cell { display: flex; align-items: center; gap: 10px; min-width: 150px; }
.progress-cell .bar { flex: 1; min-width: 60px; }
.actions-cell { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: nowrap; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 18px; }
.stat { background: var(--surface); border: 1px solid var(--line-soft); border-radius: 16px; padding: 16px 18px; box-shadow: var(--edge); }
.stat-num { font-family: var(--font-head); font-size: 30px; font-weight: 700; line-height: 1.1; }
.stat-label { font-size: 12.5px; color: var(--stone); margin-top: 2px; }

/* ───────────── themes & differences ───────────── */

.t-section { margin-top: 34px; }
.t-section:first-child { margin-top: 0; }
.t-heading {
  font-family: var(--font-head); font-size: 13px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase;
  color: var(--stone); margin-bottom: 14px; display: flex; align-items: center; gap: 12px;
}
.t-heading::after { content: ""; flex: 1; height: 1px; background: var(--line-soft); }
.q-id { font-family: ui-monospace, Consolas, monospace; font-size: 12px; color: var(--vermillion-bright); margin-right: 8px; }
.q-title { font-weight: 600; font-size: 15.5px; line-height: 1.4; }
.q-head { display: flex; justify-content: space-between; gap: 14px; align-items: flex-start; margin-bottom: 14px; }

.scale-row { padding: 16px 0; border-bottom: 1px solid var(--line-soft); }
.scale-row:last-child { border-bottom: none; padding-bottom: 4px; }
.scale-row:first-child { padding-top: 4px; }
.scale-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.scale-meta { font-size: 13px; color: var(--stone); font-feature-settings: "tnum"; }
.scale-meta strong { color: var(--linen); }
.scale-track-wrap { display: grid; grid-template-columns: 130px 1fr 130px; align-items: center; gap: 14px; }
.scale-end { font-size: 13px; font-weight: 600; font-family: var(--font-head); }
.scale-end.r { text-align: right; }
.scale-track { position: relative; height: 44px; }
.scale-track::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 2px; background: var(--line); }
.scale-tick { position: absolute; top: 50%; width: 1px; height: 10px; background: var(--stone-deep); transform: translate(-50%, -50%); }
.scale-tick span { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); font-size: 10.5px; color: var(--stone-deep); }
.scale-avg { position: absolute; top: 2px; bottom: 2px; width: 2px; background: var(--linen); transform: translateX(-50%); border-radius: 2px; }
.scale-dot {
  position: absolute; width: 26px; height: 26px; border-radius: 50%; transform: translate(-50%, -50%);
  background: var(--surface-3); border: 1.5px solid var(--stone); font-size: 10.5px; font-weight: 700;
  display: grid; place-items: center; color: var(--linen); cursor: default;
}
.scale-dot.is-final { background: var(--vermillion); border-color: var(--vermillion-bright); }
@media (max-width: 640px) {
  .scale-track-wrap { grid-template-columns: 1fr 1fr; }
  .scale-track { grid-column: 1 / -1; grid-row: 2; }
  .scale-end.r { grid-row: 1; grid-column: 2; }
}

.word-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 860px) { .word-cols { grid-template-columns: 1fr; } }
.word-col h4 { font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--stone); margin-bottom: 10px; }
.words { display: flex; flex-wrap: wrap; gap: 7px; }
.word { font-size: 13.5px; padding: 5px 11px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--line); color: var(--stone); }
.word.is-shared { background: var(--linen); color: var(--charcoal); border-color: var(--linen); font-weight: 600; }
.word.is-conflict { background: var(--vermillion); color: var(--linen); border-color: var(--vermillion); font-weight: 600; }
.word sup { font-size: 10px; margin-left: 3px; }

.bars { display: grid; gap: 9px; }
.bar-row { display: grid; grid-template-columns: minmax(140px, 260px) 1fr 34px; gap: 14px; align-items: center; font-size: 14px; }
.bar-row .bar { height: 9px; }
.bar-row .n { text-align: right; font-feature-settings: "tnum"; font-weight: 600; }
.bar-row .who { grid-column: 2 / -1; font-size: 12.5px; color: var(--stone-deep); margin-top: -5px; }
.bar-row.is-zero { color: var(--stone-deep); }
@media (max-width: 600px) { .bar-row { grid-template-columns: 1fr 34px; } .bar-row .bar { grid-column: 1 / -1; grid-row: 2; } .bar-row .who { grid-column: 1 / -1; } }

.pick-list { display: grid; gap: 8px; }
.pick { display: flex; gap: 10px; font-size: 14px; flex-wrap: wrap; }
.pick b { font-weight: 600; }

.quote-list { display: grid; gap: 10px; }
.quote { border-left: 2px solid var(--line); padding: 2px 0 2px 14px; }
.quote-who { font-size: 12.5px; font-weight: 600; color: var(--stone); margin-bottom: 2px; }
.quote-text { font-size: 14.5px; white-space: pre-wrap; overflow-wrap: anywhere; }
.draft-theme { margin-top: 12px; font-size: 13px; color: var(--stone-deep); font-style: italic; }

.grid-table td.num.hot { color: var(--linen); font-weight: 700; }
.grid-table td.num.zero { color: var(--stone-deep); }

/* ───────────── person view ───────────── */

.people-pick { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.answer-block { padding: 14px 0; border-bottom: 1px solid var(--line-soft); }
.answer-block:last-child { border-bottom: none; }
.answer-q { font-size: 13.5px; color: var(--stone); margin-bottom: 4px; }
.answer-a { font-size: 15px; white-space: pre-wrap; overflow-wrap: anywhere; }
.answer-a.none { color: var(--stone-deep); font-style: italic; }

/* ───────────── modal ───────────── */

.modal-back {
  position: fixed; inset: 0; z-index: 100; background: rgba(8, 7, 6, .72);
  display: grid; place-items: center; padding: 24px 16px; overflow-y: auto;
  animation: fade .2s var(--ease-soft);
}
.modal {
  width: min(560px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: 20px;
  padding: 28px 28px 24px; box-shadow: var(--edge), 0 40px 90px -30px rgba(0,0,0,.8);
  animation: rise .3s var(--ease-out);
}
.modal-wide { width: min(680px, 100%); }
.modal h2 { font-family: var(--font-head); font-size: 22px; letter-spacing: -.01em; margin-bottom: 6px; }
.modal .modal-sub { color: var(--stone); font-size: 14.5px; margin-bottom: 22px; }
.modal form { display: grid; gap: 18px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 8px; flex-wrap: wrap; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 520px) { .field-row { grid-template-columns: 1fr; } }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(14px) scale(.98); } }

/* ───────────── toasts ───────────── */

.toasts { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 200; display: grid; gap: 8px; width: max-content; max-width: calc(100vw - 32px); }
.toast {
  background: var(--linen); color: var(--charcoal); font-size: 14px; font-weight: 600;
  padding: 11px 18px; border-radius: 12px; box-shadow: 0 20px 40px -16px rgba(0,0,0,.6);
  animation: rise .3s var(--ease-out);
}
.toast.is-error { background: var(--vermillion); color: var(--linen); }

.saving { font-size: 12.5px; color: var(--stone-deep); }
.loading { color: var(--stone-deep); padding: 60px 0; text-align: center; }
