/* Reaction Desk — reactiondesk.com
   Typography and colour follow the sheets. Dense, tabular, no decoration. */

:root {
  --ink:    #111418;
  --muted:  #5b646d;
  --rule:   #d5dade;
  --panel:  #f2f4f6;
  --red:    #C8102E;
  --bull:   #0e7a4b;
  --bear:   #c0261c;
  --amber:  #8a6d00;
  --paper:  #ffffff;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  font-variant-numeric: tabular-nums;
}

.wrap { max-width: 860px; margin: 0 auto; padding: 0 22px; }

/* ---- banner ---- */

.banner {
  background: var(--red);
  color: #fff;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 11px 0;
}
.banner .wrap > span:first-child::before {
  content: "";
  display: inline-block;
  width: 14px; height: 14px;
  margin-right: 9px;
  vertical-align: -2px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Crect x='2' y='14.5' width='28' height='3' fill='white' opacity='0.55'/%3E%3Crect x='21' y='9' width='3' height='14' fill='white'/%3E%3C/svg%3E") center/contain no-repeat;
}

.banner .wrap { display: flex; justify-content: space-between; gap: 20px; }
.banner a { color: #fff; text-decoration: none; opacity: 0.82; margin-left: 20px; }
.banner a:hover { opacity: 1; text-decoration: underline; }
.banner .nav { white-space: nowrap; }

/* ---- headings ---- */

h1 {
  font-size: 40px;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 48px 0 6px;
  font-weight: 700;
}
.standfirst {
  font-size: 21px;
  line-height: 1.35;
  color: var(--ink);
  margin: 0 0 30px;
  font-weight: 600;
}
h2 {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--red);
  margin: 46px 0 12px;
  font-weight: 400;
}
h3 { font-size: 17px; margin: 30px 0 6px; }

p { margin: 0 0 14px; }
.lede p { font-size: 17px; }

/* ---- prose panel, as on the sheets ---- */

.panel {
  background: var(--panel);
  border-left: 3px solid var(--red);
  padding: 18px 22px;
  margin: 0 0 8px;
}
.panel p:last-child { margin-bottom: 0; }

/* ---- record table ---- */

table { width: 100%; border-collapse: collapse; font-size: 15px; }
thead th {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 400;
  text-align: left;
  padding: 0 10px 8px 0;
  border-bottom: 1px solid var(--rule);
}
tbody td {
  padding: 11px 10px 11px 0;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}
tbody tr:hover { background: #fafbfc; }
td.num { text-align: right; padding-right: 22px; white-space: nowrap; }
th.num { text-align: right; padding-right: 22px; }
td.name { font-weight: 600; }
td.date { color: var(--muted); white-space: nowrap; }

.grade { font-weight: 700; font-size: 13px; letter-spacing: 0.02em; white-space: nowrap; }
.hit   { color: var(--bull); }
.off   { color: var(--amber); }
.miss  { color: var(--bear); }

.summary {
  font-size: 17px;
  font-weight: 600;
  margin: 18px 0 0;
}
.summary span { color: var(--muted); font-weight: 400; }

/* ---- outcome strip ---- */

.strip { margin: 26px 0 6px; }
.axis {
  position: relative;
  height: 74px;
  border-bottom: 1px solid var(--rule);
}
.zero {
  position: absolute; top: 0; bottom: 0;
  border-left: 1px solid var(--rule);
}
.dot {
  position: absolute;
  width: 11px; height: 11px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}
.dot.hit { background: var(--bull); }
.dot.off { background: var(--amber); }
.dot.wrong { background: var(--bear); }

.mock {
  font-size: 12px;
  color: var(--bear);
  font-weight: 600;
  margin: 4px 0 0;
}
.dot-label {
  position: absolute;
  font-size: 11px;
  color: var(--muted);
  transform: translateX(-50%);
  white-space: nowrap;
}
.ticks {
  position: relative; height: 22px; font-size: 11px; color: var(--muted);
}
.tick { position: absolute; transform: translateX(-50%); padding-top: 4px; }

/* ---- calibration chart ---- */

.calib { margin: 24px 0 6px; }
.calib-row { display: flex; align-items: center; height: 30px; }
.calib-name {
  width: 46px; flex: 0 0 46px;
  font-size: 12px; font-weight: 600;
  font-family: var(--mono);
}
.calib-track { flex: 1 1 auto; position: relative; height: 30px; }
.calib-close {
  width: 58px; flex: 0 0 58px;
  font-size: 12px; text-align: right; color: var(--muted);
  white-space: nowrap;
}
.calib-bar {
  position: absolute; top: 11px; height: 8px;
  background: #dde3e8;
}
.calib-bar.open-low  { background: linear-gradient(to right, rgba(221,227,232,0) 0, rgba(221,227,232,1) 58px); }
.calib-bar.open-high { background: linear-gradient(to left,  rgba(221,227,232,0) 0, rgba(221,227,232,1) 58px); }
.calib-mark {
  position: absolute; top: 5px;
  width: 3px; height: 20px;
  transform: translateX(-1.5px);
}
.calib-mark.hit   { background: var(--bull); }
.calib-mark.off   { background: var(--amber); }
.calib-mark.wrong { background: var(--bear); }
.calib-zero {
  position: absolute; top: 0; bottom: 0;
  border-left: 1px solid var(--rule);
}
.calib-axis {
  display: flex; align-items: center;
  height: 22px; font-size: 11px; color: var(--muted);
  border-top: 1px solid var(--rule);
  margin-top: 2px;
}
.calib-axis .calib-track { height: 22px; }
.calib-axis .tick { position: absolute; top: 4px; transform: translateX(-50%); }

.key { font-size: 13px; color: var(--muted); margin-top: 6px; }
.key b { font-weight: 600; }
.key .sw {
  display: inline-block; width: 9px; height: 9px; border-radius: 50%;
  margin: 0 5px 0 14px; vertical-align: baseline;
}
.key .sw:first-of-type { margin-left: 0; }

/* ---- gate ---- */

.gate {
  border: 1px solid var(--rule);
  padding: 22px;
  margin: 34px 0 10px;
}
.gate h3 { margin-top: 0; }
.gate form { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.gate input[type=email] {
  flex: 1 1 280px;
  font: inherit;
  padding: 10px 12px;
  border: 1px solid var(--rule);
  background: #fff;
}
.gate button {
  font: inherit; font-weight: 600;
  padding: 10px 20px;
  border: 0; background: var(--ink); color: #fff; cursor: pointer;
}
.gate button:hover { background: var(--red); }
.gate label { display: block; font-size: 13px; color: var(--muted); margin-top: 12px; }
.gate input[type=checkbox] { margin-right: 6px; }

/* ---- footer ---- */

footer {
  margin: 64px 0 0;
  border-top: 1px solid var(--rule);
  padding: 18px 0 60px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
}
footer p { margin: 0 0 7px; }
footer a { color: var(--muted); }

/* ---- worked example pages ---- */

.stage {
  border-top: 2px solid var(--ink);
  padding-top: 4px;
  margin-top: 40px;
}
.stage-when {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 2px;
}
.stage h3 { margin: 0 0 14px; font-size: 20px; }

.watchbar {
  background: var(--ink);
  color: #fff;
  padding: 13px 18px;
  font-weight: 600;
  font-size: 17px;
  margin: 0 0 18px;
}

.scen { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.scen td { padding: 10px 12px 10px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
.scen tr.base td { background: #fdf8e8; }
.scen .sid { width: 30px; font-family: var(--mono); font-weight: 700; font-size: 12px; }
.scen .cond b { display: block; }
.scen .tape { width: 108px; font-weight: 700; white-space: nowrap; }
.scen .tape.up { color: var(--bull); }
.scen .tape.mid { color: var(--amber); }
.scen .tape.dn { color: var(--bear); }
.basetag {
  font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.09em;
  color: var(--amber); margin-left: 6px;
}

.qs { width: 100%; border-collapse: collapse; font-size: 14.5px; margin-top: 4px; }
.qs td { padding: 11px 12px 11px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
.qs .ql { width: 108px; font-size: 11px; font-family: var(--mono); letter-spacing: 0.05em;
          text-transform: uppercase; color: var(--muted); }
.qs .qt b { display: block; }
.qs .qt span { color: var(--muted); font-size: 13px; }
.qs .ans { width: 92px; text-align: right; font-weight: 700; font-size: 13px; white-space: nowrap; }
.qs .ans.yes { color: var(--bull); }
.qs .ans.no  { color: var(--amber); }

.result { display: flex; flex-wrap: wrap; gap: 0; border: 1px solid var(--rule); margin: 0 0 18px; }
.result div { flex: 1 1 130px; padding: 12px 16px; border-right: 1px solid var(--rule); }
.result div:last-child { border-right: 0; }
.result dt {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.09em;
  text-transform: uppercase; color: var(--muted); margin: 0 0 3px;
}
.result dd { margin: 0; font-size: 19px; font-weight: 700; }
.result dd.hit { color: var(--bull); }
.result dd.off { color: var(--amber); }

.pullquote {
  font-size: 18px; line-height: 1.4; font-weight: 600;
  border-left: 3px solid var(--red); padding: 4px 0 4px 18px; margin: 26px 0;
}

.backlink { font-size: 13px; margin-top: 40px; }

tr.linked { cursor: pointer; }
tr.linked td.name a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--rule); }
tr.linked:hover td.name a { border-bottom-color: var(--red); }

/* ---- method page ---- */

.steps { counter-reset: step; margin: 0; padding: 0; list-style: none; }
.steps li {
  counter-increment: step;
  border-top: 1px solid var(--rule);
  padding: 16px 0 16px 42px;
  position: relative;
}
.steps li::before {
  content: counter(step);
  position: absolute; left: 0; top: 16px;
  font-family: var(--mono); font-size: 13px; color: var(--red);
}
.steps b { display: block; }

.note { font-size: 14px; color: var(--muted); }

/* ---- caveat block: separated, one idea per line ---- */

.caveat {
  margin: 30px 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--rule);
}
.caveat p {
  font-size: 14px;
  line-height: 1.55;
  color: var(--muted);
  margin: 0 0 12px;
}
.caveat p:last-child { margin-bottom: 0; }
.caveat b { color: var(--ink); font-weight: 600; }

/* ---- document links ---- */

.docs { border-top: 1px solid var(--rule); margin: 14px 0 8px; }
.docs a {
  display: flex; align-items: baseline; gap: 14px;
  border-bottom: 1px solid var(--rule);
  padding: 14px 2px;
  text-decoration: none; color: var(--ink);
}
.docs a:hover { background: #fafbfc; }
.docs .kind {
  flex: 0 0 104px;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.09em;
  text-transform: uppercase; color: var(--red);
}
.docs .what { flex: 1 1 auto; font-weight: 600; }
.docs .what span { display: block; font-weight: 400; font-size: 13.5px; color: var(--muted); }
.docs .pdf { flex: 0 0 auto; font-size: 12px; color: var(--muted); white-space: nowrap; }

@media (max-width: 620px) {
  .docs a { flex-wrap: wrap; gap: 4px 12px; }
  .docs .kind { flex-basis: 100%; }
}

@media (max-width: 620px) {
  h1 { font-size: 30px; margin-top: 34px; }
  .standfirst { font-size: 18px; }
  body { font-size: 15px; }
  .banner .wrap { flex-direction: column; gap: 6px; }
  .banner a { margin-left: 0; margin-right: 18px; }
  table { font-size: 13.5px; }
  td.num, th.num { padding-right: 10px; }
  /* record table: fit a phone without sideways scroll */
  thead th { font-size: 10px; letter-spacing: 0.06em; padding-right: 6px; }
  tbody td { padding: 10px 6px 10px 0; }
  td.date { white-space: normal; }
  td.num, th.num { padding-right: 8px; }
  .grade { font-size: 11px; letter-spacing: 0; white-space: normal; }
}

/* ---- how it works: three sheets on one time rail (home page) ---- */

.hiw { margin: 22px 0 10px; }
.hiw-lead { font-size: 17px; margin: 0 0 22px; }

/* the rail: positions are % of the full width, matching the grid below
   (columns 1 : 1.35 : 1, so day two starts at 29.85% and day three at 70.15%) */
.hiw-rail { position: relative; height: 92px; }

.hiw-day {
  position: absolute; top: 0;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--muted); white-space: nowrap;
}

.hiw-line { position: absolute; left: 0; right: 0; top: 50px; height: 2px; background: var(--rule); }

.hiw-seg { position: absolute; top: 49px; height: 4px; }
.hiw-seg.lock   { left: 15%; width: 18%; background: var(--red); }
.hiw-seg.fixed  { left: 42%; width: 24%; background: var(--ink); }
.hiw-seg.graded { left: 66%; width: 16%; background: var(--ink); }
.hiw-seg b {
  position: absolute; top: 10px; left: 18px;
  font-family: var(--mono); font-size: 10.5px; font-weight: 700;
  letter-spacing: 0.14em; white-space: nowrap;
}
.hiw-seg.lock b   { color: var(--red); }
.hiw-seg.fixed b, .hiw-seg.graded b { color: var(--ink); }
.hiw-seg.graded b { left: 10px; }

.hiw-tick { position: absolute; top: 40px; height: 22px; border-left: 1px solid var(--ink); }
.hiw-tick span {
  position: absolute; top: -20px; left: 5px;
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--ink); white-space: nowrap;
}
.hiw-tick.release { top: 22px; height: 46px; border-left: 2px solid var(--red); }
.hiw-tick.release span { top: -2px; left: 6px; color: var(--red); font-weight: 700; }

.hiw-node {
  position: absolute; top: 39px; width: 24px; height: 24px; margin-left: -12px;
  border-radius: 50%; background: var(--ink); color: #fff;
  font-family: var(--mono); font-size: 12px; font-weight: 700; line-height: 24px; text-align: center;
  box-shadow: 0 0 0 3px var(--paper);
}
.hiw-node::after {
  content: ""; position: absolute; left: 11.5px; top: 27px; width: 1px; height: 26px;
  background: var(--ink);
}

/* the three sheets */
.hiw-grid { display: grid; grid-template-columns: 1fr 1.35fr 1fr; }
.hiw-card {
  display: flex; flex-direction: column; min-width: 0;
  border-top: 2px solid var(--ink); padding-top: 14px; margin-right: 26px;
}
.hiw-card:last-child { margin-right: 0; }

.hiw-head { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 14px; }
.hiw-thumb { flex: 0 0 52px; width: 52px; height: 73px; display: block; }
.hiw-kick {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--red); margin: 0 0 2px;
}
.hiw-card h3 { font-size: 19px; line-height: 1.2; margin: 0 0 3px; text-wrap: balance; }
.hiw-when { font-size: 13.5px; color: var(--muted); margin: 0; }

.hiw-benefit {
  font-size: 20px; line-height: 1.25; font-weight: 700; letter-spacing: -0.01em;
  margin: 0 0 10px; text-wrap: balance;
}
.hiw-body { font-size: 14.5px; line-height: 1.5; color: var(--ink); margin: 0 0 16px; }

.hiw-status {
  margin: auto 0 0; padding-top: 10px; border-top: 1px solid var(--rule);
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--muted); line-height: 1.45;
}
.hiw-status i {
  display: inline-block; width: 8px; height: 8px; margin-right: 7px; vertical-align: 0;
  background: var(--ink);
}
.hiw-status.lock i { background: var(--red); }

.hiw-strip { display: none; }

/* thumbnails */
.hiw-thumb .pg   { fill: #fff; stroke: var(--rule); stroke-width: 1; }
.hiw-thumb .ink  { fill: var(--ink); }
.hiw-thumb .pnl  { fill: var(--panel); }
.hiw-thumb .ln   { fill: #c9cfd5; }
.hiw-thumb .open { fill: #fff; stroke: var(--muted); stroke-width: 0.9; }
.hiw-thumb .up   { fill: var(--bull); }
.hiw-thumb .mid  { fill: var(--amber); }
.hiw-thumb .dn   { fill: var(--bear); }
.hiw-thumb .dn2  { fill: #7d1810; }
.hiw-thumb .off  { fill: #dde3e8; }
.hiw-thumb .hl   { fill: #fdf3cf; }
.hiw-thumb .hit-t { fill: #fff; font-family: var(--mono); font-size: 5.6px; font-weight: 700; letter-spacing: 0.3px; }

.hiw-foot { margin-top: 22px; }

/* phone: the rail becomes a vertical line on the left */
@media (max-width: 700px) {
  .hiw-rail { display: none; }
  .hiw-grid {
    grid-template-columns: 1fr; gap: 30px;
    border-left: 2px solid var(--rule); padding-left: 22px; margin-left: 11px;
    counter-reset: sheet; margin-top: 30px;
  }
  .hiw-card { margin-right: 0; position: relative; counter-increment: sheet; }
  .hiw-card::before {
    content: counter(sheet); position: absolute; left: -35px; top: -12px;
    width: 24px; height: 24px; border-radius: 50%; background: var(--ink); color: #fff;
    font-family: var(--mono); font-size: 12px; font-weight: 700; line-height: 24px; text-align: center;
    box-shadow: 0 0 0 3px var(--paper);
  }
  .hiw-card.c1 { border-top-color: var(--red); }
  .hiw-strip {
    display: block; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.08em;
    text-transform: uppercase; color: var(--muted); margin: -6px 0 12px;
  }
  .hiw-strip b { color: var(--red); font-weight: 700; }
  .hiw-benefit { font-size: 19px; }
}
@media (min-width: 701px) and (max-width: 820px) {
  .hiw-tick span, .hiw-seg b { font-size: 9.5px; letter-spacing: 0.06em; }
}

@media (max-width: 400px) {
  .wrap { padding: 0 16px; }
  table { font-size: 12.5px; }
  thead th { letter-spacing: 0.03em; }
  .grade { font-size: 10.5px; }
  tbody td { padding-right: 4px; }
  thead th { padding-right: 4px; }
  td.num, th.num { padding-right: 6px; }
}
