/* ClubLore — warm paper, lake blue accent, pill controls.
   Outfit for headlines, Plus Jakarta Sans for UI, IBM Plex Mono for labels.
*/

:root {
  --studio: #e6e1d8;
  --bg: #f7f5f1;
  --sunk: #efebe4;
  --ink: #1a1714;
  --ink-2: #3e3832;
  --muted: #5f574e;
  --faint: #8d847a;
  --line: #d8d1c7;
  --hair: #1a1714;
  --accent: #1656b8;
  --accent-hover: #11468f;
  --accent-soft: #e6eef8;
  --font: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --display: "Outfit", "Plus Jakarta Sans", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --r: 100px;
  --card: 24px;
  --shadow: none;
  --page: 780px;
  --artboard: 100%;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.35;
  letter-spacing: -0.025em;
  color: var(--ink-2);
  background: var(--studio);
  -webkit-font-smoothing: antialiased;
}

#app {
  background: var(--bg);
  max-width: none;
  min-height: 100vh;
  margin: 0;
  border: 0;
}

button, input, textarea {
  font: inherit;
  color: inherit;
}

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 500;
  letter-spacing: -0.045em;
  margin: 0;
  color: var(--ink);
}

p {
  margin: 0 0 10px;
}

/* ---------- Top bar ---------- */

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: 16px;
  padding: 12px 28px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 20;
}

.bar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  background: none;
  padding: 0;
  cursor: pointer;
}

.mark {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  width: 18px;
  height: 18px;
}

.mark i {
  background: var(--accent);
  border-radius: 1px;
}

.bar-name {
  font-family: var(--display);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -0.04em;
  color: var(--ink);
}

.bar-club {
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  padding-left: 14px;
  border-left: 1px solid var(--line);
}

.edit-field {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding-left: 14px;
  border-left: 1px solid var(--line);
  flex-shrink: 0;
  min-width: min-content;
}

.edit-label {
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--faint);
  font-weight: 500;
}

.inline-edit {
  border: 0;
  border-bottom: 1px dashed transparent;
  background: none;
  padding: 0;
  min-width: 8ch;
  width: auto;
  max-width: none;
  field-sizing: content;
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
}

.inline-edit:hover,
.inline-edit:focus {
  outline: none;
  border-bottom-color: var(--accent);
}

.inline-edit-lg {
  font-family: var(--display);
  font-size: inherit;
  font-weight: 500;
  letter-spacing: -0.055em;
  min-width: 4ch;
  max-width: 16ch;
  width: auto;
}

.edit-wrap {
  display: inline;
}

.bar-nav {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 6px;
  margin-left: auto;
  flex-shrink: 0;
}

.bar-tabs {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 6px;
}

.bar-link {
  border: 0;
  background: none;
  padding: 8px 16px;
  border-radius: var(--r);
  color: var(--ink-2);
  cursor: pointer;
  font-size: 15px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  white-space: nowrap;
  flex-shrink: 0;
}

.bar-link:hover {
  color: var(--ink);
  background: var(--sunk);
}

.bar-link.on {
  color: var(--ink);
  background: var(--sunk);
  font-weight: 400;
}

.bar-link.subtle {
  color: var(--faint);
  font-size: 13px;
}

.demo-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.demo-more {
  padding-left: 2px;
  min-width: 22px;
}

.demo-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: 230px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--card);
  padding: 4px;
  display: flex;
  flex-direction: column;
  z-index: 30;
}

.demo-menu button {
  border: 0;
  background: none;
  text-align: left;
  padding: 9px 10px;
  border-radius: var(--r);
  cursor: pointer;
  font-size: 14px;
}

.demo-menu button:hover {
  background: var(--sunk);
}

.demo-note {
  font-size: 12px;
  color: var(--faint);
  padding: 8px 10px 4px;
  border-top: 1px solid var(--line);
  margin-top: 4px;
}

/* ---------- Page ---------- */

.page {
  max-width: var(--page);
  margin: 0 auto;
  padding: 48px 32px 96px;
}

.page-ask,
.page-ask:focus-within {
  padding-top: 80px;
  padding-top: 10svh;
}

/* The back-of-house screens put a device next to the argument for it,
   which does not fit the reading-width artboard the rest of the app uses. */
.page-wide {
  max-width: 1120px;
}

.head {
  margin-bottom: 36px;
}

.head h1 {
  font-size: 36px;
  font-weight: 500;
  letter-spacing: -0.048em;
}

.head.hello-head h1.hello-line {
  font-family: var(--display);
  font-size: 52px;
  font-weight: 500;
  letter-spacing: -0.055em;
  line-height: 1.02;
  margin: 0;
  color: var(--ink);
}

.hello-head {
  margin-bottom: 40px;
}

.demo-tagline {
  margin: 8px 0 0;
  color: var(--faint);
  font-size: 13px;
}

.sub {
  color: var(--muted);
  margin: 10px 0 0;
  max-width: 42em;
  line-height: 1.5;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--faint);
  font-weight: 500;
  margin: 0 0 12px;
}

/* ---------- Buttons ---------- */

.btn {
  border: 1px solid var(--ink);
  background: var(--bg);
  color: var(--ink);
  padding: 8px 16px;
  border-radius: var(--r);
  cursor: pointer;
  font-weight: 400;
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.btn:hover {
  background: var(--sunk);
}

.btn-dark {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.btn-dark:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

.link {
  border: 0;
  background: none;
  padding: 6px 0;
  color: var(--accent);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.link:hover {
  color: var(--accent-hover);
}

.link.on {
  color: var(--accent);
  font-weight: 600;
}

.row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.row.spread {
  justify-content: space-between;
}

.rows .follow {
  padding: 0 4px 16px;
  margin: -6px 0 0;
  color: var(--muted);
}

.rows .follow .link {
  display: inline;
  width: auto;
  padding: 0;
  background: none;
  font-size: inherit;
}

.methods {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  justify-content: flex-end;
}

.source-line {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.ask-line {
  margin: 14px 0 0;
  color: var(--ink);
}

.interview {
  margin-top: 8px;
}

.interview .raw {
  margin-top: 12px;
}

.interview textarea {
  margin-top: 12px;
}

/* ---------- Home ---------- */

.hook {
  padding: 28px 0 8px;
}

.hook .hook-ask {
  margin-top: 0;
}

.hook h3 {
  font-family: var(--display);
  font-size: 15px;
  letter-spacing: -0.02em;
  color: var(--ink);
  font-weight: 600;
  margin-bottom: 14px;
}

.hook-ask {
  display: block;
  width: 100%;
  text-align: left;
  border: 1px solid var(--line);
  background: var(--bg);
  border-radius: var(--card);
  padding: 18px 20px;
  font-family: var(--display);
  font-size: 26px;
  font-weight: 500;
  letter-spacing: -0.042em;
  line-height: 1.25;
  cursor: pointer;
}

.hook-ask:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.hook .tip {
  margin: 14px 0 0;
}

.hero h1 {
  font-size: 48px;
  font-weight: 500;
  letter-spacing: -0.05em;
  line-height: 1.02;
  margin-bottom: 28px;
}

.ask,
.ask:focus-within {
  display: flex;
  gap: 10px;
  align-items: stretch;
}

.ask input,
.ask input:focus,
.ask input:focus-visible {
  flex: 1;
  min-width: 0;
  box-sizing: border-box;
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 14px 20px;
  margin: 0;
  font-size: 16px;
  line-height: 1.55;
  height: 55px;
  background: var(--bg);
  appearance: none;
  -webkit-appearance: none;
  transform: none;
  scroll-margin: 0;
}

.ask input:focus,
.ask input:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(22, 86, 184, 0.2);
}

.ask .btn-dark {
  padding: 0 22px;
}

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

.chip {
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--muted);
  padding: 6px 11px;
  border-radius: var(--r);
  font-size: 13px;
  cursor: pointer;
}

.chip:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.cta p {
  color: var(--muted);
  margin: 0;
}

.cta .row {
  margin-top: 12px;
}

/* ---------- Answer ---------- */

.answer {
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}

.answer .lead {
  font-weight: 600;
  font-size: 16px;
  line-height: 1.45;
  margin-bottom: 8px;
  color: var(--ink);
}

.answer ul {
  margin: 0;
  padding-left: 20px;
}

.answer li {
  margin-bottom: 10px;
  color: var(--ink-2);
}

.answer-block {
  margin: 18px 0 0;
  padding: 14px 0 12px;
  border-top: 1px solid var(--line);
}

.answer > .tip {
  margin-top: 20px;
}

.lineage {
  margin: 22px 0 4px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.lineage h3 {
  font-family: var(--display);
  font-size: 15px;
  letter-spacing: -0.02em;
  font-weight: 600;
  margin: 0 0 14px;
}

.answer .lineage-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.answer .lineage-list li {
  margin: 0;
  color: var(--ink-2);
}

.answer .lineage-list li + li {
  margin-top: 18px;
}

.lineage-meta {
  display: block;
  margin-bottom: 4px;
}

.lineage-meta .src {
  margin-left: 0;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--faint);
  text-decoration: none;
}

.lineage-meta .src:hover {
  color: var(--accent);
  text-decoration: underline;
}

.lineage-item.is-new {
  animation: lineage-in 320ms ease;
}

@keyframes lineage-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .lineage-item.is-new {
    animation: none;
  }
}

.answer-block h3 {
  font-family: var(--display);
  font-size: 15px;
  letter-spacing: -0.02em;
  color: var(--ink);
  font-weight: 600;
  margin: 0 0 12px;
}

.integ {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 20px 4px 8px;
}

.rows .integ + .tip {
  margin: 0 4px 18px;
}

.tip {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.from {
  font-size: 13px;
  color: var(--faint);
  margin-top: 20px;
}

/* ---------- Browse ---------- */

.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 28px;
}

.pill {
  border: 1px solid var(--line);
  background: var(--bg);
  padding: 5px 12px;
  border-radius: var(--r);
  cursor: pointer;
  font-size: 13px;
  color: var(--muted);
}

.pill em {
  font-style: normal;
  color: var(--faint);
  margin-left: 4px;
}

.pill:hover {
  color: var(--ink);
}

.pill.on {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.pill.on em {
  color: rgba(255, 255, 255, 0.65);
}

.search {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 12px 0 14px;
  margin-bottom: 20px;
}

.search:focus {
  outline: none;
  border-bottom-color: var(--accent);
}

.rows {
  list-style: none;
  margin: 0;
  padding: 0;
}

.rows li + li {
  border-top: 1px solid var(--line);
}

.rows button {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  width: 100%;
  text-align: left;
  border: 0;
  background: none;
  padding: 18px 4px;
  cursor: pointer;
}

.rows > li > .r-title {
  display: block;
  padding: 18px 4px;
}

.rows button:hover {
  background: var(--sunk);
}

.r-title {
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.r-sub {
  display: block;
  margin-top: 4px;
  font-weight: 400;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.45;
}

.r-meta {
  color: var(--faint);
  font-size: 13px;
  flex-shrink: 0;
}

.tag {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 1px 6px;
  margin-left: 6px;
  vertical-align: middle;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.empty {
  color: var(--faint);
  padding: 20px 0;
}

/* ---------- Detail ---------- */

.crumbs {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--faint);
  margin-bottom: 28px;
}

.crumb {
  border: 0;
  background: none;
  padding: 0;
  color: var(--muted);
  cursor: pointer;
}

.crumb:hover {
  color: var(--accent);
  text-decoration: underline;
}

.here {
  color: var(--ink);
}

.grp {
  padding: 28px 0 8px;
  margin-top: 12px;
  border-top: 1px solid var(--line);
}

.grp h3 {
  font-family: var(--display);
  font-size: 15px;
  letter-spacing: -0.02em;
  text-transform: none;
  color: var(--ink);
  font-weight: 600;
  margin-bottom: 14px;
}

.sec-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px 16px;
  flex-wrap: wrap;
}

.sec-head h3 {
  margin-bottom: 0;
}

.grp > .sec-head {
  margin-bottom: 14px;
}

.head > .sec-head {
  margin-bottom: 8px;
}

.log-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  background: none;
  padding: 0;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
  flex-shrink: 0;
}

.log-switch {
  width: 28px;
  height: 16px;
  border: 1px solid var(--line);
  border-radius: 99px;
  position: relative;
  background: transparent;
}

.log-switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--faint);
}

.log-toggle.on {
  color: var(--ink);
}

.log-toggle.on .log-switch {
  border-color: var(--accent);
  background: var(--accent);
}

.log-toggle.on .log-switch::after {
  left: 14px;
  background: #fff;
}

.grp ul {
  margin: 0;
  padding-left: 20px;
}

.grp li {
  margin-bottom: 8px;
  color: var(--ink-2);
  line-height: 1.5;
}

.grp p {
  margin: 0;
  color: var(--ink-2);
  line-height: 1.55;
}

.grp .tip {
  margin: 0 0 12px;
}

.grp .rows {
  margin-top: 2px;
}

.more-wrap {
  margin: 12px 0 28px;
}

.intro-tip {
  margin: 0 0 28px;
  max-width: 42em;
}

#object > .row {
  margin-top: 32px;
  padding-top: 8px;
}

.cta {
  padding-bottom: 20px;
}

.grp .raw {
  white-space: pre-wrap;
  color: var(--muted);
}

.warn-grp h3 {
  color: var(--ink);
}

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
}

.steps li {
  display: flex;
  gap: 16px;
  padding: 10px 0;
  color: var(--ink-2);
}

.steps b {
  min-width: 120px;
  flex-shrink: 0;
  color: var(--ink);
  font-weight: 500;
}

.steps li span {
  min-width: 0;
}

.rows.plain button {
  padding: 16px 4px;
}

.meter {
  display: grid;
  grid-template-columns: 170px 1fr 46px;
  align-items: center;
  gap: 12px;
  padding: 6px 0;
  font-size: 14px;
}

.track {
  height: 4px;
  background: var(--line);
  border-radius: 0;
  overflow: hidden;
}

.track i {
  display: block;
  height: 100%;
  background: var(--accent);
}

.meter b {
  text-align: right;
  font-weight: 500;
  color: var(--muted);
}

/* ---------- Succession ---------- */

.succession-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  overflow: hidden;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--line);
}

.succession-summary div {
  padding: 18px;
  background: var(--bg);
}

.succession-summary strong {
  display: block;
  font-family: var(--display);
  font-size: 32px;
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 1.2;
}

.succession-summary span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}

.handoff-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 18px 4px 0;
}

.handoff-ask {
  margin: 0 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.rows .handoff-actions {
  margin-top: 10px;
  padding: 0 4px 8px;
}

.rows .handoff-actions button {
  display: inline-flex;
  width: auto;
  align-items: center;
  padding: 8px 16px;
  border: 1px solid var(--ink);
  background: var(--bg);
  color: var(--ink);
}

.rows .handoff-actions button:hover {
  background: var(--sunk);
}

.rows .handoff-actions button.btn-dark {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.rows .handoff-actions button.btn-dark:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

.role-list {
  border-bottom: 1px solid var(--line);
}

.role-item {
  border-top: 1px solid var(--line);
}

.role-toggle {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  align-items: center;
  gap: 24px;
  width: 100%;
  padding: 20px 4px;
  border: 0;
  background: none;
  text-align: left;
  cursor: pointer;
}

.role-toggle:hover {
  background: var(--sunk);
}

.role-main {
  min-width: 0;
}

.role-score {
  display: grid;
  grid-template-columns: 1fr 42px;
  align-items: center;
  gap: 10px;
}

.role-score b {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  text-align: right;
}

.role-detail {
  padding: 4px 4px 24px;
}

.role-detail > p {
  margin-bottom: 8px;
  color: var(--ink-2);
}

.role-detail ul {
  margin: 4px 0 12px;
  padding: 0;
  list-style: none;
}

.role-detail li {
  margin: 0;
}

/* ---------- Capture ---------- */

.panel {
  border: 1px solid var(--line);
  border-radius: var(--card);
  padding: 18px;
}

.pipe {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
}

.pipe > li {
  padding: 22px 0 8px;
  border-top: 1px solid var(--line);
}

.pipe h3 {
  font-size: 17px;
  font-weight: 600;
  margin: 0 0 8px;
}

.pipe-json {
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.45;
  background: var(--sunk);
  padding: 14px 16px;
  overflow-x: auto;
  margin: 10px 0 0;
  color: var(--ink-2);
  white-space: pre-wrap;
}

textarea {
  width: 100%;
  min-height: 170px;
  border: 0;
  padding: 0;
  resize: vertical;
  line-height: 1.6;
}

textarea:focus {
  outline: none;
}

.voice {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 28px 0;
}

.dot {
  width: 52px;
  height: 52px;
  border-radius: var(--r);
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.06em;
}

.dot.is-rec {
  animation: speech-pulse 1.1s ease-in-out infinite;
}

.drop {
  width: 100%;
  border: 1px dashed var(--line);
  background: var(--sunk);
  border-radius: var(--r);
  padding: 32px;
  color: var(--muted);
  cursor: pointer;
}

.drop:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.pairs {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 8px 14px;
  margin: 0 0 14px;
}

.pairs dt {
  font-family: var(--mono);
  color: var(--faint);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.pairs dd {
  margin: 0;
}

.file-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 0 10px 6px 0;
}

.src,
.file-link,
.from .src,
.answer .src {
  background: none;
  border: 0;
  padding: 0;
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.answer .src {
  display: inline;
  margin-left: 8px;
  font-size: 13px;
  color: var(--accent);
  text-decoration: underline;
}

.file-x {
  background: none;
  border: 0;
  padding: 0 2px;
  color: var(--faint);
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
}

.file-x:hover {
  color: var(--ink);
}

.panel .raw {
  margin: 8px 0 16px;
  color: var(--ink-2);
  font-size: 14px;
}

/* ---------- Toast ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  background: var(--ink);
  color: #fff;
  padding: 10px 16px;
  border-radius: var(--r);
  font-size: 13px;
  display: none;
  z-index: 60;
}

.toast.show {
  display: block;
}

/* ---------- Walkthrough ---------- */

.walkthrough {
  display: none;
}

.walkthrough.active {
  display: block;
}

.wt-card.is-in .wt-inner,
.wt-card.is-in .wt-actions {
  animation: wt-pop 320ms ease;
}

@keyframes wt-pop {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .wt-card.is-in .wt-inner,
  .wt-card.is-in .wt-actions {
    animation: none;
  }
}

.wt-card {
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  width: min(520px, calc(100vw - 32px));
  max-height: min(48vh, 440px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--card);
  padding: 0;
  z-index: 120;
}

body.touring.tour-dock-right #app {
  margin-left: 16px;
  margin-right: 432px;
  max-width: calc(100vw - 448px);
}

body.touring.tour-dock-right .wt-card {
  top: 16px;
  right: 16px;
  bottom: auto;
  left: auto;
  transform: none;
  width: 400px;
  max-height: calc(100vh - 32px);
}

body.touring.tour-dock-top .wt-card {
  left: 50%;
  right: auto;
  bottom: auto;
  transform: translateX(-50%);
  width: min(520px, calc(100vw - 24px));
  max-height: min(38vh, 320px);
}

.wt-progress {
  height: 2px;
  flex-shrink: 0;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left center;
}

@keyframes wt-fill {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

@media (prefers-reduced-motion: reduce) {
  .wt-progress {
    animation: none !important;
    transform: scaleX(0);
  }
}

.wt-inner {
  padding: 22px 24px 0;
  overflow-y: auto;
}

.wt-card .count {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 22px;
  line-height: 1.45;
}

.wt-think {
  margin: 0 0 28px;
  padding: 0 0 0 14px;
  border: 0;
  border-left: 1px solid var(--accent);
  font-style: italic;
  color: var(--ink);
  line-height: 1.55;
}

.wt-card p.wt-job {
  margin: 0 0 28px;
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.55;
}

.wt-job > span:first-child {
  display: block;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
  font-style: normal;
  margin-bottom: 8px;
}

.wt-card h3 {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.035em;
  margin: 0 0 14px;
  line-height: 1.4;
  color: var(--ink);
}

.wt-card p {
  color: var(--muted);
  margin: 0;
  line-height: 1.55;
}

.wt-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 28px;
  padding: 0 24px 22px;
  flex-shrink: 0;
}

.wt-actions .right {
  display: flex;
  gap: 8px;
}

.wt-card button[disabled] {
  opacity: 0.4;
  cursor: not-allowed;
}

.spot {
  scroll-margin-top: 88px;
  scroll-margin-bottom: 28px;
}

#tour-spots {
  position: fixed;
  inset: 0;
  z-index: 15;
  pointer-events: none;
}

.tour-spot-box {
  position: absolute;
  border-radius: 2px;
  box-shadow: inset 0 0 0 1px var(--accent);
  pointer-events: none;
}

body.touring.tour-dock-top .spot {
  scroll-margin-top: min(42vh, 360px);
}

body.touring #outreach {
  display: none;
}

body.touring .page {
  padding-bottom: 32px;
}

body.touring [data-act="pipeline-read"],
body.touring [data-act="pipeline-write"] {
  display: none;
}

/* ---------- Logged-in user ---------- */

.bar-left {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
  flex: 0 1 auto;
  overflow: hidden;
}

.bar-left .edit-field {
  max-width: min(240px, 34vw);
  min-width: 0;
}

.bar-left .edit-field .speech-field.is-inline {
  max-width: 100%;
  min-width: 0;
}

.bar-left .edit-field .inline-edit {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------- Outreach dock ---------- */

.outreach {
  display: none;
  position: sticky;
  bottom: 0;
  z-index: 40;
  max-width: none;
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  padding: 14px 28px 18px;
  border-top: 1px solid var(--line);
  border-left: 0;
  border-right: 0;
}

.outreach-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 10px;
}

.outreach-head strong {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
}

.outreach-head span {
  color: var(--muted);
  font-size: 12px;
}

.outreach-form {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr auto;
  gap: 12px;
  align-items: end;
}

.outreach label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.outreach input {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 9px 16px;
  color: var(--ink);
  text-transform: none;
  letter-spacing: 0;
  font-size: 14px;
}

.outreach input:focus {
  outline: none;
  border-color: var(--accent);
}

.outreach-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 2px;
}

.outreach .btn-dark {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.outreach .btn-dark:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

.outreach .link {
  color: var(--accent);
}

.outreach .link:hover {
  color: var(--accent-hover);
}

body.clean #outreach,
body.clean .hide-in-clean {
  display: none !important;
}

body.shooting #outreach,
body.shooting .hide-in-shot,
body.shooting #walkthrough,
body.shooting #tour-spots,
body.shooting #toast {
  display: none !important;
}

body.shooting .inline-edit,
body.shooting .shot-text {
  border-bottom-color: transparent !important;
}

body.shooting .shot-text {
  color: var(--ink);
  line-height: 1.2;
  white-space: nowrap;
}

body.shooting .edit-field .shot-text {
  display: block;
  font-size: 15px;
  font-weight: 600;
}

body.shooting .hello-line .shot-text {
  display: inline;
  font-size: inherit;
  font-weight: 500;
}

/* ---------- Narrow desktop (header would collide) ---------- */

@media (max-width: 1180px) {
  .bar {
    flex-wrap: wrap;
    row-gap: 8px;
  }

  .bar-nav {
    width: 100%;
    margin-left: 0;
    justify-content: flex-start;
  }
}

/* ---------- Small screens ---------- */

@media (max-width: 720px) {
  .bar {
    padding: 12px 16px;
  }
  .bar-club {
    font-size: 13px;
    padding-left: 10px;
    max-width: 42vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .outreach-form {
    grid-template-columns: 1fr;
  }
  .page {
    padding: 32px 16px 72px;
  }
  .page-ask,
  .page-ask:focus-within {
    padding-top: 24px;
    padding-top: 4svh;
  }
  .head.hello-head h1.hello-line {
    font-size: 36px;
  }
  .hero h1 {
    font-size: 34px;
  }
  .hook-ask {
    font-size: 18px;
  }
  .ask {
    flex-direction: column;
  }
  .ask .btn-dark {
    padding: 12px;
  }
  .steps li {
    flex-direction: column;
    gap: 2px;
  }
  .meter {
    grid-template-columns: 120px 1fr 40px;
  }
  .succession-summary {
    grid-template-columns: 1fr;
  }
  .role-toggle {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  #app,
  .outreach {
    border-left: 0;
    border-right: 0;
    max-width: none;
  }
}

/* ---------- Back of house (phone) ----------
   A device sitting next to the GM's sheet. Same hairlines and type as
   everything else, just at arm's length instead of desk distance.
*/

.boh-split {
  display: grid;
  grid-template-columns: minmax(0, 320px) minmax(0, 1fr);
  gap: 44px;
  align-items: start;
}

.boh-preview {
  display: grid;
  grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
  gap: 32px;
  align-items: start;
  margin-top: 6px;
}

.boh-side .grp:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.boh-push {
  margin-top: 4px;
}

.boh-push .tip {
  margin-bottom: 12px;
}

.boh-preview-side .link {
  margin-top: 14px;
  display: inline-block;
}

.phone {
  border: 1px solid var(--hair);
  border-radius: 26px;
  background: var(--bg);
  padding: 8px;
  max-width: 320px;
}

.phone.is-inline {
  max-width: 300px;
}

.ph-screen {
  border: 1px solid var(--line);
  border-radius: 19px;
  padding: 14px 14px 18px;
  font-size: 14px;
  line-height: 1.4;
}

.ph-status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  color: var(--faint);
  padding-bottom: 12px;
}

.ph-offline {
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 2px 8px;
  white-space: nowrap;
}

.ph-eyebrow {
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--faint);
  font-weight: 500;
  margin: 0 0 6px;
}

.ph-head {
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.ph-head h3 {
  font-size: 21px;
  letter-spacing: -0.035em;
  margin: 0;
}

.ph-sub {
  color: var(--muted);
  font-size: 13px;
  margin: 4px 0 0;
}

.ph-change {
  border-left: 2px solid var(--accent);
  background: var(--accent-soft);
  padding: 12px 12px 10px;
  margin: 16px 0 4px;
}

.ph-change .ph-eyebrow {
  color: var(--accent);
}

.ph-change-row {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.45;
}

.ph-change-row span {
  display: block;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
  margin-top: 3px;
}

.ph-steps {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.ph-step + .ph-step {
  border-top: 1px solid var(--line);
}

.ph-step-head {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  width: 100%;
  text-align: left;
  border: 0;
  background: none;
  padding: 11px 2px;
  cursor: pointer;
}

.ph-step-head:hover {
  background: var(--sunk);
}

.ph-when {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  min-width: 42px;
  flex-shrink: 0;
  padding-top: 2px;
}

.ph-what {
  flex: 1;
  min-width: 0;
  color: var(--ink);
  font-size: 14px;
}

.ph-detail,
.ph-warn {
  display: block;
  font-size: 12.5px;
  line-height: 1.4;
  margin-top: 3px;
  color: var(--muted);
}

.ph-warn {
  color: var(--accent);
}

.ph-tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: var(--r);
  padding: 1px 6px;
  margin-top: 6px;
}

.ph-tick {
  font-size: 13px;
  color: var(--faint);
  flex-shrink: 0;
  padding-top: 2px;
}

.ph-step.is-now .ph-when {
  color: var(--accent);
  font-weight: 500;
}

.ph-step.is-done .ph-what,
.ph-step.is-done .ph-when {
  color: var(--faint);
}

.ph-step.is-done .ph-tick {
  color: var(--accent);
}

.ph-step.is-changed {
  background: var(--sunk);
}

.ph-why {
  padding: 2px 2px 16px 54px;
}

.ph-why p {
  margin: 0 0 8px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-2);
}

.ph-who {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--muted);
}

.ph-why-acts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.ph-btn {
  border: 1px solid var(--ink);
  background: var(--bg);
  color: var(--ink);
  border-radius: var(--r);
  padding: 6px 13px;
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
}

.ph-btn:hover {
  background: var(--sunk);
}

.ph-btn-dark {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.ph-btn-dark:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

.ph-btn-quiet {
  border-color: var(--line);
  color: var(--muted);
}

.ph-src {
  border: 0;
  background: none;
  padding: 8px 0 0;
  color: var(--accent);
  font-size: 12px;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.ph-sheet {
  border: 1px solid var(--line);
  padding: 13px;
  margin-top: 16px;
}

.ph-sheet p {
  font-size: 13px;
  line-height: 1.45;
  margin: 0 0 10px;
}

.ph-rec {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
}

.ph-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  animation: ph-pulse 1.1s ease-in-out infinite;
}

@keyframes ph-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.25; }
}

.ph-said {
  color: var(--ink);
  font-style: italic;
}

.ph-photo {
  margin-top: 16px;
}

.ph-frames {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.ph-frame {
  border: 1px solid var(--line);
  min-height: 74px;
  display: flex;
  align-items: flex-end;
  padding: 8px;
  font-family: var(--mono);
  font-size: 9.5px;
  line-height: 1.35;
  color: var(--faint);
  background: var(--sunk);
}

.ph-frame.is-new {
  border-color: var(--accent);
  color: var(--accent);
}

.ph-tip {
  font-size: 12px;
  color: var(--muted);
  margin: 8px 0 0;
  line-height: 1.45;
}

.ph-foot {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  color: var(--faint);
  text-align: center;
  margin: 16px 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

/* ---------- Back of house (station) ----------
   A 10" tablet on the pantry wall. Landscape, always on, no login.
   Type is deliberately heavier than the phone: this is read at eight feet
   by someone walking past with their arms full, not held at reading distance.
*/

.station {
  border: 1px solid var(--hair);
  border-radius: 10px;
  background: var(--bg);
  padding: 9px;
  width: 100%;
  max-width: 620px;
}

.station.is-inline {
  max-width: 560px;
}

.st-screen {
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  min-height: 300px;
}

/* The bracket holding it to the wall. Sells the form factor in one hairline. */
.st-mount {
  width: 76px;
  height: 7px;
  margin: 0 auto;
  border: 1px solid var(--line);
  border-top: 0;
}

.st-bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
}

.st-bar-event {
  display: block;
  font-family: var(--display);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.035em;
  color: var(--ink);
}

.st-bar-sub {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-top: 2px;
}

.st-bar-right {
  text-align: right;
  flex-shrink: 0;
}

.st-live {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
}

.st-live i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  animation: ph-pulse 2s ease-in-out infinite;
}

.st-bar-where {
  display: block;
  font-family: var(--mono);
  font-size: 9.5px;
  color: var(--faint);
  margin-top: 3px;
}

/* The loudest thing on the wall, on purpose. It is the only reason
   a screen beats the printout it is replacing. */
.st-change {
  background: var(--accent);
  color: #fff;
  padding: 13px 16px 14px;
}

.st-change-label {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  margin: 0 0 8px;
  color: rgba(255, 255, 255, 0.75);
}

.st-change-list {
  display: grid;
  gap: 9px;
}

.st-change-row {
  margin: 0;
  font-family: var(--display);
  font-size: 18px;
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.03em;
}

.st-change-row span {
  display: block;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.72);
  margin-top: 4px;
}

/* No news is also news on a wall screen. You glance, see this, keep walking. */
.st-quiet {
  padding: 10px 16px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  color: var(--faint);
  border-bottom: 1px solid var(--line);
}

.st-sent {
  padding: 8px 16px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.05em;
  color: var(--accent);
  border-bottom: 1px solid var(--line);
  background: var(--accent-soft);
}

.st-body {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  flex: 1;
}

.st-now {
  padding: 16px;
  border-right: 1px solid var(--line);
}

.st-label {
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--faint);
  margin: 0 0 6px;
}

.st-time {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--accent);
  margin: 0 0 2px;
}

.st-headline {
  font-size: 25px;
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1.1;
  margin: 0;
}

.st-detail {
  font-size: 14.5px;
  line-height: 1.4;
  color: var(--ink-2);
  margin: 7px 0 0;
}

.st-flagword,
.st-warn {
  font-family: var(--mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin: 8px 0 0;
}

.st-why {
  border-top: 1px solid var(--line);
  margin-top: 14px;
  padding-top: 12px;
}

/* On the phone the reason is behind a tap. Here there is room, and nobody
   is going to tap, so the reason is simply always on screen. */
.st-why p {
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--ink-2);
  margin: 0;
}

.st-owner {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
  margin-top: 7px !important;
}

.st-acts {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 16px;
}

.st-acts.is-asking {
  display: block;
}

.st-ask-label {
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--faint);
  margin: 0 0 8px;
}

.st-initials {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.st-chip {
  border: 1px solid var(--ink);
  background: var(--bg);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 14px;
  letter-spacing: 0.04em;
  padding: 10px 14px;
  cursor: pointer;
}

.st-chip:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.st-btn {
  border: 1px solid var(--ink);
  background: var(--bg);
  color: var(--ink);
  padding: 9px 18px;
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
}

.st-btn:hover {
  background: var(--sunk);
}

.st-btn-dark {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.st-btn-dark:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

.st-btn-quiet {
  border-color: var(--line);
  color: var(--muted);
  padding: 7px 14px;
  font-size: 12.5px;
}

.st-now.is-complete .st-flag {
  margin-top: 14px;
}

.st-rail {
  padding: 16px 14px;
  background: var(--sunk);
}

.st-rail ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.st-row {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: baseline;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}

.st-row:last-child {
  border-bottom: 0;
}

.st-row-when {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--muted);
}

.st-row-what {
  color: var(--ink-2);
  line-height: 1.3;
}

.st-row-mark {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.06em;
  color: var(--accent);
  white-space: nowrap;
}

.st-row.is-now {
  background: var(--bg);
  margin: 0 -14px;
  padding: 8px 14px;
  border-left: 3px solid var(--accent);
}

.st-row.is-now .st-row-what {
  color: var(--ink);
  font-weight: 600;
}

.st-row.is-now .st-row-when {
  color: var(--accent);
}

.st-row.is-done .st-row-what,
.st-row.is-done .st-row-when {
  color: var(--faint);
}

.st-row.is-changed .st-row-mark {
  text-transform: uppercase;
}

.st-now.is-complete .st-headline {
  color: var(--accent);
}

.st-frames {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 14px;
}

.st-frame {
  border: 1px solid var(--line);
  min-height: 62px;
  display: flex;
  align-items: flex-end;
  padding: 7px;
  font-family: var(--mono);
  font-size: 9px;
  line-height: 1.3;
  color: var(--faint);
  background: var(--sunk);
}

.st-frame.is-new {
  border-color: var(--accent);
  color: var(--accent);
}

.st-aside {
  font-family: var(--mono);
  font-size: 9.5px;
  line-height: 1.4;
  color: var(--faint);
  margin: 12px 0 0;
}

/* ---------- Form-factor switch and the side-by-side pair ---------- */

.boh-form {
  margin-bottom: 26px;
}

.boh-split.is-wide {
  grid-template-columns: minmax(0, 620px) minmax(0, 1fr);
}

/* Stacked, not side by side. A pocket device and a wall device have opposite
   aspect ratios, and showing them at true relative size says more than
   squeezing both into equal columns. */
.boh-pair {
  display: grid;
  gap: 34px;
  margin-top: 22px;
}

.boh-fig {
  margin: 0;
}

.boh-fig figcaption {
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted);
  margin-top: 12px;
  max-width: 40em;
}

.boh-fig figcaption b {
  display: block;
  color: var(--ink);
  font-weight: 600;
  margin-bottom: 2px;
}

#boh-inline .boh-push {
  margin-top: 14px;
}

@media (max-width: 1080px) {
  .boh-split.is-wide {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 900px) {
  .boh-split,
  .boh-preview {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }

  .phone,
  .phone.is-inline {
    max-width: 340px;
  }
}

@media (max-width: 680px) {
  .st-body {
    grid-template-columns: minmax(0, 1fr);
  }

  .st-now {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
}

/* ---------- Mobile presentation (?mobile=1) ----------
   Forced phone column even on a wide desktop. Additive on body.mobile
   so shared tokens (--accent, type, hairlines) stay untouched.
*/

body.mobile {
  --page: 390px;
  --artboard: 390px;
  font-size: 16px;
}

body.mobile #app {
  max-width: var(--artboard);
  min-height: 100vh;
  margin: 0 auto;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
}

body.mobile .bar {
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  padding: 10px 14px 12px;
}

body.mobile .bar-left {
  width: 100%;
  gap: 10px;
}

body.mobile .bar-club,
body.mobile .edit-field {
  padding-left: 10px;
  min-width: 0;
}

body.mobile .bar-club,
body.mobile .edit-field .inline-edit {
  font-size: 14px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.mobile .bar-nav {
  flex-wrap: wrap;
  width: 100%;
  gap: 8px;
  align-items: stretch;
}

body.mobile .bar-tabs {
  flex: 1 1 100%;
  width: 100%;
  justify-content: space-between;
  gap: 0;
}

body.mobile .bar-link {
  flex: 1 1 auto;
  text-align: center;
  padding: 10px 4px;
  min-height: 44px;
  font-size: 13px;
}

body.mobile .bar-add {
  flex: 1 1 auto;
  min-height: 44px;
  padding: 10px 16px;
}

body.mobile .demo-wrap {
  margin-left: auto;
}

body.mobile .demo-more,
body.mobile .bar-link.subtle {
  min-height: 44px;
  padding: 10px 8px;
}

body.mobile .demo-menu {
  right: 0;
  width: min(230px, calc(100vw - 32px));
}

body.mobile .demo-menu button {
  min-height: 44px;
  padding: 12px 10px;
}

body.mobile .page {
  padding: 24px 16px 88px;
}

body.mobile .page-ask,
body.mobile .page-ask:focus-within {
  padding-top: 16px;
  padding-top: 3svh;
}

body.mobile .head {
  margin-bottom: 24px;
}

body.mobile .head.hello-head h1.hello-line {
  font-size: 34px;
}

body.mobile .hero h1 {
  font-size: 32px;
}

body.mobile .hook-ask {
  font-size: 18px;
  padding: 16px 16px;
  min-height: 52px;
}

body.mobile .ask {
  flex-direction: column;
  align-items: stretch;
}

body.mobile .ask input,
body.mobile .ask input:focus,
body.mobile .ask input:focus-visible {
  font-size: 16px;
  height: 52px;
  padding: 14px 14px;
}

body.mobile .ask .btn-dark {
  padding: 14px;
  min-height: 48px;
}

body.mobile .chips {
  gap: 8px;
}

body.mobile .chip {
  padding: 10px 12px;
  min-height: 40px;
  font-size: 14px;
}

body.mobile .pills {
  gap: 8px;
  margin-bottom: 20px;
}

body.mobile .pill {
  padding: 10px 14px;
  min-height: 40px;
  font-size: 14px;
}

body.mobile .search {
  padding: 14px 0 16px;
  font-size: 16px;
}

body.mobile .rows button {
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 16px 2px;
  min-height: 52px;
}

body.mobile .rows .handoff-actions button {
  flex-direction: row;
  align-items: center;
  width: auto;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid var(--ink);
  background: var(--bg);
  color: var(--ink);
}

body.mobile .rows .handoff-actions button.btn-dark {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

body.mobile .r-meta {
  align-self: flex-start;
}

body.mobile .btn {
  min-height: 44px;
  padding: 10px 16px;
}

body.mobile .link {
  min-height: 44px;
  padding: 10px 0;
}

body.mobile .answer .src,
body.mobile .file-link,
body.mobile .from .src {
  padding: 8px 0;
  font-size: 15px;
}

body.mobile .from {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 0;
  line-height: 2;
}

body.mobile textarea {
  min-height: 160px;
  font-size: 16px;
}

body.mobile .panel {
  padding: 16px;
}

body.mobile .row.spread {
  flex-direction: column;
  align-items: stretch;
}

body.mobile .row.spread > .btn-dark {
  width: 100%;
}

body.mobile .pairs {
  grid-template-columns: 1fr;
  gap: 2px 0;
}

body.mobile .pairs dt {
  margin-top: 10px;
}

body.mobile .steps li {
  flex-direction: column;
  gap: 2px;
}

body.mobile .meter {
  grid-template-columns: 1fr 40px;
  grid-template-rows: auto auto;
}

body.mobile .meter > :first-child {
  grid-column: 1 / -1;
}

body.mobile .succession-summary {
  grid-template-columns: 1fr;
}

body.mobile .role-toggle {
  grid-template-columns: 1fr;
  gap: 8px;
  min-height: 52px;
}

body.mobile .integ {
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

body.mobile .crumbs {
  flex-wrap: wrap;
  row-gap: 4px;
}

body.mobile .drop {
  padding: 28px 16px;
  min-height: 88px;
}

body.mobile .outreach {
  position: relative;
  max-width: var(--artboard);
  padding: 12px 16px 16px;
}

body.mobile .outreach-form {
  grid-template-columns: 1fr;
}

body.mobile .outreach input {
  min-height: 44px;
  font-size: 16px;
}

body.mobile .outreach-actions {
  flex-wrap: wrap;
}

body.mobile .outreach .btn-dark,
body.mobile .outreach .link {
  min-height: 44px;
}

body.mobile .toast {
  width: min(var(--artboard), calc(100vw - 24px));
  bottom: 16px;
  text-align: center;
}

body.mobile.touring.tour-dock-right #app,
body.mobile.touring #app {
  margin-left: auto;
  margin-right: auto;
  max-width: var(--artboard);
}

body.mobile.touring.tour-dock-right .wt-card,
body.mobile.touring.tour-dock-top .wt-card,
body.mobile.touring .wt-card {
  left: 50%;
  right: auto;
  bottom: auto;
  transform: translateX(-50%);
  width: min(var(--artboard), calc(100vw - 16px));
  max-height: min(34vh, 280px);
}

body.mobile .wt-inner {
  padding: 12px 14px 0;
}

body.mobile .wt-card h3 {
  font-size: 16px;
}

body.mobile .wt-actions {
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 12px 12px;
  margin-top: 10px;
}

body.mobile .wt-actions .link,
body.mobile .wt-actions .btn {
  min-height: 44px;
  padding: 10px 12px;
}

body.mobile .wt-actions .right {
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

body.mobile.touring.tour-dock-top .spot,
body.mobile.touring .spot {
  scroll-margin-top: min(38vh, 300px);
}

body.mobile.touring .page {
  padding-bottom: 32px;
}

@media (max-width: 420px) {
  body.mobile #app,
  body.mobile .outreach {
    border-left: 0;
    border-right: 0;
  }
}

/* ---------- Speech to text ---------- */

.speech-field {
  position: relative;
  display: block;
  min-width: 0;
  max-width: 100%;
}

.speech-field.is-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: auto;
  vertical-align: baseline;
}

.speech-field.is-area {
  width: 100%;
}

.speech-field:not(.is-inline) > input,
.speech-field:not(.is-inline) > textarea {
  width: 100%;
  padding-right: 44px;
}

.ask > .speech-field {
  flex: 1 1 auto;
  min-width: 0;
}

.speech-mic {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--bg);
  color: var(--muted);
  cursor: pointer;
}

.speech-field.is-inline .speech-mic {
  position: static;
  transform: none;
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
}

.speech-field.is-area .speech-mic {
  top: 8px;
  transform: none;
}

.speech-mic:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.speech-mic.is-on {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  animation: speech-pulse 1.1s ease-in-out infinite;
}

.speech-mic.is-translating {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
  animation: none;
}

@keyframes speech-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(22, 86, 184, 0.45); }
  50% { box-shadow: 0 0 0 4px rgba(22, 86, 184, 0); }
}

.speech-status {
  position: absolute;
  top: 50%;
  right: 42px;
  transform: translateY(-50%);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  pointer-events: none;
  white-space: nowrap;
}

.speech-field.is-area .speech-status {
  top: 12px;
  transform: none;
}

.speech-field.is-inline .speech-status {
  top: calc(100% + 2px);
  right: 0;
  transform: none;
}

.speech-status.is-error {
  top: calc(100% + 2px);
  right: 0;
  left: 0;
  transform: none;
  text-align: left;
  text-transform: none;
  letter-spacing: 0;
  font-family: var(--font);
  font-size: 12px;
  white-space: normal;
  color: #9a3412;
}

.outreach .speech-mic {
  background: var(--bg);
  border-color: var(--line);
  color: var(--muted);
}

.outreach .speech-mic:hover,
.outreach .speech-mic.is-on {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.outreach .speech-status {
  color: var(--muted);
}

.outreach .speech-status.is-error {
  color: #fdba74;
}

body.mobile .ask > .speech-field,
.ask > .speech-field {
  align-self: stretch;
}

@media (max-width: 720px) {
  .ask > .speech-field {
    flex: 0 0 auto;
    width: 100%;
  }
}

body.mobile .ask > .speech-field {
  flex: 0 0 auto;
  width: 100%;
}

body.mobile .speech-field:not(.is-inline) > input,
body.mobile .speech-field:not(.is-inline) > textarea {
  padding-right: 44px;
}

/* In forced phone mode the artboard is already the device. Drop the frame
   so the back-of-house view reads as the app, not a picture of the app. */

body.mobile .phone,
body.mobile .phone.is-inline {
  max-width: none;
  border: 0;
  border-radius: 0;
  padding: 0;
}

body.mobile .ph-screen {
  border: 0;
  border-radius: 0;
  padding: 0;
  font-size: 15px;
}

body.mobile .boh-split,
body.mobile .boh-split.is-wide,
body.mobile .boh-preview,
body.mobile .boh-pair {
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
}

/* The station keeps its frame in mobile mode. The viewer is holding a phone,
   but the thing being shown is still a tablet bolted to a wall. */
body.mobile .station,
body.mobile .station.is-inline {
  max-width: none;
}

body.mobile .st-body {
  grid-template-columns: minmax(0, 1fr);
}

body.mobile .st-now {
  border-right: 0;
  border-bottom: 1px solid var(--line);
}

body.mobile .st-change-row {
  font-size: 16px;
}

body.mobile .st-headline {
  font-size: 22px;
}

/* Faux Google Doc — event document samples (not a live Drive connection) */
.doc-backdrop {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 48px 16px 24px;
  background: rgb(32 33 36 / 0.55);
  overflow-y: auto;
}

.gdoc-sample {
  width: min(100%, 920px);
  background: #f9fbfd;
  border-radius: 8px;
  box-shadow: 0 8px 32px rgb(0 0 0 / 0.28);
  overflow: hidden;
}

.gdoc-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px 8px 16px;
  background: #fff;
  border-bottom: 1px solid #dadce0;
}

.gdoc-title-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
}

.gdoc-icon {
  flex-shrink: 0;
  width: 28px;
  height: 36px;
  margin-top: 2px;
  background: linear-gradient(180deg, #4285f4 0%, #4285f4 72%, #fff 72%);
  border-radius: 2px;
  box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.06);
}

.gdoc-titles h2 {
  margin: 0;
  font-family: "Google Sans", "Plus Jakarta Sans", system-ui, sans-serif;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.3;
  color: #202124;
}

.gdoc-file {
  margin: 2px 0 0;
  font-size: 12px;
  color: #5f6368;
}

.gdoc-close {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  font-size: 24px;
  line-height: 1;
  color: #5f6368;
  cursor: pointer;
}

.gdoc-close:hover {
  background: #f1f3f4;
}

.gdoc-toolbar {
  display: flex;
  gap: 8px;
  padding: 6px 16px 8px;
  background: #fff;
  border-bottom: 1px solid #e8eaed;
}

.gdoc-toolbar span {
  display: block;
  width: 20px;
  height: 20px;
  border-radius: 2px;
  background: #e8eaed;
}

.gdoc-page {
  padding: 24px 0 8px;
  background: #f9fbfd;
}

.gdoc-body {
  max-width: 816px;
  margin: 0 auto;
  padding: 48px 72px 64px;
  background: #fff;
  box-shadow: 0 1px 3px rgb(60 64 67 / 0.15);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 11pt;
  line-height: 1.5;
  color: #000;
}

.gdoc-body p {
  margin: 0 0 0.65em;
}

.gdoc-gap {
  min-height: 0.65em;
}

.gdoc-hint {
  margin: 0;
  padding: 10px 16px 14px;
  font-size: 12px;
  color: #5f6368;
  background: #f9fbfd;
  border-top: 1px solid #e8eaed;
}

.grp .doc-link {
  font: inherit;
  text-align: left;
  padding: 0;
}
