/* 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 { 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  { border-left: 0;  background: linear-gradient(to right, #eef1f3, #dde3e8 26px); }
.calib-bar.open-high { border-right: 0; background: linear-gradient(to left,  #eef1f3, #dde3e8 26px); }
.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); }

@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; }
}
