/* Colours and faces copied from the LITMUS client:
 *   ~/LITMUS2/litmus-client/src/styles/tokens.css (:root block, at c769c12)
 *   ~/LITMUS2/litmus-client/index.html (Google Fonts link)
 * The five ramp values keep their hex; the ramp variables are renamed to this
 * scale's labels. As in LITMUS, the ramp fills marks only, never text. */

:root {
  --ground: #F1F0ED;
  --surface: #FAF9F7;
  --ink: #1E1F22;
  --ink2: #45464B;
  --ink3: #63646A;
  --rule: #D9D7D2;
  --rule-strong: #838488;
  --tint: #F7E1C4;
  --hot-line: #B2511E;

  --ph-proportionate: #C0C9CE;
  --ph-grounded:     #B7AE8E;
  --ph-mixed:        #C1893C;
  --ph-hot:          #C05A16;
  --ph-hyperbolic:   #AD3118;
  --mark-stroke: rgba(30, 31, 34, 0.55);

  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  color-scheme: light;
}

* { box-sizing: border-box; }

html {
  background: var(--ground);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--ground);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  overflow-x: hidden;
}

[hidden] { display: none !important; }

:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

.masthead {
  display: flex;
  align-items: center;
  gap: 11px;
  max-width: 760px;
  margin: 0 auto;
  padding: 20px 16px 8px;
}
.ramp { display: inline-flex; gap: 2px; }
.ramp i { display: block; width: 5px; height: 15px; border-radius: 1px; }
.ramp i:nth-child(1) { background: var(--ph-proportionate); }
.ramp i:nth-child(2) { background: var(--ph-grounded); }
.ramp i:nth-child(3) { background: var(--ph-mixed); }
.ramp i:nth-child(4) { background: var(--ph-hot); }
.ramp i:nth-child(5) { background: var(--ph-hyperbolic); }
.wordmark { font-weight: 600; font-size: 17px; letter-spacing: 0.2em; line-height: 1; }
.live {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink2);
  border: 1px solid var(--rule-strong);
  border-radius: 3px;
  padding: 2px 6px;
}

main { max-width: 760px; margin: 0 auto; padding: 8px 16px 40px; }

.label {
  margin: 0 0 4px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink3);
}

button {
  font: inherit;
  font-weight: 600;
  font-size: 15px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 6px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--surface);
  cursor: pointer;
}
button.secondary { background: var(--surface); color: var(--ink); }
button.stop { background: var(--ph-hyperbolic); border-color: var(--ph-hyperbolic); }
button:disabled { opacity: 0.45; cursor: default; }

.gate { display: flex; justify-content: center; padding-top: 12vh; }
.gate form { display: grid; gap: 10px; width: min(320px, 100%); }
.gate label { font-weight: 600; }
.gate input {
  font: inherit;
  font-size: 16px; /* 16px stops iOS zooming on focus */
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--rule-strong);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
}

.error { color: var(--ink); background: var(--tint); border-left: 3px solid var(--hot-line); padding: 8px 12px; margin: 8px 0; }
.banner { background: var(--tint); border-left: 3px solid var(--hot-line); padding: 10px 12px; margin-bottom: 12px; font-weight: 600; }
.hint { color: var(--ink2); margin: 8px 0 0; font-size: 15px; }

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

.now { margin-top: 16px; min-height: 76px; }
.interim {
  margin: 0;
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.35;
  color: var(--ink2);
  font-style: italic;
  min-height: 2.7em;
  overflow-wrap: anywhere;
}

.gauge { margin: 8px auto 0; max-width: 520px; }
.gauge svg { display: block; width: 100%; height: auto; }
.needle {
  transform-origin: 100px 100px;
  transform: rotate(-90deg);
  transition: transform 600ms cubic-bezier(0.3, 0.7, 0.3, 1);
}
.needle.idle { opacity: 0.25; }
.gauge figcaption {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: baseline;
  gap: 8px;
  margin-top: 4px;
  font-size: 13px;
  color: var(--ink2);
}
.gauge .end:last-child { text-align: right; }
.gauge .value { font-size: 15px; font-weight: 600; color: var(--ink); text-align: center; }

.showing { margin-top: 16px; }
.sentence { margin: 0; font-family: var(--serif); font-size: 18px; line-height: 1.4; overflow-wrap: anywhere; }

.hottest {
  margin-top: 16px;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 12px 14px;
}

.row { display: grid; grid-template-columns: 12px auto 1fr; column-gap: 10px; row-gap: 2px; align-items: baseline; }
.row.empty { display: block; color: var(--ink3); }
.row .dot { width: 12px; height: 12px; border-radius: 50%; border: 1px solid var(--mark-stroke); align-self: start; margin-top: 0.5em; }
.row .score { font-weight: 600; font-variant-numeric: tabular-nums; }
.row .sentence { grid-column: 3; }
.row .reason { grid-column: 3; margin: 0; font-size: 15px; color: var(--ink2); }
.row .lag { grid-column: 3; font-size: 12px; color: var(--ink3); font-variant-numeric: tabular-nums; }

.list { list-style: none; margin: 20px 0 0; padding: 0; border-top: 1px solid var(--rule); }
.list li { padding: 12px 0; border-bottom: 1px solid var(--rule); }

.readout {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin-top: 20px;
  font-size: 13px;
  color: var(--ink3);
  font-variant-numeric: tabular-nums;
}
.debug { margin-left: auto; display: inline-flex; gap: 6px; align-items: center; cursor: pointer; }

@media (min-width: 900px) {
  .interim { font-size: 22px; }
  .sentence { font-size: 20px; }
}

.row.noclaim .dot { background: transparent; }
.row.noclaim .score, .row.noclaim .sentence, .row.noclaim .reason { color: var(--ink3); }

.synopsis {
  margin-top: 16px;
  background: var(--surface);
  border: 1px solid var(--rule-strong);
  border-radius: 8px;
  padding: 14px 16px;
}
.synopsis .verdict { margin: 0 0 6px; font-size: 20px; font-weight: 600; }
.synopsis .why { margin: 0 0 8px; font-family: var(--serif); font-size: 18px; line-height: 1.4; }
.synopsis .counts { margin: 0 0 12px; font-size: 14px; color: var(--ink2); font-variant-numeric: tabular-nums; }
.synopsis h3.label { margin-top: 12px; }
.proof { list-style: none; margin: 0; padding: 0; }
.proof li { padding: 8px 0; border-top: 1px solid var(--rule); }

/* The site's loaded-words treatment, from litmus-client/src/styles/tokens.css
   (.hl-loaded): warm tint fill and a 1.5px warm underline. */
mark.hl-loaded {
  background: var(--tint);
  color: inherit;
  text-decoration-line: underline;
  text-decoration-color: var(--hot-line);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.22em;
  border-radius: 2px;
  padding: 0 0.06em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.synopsis .summary-para { margin: 0 0 12px; font-family: var(--serif); font-size: 18px; line-height: 1.5; }
.whole { margin-top: 14px; }
.whole summary { cursor: pointer; font-weight: 600; font-size: 14px; color: var(--ink2); padding: 6px 0; }

/* Speech report: round 3 Version 1 (Max, 2026-10-07). */
.report { margin-top: 20px; background: var(--surface); border: 1px solid var(--rule); border-radius: 10px; padding: 16px; }
.report .rhead { display: grid; grid-template-columns: 1fr auto; gap: 6px 16px; align-items: end; margin-bottom: 10px; }
.report .rtitle { margin: 0; font-family: var(--serif); font-size: 22px; line-height: 1.2; }
.report .rverdict { text-align: right; }
.report .verdict { margin: 0; font-size: 24px; font-weight: 700; line-height: 1.1; }
.report .rsub { margin: 2px 0 0; font-size: 13px; color: var(--ink3); }
.report .summary-para { margin: 0 0 10px; font-family: var(--serif); font-size: 18px; line-height: 1.5; }
.report .why { margin: 0 0 12px; font-size: 15px; color: var(--ink2); }
.graph svg { display: block; width: 100%; height: auto; font-family: var(--sans); }
.graph-read { min-height: 58px; margin-top: 6px; padding: 8px 10px; background: var(--ground); border-radius: 8px; }
.graph-read .meta { font-size: 13px; color: var(--ink2); }
.graph-read .ln { font-family: var(--serif); font-size: 18px; line-height: 1.4; }
.panels { display: grid; grid-template-columns: 1.05fr 1fr 1fr; gap: 12px; margin-top: 14px; }
.panel { border: 1px solid var(--rule); border-radius: 10px; padding: 12px; min-width: 0; }
.panel h3 { margin: 0 0 6px; font-size: 15px; }
.style-name { font-family: var(--serif); font-size: 19px; line-height: 1.25; margin: 0 0 8px; }
.appeals { display: flex; height: 24px; border-radius: 6px; overflow: hidden; gap: 2px; }
.appeals div { display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; color: var(--ink); }
.appeal-key { display: grid; grid-template-columns: auto 1fr auto; gap: 2px 8px; font-size: 13px; color: var(--ink2); margin-top: 6px; align-items: center; }
.appeal-key b { color: var(--ink); font-variant-numeric: tabular-nums; }
.swatch { display: inline-block; width: 12px; height: 12px; border-radius: 3px; border: 1px solid var(--mark-stroke); }
.def { font-size: 12px; color: var(--ink3); margin: 6px 0 0; }
.rows .row { all: unset; box-sizing: border-box; display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; width: 100%; padding: 8px 4px; border-top: 1px solid var(--rule); cursor: pointer; }
.rows .row:first-child { border-top: none; }
.rows .row:hover, .rows .row.on { background: rgba(247, 225, 196, 0.5); }
.rows .row:focus-visible { outline: 2px solid var(--ink); }
.rows .name { font-weight: 600; font-size: 14px; }
.rows .count { font-weight: 700; font-variant-numeric: tabular-nums; }
.rows .def { grid-column: 1 / -1; margin: 0; }
.rows .ex { grid-column: 1 / -1; font-family: var(--serif); font-size: 15px; line-height: 1.35; color: var(--ink2); }
.rows .bar { grid-column: 1 / -1; height: 4px; border-radius: 0 3px 3px 0; background: var(--ink2); }
.rows .bar.f { background: var(--ph-hyperbolic); }
@media (max-width: 760px) {
  .panels { grid-template-columns: 1fr; }
  .report .rhead { grid-template-columns: 1fr; }
  .report .rverdict { text-align: left; }
}
.report .rescore { margin-top: 8px; min-height: 36px; font-size: 13px; padding: 0 12px; }
