/* app.css — Podcast Vending Machine screens on the Modernist design system.
 *
 * Every value here comes from web/ds/styles.css tokens or from the handoff's
 * screen specs. Rules from the system that are non-negotiable and therefore
 * never overridden below: zero border radius anywhere, 2px rules between
 * major sections and 1px between rows, everything flush left including
 * button labels, imagery grayscale, accent used sparingly.
 */

/* ---------------------------------------------------------------- base --- */

* { margin: 0; padding: 0; box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: 'Archivo', system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  font-synthesis-weight: none; /* the variable font has real weights */
}

a { color: var(--color-accent-700); text-decoration: none; }
a:hover { text-decoration: underline; }

button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }

/* Themed focus, never the browser default. */
:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

::selection { background: var(--color-accent-200); color: var(--color-accent-800); }

img { max-width: 100%; display: block; }

/* Content photography and cover art print grayscale — system rule. */
.grayscale { filter: grayscale(1); }

.tabular { font-variant-numeric: tabular-nums; }

.mono {
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
}

/* The page is a fixed 1240px content column on desktop. */
.shell {
  max-width: 1240px;
  margin: 0 auto;
  background: var(--color-bg);
  min-height: 100vh;
}

.rule-2 { border-bottom: 2px solid var(--color-text); }

/* Kicker / eyebrow: every section label in the system. */
.kicker {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-neutral-700);
}
.kicker-accent { color: var(--color-accent); }

.view { display: none; }
.view.active { display: block; }

/* ----------------------------------------------------------------- nav --- */

.nav {
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 20px 40px;
  border-bottom: 2px solid var(--color-text);
}

.nav-brand {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.nav-links { display: flex; gap: 24px; align-items: center; }

.nav-link {
  font-size: 13px;
  font-weight: 500;
  color: var(--color-neutral-700);
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
  background: none;
}
.nav-link:hover { color: var(--color-text); }
.nav-link.active {
  color: var(--color-text);
  font-weight: 700;
  border-bottom-color: var(--color-accent);
}

.nav-right { margin-left: auto; display: flex; align-items: center; gap: 20px; }

/* Live status pill: square dot + machine state. */
.status-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-neutral-700);
}
.status-dot {
  width: 8px;
  height: 8px;
  background: var(--color-neutral-400);
  flex: none;
}
.status-pill.busy .status-dot { background: var(--color-accent); animation: pulse 1.2s ease-in-out infinite alternate; }
.status-pill.online .status-dot { background: var(--color-accent); }

@keyframes pulse { from { opacity: 1; } to { opacity: 0.25; } }

.btn-outline {
  border: 2px solid var(--color-text);
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 700;
  text-align: left;
  background: none;
}
.btn-outline:hover { background: var(--color-text); color: var(--color-bg); }

.user-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 2px solid var(--color-text);
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
}
.user-pill-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
/* A long display_name must not push the disconnect button off the header. */
.user-pill-name {
  max-width: 14ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.user-pill .disconnect { color: var(--color-neutral-700); font-weight: 700; }
.user-pill .disconnect:hover { color: var(--color-accent); }

/* ---------------------------------------------------------------- hero --- */

.hero {
  display: grid;
  grid-template-columns: 1fr 380px;
  border-bottom: 2px solid var(--color-text);
}

.hero-main { padding: 48px 40px 40px; }

.hero-title {
  font-size: 64px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 0.95;
  max-width: 14ch;
  margin: 16px 0;
}

.hero-body {
  font-size: 17px;
  line-height: 1.5;
  max-width: 52ch;
  text-wrap: pretty;
  color: var(--color-neutral-800);
}

/* Search bar: one 2px-bordered row, button flush against the input. */
.search-row {
  display: flex;
  border: 2px solid var(--color-text);
  margin-top: 32px;
  max-width: 620px;
}
.search-row input {
  flex: 1;
  border: none;
  background: none;
  padding: 14px 16px;
  font: inherit;
  font-size: 16px;
  color: var(--color-text);
  min-width: 0;
}
.search-row input::placeholder { color: var(--color-neutral-600); }
.search-row input:focus { outline: none; }
.search-row button {
  background: var(--color-accent);
  color: #fff;
  padding: 14px 24px;
  font-size: 15px;
  font-weight: 700;
  flex: none;
}
.search-row button:hover { background: var(--color-accent-600); }

.try-row { display: flex; align-items: center; gap: 12px; margin-top: 16px; flex-wrap: wrap; }
.chip {
  border: 1px solid var(--color-neutral-400);
  padding: 6px 12px;
  font-size: 13px;
  color: var(--color-neutral-800);
  background: none;
  text-align: left;
}
.chip:hover { border-color: var(--color-text); color: var(--color-text); }

/* --------------------------------------------------- the machine panel --- */

.machine {
  border-left: 2px solid var(--color-text);
  padding: 32px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
}

/* 7-bar equalizer: 5 accent bars animate, 2 ink bars stay put. */
.eq { display: flex; align-items: flex-end; gap: 4px; height: 56px; margin: 20px 0; }
.eq span {
  width: 10px;
  height: 100%;
  background: var(--color-accent);
  transform-origin: bottom;
}
/* Idle: bars rest at staggered heights so the panel still reads as an
   equalizer. Collapsing them all to the animation's floor looks broken. */
.eq span:nth-child(1) { transform: scaleY(0.45); }
.eq span:nth-child(2) { transform: scaleY(0.70); }
.eq span:nth-child(3) { transform: scaleY(0.35); }
.eq span:nth-child(4) { transform: scaleY(0.85); }
.eq span:nth-child(5) { transform: scaleY(0.50); }
.eq span:nth-child(6) { transform: scaleY(0.60); }
.eq span:nth-child(7) { transform: scaleY(0.40); }
.eq span.ink { background: var(--color-text); }
.machine.busy .eq span:not(.ink) {
  animation: eqbar ease-in-out infinite alternate;
}
.machine.busy .eq span:nth-child(1) { animation-duration: 0.9s; }
.machine.busy .eq span:nth-child(2) { animation-duration: 1.3s; }
.machine.busy .eq span:nth-child(4) { animation-duration: 0.7s; }
.machine.busy .eq span:nth-child(6) { animation-duration: 1.5s; }
.machine.busy .eq span:nth-child(7) { animation-duration: 1.1s; }

@keyframes eqbar { from { transform: scaleY(0.25); } to { transform: scaleY(1); } }

.machine-step { font-size: 15px; font-weight: 700; }
.machine-detail { font-size: 13px; color: var(--color-neutral-700); margin-top: 4px; text-wrap: pretty; }

.machine-foot { border-top: 2px solid var(--color-text); padding-top: 20px; }
.machine-slot { font-size: 32px; font-weight: 800; letter-spacing: -0.02em; margin: 4px 0 16px; }

.btn-primary-block {
  display: block;
  width: 100%;
  background: var(--color-accent);
  color: #fff;
  padding: 14px 20px;
  font-size: 16px;
  font-weight: 700;
  text-align: left; /* flush left even when wider than the label */
}
.btn-primary-block:hover { background: var(--color-accent-600); }
.btn-primary-block:disabled { opacity: 0.45; cursor: not-allowed; }

.machine-note { font-size: 12px; color: var(--color-neutral-700); margin-top: 12px; }

/* --------------------------------------------------------- filter bar --- */

.filter-bar {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 14px 40px;
  border-bottom: 2px solid var(--color-text);
  flex-wrap: wrap;
}
.filter-item {
  font-size: 13px;
  font-weight: 500;
  color: var(--color-neutral-700);
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
  background: none;
  text-align: left;
}
.filter-item:hover { color: var(--color-text); }
.filter-item.active { color: var(--color-text); font-weight: 700; border-bottom-color: var(--color-accent); }
.filter-sort { margin-left: auto; font-size: 12px; color: var(--color-neutral-700); font-weight: 500; }

/* ----------------------------------------------------- featured strip --- */

.featured { display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: 2px solid var(--color-text); }
.featured-cell { padding: 24px; border-right: 1px solid var(--color-neutral-400); cursor: pointer; }
.featured-cell:last-child { border-right: none; }
.featured-cell:hover .feat-title { color: var(--color-accent-700); }

.cover {
  aspect-ratio: 1;
  width: 100%;
  background: repeating-linear-gradient(135deg, #d7d3d3 0 8px, #bab6b6 8px 16px);
  filter: grayscale(1);
  position: relative;
  object-fit: cover;
}
.cover-wrap { position: relative; }
.cover-chip {
  position: absolute;
  left: 8px;
  bottom: 8px;
  background: var(--color-bg);
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 10px;
  padding: 2px 6px;
  color: var(--color-neutral-700);
}
.feat-title { font-size: 18px; font-weight: 700; line-height: 1.2; margin: 6px 0 4px; letter-spacing: -0.01em; }
.feat-meta { font-size: 12px; font-weight: 500; color: var(--color-neutral-700); }

/* -------------------------------------------------------- full index --- */

.index-section { padding: 24px 40px 40px; }
.index-head { margin-bottom: 12px; }

.index-row {
  display: grid;
  grid-template-columns: 56px 1fr 150px 90px 110px 90px;
  gap: 16px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--color-neutral-400);
  cursor: pointer;
  text-align: left;
  width: 100%;
}
.index-row:hover .idx-title { color: var(--color-accent-700); }
.idx-num { font-size: 13px; font-weight: 700; color: var(--color-neutral-500); }
.idx-title { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.idx-meta { font-size: 13px; color: var(--color-neutral-700); }
.idx-action {
  font-size: 13px;
  font-weight: 700;
  color: var(--color-accent-700);
  text-align: right;
  background: none;
  padding: 0;
  justify-self: end;
}
.idx-action:hover { color: var(--color-accent); text-decoration: underline; }
.idx-generating { color: var(--color-accent); font-weight: 700; font-size: 13px; }

.empty {
  padding: 40px 0;
  font-size: 15px;
  color: var(--color-neutral-700);
}

/* ------------------------------------------------------ poster close --- */

.poster {
  background: var(--color-accent);
  color: #fff;
  padding: 56px 40px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
}
.poster-statement {
  font-size: 44px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.0;
  max-width: 22ch;
}
.poster .btn-poster {
  border: 2px solid #fff;
  color: #fff;
  padding: 12px 20px;
  font-size: 15px;
  font-weight: 700;
  flex: none;
  text-align: left;
}
.poster .btn-poster:hover { background: #fff; color: var(--color-accent); }

/* --------------------------------------------------- search results --- */

.results-head { padding: 32px 40px 20px; }
.results-count { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; }
.results-for { font-size: 15px; color: var(--color-neutral-700); margin-top: 4px; }
.sort-tabs { display: flex; gap: 20px; margin-top: 16px; }

.result-row {
  display: grid;
  grid-template-columns: 96px 1fr 120px 110px;
  gap: 24px;
  padding: 18px 40px;
  border-bottom: 1px solid var(--color-neutral-400);
  align-items: start;
  cursor: pointer;
  text-align: left;
  width: 100%;
}
.result-row:hover .res-title { color: var(--color-accent-700); }
.res-title { font-size: 21px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.2; margin: 4px 0; }
.res-snippet { font-size: 14px; color: var(--color-neutral-800); max-width: 70ch; text-wrap: pretty; }
.res-match { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; }
.res-match-label { font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--color-neutral-700); }
.res-action {
  font-size: 13px;
  font-weight: 700;
  color: var(--color-accent-700);
  background: none;
  padding: 0;
  display: block;
  margin-top: 6px;
  text-align: left;
}
.res-action:hover { color: var(--color-accent); text-decoration: underline; }
.res-meta { font-size: 12px; font-weight: 500; color: var(--color-neutral-700); }

/* -------------------------------------------------- episode detail 2a --- */

.crumbs {
  padding: 14px 40px;
  border-bottom: 1px solid var(--color-neutral-400);
  font-size: 14px;
  color: var(--color-neutral-700);
}
.crumbs a { color: var(--color-accent-700); }

.detail { display: grid; grid-template-columns: 420px 1fr; }
.detail-left { padding: 40px; border-right: 2px solid var(--color-text); }
.detail-right { padding: 40px; }

/* 2x2 stats: 1px background showing through 1px gaps reads as hairlines. */
.stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--color-neutral-400);
  margin-top: 24px;
}
.stat { background: var(--color-bg); padding: 16px; }
.stat-label { font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--color-neutral-700); }
.stat-value { font-size: 19px; font-weight: 800; letter-spacing: -0.02em; margin-top: 4px; }

.detail-title { font-size: 46px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.0; margin: 12px 0 16px; }
.detail-desc { font-size: 17px; line-height: 1.5; color: var(--color-neutral-800); text-wrap: pretty; max-width: 60ch; }

.action-row { display: flex; gap: 12px; margin-top: 28px; flex-wrap: wrap; }
.btn-play {
  background: var(--color-accent);
  color: #fff;
  padding: 12px 22px;
  font-size: 16px;
  font-weight: 700;
  text-align: left;
}
.btn-play:hover { background: var(--color-accent-600); }
.btn-action {
  border: 2px solid var(--color-text);
  padding: 12px 20px;
  font-size: 16px;
  font-weight: 700;
  text-align: left;
}
.btn-action:hover { background: var(--color-text); color: var(--color-bg); }

.chapter-row {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--color-neutral-300);
}
.chapter-time { font-size: 13px; font-weight: 700; color: var(--color-neutral-500); }
.chapter-title { font-size: 15px; font-weight: 500; }

.detail-foot {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  border-bottom: 2px solid var(--color-text);
  padding: 32px 40px;
}
.accuracy-score { font-size: 40px; font-weight: 800; letter-spacing: -0.03em; }
.dist-bar { display: flex; gap: 3px; height: 8px; margin: 12px 0; }
.dist-bar span { display: block; }
.accuracy-note { font-size: 14px; color: var(--color-neutral-800); text-wrap: pretty; }

.requester { display: flex; align-items: center; gap: 12px; margin-top: 8px; }
.avatar { width: 44px; height: 44px; background: var(--color-neutral-400); filter: grayscale(1); flex: none; }
/* The same class is used for a real profile picture, which must fill the
   square rather than stretch. Grayscale is inherited deliberately: it is
   what the profile page already does to avatars. */
img.avatar { object-fit: cover; }

/* --------------------------------------------------------- player bar --- */

.player {
  position: sticky;
  bottom: 0;
  background: var(--color-text);
  color: var(--color-bg);
  padding: 16px 40px;
  display: none;
  align-items: center;
  gap: 20px;
  z-index: 20;
}
.player.active { display: flex; }
.player-transport {
  width: 44px;
  height: 44px;
  background: var(--color-accent);
  color: #fff;
  font-size: 18px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
}
.player-transport:hover { background: var(--color-accent-600); }
.player-title { font-size: 14px; font-weight: 700; }
.player-mid { flex: 1; min-width: 0; }
.player-track { height: 3px; background: var(--color-neutral-700); margin-top: 8px; cursor: pointer; }
.player-fill { height: 100%; background: var(--color-accent); width: 0; }
.player-time { font-size: 13px; font-weight: 500; color: var(--color-neutral-400); flex: none; }
.player-zap { color: var(--color-accent-500); font-size: 13px; font-weight: 700; flex: none; }
.player-expand {
  color: var(--color-neutral-400);
  font-size: 18px;
  line-height: 1;
  padding: 6px 8px;
  flex: none;
}
.player-expand:hover { color: var(--color-bg); }
.player-mid { cursor: pointer; }
.player-close { color: var(--color-neutral-500); font-size: 16px; flex: none; }
.player-close:hover { color: var(--color-bg); }

/* ------------------------------------------------------------- modal --- */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(32, 30, 29, 0.55);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 50;
}
.modal-backdrop.active { display: flex; }
.modal {
  background: var(--color-bg);
  width: 608px;
  max-width: 100%;
  max-height: 90vh;
  overflow-y: auto;
}
.modal-head { padding: 24px 32px; border-bottom: 2px solid var(--color-text); display: flex; justify-content: space-between; align-items: center; }
.modal-title { font-size: 32px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.05; }
.modal-body { padding: 32px; }

.option-row {
  display: grid;
  grid-template-columns: 1fr 96px;
  gap: 16px;
  align-items: center;
  border: 2px solid var(--color-text);
  padding: 20px;
  margin-bottom: 16px;
  cursor: pointer;
  text-align: left;
  width: 100%;
}
.option-row:hover { background: var(--color-surface); }
.option-title { font-size: 17px; font-weight: 800; }
.option-desc { font-size: 14px; color: var(--color-neutral-700); margin-top: 4px; text-wrap: pretty; }
.tag-out {
  border: 1px solid var(--color-neutral-400);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  padding: 4px 8px;
  text-align: center;
  color: var(--color-neutral-700);
}
.tag-out.safest { color: var(--color-accent-700); border-color: var(--color-accent-700); }

.nsec-demoted { border-top: 2px solid var(--color-text); padding-top: 24px; margin-top: 8px; }
.nsec-row { display: flex; gap: 0; margin: 12px 0 8px; border: 2px solid var(--color-text); }
.nsec-row input {
  flex: 1;
  border: none;
  background: none;
  padding: 12px 14px;
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 13px;
  min-width: 0;
  color: var(--color-text);
}
.nsec-row input:focus { outline: none; }
.nsec-row button { background: var(--color-text); color: var(--color-bg); padding: 12px 20px; font-size: 14px; font-weight: 700; flex: none; }
.caveat { font-size: 13px; color: var(--color-neutral-700); text-wrap: pretty; }
.form-error { color: var(--color-accent-700); font-size: 13px; font-weight: 600; min-height: 18px; }

/* ------------------------------------------------------ request form --- */

.request-panel { padding: 40px; border-bottom: 2px solid var(--color-text); }
.field-label { display: block; margin-bottom: 8px; }
.topic-input {
  width: 100%;
  border: 2px solid var(--color-text);
  background: none;
  padding: 16px;
  font: inherit;
  font-size: 22px;
  font-weight: 600;
  min-height: 80px;
  resize: vertical;
  color: var(--color-text);
}
.topic-input:focus { outline: none; border-color: var(--color-accent); }
.helper { font-size: 14px; color: var(--color-neutral-700); margin-top: 8px; text-wrap: pretty; max-width: 60ch; }

.seg-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; margin-top: 28px; max-width: 720px; }
.seg { display: flex; border: 2px solid var(--color-text); }
.seg-opt {
  flex: 1;
  padding: 12px;
  font-size: 14px;
  font-weight: 500;
  border-left: 2px solid var(--color-text);
  background: none;
  text-align: left;
}
.seg-opt:first-child { border-left: none; }
.seg-opt.selected { background: var(--color-text); color: var(--color-bg); font-weight: 700; }

/* ------------------------------------------------- mobile chrome (3a) --- */
/* Hidden by default; the breakpoint at the bottom of this file turns the
   phone layout on. Structure differs from desktop, not just spacing. */

.tabbar { display: none; }
.m-search { display: none; }
.resume { display: none; }
.drive-band { display: none; }
.yours-filters { display: none; }

/* Resume block — the largest target on the phone home screen. */
.resume { padding: 20px; border-bottom: 2px solid var(--color-text); }
.resume-row { display: flex; gap: 16px; align-items: flex-start; margin: 12px 0; }
.resume-cover { width: 88px; flex: none; }
.resume-cover .cover { width: 88px; height: 88px; }
.resume-meta { min-width: 0; }
.resume-title {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.2;
}
.resume-sub { font-size: 13px; color: var(--color-neutral-700); margin-top: 6px; }
.resume-track { height: 4px; background: var(--color-neutral-300); margin-bottom: 16px; }
.resume-fill { height: 100%; background: var(--color-accent); width: 0; }
.btn-resume {
  display: block;
  width: 100%;
  background: var(--color-accent);
  color: #fff;
  padding: 18px 20px;
  font-size: 18px;
  font-weight: 800;
  text-align: left;
}
.btn-resume:hover { background: var(--color-accent-600); }

/* Mobile search row (3a): 2px border, ink 'Ask' button flush against it. */
.m-search { margin: 0; padding: 16px 20px; }
.m-search input {
  flex: 1;
  border: none;
  background: none;
  padding: 12px 14px;
  font: inherit;
  font-size: 16px;   /* 16px avoids iOS zoom-on-focus */
  color: var(--color-text);
  min-width: 0;
}
.m-search input:focus { outline: none; }
.m-search button {
  background: var(--color-text);
  color: var(--color-bg);
  padding: 12px 20px;
  font-size: 15px;
  font-weight: 700;
  flex: none;
}

/* Tab bar */
.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--color-text);
  border-top: 2px solid var(--color-neutral-700);
  z-index: 30;
  grid-template-columns: repeat(5, 1fr);
  padding: 12px 0 20px; /* bottom padding clears the home indicator */
}
.tab {
  font-size: 11px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--color-neutral-500);
  text-align: center;
  padding: 4px 0;
}
.tab.active { color: var(--color-accent); }

/* DRIVE chip — same position on every screen (4b) */
.btn-drive {
  border: 2px solid var(--color-accent-500);
  color: var(--color-accent-500);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  padding: 6px 10px;
  flex: none;
}
.btn-drive:hover { background: var(--color-accent-500); color: var(--color-text); }

/* Drive band (3b) */
.drive-band {
  background: var(--color-accent-200);
  border-top: 2px solid var(--color-text);
  border-bottom: 2px solid var(--color-text);
  padding: 16px 20px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.drive-band-title { font-size: 14px; font-weight: 800; color: var(--color-accent-800); }
.drive-band-sub { font-size: 13px; color: var(--color-accent-800); margin-top: 2px; }
.btn-drive-get {
  background: var(--color-accent);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  padding: 10px 16px;
  flex: none;
  text-align: left;
}
.btn-drive-get:disabled { opacity: 0.45; cursor: not-allowed; }

/* Yours filters (3b) */
.yours-filters { gap: 8px; padding: 16px 20px; flex-wrap: wrap; }
.yours-filter {
  border: 2px solid var(--color-text);
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 500;
  text-align: left;
}
.yours-filter.selected { background: var(--color-text); color: var(--color-bg); font-weight: 700; }

/* Mobile episode rows (3a): 64px cover, 44x44 play target */
.m-row {
  display: grid;
  grid-template-columns: 64px 1fr 44px;
  gap: 12px;
  align-items: center;
  padding: 12px 20px;
  border-bottom: 1px solid var(--color-neutral-400);
  width: 100%;
  text-align: left;
}
.m-row .cover { width: 64px; height: 64px; }
.m-title { font-size: 16px; font-weight: 700; line-height: 1.25; letter-spacing: -0.01em; }
.m-meta { font-size: 12px; color: var(--color-neutral-700); margin-top: 4px; }
.m-play {
  width: 44px;
  height: 44px;
  border: 2px solid var(--color-text);
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.m-play:hover { background: var(--color-text); color: var(--color-bg); }
.m-status { font-size: 12px; font-weight: 700; color: var(--color-accent-700); text-align: center; }

/* Transport glyphs are text stand-ins for Lucide icons. Force text
   presentation so the emoji-capable ones (notably the bolt) render
   monochrome — the system forbids tinted imagery, and a yellow emoji in an
   otherwise two-colour interface reads as a bug. */
.np-zap, .player-zap, .drive-glyph, .np-step, .np-play, .player-transport {
  font-variant-emoji: text;
  font-family: 'Archivo', system-ui, sans-serif;
}

/* While a dark screen is up, the phone chrome you came from steps aside. */
body.immersive .tabbar,
body.immersive .player,
body.immersive .nav { display: none !important; }
body.immersive { padding-bottom: 0; }

/* Lift the player above a full-screen view that would otherwise bury it.
   Fixed rather than sticky: the overlay takes content out of flow, so a
   sticky bar has nothing left to stick to and lands mid-page. */
body.overlay-view .player {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
}
/* And reserve room, or the bar covers the last of the scrollable content. */
body.overlay-view .screen-dark.active { padding-bottom: 100px; }

/* ------------------------------------------- now playing / drive (3c,3d) */

/* Both screens take over the viewport and invert to the dark ground. They
   are full-bleed, so they escape the shell's max-width and its padding. */
.screen-dark.active {
  display: flex;
  flex-direction: column;
  position: fixed;
  inset: 0;
  background: var(--color-text);
  color: var(--color-bg);
  z-index: 40;
  overflow-y: auto;
}

/* -- 3c now playing -- */

/* The screen is designed at 390px wide. On a desktop it is centred in a
   column of about that width rather than stretched, so the cover stays a
   sane size and the layout reads as intended. */
@media (min-width: 721px) {
  #viewPlaying.active { align-items: center; }
  #viewPlaying > * { width: 100%; max-width: 520px; }
}

.np-top {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  flex: none;
}
.np-chevron { font-size: 26px; line-height: 1; color: var(--color-bg); }

/* viewDelivery was the only screen-dark view with no way out: the header nav
   is hidden on a full-screen takeover, so a customer arriving from a DM was
   stranded with nothing but the browser back button — which did not work
   either (see syncHash). viewPlaying and viewDrive already had one. */
.deliver-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 20px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 700;
  color: var(--color-bg);
  background: transparent;
  border: 2px solid var(--color-neutral-700);
  cursor: pointer;
}
.deliver-back:hover { border-color: var(--color-bg); }

.np-kicker { color: var(--color-neutral-500); }
.np-spacer { flex: 1; }

.np-cover { width: 100%; flex: none; }
.np-cover .cover { width: 100%; aspect-ratio: 1; height: auto; }

.np-body { padding: 20px; flex: 1; }
.np-cat { color: var(--color-accent-500); }
.np-title {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 8px 0;
}
.np-prov { font-size: 14px; color: var(--color-neutral-500); }

.np-track { height: 5px; background: var(--color-neutral-700); margin: 24px 0 8px; cursor: pointer; }
.np-fill { height: 100%; background: var(--color-accent); width: 0; }
.np-times {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-neutral-500);
}

.np-transport {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 28px;
}
.np-skip {
  width: 56px;
  height: 56px;
  border: 2px solid var(--color-neutral-700);
  color: var(--color-bg);
  font-size: 15px;
  font-weight: 700;
  flex: none;
}
.np-skip:hover { border-color: var(--color-bg); }
.np-step { width: 56px; height: 56px; color: var(--color-bg); font-size: 24px; flex: none; }
.np-play {
  width: 88px;
  height: 88px;
  background: var(--color-accent);
  color: #fff;
  font-size: 28px;
  flex: none;
}
.np-play:hover { background: var(--color-accent-600); }

.np-foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px 28px;
  border-top: 2px solid var(--color-neutral-700);
  font-size: 14px;
  font-weight: 500;
  color: var(--color-bg);
  flex: none;
}
.np-foot button { color: inherit; }
.np-zap { color: var(--color-accent-500); font-weight: 700; }

/* -- 3d drive mode -- */

.drive-head { padding: 20px 20px 16px; flex: none; }
.drive-kicker { color: var(--color-accent); }
.drive-title {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 8px 0;
}
.drive-left { font-size: 17px; color: var(--color-neutral-500); }
.drive-track { height: 6px; background: var(--color-neutral-700); margin-top: 16px; }
.drive-fill { height: 100%; background: var(--color-accent); width: 0; }

/* The 2x2 grid fills the remaining height. 2px gaps let the rule colour
   show through, so the cells read as a divided field rather than buttons. */
.drive-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-auto-rows: 1fr;
  gap: 2px;
  background: var(--color-neutral-700);
  border-top: 2px solid var(--color-neutral-700);
  flex: 1;
  min-height: 400px;
}
.drive-cell {
  background: var(--color-text);
  color: var(--color-bg);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 8px;
  padding: 20px;
  /* Nothing here should be a small target at 60mph. */
  min-height: 180px;
  text-align: left;
}
.drive-cell:active { background: var(--color-neutral-900); }
.drive-primary { background: var(--color-accent); color: #fff; }
.drive-primary:active { background: var(--color-accent-600); }
.drive-glyph { font-size: 46px; line-height: 1; font-weight: 700; }
.drive-label {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.drive-foot {
  display: flex;
  justify-content: space-between;
  padding: 16px 20px 28px;
  border-top: 2px solid var(--color-neutral-700);
  font-size: 14px;
  font-weight: 700;
  color: var(--color-neutral-500);
  flex: none;
}
.drive-foot button { color: inherit; }
.drive-foot button:hover { color: var(--color-bg); }

/* -- 4a car browser, landscape -- */

/* One drive view, two layouts. Portrait is the default; landscape on a wide
   enough screen becomes the car browser. Rotating a phone in a mount swaps
   them with no state change. */
.drive-car { display: none; }
.drive-portrait { display: flex; flex-direction: column; flex: 1; min-height: 0; }

@media (orientation: landscape) and (min-width: 900px) {
  .drive-portrait { display: none; }
  .drive-car {
    display: grid;
    grid-template-columns: 360px 1fr 360px;
    flex: 1;
    min-height: 0;
  }
}

.car-left {
  padding: 24px;
  border-right: 2px solid var(--color-neutral-700);
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.car-cover { width: 100%; flex: none; }
.car-cover .cover { width: 100%; aspect-ratio: 1; height: auto; }
.car-kicker { color: var(--color-accent-500); margin-top: 16px; }
.car-title {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 6px 0 10px;
}
.car-sub {
  font-size: 14px;
  color: var(--color-neutral-500);
  border-top: 2px solid var(--color-neutral-700);
  padding-top: 10px;
  margin-top: auto;
}

.car-center {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 0;
}
.car-track { height: 8px; background: var(--color-neutral-700); flex: none; cursor: pointer; }
.car-fill { height: 100%; background: var(--color-accent); width: 0; }
.car-times {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 18px;
  font-weight: 700;
  color: var(--color-neutral-500);
  flex: none;
}
/* Remaining is the number that matters at a glance, so it stays full ink. */
.car-left-big { color: var(--color-bg); font-weight: 700; }

.car-transport { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; flex: 1; min-height: 0; }
.car-bottom { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; flex: none; height: 120px; }
.car-cell {
  background: var(--color-neutral-900);
  color: var(--color-bg);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 6px;
  padding: 16px;
  text-align: left;
}
.car-cell:active { background: var(--color-text); }
.car-primary { background: var(--color-accent); color: #fff; }
.car-primary:active { background: var(--color-accent-600); }
.car-glyph { font-size: 56px; line-height: 1; font-weight: 700; }
.car-label {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.car-zap .car-glyph, .car-zap .car-label { color: var(--color-accent-500); }

.car-right {
  padding: 24px;
  border-left: 2px solid var(--color-neutral-700);
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.car-upnext-kicker { color: var(--color-neutral-500); }
.car-upnext { margin-top: 12px; overflow-y: auto; }
.car-up-row {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--color-neutral-700);
  width: 100%;
  text-align: left;
}
.car-up-row .cover { width: 52px; height: 52px; }
.car-up-title { font-size: 17px; font-weight: 700; line-height: 1.2; color: var(--color-bg); }
.car-up-meta { font-size: 12px; color: var(--color-neutral-500); }
.car-foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 16px;
  border-top: 2px solid var(--color-neutral-700);
  font-size: 14px;
  font-weight: 700;
  color: var(--color-neutral-500);
}
.car-foot button { color: inherit; }
.car-foot button:hover { color: var(--color-bg); }

/* -- 4b toggles -- */

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 0;
  border-bottom: 1px solid var(--color-neutral-300);
  cursor: pointer;
}
.toggle-title { font-size: 17px; font-weight: 700; display: block; }
.toggle-desc { font-size: 14px; color: var(--color-neutral-700); display: block; margin-top: 2px; }
.toggle { flex: none; position: relative; }
.toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.toggle-track {
  display: block;
  width: 56px;
  height: 32px;
  background: var(--color-neutral-300);
  position: relative;
}
.toggle-track::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 26px;
  height: 26px;
  background: var(--color-bg);
  transition: transform 0.12s ease;
}
.toggle input:checked + .toggle-track { background: var(--color-accent); }
.toggle input:checked + .toggle-track::after { transform: translateX(24px); }
.toggle input:focus-visible + .toggle-track { outline: 2px solid var(--color-accent); outline-offset: 2px; }

/* --------------------------------------------------------- responsive --- */

@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; }
  .machine { border-left: none; border-top: 2px solid var(--color-text); }
  .hero-title { font-size: 44px; }
  .featured { grid-template-columns: repeat(2, 1fr); }
  .featured-cell:nth-child(2n) { border-right: none; }
  .detail { grid-template-columns: 1fr; }
  .detail-left { border-right: none; border-bottom: 2px solid var(--color-text); }
  .detail-foot { grid-template-columns: 1fr; }
  .index-row { grid-template-columns: 40px 1fr 90px; }
  .index-row .idx-hide { display: none; }
  .result-row { grid-template-columns: 72px 1fr; padding: 16px 20px; }
  .result-row .res-hide { display: none; }
  .nav, .hero-main, .filter-bar, .index-section, .results-head, .poster,
  .detail-left, .detail-right, .detail-foot, .request-panel, .player, .crumbs {
    padding-left: 20px;
    padding-right: 20px;
  }
  .poster { flex-direction: column; align-items: flex-start; }
  .poster-statement { font-size: 32px; }
  .detail-title { font-size: 34px; }
  .seg-pair { grid-template-columns: 1fr; gap: 20px; }
}

/* ------------------------------------------------------ phone (3a/3b) --- */
/* Below this width the app becomes the mobile design: a listening app with a
   tab bar and a mini player, not the desktop layout scaled down. The hero,
   machine panel and featured strip are desktop affordances for *asking*, and
   the handoff is explicit that the phone is not for asking — so they go, and
   ASK becomes a tab. */

@media (max-width: 720px) {
  body { padding-bottom: 132px; }  /* clears the mini player + tab bar */

  .tabbar { display: grid; }
  .m-search { display: flex; border: 2px solid var(--color-text); margin: 16px 20px; padding: 0; }
  .resume[data-has-resume="1"] { display: block; }
  .drive-band { display: flex; }
  .yours-filters { display: flex; }

  /* Desktop-only furniture. The poster stays: it carries the only request
     path left once the hero is hidden, and the tab that used to do that job
     is now the inbox. It is compacted rather than dropped. */
  .hero,
  .featured,
  .filter-bar,
  .nav-links,
  .status-pill { display: none; }

  .poster { padding: 28px 20px; gap: 16px; }
  .poster-statement { font-size: 26px; max-width: none; }
  .poster .btn-poster { width: 100%; padding: 16px 20px; font-size: 16px; }

  /* App bar: wordmark left, identity right. */
  .nav { padding: 16px 20px; gap: 12px; }
  .nav-brand { font-size: 17px; }
  .nav-right { gap: 12px; }

  .index-section { padding: 0 0 24px; }
  .index-head { padding: 16px 20px 8px; }

  /* The desktop index row is replaced by .m-row in markup on this breakpoint. */
  .results-head { padding: 20px; }
  .results-count { font-size: 34px; }

  /* Mini player (3a): compact, tappable, opens Now Playing. */
  .player { position: fixed; left: 0; right: 0; bottom: 72px; padding: 10px 16px; gap: 12px; }
  /* The tab bar is hidden beneath the overlay, so there is nothing to clear. */
  body.overlay-view .player { bottom: 0; }
  .player-transport { width: 40px; height: 40px; font-size: 16px; }
  .player-title {
    font-size: 13px;
    /* A long error must not grow the bar into the tab bar. */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .player-track { height: 2px; }
  .player-mid { cursor: pointer; }
  .player-zap, .player-close { display: none; }
  .btn-drive { padding: 6px 8px; font-size: 11px; }

  .detail-title { font-size: 28px; }
  .modal { max-height: 86vh; }
}

/* ============================================ 5d messages + delivery === */

.msg-row {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 20px;
  padding: 20px 40px;
  border-bottom: 1px solid var(--color-neutral-400);
  align-items: start;
}
.msg-card {
  border: 2px solid var(--color-text);
  padding: 0;
  max-width: 520px;
  min-width: 0;      /* a grid child will otherwise refuse to shrink */
  overflow: hidden;  /* belt and braces for anything else long */
}
.msg-card .cover { width: 100%; aspect-ratio: 1; height: auto; }
.msg-body { padding: 20px; }
.msg-title { font-size: 20px; font-weight: 800; letter-spacing: -0.01em; line-height: 1.15; overflow-wrap: anywhere; }
/* Delivery DMs carry blob URLs ~100 characters long with no spaces or
   hyphens, so nothing in them is a legal break point and the text ran
   straight out of the card. `anywhere` lets a URL break mid-string, which is
   the only way to contain it.
   `pre-line` keeps the message's own line breaks: the DM is written as
   Title / Cover / Listen / Library on separate lines, and collapsing them
   turned a readable note into one unbroken paragraph. */
.msg-text {
  font-size: 15px;
  line-height: 1.5;
  margin-top: 10px;
  text-wrap: pretty;
  white-space: pre-line;
  overflow-wrap: anywhere;
  color: var(--color-neutral-800);
}
.msg-meta { font-size: 12px; font-weight: 500; color: var(--color-neutral-700); margin-top: 10px; }
.msg-sender { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.msg-sender-avatar { width: 32px; height: 32px; background: var(--color-accent); flex: none; }
.msg-sender-name { font-size: 13px; font-weight: 700; }
.msg-sender-npub { font-size: 12px; color: var(--color-neutral-700); }
.msg-listen {
  display: block;
  width: 100%;
  background: var(--color-accent);
  color: #fff;
  padding: 14px 20px;
  font-size: 16px;
  font-weight: 700;
  text-align: left;
}
.msg-listen:hover { background: var(--color-accent-600); }
.msg-after { font-size: 13px; color: var(--color-neutral-700); margin-top: 12px; max-width: 520px; text-wrap: pretty; }

/* Delivery landing page — dark, shareable, reached from the DM link. */
.deliver-wrap { max-width: 826px; margin: 0 auto; padding: 40px; width: 100%; }
.deliver-kicker { color: var(--color-accent-500); }
.deliver-grid { display: grid; grid-template-columns: 280px 1fr; gap: 32px; margin-top: 20px; }
.deliver-cover { width: 280px; }
.deliver-cover .cover { width: 280px; height: 280px; }
.deliver-title { font-size: 44px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.0; }
.deliver-desc { font-size: 16px; line-height: 1.5; color: var(--color-neutral-400); margin-top: 12px; text-wrap: pretty; }
.deliver-note { font-size: 14px; color: var(--color-neutral-500); margin-top: 16px; }
.deliver-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-top: 2px solid var(--color-neutral-700);
  margin-top: 32px;
  padding-top: 20px;
  flex-wrap: wrap;
}
.deliver-rate-label { font-size: 15px; font-weight: 700; }
.deliver-rate { display: flex; gap: 8px; }
.deliver-rate button {
  width: 48px;
  height: 48px;
  border: 2px solid var(--color-neutral-700);
  color: var(--color-bg);
  font-size: 16px;
  font-weight: 700;
}
.deliver-rate button:hover { border-color: var(--color-accent); color: var(--color-accent-500); }

/* ================================================= 5b public profile === */

.profile-head {
  display: grid;
  grid-template-columns: 1fr 420px;
  border-bottom: 2px solid var(--color-text);
}
.profile-id { display: flex; gap: 20px; padding: 40px; align-items: flex-start; }
.profile-avatar { width: 88px; height: 88px; }
.profile-name { font-size: 40px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.05; }
.profile-npub { font-size: 13px; color: var(--color-neutral-700); margin-top: 6px; word-break: break-all; }
.profile-since { font-size: 14px; color: var(--color-neutral-700); margin-top: 8px; }
.profile-earn { padding: 40px; border-left: 2px solid var(--color-text); }
.profile-earn-value { font-size: 46px; font-weight: 800; letter-spacing: -0.03em; }
.profile-earn-note { font-size: 13px; color: var(--color-neutral-700); }
.profile-chart { display: flex; align-items: flex-end; gap: 4px; height: 80px; margin-top: 16px; }
.profile-chart span { flex: 1; background: var(--color-neutral-400); min-height: 2px; }
.profile-chart span.recent { background: var(--color-accent); }

.profile-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--color-neutral-400);
  border-bottom: 2px solid var(--color-text);
}
.profile-stat { background: var(--color-bg); padding: 24px; }
.profile-stat-value { font-size: 32px; font-weight: 800; letter-spacing: -0.02em; margin-top: 4px; }
.profile-stat-note { font-size: 12px; color: var(--color-neutral-700); margin-top: 4px; }

.profile-row {
  display: grid;
  grid-template-columns: 64px 1fr 140px 100px 90px;
  gap: 16px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--color-neutral-400);
  width: 100%;
  text-align: left;
}
.profile-row .cover { width: 56px; height: 56px; }
.profile-row-title { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.profile-row-sub { font-size: 12px; color: var(--color-neutral-700); margin-top: 2px; }

@media (max-width: 980px) {
  .profile-head { grid-template-columns: 1fr; }
  .profile-earn { border-left: none; border-top: 2px solid var(--color-text); }
  .profile-stats { grid-template-columns: repeat(2, 1fr); }
  .profile-id, .profile-earn { padding: 24px 20px; }
  .profile-row { grid-template-columns: 56px 1fr 80px; }
  .profile-row .prof-hide { display: none; }
  .deliver-grid { grid-template-columns: 1fr; }
  .deliver-cover, .deliver-cover .cover { width: 100%; height: auto; }
  .deliver-title { font-size: 32px; }
  .deliver-wrap { padding: 24px 20px; }
  .msg-row { grid-template-columns: 1fr; padding: 20px; }
}

/* ================================================ 5f remote signer === */

.signer-head { padding: 48px 40px; border-bottom: 2px solid var(--color-text); }
.signer-head-grid {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 40px;
  align-items: end;
  margin-top: 12px;
}
.signer-headline { font-size: 60px; font-weight: 800; letter-spacing: -0.03em; line-height: 0.98; }
.signer-lede { font-size: 17px; line-height: 1.5; color: var(--color-neutral-800); text-wrap: pretty; }

.signer-body { display: grid; grid-template-columns: 400px 1fr 380px; }
.signer-col { padding: 32px 40px; border-left: 2px solid var(--color-text); }
.signer-col:first-child { border-left: none; }

.signer-qr {
  width: 100%;
  aspect-ratio: 1;
  border: 2px solid var(--color-text);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.signer-qr svg { width: 100%; height: 100%; }
.signer-waiting { display: flex; align-items: center; gap: 10px; margin-top: 20px; font-size: 15px; font-weight: 600; color: var(--color-accent-700); }
.pulse-square { width: 10px; height: 10px; background: var(--color-accent); animation: pulse 1.2s ease-in-out infinite alternate; flex: none; }
.signer-expiry { font-size: 15px; color: var(--color-neutral-700); margin-top: 6px; }

.signer-uri {
  border: 2px solid var(--color-text);
  padding: 14px;
  font-size: 11px;
  word-break: break-all;
  margin: 10px 0 12px;
  max-height: 120px;
  overflow-y: auto;
}
.signer-handshake { margin-top: 28px; border-top: 2px solid var(--color-text); padding-top: 20px; }
.hs-row {
  display: grid;
  grid-template-columns: 28px 1fr 160px;
  gap: 12px;
  align-items: center;
  padding: 8px 0;
  font-size: 15px;
}
.hs-mark { font-weight: 700; }
.hs-mark.done { color: var(--color-neutral-500); }
.hs-mark.active { color: var(--color-accent); }
.hs-mark.idle { color: var(--color-neutral-400); }
.hs-note { font-size: 13px; color: var(--color-neutral-700); text-align: right; }

/* Dark permissions panel — what the phone is about to be asked. */
.signer-perms { background: var(--color-text); color: var(--color-bg); }
.signer-service { margin: 12px 0 20px; }
.signer-service .mono { font-size: 12px; color: var(--color-neutral-500); word-break: break-all; }
.perm-row { display: flex; align-items: flex-start; gap: 12px; padding: 10px 0; font-size: 15px; }
.perm-square { width: 18px; height: 18px; background: var(--color-accent); flex: none; margin-top: 2px; }
.signer-revoke { font-size: 13px; color: var(--color-neutral-500); margin-top: 20px; text-wrap: pretty; }

@media (max-width: 980px) {
  .signer-head { padding: 28px 20px; }
  .signer-head-grid { grid-template-columns: 1fr; gap: 16px; }
  .signer-headline { font-size: 34px; }
  .signer-body { grid-template-columns: 1fr; }
  .signer-col { border-left: none; border-top: 2px solid var(--color-text); padding: 24px 20px; }
}
