/* Sell rate, not rooms.
   Hotel-lobby vernacular: a deep lobby green and brass key tags, with a
   condensed signage face for the numbers (the rate board is the one loud
   thing; everything else stays quiet). */

:root {
  --lobby: #173A33;
  --lobby-2: #1F4A41;
  --brass: #B07A2A;
  --brass-hi: #D9A441;
  --paper: #EEF2EF;
  --surface: #FCFCFB;
  --ink: #15201D;
  --ink-2: #4A5753;
  --rule: #CFD8D4;
  --loss: #A3263A;
  --gain: #2C6E4E;
  --s-base: #1E7FA6;
  --s-held: #B07A2A;
  --on-lobby: #F2F5F3;
  --on-lobby-2: #B9C9C3;
  --focus: #D9A441;
  --num: "Big Shoulders Display", "Arial Narrow", sans-serif;
  --text: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --lobby: #10261F;
    --lobby-2: #173229;
    --paper: #0F1A17;
    --surface: #16241F;
    --ink: #E6ECE9;
    --ink-2: #A9B7B2;
    --rule: #2B3D37;
    --loss: #E0667A;
    --gain: #6FC39A;
    --s-base: #2E95BF;
    --s-held: #C4842A;
    --brass: #C4842A;
  }
}
:root[data-theme="dark"] {
  --lobby: #10261F; --lobby-2: #173229; --paper: #0F1A17; --surface: #16241F;
  --ink: #E6ECE9; --ink-2: #A9B7B2; --rule: #2B3D37; --loss: #E0667A; --gain: #6FC39A;
  --s-base: #2E95BF; --s-held: #C4842A; --brass: #C4842A;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.55 var(--text);
}
.wrap { max-width: 64rem; margin: 0 auto; padding: 0 1rem; }
@media (min-width: 48rem) { .wrap { padding: 0 2rem; } }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Masthead */
.masthead { background: var(--lobby); color: var(--on-lobby); padding: 1.75rem 0 1.25rem; }
.masthead h1 {
  font: 800 clamp(2.75rem, 9vw, 5.5rem)/0.92 var(--num);
  letter-spacing: 0.005em;
  margin: 0 0 0.75rem;
}
.lede { max-width: 38rem; color: var(--on-lobby-2); margin: 0 0 1.25rem; }
.hint { font-size: 0.85rem; color: var(--ink-2); }
.planned { min-width: 0; border: 0; border-top: 1px solid var(--rule); margin: 1.5rem 0 0; padding: 1.25rem 0 0; max-width: 52rem; }
.planned legend { font-weight: 600; padding: 0 0.5rem 0 0; }
.answer.small { font-size: 1.1rem; margin-top: 1rem; }
.stories { display: flex; flex-wrap: wrap; gap: 0.75rem 1rem; align-items: center; }
.stories-label { color: var(--on-lobby-2); font-size: 0.95rem; }
.tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
@media (max-width: 40rem) {
  /* One row on a phone, so the story starts on the first screen. */
  .stories { flex-wrap: nowrap; flex-direction: column; align-items: stretch; gap: 0.4rem; }
  .tags { flex-wrap: nowrap; overflow-x: auto; margin: 0 -1rem; padding: 0 1rem 0.25rem; scrollbar-width: none; }
  .tags::-webkit-scrollbar { display: none; }
  .tag { flex: 0 0 auto; }
  .masthead h1 { font-size: 2.6rem; margin-bottom: 0.4rem; }
}

/* Key tags: brass, a punched hole on the left. */
.tag {
  position: relative;
  font: 600 0.95rem/1 var(--text);
  color: #2A1E08;
  background: var(--brass-hi);
  border: 0;
  padding: 0.6rem 0.9rem 0.6rem 1.6rem;
  border-radius: 0.35rem 1.2rem 1.2rem 0.35rem;
  cursor: pointer;
  min-height: 2.5rem;
}
.tag::before {
  content: "";
  position: absolute;
  left: 0.6rem; top: 50%;
  width: 0.45rem; height: 0.45rem;
  margin-top: -0.225rem;
  border-radius: 50%;
  background: var(--lobby);
}
.tag:hover { background: #E6B55A; }
.tag[aria-pressed="true"] { background: var(--on-lobby); }

/* The front desk */
.desk { background: var(--lobby-2); color: var(--on-lobby); padding: 2.25rem 0 2.5rem; }
.scene { font: 400 1.35rem/1.35 var(--text); max-width: 34rem; margin: 0 0 1.5rem; }
.board { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 2rem; max-width: 40rem; }
.board-label { display: block; color: var(--on-lobby-2); font-size: 0.95rem; margin-bottom: 0.1rem; }
.board-num { font: 800 clamp(4rem, 17vw, 8.5rem)/0.9 var(--num); font-variant-numeric: tabular-nums; }
.board-num .cur { font-size: 0.5em; vertical-align: 0.8em; margin-right: 0.05em; color: var(--on-lobby-2); }
.board-num.quote { color: var(--brass-hi); }
.board input[type="range"] { width: 100%; margin-top: 0.5rem; }

.verdict { font-size: 1.3rem; line-height: 1.4; max-width: 38rem; margin: 1.5rem 0; }
.verdict strong { font-weight: 600; }

.walkaway { max-width: 40rem; margin: 1.75rem 0 1rem; }
.walk-label { display: block; margin-bottom: 0.4rem; }
.walk-label strong { font: 800 1.6rem/1 var(--num); color: var(--brass-hi); margin-left: 0.25rem; }
.walkaway input[type="range"] { width: 100%; }
.walk-slider { position: relative; margin-bottom: 1.9rem; --thumb: 1rem; }
.walk-slider input { position: relative; z-index: 1; }
.track-mark { position: absolute; top: 0.35rem; bottom: 0.35rem; width: 2px; margin-left: -1px; background: var(--brass-hi); }
.track-mark span { position: absolute; top: 1.7rem; left: 50%; transform: translateX(-50%); white-space: nowrap; font-size: 0.85rem; color: var(--brass-hi); }
.walk-verdict { font-size: 1.1rem; margin: 0; }
.leak { font-size: 1.05rem; color: var(--on-lobby-2); max-width: 40rem; margin: 1rem 0 0; }
.leak strong { color: var(--on-lobby); font-weight: 600; }

input[type="range"] { accent-color: var(--brass-hi); height: 2rem; }

.desk .inputs { margin-top: 1.25rem; }
.desk .inputs summary { color: var(--on-lobby-2); }
.desk .in input { background: rgba(255,255,255,0.08); color: var(--on-lobby); border-color: rgba(255,255,255,0.25); }

/* Panels */
.panel { padding: 3rem 0; border-bottom: 1px solid var(--rule); }
.panel h2 { font: 800 clamp(1.9rem, 5vw, 2.6rem)/1 var(--num); margin: 0 0 1.25rem; letter-spacing: 0.005em; }
.plain { max-width: 38rem; color: var(--ink-2); margin: -0.5rem 0 1.25rem; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: 0.9rem 1.5rem; max-width: 52rem; }
.grid label { display: flex; flex-direction: column; gap: 0.3rem; font-size: 0.95rem; color: var(--ink-2); }
.desk .grid label { color: var(--on-lobby-2); }
.in { display: inline-flex; align-items: center; gap: 0.3rem; color: var(--ink); font-weight: 600; }
.desk .in { color: var(--on-lobby); }
.in input {
  width: 7.5rem;
  font: 600 1.15rem/1 var(--text);
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 0.4rem;
  padding: 0.5rem 0.6rem;
  min-height: 2.75rem;
}
.inputs summary { cursor: pointer; font-weight: 600; padding: 0.4rem 0; }
.inputs .grid { margin-top: 0.75rem; }

.answer { font-size: 1.3rem; line-height: 1.45; max-width: 42rem; margin: 1.5rem 0 1rem; }
.answer .n { font: 800 1.7em/1 var(--num); font-variant-numeric: tabular-nums; }
.answer .loss { color: var(--loss); }
.answer .gain { color: var(--gain); }
.fine { font-size: 0.92rem; color: var(--ink-2); max-width: 40rem; }

.story-note {
  max-width: 40rem;
  border-left: 4px solid var(--brass);
  padding: 0.6rem 0 0.6rem 1rem;
  margin: 0 0 1.5rem;
  font-style: italic;
}
.desk .story-note { border-color: var(--brass-hi); color: var(--on-lobby); }

/* Chart */
.chart { margin: 1.5rem 0; max-width: 52rem; }
.chart figcaption { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 1rem; margin-bottom: 0.5rem; }
.chart-title { font-weight: 600; }
.legend { display: inline-flex; gap: 1rem; font-size: 0.92rem; color: var(--ink-2); }
.legend i { display: inline-block; width: 1rem; height: 2px; vertical-align: middle; margin-right: 0.35rem; }
.chart-body { position: relative; background: var(--surface); border-radius: 0.5rem; padding: 0.5rem; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .axis text, .chart .label { font-size: 12px; }
.chart .axis text { fill: var(--ink-2); font: 400 12px var(--text); }
.chart .grid-line { stroke: var(--rule); stroke-width: 1; }
.chart .line { fill: none; stroke-width: 2; stroke-linejoin: round; }
.chart .ref { stroke: var(--ink-2); stroke-dasharray: 4 4; stroke-width: 1; }
.chart .dot { stroke: var(--surface); stroke-width: 2; }
.chart .label { font: 600 12px var(--text); fill: var(--ink); }
.chart .cross { stroke: var(--ink-2); stroke-width: 1; }
.tip {
  position: absolute; pointer-events: none; background: var(--ink); color: var(--paper);
  font-size: 0.85rem; line-height: 1.35; padding: 0.4rem 0.6rem; border-radius: 0.35rem;
  white-space: nowrap; transform: translate(-50%, -110%);
}

.compare { border-collapse: collapse; margin: 1rem 0 0; font-variant-numeric: tabular-nums; width: 100%; max-width: 36rem; }
.compare th, .compare td { text-align: right; padding: 0.45rem 0.6rem; border-bottom: 1px solid var(--rule); }
.compare th:first-child, .compare td:first-child { text-align: left; color: var(--ink-2); font-weight: 400; }
.compare thead th { font-weight: 600; }
.compare tr.head td { font-weight: 600; color: var(--ink); }

.foot { padding: 2.5rem 0 3.5rem; }
.copy {
  font: 600 1rem/1 var(--text); color: var(--on-lobby); background: var(--lobby);
  border: 0; border-radius: 0.4rem; padding: 0.8rem 1.1rem; cursor: pointer; min-height: 2.75rem;
}
.copied { margin-left: 0.75rem; color: var(--gain); }

@media (max-width: 30rem) {
  .board { gap: 0.5rem 1rem; }
  .in input { width: 100%; }
  .grid label { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
html { scroll-behavior: smooth; }
