:root {
  --teal: #1F6E6E;
  --teal-dark: #155656;
  --dark: #1A1A1A;
  --body: #2C2C2C;
  --grey: #666666;
  --grey-light: #999999;
  --bg: #FBFAF7;
  --tan: #F4F0E8;
  --cream: #FAF7F0;
  --card-bg: #FFFFFF;
  --accent: #E8E0D0;
  --warn: #FFF4D6;
  --border: #E5E0D5;
  --max-w: 980px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 400;
  font-size: 17px;
  line-height: 1.65;
  color: var(--body);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ============== NAV ============== */
#topnav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(251, 250, 247, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  padding: 14px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
}
.brand {
  font-weight: 700;
  color: var(--teal);
  text-decoration: none;
  font-size: 15px;
  letter-spacing: -0.01em;
}
.nav-links { display: flex; gap: 24px; }
.nav-links a {
  color: var(--grey);
  text-decoration: none;
  transition: color 0.15s;
}
.nav-links a:hover { color: var(--teal); }
@media (max-width: 768px) {
  .nav-links { display: none; }
}

/* ============== CONTAINER ============== */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

/* ============== HERO ============== */
.hero {
  padding: 120px 0 100px;
  background: var(--bg);
  text-align: left;
}
.hero .kicker {
  font-size: 12px;
  letter-spacing: 0.15em;
  color: var(--grey);
  text-transform: uppercase;
  margin: 0 0 24px;
}
.hero h1 {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: clamp(36px, 6vw, 64px);
  font-weight: 600;
  line-height: 1.05;
  margin: 0 0 28px;
  color: var(--teal);
  letter-spacing: -0.02em;
}
.hero-sub {
  font-size: clamp(18px, 2vw, 22px);
  color: var(--body);
  max-width: 720px;
  line-height: 1.5;
  margin: 0 0 36px;
}
.hero-byline {
  color: var(--grey);
  font-size: 14px;
  margin: 0;
}

/* ============== PROSE ============== */
.prose {
  padding: 60px 0;
}
.prose h2 {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 32px;
  font-weight: 600;
  color: var(--teal);
  margin: 0 0 24px;
  letter-spacing: -0.01em;
}
.prose h3 {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 22px;
  font-weight: 600;
  color: var(--dark);
  margin: 36px 0 14px;
  letter-spacing: -0.005em;
}
.prose p {
  margin: 0 0 18px;
}
.prose ul, .prose ol {
  margin: 18px 0;
  padding-left: 24px;
}
.prose li {
  margin: 0 0 10px;
}
.prose strong { font-weight: 600; }
.prose a {
  color: var(--teal);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ============== BANDS ============== */
.band {
  padding: 80px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.band-tan { background: var(--tan); }
.band-cream { background: var(--cream); }

.band-heading {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 32px;
  font-weight: 600;
  color: var(--teal);
  margin: 0 0 12px;
  letter-spacing: -0.01em;
}
.band-sub {
  font-size: 16px;
  color: var(--grey);
  margin: 0 0 40px;
  max-width: 800px;
}
.band-foot {
  font-size: 15px;
  color: var(--body);
  margin: 30px 0 0;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

/* ============== CARDS ============== */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin: 0 0 40px;
}
.cards.three { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 768px) {
  .cards.three { grid-template-columns: 1fr; }
}
.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 22px 22px 18px;
}
.card-label {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--grey);
  margin: 0 0 12px;
  font-weight: 600;
}
.card-value {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 38px;
  font-weight: 600;
  color: var(--dark);
  line-height: 1.0;
  margin: 0 0 12px;
}
.card-value .unit {
  font-size: 24px;
  color: var(--grey);
  font-weight: 500;
}
.card-note {
  font-size: 13px;
  color: var(--grey);
  line-height: 1.5;
  margin: 0;
}

/* ============== FLOW STRIP ============== */
.flow {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 28px 28px 24px;
  margin: 0 0 30px;
}
.flow-title {
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal);
  font-weight: 600;
  margin: 0 0 22px;
}
.flow-stages {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.flow-stage {
  flex: 1;
  min-width: 180px;
  text-align: center;
  padding: 18px 12px;
  background: var(--cream);
  border-radius: 6px;
}
.flow-stage-label {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--grey);
  font-weight: 600;
  margin: 0 0 14px;
  line-height: 1.4;
}
.flow-stage-value {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 32px;
  font-weight: 600;
  color: var(--teal);
  line-height: 1.0;
  margin: 0 0 8px;
}
.flow-stage-foot {
  font-size: 12px;
  color: var(--grey);
}
.flow-arrow {
  font-size: 24px;
  color: var(--grey-light);
  font-weight: 300;
}
.flow-bottom {
  margin: 22px 0 0;
  padding: 18px 4px 4px;
  border-top: 1px solid var(--border);
  font-size: 14px;
  color: var(--body);
  font-style: italic;
  line-height: 1.5;
}
@media (max-width: 700px) {
  .flow-arrow { display: none; }
  .flow-stages { flex-direction: column; }
}

/* ============== DATA TABLES ============== */
table.data {
  width: 100%;
  border-collapse: collapse;
  margin: 18px 0 30px;
  font-size: 14px;
  background: var(--card-bg);
}
table.data thead th {
  background: var(--accent);
  color: var(--dark);
  text-align: left;
  font-weight: 600;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
table.data tbody td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  line-height: 1.5;
}
table.data tbody tr:last-child td {
  border-bottom: none;
}
table.data tr.totalrow td {
  background: var(--warn);
  font-weight: 600;
}
table.data.sources tbody td {
  font-size: 13px;
}

/* ============== CHARACTER BLOCKS ============== */
.character {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 28px 30px;
  margin: 0 0 28px;
}
.character h3 {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 24px;
  font-weight: 600;
  color: var(--teal);
  margin: 0 0 14px;
}
.character p { margin: 0 0 16px; font-size: 15px; }
.character table.data { margin-bottom: 18px; }
.character-foot {
  font-size: 13px;
  color: var(--grey);
  font-style: italic;
  margin: 0;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

/* ============== SANDBOX ============== */
.sandbox-shell {
  padding: 0 24px 60px;
}
.sandbox {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 30px;
}
@media (max-width: 880px) {
  .sandbox { grid-template-columns: 1fr; }
}

.slider-group {
  margin: 0 0 28px;
}
.slider-group h4 {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal);
  font-weight: 600;
  margin: 0 0 14px;
}
.slider {
  margin: 0 0 16px;
}
.slider label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--body);
  margin: 0 0 6px;
}
.slider label .val {
  font-weight: 600;
  color: var(--teal);
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 14px;
}
.slider input[type="range"] {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  outline: none;
}
.slider input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  background: var(--teal);
  border-radius: 50%;
  cursor: pointer;
}
.slider input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  background: var(--teal);
  border-radius: 50%;
  cursor: pointer;
  border: none;
}
.check-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--grey);
  padding: 8px 0;
  border-top: 1px dashed var(--border);
  margin: 8px 0 0;
}
.check-row .val {
  font-weight: 600;
  color: var(--dark);
  font-family: "Source Serif 4", Georgia, serif;
}
.reset {
  background: transparent;
  color: var(--grey);
  border: 1px solid var(--border);
  padding: 8px 14px;
  border-radius: 4px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}
.reset:hover {
  border-color: var(--teal);
  color: var(--teal);
}

.outputs h4 {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal);
  font-weight: 600;
  margin: 0 0 14px;
}
.output-card {
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 14px 16px;
  margin: 0 0 12px;
}
.output-card.primary {
  background: var(--warn);
}
.output-card.stress {
  background: #FAEEEE;
  border-color: #E5C5C5;
}
.output-label {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--grey);
  font-weight: 600;
  margin: 0 0 8px;
}
.output-value {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 28px;
  font-weight: 600;
  color: var(--dark);
  line-height: 1.0;
  margin: 0 0 6px;
}
.output-sub {
  font-size: 12px;
  color: var(--grey);
}
.output-sub span { color: var(--dark); font-weight: 600; }
.stress-note {
  font-size: 12px;
  color: var(--body);
  line-height: 1.5;
}

/* ============== CONTACT & FOOTER ============== */
.contact {
  padding: 60px 0;
  text-align: center;
  border-top: 1px solid var(--border);
}
.contact h3 {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 22px;
  color: var(--teal);
  margin: 0 0 14px;
}
.contact p {
  margin: 0 0 8px;
  font-size: 15px;
}
.contact a { color: var(--teal); }

footer {
  background: var(--dark);
  color: #BBB;
  padding: 36px 0;
  text-align: center;
  font-size: 13px;
}
footer p { margin: 0 0 10px; }
.footer-note {
  font-size: 11px;
  color: #888;
  max-width: 760px;
  margin: 14px auto 0;
  line-height: 1.6;
}

/* ============== HEADINGS IN BANDS ============== */
.band h3 {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 22px;
  font-weight: 600;
  color: var(--dark);
  margin: 36px 0 14px;
}

/* ============== v0.8 ADDITIONS: model page, per-cell docs, platform productivity ============== */

/* Top-level page header for model page (separate from thesis hero) */
.model-header {
  background: var(--dark);
  color: #FAF7F0;
  padding: 28px 0 20px;
  border-bottom: 2px solid var(--teal);
}
.model-header h1 {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 30px;
  margin: 0 0 6px;
  font-weight: 600;
  color: #FFF;
}
.model-header p {
  margin: 0;
  font-size: 14px;
  color: #BBB;
  max-width: 720px;
}
.model-header .badge {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 8px;
  font-weight: 600;
}

/* Inline model nav: between thesis and model */
.cross-link {
  background: var(--tan);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 24px 0;
  text-align: center;
}
.cross-link p {
  margin: 0;
  font-size: 15px;
  color: var(--dark);
}
.cross-link a {
  color: var(--teal);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 2px solid var(--teal);
  padding-bottom: 2px;
}
.cross-link a:hover { background: #f0e8d8; }

/* Top nav adjust for split pages */
#topnav .model-link {
  background: var(--teal);
  color: #FFF;
  padding: 7px 14px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 13px;
}
#topnav .model-link:hover { background: #155656; }

/* ============ MODEL PAGE: inputs ============ */
.model-section {
  padding: 36px 0;
  border-bottom: 1px solid var(--border);
}
.model-section + .model-section { border-top: none; }
.model-section h2 {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 26px;
  font-weight: 600;
  color: var(--teal);
  margin: 0 0 8px;
}
.model-section .section-lede {
  font-size: 14px;
  color: var(--grey);
  margin: 0 0 28px;
  max-width: 760px;
  line-height: 1.6;
}

/* Documented input card */
.docinput {
  background: #FFFBEB;
  border: 1px solid #E5DDB8;
  border-radius: 8px;
  padding: 18px 20px;
  margin-bottom: 14px;
  display: grid;
  grid-template-columns: minmax(300px, 1.1fr) 2fr;
  gap: 24px;
  align-items: start;
}
.docinput-control {
  display: flex;
  flex-direction: column;
}
.docinput-label {
  font-size: 12px;
  color: var(--grey);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
  margin: 0 0 6px;
}
.docinput-value-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 0 0 12px;
}
.docinput-value {
  font-size: 28px;
  font-weight: 700;
  color: #0F4C7F;
  font-family: "Inter", sans-serif;
}
.docinput-units {
  font-size: 12px;
  color: var(--grey);
  font-style: italic;
}
.docinput input[type=range] {
  width: 100%;
  margin: 0;
}
.docinput-docs {
  font-size: 13px;
  line-height: 1.55;
  color: var(--dark);
}
.docinput-docs dt {
  font-weight: 600;
  color: var(--teal);
  margin: 0 0 2px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}
.docinput-docs dd {
  margin: 0 0 10px;
  color: var(--dark);
}
.docinput-docs dd:last-child { margin-bottom: 0; }
.docinput-docs .horizon {
  display: inline-block;
  background: #F4F0E8;
  border: 1px solid #DDD;
  border-radius: 3px;
  padding: 1px 8px;
  font-size: 11px;
  font-weight: 600;
  color: var(--teal);
  font-family: "Inter", sans-serif;
}

/* Documented output card */
.docoutput {
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-left: 4px solid var(--teal);
  border-radius: 6px;
  padding: 20px 22px;
  margin-bottom: 14px;
  display: grid;
  grid-template-columns: minmax(280px, 1fr) 2fr;
  gap: 28px;
  align-items: start;
}
.docoutput.primary {
  border-left-color: #155656;
  background: #F0F4F2;
}
.docoutput-display {
  display: flex;
  flex-direction: column;
}
.docoutput-label {
  font-size: 12px;
  color: var(--grey);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
  margin: 0 0 6px;
}
.docoutput-value {
  font-size: 32px;
  font-weight: 700;
  color: var(--teal);
  font-family: "Inter", sans-serif;
  line-height: 1.1;
  margin: 4px 0;
}
.docoutput-sub {
  font-size: 12px;
  color: var(--grey);
  font-style: italic;
}
.docoutput-docs {
  font-size: 13px;
  line-height: 1.55;
}
.docoutput-docs dt {
  font-weight: 600;
  color: var(--teal);
  margin: 0 0 2px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}
.docoutput-docs dd {
  margin: 0 0 10px;
  color: var(--dark);
}
.docoutput-docs dd code {
  background: #F4F0E8;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 12px;
  color: #155656;
}

/* Platform productivity section */
.platform-section {
  background: linear-gradient(to bottom, #E8F4F0, #FAF7F0);
  padding: 40px 0;
}
.platform-section h2 {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 26px;
  font-weight: 600;
  color: var(--teal);
  margin: 0 0 8px;
}
.platform-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin: 20px 0 24px;
}
.platform-card {
  background: #FFFFFF;
  border-radius: 6px;
  padding: 18px;
  border-top: 4px solid var(--teal);
}
.platform-card .label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--grey);
  font-weight: 600;
}
.platform-card .value {
  font-size: 24px;
  font-weight: 700;
  color: var(--teal);
  margin: 6px 0;
}
.platform-card .note {
  font-size: 12px;
  color: var(--grey);
  font-style: italic;
}

/* Stress test inline */
.stress-callout {
  background: #FFF4D6;
  border: 1px solid #E8D88A;
  border-radius: 6px;
  padding: 20px 24px;
  margin: 24px 0;
}
.stress-callout h4 {
  margin: 0 0 8px;
  color: #8B6B00;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.stress-callout p {
  margin: 0;
  font-size: 14px;
  color: var(--dark);
  line-height: 1.55;
}

/* Reset button */
.model-reset {
  background: var(--teal);
  color: #FFF;
  border: none;
  padding: 12px 24px;
  border-radius: 4px;
  font-family: "Inter", sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  margin: 24px 0;
}
.model-reset:hover { background: #155656; }

/* Page title strip for model.html */
.intro-strip {
  padding: 32px 0;
  background: #FFF;
  border-bottom: 1px solid var(--border);
}
.intro-strip p {
  font-size: 15px;
  color: var(--dark);
  line-height: 1.7;
  max-width: 800px;
  margin: 0 0 14px;
}

@media (max-width: 800px) {
  .docinput, .docoutput {
    grid-template-columns: 1fr;
    gap: 14px;
  }
}

/* ============== v0.10 ADDITIONS: 3-lens dashboard layout ============== */

.lens-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 24px 0;
}
.lens-grid + .lens-grid { margin-top: 14px; }

.lens-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.lens-header {
  background: var(--teal);
  color: #FFF;
  padding: 12px 16px;
  border-radius: 6px 6px 0 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: -4px;
  position: relative;
  z-index: 1;
}
.lens-header .lens-num {
  display: inline-block;
  width: 22px;
  height: 22px;
  background: rgba(255,255,255,0.25);
  border-radius: 50%;
  text-align: center;
  line-height: 22px;
  margin-right: 8px;
  font-weight: 700;
}
.lens-header .lens-sub {
  display: block;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.3px;
  text-transform: none;
  color: rgba(255,255,255,0.85);
  margin-top: 4px;
}

.lens-card {
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.lens-card.bg-hh { background: #FFF8E7; border-color: #E8D9A8; }
.lens-card.bg-scale { background: #E8F0E8; border-color: #B8D4B8; }
.lens-card.bg-system { background: #E8E8F0; border-color: #B8B8D4; }

.lens-card .label {
  font-size: 10px;
  font-weight: 700;
  color: var(--grey);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}
.lens-card .value {
  font-size: 30px;
  font-weight: 700;
  color: var(--teal-dark);
  line-height: 1.05;
  font-family: "Inter", sans-serif;
}
.lens-card .sub {
  font-size: 11px;
  color: var(--grey);
  font-style: italic;
  margin-top: 2px;
  line-height: 1.4;
}

.chain-panel {
  background: #F4E4C1;
  border: 1px solid #D6BE85;
  border-radius: 6px;
  padding: 18px 20px;
  margin: 14px 0 0;
}
.chain-panel h4 {
  margin: 0 0 4px;
  font-size: 14px;
  color: var(--teal-dark);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.chain-panel .chain-sub {
  font-size: 11px;
  color: var(--grey);
  font-style: italic;
  margin: 0 0 14px;
}
.chain-steps {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  align-items: stretch;
}
.chain-step {
  background: rgba(255,255,255,0.55);
  border-radius: 4px;
  padding: 12px 10px;
  text-align: center;
  position: relative;
}
.chain-step .step-num {
  font-size: 11px;
  font-weight: 700;
  color: var(--teal-dark);
  margin-bottom: 4px;
}
.chain-step .step-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--teal-dark);
  line-height: 1.1;
  font-family: "Inter", sans-serif;
}
.chain-step .step-label {
  font-size: 10px;
  color: var(--grey);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-top: 4px;
}

.bottom-line-box {
  background: #FFF4D6;
  border: 1px solid #E8D88A;
  border-radius: 6px;
  padding: 20px 24px;
  margin: 20px 0;
  line-height: 1.55;
  font-size: 14px;
  color: var(--dark);
}
.bottom-line-box strong {
  color: var(--teal-dark);
}

@media (max-width: 900px) {
  .lens-grid {
    grid-template-columns: 1fr;
  }
  .chain-steps {
    grid-template-columns: 1fr 1fr;
  }
}

/* ===== v0.11: Platform on/off toggle styles ===== */
.platform-toggle {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  user-select: none;
  font-family: Arial, sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: #1A1A1A;
}
.platform-toggle input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.platform-toggle-track {
  position: relative;
  display: inline-block;
  width: 56px;
  height: 30px;
  background: #ccc;
  border-radius: 30px;
  transition: background-color 0.25s ease;
}
.platform-toggle input[type="checkbox"]:checked + .platform-toggle-track {
  background: #1F6E6E;
}
.platform-toggle-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.25s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.platform-toggle input[type="checkbox"]:checked + .platform-toggle-track .platform-toggle-thumb {
  transform: translateX(26px);
}
.platform-toggle-label::before {
  content: "Platform off";
  color: #999;
}
.platform-toggle input[type="checkbox"]:checked ~ .platform-toggle-label::before {
  content: "Platform on";
  color: #1F6E6E;
}
.platform-toggle-label { display: none; }
.platform-toggle::after {
  content: "Platform on";
  color: #1F6E6E;
  font-weight: 600;
}
.platform-toggle:has(input:not(:checked))::after {
  content: "Platform off — direct programming only";
  color: #999;
}

/* Bottom-line dual variants */
.bl-on { display: block; }
.bl-off { display: none; }
body.platform-off .bl-on { display: none; }
body.platform-off .bl-off { display: block; }

/* When platform is off, dim the platform-leverage outputs to communicate they are zero/N-A */
body.platform-off #sy_platform,
body.platform-off #sy_platform_total,
body.platform-off #sy_per_platform,
body.platform-off #ch_platform,
body.platform-off #o_system_5yr,
body.platform-off #o_per_dollar_system,
body.platform-off #bl_platform {
  opacity: 0.4;
  text-decoration: line-through;
  text-decoration-color: #999;
}

/* ==========================================================================
   v0.12 additions — chain diagram, figure caption, Rita callout box
   ========================================================================== */

.chain-diagram-wrap {
  margin: 2.5rem 0 2rem;
  text-align: center;
}

.chain-diagram {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
  background: #FBF8F0;
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.figure-caption {
  margin: 0.8rem auto 0;
  max-width: 720px;
  font-family: 'Source Serif 4', Georgia, serif;
  font-style: italic;
  font-size: 0.92rem;
  color: #666;
  line-height: 1.5;
}

.rita-box {
  margin: 1.8rem 0 2rem;
  padding: 1.4rem 1.8rem 1.2rem;
  background: #FBF6EA;
  border-left: 4px solid #1F6E6E;
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.rita-box p {
  margin: 0 0 0.9rem;
}

.rita-box p:last-child {
  margin-bottom: 0;
}

.rita-box strong {
  color: #1F6E6E;
}

@media (max-width: 720px) {
  .rita-box {
    padding: 1.1rem 1.2rem 0.9rem;
  }
  .chain-diagram-wrap {
    margin: 1.8rem -0.8rem 1.4rem;
  }
}

/* v0.13 pull-quote */
.prose .pull-quote, .band .pull-quote {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 1.25em;
  font-style: italic;
  color: #1F6E6E;
  border-left: 3px solid #1F6E6E;
  padding-left: 1.4em;
  margin: 2em 0;
  line-height: 1.55;
}

/* v0.13 section tags for INPUTS / OUTPUTS clarity */
.section-tag {
  display: inline-block;
  background: #1F6E6E;
  color: #FFFFFF;
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 0.7em;
  letter-spacing: 0.15em;
  padding: 0.3em 0.8em;
  border-radius: 3px;
  margin-bottom: 0.5em;
}
.section-tag-output {
  background: #C9A95E;
  color: #1A1A1A;
}
.section-subtitle {
  font-style: italic;
  color: #666666;
  margin-top: -0.3em;
  margin-bottom: 1.5em;
}
