:root {
  color-scheme: light;
  --ink: #1f2933;
  --muted: #64717f;
  --subtle: #8a96a3;
  --line: #d9e0e7;
  --line-strong: #c7d0da;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --surface-tint: #eef3f7;
  --surface-contrast: #fbfcfd;
  --header-bg: rgba(255, 255, 255, 0.92);
  --input-bg: #ffffff;
  --danger-surface: #fff3f0;
  --danger-text: #822d1d;
  --page: #f1f4f7;
  --teal: #077783;
  --teal-dark: #066c77;
  --coral: #c8553d;
  --green: #2d7d46;
  --amber: #b7791f;
  --focus: #f2c94c;
  --highlight: #f2c94c;
  --highlight-soft: rgba(242, 201, 76, 0.16);
  --accent: var(--teal);
  --accent-soft: var(--surface-soft);
  --action-accent: var(--accent);
  --action-accent-soft: var(--accent-soft);
  --primary-bg: var(--teal);
  --primary-bg-hover: var(--teal-dark);
  --primary-text: #ffffff;
  --sans: "IBM Plex Sans", "Segoe UI", Roboto, Arial, Helvetica, sans-serif;
  --mono: "Courier New", Courier, monospace;
  --radius-sm: 3px;
  --radius-md: 4px;
  --shadow-soft: 0 1px 0 rgba(31, 41, 51, 0.06), 0 8px 18px rgba(31, 41, 51, 0.05);
  --shadow-raised: 0 1px 0 rgba(31, 41, 51, 0.06), 0 12px 28px rgba(31, 41, 51, 0.07);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --ink: #e6edf3;
  --muted: #a8b4c0;
  --subtle: #87929f;
  --line: #34404c;
  --line-strong: #4a5866;
  --surface: #111820;
  --surface-soft: #151e27;
  --surface-tint: #1d2833;
  --surface-contrast: #18232d;
  --header-bg: rgba(13, 19, 26, 0.94);
  --input-bg: #0d131a;
  --danger-surface: #351a17;
  --danger-text: #f2b0a2;
  --page: #0b1117;
  --teal: #50aeb8;
  --teal-dark: #6fc3cc;
  --coral: #e0715b;
  --green: #6eb981;
  --amber: #d8a33f;
  --focus: #f2c94c;
  --highlight: #f2c94c;
  --highlight-soft: rgba(242, 201, 76, 0.18);
  --accent: var(--teal);
  --accent-soft: rgba(80, 174, 184, 0.14);
  --action-accent: var(--highlight);
  --action-accent-soft: var(--highlight-soft);
  --primary-bg: #f2c94c;
  --primary-bg-hover: #ffe08a;
  --primary-text: #0d131a;
  --shadow-soft: 0 1px 0 rgba(255, 255, 255, 0.04), 0 8px 18px rgba(0, 0, 0, 0.18);
  --shadow-raised: 0 1px 0 rgba(255, 255, 255, 0.04), 0 12px 28px rgba(0, 0, 0, 0.24);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --ink: #e6edf3;
    --muted: #a8b4c0;
    --subtle: #87929f;
    --line: #34404c;
    --line-strong: #4a5866;
    --surface: #111820;
    --surface-soft: #151e27;
    --surface-tint: #1d2833;
    --surface-contrast: #18232d;
    --header-bg: rgba(13, 19, 26, 0.94);
    --input-bg: #0d131a;
    --danger-surface: #351a17;
    --danger-text: #f2b0a2;
    --page: #0b1117;
    --teal: #50aeb8;
    --teal-dark: #6fc3cc;
    --coral: #e0715b;
    --green: #6eb981;
    --amber: #d8a33f;
    --focus: #f2c94c;
    --highlight: #f2c94c;
    --highlight-soft: rgba(242, 201, 76, 0.18);
    --accent: var(--teal);
    --accent-soft: rgba(80, 174, 184, 0.14);
    --action-accent: var(--highlight);
    --action-accent-soft: var(--highlight-soft);
    --primary-bg: #f2c94c;
    --primary-bg-hover: #ffe08a;
    --primary-text: #0d131a;
    --shadow-soft: 0 1px 0 rgba(255, 255, 255, 0.04), 0 8px 18px rgba(0, 0, 0, 0.18);
    --shadow-raised: 0 1px 0 rgba(255, 255, 255, 0.04), 0 12px 28px rgba(0, 0, 0, 0.24);
  }
}

* {
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
}

.icon-sprite {
  display: none;
}

.icon {
  width: 1rem;
  height: 1rem;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--page);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.5;
  text-rendering: optimizeLegibility;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 20;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--ink);
  color: #ffffff;
  font-weight: 800;
  text-decoration: none;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
  outline: 3px solid var(--focus);
}

.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--header-bg);
}

.site-nav {
  width: min(1080px, calc(100% - 32px));
  min-height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.site-brand,
.site-links a,
.site-footer a,
.project-link {
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
}

.site-brand {
  white-space: nowrap;
}

.site-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: flex-end;
}

.site-menu-toggle {
  display: none;
}

.site-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.site-links a {
  border: 1px solid transparent;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  color: var(--muted);
}

.site-links a:hover,
.site-links a:focus {
  border-color: var(--highlight);
  background: var(--surface-soft);
  color: var(--highlight);
  outline: none;
}

.site-links a[aria-current="page"] {
  border-color: var(--highlight);
  background: transparent;
  color: var(--ink);
}

@media (min-width: 561px) {
  .site-link-secondary-project {
    display: none;
  }
}

.theme-toggle {
  width: auto;
  min-height: 34px;
  margin: 0;
  padding: 4px 5px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--muted);
  box-shadow: none;
  font-size: 0.82rem;
  font-weight: 800;
}

.theme-toggle:hover,
.theme-toggle:focus {
  border-color: var(--accent);
  background: var(--surface-soft);
  color: var(--accent);
  outline: none;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.theme-toggle-icon-stack {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  color: currentColor;
}

.theme-icon {
  grid-area: 1 / 1;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.theme-icon-dark {
  display: none;
}

.theme-toggle[aria-pressed="true"] .theme-icon-light {
  display: none;
}

.theme-toggle[aria-pressed="true"] .theme-icon-dark {
  display: block;
}

.theme-toggle-track {
  width: 40px;
  height: 22px;
  padding: 2px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface-tint);
  display: inline-flex;
  align-items: center;
  transition: background-color 160ms ease, border-color 160ms ease;
}

.theme-toggle-knob {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: var(--muted);
  box-shadow: 0 1px 2px rgba(31, 41, 51, 0.18);
  transform: translateX(0);
  transition: transform 160ms ease, background-color 160ms ease;
}

.theme-toggle[aria-pressed="true"] .theme-toggle-track {
  border-color: var(--highlight);
  background: var(--highlight-soft);
}

.theme-toggle[aria-pressed="true"] .theme-toggle-knob {
  background: var(--highlight);
  transform: translateX(18px);
}

.page {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0 64px;
}

.home-page {
  width: min(1160px, calc(100% - 32px));
}

.home-intro h1 {
  max-width: 820px;
}

.project-list {
  display: grid;
  gap: 18px;
  width: 100%;
}

.project-card {
  min-width: 0;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(260px, 34%, 380px);
  gap: 28px;
  align-items: center;
}

.project-card-copy {
  min-width: 0;
}

.project-card h2 {
  margin-bottom: 8px;
}

.project-card p:not(.panel-kicker) {
  margin: 0;
  color: var(--muted);
}

.project-preview {
  min-width: 0;
  margin: 0;
  inline-size: 100%;
  max-inline-size: 380px;
  justify-self: end;
  aspect-ratio: 1200 / 630;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
}

.project-preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.project-preview a {
  display: block;
  width: 100%;
  height: 100%;
}

.project-preview a:focus {
  outline: 2px solid var(--action-accent);
  outline-offset: 3px;
}

.contact-page {
  width: min(980px, calc(100% - 32px));
}

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 320px);
  gap: 18px;
  align-items: start;
}

.contact-form {
  width: 100%;
}

.contact-form h2,
.contact-side-panel h2 {
  margin-bottom: 14px;
}

.contact-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.contact-form .input-field {
  margin-top: 16px;
}

.field-control {
  position: relative;
  display: block;
}

.field-label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.field-error {
  color: var(--coral);
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.2;
  text-align: right;
  white-space: nowrap;
}

.field-error[hidden] {
  display: none;
}

.contact-honeypot {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.checkbox-field {
  width: max-content;
  max-width: 100%;
  margin-top: 16px;
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
}

.checkbox-field input {
  width: 16px;
  min-height: 16px;
  margin: 0;
  accent-color: var(--action-accent);
}

.turnstile-field {
  width: min(100%, 420px);
  min-height: 32px;
  margin-top: 18px;
}

.contact-side-panel {
  padding: 24px;
}

.contact-profile {
  width: min(100%, 220px);
  margin: 0 auto 18px;
}

.contact-profile img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface-soft);
}

.contact-side-panel p:not(.panel-kicker) {
  margin: 0;
  color: var(--muted);
}

.contact-side-panel p + p {
  margin-top: 14px;
}

.contact-note {
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.78rem;
}

.contact-social {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.contact-social .panel-kicker {
  margin-bottom: 9px;
}

.contact-submit-button {
  margin-top: 18px;
}

:root[data-theme="dark"] .contact-submit-button {
  border: 1px solid var(--line-strong);
  background: var(--surface-tint);
  color: var(--ink);
  box-shadow: none;
}

:root[data-theme="dark"] .contact-submit-button:hover,
:root[data-theme="dark"] .contact-submit-button:focus {
  border-color: var(--highlight);
  background: var(--highlight-soft);
  color: var(--highlight);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .contact-submit-button {
    border: 1px solid var(--line-strong);
    background: var(--surface-tint);
    color: var(--ink);
    box-shadow: none;
  }

  :root:not([data-theme]) .contact-submit-button:hover,
  :root:not([data-theme]) .contact-submit-button:focus {
    border-color: var(--highlight);
    background: var(--highlight-soft);
    color: var(--highlight);
  }
}

.project-link {
  width: max-content;
  max-width: 100%;
  min-height: 42px;
  margin-top: 20px;
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  color: var(--action-accent);
}

.project-link:hover,
.project-link:focus {
  border-color: var(--action-accent);
  background: var(--action-accent-soft);
  outline: none;
}

.intro {
  margin-bottom: 28px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1,
h2,
h3,
.site-brand {
  font-family: var(--sans);
}

h1 {
  margin: 0;
  max-width: 780px;
  font-size: 2rem;
  line-height: 1.12;
  letter-spacing: 0;
}

h2 {
  margin: 0 0 10px;
  font-size: 1.15rem;
  line-height: 1.2;
}

.lede {
  margin: 12px 0 0;
  max-width: 680px;
  color: var(--muted);
  font-size: 1.05rem;
}

.version-badge {
  width: max-content;
  max-width: 100%;
  margin: 8px 0 0;
  padding: 2px 5px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--subtle);
  font-family: var(--mono);
  font-size: 0.68rem;
  line-height: 1.35;
}

.project-version-end {
  margin-top: 26px;
}

.workspace {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: start;
}

.control-row {
  display: grid;
  grid-template-columns: minmax(0, 660px) minmax(260px, 340px);
  gap: 18px;
  align-items: stretch;
}

.panel {
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
}

.form-panel {
  min-width: 0;
  width: min(660px, 100%);
  padding: 24px;
  box-shadow: var(--shadow-soft);
}

.reporting-panel {
  min-width: 0;
  padding: 24px;
  display: flex;
  flex-direction: column;
}

.panel-kicker {
  margin: 0 0 7px;
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
}

.reporting-panel h2 {
  margin-bottom: 8px;
}

.reporting-panel p:not(.panel-kicker) {
  margin: 0;
  color: var(--muted);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

label {
  display: grid;
  gap: 8px;
  min-width: 0;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
}

.editable-label {
  display: flex;
  min-height: 28px;
  align-items: center;
  gap: 6px;
}

.label-edit-button {
  width: 26px;
  min-height: 26px;
  margin: 0;
  display: inline-grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted);
}

.label-edit-button:hover,
.label-edit-button:focus {
  border-color: var(--line);
  background: var(--surface-soft);
  color: var(--action-accent);
  outline: none;
}

.label-edit-button svg {
  width: 14px;
  height: 14px;
}

.label-editor {
  min-height: 38px;
  padding: 8px 10px;
}

input,
textarea {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 13px;
  background: var(--input-bg);
  color: var(--ink);
  font: inherit;
}

textarea {
  min-height: 160px;
  resize: vertical;
  line-height: 1.45;
}

input:hover,
textarea:hover {
  border-color: var(--line-strong);
}

input:focus,
textarea:focus {
  border-color: var(--action-accent);
  box-shadow: 0 0 0 3px rgba(242, 201, 76, 0.45);
  outline: none;
}

input[aria-invalid="true"],
textarea[aria-invalid="true"] {
  border-color: var(--coral);
}

input[aria-invalid="true"]:focus,
textarea[aria-invalid="true"]:focus {
  border-color: var(--coral);
  box-shadow: 0 0 0 3px rgba(200, 85, 61, 0.18);
}

button {
  width: 100%;
  min-height: 48px;
  margin-top: 18px;
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--primary-bg);
  color: var(--primary-text);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font: inherit;
  font-weight: 800;
  box-shadow: 0 1px 2px rgba(31, 41, 51, 0.12);
}

button:hover {
  background: var(--primary-bg-hover);
}

.report-actions {
  display: grid;
  gap: 10px;
  margin-top: auto;
  padding-top: 18px;
}

.report-button {
  width: 100%;
  min-height: 46px;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
  box-shadow: none;
}

.report-button:hover,
.report-button:focus {
  border-color: var(--ink);
  background: var(--surface-soft);
  color: var(--ink);
  outline: none;
}

.report-button-secondary {
  color: var(--muted);
}

.report-button-secondary:hover,
.report-button-secondary:focus {
  color: var(--action-accent);
}

.form-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  margin-top: 18px;
}

.form-actions button {
  margin-top: 0;
}

.reset-button {
  min-height: 48px;
  padding: 12px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--surface);
  color: var(--muted);
  font-weight: 800;
  text-decoration: none;
}

.reset-button:hover,
.reset-button:focus {
  border-color: var(--action-accent);
  background: var(--action-accent-soft);
  color: var(--action-accent);
  outline: none;
}

.field .label-edit-button {
  width: 26px;
  min-height: 26px;
  margin: 0;
  padding: 0;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted);
  font-weight: 700;
}

.field .label-edit-button:hover,
.field .label-edit-button:focus {
  border-color: var(--line);
  background: var(--surface-soft);
  color: var(--action-accent);
  outline: none;
}

.error {
  margin: 14px 0 0;
  padding: 11px 13px;
  border-left: 4px solid var(--coral);
  background: var(--danger-surface);
  color: var(--danger-text);
  font-weight: 700;
}

.error p {
  margin: 0;
}

.error p + p {
  margin-top: 4px;
}

.success {
  margin: 14px 0 0;
  padding: 11px 13px;
  border-left: 4px solid var(--green);
  background: rgba(45, 125, 70, 0.08);
  color: var(--green);
  font-weight: 800;
}

.result-panel {
  min-width: 0;
  min-height: 430px;
  padding: 26px;
  box-shadow: var(--shadow-raised);
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.metrics article {
  min-width: 0;
  min-height: 112px;
  padding: 17px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-soft);
  display: grid;
  align-content: center;
  gap: 8px;
}

.metrics span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0;
}

.metrics strong {
  color: var(--ink);
  font-size: 1.95rem;
  line-height: 1.1;
}

.plot {
  display: block;
  max-width: 100%;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.result-summary {
  margin: 0 0 20px;
  padding: 18px 18px 18px 20px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--accent);
  border-radius: var(--radius-md);
  background: var(--surface-soft);
}

.result-summary.outcome-b-higher-significant {
  border-left-color: var(--green);
}

.result-summary.outcome-b-higher-directional,
.result-summary.outcome-b-lower-directional {
  border-left-color: var(--amber);
}

.result-summary.outcome-b-lower-significant {
  border-left-color: var(--coral);
}

.result-summary.outcome-b-higher-inconclusive,
.result-summary.outcome-b-lower-inconclusive,
.result-summary.outcome-b-even {
  border-left-color: var(--muted);
}

.result-summary.key-takeaway-panel,
.funnel-key-takeaway.key-takeaway-panel {
  border-left-color: var(--highlight);
}

.copy-panel.key-takeaway-panel {
  border-left: 3px solid var(--highlight);
}

.result-summary h2 {
  margin-bottom: 0;
  font-size: 1rem;
}

.result-summary p {
  margin: 0;
  color: var(--ink);
  font-size: 1.04rem;
  line-height: 1.55;
}

.show-work {
  margin-top: 26px;
}

.section-heading {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.section-heading h2 {
  margin: 0;
}

.copy-button {
  width: auto;
  min-height: 34px;
  margin: 0;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--muted);
  box-shadow: none;
  font-size: 0.82rem;
  font-weight: 800;
}

.copy-button:hover,
.copy-button:focus {
  border-color: var(--action-accent);
  background: var(--surface);
  color: var(--action-accent);
  outline: none;
}

.copy-button.is-copied {
  border-color: rgba(45, 125, 70, 0.35);
  background: rgba(45, 125, 70, 0.08);
  color: var(--green);
}

.show-work summary {
  width: max-content;
  max-width: 100%;
  margin-bottom: 14px;
  border-radius: var(--radius-sm);
  color: var(--ink);
  cursor: pointer;
  font-size: 1.08rem;
  font-weight: 800;
  list-style-position: outside;
}

.show-work summary:focus {
  box-shadow: 0 0 0 3px rgba(242, 201, 76, 0.45);
  outline: none;
}

.show-work summary span {
  margin-left: 4px;
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.work-step {
  min-width: 0;
  padding: 18px 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.work-step h3 {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.3;
}

.work-step p {
  margin: 12px 0 0;
  color: var(--muted);
}

.work-step .work-math {
  color: var(--ink);
  font-weight: 400;
}

.math-formula {
  max-width: 100%;
  padding: 14px 13px;
  border-radius: var(--radius-sm);
  background: var(--surface-tint);
  color: var(--ink);
  line-height: 1.8;
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
}

.work-math {
  max-width: 100%;
  margin-top: 16px;
  padding: 11px 13px 13px;
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
  line-height: 1.9;
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
}

.work-math .katex-display,
.math-formula .katex-display {
  max-width: 100%;
  margin: 0;
  padding: 8px 0;
  overflow-x: auto !important;
  overflow-y: visible !important;
  -webkit-overflow-scrolling: touch;
}

.work-math .katex,
.math-formula .katex {
  max-width: 100%;
}

.stats-tables {
  display: grid;
  gap: 20px;
  margin-top: 26px;
}

.table-block h2 {
  margin-bottom: 0;
}

.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}

table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  font-family: var(--mono);
  font-size: 0.9rem;
  line-height: 1.45;
}

th,
td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

thead th {
  background: var(--surface-soft);
  color: var(--ink);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0;
}

.demand-table-section thead th {
  font-size: 0.92rem;
}

tbody tr:last-child th,
tbody tr:last-child td {
  border-bottom: 0;
}

tbody th {
  width: 34%;
  color: var(--muted);
  font-weight: 800;
}

tbody tr:nth-child(even) {
  background: var(--surface-contrast);
}

tbody tr.is-rpv-winner {
  background: var(--highlight-soft);
}

tbody tr.is-active-product {
  outline: 2px solid var(--highlight);
  outline-offset: -2px;
}

tbody tr.is-rpv-winner th,
tbody tr.is-rpv-winner td {
  color: var(--ink);
}

td {
  color: var(--ink);
}

.empty-state {
  min-height: 380px;
  display: grid;
  align-content: center;
  justify-items: start;
  max-width: 520px;
}

.empty-state p {
  margin: 0;
  color: var(--muted);
}

.notes {
  margin-top: 28px;
  padding: 22px 0 0;
  color: var(--muted);
}

.notes p {
  max-width: 900px;
  margin: 0;
}

.demand-page {
  width: min(1120px, calc(100% - 32px));
}

.demand-intro h1 {
  max-width: 900px;
}

.demand-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
  gap: 18px;
  align-items: stretch;
}

.demand-chart-panel,
.demand-controls,
.copy-panel {
  padding: 24px;
}

.demand-chart-heading {
  align-items: flex-start;
  margin-bottom: 14px;
}

.chart-note {
  max-width: 260px;
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  text-align: right;
}

.demand-chart-wrap {
  position: relative;
  min-height: 430px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  overflow: hidden;
}

.demand-secondary-view {
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.demand-secondary-heading {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 14px;
}

.demand-secondary-heading h2 {
  margin-bottom: 0;
}

.demand-secondary-heading p:not(.panel-kicker) {
  max-width: 390px;
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  text-align: right;
}

.demand-chart-wrap-compact {
  min-height: 310px;
}

.demand-chart {
  display: block;
  width: 100%;
  min-height: 430px;
}

.demand-chart-compact {
  min-height: 310px;
}

.demand-chart text {
  font-family: var(--sans);
  font-size: 0.78rem;
}

.demand-point {
  cursor: pointer;
  transition: opacity 140ms ease;
}

.demand-point:focus {
  outline: none;
}

.demand-point-ring {
  opacity: 0;
  pointer-events: none;
  filter: drop-shadow(0 0 6px rgba(242, 201, 76, 0.45));
  transition: opacity 140ms ease;
}

.demand-point-ring.is-active {
  opacity: 1;
}

.demand-point-label,
.demand-winner-label {
  pointer-events: none;
}

.demand-tooltip {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
  min-width: 160px;
  padding: 10px 11px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.82rem;
  pointer-events: none;
}

.demand-tooltip strong,
.demand-tooltip span {
  display: block;
}

.demand-tooltip span {
  margin-top: 3px;
  color: var(--muted);
}

.demand-controls {
  display: flex;
  flex-direction: column;
}

.demand-controls p:not(.panel-kicker) {
  margin: 0 0 18px;
  color: var(--muted);
}

.generate-prices-button {
  width: 100%;
  min-height: 42px;
  margin: 0 0 8px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  box-shadow: none;
}

.generate-prices-button:hover,
.generate-prices-button:focus {
  border-color: var(--action-accent);
  background: var(--action-accent-soft);
  color: var(--action-accent);
  outline: none;
}

.funnel-randomize-button {
  width: 100%;
  min-height: 42px;
  margin: 0 0 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  box-shadow: none;
}

.funnel-randomize-button:hover,
.funnel-randomize-button:focus {
  border-color: var(--action-accent);
  background: var(--action-accent-soft);
  color: var(--action-accent);
  outline: none;
}

.range-field {
  gap: 10px;
  margin-top: 8px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.range-label-row {
  display: flex;
  align-items: center;
  gap: 7px;
}

.range-label-row > span:first-child {
  display: inline;
}

.info-tooltip {
  position: relative;
  width: 18px;
  height: 18px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  display: inline-grid;
  flex: 0 0 18px;
  place-items: center;
  color: var(--muted);
  cursor: help;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1;
}

.info-tooltip:hover,
.info-tooltip:focus {
  border-color: var(--accent);
  color: var(--accent);
  outline: none;
}

.info-tooltip [role="tooltip"] {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  z-index: 3;
  width: min(260px, 72vw);
  padding: 9px 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  display: block;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.35;
  opacity: 0;
  pointer-events: none;
  text-transform: none;
  transform: translate(-50%, 4px);
  transition: opacity 140ms ease, transform 140ms ease;
}

.info-tooltip:hover [role="tooltip"],
.info-tooltip:focus [role="tooltip"] {
  opacity: 1;
  transform: translate(-50%, 0);
}

.range-field > strong {
  display: block;
}

.range-field strong {
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.88rem;
}

input[type="range"] {
  min-height: 28px;
  padding: 0;
  border: 0;
  background: transparent;
  accent-color: var(--action-accent);
}

.demand-readout {
  display: grid;
  gap: 10px;
  margin-top: auto;
  padding-top: 20px;
}

.demand-readout article {
  min-width: 0;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-soft);
}

.demand-readout span {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.demand-readout strong {
  display: block;
  margin-top: 5px;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.95rem;
  line-height: 1.35;
}

.demand-copy-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 24px;
}

.copy-panel h2 {
  margin-bottom: 9px;
}

.copy-panel p:not(.panel-kicker) {
  margin: 0;
  color: var(--muted);
}

.demand-table-section {
  margin-top: 24px;
}

.funnel-page {
  width: min(1120px, calc(100% - 32px));
}

.funnel-intro h1 {
  max-width: 900px;
}

.funnel-summary-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.funnel-summary-card {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.funnel-summary-card span {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.funnel-summary-card strong {
  display: block;
  margin-top: 6px;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 1rem;
  line-height: 1.25;
}

.funnel-summary-card small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.72rem;
  line-height: 1.25;
}

.funnel-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
  gap: 18px;
  align-items: stretch;
}

.funnel-chart-panel,
.funnel-controls {
  padding: 24px;
}

.funnel-chart-heading {
  align-items: flex-start;
  margin-bottom: 14px;
}

.funnel-chart-wrap {
  position: relative;
  min-height: 680px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  overflow: hidden;
}

.funnel-inline-controls {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.funnel-inline-control {
  position: absolute;
  top: var(--control-top);
  left: var(--control-left);
  width: 108px;
  padding: 0;
  border: 0;
  border-radius: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1px;
  background: transparent;
  box-shadow: none;
  color: var(--muted);
  font-size: 0.64rem;
  font-weight: 800;
  pointer-events: auto;
  transform: translate(-50%, -50%);
}

.funnel-inline-control.is-active {
  color: var(--accent);
}

.funnel-inline-control span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.funnel-inline-control input {
  grid-column: 1 / -1;
  min-height: 18px;
  height: 18px;
  padding: 0;
  outline: none;
  box-shadow: none;
}

.funnel-inline-control input[type="range"] {
  min-height: 18px;
  height: 18px;
  outline: none;
  box-shadow: none;
}

.funnel-inline-control input[type="range"]:focus,
.funnel-inline-control input[type="range"]:focus-visible {
  outline: none;
  box-shadow: none;
}

.funnel-inline-control input[type="range"]::-webkit-slider-runnable-track {
  height: 3px;
}

.funnel-inline-control input[type="range"]::-webkit-slider-thumb {
  margin-top: -6px;
}

.funnel-inline-control input[type="range"]::-moz-range-track {
  height: 3px;
}

.funnel-inline-controls.is-stacked {
  position: static;
  padding: 12px;
  display: grid;
  gap: 8px;
  pointer-events: auto;
}

.funnel-inline-controls.is-stacked .funnel-inline-control {
  position: static;
  width: 100%;
  padding: 8px 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  transform: none;
}

.funnel-chart {
  display: block;
  width: 100%;
  min-height: 680px;
}

.funnel-flowchart {
  min-height: 680px;
}

.funnel-chart text {
  font-family: var(--sans);
  font-size: 0.78rem;
}

.funnel-flow-link {
  cursor: pointer;
  transition: opacity 140ms ease, stroke 140ms ease, stroke-width 140ms ease;
}

.funnel-flow-pulse {
  pointer-events: none;
  stroke-dasharray: 2 14;
  animation: funnel-flow-pulse 2.34s linear infinite;
}

.funnel-flow-link.is-active {
  opacity: 1;
  filter:
    drop-shadow(1px 0 0 var(--highlight))
    drop-shadow(-1px 0 0 var(--highlight))
    drop-shadow(0 1px 0 var(--highlight))
    drop-shadow(0 -1px 0 var(--highlight))
    drop-shadow(0 0 4px rgba(242, 201, 76, 0.55));
  outline: none;
}

.funnel-link-rate-label {
  pointer-events: none;
}

@keyframes funnel-flow-pulse {
  to {
    stroke-dashoffset: -48;
  }
}

@media (prefers-reduced-motion: reduce) {
  .funnel-flow-pulse {
    animation: none;
    opacity: 0.18;
  }
}

.funnel-flow-node {
  cursor: pointer;
}

.funnel-flow-link:focus,
.funnel-flow-node:focus {
  outline: none;
}

.funnel-flow-node rect {
  transition: stroke 140ms ease, stroke-width 140ms ease, filter 140ms ease;
}

.funnel-flow-node.is-active rect {
  stroke: var(--highlight);
  stroke-width: 3px;
  filter: drop-shadow(0 0 7px rgba(242, 201, 76, 0.45));
}

.funnel-flow-node.is-leverage-source rect {
  stroke: var(--highlight);
  stroke-width: 2.4px;
}

.funnel-flow-node.is-leverage-source.is-active rect {
  stroke-width: 3px;
}

.funnel-stage {
  cursor: pointer;
}

.funnel-stage:focus {
  outline: none;
}

.funnel-stage rect,
.funnel-flow {
  transition: opacity 140ms ease, stroke-width 140ms ease;
}

.funnel-stage.is-active rect {
  stroke: var(--highlight);
  stroke-width: 3px;
  filter: drop-shadow(0 0 7px rgba(242, 201, 76, 0.45));
}

.funnel-flow.is-active {
  stroke: var(--highlight);
  stroke-width: 2px;
}

.funnel-flow-label,
.funnel-stage-callout {
  pointer-events: none;
}

.funnel-tooltip {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
  width: min(210px, calc(100% - 24px));
  padding: 8px 9px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.72rem;
  line-height: 1.22;
  pointer-events: none;
}

.funnel-tooltip strong,
.funnel-tooltip span {
  display: block;
}

.funnel-tooltip span {
  margin-top: 2px;
  color: var(--muted);
}

.funnel-tooltip span.tooltip-callout {
  margin-top: 5px;
  font-weight: 800;
}

.funnel-tooltip span.tooltip-callout-leverage {
  color: var(--highlight);
}

.funnel-tooltip span.tooltip-callout-drop {
  color: var(--coral);
}

.funnel-key-takeaway {
  margin-top: 16px;
  padding: 14px 15px;
  border-left: 3px solid var(--accent);
  background: var(--surface-soft);
}

.funnel-key-takeaway p:last-child {
  margin: 0;
  color: var(--ink);
  font-weight: 700;
}

.funnel-controls {
  display: flex;
  flex-direction: column;
}

.funnel-controls p:not(.panel-kicker) {
  margin: 0 0 18px;
  color: var(--muted);
}

.compact-field {
  margin-top: 8px;
}

.compact-field input {
  min-height: 42px;
  font-family: var(--mono);
}

.funnel-copy-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 24px;
}

.funnel-table-section {
  margin-top: 24px;
}

.funnel-table-section thead th {
  font-size: 0.9rem;
}

tbody tr.is-funnel-leverage {
  background: var(--highlight-soft);
}

tbody tr.is-funnel-drop:not(.is-funnel-leverage) {
  background: rgba(200, 85, 61, 0.08);
}

.fermi-page {
  width: min(1120px, calc(100% - 32px));
}

.fermi-intro h1 {
  max-width: 900px;
}

.fermi-summary-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.fermi-summary-card {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.fermi-summary-card span {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.fermi-summary-card strong {
  display: block;
  margin-top: 6px;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 1rem;
  line-height: 1.25;
}

.fermi-summary-card small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.35;
}

.fermi-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
  gap: 18px;
  align-items: stretch;
}

.fermi-chart-panel,
.fermi-controls {
  padding: 24px;
}

.fermi-chart-heading {
  align-items: flex-start;
  margin-bottom: 14px;
}

.fermi-chart-wrap {
  position: relative;
  min-height: 360px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  overflow: hidden;
}

.fermi-chart-wrap-compact {
  min-height: 320px;
}

.fermi-chart {
  display: block;
  width: 100%;
  min-height: 360px;
}

.fermi-chart-compact {
  min-height: 320px;
}

.fermi-chart text {
  font-family: var(--sans);
  font-size: 0.78rem;
}

.fermi-secondary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 22px;
}

.fermi-secondary-view {
  min-width: 0;
}

.fermi-tooltip {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
  min-width: 180px;
  padding: 10px 11px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.78rem;
  pointer-events: none;
}

.fermi-tooltip strong,
.fermi-tooltip span {
  display: block;
}

.fermi-tooltip span {
  margin-top: 3px;
  color: var(--muted);
}

.fermi-controls {
  display: flex;
  flex-direction: column;
}

.fermi-controls p:not(.panel-kicker) {
  margin: 0 0 18px;
  color: var(--muted);
}

.fermi-preset-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 8px;
}

.fermi-preset-button {
  width: 100%;
  min-height: 38px;
  margin: 0;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  box-shadow: none;
  font-size: 0.82rem;
  font-weight: 800;
}

.fermi-preset-button:hover,
.fermi-preset-button:focus {
  border-color: var(--action-accent);
  background: var(--action-accent-soft);
  color: var(--action-accent);
  outline: none;
}

.fermi-preset-button.is-active {
  border-color: var(--highlight);
  background: var(--highlight-soft);
  color: var(--ink);
}

.fermi-readout {
  margin-top: auto;
}

.fermi-key-takeaway {
  margin-top: 18px;
}

.fermi-copy-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 24px;
}

.fermi-table-section {
  margin-top: 24px;
}

.fermi-table-section thead th {
  font-size: 0.88rem;
}

@media (max-width: 860px) {
  .page {
    width: min(100% - 24px, 680px);
    padding-top: 32px;
  }

  .site-nav {
    width: min(100% - 24px, 680px);
  }

  h1 {
    font-size: 2rem;
  }

  .form-panel {
    width: 100%;
  }

  .control-row {
    grid-template-columns: 1fr;
  }

  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .work-grid {
    grid-template-columns: 1fr;
  }

  .demand-page {
    width: min(100% - 24px, 680px);
  }

  .fermi-page,
  .funnel-page,
  .contact-page {
    width: min(100% - 24px, 680px);
  }

  .demand-layout,
  .demand-copy-grid,
  .fermi-layout,
  .fermi-copy-grid,
  .funnel-layout,
  .funnel-copy-grid,
  .project-card,
  .contact-layout {
    grid-template-columns: 1fr;
  }

  .project-preview {
    order: -1;
  }

  .fermi-summary-grid,
  .funnel-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .chart-note {
    max-width: none;
    text-align: left;
  }

  .demand-secondary-heading {
    display: block;
  }

  .demand-secondary-heading p:not(.panel-kicker) {
    max-width: none;
    margin-top: 8px;
    text-align: left;
  }

  .fermi-secondary-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .page {
    width: min(100% - 20px, 680px);
    padding: 26px 0 44px;
  }

  .site-nav {
    width: min(100% - 20px, 680px);
    min-height: 58px;
    padding: 0;
    align-items: center;
    flex-wrap: wrap;
    gap: 0;
  }

  .site-menu-toggle {
    width: 38px;
    min-height: 36px;
    margin: 0;
    padding: 8px 9px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--ink);
    box-shadow: none;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    font-family: var(--mono);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0;
  }

  .site-menu-toggle:hover,
  .site-menu-toggle:focus {
    border-color: var(--accent);
    background: var(--surface-soft);
    color: var(--accent);
    outline: none;
  }

  .site-menu-toggle[aria-expanded="true"] {
    border-color: var(--accent);
    color: var(--accent);
  }

  .site-menu-toggle-icon {
    width: 18px;
    height: 14px;
    display: grid;
    align-content: space-between;
  }

  .site-menu-toggle-icon span {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
    transition: transform 140ms ease, opacity 140ms ease;
  }

  .site-menu-toggle[aria-expanded="true"] .site-menu-toggle-icon span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
  }

  .site-menu-toggle[aria-expanded="true"] .site-menu-toggle-icon span:nth-child(2) {
    opacity: 0;
  }

  .site-menu-toggle[aria-expanded="true"] .site-menu-toggle-icon span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
  }

  .site-actions {
    width: 100%;
    max-height: 0;
    overflow: hidden;
    padding: 0;
    border-top: 0 solid transparent;
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
    opacity: 0;
    visibility: hidden;
    transition: max-height 180ms ease, opacity 140ms ease, visibility 140ms ease, padding 180ms ease;
  }

  .site-nav.is-menu-open .site-actions {
    max-height: 360px;
    padding: 12px 0 16px;
    border-top: 1px solid var(--line);
    opacity: 1;
    visibility: visible;
  }

  .site-links {
    width: 100%;
    display: grid;
    gap: 6px;
    justify-content: flex-start;
  }

  .site-links a {
    width: 100%;
    padding: 10px 0;
    border-width: 0 0 0 2px;
    border-radius: 0;
  }

  .site-links a:hover,
  .site-links a:focus {
    border-color: var(--highlight);
    background: transparent;
    color: var(--highlight);
  }

  .theme-toggle {
    width: auto;
    min-height: 34px;
    align-self: flex-start;
    justify-content: flex-start;
  }

  .intro {
    margin-bottom: 20px;
  }

  h1 {
    font-size: 1.75rem;
    line-height: 1.12;
  }

  .lede {
    font-size: 0.98rem;
  }

  .form-grid,
  .contact-form-grid,
  .metrics,
  .form-actions {
    grid-template-columns: 1fr;
  }

  .workspace {
    gap: 18px;
  }

  .result-panel,
  .form-panel,
  .reporting-panel,
  .demand-chart-panel,
  .demand-controls,
  .fermi-chart-panel,
  .fermi-controls,
  .funnel-chart-panel,
  .funnel-controls,
  .contact-side-panel,
  .copy-panel {
    padding: 16px;
  }

  .demand-chart-wrap,
  .demand-chart {
    min-height: 340px;
  }

  .demand-chart-wrap-compact,
  .demand-chart-compact {
    min-height: 280px;
  }

  .fermi-chart-wrap,
  .fermi-chart {
    min-height: 320px;
  }

  .fermi-chart-wrap-compact,
  .fermi-chart-compact {
    min-height: 280px;
  }

  .funnel-chart-wrap,
  .funnel-chart {
    min-height: 690px;
  }

  .funnel-inline-controls {
    position: static;
    padding: 12px;
    display: grid;
    gap: 8px;
    pointer-events: auto;
  }

  .funnel-inline-control {
    position: static;
    width: 100%;
    transform: none;
  }

  .fermi-summary-grid,
  .funnel-summary-grid {
    gap: 10px;
  }

  .fermi-summary-card,
  .funnel-summary-card {
    padding: 14px;
  }

  .metrics {
    gap: 10px;
    margin-bottom: 14px;
  }

  .metrics article {
    min-height: 96px;
    padding: 14px;
  }

  .metrics strong {
    font-size: 1.6rem;
  }

  .result-summary {
    margin-bottom: 16px;
    padding: 15px 14px 15px 16px;
  }

  .result-summary p {
    font-size: 0.96rem;
  }

  .show-work,
  .stats-tables {
    margin-top: 20px;
  }

  .work-grid,
  .stats-tables {
    gap: 14px;
  }

  .work-step {
    padding: 14px;
  }

  .math-formula,
  .work-math {
    padding: 10px;
  }

  .section-heading {
    align-items: flex-start;
  }

  .funnel-chart-heading {
    display: block;
  }

  .funnel-chart-heading .chart-note {
    margin-top: 8px;
    max-width: none;
    text-align: left;
  }

  .table-wrap {
    overflow-x: visible;
  }

  table {
    min-width: 0;
  }

  table,
  thead,
  tbody,
  tr,
  th,
  td {
    display: block;
  }

  thead {
    display: none;
  }

  tbody tr {
    padding: 12px;
    border-bottom: 1px solid var(--line);
  }

  tbody tr:last-child {
    border-bottom: 0;
  }

  tbody tr:nth-child(even) {
    background: transparent;
  }

  tbody tr.is-rpv-winner {
    background: var(--highlight-soft);
  }

  tbody tr.is-funnel-leverage {
    background: var(--highlight-soft);
  }

  tbody tr.is-funnel-drop:not(.is-funnel-leverage) {
    background: rgba(200, 85, 61, 0.08);
  }

  tbody th,
  tbody td {
    width: 100%;
    padding: 0;
    border-bottom: 0;
  }

  tbody th {
    margin-bottom: 8px;
    color: var(--ink);
  }

  tbody td {
    display: flex;
    gap: 12px;
    align-items: baseline;
    justify-content: space-between;
    padding-top: 7px;
    color: var(--ink);
    text-align: right;
  }

  tbody td::before {
    content: attr(data-label);
    min-width: 42%;
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 800;
    text-align: left;
    text-transform: uppercase;
  }
}

.site-footer {
  border-top: 1px solid var(--line);
}

.site-footer-inner {
  width: min(1080px, calc(100% - 32px));
  min-height: 84px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(150px, 1fr) auto minmax(150px, 1fr);
  align-items: center;
  gap: 20px;
  color: var(--muted);
}

.site-footer p {
  margin: 0;
}

.site-footer-meta {
  min-width: 0;
  display: grid;
  gap: 4px;
  justify-self: start;
}

.site-copyright {
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.82rem;
  font-weight: 800;
}

.site-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 14px;
}

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

.social-link {
  width: 32px;
  min-height: 32px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  text-decoration: none;
}

.social-link:hover,
.social-link:focus {
  border-color: var(--highlight);
  color: var(--highlight);
  outline: none;
}

.social-icon {
  width: 1rem;
  height: 1rem;
}

.site-footer-social {
  justify-content: flex-end;
  justify-self: end;
}

.site-footer a {
  color: var(--muted);
  font-size: 0.82rem;
}

.site-footer a:hover,
.site-footer a:focus {
  color: var(--accent);
  outline: none;
}

.site-footer .social-link:hover,
.site-footer .social-link:focus {
  color: var(--highlight);
}

@media (max-width: 560px) {
  .site-footer-inner {
    width: min(100% - 20px, 680px);
    min-height: 0;
    padding: 18px 0;
    grid-template-columns: 1fr;
    gap: 12px;
    align-items: start;
  }

  .site-footer-links,
  .site-footer-social {
    justify-content: flex-start;
  }

  .site-footer-meta,
  .site-footer-social {
    justify-self: start;
  }
}
