/* PolarCount — Math Lab
 * A chalkboard, not a dashboard. Deep slate board in a worn wooden frame, chalk
 * lettering, faint dust. Everything below is self-contained: no web fonts, no images.
 */

:root {
  --board:        #1f2f2a;
  --board-deep:   #16211d;
  --chalk:        #f0ede1;
  --chalk-dim:    #b9bfb4;
  --chalk-faint:  rgba(240, 237, 225, 0.14);
  --chalk-yellow: #f6d98a;
  --chalk-blue:   #9fd8f2;
  --chalk-pink:   #f3a9c4;
  --chalk-green:  #a9e8c2;
  --chalk-red:    #f2a89b;
  --wood-dark:    #4a3222;
  --wood:         #6b4a30;
  --wood-light:   #8a6340;
  --heading-font: "Segoe Print", "Bradley Hand", "Chalkboard SE", "Chalkdust", "Comic Sans MS", cursive;
  --body-font:    Georgia, "Iowan Old Style", "Times New Roman", serif;
  --mono-font:    "Cascadia Mono", Consolas, "SF Mono", "Courier New", monospace;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, #1b2b26 0%, #101815 60%, #0a0f0d 100%);
  color: var(--chalk);
  font-family: var(--body-font);
  font-size: 17px;
  line-height: 1.55;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--chalk);
  color: var(--board-deep);
  padding: 0.6em 1em;
  z-index: 20;
  border-radius: 0 0 6px 0;
  font-family: var(--mono-font);
}
.skip-link:focus { left: 0; }

.room {
  padding: clamp(10px, 2.5vw, 34px);
  display: flex;
  justify-content: center;
}

/* ---------------- the frame ---------------- */

.board-frame {
  width: min(1180px, 100%);
  padding: clamp(10px, 1.6vw, 20px);
  border-radius: 14px;
  background:
    linear-gradient(160deg, var(--wood-light) 0%, var(--wood) 22%, var(--wood-dark) 55%, var(--wood) 82%, var(--wood-light) 100%);
  box-shadow:
    0 30px 60px rgba(0, 0, 0, 0.55),
    0 2px 0 rgba(255, 255, 255, 0.12) inset,
    0 -3px 0 rgba(0, 0, 0, 0.45) inset;
}

.board {
  position: relative;
  border-radius: 6px;
  padding: clamp(18px, 3vw, 40px);
  background-color: var(--board);
  background-image:
    radial-gradient(ellipse 60% 40% at 18% 8%, rgba(255, 255, 255, 0.055), transparent 70%),
    radial-gradient(ellipse 50% 35% at 84% 74%, rgba(255, 255, 255, 0.045), transparent 70%),
    radial-gradient(ellipse 40% 30% at 50% 100%, rgba(0, 0, 0, 0.30), transparent 70%),
    repeating-linear-gradient(112deg, rgba(255, 255, 255, 0.014) 0 2px, transparent 2px 5px),
    linear-gradient(168deg, #26362f 0%, var(--board) 45%, var(--board-deep) 100%);
  box-shadow:
    0 0 0 2px rgba(0, 0, 0, 0.55) inset,
    0 0 60px rgba(0, 0, 0, 0.45) inset,
    0 0 30px rgba(120, 200, 170, 0.05) inset;
  overflow: hidden;
}

/* chalk dust settled in the corners */
.board::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 12% 88%, rgba(255, 255, 255, 0.05) 0 1px, transparent 1px),
    radial-gradient(circle at 63% 34%, rgba(255, 255, 255, 0.04) 0 1px, transparent 1px),
    radial-gradient(circle at 88% 61%, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px);
  background-size: 140px 140px, 190px 190px, 230px 230px;
  opacity: 0.7;
}

.board > * { position: relative; z-index: 1; }

/* ---------------- masthead ---------------- */

.masthead {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: clamp(12px, 3vw, 34px);
  flex-wrap: wrap;
}

.wordmark {
  margin: 0 0 0.15em;
  font-family: var(--mono-font);
  font-size: 0.72rem;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--chalk-dim);
  text-shadow: 0 0 1px rgba(255, 255, 255, 0.4);
}

h1 {
  margin: 0;
  font-family: var(--heading-font);
  font-weight: 400;
  font-size: clamp(2.6rem, 7vw, 4.4rem);
  line-height: 1;
  letter-spacing: 0.01em;
  color: var(--chalk);
  text-shadow:
    0 0 2px rgba(255, 255, 255, 0.55),
    0 0 18px rgba(255, 255, 255, 0.16),
    0 2px 3px rgba(0, 0, 0, 0.5);
}

/* the chalk rule under the title */
h1::after {
  content: "";
  display: block;
  width: min(320px, 62%);
  height: 3px;
  margin-top: 0.35em;
  border-radius: 2px;
  background: linear-gradient(90deg, rgba(246, 217, 138, 0.85), rgba(246, 217, 138, 0.05));
}

.tagline {
  margin: 0.6em 0 0;
  font-family: var(--heading-font);
  font-size: clamp(1.05rem, 2.6vw, 1.42rem);
  color: var(--chalk-yellow);
  text-shadow: 0 0 10px rgba(246, 217, 138, 0.22);
}

.bear {
  width: clamp(110px, 16vw, 168px);
  height: auto;
  color: var(--chalk);
  opacity: 0.95;
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.10));
  flex: 0 0 auto;
}

.board-note {
  margin: clamp(16px, 2.4vw, 26px) 0 0;
  max-width: 62ch;
  color: var(--chalk-dim);
  font-size: 0.95rem;
  border-left: 2px solid rgba(159, 216, 242, 0.35);
  padding-left: 0.9em;
}

/* ---------------- tabs ---------------- */

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4em 1.4em;
  align-items: center;
  margin: clamp(20px, 2.6vw, 30px) 0 0;
  padding-bottom: 0.55em;
  border-bottom: 1px dashed rgba(240, 237, 225, 0.22);
}

.tab {
  appearance: none;
  background: none;
  border: 0;
  padding: 0.3em 0.1em;
  cursor: pointer;
  font-family: var(--heading-font);
  font-size: clamp(1rem, 2.4vw, 1.16rem);
  color: var(--chalk-dim);
  border-bottom: 2px solid transparent;
  transition: color 120ms ease, border-color 120ms ease;
}
.tab:hover { color: var(--chalk); }
.tab[aria-selected="true"] {
  color: var(--chalk);
  border-bottom-color: var(--chalk-yellow);
  text-shadow: 0 0 10px rgba(246, 217, 138, 0.3);
}
.tab:focus-visible,
button:focus-visible,
input:focus-visible,
a:focus-visible {
  outline: 2px dashed var(--chalk-blue);
  outline-offset: 3px;
}

.print-button {
  margin-left: auto;
  appearance: none;
  font-family: var(--mono-font);
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--board-deep);
  background: linear-gradient(180deg, #f7f4e8, #ddd8c6);
  border: 0;
  border-radius: 4px;
  padding: 0.55em 1.1em;
  cursor: pointer;
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.45);
}
.print-button:active { transform: translateY(2px); box-shadow: 0 1px 0 rgba(0, 0, 0, 0.45); }

/* ---------------- panels ---------------- */

.panel { padding-top: clamp(18px, 2.6vw, 28px); }
.panel.hidden, .hidden { display: none !important; }

h2 {
  margin: 0 0 0.3em;
  font-family: var(--heading-font);
  font-weight: 400;
  font-size: clamp(1.6rem, 3.6vw, 2.1rem);
  color: var(--chalk);
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.18);
}

h3 {
  margin: 0 0 0.5em;
  font-family: var(--heading-font);
  font-weight: 400;
  font-size: 1.12rem;
  color: var(--chalk-yellow);
  letter-spacing: 0.01em;
}

.panel-intro {
  margin: 0 0 1.2em;
  max-width: 70ch;
  color: var(--chalk-dim);
  font-size: 0.97rem;
}

/* ---------------- forms ---------------- */

.mode-switch {
  display: inline-flex;
  gap: 0.35em;
  padding: 0.25em;
  margin-bottom: 1.1em;
  border: 1px dashed rgba(240, 237, 225, 0.28);
  border-radius: 999px;
}
.mode-switch label { cursor: pointer; }
.mode-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.mode-switch span {
  display: inline-block;
  padding: 0.35em 1.05em;
  border-radius: 999px;
  font-family: var(--mono-font);
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--chalk-dim);
}
.mode-switch input:checked + span {
  background: rgba(240, 237, 225, 0.14);
  color: var(--chalk);
  box-shadow: 0 0 0 1px rgba(240, 237, 225, 0.3) inset;
}

.field-group { margin-bottom: 1em; }

.field-group label,
.window-controls label,
.table-controls label {
  display: block;
  font-family: var(--mono-font);
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--chalk-dim);
  margin-bottom: 0.35em;
}

input[type="text"],
input[type="number"] {
  width: 100%;
  padding: 0.7em 0.85em;
  font-family: var(--mono-font);
  font-size: 1.02rem;
  color: var(--chalk);
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(240, 237, 225, 0.28);
  border-radius: 5px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.3) inset;
}
input[type="text"]:focus,
input[type="number"]:focus {
  border-color: var(--chalk-blue);
  background: rgba(0, 0, 0, 0.3);
  outline: none;
}

#eq-a, #eq-b { margin-bottom: 0.85em; }

.help {
  margin: 0.45em 0 0;
  font-size: 0.82rem;
  color: var(--chalk-dim);
}
.help.inline { margin: 0; }
code {
  font-family: var(--mono-font);
  font-size: 0.9em;
  color: var(--chalk-blue);
  background: rgba(159, 216, 242, 0.08);
  padding: 0.08em 0.35em;
  border-radius: 3px;
}

.examples {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45em;
  align-items: center;
  margin: 1.1em 0;
}
.examples-label {
  font-family: var(--mono-font);
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--chalk-dim);
}
.chip {
  appearance: none;
  font-family: var(--mono-font);
  font-size: 0.78rem;
  color: var(--chalk);
  background: rgba(240, 237, 225, 0.06);
  border: 1px dashed rgba(240, 237, 225, 0.34);
  border-radius: 999px;
  padding: 0.32em 0.85em;
  cursor: pointer;
}
.chip:hover { background: rgba(240, 237, 225, 0.14); }

.actions, .row-actions {
  display: flex;
  gap: 0.7em;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 1em;
}

button.primary, button.ghost {
  font-family: var(--mono-font);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 5px;
  padding: 0.7em 1.5em;
  cursor: pointer;
}
button.primary {
  color: #1c2a25;
  background: linear-gradient(180deg, #f7f4e8, #d9d4c2);
  border: 0;
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.45);
}
button.primary:active { transform: translateY(2px); box-shadow: 0 1px 0 rgba(0, 0, 0, 0.45); }
button.ghost {
  color: var(--chalk);
  background: transparent;
  border: 1px solid rgba(240, 237, 225, 0.35);
}
button.ghost:hover { background: rgba(240, 237, 225, 0.1); }
button.ghost.small { font-size: 0.74rem; padding: 0.5em 1em; }

/* ---------------- results ---------------- */

.error {
  margin: 1em 0 0;
  padding: 0.75em 1em;
  border-left: 3px solid var(--chalk-red);
  background: rgba(242, 168, 155, 0.1);
  color: var(--chalk-red);
  font-family: var(--mono-font);
  font-size: 0.88rem;
  border-radius: 0 4px 4px 0;
}
.error[hidden] { display: none; }

.result { margin-top: 1.6em; }

.answer {
  font-family: var(--heading-font);
  font-size: clamp(1.12rem, 2.8vw, 1.4rem);
  color: var(--chalk);
  padding: 0.85em 1.1em;
  border: 1px dashed rgba(246, 217, 138, 0.5);
  border-radius: 6px;
  background: rgba(246, 217, 138, 0.05);
  text-shadow: 0 0 12px rgba(246, 217, 138, 0.2);
  white-space: pre-wrap;
}
.answer .label {
  display: block;
  font-family: var(--mono-font);
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  font-style: italic;
  color: var(--chalk-dim);
  margin-bottom: 0.5em;
  /* deliberately NOT uppercased: this is the equation as typed, and
     capitalising a variable misreports the mathematics. */
  text-shadow: none;
}
.answer .exact { color: var(--chalk-yellow); }
.answer .approx {
  display: block;
  font-family: var(--mono-font);
  font-size: 0.86rem;
  color: var(--chalk-dim);
  margin-top: 0.35em;
}

.steps-block, .checks-block { margin-top: 1.7em; }

ol.steps {
  list-style: none;
  counter-reset: step;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.65em;
}
ol.steps li {
  counter-increment: step;
  position: relative;
  padding-left: 2.5em;
  font-family: var(--mono-font);
  font-size: 0.91rem;
  color: var(--chalk);
  line-height: 1.5;
}
ol.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0.05em;
  width: 1.65em;
  height: 1.65em;
  display: grid;
  place-items: center;
  font-size: 0.72rem;
  color: var(--chalk-dim);
  border: 1px solid rgba(240, 237, 225, 0.35);
  border-radius: 50%;
}
ol.steps .step-label {
  display: block;
  font-family: var(--body-font);
  font-size: 0.82rem;
  color: var(--chalk-dim);
  letter-spacing: 0.01em;
}
ol.steps .step-text {
  display: block;
  color: var(--chalk);
  word-break: break-word;
}

table.checks, table.values-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--mono-font);
  font-size: 0.84rem;
}
table.checks th, table.values-table th {
  text-align: left;
  font-weight: 400;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--chalk-dim);
  padding: 0.4em 0.6em;
  border-bottom: 1px solid rgba(240, 237, 225, 0.28);
}
table.checks td, table.values-table td {
  padding: 0.45em 0.6em;
  border-bottom: 1px solid rgba(240, 237, 225, 0.1);
  color: var(--chalk);
}
td.ok { color: var(--chalk-green); }
td.bad { color: var(--chalk-red); }

.explainer {
  margin-top: 1.5em;
  padding: 0.9em 1.1em;
  border-left: 2px solid rgba(169, 232, 194, 0.45);
  background: rgba(169, 232, 194, 0.05);
  color: var(--chalk-dim);
  font-size: 0.94rem;
  border-radius: 0 4px 4px 0;
}

/* ---------------- grapher ---------------- */

.function-list { display: grid; gap: 0.6em; }

.function-row {
  display: grid;
  grid-template-columns: 26px 1fr auto;
  gap: 0.6em;
  align-items: center;
}
.swatch {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(0, 0, 0, 0.35);
  box-shadow: 0 0 10px currentColor;
}
.function-row input { width: 100%; }
.remove-fn {
  appearance: none;
  background: transparent;
  border: 1px solid rgba(240, 237, 225, 0.28);
  color: var(--chalk-dim);
  border-radius: 5px;
  width: 34px;
  height: 34px;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}
.remove-fn:hover { color: var(--chalk-red); border-color: var(--chalk-red); }

.graph-wrap {
  position: relative;
  margin: 1.3em 0 0.8em;
  border: 1px solid rgba(240, 237, 225, 0.3);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.28);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.4) inset;
  overflow: hidden;
}

#graph {
  display: block;
  width: 100%;
  height: clamp(260px, 46vw, 460px);
  touch-action: none;
  cursor: grab;
}
#graph:active { cursor: grabbing; }

.zoom-controls {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.zoom-controls button {
  appearance: none;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  font-family: var(--mono-font);
  font-size: 1.05rem;
  color: var(--chalk);
  background: rgba(22, 33, 29, 0.85);
  border: 1px solid rgba(240, 237, 225, 0.35);
  border-radius: 5px;
  cursor: pointer;
}
.zoom-controls button:hover { background: rgba(240, 237, 225, 0.16); }
.zoom-controls .wide {
  width: 34px;
  height: auto;
  font-size: 0.58rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.45em 0;
}

.graph-caption {
  margin: 0;
  padding: 0.5em 0.8em;
  font-family: var(--mono-font);
  font-size: 0.74rem;
  color: var(--chalk-dim);
  border-top: 1px dashed rgba(240, 237, 225, 0.2);
  min-height: 2.1em;
}

.window-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7em 1.1em;
  align-items: flex-end;
  margin-bottom: 1em;
}
.window-controls label, .table-controls label {
  display: flex;
  flex-direction: column;
  gap: 0.3em;
  margin: 0;
}
.window-controls input[type="number"], .table-controls input[type="number"] {
  width: 6.4em;
  padding: 0.45em 0.5em;
  font-size: 0.9rem;
}
.window-controls .tick {
  flex-direction: row;
  align-items: center;
  gap: 0.45em;
  font-family: var(--mono-font);
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--chalk-dim);
  cursor: pointer;
  padding-bottom: 0.4em;
}
input[type="checkbox"] {
  appearance: none;
  width: 16px;
  height: 16px;
  border: 1px solid rgba(240, 237, 225, 0.5);
  border-radius: 3px;
  cursor: pointer;
  position: relative;
  background: rgba(0, 0, 0, 0.25);
}
input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  inset: 2px;
  border-radius: 1px;
  background: var(--chalk-green);
}

.graph-reports {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1em 2em;
  margin: 1.4em 0;
}
.report {
  border: 1px dashed rgba(240, 237, 225, 0.24);
  border-radius: 6px;
  padding: 0.9em 1em;
}
ul.values {
  list-style: none;
  margin: 0;
  padding: 0;
  font-family: var(--mono-font);
  font-size: 0.86rem;
  display: grid;
  gap: 0.35em;
  max-height: 13em;
  overflow-y: auto;
}
ul.values li { display: flex; gap: 0.6em; align-items: baseline; }
ul.values li .fn-tag { font-size: 0.72rem; color: var(--chalk-dim); }
ul.values li.placeholder { color: var(--chalk-dim); font-style: italic; font-family: var(--body-font); }
ul.values li .approx-tag {
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--chalk-dim);
  border: 1px solid rgba(240, 237, 225, 0.28);
  border-radius: 3px;
  padding: 0 0.3em;
}

.table-block { margin-top: 1.2em; }
.table-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8em 1.1em;
  align-items: flex-end;
  margin-bottom: 1em;
}
.table-scroll { max-height: 22em; overflow: auto; border: 1px dashed rgba(240, 237, 225, 0.2); border-radius: 6px; }
table.values-table th { position: sticky; top: 0; background: #1d2b26; z-index: 1; }

/* ---------------- roadmap ---------------- */

ul.roadmap {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1em;
}
ul.roadmap li {
  border: 1px dashed rgba(240, 237, 225, 0.26);
  border-radius: 6px;
  padding: 1.1em;
  background: rgba(255, 255, 255, 0.02);
}
ul.roadmap p { margin: 0 0 0.6em; font-size: 0.92rem; color: var(--chalk-dim); }
ul.roadmap .status {
  font-family: var(--mono-font);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--chalk-blue);
  margin: 0;
}

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

.board-footer {
  margin-top: clamp(28px, 4vw, 46px);
  padding-top: 1em;
  border-top: 1px dashed rgba(240, 237, 225, 0.22);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5em;
  font-family: var(--mono-font);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--chalk-dim);
}
.board-footer .dot { opacity: 0.6; }

/* ---------------- narrow screens ---------------- */

@media (max-width: 720px) {
  body { font-size: 16px; }
  .room { padding: 8px; }
  .board-frame { border-radius: 10px; padding: 8px; }
  .board { padding: 18px 15px 24px; }
  .masthead { flex-direction: row-reverse; align-items: flex-start; }
  .bear { width: 92px; }
  h1 { font-size: clamp(2.1rem, 11vw, 3rem); }
  h1::after { width: 70%; }
  .tabs { gap: 0.3em 1em; }
  .print-button { margin-left: 0; width: 100%; text-align: center; padding: 0.7em 1em; }
  .mode-switch { width: 100%; justify-content: space-between; }
  .mode-switch span { padding: 0.4em 0.8em; }
  .function-row { grid-template-columns: 20px 1fr auto; gap: 0.45em; }
  .window-controls, .table-controls { gap: 0.6em 0.8em; }
  .window-controls input[type="number"], .table-controls input[type="number"] { width: 5.2em; }
  #graph { height: 300px; }
  .zoom-controls button { width: 40px; height: 40px; }
  .graph-reports { grid-template-columns: 1fr; }
  ol.steps li { padding-left: 2.2em; font-size: 0.86rem; }
  table.checks { font-size: 0.76rem; }
  table.checks th, table.checks td { padding: 0.4em 0.35em; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ---------------- print / save as PDF ----------------
 * The chalkboard is a screen thing; paper is paper. Black on white, no gradients,
 * everything the Commander needs to keep: the equation, the answer, the steps,
 * the substitution check, the graph, the table.
 */

@media print {
  @page { margin: 16mm 14mm; }

  body {
    background: #fff !important;
    color: #111 !important;
    font-size: 11pt;
  }
  .room { display: block; padding: 0; }
  .board-frame, .board {
    background: none !important;
    box-shadow: none !important;
    border-radius: 0;
    padding: 0;
    width: 100%;
  }
  .board::after, .board > * { position: static; }
  .board::after { display: none; }

  .skip-link, .tabs, .examples, .actions, .row-actions, .zoom-controls,
  .window-controls, .table-controls, .remove-fn, .mode-switch, .help,
  .graph-caption, .board-footer { display: none !important; }

  .masthead { display: block; border-bottom: 2px solid #111; padding-bottom: 6pt; }
  .bear { display: none; }
  .wordmark { color: #555 !important; font-size: 8pt; }
  h1 { color: #111 !important; text-shadow: none !important; font-size: 26pt; }
  h1::after { display: none; }
  .tagline { color: #444 !important; text-shadow: none !important; font-size: 12pt; }
  .board-note { color: #444 !important; border-left: 2px solid #999; font-size: 9pt; }

  .panel { display: block !important; }
  .panel.hidden { display: none !important; }
  h2 { color: #111 !important; text-shadow: none !important; font-size: 15pt; margin-top: 10pt; }
  h3 { color: #111 !important; font-size: 11pt; }

  .panel-intro, .explainer { color: #333 !important; }

  input[type="text"], input[type="number"] {
    border: 0 !important;
    border-bottom: 1px solid #111 !important;
    background: none !important;
    color: #111 !important;
    box-shadow: none !important;
    padding: 0 0 2pt !important;
  }

  .error { color: #000 !important; border-left: 3px solid #000; background: none; }

  .answer {
    border: 1px solid #111 !important;
    background: none !important;
    color: #111 !important;
    text-shadow: none !important;
    padding: 8pt !important;
    break-inside: avoid;
  }
  .answer .label { color: #555 !important; }
  .answer .exact { color: #111 !important; }
  .answer .approx { color: #333 !important; }

  ol.steps li { color: #111 !important; break-inside: avoid; }
  ol.steps li::before { border-color: #666 !important; color: #444 !important; }
  ol.steps .step-label { color: #555 !important; }
  ol.steps .step-text { color: #111 !important; }

  table.checks th, table.values-table th { color: #333 !important; border-bottom: 1px solid #111 !important; }
  table.checks td, table.values-table td { color: #111 !important; border-bottom: 1px solid #ccc !important; }
  td.ok { color: #111 !important; }
  td.bad { color: #111 !important; font-weight: bold; }

  .steps-block, .checks-block, .graph-wrap, .table-block, .report { break-inside: avoid; }

  .graph-wrap {
    border: 1px solid #111 !important;
    background: #fff !important;
    box-shadow: none !important;
  }
  #graph { height: 85mm !important; }

  ul.values { color: #111 !important; max-height: none !important; overflow: visible !important; }
  .report { border: 1px solid #999 !important; }
  .table-scroll { max-height: none !important; overflow: visible !important; border: 1px solid #999 !important; }
  table.values-table th { background: #fff !important; position: static; }

  ul.roadmap li { border: 1px solid #999 !important; background: none !important; }
  ul.roadmap p { color: #333 !important; }
}
