:root {
  --bg: #080b14;
  --panel: rgba(255, 255, 255, 0.07);
  --panel-strong: rgba(255, 255, 255, 0.12);
  --text: #f8fafc;
  --muted: #aab1c5;
  --hot: #7dd3fc;
  --hot-2: #38bdf8;
  --cold: #f87171;
  --green: #6ee7a8;
  --violet: #c084fc;
  --border: rgba(255, 255, 255, 0.15);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  --radius: 24px;
  --compare-line: rgba(255, 255, 255, 0.09);
  --compare-surface: #111319;
  --compare-surface-light: #191c24;
  --compare-yellow: #ffc83d;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(125, 211, 252, 0.22), transparent 32rem),
    radial-gradient(circle at top right, rgba(56, 189, 248, 0.14), transparent 30rem),
    radial-gradient(circle at bottom, rgba(125, 211, 252, 0.10), transparent 30rem),
    var(--bg);
  line-height: 1.6;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, black, transparent 85%);
}

a {
  color: inherit;
  text-decoration: none;
}

.page {
  position: relative;
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: -0.03em;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(125, 211, 252, 0.25), rgba(56, 189, 248, 0.14));
  box-shadow: 0 0 38px rgba(125, 211, 252, 0.25);
}

.nav-links {
  display: flex;
  gap: 10px;
  color: var(--text);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: -0.03em;
}

.nav-links a {
  padding: 10px 12px;
  border-radius: 999px;
}

.nav-links a:hover {
  color: var(--text);
  background: var(--panel);
}

/* Desktop nav ~20% larger than the 1rem mobile size */
@media (min-width: 861px) {
  .brand,
  .nav-links {
    font-size: 1.2rem;
  }
}

.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  background: var(--panel);
  color: var(--text);
  font-size: 1.35rem;
  cursor: pointer;
}

.menu-toggle:hover {
  background: var(--panel-strong);
}

.hero {
  display: grid;
  grid-template-columns: 1.06fr 0.94fr;
  gap: 28px;
  align-items: center;
  padding: 64px 0 48px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin-bottom: 18px;
  padding: 8px 12px;
  color: #dbeafe;
  border: 0;
  border-radius: 999px;
  background: none;
  font-size: 0.92rem;
  font-weight: 500;
}

.hero-card-header {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.hero-card-header .eyebrow {
  margin-bottom: 0;
}

.refresh-metrics-button {
  display: inline-grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 0;
  border-radius: 14px;
  background: var(--panel);
  color: var(--text);
  font-size: 1.35rem;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.refresh-metrics-button:hover {
  transform: rotate(-25deg);
  background: var(--panel-strong);
}
h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 18px;
  font-size: clamp(3rem, 8vw, 6.8rem);
  line-height: 0.92;
  letter-spacing: -0.08em;
}

.gradient-text {
  background: linear-gradient(90deg, #e0f2fe, #7dd3fc, #38bdf8);
  -webkit-background-clip: text;
  background-clip: text;
  display: inline-block;
  padding-right: 0.08em;
  color: transparent;
}

.hero-subtitle {
  max-width: 720px;
  margin-bottom: 20px;
  color: #f1f5f9;
  font-size: clamp(1.35rem, 3vw, 2.1rem);
  line-height: 1.16;
  letter-spacing: -0.04em;
  font-weight: 800;
}

.hero-copy {
  max-width: 640px;
  margin-bottom: 28px;
  color: var(--muted);
  font-size: 1.08rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--panel);
  color: var(--text);
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.button:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.28);
  background: var(--panel-strong);
}

.button.primary {
  border: 0;
  background: linear-gradient(135deg, var(--hot), var(--hot-2));
  box-shadow: 0 16px 40px rgba(56, 189, 248, 0.32);
}

.hero-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.055));
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero-card {
  order: -1;
  position: relative;
  overflow: hidden;
  padding: 17.6px;
  margin-top: 25px;
}

.hero-card::before {
  content: "";
  position: absolute;
  inset: -40%;
  pointer-events: none;
  background: conic-gradient(from 90deg, transparent, rgba(125, 211, 252, 0.26), transparent, rgba(248, 113, 113, 0.18), transparent);
  animation: spin 12s linear infinite;
}

.hero-card-inner {
  position: relative;
  padding: 17.6px;
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) - 8px);
  background: rgba(8, 9, 15, 0.82);
}

.terminal-top {
  display: flex;
  gap: 7px;
  margin-bottom: 20px;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: #ff5f57;
}

.dot:nth-child(2) {
  background: #febc2e;
}

.dot:nth-child(3) {
  background: #28c840;
}

.metric {
  display: grid;
  gap: 14px;
}

.metric-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.055);
}

.metric-label {
  color: var(--muted);
  font-size: 0.92rem;
}

.metric-value {
  color: var(--muted);
  font-size: clamp(1.4rem, 4vw, 2.4rem);
  line-height: 1;
  white-space: nowrap;
}

section {
  padding: 44px 0;
}

/* Optional light-mode band: add class="section-light" to any section.
   Outer heading/copy go dark; nested dark surfaces (e.g. terminals) stay as-is. */
.section-light {
  margin: 8px 0;
  padding: 48px 22px;
  border-radius: 20px;
  background: #ffffff;
  color: #12141a;
}

.section-light .section-heading h2,
.section-light .section-heading .eyebrow,
.section-light .section-label {
  color: #12141a;
}

.section-light .section-heading p {
  color: #3d4454;
}

.section-light .section-heading strong {
  color: #12141a;
}

.section-light a {
  color: #12141a;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.section-light a:hover {
  color: #0369a1;
}

.section-light .use-case-terminal,
.section-light .converter-shell,
.section-light .breakdown,
.section-light .closing-card,
.section-light .laws-grid .law-card,
.section-light .scale-wrap {
  color: var(--text);
}

.section-heading {
  display: grid;
  gap: 10px;
  max-width: 760px;
  margin-bottom: 22px;
}

/* Optional: let section copy use the full section width instead of the 760px heading column */
.section-full .section-heading {
  max-width: none;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(2rem, 5vw, 3.8rem);
  line-height: 1;
  letter-spacing: -0.06em;
}

.inline-spinner {
  display: inline-block;
  width: 1.5em;
  height: 1.5em;
  margin-left: 0.18em;
  border: 0.12em solid rgba(255, 255, 255, 0.28);
  border-top-color: #ffffff;
  border-radius: 50%;
  vertical-align: -0.4em;
  animation: spin 0.8s linear infinite;
}

.section-heading p {
  color: var(--muted);
  font-size: 1.05rem;
}

label {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 700;
}

input {
  width: 100%;
  min-height: 58px;
  padding: 0 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  outline: 0;
  background: rgba(0, 0, 0, 0.28);
  color: var(--text);
  font: inherit;
  font-size: 1.1rem;
}

input:focus {
  border-color: rgba(125, 211, 252, 0.72);
  box-shadow: 0 0 0 4px rgba(125, 211, 252, 0.14);
}

.dictionary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.law-card,
.symbol-card {
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--panel);
}

.law-card {
  padding: 20px;
}

.law-icon {
  margin-bottom: 12px;
  font-size: 2.3rem;
}

.law-card h3 {
  margin-bottom: 8px;
  font-size: 1.15rem;
}

.law-card p {
  margin-bottom: 0;
  color: var(--muted);
}

.symbol-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: center;
  padding: 15px;
}

.symbol {
  display: grid;
  width: 56px;
  height: 56px;
  place-items: center;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 1.8rem;
}

.symbol-card strong {
  display: block;
  font-size: 1.05rem;
}

.symbol-card span {
  color: var(--muted);
  font-size: 0.92rem;
}

.positive .symbol {
  background: rgba(125, 211, 252, 0.16);
}

.negative .symbol {
  background: rgba(248, 113, 113, 0.13);
}

.neutral .symbol {
  background: rgba(110, 231, 168, 0.14);
}

footer {
  padding: 28px 0 40px;
  color: var(--muted);
  text-align: center;
}

@keyframes spin {
  to {
    transform: rotate(1turn);
  }
}

@media (max-width: 860px) {
  .nav {
    align-items: center;
    flex-direction: row;
    flex-wrap: wrap;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    width: 100%;
    gap: 8px;
    padding-top: 8px;
  }

  .nav-links.is-open {
    display: flex;
  }

  .nav-links a {
    padding: 10px 12px;
    background: var(--panel);
    text-align: center;
  }

  .hero,
  .dictionary {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 34px;
  }

  .hero-content {
    margin-top: 50px;
  }

  .metric-row {
    align-items: center;
    flex-direction: row;
  }
}

@media (max-width: 520px) {
  .page {
    width: min(100% - 22px, 1160px);
  }

  .hero-card {
    padding: 12px;
  }

  .hero-card-inner {
    padding: 16px;
  }

  .hero-card {
    padding: 9.6px;
  }

  .hero-card-inner {
    padding: 12.8px;
  }

  .nav-links a {
    padding-left: 0;
  }
}

/* —— Alternate-version compare sections (imported for review) —— */
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin: 0 0 18px;
  padding: 6px 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #d7dbe8;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.section-heading .eyebrow {
  margin-bottom: 12px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  color: var(--compare-yellow);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.heat-text {
  color: transparent;
  background: linear-gradient(100deg, #e0f2fe 0%, #7dd3fc 43%, #38bdf8 75%, #bae6fd 100%);
  background-clip: text;
  -webkit-background-clip: text;
}

.converter-shell {
  display: grid;
  grid-template-columns: 0.82fr 1.18fr;
  overflow: hidden;
  border: 1px solid var(--compare-line);
  border-radius: var(--radius);
  background: var(--compare-surface);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.3);
}

.converter-controls {
  padding: 38px;
  border-right: 1px solid var(--compare-line);
}

.line-input-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.converter-controls label {
  flex: 0 0 auto;
  margin-bottom: 0;
  color: #d5d8e0;
  font-size: 0.86rem;
  font-weight: 750;
  white-space: nowrap;
}

.number-input {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  min-height: auto;
  padding: 10px 12px;
  border: 1px solid var(--compare-line);
  border-radius: 11px;
  outline: none;
  background: #0b0c10;
  color: var(--text);
  font: 700 2.4rem ui-monospace, SFMono-Regular, Consolas, monospace;
  text-align: center;
}

.number-input:focus {
  border-color: rgba(125, 211, 252, 0.65);
  box-shadow: 0 0 0 4px rgba(125, 211, 252, 0.09);
}

.range-input {
  width: 100%;
  min-height: auto;
  margin: 24px 0 7px;
  padding: 0;
  border: 0;
  background: transparent;
  accent-color: var(--hot);
}

.range-labels {
  position: relative;
  color: #707684;
  font: 0.7rem ui-monospace, SFMono-Regular, Consolas, monospace;
}

.range-labels-linear {
  display: flex;
  justify-content: space-between;
}

.range-labels-log {
  position: relative;
  height: 1.15em;
}

.range-labels-log span {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  white-space: nowrap;
}

.range-labels [hidden] {
  display: none;
}

.mode-buttons {
  display: grid;
  gap: 7px;
  margin-bottom: 20px;
}

.play-controls {
  display: grid;
  gap: 8px;
  margin-top: 28px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.03) 55%, rgba(255, 255, 255, 0.07));
}

.mode-button-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.mode-button-group-4 {
  grid-template-columns: repeat(4, 1fr);
}

.mode-button-group-5 {
  grid-template-columns: repeat(5, 1fr);
}

.mode-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 8px;
  border: 1px solid var(--compare-line);
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 800;
}

.mode-button.active {
  border-color: rgba(125, 211, 252, 0.35);
  background: rgba(125, 211, 252, 0.11);
  color: #bae6fd;
}

.mode-button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.mode-button-icon {
  width: 18px;
  height: 18px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mode-button-icon-fill {
  fill: currentColor;
  stroke: none;
}

.converter-result {
  --result-pad: 38px;
  position: relative;
  min-height: 310px;
  padding: var(--result-pad);
  background:
    radial-gradient(circle at 80% 25%, rgba(125, 211, 252, 0.12), transparent 16rem),
    #0c0d12;
}

.result-value {
  margin: 0;
  padding-bottom: 100px;
  overflow-wrap: break-word;
  color: var(--muted);
  font-size: 3rem;
  line-height: 1.25;
  filter: drop-shadow(0 0 18px rgba(125, 211, 252, 0.2));
}

.converter-result.is-hide-remainder {
  display: flex;
  flex-direction: column;
}

.converter-result.is-hide-remainder .result-value {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  padding-bottom: 50px;
  text-align: center;
}

.result-footer {
  position: absolute;
  left: var(--result-pad);
  right: var(--result-pad);
  bottom: var(--result-pad);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}

.result-equation {
  margin: 0;
  color: var(--muted);
  font: 0.8rem ui-monospace, SFMono-Regular, Consolas, monospace;
}

.copy-button {
  padding: 9px 13px;
  border: 1px solid var(--compare-line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  color: #c7cbd4;
  cursor: pointer;
  font-weight: 750;
}

.scale-wrap {
  overflow-x: auto;
  padding: 6px 0 18px;
  scrollbar-color: #414653 transparent;
}

.thermal-scale {
  min-width: 1040px;
  display: grid;
  grid-template-columns: repeat(9, 1fr) 0.9fr repeat(9, 1fr);
  gap: 7px;
}

.thermal-scale .symbol-card {
  min-height: 120px;
  display: flex;
  flex-direction: column;
  grid-template-columns: none;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 10px 5px;
  border: 1px solid var(--compare-line);
  border-radius: 14px;
  background: var(--compare-surface);
  text-align: center;
}

.thermal-scale .symbol-card.cool {
  background: linear-gradient(180deg, rgba(248, 113, 113, 0.08), rgba(17, 19, 25, 0.8));
}

.thermal-scale .symbol-card.hot {
  background: linear-gradient(180deg, rgba(125, 211, 252, 0.09), rgba(17, 19, 25, 0.8));
}

.thermal-scale .symbol-card.zero {
  border-color: rgba(121, 226, 140, 0.25);
  background: rgba(121, 226, 140, 0.07);
}

.thermal-scale .symbol {
  display: block;
  width: auto;
  height: auto;
  margin-bottom: 8px;
  border-radius: 0;
  background: none;
  font-size: 1.75rem;
}

.symbol-value {
  color: #d8dbe2;
  font: 700 0.7rem ui-monospace, SFMono-Regular, Consolas, monospace;
}

.themes-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.theme-card {
  padding: 28px;
  border: 1px solid var(--compare-line);
  border-radius: 18px;
  background: linear-gradient(145deg, var(--compare-surface-light), var(--compare-surface));
}

.theme-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.theme-brand-mark {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 14px;
  font-size: 1.5rem;
}

.theme-card-fire .theme-brand-mark {
  background: linear-gradient(135deg, rgba(255, 122, 24, 0.28), rgba(255, 61, 84, 0.16));
  box-shadow: 0 0 28px rgba(255, 122, 24, 0.22);
}

.theme-card-signal .theme-brand-mark {
  background: linear-gradient(135deg, rgba(125, 211, 252, 0.25), rgba(56, 189, 248, 0.14));
  box-shadow: 0 0 28px rgba(125, 211, 252, 0.25);
}

.theme-tagline {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 700;
}

.theme-card p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.laws-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.laws-grid .law-card {
  min-height: 250px;
  padding: 28px;
  border: 1px solid var(--compare-line);
  border-radius: 18px;
  background: linear-gradient(145deg, var(--compare-surface-light), var(--compare-surface));
}

.laws-grid .law-icon {
  margin-bottom: 18px;
  font-size: 2rem;
}

.laws-grid .law-card-neutral .law-icon {
  color: var(--muted);
}

.laws-grid .law-card h3 {
  margin-bottom: 10px;
  font-size: 1.08rem;
}

.laws-grid .law-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.89rem;
}

.logic-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  align-items: center;
  gap: 70px;
}

.steps {
  counter-reset: thermal-step;
  display: grid;
  gap: 20px;
}

.step {
  position: relative;
  padding-left: 54px;
}

.step::before {
  position: absolute;
  left: 0;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(125, 211, 252, 0.23);
  border-radius: 10px;
  background: rgba(125, 211, 252, 0.08);
  color: var(--compare-yellow);
  content: counter(thermal-step);
  counter-increment: thermal-step;
  font: 800 0.8rem ui-monospace, SFMono-Regular, Consolas, monospace;
}

.step h3 {
  margin-bottom: 4px;
  font-size: 1rem;
}

.step p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.breakdown {
  padding: 40px;
  border: 1px solid var(--compare-line);
  border-radius: var(--radius);
  background: #0d0f14;
}

.breakdown-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 18px 0;
  border-bottom: 1px solid var(--compare-line);
}

.breakdown-row:last-child {
  border: 0;
}

.breakdown-code {
  color: var(--muted);
  font: 0.84rem ui-monospace, SFMono-Regular, Consolas, monospace;
}

.breakdown-result {
  text-align: right;
  font-size: 1.55rem;
}

.use-case-terminal {
  overflow: hidden;
  border: 1px solid var(--compare-line);
  border-radius: var(--radius);
  background: #0a0b0f;
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--compare-line);
  color: #777d8b;
  font: 0.72rem ui-monospace, SFMono-Regular, Consolas, monospace;
}

.terminal-bar span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #ff605c;
}

.terminal-bar span:nth-child(2) {
  background: #ffbd44;
}

.terminal-bar span:nth-child(3) {
  background: #00ca4e;
}

.terminal-body {
  min-height: auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 34px;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

.terminal-output {
  min-height: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 0.35em;
  row-gap: 0.35em;
  margin-top: 10px;
  overflow-wrap: anywhere;
  font-family: system-ui, sans-serif;
  font-size: clamp(1.4rem, 3.5vw, 2.4rem);
  filter: drop-shadow(0 0 15px rgba(125, 211, 252, 0.28));
}

.terminal-step {
  white-space: nowrap;
}

.signal-pos {
  color: #7dd3fc;
}

.signal-dot-lg {
  display: inline-block;
  font-size: 2em;
  line-height: 1em;
  vertical-align: baseline;
  margin-block: -0.25em;
}

.signal-neg {
  color: #f87171;
}

.signal-neutral {
  color: var(--muted);
}

.terminal-status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  color: #a6acb8;
  font-size: 0.8rem;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 12px var(--green);
}

.closing {
  text-align: center;
}

.closing-card {
  position: relative;
  overflow: hidden;
  padding: 80px 24px;
  border: 1px solid rgba(125, 211, 252, 0.17);
  border-radius: 30px;
  background:
    radial-gradient(circle at 50% 120%, rgba(56, 189, 248, 0.28), transparent 45%),
    var(--compare-surface);
}

.closing h2 {
  margin-bottom: 16px;
  font-size: clamp(2.4rem, 6vw, 5rem);
  line-height: 1;
  letter-spacing: -0.06em;
}

.closing p:not(.section-label):not(.eyebrow) {
  max-width: 570px;
  margin: 0 auto 30px;
  color: var(--muted);
}

@media (max-width: 900px) {
  .logic-grid,
  .converter-shell,
  .themes-grid {
    grid-template-columns: 1fr;
  }

  .converter-controls {
    border-right: 0;
    border-bottom: 1px solid var(--compare-line);
  }

  .laws-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Stacked: few emojis in hide-remainder — don't vertically center in a tall box */
  .converter-result.is-hide-remainder {
    min-height: 0;
  }

  .converter-result.is-hide-remainder .result-value {
    flex: 0 0 auto;
    align-items: flex-start;
    justify-content: center;
    padding-top: 0;
    /* Reserve space for absolute footer (equation + copy) so they don't overlap */
    padding-bottom: 100px;
  }
}

@media (max-width: 680px) {
  .terminal-body,
  .converter-controls,
  .breakdown {
    padding: 25px;
  }

  /* Stack label + content into full-width rows on small screens */
  .breakdown-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .breakdown-result {
    text-align: left;
  }

  /* ~20% smaller than 1.55rem; leave title row and left labels alone */
  .breakdown-row:not(:first-child) .breakdown-result {
    font-size: 1.25rem;
  }

  .converter-result {
    --result-pad: 25px;
    padding: var(--result-pad);
  }

  .result-value {
    font-size: 2.1rem; /* 30% smaller than 3rem */
  }

  .laws-grid {
    grid-template-columns: 1fr;
  }

  .laws-grid .law-card {
    min-height: auto;
  }
}


.metric-value.is-positive,
.result-value.is-positive {
  color: #7dd3fc;
}

.metric-value.is-negative,
.result-value.is-negative {
  color: #f87171;
}

.negative .symbol {
  color: #f87171;
}

.positive .symbol {
  color: #7dd3fc;
}

.neutral .symbol {
  color: var(--muted);
}

.thermal-scale .symbol-card.cool .symbol {
  color: #f87171;
}

.thermal-scale .symbol-card.hot .symbol {
  color: #7dd3fc;
}

.thermal-scale .symbol-card.zero .symbol {
  color: var(--muted);
}
