/*
  dashboard.css: styles for the team app (Desk + Scripts).
  Reuses the design tokens (--surface, --ink2, --brand, --btn2...) from style.css,
  so it follows the same Apple-style look and dark mode automatically.
  Script titles use .script-title (Courier Prime capitals) from style.css.
*/

/* =====================================================================
   Header: logo, Desk / Scripts, and you
   ===================================================================== */
.dash-header {
  max-width: 1320px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.dash-brand {
  display: flex;
  align-items: center;
  gap: 20px;
}

.dash-nav {
  display: flex;
  gap: 4px;
}

.dash-nav a {
  padding: 7px 14px;
  border-radius: 999px;
  color: var(--ink2);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
}

.dash-nav a:hover {
  color: var(--ink);
}

/* The page you're on: red text */
.dash-nav a.current {
  color: var(--tung);
  font-weight: 600;
}

.dash-user {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-link {
  background: none;
  border: none;
  color: var(--tung);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  min-height: 44px;
  padding: 0 4px;
}

/* Secondary button: tinted, not red */
.btn.btn-quiet {
  background: var(--btn2);
  color: var(--ink);
}

.btn.btn-quiet:hover {
  filter: none;
  background: var(--btn2-hover);
}

.login {
  padding-top: 72px;
  max-width: 420px;
}

.login h1 {
  margin-bottom: 28px;
}

.meta {
  color: var(--ink2);
  font-size: 13px;
  margin: 0;
}

/* Initials circles */
.avatar {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: var(--btn2);
  color: var(--ink2);
}

.avatar-read { background: var(--good-soft); color: var(--good); }
.avatar-pass { background: var(--surface2);  color: var(--ink2); }
.avatar-new  { background: var(--tung-soft); color: var(--tung); font-size: 15px; }

#user-avatar {
  width: 32px;
  height: 32px;
  font-size: 12px;
  background: var(--ink);
  color: var(--bg);
}

.container.dash {
  max-width: 1320px;
  padding-top: 24px;
}

/* Links to scripts look like the title, not like blue links */
a.script-title {
  color: var(--ink);
  text-decoration: none;
}

a.script-title:hover {
  color: var(--tung);
}

/* =====================================================================
   THE DESK
   ===================================================================== */
.desk-top {
  padding: 28px 0 36px;
  max-width: 820px;
}

.desk-top h1 {
  font-size: clamp(30px, 4.5vw, 42px);
  letter-spacing: -0.03em;
  margin-bottom: 8px;
}

/* The briefing: a short italic line under the greeting */
.briefing {
  font-size: 16px;
  font-style: italic;
  line-height: 1.5;
  color: var(--ink2);
  margin: 0;
}

.briefing a.script-title {
  font-style: normal;
  font-size: 13px;
  border-bottom: 1px solid var(--line);
}

.desk-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}

.desk-side {
  display: grid;
  gap: 32px;
}

.panel-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.panel-head h2 {
  font-size: 19px;
  letter-spacing: -0.01em;
  margin: 0;
}

.count {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink2);
  background: var(--btn2);
  border-radius: 999px;
  padding: 2px 9px;
  font-variant-numeric: tabular-nums;
}

.panel-empty {
  color: var(--ink2);
  margin: 0;
  padding: 18px 0;
}

/* ---------- Waiting on you: one grouped card of rows ---------- */
.queue {
  list-style: none;
  margin: 0;
  padding: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}

.queue-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  border-bottom: 0.5px solid var(--line);
}

.queue-row:last-child {
  border-bottom: none;
}

.queue-info {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 3px;
}

.queue-info .script-title {
  font-size: 16px;
  overflow-wrap: anywhere;
}

.queue-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

/* Quick Read / Pass */
.vote {
  min-height: 36px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.vote-read:hover { background: var(--good-soft); border-color: transparent; color: var(--good); }
.vote-pass:hover { background: var(--surface2); border-color: transparent; }

/* Small tags */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.tag {
  font-size: 12px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--btn2);
  color: var(--ink2);
}

.tag-sent   { background: var(--tung-soft); color: var(--tung); }
.tag-claude { background: transparent; border: 1px dashed var(--line); font-weight: 500; }
.tag-split  { background: var(--warn-soft); color: var(--warn); }

/* ---------- Where the team stands ---------- */
.standings {
  list-style: none;
  margin: 0;
  padding: 0;
}

.standing {
  padding: 12px 0;
  border-bottom: 0.5px solid var(--line);
}

.standing:first-child {
  padding-top: 0;
}

.standing:last-child {
  border-bottom: none;
}

.standing-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 8px;
}

.standing-head .script-title {
  font-size: 14px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.people {
  display: flex;
  align-items: center;
  gap: 4px;
}

.tally {
  margin-left: 8px;
  font-size: 13px;
  color: var(--ink2);
  font-variant-numeric: tabular-nums;
}

/* ---------- Activity timeline ---------- */
.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
}

/* The thin vertical line behind the avatars */
.timeline::before {
  content: "";
  position: absolute;
  left: 13.5px;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: var(--line);
}

.event {
  position: relative;
  display: flex;
  gap: 12px;
  padding-bottom: 16px;
}

.event .avatar {
  box-shadow: 0 0 0 3px var(--bg); /* a gap where the line meets the circle */
}

.event-body {
  min-width: 0;
}

.event-line {
  margin: 3px 0 0;
  font-size: 14px;
  color: var(--ink2);
}

.event-line .script-title {
  font-size: 13px;
}

.event-note {
  margin: 6px 0 0;
  font-size: 14px;
  color: var(--ink);
  padding-left: 10px;
  border-left: 2px solid var(--line);
  border-radius: 0;
}

.event-time {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: var(--ink3);
}

/* =====================================================================
   SCRIPTS
   ===================================================================== */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.toolbar input[type="search"] {
  max-width: 280px;
}

/* Segmented controls: filters, stage, tabs */
.filters,
.seg {
  display: flex;
  gap: 1px;
  padding: 3px;
  border-radius: 8px;
  background: var(--btn2);
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
}

.filters::-webkit-scrollbar,
.seg::-webkit-scrollbar {
  display: none;
}

.filters button,
.seg button {
  all: unset;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 13px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink2);
  cursor: pointer;
  white-space: nowrap;
}

.filters button:hover,
.seg button:hover {
  color: var(--ink);
}

.filters button.active,
.seg button.on {
  background: var(--seg-on);
  color: var(--ink);
  font-weight: 600;
  box-shadow: var(--seg-sh);
}

.filters button:focus-visible,
.seg button:focus-visible {
  outline: 3px solid var(--focus);
}

.filters button span {
  font-size: 12px;
  color: var(--ink3);
  font-variant-numeric: tabular-nums;
}

.review-layout {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

/* The list stays in view while the detail scrolls */
.sub-list {
  position: sticky;
  top: 84px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow-y: auto;
  max-height: calc(100vh - 104px);
}

.sub-list .panel-empty {
  padding: 20px 16px;
}

.sub-item {
  display: block;
  padding: 14px 16px;
  border-bottom: 0.5px solid var(--line);
  color: var(--ink);
  text-decoration: none;
}

.sub-item:last-child {
  border-bottom: none;
}

.sub-item:hover {
  background: var(--btn2);
}

.sub-item.selected {
  background: var(--tung-soft);
  box-shadow: inset 3px 0 0 var(--brand);
}

.sub-item-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: baseline;
  margin-bottom: 3px;
}

.sub-item-top .script-title {
  font-size: 14px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.sub-item-status {
  margin-top: 6px;
  font-size: 13px;
  color: var(--ink2);
}

.you {
  font-weight: 600;
}

.you-read { color: var(--good); }
.you-pass { color: var(--ink2); }

.waiting {
  color: var(--tung);
  font-weight: 600;
}

/* Stage badges */
.badge {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 3px 8px;
  border-radius: 999px;
  white-space: nowrap;
}

.badge-new         { background: var(--tung-soft); color: var(--tung); }
.badge-in_review   { background: var(--warn-soft); color: var(--warn); }
.badge-shortlisted { background: var(--good-soft); color: var(--good); }
.badge-passed      { background: var(--btn2);      color: var(--ink2); }

/* ---------- Detail ---------- */
.sub-detail {
  min-width: 0;
}

.detail-empty {
  display: grid;
  place-items: center;
  min-height: 300px;
  border: 1px dashed var(--line);
  border-radius: 14px;
}

/* Header: title and badge on the left, a small toolbar on the right */
.detail-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px 20px;
  margin-bottom: 20px;
}

.detail-title {
  flex: 1 1 280px;
  min-width: 0;
}

.title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.title-row h2 {
  font-size: clamp(22px, 2.6vw, 28px);
  line-height: 1.15;
  margin: 0;
  overflow-wrap: anywhere;
}

.toolbar-buttons {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* Toolbar buttons: all the same size and style, like Apple's bordered buttons */
.tool {
  min-height: 36px;
  padding: 0 14px;
  border-radius: 8px;
  border: none;
  background: var(--btn2);
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
}

.tool:hover {
  background: var(--btn2-hover);
}

.tool-icon {
  width: 36px;
  padding: 0;
  font-size: 18px;
  line-height: 1;
}

/* Pop-up menus */
.menu-wrap {
  position: relative;
}

.menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 20;
  min-width: 200px;
  padding: 6px;
  border-radius: 12px;
  background: var(--surface);
  border: 0.5px solid var(--glass-sep);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.16), 0 1px 3px rgba(0, 0, 0, 0.08);
}

.menu-heading {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink3);
  padding: 6px 10px 4px;
}

.menu-item {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 36px;
  padding: 0 10px 0 30px;
  border: none;
  border-radius: 7px;
  background: none;
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  text-align: left;
  cursor: pointer;
  position: relative;
}

.menu-item:hover {
  background: var(--brand);
  color: #fff;
}

/* A tick next to the current choice */
.menu-item.checked::before {
  content: "✓";
  position: absolute;
  left: 10px;
  font-weight: 700;
}

.menu-sep {
  height: 0.5px;
  background: var(--line);
  margin: 5px 4px;
}

/* Small print, e.g. the release record */
.fine-print {
  margin: 16px 0 0;
  padding-top: 12px;
  border-top: 0.5px solid var(--line);
  font-size: 13px;
  color: var(--ink3);
}

.label {
  font-size: 13px;
  font-weight: 600;
  margin: 4px 0 8px;
}

.blind {
  margin: 16px 0 0;
  padding-top: 14px;
  border-top: 0.5px solid var(--line);
  color: var(--ink2);
  font-size: 15px;
}

/* Read / Pass as one wide segmented control */
.seg-wide {
  display: flex;
  margin-bottom: 10px;
}

.seg-wide button {
  flex: 1;
  min-height: 40px;
  font-size: 15px;
}

.seg-wide button.seg-read.on { color: var(--good); }

/* Claude's coverage: a row that opens and closes */
.disclosure {
  border-top: 0.5px solid var(--line);
  padding-top: 8px;
}

.disclosure-head {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  padding: 0 4px;
  border: none;
  background: none;
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
}

.chev {
  width: 14px;
  color: var(--ink3);
}

.disclosure-summary {
  margin-left: auto;
  font-weight: 500;
  color: var(--ink2);
  font-size: 15px;
}

.disclosure .stack {
  margin-top: 8px;
}

/* ---------- Cards ---------- */
.stack {
  display: grid;
  gap: 16px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 20px;
  min-width: 0;
}

.card-title {
  font-family: var(--body);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink2);
  margin: 0 0 10px;
}

.card-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.card-head .tally {
  margin: 0;
}

.sub-title {
  font-size: 13px;
  font-weight: 600;
  margin: 16px 0 8px;
}

.grid-2 {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
}

.grid-2.inner {
  gap: 24px;
}

.paras p {
  margin: 0;
}

.paras p + p {
  margin-top: 10px;
}

/* ---------- Your verdict ---------- */
.verdict-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}

.big-vote {
  min-height: 52px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  font: inherit;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
}

.big-vote-read.on { background: var(--good); border-color: var(--good); color: #fff; }
.big-vote-pass.on { background: var(--ink);  border-color: var(--ink);  color: var(--bg); }

.note {
  margin-bottom: 12px;
}

.your-verdict-foot {
  display: flex;
  align-items: center;
  gap: 14px;
}

.your-verdict-foot .btn {
  min-height: 40px;
}

/* ---------- The team's verdicts ---------- */
.team-verdicts {
  list-style: none;
  margin: 0;
  padding: 0;
}

.team-verdicts li {
  padding: 12px 0;
  border-bottom: 0.5px solid var(--line);
}

.team-verdicts li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.tv-line {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tv-name {
  font-weight: 600;
}

.tv-line .meta {
  margin-left: auto;
}

.tv-note {
  margin: 8px 0 0 38px;
  font-size: 15px;
}

.pill {
  font-size: 12px;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 999px;
}

.pill-read { background: var(--good-soft); color: var(--good); }
.pill-pass { background: var(--btn2);      color: var(--ink2); }

/* ---------- Claude's coverage (admins) ---------- */
.glance {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 16px;
}

.verdict-read { background: var(--good-soft); border-color: transparent; }
.verdict-pass { background: var(--btn2);      border-color: transparent; }

.verdict-word {
  font-family: var(--script);
  font-weight: 700;
  font-size: 40px;
  line-height: 1;
  margin: 2px 0 12px;
}

.verdict-read .verdict-word { color: var(--good); }
.verdict-pass .verdict-word { color: var(--ink2); }

.verdict .paras p:first-child {
  font-weight: 600;
}

.verdict .paras p {
  font-size: 15px;
}

.overall {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 14px;
}

.overall-num {
  font-family: var(--display);
  font-weight: 700;
  font-size: 40px;
  letter-spacing: -0.02em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.scores {
  display: grid;
  gap: 9px;
}

.score-row {
  display: grid;
  grid-template-columns: 92px 1fr 22px;
  gap: 10px;
  align-items: center;
  font-size: 14px;
}

.score-label {
  color: var(--ink2);
}

.score-bar {
  height: 6px;
  border-radius: 999px;
  background: var(--btn2);
  overflow: hidden;
}

.score-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--ink3);
}

.score-high .score-fill { background: var(--good); }
.score-low  .score-fill { background: var(--tung); }

.score-num {
  text-align: right;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.logline {
  font-size: 19px;
  line-height: 1.4;
  margin: 0;
}

.points {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.points li {
  position: relative;
  padding-left: 30px;
}

.points li::before {
  position: absolute;
  left: 0;
  top: 1px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
}

.points-good li::before { content: "+"; background: var(--good-soft); color: var(--good); }
.points-bad  li::before { content: "−"; background: var(--tung-soft); color: var(--tung); }
.points-warn li::before { content: "!"; background: var(--warn); color: var(--surface); }

.point-head {
  display: block;
  font-weight: 600;
}

.point-detail {
  display: block;
  color: var(--ink2);
  font-size: 15px;
}

.card-warn {
  background: var(--warn-soft);
  border-color: transparent;
}

.card-warn .card-title {
  color: var(--warn);
}

.card-warn .point-detail {
  color: var(--ink);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  background: var(--btn2);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 14px;
  font-weight: 500;
}

.state-card {
  display: grid;
  justify-items: center;
  gap: 12px;
  text-align: center;
  padding: 44px 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.state-card p {
  margin: 0;
}

.state-title {
  font-weight: 600;
  font-size: 17px;
}

.spinner {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 3px solid var(--btn2);
  border-top-color: var(--brand);
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .spinner { animation-duration: 3s; }
}

.coverage-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  color: var(--ink3);
  font-size: 13px;
  padding: 0 4px;
}

.facts {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 8px 16px;
  margin: 0;
  font-size: 15px;
}

.facts dt {
  color: var(--ink2);
}

.facts dd {
  margin: 0;
  overflow-wrap: anywhere;
}

/* =====================================================================
   Smaller screens
   ===================================================================== */
@media (max-width: 1100px) {
  .glance {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 960px) {
  .desk-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .review-layout {
    grid-template-columns: 1fr;
  }
  .sub-list {
    position: static;
    max-height: 45vh;
  }
  .toolbar input[type="search"] {
    max-width: none;
  }
  .grid-2,
  .grid-2.inner {
    grid-template-columns: 1fr;
  }
  .card {
    padding: 16px;
  }
  /* Toolbar sits under the title and spans the width */
  .toolbar-buttons {
    width: 100%;
  }
  .toolbar-buttons > .menu-wrap:first-child,
  .toolbar-buttons > .tool:not(.tool-icon) {
    flex: 1;
  }
  .toolbar-buttons > .menu-wrap:first-child .tool {
    width: 100%;
  }
}

@media (max-width: 560px) {
  .dash-brand {
    gap: 10px;
  }
  .dash-nav a {
    padding: 7px 10px;
  }
  #user-avatar {
    display: none; /* make room; "Sign out" stays */
  }
  .queue-row {
    flex-direction: column;
    align-items: stretch;
  }
  .queue-actions .vote {
    flex: 1;
  }
}

/* =====================================================================
   Script page: title, action row, feedback (latest layout)
   ===================================================================== */
.sub-detail > .title-row {
  margin-bottom: 16px;
}

/* --- Action row: utilities left, the decision right --- */
.action-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 4px 0;
}

.utilities {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.tool:disabled {
  opacity: 0.6;
  cursor: default;
}

/* Destructive: red text only, no fill, so it never competes with Read */
.tool.tool-danger-text {
  background: none;
  color: var(--tung);
}

.tool.tool-danger-text:hover {
  background: var(--tung-soft);
}

.tool.tool-danger {
  background: var(--tung-soft);
  color: var(--tung);
  font-weight: 600;
}

.decide {
  display: flex;
  gap: 8px;
}

/* Read: the ONE prominent button on the page */
.decide-read,
.decide-pass {
  min-height: 44px;
  min-width: 112px;
  padding: 0 24px;
  border-radius: 10px;
  font: inherit;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
}

.decide-read {
  background: var(--brand);
  color: #fff;
  border: 1px solid var(--brand);
}

.decide-read:hover {
  filter: brightness(0.92);
}

/* Pass: same size, quieter */
.decide-pass {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
}

.decide-pass:hover {
  background: var(--btn2);
}

/* Before you choose: both plain, so an undecided script never looks decided.
   Hovering hints at what each will do (Read: red tint, Pass: grey). */
.decide:not(.chose-read):not(.chose-pass) .decide-read {
  background: var(--surface);
  border-color: var(--line);
  color: var(--ink);
}

.decide:not(.chose-read):not(.chose-pass) .decide-read:hover {
  filter: none;
  background: var(--tung-soft);
  border-color: var(--tung-soft);
  color: var(--tung);
}

/* After you choose, the pair is symmetrical: your choice is filled
   (Read red, Pass black) and the other one turns plain and quiet. */
.decide.chose-pass .decide-pass {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg);
}

.decide.chose-pass .decide-read,
.decide.chose-read .decide-pass {
  background: var(--surface);
  border-color: var(--line);
  color: var(--ink2);
}

.decide.chose-pass .decide-read:hover,
.decide.chose-read .decide-pass:hover {
  filter: none;
  background: var(--btn2);
}

/* --- Feedback counts: read number in red when it leads --- */
.read-count.leading {
  color: var(--tung);
  font-weight: 700;
}

.tv-note p {
  margin: 0 0 4px;
}

.tv-note .btn-link {
  min-height: 0;
  padding: 0;
  font-size: 14px;
}

.note-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.tv-note .note {
  margin: 4px 0 8px;
}

/* --- Claude's coverage, below the feedback --- */
.section-title {
  font-size: 19px;
  margin: 12px 0 12px;
  letter-spacing: -0.01em;
}

/* --- Scripts list: search + Select, and select mode --- */
.toolbar-right {
  display: flex;
  gap: 8px;
  align-items: center;
}

.select-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: -4px 0 14px;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
}

#select-count {
  margin-right: auto;
  font-weight: 600;
}

.sub-item.selectable {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  cursor: pointer;
}

.sub-item.selectable input {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  flex-shrink: 0;
}

.sub-item-body {
  flex: 1;
  min-width: 0;
}

@media (max-width: 640px) {
  /* On phones the decision comes first, full width */
  .decide {
    order: -1;
    width: 100%;
  }
  .decide-read,
  .decide-pass {
    flex: 1;
  }
  .toolbar-right {
    width: 100%;
  }
}

/* --- Title header: title left, Send to + Delete right --- */
.head-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.detail-head .title-row {
  flex: 1 1 260px;
  min-width: 0;
  margin: 0;
}

/* A link-style button inside text, e.g. "Download PDF" */
.btn-link.link-inline {
  min-height: 0;
  padding: 0;
  font-size: 15px;
}

/* --- List header: "4 scripts · Select" --- */
.list-head {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 6px 16px;
  min-height: 40px;
  background: var(--surface);
  border-bottom: 0.5px solid var(--line);
}

.list-count {
  margin-right: auto;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink2);
}

.list-head .btn-link {
  min-height: 32px;
  font-size: 15px;
}

.btn-link.danger-link {
  color: var(--tung);
}

.btn-link:disabled {
  opacity: 0.4;
  cursor: default;
}

/* The writer's own logline, in the Submission card */
.writer-logline {
  margin: 0;
  font-size: 17px;
  line-height: 1.45;
}

/* --- Sign in: a card in the middle of the screen --- */
body.signed-out .site-header {
  display: none;
}

.login {
  min-height: 100vh;
  max-width: none;
  display: grid;
  place-items: center;
  padding: 96px 24px 48px;
  position: relative;
}

/* Logo in the top-left corner of the screen */
.login-corner {
  position: absolute;
  top: 22px;
  left: 28px;
  height: 52px;
  width: auto;
  border-radius: 6px;
}

/* "Script Desk" large across the page, sign-in right below */
.login-hero {
  width: 100%;
  max-width: 720px;
}

.login-hero h1 {
  font-size: clamp(56px, 10vw, 112px);
  letter-spacing: -0.045em;
  line-height: 0.95;
  margin: 0 0 40px;
}

.login-hero .google-btn {
  width: auto;
  min-width: 300px;
  min-height: 52px;
  padding: 0 28px;
  font-size: 17px;
}

@media (max-width: 560px) {
  .login-corner {
    height: 44px;
    left: 16px;
  }
  .login-hero .google-btn {
    width: 100%;
    min-width: 0;
  }
}

/* Google's standard button: white with a grey outline (dark grey in dark mode) */
.google-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  border-radius: 10px;
  border: 1px solid #dadce0;
  background: #ffffff;
  color: #1f1f1f;
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}

.google-btn:hover {
  background: #f7f8f8;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .google-btn {
    background: #131314;
    border-color: #8e918f;
    color: #e3e3e3;
  }
  :root:not([data-theme="light"]) .google-btn:hover {
    background: #1f1f20;
  }
}

.login-error:empty {
  display: none;
}

.login-error {
  margin-top: 14px;
}
