:root {
  color-scheme: light;
  --ink: #15333a;
  --muted: #567078;
  --paper: #fffdf8;
  --canvas: #f5f0e6;
  --teal: #0d6670;
  --teal-dark: #084954;
  --teal-soft: #dff1ef;
  --coral: #b34830;
  --coral-soft: #fff0e9;
  --gold: #e4ad3f;
  --focus: #806000;
  --blue-soft: #e7f1f5;
  --border: #d7d6cc;
  --shadow: 0 18px 50px rgb(21 51 58 / 10%);
  --radius: 18px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--canvas); }
body { margin: 0; color: var(--ink); background: radial-gradient(circle at 80% 0%, #e5f2ef 0, transparent 30rem), var(--canvas); line-height: 1.55; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: var(--teal-dark); }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .52; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.skip-link { position: fixed; top: .5rem; left: .5rem; z-index: 20; padding: .7rem 1rem; background: var(--paper); border-radius: 8px; transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }

#app { min-height: 100vh; min-height: 100dvh; }
.loading-state { padding-block: 5rem; }
.loading-state h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
.loading-state p { color: var(--muted); }
.shell { width: min(1120px, calc(100% - 2rem)); margin-inline: auto; }
.narrow { width: min(760px, calc(100% - 2rem)); padding-block: 2rem 4rem; }
.hero { display: grid; grid-template-columns: 1.5fr .8fr; gap: 2.5rem; align-items: end; padding-block: clamp(3rem, 8vw, 6.5rem) 2.5rem; }
h1, h2, p { margin-top: 0; }
h1 { max-width: 18ch; margin-bottom: .7rem; font-family: Georgia, "Times New Roman", serif; font-size: clamp(2.45rem, 6vw, 5.2rem); line-height: .98; letter-spacing: -.04em; font-weight: 700; }
h2 { margin-bottom: .5rem; font-size: 1.25rem; }
.eyebrow { margin-bottom: .65rem; color: var(--coral); font-size: .78rem; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.lede { max-width: 66ch; margin-bottom: 0; color: var(--muted); font-size: clamp(1rem, 2vw, 1.2rem); }
.honor-note { padding: 1.35rem; border-left: 5px solid var(--gold); border-radius: 0 var(--radius) var(--radius) 0; background: rgb(255 253 248 / 72%); }
.honor-note strong, .honor-note span { display: block; }
.honor-note span { margin-top: .3rem; color: var(--muted); }

.opening-steps { padding: 0 0 5rem; margin-block: 0; list-style: none; }
.opening-step { padding-block: 1.6rem; border-top: 1px solid var(--border); }
.opening-step:last-child { border-bottom: 1px solid var(--border); }
.step-heading { max-width: 760px; display: grid; grid-template-columns: 42px 1fr; gap: 1rem; align-items: start; }
.step-heading h2 { margin: .05rem 0 .25rem; font-size: 1.45rem; }
.step-heading p { margin: 0; color: var(--muted); }
.step-number { width: 36px; height: 36px; display: grid; place-items: center; color: white; background: var(--teal); border-radius: 50%; font-size: .9rem; font-weight: 900; }
.role-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 1.2rem; }
.role-button { min-height: 145px; display: flex; flex-direction: column; align-items: flex-start; justify-content: end; padding: 1.25rem; color: var(--ink); text-decoration: none; background: var(--paper); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 5px 0 rgb(21 51 58 / 5%); transition: transform .15s, border-color .15s, box-shadow .15s; }
.role-button:hover { transform: translateY(-3px); border-color: var(--teal); box-shadow: var(--shadow); }
.role-button strong { font-size: 1.15rem; }
.role-button small { color: var(--muted); }
.role-number { margin-bottom: auto; color: var(--coral); font-size: .78rem; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.back-link { display: inline-block; margin-bottom: 1.5rem; font-weight: 750; text-decoration: none; }
.role-card { position: relative; overflow: hidden; padding: clamp(1.35rem, 4vw, 2.4rem); background: var(--paper); border: 1px solid var(--border); border-top: 8px solid var(--teal); border-radius: 24px; box-shadow: var(--shadow); }
.role-card.seller { border-top-color: var(--coral); }
.role-title { display: flex; align-items: center; gap: 1rem; }
.role-title h1 { margin: 0; font-family: inherit; font-size: clamp(1.7rem, 5vw, 2.6rem); letter-spacing: -.03em; }
.role-title p { margin: .15rem 0 0; color: var(--muted); font-size: 1.1rem; }
.role-title .role-side { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-top: .45rem; color: var(--ink); font-size: 1.2rem; font-weight: 750; }
.role-side strong { display: inline-block; padding: .2rem .65rem; color: white; background: var(--teal); border-radius: 999px; font-size: 1.05rem; letter-spacing: .07em; text-transform: uppercase; }
.seller .role-side strong { background: var(--coral); }
.participant-chip { flex: 0 0 auto; width: 64px; height: 64px; display: grid; place-items: center; border-radius: 18px; color: white; background: var(--teal); font-size: 1.35rem; font-weight: 900; }
.seller .participant-chip { background: var(--coral); }
.private-number { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-block: 2rem; padding: 1.2rem 1.4rem; background: var(--teal-soft); border-radius: 15px; }
.seller .private-number { background: var(--coral-soft); }
.private-number span { font-weight: 750; }
.private-number strong { font-family: Georgia, serif; font-size: clamp(2.4rem, 9vw, 4rem); line-height: 1; }
.role-instructions { font-size: 1.05rem; }
.formula { padding: .85rem 1rem; background: var(--canvas); border-radius: 10px; font-weight: 800; }
.secret-callout { margin-top: 1.5rem; padding: 1rem; color: #71381f; background: #fff2d8; border: 1px solid #eccd8e; border-radius: 12px; }
.say-this { margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px solid var(--border); }
.say-this span { color: var(--muted); font-size: .78rem; font-weight: 800; text-transform: uppercase; }
.say-this p { margin: .35rem 0 0; font-weight: 750; }
.lingo-card { margin-top: 1rem; padding: 1.3rem; background: rgb(255 253 248 / 65%); border-radius: var(--radius); }
.lingo-card p { margin: 0; }

.spokesperson-shell { padding-block: 1.3rem 5rem; }
.spokesperson-topline { display: flex; justify-content: space-between; align-items: center; min-height: 42px; }
.page-heading { margin-block: 2.2rem 1.7rem; }
.page-heading h1 { font-size: clamp(2.3rem, 5vw, 4.4rem); }
.stepper { display: grid; grid-template-columns: repeat(6, 1fr); gap: .5rem; padding: 0; margin: 1.5rem 0 0; list-style: none; }
.stepper li { display: flex; align-items: center; gap: .45rem; color: var(--muted); }
.stepper li::after { content: ""; height: 2px; flex: 1; background: var(--border); }
.stepper li:last-child::after { display: none; }
.stepper span { width: 27px; height: 27px; display: grid; place-items: center; flex: 0 0 auto; border: 2px solid var(--border); border-radius: 50%; font-size: .75rem; font-weight: 850; }
.stepper small { font-weight: 700; }
.stepper .current { color: var(--teal-dark); }
.stepper .current span { color: white; background: var(--teal); border-color: var(--teal); }
.stepper .done { color: var(--teal); }
.stepper .done span { border-color: var(--teal); }

.panel { padding: clamp(1.2rem, 3vw, 1.8rem); background: var(--paper); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 5px 0 rgb(21 51 58 / 4%); }
.setup-form label { display: block; margin-bottom: .55rem; font-weight: 800; }
.count-row { display: grid; grid-template-columns: 1fr auto; gap: .8rem; }
select, input { width: 100%; min-height: 50px; padding: .7rem .85rem; color: var(--ink); background: white; border: 1.5px solid #7d8e90; border-radius: 10px; }
select:focus, input:focus { border-color: var(--teal); }
.form-hint { margin: .65rem 0 0; color: var(--muted); font-size: .87rem; }
.checklist { margin-top: 1rem; }
.checklist ul { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; padding: 0; margin: 1rem 0 0; list-style: none; counter-reset: jobs; }
.checklist li { counter-increment: jobs; color: var(--muted); }
.checklist li::before { content: counter(jobs); display: grid; place-items: center; width: 26px; height: 26px; margin-bottom: .45rem; color: var(--teal-dark); background: var(--teal-soft); border-radius: 50%; font-weight: 850; }
.alert { margin-top: 1rem; padding: .8rem 1rem; border-radius: 10px; }
.alert.warning { color: #684913; background: #fff2cc; border: 1px solid #efd38a; }
.alert.error { color: #7a321f; background: var(--coral-soft); border: 1px solid #efb7a7; }
.hidden { display: none !important; }

.assignment-panel > p { font-size: 1.05rem; }
.assignment-sequence { display: grid; grid-template-columns: repeat(auto-fit, minmax(95px, 1fr)); gap: .65rem; padding: 0; margin: 1.5rem 0; list-style: none; }
.assignment-sequence li { min-height: 98px; display: flex; flex-direction: column; align-items: center; justify-content: center; background: var(--blue-soft); border-radius: 13px; }
.assignment-sequence small { color: var(--muted); }
.assignment-sequence strong { font-size: 1.85rem; }
.read-aloud { margin-top: 1rem; padding: 1.4rem; color: white; background: var(--teal-dark); border-radius: var(--radius); }
.read-aloud > span { color: #b9dedb; font-size: .76rem; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.read-aloud blockquote { margin: .6rem 0 0; font-family: Georgia, serif; font-size: clamp(1.1rem, 2.5vw, 1.4rem); line-height: 1.55; }
.read-aloud.prominent { padding: clamp(1.5rem, 5vw, 2.8rem); }
.read-aloud.compact blockquote { font-size: 1.05rem; }
.mini-rules { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 1rem; }
.mini-rules strong, .mini-rules span { display: block; }
.mini-rules span { color: var(--muted); }

.primary-button, .secondary-button, .text-button { min-height: 46px; padding: .7rem 1rem; border-radius: 10px; font-weight: 800; }
.primary-button { color: white; background: var(--teal); border: 1px solid var(--teal); box-shadow: 0 3px 0 var(--teal-dark); }
.primary-button:hover { background: var(--teal-dark); }
.secondary-button { color: var(--teal-dark); background: white; border: 1.5px solid var(--teal); }
.text-button { min-height: auto; padding: .35rem; color: var(--teal-dark); background: transparent; border: 0; text-decoration: underline; }
.danger-text { color: #a3452f; }
.primary-button.large { min-width: min(100%, 310px); min-height: 58px; font-size: 1.1rem; }
.primary-button.full { width: 100%; margin-top: 1rem; }
.action-row { display: flex; align-items: center; gap: 1rem; margin-top: 1.2rem; }
.action-row.end { justify-content: end; }
.action-row.between { justify-content: space-between; }
.action-row p { margin: 0; color: var(--muted); }

.start-panel { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.2rem 1.4rem; margin-bottom: 1rem; background: var(--teal-soft); border-radius: var(--radius); }
.start-panel p { margin: 0; font-weight: 700; }
.timer { display: grid; grid-template-columns: auto 1fr; gap: .15rem 1.5rem; align-items: center; margin-bottom: 1rem; padding: 1.1rem 1.5rem; color: white; background: var(--teal-dark); border-radius: var(--radius); }
.timer-label { color: #b9dedb; font-size: .82rem; font-weight: 800; text-transform: uppercase; }
.timer strong { grid-row: span 2; font-variant-numeric: tabular-nums; font-size: clamp(3rem, 8vw, 5rem); line-height: 1; }
.timer p { margin: 0; font-weight: 750; }
.timer.urgent { background: #9e492e; }
.timer.expired { background: #532f2a; }
.trading-layout { display: grid; grid-template-columns: 1.15fr .85fr; gap: 1rem; }
.section-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.section-heading .eyebrow { margin-bottom: .2rem; }
.section-heading h2 { margin: 0; font-size: 1.55rem; }
.confirmation-script { padding: .8rem 1rem; margin-bottom: 1rem; background: var(--blue-soft); border-radius: 10px; font-weight: 700; }
.trade-confirmation { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; padding: 1rem 1.2rem; color: #583616; background: #fff0c9; border: 1px solid #e4c16c; border-radius: var(--radius); }
.trade-confirmation span { flex: 0 0 auto; font-size: .76rem; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.trade-confirmation strong { font-size: 1.05rem; text-align: right; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.field-grid label { font-weight: 800; }
.field-grid label:last-child { grid-column: span 2; }
.field-grid select, .field-grid input { display: block; margin-top: .35rem; font-weight: 500; }
.trade-tape { padding: 0; margin: 0 0 .8rem; list-style: none; }
.trade-tape li { display: grid; grid-template-columns: 28px 1fr auto; gap: .65rem; align-items: center; padding: .85rem 0; border-bottom: 1px solid var(--border); }
.trade-index { width: 25px; height: 25px; display: grid; place-items: center; color: var(--teal-dark); background: var(--teal-soft); border-radius: 50%; font-size: .75rem; font-weight: 850; }
.trade-price { font-size: 1.08rem; }
.empty-tape { min-height: 135px; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--muted); background: var(--canvas); border-radius: 12px; text-align: center; }
.empty-tape strong { color: var(--ink); }
.review-layout { display: grid; grid-template-columns: 1.4fr .6fr; gap: 1rem; }
.quick-summary { display: flex; flex-direction: column; justify-content: center; gap: .35rem; background: var(--teal-soft); }
.quick-summary span { color: var(--muted); font-size: .8rem; font-weight: 800; text-transform: uppercase; }
.quick-summary strong { font-size: 1.3rem; }

.report-card { display: grid; grid-template-columns: repeat(3, 1fr); overflow: hidden; background: var(--paper); border: 1px solid var(--border); border-radius: 22px; box-shadow: var(--shadow); }
.report-stat { min-height: 210px; display: flex; flex-direction: column; justify-content: center; padding: 1.5rem; border-right: 1px solid var(--border); }
.report-stat:last-child { border-right: 0; }
.report-stat span { color: var(--muted); font-size: .8rem; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.report-stat strong { margin-block: .25rem; font-family: Georgia, serif; font-size: clamp(2.8rem, 7vw, 4.6rem); line-height: 1; }
.report-stat small { color: var(--muted); }
.record-round, .final-tape, .winner-panel { margin-top: 1rem; }
.record-round p:last-child, .winner-panel > p:last-of-type { margin-bottom: 0; }
/* Sized to stay legible in a phone screenshot, which is how most spokespeople
   will keep it. */
.record-sheet { margin: 0; padding: 1rem 1.2rem; background: var(--canvas); border: 2px dashed #7d8e90; border-radius: 12px; }
.record-sheet > div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1.5rem; padding: .55rem 0; border-bottom: 1px solid var(--border); }
.record-sheet > div:last-child { padding-bottom: 0; border-bottom: 0; }
.record-sheet dt { color: var(--muted); font-size: .8rem; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.record-sheet dd { margin: 0; font-family: Georgia, serif; font-size: 1.35rem; font-weight: 700; overflow-wrap: anywhere; }
.winner-note { max-width: 66ch; margin-top: 1.2rem; color: var(--muted); }
.final-tape summary { cursor: pointer; font-weight: 800; }
.final-tape[open] summary { margin-bottom: 1rem; }
.winner-result { margin-top: 1.2rem; padding: 1.2rem 1.4rem; color: #583616; background: #fff0c9; border: 1px solid #e4c16c; border-radius: 13px; }
.winner-result strong { display: block; font-family: Georgia, serif; font-size: clamp(1.5rem, 4vw, 2.2rem); }
.winner-result p { margin: .35rem 0 0; font-weight: 750; }
.next-session { display: flex; align-items: center; justify-content: space-between; gap: 2rem; margin-top: 1rem; }
.next-session h2 { margin-bottom: .3rem; }
.next-session p { max-width: 65ch; margin: 0; color: var(--muted); }
.next-session button { flex: 0 0 auto; }

noscript { display: block; padding: 1rem; color: white; background: #7a321f; text-align: center; }

@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; gap: 1.2rem; padding-top: 3rem; }
  .role-grid { grid-template-columns: repeat(2, 1fr); }
  .stepper small { display: none; }
  .checklist ul { grid-template-columns: 1fr 1fr; }
  .trading-layout, .review-layout { grid-template-columns: 1fr; }
  .report-card { grid-template-columns: 1fr; }
  .report-stat { min-height: 145px; border-right: 0; border-bottom: 1px solid var(--border); }
  .mini-rules { grid-template-columns: 1fr; }
  .next-session { align-items: stretch; flex-direction: column; }
}

@media (max-width: 500px) {
  .role-grid { grid-template-columns: 1fr; }
  .role-button { min-height: 125px; }
  .count-row, .field-grid { grid-template-columns: 1fr; }
  .field-grid label:last-child { grid-column: span 1; }
  .checklist ul { grid-template-columns: 1fr; }
  .action-row, .start-panel { align-items: stretch; flex-direction: column; }
  .trade-confirmation { align-items: flex-start; flex-direction: column; }
  .trade-confirmation strong { text-align: left; }
  .action-row button, .start-panel button { width: 100%; }
  .timer { grid-template-columns: 1fr; text-align: center; }
  .timer strong { grid-row: auto; order: -1; }
  .trade-tape li { grid-template-columns: 26px 1fr; }
  .trade-price { grid-column: 2; }
}

@media (max-width: 380px) {
  .private-number { align-items: flex-start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
