:root {
  color-scheme: light;
  font-family: "Josefin Sans", ui-sans-serif, system-ui, sans-serif;
  color: #202124;
  background: #ffffff;
  --top-panel-h: 44px;
  --bottom-panel-h: 190px;
  --ink: #292929;
  --muted: #8a8a8a;
  --line: #d5d5d5;
  /* Responsive icon hit area. The renderer updates --triangle-size from the
     current logical cell size; controls grow with it on small grids. */
  --icon-button-size: max(28px, calc(var(--triangle-size, 8px) * 2.65));
  --icon-gap: max(2px, calc(var(--triangle-size, 8px) * 0.16));
}

* { box-sizing: border-box; }

html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  min-width: 320px;
  background: #ffffff;
}

body { overflow: hidden; }
button,
input,
summary { font: inherit; }

.top-panel,
.bottom-panel {
  position: fixed;
  left: 0;
  width: 100%;
  z-index: 20;
  background: rgba(255, 255, 255, 0.985);
  box-shadow: none;
}

.top-panel {
  top: 0;
  min-height: 34px;
  border-bottom: 1px solid #ededed;
}

.bottom-panel {
  bottom: 0;
  border-top: 1px solid #ededed;
  max-height: 48vh;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.gauge-wrap,
.conveyor-wrap {
  width: 100%;
  overflow: hidden;
}

.gauge-wrap canvas,
.conveyor-wrap canvas,
#sim-canvas {
  display: block;
}

.sim-viewport {
  position: fixed;
  z-index: 1;
  top: var(--top-panel-h);
  bottom: var(--bottom-panel-h);
  left: 0;
  right: 0;
  overflow-y: auto;
  overflow-x: hidden;
  background: #ffffff;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

#sim-canvas {
  width: 100%;
  height: auto;
  background: #ffffff;
}

.conveyor-wrap {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #ffffff;
  border-bottom: 1px solid #f0f0f0;
}

 .control-toolbar {
  padding: 7px 10px 8px;
}

.toolbar-row {
  display: grid;
  grid-template-columns: minmax(max-content, 1fr) minmax(0, auto) minmax(max-content, 1fr);
  align-items: end;
  gap: 12px;
}

.system-controls,
.controls {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
}

.system-controls {
  justify-self: start;
  flex: 0 0 auto;
  gap: max(3px, calc(var(--triangle-size, 8px) * 0.18));
  min-height: var(--icon-button-size);
}

.controls {
  justify-content: center;
  width: fit-content;
  gap: 5px 10px;
}


.controls-legend-wrap {
  justify-self: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: fit-content;
  max-width: min(980px, 74vw);
}

.controls-legend-wrap .controls {
  width: fit-content;
  max-width: min(760px, 68vw);
}

.legend {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 5px 14px;
  width: max-content;
  max-width: 100%;
  padding-bottom: 1px;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: 0 0 auto;
  min-width: 0;
  white-space: nowrap;
  color: #555;
  font-size: 9px;
  line-height: 1;
}

.legend-triangle {
  display: inline-block;
  flex: 0 0 auto;
}

.legend-triangle.up {
  width: var(--triangle-size, 8px);
  height: calc(var(--triangle-size, 8px) * 0.8660254038);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}

.legend-triangle.down {
  width: var(--triangle-size, 8px);
  height: calc(var(--triangle-size, 8px) * 0.8660254038);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
}

.legend-triangle.tree { background: #8a8a8a; }
.legend-triangle.fire { background: #ff66cc; }
.legend-triangle.biochar { background: #000000; }
.legend-triangle.energy { background: #00cfe8; }
.legend-triangle.cdr { background: #8f1b78; }

.icon-button {
  width: var(--icon-button-size);
  height: var(--icon-button-size);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  box-shadow: none;
}

.icon-button:hover { background: #f6f6f6; }
.icon-button:active { background: #eeeeee; }
.icon-button:focus-visible { outline: 1px solid #777; outline-offset: 1px; }

.icon-play,
.icon-pause,
.icon-reset {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* All UI icons use the same equilateral triangle side length as every Canvas glyph. */
.icon-play i,
.icon-pause i,
.icon-reset i {
  display: block;
  background: var(--ink);
  flex: 0 0 auto;
}

/* Upward triangles: side length = width; altitude = 0.8660254 × side. */
.icon-pause i {
  width: var(--triangle-size, 8px);
  height: calc(var(--triangle-size, 8px) * 0.8660254038);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}

/* Left/right triangles use the same side length, rotated geometrically. */
.icon-play i,
.icon-reset i {
  width: calc(var(--triangle-size, 8px) * 0.8660254038);
  height: var(--triangle-size, 8px);
}
.icon-play i {
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}

.icon-pause { gap: var(--icon-gap); }
.icon-reset { gap: max(3px, calc(var(--triangle-size, 8px) * 0.20)); }
.icon-reset i:first-child {
  clip-path: polygon(100% 0, 100% 100%, 0 50%);
}
.icon-reset i:last-child {
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}

.seed-control {
  min-height: var(--icon-button-size);
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 2px;
  color: #777;
  font-size: 9px;
}

.seed-control input {
  width: 76px;
  border: 0;
  border-bottom: 1px solid #cfcfcf;
  border-radius: 0;
  outline: 0;
  background: transparent;
  padding: 2px 1px 1px;
  color: #333;
  font-size: 10px;
  box-shadow: none;
}
.seed-control input:focus { border-bottom-color: #555; }

.control-row {
  flex: 1 1 78px;
  min-width: 68px;
  max-width: 112px;
  display: grid;
  gap: 3px;
}

.control-heading {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 4px;
  min-width: 0;
  font-size: 9px;
  line-height: 1;
  color: #777;
}

.control-heading > span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.control-value {
  flex: none;
  color: #333;
  font-variant-numeric: tabular-nums;
}

/* Minimal horizontal range: a thin grey rail and a short, thick vertical marker. */
.control-row input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 16px;
  margin: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
}

.control-row input[type="range"]::-webkit-slider-runnable-track {
  width: 100%;
  height: 1px;
  background: #c9c9c9;
  border: 0;
}
.control-row input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 4px;
  height: 15px;
  margin-top: -7px;
  border: 0;
  border-radius: 0;
  background: var(--ink);
  box-shadow: none;
}
.control-row input[type="range"]::-moz-range-track {
  width: 100%;
  height: 1px;
  background: #c9c9c9;
  border: 0;
}
.control-row input[type="range"]::-moz-range-progress {
  height: 1px;
  background: #c9c9c9;
}
.control-row input[type="range"]::-moz-range-thumb {
  width: 4px;
  height: 15px;
  border: 0;
  border-radius: 0;
  background: var(--ink);
  box-shadow: none;
}
.control-row input[type="range"]:focus-visible { outline: none; }
.control-row input[type="range"]:focus-visible::-webkit-slider-thumb { background: #000; }
.control-row input[type="range"]:focus-visible::-moz-range-thumb { background: #000; }

.values-details {
  margin-top: 5px;
  border-top: 1px solid #f0f0f0;
  padding-top: 4px;
  color: #666;
}

.values-details summary {
  width: fit-content;
  cursor: pointer;
  font-size: 9px;
  user-select: none;
}

.stats {
  margin-top: 5px;
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  gap: 2px 12px;
}

.stats div {
  min-width: 0;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 1px 0;
  font-size: 9px;
  border-bottom: 1px solid #f5f5f5;
}

.stats span {
  color: #888;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stats strong {
  font-weight: 500;
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.transfer-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  width: 100vw;
  height: 100vh;
}


@media (max-width: 900px) {
  .stats { grid-template-columns: repeat(2, minmax(130px, 1fr)); }
  .control-row { flex-basis: 74px; max-width: 104px; }
}

/* --- v12 challenge status + post-run submission strip --- */
.conveyor-wrap {
  height: var(--conveyor-css-h, 40px);
  min-height: var(--conveyor-css-h, 40px);
}

.challenge-metrics {
  justify-self: end;
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 13px;
  min-width: 0;
  font-variant-numeric: tabular-nums;
}

.challenge-metrics > span {
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
  white-space: nowrap;
}

.challenge-metrics strong {
  font-size: clamp(13px, calc(var(--triangle-size, 8px) * 1.35), 24px);
  font-weight: 500;
  line-height: 1;
}

.challenge-metrics small {
  color: #8a8a8a;
  font-size: 9px;
  line-height: 1;
}

.challenge-result {
  margin-top: 7px;
  padding-top: 6px;
  border-top: 1px solid #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px 9px;
  min-width: 0;
}
.challenge-result[hidden] { display: none !important; }

.result-message {
  flex: 0 0 auto;
  color: #555;
  font-size: 9px;
  line-height: 1.15;
  white-space: nowrap;
}

.leaderboard-form {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 5px;
  min-width: 0;
}

.leaderboard-form input[type="text"],
.leaderboard-form input[type="email"] {
  min-width: 82px;
  width: 124px;
  border: 0;
  border-bottom: 1px solid #cfcfcf;
  border-radius: 0;
  outline: 0;
  background: #ffffff;
  padding: 2px 1px 1px;
  color: #333;
  font-size: 9px;
  box-shadow: none;
}

.leaderboard-form input:focus { border-bottom-color: #555; }

.privacy-check {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: #777;
  font-size: 8px;
  line-height: 1;
  white-space: nowrap;
}

.privacy-check input {
  width: 10px;
  height: 10px;
  margin: 0;
  accent-color: #444;
}

.submit-score {
  border: 0;
  border-bottom: 1px solid #333;
  border-radius: 0;
  background: transparent;
  padding: 2px 1px;
  color: #333;
  font-size: 9px;
  cursor: pointer;
  box-shadow: none;
}
.submit-score:disabled { color: #aaa; border-bottom-color: #ccc; cursor: default; }

.privacy-note {
  flex: 1 0 100%;
  max-width: 720px;
  color: #999;
  font-size: 7px;
  line-height: 1.2;
  text-align: center;
}
.privacy-note a { color: #777; text-decoration: underline; }

body.embed-mode .values-details,
body.embed-mode .seed-control,
body.embed-mode .proactive-control {
  display: none !important;
}

@media (max-width: 780px) {
  .control-toolbar { padding: 6px 7px 7px; }
  .toolbar-row {
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 5px 8px;
  }
  .system-controls { grid-column: 1; grid-row: 1; }
  .challenge-metrics { grid-column: 2; grid-row: 1; }
  .controls-legend-wrap {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    max-width: none;
    gap: 6px;
  }
  .controls {
    width: 100%;
    max-width: none;
    justify-content: center;
    gap: 5px 8px;
  }
  .legend {
    width: 100%;
    max-width: none;
    flex-wrap: wrap;
    justify-content: center;
    gap: 5px 10px;
  }
  .control-row {
    flex: 1 1 72px;
    min-width: 64px;
    max-width: 112px;
  }
  .challenge-metrics { gap: 8px; }
  .challenge-metrics small { display: none; }
  .stats { grid-template-columns: 1fr; }
  .leaderboard-form input[type="text"],
  .leaderboard-form input[type="email"] { width: 105px; }
}

@media (max-width: 480px) {
  .challenge-metrics { gap: 5px; }
  .challenge-metrics strong {
    font-size: max(12px, calc(var(--triangle-size, 8px) * 1.1));
  }
  .result-message { white-space: normal; text-align: center; }
  .privacy-check { font-size: 7px; }
}


/* Full-mode fire-aware clearing toggle. Kept deliberately minimal to match the controls. */
.proactive-control {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: var(--icon-button-size);
  font-size: 11px;
  color: #555;
  cursor: pointer;
  white-space: nowrap;
}
.proactive-control input {
  appearance: none;
  width: 18px;
  height: 8px;
  margin: 0;
  border: 0;
  border-bottom: 2px solid #bcbcbc;
  position: relative;
  cursor: pointer;
}
.proactive-control input::after {
  content: "";
  position: absolute;
  width: 3px;
  height: 10px;
  left: 1px;
  bottom: -4px;
  background: #555;
  transition: left 100ms linear, background 100ms linear;
}
.proactive-control input:checked::after {
  left: 14px;
  background: #111;
}
.proactive-control input:focus-visible { outline: 1px solid #777; outline-offset: 2px; }

.proactive-control[hidden] { display: none !important; }

/* Gentle phone-orientation hint. CSS-only so it disappears immediately on rotation. */
.landscape-hint {
  display: none;
  position: fixed;
  z-index: 35;
  top: calc(var(--top-panel-h) + 8px);
  left: 50%;
  transform: translateX(-50%);
  max-width: calc(100vw - 28px);
  padding: 6px 10px 5px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid #e6e6e6;
  color: #555;
  font-size: 11px;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
  pointer-events: none;
}

@media (max-width: 700px) and (orientation: portrait) {
  .landscape-hint { display: block; }
}

/* ========================================================================== */
/* Refractive single-page shell                                               */
/* ========================================================================== */

:root {
  --site-nav-h: 54px;
  --story-pad-x: clamp(22px, 5vw, 78px);
}

html {
  scroll-behavior: smooth;
  scroll-snap-type: y proximity;
  background: #fff;
}

body {
  overflow: auto;
  min-height: 100%;
  background: #fff;
}

.site-page {
  width: 100%;
}

.site-nav {
  position: fixed;
  z-index: 100;
  top: 0;
  left: 0;
  right: 0;
  min-height: var(--site-nav-h);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(15px, 2.4vw, 34px);
  padding: 0 clamp(18px, 3.2vw, 48px);
  background: transparent;
  color: #fff;
  mix-blend-mode: difference;
  pointer-events: none;
}

.site-nav a {
  pointer-events: auto;
  color: inherit;
  text-decoration: none;
  font-size: clamp(10px, 0.86vw, 13px);
  font-weight: 500;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.story-block {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  scroll-snap-align: start;
  background: #d8d8d8;
  isolation: isolate;
}

.story-media {
  position: absolute;
  inset: 0;
  z-index: -2;
  background-color: #d8d8d8;
  background-image: var(--story-image, none);
  background-size: cover;
  background-position: center;
  transform: scale(1.005);
}

.story-block::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(to top, rgba(0,0,0,.42), rgba(0,0,0,.02) 55%, rgba(0,0,0,.08));
}

.story-block[data-tone="dark"]::after {
  background: linear-gradient(to top, rgba(255,255,255,.54), rgba(255,255,255,.03) 58%, rgba(255,255,255,.08));
}

.story-content {
  width: min(760px, 84vw);
  margin: 0 var(--story-pad-x) clamp(54px, 8vh, 108px);
  color: #fff;
}


/* Block 2 text stack is vertically centered while block 1 keeps its existing lower placement. */
.story-block-two {
  align-items: center;
}

.story-block-two .story-content {
  margin-top: 0;
  margin-bottom: 0;
}

.story-block[data-tone="dark"] .story-content {
  color: #171717;
}

.story-eyebrow {
  margin: 0 0 12px;
  font-size: var(--story-text-size, clamp(13px, 1.05vw, 16px));
  letter-spacing: .11em;
  white-space: pre-line;
}

.story-content h1,
.story-content h2 {
  margin: 0;
  max-width: 14ch;
  font-size: var(--story-headline-size, clamp(22px, 2.1vw, 34px));
  line-height: .92;
  font-weight: 400;
  letter-spacing: -.025em;
  white-space: pre-line;
}

.story-body {
  width: min(56ch, 50vw);
  max-width: 50vw;
  margin: 24px 0 0;
  font-size: var(--story-text-size, clamp(13px, 1.05vw, 16px));
  line-height: 1.45;
  white-space: pre-line;
}

.story-link {
  display: inline-block;
  margin-top: 18px;
  color: inherit;
  font-size: 13px;
  text-underline-offset: 4px;
}

.scroll-cue {
  position: absolute;
  right: var(--story-pad-x);
  bottom: clamp(30px, 5vh, 64px);
  width: var(--story-text-size, clamp(13px, 1.05vw, 16px));
  height: calc(var(--story-text-size, clamp(13px, 1.05vw, 16px)) * 0.8660254);
  text-decoration: none;
}

.scroll-cue::before {
  content: "";
  position: absolute;
  inset: 0;
  background: currentColor;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
}

.scroll-cue-magenta { color: #ff66cc; }
.scroll-cue-cyan { color: #00cfe8; }

.game-section {
  position: relative;
  min-height: 100svh;
  height: 100svh;
  scroll-snap-align: start;
  background: #fff;
  overflow: hidden;
}

.game-shell {
  position: relative;
  height: 100%;
  min-height: 0;
  padding-top: var(--site-nav-h);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  background: #fff;
}

/* The simulation panels are contained by the third page section rather than
   fixed to the browser window. The simulation engine can keep using the same
   DOM IDs and canvases. */
.game-shell .top-panel,
.game-shell .bottom-panel {
  position: relative;
  left: auto;
  width: 100%;
  z-index: 20;
  background: rgba(255,255,255,.985);
}

.game-shell .top-panel {
  top: auto;
  min-height: 34px;
}

.game-shell .bottom-panel {
  bottom: auto;
  max-height: min(48svh, 360px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.game-shell .sim-viewport {
  position: relative;
  z-index: 1;
  inset: auto;
  min-height: 0;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  background: #fff;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

.game-shell .landscape-hint {
  position: absolute;
  z-index: 35;
  top: calc(var(--site-nav-h) + var(--top-panel-h, 34px) + 8px);
}

/* The app's transfer layer remains viewport-based because transfer endpoints
   are calculated with getBoundingClientRect(). It is transparent and pointerless. */
.game-shell .transfer-overlay {
  position: fixed;
}

@media (max-width: 700px) {
  :root { --site-nav-h: 44px; }

  .site-nav {
    justify-content: center;
    gap: 14px;
    padding-inline: 12px;
  }

  .site-nav a {
    font-size: 9px;
  }

  .story-content {
    width: min(88vw, 620px);
    margin-left: 22px;
    margin-right: 22px;
    margin-bottom: 52px;
  }

  .scroll-cue { right: 22px; bottom: 30px; }
}

@media (max-width: 700px) and (orientation: portrait) {
  .game-section { min-height: 100svh; height: 100svh; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .story-media { transform: none; }
}

/* ========================================================================== */
/* v2 responsive photography + explicit navigation/logo tone                 */
/* ========================================================================== */

.site-nav {
  justify-content: space-between;
  color: #ffffff;
  mix-blend-mode: normal;
  transition: color 160ms linear;
}

.site-nav-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(15px, 2.4vw, 34px);
}

.site-brand {
  pointer-events: auto;
  display: block;
  flex: 0 0 auto;
  line-height: 0;
}

.site-brand[hidden] { display: none !important; }

.site-brand img {
  display: block;
  width: clamp(104px, 11vw, 170px);
  height: auto;
  max-height: calc(var(--site-nav-h) - 16px);
  object-fit: contain;
  object-position: left center;
  filter: none;
  transition: filter 160ms linear, opacity 160ms linear;
}

.site-nav.nav-dark {
  color: #303030;
}

.site-nav.nav-dark .site-brand img {
  /* The supplied wordmark is white; collapse it to a dark neutral on the game. */
  filter: brightness(0) saturate(100%);
  opacity: 0.82;
}

.story-media {
  background-image: var(--story-image-landscape, none);
}

@media (orientation: portrait) {
  .story-media {
    background-image: var(--story-image-portrait, var(--story-image-landscape, none));
  }
}

@media (max-width: 700px) {
  .site-nav {
    justify-content: space-between;
    gap: 10px;
    padding-inline: 12px;
  }

  .site-brand img {
    width: clamp(86px, 28vw, 124px);
    max-height: calc(var(--site-nav-h) - 14px);
  }

  .site-nav-links {
    gap: clamp(8px, 2.6vw, 14px);
  }
}

@media (orientation: portrait) {
  .legend {
    width: 100%;
    max-width: none;
    flex-wrap: wrap;
    justify-content: center;
    gap: 5px 10px;
  }
}


/* Minimal block-2 contact form. */
.contact-form {
  width: min(56ch, 50vw);
  max-width: 50vw;
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  color: inherit;
}

.contact-form input,
.contact-form textarea,
.contact-form button {
  font: inherit;
  font-size: var(--story-text-size, clamp(13px, 1.05vw, 16px));
  border: 0;
  border-radius: 0;
  outline: none;
  box-shadow: none;
  color: #1f1f1f;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  background: rgba(255,255,255,.30);
  padding: .64em .72em .52em;
}

.contact-form textarea {
  grid-column: 1 / -1;
  min-height: 5.2em;
  resize: vertical;
  line-height: 1.3;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: rgba(20,20,20,.76);
  opacity: 1;
}

.contact-form input:focus,
.contact-form textarea:focus {
  background: rgba(255,255,255,.42);
}

.contact-submit-row {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 2.2em;
}

.contact-form button {
  padding: .58em .82em .48em;
  background: rgba(255,255,255,.90);
  cursor: pointer;
}
.contact-form button:hover { background: rgba(255,255,255,.96); }
.contact-form button:disabled { opacity: .58; cursor: default; }

.contact-status,
.contact-privacy {
  font-size: calc(var(--story-text-size, clamp(13px, 1.05vw, 16px)) * .72);
  color: inherit;
  opacity: .86;
}
.contact-privacy {
  margin-left: auto;
  text-decoration: none;
}
.contact-privacy:hover,
.contact-privacy:focus-visible { text-decoration: underline; text-underline-offset: 3px; }
.contact-honeypot { display: none !important; }

@media (max-width: 700px), (orientation: portrait) {
  .contact-form {
    width: min(86vw, 56ch);
    max-width: min(86vw, 56ch);
    grid-template-columns: 1fr;
  }
  .contact-form textarea,
  .contact-submit-row { grid-column: 1; }
  .contact-submit-row { flex-wrap: wrap; }
  .contact-privacy { margin-left: 0; }
}
