@font-face {
  font-family: "Horizon";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("./assets/fonts/horizon.woff2") format("woff2");
}

:root {
  --shp-bg: #f5f3ee;
  --shp-purple: #845cff;
  --shp-purple-deep: #6f4de2;
  --shp-green: #9dff3b;
  --shp-green-bright: #b6ff63;
  --shp-pink: #ff2d8e;
  --shp-blue: #aff3f3;
  --shp-text: #1f2428;
  --shp-muted: rgba(31, 36, 40, 0.72);
  --label-a4: #9dff3b;
  --label-a3: #7fec3a;
  --label-a2: #a7e239;
  --label-a1: #cbdb38;
  --label-b: #e8d13a;
  --label-c: #f7bc37;
  --label-d: #f39a34;
  --label-e: #ec742f;
  --label-f: #e4512b;
  --label-g: #d63a2a;
  --shp-line: rgba(132, 92, 255, 0.12);
  --shp-card: rgba(255, 255, 255, 0.94);
  --shp-card-strong: rgba(255, 255, 255, 0.98);
  --shp-shadow: 0 18px 34px rgba(31, 36, 40, 0.06), 0 8px 18px rgba(132, 92, 255, 0.06);
  --max: 1360px;
  --radius-card: 28px;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: light;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--shp-text);
  font-family: "Inter", "Segoe UI", "Aptos", sans-serif;
  background: var(--shp-bg);
}

body::before {
  display: none;
}

.app-shell {
  width: min(var(--max), calc(100% - 32px));
  margin: 22px auto 52px;
}

.brand-bar {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
  justify-content: space-between;
  margin-bottom: 24px;
}

.brand-link {
  display: inline-flex;
  line-height: 0;
}

.brand-logo {
  display: block;
  width: 199px;
  height: auto;
  max-width: 199px;
}

.brand-meta {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  justify-content: flex-end;
}

.brand-status,
.brand-copy {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
}

.brand-copy {
  justify-content: flex-end;
}

.brand-copy p {
  max-width: 42ch;
}

.brand-meta p {
  margin: 0;
  color: var(--shp-muted);
  font-size: 0.95rem;
}

.card {
  background: var(--shp-card);
  border: 1px solid rgba(132, 92, 255, 0.08);
  box-shadow: var(--shp-shadow);
}

.reveal {
  animation: rise-in 680ms cubic-bezier(0.2, 0.7, 0.18, 1) both;
}

.beta-pill,
.hero-pill,
.scene-chip {
  align-items: center;
  border: 1px solid var(--shp-line);
  border-radius: 999px;
  display: inline-flex;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1;
  padding: 10px 14px;
}

.beta-pill {
  background: rgba(255, 255, 255, 0.92);
  color: var(--shp-purple);
  text-transform: none;
}

.status-pill {
  align-items: center;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 999px;
  color: var(--shp-muted);
  display: inline-flex;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1;
  padding: 10px 14px;
}

.lang-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.lang-pill {
  align-items: center;
  display: inline-flex;
  font-size: 0.88rem;
  font-weight: 700;
  justify-content: center;
  line-height: 1;
  min-height: 46px;
  min-width: 64px;
  padding: 10px 12px;
  text-decoration: none;
}

.lang-pill-disabled {
  background: rgba(245, 243, 238, 0.82);
  border: 1px solid rgba(0, 0, 0, 0.24);
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.18);
  color: rgba(31, 36, 40, 0.44);
  cursor: default;
}

.hero-card {
  border-radius: 0 34px 34px 34px;
  display: grid;
  gap: 20px;
  grid-template-columns: 1.45fr 0.9fr;
  padding: 28px;
}

.overline {
  color: var(--shp-text);
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.36em;
  margin: 0 0 22px;
  text-transform: uppercase;
}

.hero-copy h1 {
  font-family: "Horizon", "Inter", sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-wrap: balance;
  text-transform: uppercase;
}

.hero-note h2,
.section-heading h2 {
  font-family: "Inter", "Segoe UI", "Aptos", sans-serif;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-wrap: balance;
  text-transform: none;
}

.hero-copy h1 {
  color: var(--shp-purple);
  font-size: clamp(3rem, 7vw, 5.2rem);
  line-height: 0.96;
  margin: 0 0 20px;
}

.lead,
.hero-note p,
.section-heading p,
.metric-sub,
.mini-summary,
.control small,
.reading-notes,
.target-row p,
.technical-note,
.anchor-copy {
  color: var(--shp-muted);
}

.lead {
  font-size: 1.03rem;
  line-height: 1.55;
  margin: 0;
  max-width: 58ch;
}

.hero-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.hero-pill,
.scene-chip {
  background: rgba(255, 255, 255, 0.88);
}

.scene-chip {
  background: rgba(245, 243, 238, 1);
  border-color: rgba(0, 0, 0, 0.12);
  color: var(--shp-text);
}

.hero-note {
  align-content: start;
  background: var(--shp-card-strong);
  border: 1px solid rgba(132, 92, 255, 0.12);
  border-radius: 34px 0 34px 34px;
  display: grid;
  gap: 10px;
  padding: 22px;
}

.hero-note h2,
.section-heading h2 {
  font-size: 1.24rem;
  margin: 0 0 8px;
}

.hero-note p,
.section-heading p,
.target-row p,
.metric-sub,
.control small,
.technical-note,
.anchor-copy {
  line-height: 1.5;
  margin: 0;
}

.hero-note-badge {
  align-self: start;
  background: var(--shp-purple);
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  font-size: 0.82rem;
  font-weight: 700;
  margin-top: 2px;
  padding: 9px 14px;
  text-transform: uppercase;
}

.hero-note-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 18px;
}

.hero-note-list li {
  color: var(--shp-muted);
  line-height: 1.5;
}

.hero-note-list strong {
  color: var(--shp-text);
}

.intro-video {
  align-items: start;
  border-radius: 28px;
  display: grid;
  gap: 20px;
  grid-template-columns: minmax(220px, 0.62fr) minmax(0, 1.18fr);
  margin-top: 22px;
  padding: 18px 20px;
}

.intro-video-copy {
  align-content: center;
  display: grid;
  gap: 8px;
}

.intro-video-head p {
  margin: 0;
  max-width: 34ch;
}

.intro-video-kicker {
  color: var(--shp-muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin: 0 0 10px;
  text-transform: uppercase;
}

.intro-video-note {
  color: var(--shp-muted);
  line-height: 1.55;
  margin: 0;
}

.video-frame-wrap {
  aspect-ratio: 16 / 10;
  border-radius: 24px;
  overflow: hidden;
  position: relative;
}

.video-frame-wrap iframe {
  border: 0;
  height: 100%;
  width: 100%;
}

.shp-video-preview {
  background: rgba(31, 36, 40, 0.08);
  justify-self: end;
  max-width: 560px;
  overflow: hidden;
  position: relative;
  width: 100%;
}

.intro-video-placeholder .intro-video-kicker {
  margin-bottom: 8px;
}

.intro-video-placeholder .section-heading {
  margin-bottom: 0;
}

.shp-video-preview iframe {
  border: 0;
  display: block;
  height: calc(100% + 2px);
  left: -1px;
  position: absolute;
  top: -1px;
  width: calc(100% + 2px);
}

.shp-video-preview.is-loaded {
  background: transparent;
}

.shp-video-lazy {
  align-items: center;
  background: transparent;
  border: 0;
  color: #f5f3ee;
  cursor: pointer;
  display: flex;
  height: 100%;
  inset: 0;
  justify-content: center;
  padding: 0;
  position: absolute;
  text-align: center;
  text-decoration: none;
  width: 100%;
}

.shp-video-lazy img {
  display: block;
  height: 100%;
  inset: 0;
  object-fit: cover;
  position: absolute;
  transform: scale(1.02);
  transition: transform 0.32s ease;
  width: 100%;
}

.shp-video-lazy-overlay {
  background: linear-gradient(0deg, rgba(31, 36, 40, 0.62) 0%, rgba(31, 36, 40, 0.26) 58%, rgba(31, 36, 40, 0.12) 100%);
  inset: 0;
  position: absolute;
  transition: background 0.24s ease;
}

.shp-video-lazy-center {
  align-items: center;
  display: flex;
  gap: 0;
  pointer-events: none;
  position: relative;
  z-index: 1;
}

.shp-video-lazy-play {
  background: linear-gradient(135deg, rgba(132, 92, 255, 0.96), rgba(111, 77, 226, 0.96));
  border: 1px solid rgba(245, 243, 238, 0.3);
  border-radius: 12px;
  box-shadow: 0 12px 22px rgba(0, 0, 0, 0.28);
  height: 50px;
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
  width: 72px;
}

.shp-video-lazy-play::before {
  border-bottom: 10px solid transparent;
  border-left: 16px solid #ffffff;
  border-top: 10px solid transparent;
  content: "";
  left: 30px;
  position: absolute;
  top: 14px;
}

.shp-video-lazy:hover img,
.shp-video-lazy:focus-visible img {
  transform: scale(1.05);
}

.shp-video-lazy:hover .shp-video-lazy-overlay,
.shp-video-lazy:focus-visible .shp-video-lazy-overlay {
  background: linear-gradient(0deg, rgba(31, 36, 40, 0.7) 0%, rgba(31, 36, 40, 0.32) 58%, rgba(31, 36, 40, 0.16) 100%);
}

.shp-video-lazy:hover .shp-video-lazy-play,
.shp-video-lazy:focus-visible .shp-video-lazy-play {
  box-shadow: 0 14px 24px rgba(0, 0, 0, 0.34);
  filter: brightness(1.07);
  transform: translateY(-1px) scale(1.03);
}

.shp-video-lazy:active .shp-video-lazy-play {
  box-shadow: 0 8px 14px rgba(0, 0, 0, 0.28);
  transform: translateY(0) scale(0.98);
}

.shp-video-lazy:focus-visible {
  outline: 2px solid var(--shp-green);
  outline-offset: -2px;
}

.context-strip {
  align-items: start;
  display: grid;
  gap: 18px;
  grid-template-columns: 1fr;
  margin-top: 24px;
}

.context-card {
  border-radius: var(--radius-card);
  padding: 22px;
}

.anchor-card {
  background: var(--shp-card-strong);
}

.anchor-output {
  background: rgba(245, 243, 238, 0.9);
  border: 1px solid rgba(132, 92, 255, 0.12);
  border-radius: 18px;
  display: grid;
  gap: 8px;
  margin-top: 14px;
  padding: 16px;
}

.anchor-logic {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.anchor-logic-item {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(132, 92, 255, 0.1);
  border-radius: 16px;
  display: grid;
  gap: 6px;
  padding: 12px 14px;
}

.anchor-figure {
  color: var(--shp-text);
  display: grid;
  gap: 4px;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.2;
  margin: 0;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
  text-wrap: pretty;
}

.anchor-figure-line {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  min-width: 0;
}

.anchor-figure-line-top {
  color: var(--shp-muted);
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.4;
}

.anchor-figure-line-top .anchor-figure-copy {
  flex-basis: 100%;
  margin-bottom: 2px;
}

.anchor-figure-line-main {
  align-items: baseline;
}

.anchor-figure-copy {
  color: var(--shp-muted);
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.35;
}

.anchor-inline-chip {
  align-items: center;
  background: rgba(132, 92, 255, 0.1);
  border: 1px solid rgba(132, 92, 255, 0.14);
  border-radius: 999px;
  color: var(--shp-purple-deep);
  display: inline-flex;
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.2;
  max-width: 100%;
  min-width: 0;
  overflow-wrap: anywhere;
  padding: 5px 11px;
  text-wrap: pretty;
}

.anchor-inline-chip-soft {
  background: rgba(255, 255, 255, 0.96);
  border-color: rgba(31, 36, 40, 0.12);
  color: var(--shp-text);
  white-space: nowrap;
}

.anchor-figure-scenario {
  color: var(--shp-text);
  display: block;
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.3;
  max-width: 30ch;
  text-wrap: pretty;
}

.anchor-figure-value {
  color: var(--shp-purple-deep);
  display: block;
  font-size: clamp(1.7rem, 3vw, 2.45rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
}

.anchor-figure-meta {
  color: var(--shp-muted);
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.35;
  text-wrap: pretty;
}

.anchor-compare {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.anchor-chip-box {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(132, 92, 255, 0.1);
  border-radius: 18px;
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 14px 16px;
}

.anchor-chip-label,
.anchor-step-label,
.anchor-kicker {
  color: var(--shp-muted);
  font-size: 0.76rem;
  font-weight: 700;
}

.anchor-chip-label,
.anchor-step-label {
  letter-spacing: 0.02em;
  text-transform: none;
}

.anchor-kicker {
  line-height: 1.4;
  margin: 0;
}

.anchor-detail-extra {
  font-size: 0.9rem;
}

.dynamic-inline {
  color: var(--shp-purple);
  font-weight: 700;
  overflow-wrap: anywhere;
  white-space: normal;
}

.dynamic-inline-soft {
  color: var(--shp-text);
  font-weight: 700;
  overflow-wrap: anywhere;
  white-space: normal;
}

.dynamic-inline-strong {
  background: rgba(132, 92, 255, 0.1);
  border-radius: 999px;
  color: var(--shp-purple-deep);
  display: inline-block;
  line-height: 1.32;
  overflow-wrap: normal;
  padding: 2px 10px;
  vertical-align: middle;
  white-space: nowrap;
}

.dynamic-inline-good {
  background: rgba(157, 255, 59, 0.16);
  border: 1px solid rgba(157, 255, 59, 0.34);
  border-radius: 999px;
  color: #5e9617;
  display: inline-block;
  line-height: 1.32;
  padding: 2px 10px;
  vertical-align: middle;
  white-space: normal;
  overflow-wrap: anywhere;
}

.dynamic-inline-warn {
  background: rgba(255, 45, 142, 0.12);
  border: 1px solid rgba(255, 45, 142, 0.28);
  border-radius: 999px;
  color: #c61f72;
  display: inline-block;
  line-height: 1.32;
  padding: 2px 10px;
  vertical-align: middle;
  white-space: normal;
  overflow-wrap: anywhere;
}

.dynamic-inline-market {
  border: 1px solid var(--shp-line);
  border-radius: 999px;
  display: inline-block;
  line-height: 1.32;
  padding: 2px 10px;
  white-space: normal;
  overflow-wrap: anywhere;
}

.anchor-chip-box strong {
  color: var(--shp-text);
  font-size: 1.02rem;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
  text-wrap: pretty;
}

.anchor-chip-box small,
.anchor-logic-item strong {
  color: var(--shp-text);
  display: block;
  hyphens: auto;
  line-height: 1.45;
  margin: 0;
  overflow-wrap: anywhere;
  text-wrap: pretty;
}

.anchor-chip-box small {
  font-size: 0.82rem;
  overflow-wrap: anywhere;
}

.anchor-toolbar {
  align-items: start;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 12px;
}

.anchor-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.meta-chip {
  align-items: center;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(132, 92, 255, 0.14);
  border-radius: 999px;
  display: inline-flex;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.2;
  min-width: 0;
  padding: 10px 12px;
  text-wrap: pretty;
}

.meta-chip-muted {
  color: var(--shp-muted);
}

.inline-control {
  align-items: center;
  display: inline-flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.9rem;
  font-weight: 700;
  justify-content: flex-end;
}

.inline-control span {
  align-items: center;
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
  white-space: normal;
}

.inline-control select {
  min-width: 96px;
}

.exchange-note,
.anchor-market {
  color: var(--shp-muted);
  font-size: 0.92rem;
  line-height: 1.5;
  margin: 12px 0 0;
}

.anchor-market {
  background: var(--market-tone, rgba(255, 255, 255, 0.96));
  border: 1px solid var(--market-border, rgba(132, 92, 255, 0.12));
  border-left: 4px solid var(--market-color, var(--shp-purple));
  border-radius: 16px;
  color: var(--shp-text);
  padding: 12px 14px;
}

.anchor-market-links {
  margin-top: 10px;
}

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

.mode-summary-card {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(132, 92, 255, 0.12);
  border-radius: 18px;
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  transition:
    border-color 0.22s ease,
    box-shadow 0.22s ease,
    transform 0.22s ease;
}

.mode-summary-card strong {
  font-size: 0.96rem;
}

.mode-summary-card p {
  color: var(--shp-muted);
  line-height: 1.5;
  margin: 0;
}

.mode-summary-card.active {
  border-color: rgba(132, 92, 255, 0.22);
  box-shadow: 0 10px 22px rgba(132, 92, 255, 0.08);
}

.explain-lead {
  color: var(--shp-text);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.5;
  margin: 16px 0 0;
}

.preset-strip {
  margin-top: 26px;
}

.preset-meta {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  justify-content: space-between;
  margin-bottom: 14px;
}

.preset-strip-copy {
  color: var(--shp-muted);
  flex: 1 1 520px;
  line-height: 1.55;
  margin: 0;
}

.mini-link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.mini-link-chip {
  align-items: center;
  background: rgba(245, 243, 238, 1);
  border: 1px solid rgba(0, 0, 0, 0.5);
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.5);
  color: rgba(31, 36, 40, 0.72);
  display: inline-flex;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1;
  padding: 10px 14px;
  text-decoration: none;
  text-transform: uppercase;
  transition:
    background-color 0.22s ease,
    border-color 0.22s ease,
    box-shadow 0.22s ease,
    color 0.22s ease,
    transform 0.22s ease;
}

.mini-link-chip:hover,
.mini-link-chip:focus-visible {
  background: var(--shp-purple);
  border-color: var(--shp-purple);
  box-shadow: 0 8px 18px rgba(132, 92, 255, 0.3);
  color: #fff;
  transform: translateY(-1px);
}

.mini-link-chip:active {
  background: var(--shp-purple-deep);
  border-color: var(--shp-purple-deep);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
  color: #fff;
  transform: translateY(0);
}

.mini-link-chip-tight {
  align-self: start;
  margin-top: 12px;
}

.mini-link-row-tight {
  margin-top: 2px;
}

.mini-link-row-tight .mini-link-chip-tight {
  margin-top: 0;
}

.section-heading {
  margin-bottom: 16px;
}

.preset-buttons {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.preset-buttons-main {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.preset-bonus {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.preset-bonus-label {
  color: var(--shp-muted);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin: 0;
  text-transform: uppercase;
}

.preset-buttons-bonus {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.preset,
.segmented,
.ghost-button,
select {
  appearance: none;
  background: rgba(245, 243, 238, 1);
  border: 1px solid rgba(0, 0, 0, 0.5);
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.5);
  color: rgba(31, 36, 40, 0.72);
  font: inherit;
  outline: 2px solid transparent;
  outline-offset: 2px;
  transition:
    background-color 0.22s ease,
    border-color 0.22s ease,
    box-shadow 0.22s ease,
    color 0.22s ease,
    transform 0.22s ease;
}

.preset,
.segmented,
.ghost-button {
  cursor: pointer;
}

.preset {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.segmented,
.ghost-button {
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-transform: none;
}

.preset {
  padding: 16px;
}

.preset-card {
  align-content: start;
  background: rgba(255, 255, 255, 0.98);
  border-color: rgba(31, 36, 40, 0.08);
  border-radius: 22px;
  border-top-color: var(--preset-color, var(--shp-purple));
  border-top-width: 5px;
  box-shadow: 0 10px 24px rgba(31, 36, 40, 0.05);
  display: grid;
  gap: 10px;
  min-height: 146px;
  min-width: 0;
  overflow: visible;
  padding: 16px;
  position: relative;
  text-align: left;
  text-transform: none;
}

.preset-card strong,
.preset-card small,
.preset-head,
.preset-ape,
.preset-range {
  letter-spacing: normal;
}

.preset-head {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.preset-ape {
  align-items: center;
  background: var(--preset-color, var(--shp-purple));
  border-radius: 999px;
  color: var(--preset-contrast, var(--shp-text));
  display: inline-flex;
  font-size: 0.74rem;
  font-weight: 800;
  line-height: 1;
  padding: 8px 12px;
  text-transform: uppercase;
}

.preset-range {
  color: var(--shp-muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.preset-card strong {
  align-items: center;
  display: inline-flex;
  flex-wrap: wrap;
  font-size: 1rem;
  gap: 6px;
  line-height: 1.28;
  text-wrap: balance;
}

.preset-card strong .hint {
  margin-left: 6px;
}

.preset-card small {
  color: var(--shp-muted);
  font-size: 0.9rem;
  font-weight: 500;
  hyphens: auto;
  line-height: 1.45;
  overflow-wrap: anywhere;
  text-wrap: pretty;
}

.preset-card .hint {
  background: var(--preset-surface, rgba(132, 92, 255, 0.08));
  border-color: var(--preset-stroke, rgba(132, 92, 255, 0.18));
  color: var(--preset-color, var(--shp-purple));
}

.segmented.active {
  background: var(--shp-purple);
  border-color: var(--shp-purple);
  box-shadow: 0 8px 18px rgba(132, 92, 255, 0.3), inset 0 0 0 1px rgba(255, 255, 255, 0.18);
  color: #fff;
}

.preset.active {
  background: rgba(255, 255, 255, 0.99);
  border-color: var(--preset-color, var(--shp-purple));
  border-top-color: var(--preset-color, var(--shp-purple));
  box-shadow:
    0 14px 28px var(--preset-glow, rgba(132, 92, 255, 0.18)),
    inset 0 0 0 1px var(--preset-stroke, rgba(132, 92, 255, 0.18));
  color: var(--shp-text);
  filter: saturate(1.03);
}

.preset-card-g {
  --preset-color: var(--label-g);
  --preset-contrast: #fff;
  --preset-glow: rgba(214, 58, 42, 0.24);
  --preset-stroke: rgba(214, 58, 42, 0.22);
  --preset-surface: rgba(214, 58, 42, 0.06);
}

.preset-card-e {
  --preset-color: var(--label-e);
  --preset-contrast: #fff;
  --preset-glow: rgba(236, 116, 47, 0.24);
  --preset-stroke: rgba(236, 116, 47, 0.2);
  --preset-surface: rgba(236, 116, 47, 0.06);
}

.preset-card-d {
  --preset-color: var(--label-d);
  --preset-contrast: #fff;
  --preset-glow: rgba(243, 154, 52, 0.24);
  --preset-stroke: rgba(243, 154, 52, 0.2);
  --preset-surface: rgba(243, 154, 52, 0.06);
}

.preset-card-c {
  --preset-color: var(--label-c);
  --preset-contrast: var(--shp-text);
  --preset-glow: rgba(247, 188, 55, 0.24);
  --preset-stroke: rgba(247, 188, 55, 0.2);
  --preset-surface: rgba(247, 188, 55, 0.06);
}

.preset-card-a2 {
  --preset-color: var(--label-a2);
  --preset-contrast: var(--shp-text);
  --preset-glow: rgba(167, 226, 57, 0.24);
  --preset-stroke: rgba(167, 226, 57, 0.2);
  --preset-surface: rgba(167, 226, 57, 0.06);
}

.preset-card-b {
  --preset-color: var(--label-b);
  --preset-contrast: var(--shp-text);
  --preset-glow: rgba(232, 209, 58, 0.24);
  --preset-stroke: rgba(232, 209, 58, 0.2);
  --preset-surface: rgba(232, 209, 58, 0.08);
}

.preset-card-a4 {
  --preset-color: var(--label-a4);
  --preset-contrast: var(--shp-text);
  --preset-glow: rgba(157, 255, 59, 0.24);
  --preset-stroke: rgba(157, 255, 59, 0.2);
  --preset-surface: rgba(157, 255, 59, 0.06);
}

.segmented:hover,
.segmented:focus-visible,
.ghost-button:hover,
.ghost-button:focus-visible {
  background: var(--shp-purple);
  border-color: var(--shp-purple);
  box-shadow: 0 8px 18px rgba(132, 92, 255, 0.3);
  color: #fff;
  transform: translateY(-1px);
}

.preset:hover,
.preset:focus-visible {
  background: rgba(255, 255, 255, 0.99);
  border-color: var(--preset-color, var(--shp-purple));
  box-shadow: 0 12px 24px var(--preset-glow, rgba(132, 92, 255, 0.14));
  color: var(--shp-text);
  filter: saturate(1.02);
  transform: translateY(-1px);
}

.preset:active {
  background: rgba(255, 255, 255, 0.99);
  border-color: var(--preset-color, var(--shp-purple));
  box-shadow:
    0 8px 16px var(--preset-glow, rgba(132, 92, 255, 0.12)),
    inset 0 0 0 1px var(--preset-stroke, rgba(132, 92, 255, 0.18));
  filter: saturate(1.02);
  transform: translateY(0);
}

.preset.active .preset-ape {
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.2),
    0 6px 14px var(--preset-glow, rgba(132, 92, 255, 0.12));
}

.preset:focus-visible,
.segmented:focus-visible,
.ghost-button:focus-visible,
select:focus-visible {
  outline-color: var(--shp-purple);
}

select:hover,
select:focus-visible {
  border-color: var(--shp-purple);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.5), 0 0 0 4px rgba(132, 92, 255, 0.14);
}

.segmented:active,
.ghost-button:active,
select:active {
  background: rgba(233, 229, 220, 1);
  border-color: rgba(0, 0, 0, 0.58);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.5);
  color: var(--shp-text);
  transform: translateY(0);
}

.segmented.active:active,
.segmented:hover:active,
.segmented:focus-visible:active,
.ghost-button:hover:active,
.ghost-button:focus-visible:active {
  background: var(--shp-purple-deep);
  border-color: var(--shp-purple-deep);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
  color: #fff;
  transform: translateY(0);
}

.layout-grid {
  display: grid;
  gap: 30px;
  grid-template-columns: minmax(360px, 408px) minmax(0, 1fr);
  margin-top: 24px;
}

.controls,
.scene-card,
.targets,
.metric,
.double-grid .card,
.insight-grid .card,
.fact-card {
  padding: 24px;
}

.controls {
  align-self: start;
  border-radius: 34px 0 34px 34px;
  box-shadow: 0 14px 28px rgba(31, 36, 40, 0.05), 0 8px 18px rgba(132, 92, 255, 0.05);
  position: sticky;
  top: 18px;
}

.controls .section-heading {
  border-bottom: 1px solid rgba(132, 92, 255, 0.08);
  margin-bottom: 16px;
  padding-bottom: 12px;
}

.controls .section-heading p {
  max-width: 36ch;
}

.mode-panel {
  background: rgba(245, 243, 238, 0.68);
  border: 1px solid rgba(132, 92, 255, 0.12);
  border-radius: 22px;
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
  padding: 14px 16px;
}

.mode-panel-head {
  display: grid;
  gap: 4px;
}

.mode-panel-head h3 {
  font-size: 1rem;
  font-weight: 700;
  margin: 0;
}

.mode-panel .explain-lead {
  margin: 0;
}

.mode-panel .technical-note {
  margin-top: 0;
}

.mode-panel .reading-notes {
  margin-top: 0;
}

.section-helper {
  align-items: center;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(132, 92, 255, 0.1);
  border-radius: 18px;
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
  padding: 14px;
}

.section-helper p {
  color: var(--shp-muted);
  line-height: 1.5;
  margin: 0;
}

.section-helper-video {
  gap: 12px;
}

.mini-video-embed {
  aspect-ratio: 16 / 9;
  border-radius: 16px;
  overflow: hidden;
  width: min(100%, 320px);
}

.mini-video-embed iframe {
  border: 0;
  height: 100%;
  width: 100%;
}

.section-cta {
  justify-self: start;
}

.cta-link {
  align-items: center;
  border-radius: 999px;
  display: inline-flex;
  font-size: 13px;
  font-weight: 700;
  justify-content: center;
  letter-spacing: 0.06em;
  line-height: 1;
  min-height: 46px;
  outline: 2px solid transparent;
  outline-offset: 2px;
  padding: 14px 22px;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease;
}

.cta-link-primary {
  background: var(--shp-green);
  border: 1px solid var(--shp-green);
  color: var(--shp-text);
}

.cta-link-primary:hover,
.cta-link-primary:focus-visible {
  background: var(--shp-green-bright);
  border-color: var(--shp-green-bright);
  box-shadow: 0 8px 18px rgba(157, 255, 59, 0.34);
  transform: translateY(-1px);
}

.cta-link-primary:focus-visible {
  outline-color: var(--shp-purple);
}

.cta-link-primary:active {
  background: #82d728;
  border-color: #82d728;
  box-shadow: inset 0 0 0 1px rgba(31, 36, 40, 0.16);
  color: var(--shp-text);
  transform: translateY(0);
}

.control-group + .control-group {
  margin-top: 28px;
  border-top: 1px solid rgba(132, 92, 255, 0.08);
  padding-top: 22px;
}

.control-group h3 {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 14px;
  text-wrap: balance;
}

.control,
.control-block {
  display: block;
}

.control + .control,
.control + .control-block,
.control-block + .control,
.control-block + .control-block {
  margin-top: 18px;
}

.control-top {
  align-items: flex-start;
  display: flex;
  flex-wrap: wrap;
  font-weight: 700;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 6px;
}

.control-top > span {
  align-items: center;
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.control-top-stack {
  align-items: flex-start;
  flex-direction: column;
  gap: 4px;
}

.control-top-stack output {
  color: var(--shp-muted);
  font-size: 0.88rem;
  text-align: left;
}

.control output {
  color: var(--shp-purple);
  font-size: 0.94rem;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.range-hint {
  align-items: center;
  color: rgba(31, 36, 40, 0.52);
  display: flex;
  font-size: 0.76rem;
  font-weight: 600;
  justify-content: space-between;
  line-height: 1.35;
  margin-top: 8px;
}

.range-hint span:last-child {
  text-align: right;
}

.hint {
  align-items: center;
  background: rgba(132, 92, 255, 0.12);
  border: 1px solid rgba(132, 92, 255, 0.2);
  border-radius: 50%;
  color: var(--shp-purple);
  display: inline-flex;
  font-family: "Inter", "Segoe UI", "Aptos", sans-serif;
  font-size: 0.72rem;
  font-weight: 800;
  flex-shrink: 0;
  height: 18px;
  justify-content: center;
  letter-spacing: normal;
  line-height: 1;
  position: relative;
  text-transform: none;
  vertical-align: middle;
  width: 18px;
}

.hint-host {
  align-items: center;
  display: inline-flex;
  flex-wrap: nowrap;
  gap: 8px;
  max-width: 100%;
  vertical-align: middle;
}

.hint::after {
  background: rgba(31, 36, 40, 0.94);
  border-radius: 14px;
  color: #fff;
  content: attr(data-tip);
  font-family: "Inter", "Segoe UI", "Aptos", sans-serif;
  font-size: 0.82rem;
  font-weight: 500;
  left: 50%;
  letter-spacing: normal;
  line-height: 1.45;
  max-width: min(280px, calc(100vw - 32px));
  opacity: 0;
  padding: 10px 12px;
  pointer-events: none;
  position: absolute;
  top: auto;
  bottom: calc(100% + 10px);
  text-transform: none;
  transform: translateX(-50%) translateY(-6px);
  transition: opacity 0.18s ease, transform 0.18s ease;
  white-space: normal;
  width: min(280px, calc(100vw - 32px));
  z-index: 24;
}

.hint:hover::after,
.hint:focus-visible::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.metric h3 .hint::after,
.fact-card h3 .hint::after,
.quick-card h2 .hint::after,
.quick-concept .section-heading h2 .hint::after,
.controls .section-heading h2 .hint::after,
.targets .section-heading h2 .hint::after,
.control-top .hint::after,
.mini-control .hint::after,
.preset-card .hint::after,
.anchor-output .hint::after {
  left: auto;
  right: -4px;
  transform: translateY(-6px);
}

.metric h3 .hint:hover::after,
.metric h3 .hint:focus-visible::after,
.fact-card h3 .hint:hover::after,
.fact-card h3 .hint:focus-visible::after,
.quick-card h2 .hint:hover::after,
.quick-card h2 .hint:focus-visible::after,
.quick-concept .section-heading h2 .hint:hover::after,
.quick-concept .section-heading h2 .hint:focus-visible::after,
.controls .section-heading h2 .hint:hover::after,
.controls .section-heading h2 .hint:focus-visible::after,
.targets .section-heading h2 .hint:hover::after,
.targets .section-heading h2 .hint:focus-visible::after,
.control-top .hint:hover::after,
.control-top .hint:focus-visible::after,
.mini-control .hint:hover::after,
.mini-control .hint:focus-visible::after,
.preset-card .hint:hover::after,
.preset-card .hint:focus-visible::after,
.anchor-output .hint:hover::after,
.anchor-output .hint:focus-visible::after {
  transform: translateY(0);
}

.metric-warm .hint,
.metric-sun .hint,
.quick-card-summer .hint {
  background: rgba(255, 45, 142, 0.12);
  border-color: rgba(255, 45, 142, 0.22);
  color: var(--shp-pink);
}

.metric-cool .hint,
.quick-card-heat .hint {
  background: rgba(175, 243, 243, 0.36);
  border-color: rgba(65, 174, 174, 0.34);
  color: #237777;
}

.metric-green .hint {
  background: rgba(157, 255, 59, 0.18);
  border-color: rgba(157, 255, 59, 0.34);
  color: #5e9617;
}

.metric-neutral .hint,
.quick-card-bill .hint,
.inline-control .hint {
  background: rgba(132, 92, 255, 0.12);
  border-color: rgba(132, 92, 255, 0.22);
  color: var(--shp-purple);
}

.quick-card-market .hint,
.anchor-market .hint {
  background: color-mix(in srgb, var(--market-color, var(--label-e)) 12%, white);
  border-color: color-mix(in srgb, var(--market-color, var(--label-e)) 28%, white);
  color: var(--market-color, var(--label-e));
}

body[data-mode="quick"] .advanced-only {
  display: none !important;
}

body[data-mode="quick"] .anchor-detail-extra {
  display: none !important;
}

body[data-mode="curious"] .quick-only {
  display: none !important;
}

.window-mix-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 10px;
}

.mini-control {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(132, 92, 255, 0.12);
  border-radius: 18px;
  display: block;
  overflow: visible;
  padding: 12px;
}

.mini-control-header {
  align-items: center;
  display: flex;
  font-size: 0.92rem;
  font-weight: 700;
  gap: 8px;
  justify-content: space-between;
  margin-bottom: 8px;
}

.mini-control-title {
  align-items: center;
  display: inline-flex;
  gap: 8px;
  line-height: 1.35;
}

.mini-control-title .hint {
  margin-left: 0;
}

.mini-control output {
  flex-shrink: 0;
  font-weight: 800;
  margin: 0;
  text-align: right;
}

.quick-grid,
.quick-double {
  display: grid;
  gap: 18px;
}

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

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

.quick-concept {
  border-radius: 24px;
  background: var(--shp-card-strong);
  padding: 24px;
}

.concept-rows {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.concept-row {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(132, 92, 255, 0.08);
  border-radius: 18px;
  padding: 16px;
}

.concept-row strong {
  display: block;
  font-size: 0.94rem;
  margin-bottom: 8px;
}

.concept-row p {
  color: var(--shp-muted);
  line-height: 1.55;
  margin: 0;
}

.quick-double .card {
  border-radius: 24px;
  padding: 24px;
}

.quick-card {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(132, 92, 255, 0.08);
  border-top: 4px solid transparent;
  border-radius: 22px;
  min-height: 168px;
  min-width: 0;
  padding: 22px;
}

.quick-card h2 {
  font-size: 1rem;
  margin: 0 0 14px;
  overflow-wrap: anywhere;
  text-wrap: balance;
}

.quick-card-bill {
  border-top-color: var(--shp-purple);
}

.quick-card-heat {
  border-top-color: var(--shp-blue);
}

.quick-card-summer {
  border-top-color: var(--shp-pink);
}

.quick-card-market {
  --market-color: var(--label-e);
  --market-ink: var(--label-e);
  border-top-color: var(--market-color);
}

.quick-card-market .quick-value {
  color: var(--market-ink);
}

.quick-value {
  align-items: baseline;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: clamp(1.72rem, 4vw, 2.38rem);
  font-weight: 800;
  line-height: 0.98;
  margin: 0 0 10px;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.quick-value .metric-number {
  font-size: inherit;
  font-weight: inherit;
  line-height: 1;
}

.quick-value .metric-unit {
  align-self: flex-end;
  color: var(--shp-muted);
  font-size: 0.42em;
  font-weight: 700;
  line-height: 1.1;
}

.metric-days {
  align-self: center;
  color: var(--shp-text);
  font-size: 0.48em;
  font-weight: 800;
  line-height: 1.1;
}

.quick-copy,
.quick-action-note {
  color: var(--shp-muted);
  hyphens: auto;
  line-height: 1.56;
  margin: 0;
  overflow-wrap: anywhere;
  text-wrap: pretty;
}

input[type="range"] {
  accent-color: var(--shp-purple);
  margin: 0;
  width: 100%;
}

.segmented-group,
.segmented-grid {
  display: grid;
  gap: 10px;
}

.segmented-group {
  grid-template-columns: repeat(3, 1fr);
}

.segmented-group-two {
  grid-template-columns: repeat(2, 1fr);
}

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

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

.segmented-grid-orientation .segmented {
  line-height: 1.2;
  min-height: 54px;
  padding: 11px 10px;
  text-wrap: balance;
}

.segmented-grid-orientation .segmented:last-child {
  grid-column: 1 / -1;
}

.segmented-grid-orientation + small {
  display: block;
  margin-top: 14px;
}

.segmented {
  min-height: 46px;
  padding: 10px 12px;
}

select {
  border-radius: 18px;
  padding: 14px 16px;
  width: 100%;
}

.ghost-button {
  margin-top: 28px;
  padding: 14px 16px;
  width: 100%;
}

.results-column {
  display: grid;
  gap: 24px;
}

.scene-card {
  border-radius: 34px 34px 0 34px;
}

.scene-layout {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1.28fr) minmax(280px, 0.72fr);
}

.scene-side {
  display: grid;
  gap: 16px;
  align-content: start;
}

.massing-scene {
  --insulation-frame: 12px;
  --shell-cool: rgba(175, 243, 243, 0.52);
  --shell-warm: rgba(255, 45, 142, 0.38);
  min-height: 410px;
  overflow: hidden;
  position: relative;
  border-radius: 24px;
  border: 1px solid rgba(132, 92, 255, 0.14);
  background: rgba(255, 255, 255, 0.98);
}

.massing-scene[data-mood="cold"] {
  box-shadow: inset 0 0 0 1px rgba(175, 243, 243, 0.78);
}

.massing-scene[data-mood="hot"] {
  box-shadow: inset 0 0 0 1px rgba(255, 45, 142, 0.34);
}

.scene-sun,
.scene-compass,
.scene-building-wrap {
  position: absolute;
}

.scene-sun {
  top: 24px;
  right: 24px;
  width: 74px;
  height: 74px;
  border-radius: 50%;
  background: rgba(255, 45, 142, 0.1);
  border: 2px solid rgba(255, 45, 142, 0.32);
}

.scene-compass {
  top: 22px;
  left: 22px;
  width: 112px;
  height: 112px;
}

.compass-ring {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(132, 92, 255, 0.24);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.7);
}

.compass-label,
.compass-needle {
  position: absolute;
}

.compass-label {
  color: rgba(31, 36, 40, 0.6);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.compass-label.north {
  left: 50%;
  top: 8px;
  transform: translateX(-50%);
}

.compass-label.east {
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
}

.compass-label.south {
  left: 50%;
  bottom: 8px;
  transform: translateX(-50%);
}

.compass-label.west {
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
}

.compass-needle {
  left: 50%;
  top: 50%;
  width: 4px;
  height: 44px;
  transform: translate(-50%, -100%) rotate(180deg);
  transform-origin: 50% calc(100% - 2px);
}

.compass-needle::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--shp-pink);
  box-shadow: 0 4px 12px rgba(255, 45, 142, 0.16);
}

.compass-needle::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -10px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid rgba(31, 36, 40, 0.18);
  transform: translateX(-50%);
}

.scene-building-wrap {
  left: 50%;
  bottom: 42px;
  transform: translateX(-50%);
}

.scene-insulation-frame {
  position: absolute;
  inset: calc(-1 * var(--insulation-frame));
  border: var(--insulation-frame) solid var(--shell-cool);
  box-shadow:
    inset 0 0 0 calc(var(--insulation-frame) * 0.42) var(--shell-warm),
    0 0 0 1px rgba(31, 36, 40, 0.08);
}

.scene-building {
  --glazing-height: 30px;
  display: grid;
  gap: 8px;
  min-height: 200px;
  min-width: 220px;
  position: relative;
  padding: 12px;
  background: rgba(245, 243, 238, 0.98);
  box-shadow:
    inset 0 0 0 1px rgba(31, 36, 40, 0.08),
    0 18px 24px rgba(31, 36, 40, 0.08);
}

.scene-building::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -14px;
  width: 72%;
  height: 14px;
  background: rgba(31, 36, 40, 0.1);
  filter: blur(8px);
  transform: translateX(-50%);
}

.building-floor {
  align-items: center;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: inset 0 -1px 0 rgba(31, 36, 40, 0.08);
  display: grid;
  min-height: 54px;
  padding: 0 12px;
  position: relative;
}

.building-floor.is-articulated::before,
.building-floor.is-articulated::after {
  content: "";
  position: absolute;
  top: 10px;
  bottom: 10px;
  width: var(--wing-depth, 18px);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: inset 0 -1px 0 rgba(31, 36, 40, 0.08);
}

.building-floor.is-articulated::before {
  left: calc(-1 * var(--wing-depth, 18px));
}

.building-floor.is-articulated::after {
  right: calc(-1 * var(--wing-depth, 18px));
}

.floor-glazing {
  align-items: center;
  display: flex;
  gap: 8px;
  height: 30px;
  width: 100%;
}

.floor-glazing.center {
  justify-content: center;
}

.floor-glazing.start {
  justify-content: flex-start;
}

.floor-glazing.end {
  justify-content: flex-end;
}

.floor-glazing.duo {
  justify-content: space-between;
}

.glazing-panel {
  background: rgba(175, 243, 243, 0.92);
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, 0.86),
    0 5px 10px rgba(31, 36, 40, 0.06);
  height: var(--glazing-height);
  min-width: 10px;
}

.scene-ribbon {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  max-width: none;
  position: static;
}

.scene-caption {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(132, 92, 255, 0.12);
  border-radius: 18px;
  max-width: none;
  padding: 16px;
  position: static;
}

.scene-caption strong {
  font-size: 1rem;
  line-height: 1.35;
}

.scene-caption p {
  color: var(--shp-muted);
  line-height: 1.55;
  margin: 10px 0 0;
}

.metrics-grid,
.facts-grid,
.double-grid,
.insight-grid {
  display: grid;
  gap: 18px;
}

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

.metric {
  background: rgba(255, 255, 255, 0.9);
  border-top: 5px solid transparent;
  min-height: 168px;
  overflow: visible;
  position: relative;
}

.metric::before {
  display: none;
}

.metric h3 {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
  margin: 0 0 10px;
}

.metric-value {
  align-items: baseline;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0;
  font-size: clamp(1.72rem, 4vw, 2.56rem);
  font-weight: 800;
  line-height: 0.98;
  font-variant-numeric: tabular-nums;
}

.metric-number {
  font-size: inherit;
  font-weight: inherit;
  line-height: 1;
}

.metric-unit {
  align-self: flex-end;
  color: var(--shp-muted);
  font-size: 0.44em;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.15;
  max-width: 100%;
  word-break: break-word;
}

.metric-sub {
  font-size: 0.95rem;
}

.metric-warm {
  border-top-color: var(--shp-pink);
  border-radius: 22px;
}

.metric-cool {
  border-top-color: var(--shp-blue);
  border-radius: 22px;
}

.metric-sun {
  border-top-color: var(--shp-pink);
  border-radius: 22px;
}

.metric-neutral {
  border-top-color: var(--shp-purple);
  border-radius: 22px;
}

.metric-green {
  border-top-color: var(--shp-green);
  border-radius: 22px;
}

.metric-ink {
  border-top-color: rgba(31, 36, 40, 0.64);
  border-radius: 22px;
}

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

.fact-card {
  background: rgba(255, 255, 255, 0.9);
  border-top: 4px solid transparent;
  border-radius: 22px;
  min-height: 150px;
}

.fact-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 10px;
}

.fact-card p {
  color: var(--shp-muted);
  line-height: 1.55;
  margin: 0;
}

.fact-card-1 {
  border-top-color: var(--shp-purple);
}

.fact-card-2 {
  border-top-color: var(--shp-pink);
}

.fact-card-3 {
  border-top-color: var(--shp-blue);
}

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

.double-grid .card,
.insight-grid .card {
  border-radius: 24px;
}

.balance-stack {
  display: grid;
  gap: 14px;
}

.balance-row {
  display: grid;
  gap: 6px;
}

.balance-meta {
  display: flex;
  flex-wrap: wrap;
  font-size: 0.95rem;
  gap: 10px;
  justify-content: space-between;
}

.balance-label {
  font-weight: 700;
}

.balance-track {
  background: rgba(31, 36, 40, 0.06);
  border-radius: 999px;
  height: 12px;
  overflow: hidden;
}

.balance-bar {
  display: block;
  height: 100%;
  width: var(--width);
  border-radius: 999px;
  background: var(--bar-color);
}

.mini-summary {
  margin-top: 18px;
}

.targets {
  border-radius: 24px;
}

.target-row + .target-row {
  margin-top: 20px;
}

.target-row strong {
  display: inline-block;
  font-size: 1rem;
  margin-bottom: 3px;
}

.target-row p {
  margin: 0 0 6px;
  max-width: 64ch;
  text-wrap: pretty;
}

.target-track {
  position: relative;
  margin-top: 10px;
  height: 14px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 45, 142, 0.18), rgba(255, 45, 142, 0.08) 12.5%, rgba(175, 243, 243, 0.18) 12.5%, rgba(175, 243, 243, 0.32));
}

.summer-track {
  background: linear-gradient(90deg, rgba(175, 243, 243, 0.32), rgba(175, 243, 243, 0.18) 50%, rgba(255, 45, 142, 0.14) 50%, rgba(255, 45, 142, 0.32));
}

.marker,
.dot {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
}

.marker {
  width: 2px;
  height: 22px;
  background: rgba(31, 36, 40, 0.38);
}

.dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 3px solid #fff;
  background: var(--shp-purple);
  box-shadow: 0 6px 12px rgba(132, 92, 255, 0.24);
}

.ape-ladder {
  align-items: center;
  background: rgba(31, 36, 40, 0.04);
  border-radius: 14px;
  display: grid;
  gap: 4px;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  margin-top: 16px;
  padding: 8px;
  position: relative;
}

.ape-ladder span {
  border-radius: 10px;
  color: rgba(31, 36, 40, 0.88);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 10px 0;
  text-align: center;
}

.ape-ladder span:nth-child(1) {
  background: var(--label-g);
  color: #fff;
}

.ape-ladder span:nth-child(2) {
  background: var(--label-f);
  color: #fff;
}

.ape-ladder span:nth-child(3) {
  background: var(--label-e);
  color: #fff;
}

.ape-ladder span:nth-child(4) {
  background: var(--label-d);
}

.ape-ladder span:nth-child(5) {
  background: var(--label-c);
}

.ape-ladder span:nth-child(6) {
  background: var(--label-b);
}

.ape-ladder span:nth-child(7) {
  background: var(--label-a1);
}

.ape-ladder span:nth-child(8) {
  background: var(--label-a2);
}

.ape-ladder span:nth-child(9) {
  background: var(--label-a3);
}

.ape-ladder span:nth-child(10) {
  background: var(--label-a4);
}

.ape-dot {
  top: -2px;
}

.site-footer {
  border-radius: 28px;
  display: grid;
  gap: 12px;
  margin-top: 28px;
  padding: 22px 24px;
}

.error-page {
  min-height: 100vh;
}

.error-shell {
  align-content: center;
  display: grid;
  gap: 20px;
  margin: 0 auto;
  min-height: 100vh;
  padding: 28px 16px;
  width: min(760px, 100%);
}

.error-brand {
  justify-self: start;
}

.error-card {
  border-radius: 30px;
  display: grid;
  gap: 14px;
  padding: 30px;
}

.error-card h1 {
  color: var(--shp-purple);
  font-family: "Horizon", "Inter", sans-serif;
  font-size: clamp(2.2rem, 7vw, 3.4rem);
  line-height: 0.98;
  margin: 0;
  text-transform: uppercase;
}

.error-copy {
  color: var(--shp-muted);
  line-height: 1.55;
  margin: 0;
}

.error-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}

.error-primary,
.error-secondary {
  align-items: center;
  border-radius: 999px;
  display: inline-flex;
  font-weight: 700;
  justify-content: center;
  min-height: 48px;
  padding: 12px 18px;
  text-decoration: none;
  transition:
    background-color 0.22s ease,
    border-color 0.22s ease,
    box-shadow 0.22s ease,
    color 0.22s ease,
    transform 0.22s ease;
}

.error-primary {
  background: var(--shp-green);
  border: 1px solid rgba(0, 0, 0, 0.28);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
  color: var(--shp-text);
}

.error-primary:hover,
.error-primary:focus-visible {
  background: var(--shp-green-bright);
  box-shadow: 0 10px 20px rgba(157, 255, 59, 0.18);
  color: var(--shp-text);
  transform: translateY(-1px);
}

.error-secondary {
  background: rgba(245, 243, 238, 1);
  border: 1px solid rgba(0, 0, 0, 0.5);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.5);
  color: rgba(31, 36, 40, 0.72);
}

.error-secondary:hover,
.error-secondary:focus-visible {
  background: var(--shp-purple);
  border-color: var(--shp-purple);
  box-shadow: 0 8px 18px rgba(132, 92, 255, 0.3);
  color: #fff;
  transform: translateY(-1px);
}

.site-footer-feedback {
  color: var(--shp-muted);
  hyphens: auto;
  line-height: 1.6;
  margin: 0;
  max-width: 72ch;
  overflow-wrap: anywhere;
}

body[data-locale="en"] .hero-pill,
body[data-locale="it"] .hero-pill,
body[data-locale="pt-BR"] .hero-pill {
  font-size: 0.76rem;
}

body[data-locale="en"] .anchor-figure,
body[data-locale="it"] .anchor-figure,
body[data-locale="pt-BR"] .anchor-figure {
  font-size: clamp(1.18rem, 2.2vw, 1.74rem);
  line-height: 1.12;
}

body[data-locale="en"] .anchor-copy,
body[data-locale="it"] .anchor-copy,
body[data-locale="en"] .anchor-chip-box small,
body[data-locale="it"] .anchor-chip-box small,
body[data-locale="en"] .preset-card small,
body[data-locale="it"] .preset-card small,
body[data-locale="pt-BR"] .anchor-copy,
body[data-locale="pt-BR"] .anchor-chip-box small,
body[data-locale="pt-BR"] .preset-card small {
  font-size: 0.8rem;
}

body[data-locale="en"] .quick-card h2,
body[data-locale="it"] .quick-card h2,
body[data-locale="pt-BR"] .quick-card h2 {
  font-size: 0.92rem;
  text-wrap: pretty;
}

body[data-locale="en"] .meta-chip,
body[data-locale="it"] .meta-chip,
body[data-locale="pt-BR"] .meta-chip,
body[data-locale="en"] .mini-link-chip,
body[data-locale="it"] .mini-link-chip,
body[data-locale="pt-BR"] .mini-link-chip {
  font-size: 0.77rem;
  letter-spacing: 0.02em;
  line-height: 1.2;
}

body[data-locale="en"] .controls .section-heading p,
body[data-locale="it"] .controls .section-heading p,
body[data-locale="pt-BR"] .controls .section-heading p {
  max-width: 40ch;
}

body[data-locale="en"] .segmented-grid-orientation .segmented,
body[data-locale="it"] .segmented-grid-orientation .segmented {
  font-size: 0.84rem;
}

.site-footer-feedback .site-footer-mail {
  margin: 0 4px;
}

.site-footer-meta {
  align-items: center;
  border-top: 1px solid rgba(31, 36, 40, 0.08);
  color: rgba(31, 36, 40, 0.64);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding-top: 10px;
  row-gap: 4px;
}

.site-footer-home,
.site-footer-author,
.site-footer-sheep {
  align-items: center;
  display: inline-flex;
}

.site-footer-home,
.site-footer-sheep {
  color: var(--shp-text);
  font-weight: 700;
  gap: 6px;
  text-decoration: none;
  transition: color 0.18s ease;
}

.site-footer-home:hover,
.site-footer-home:focus-visible,
.site-footer-sheep:hover,
.site-footer-sheep:focus-visible {
  color: var(--shp-purple);
  outline: none;
}

.site-footer-home span[aria-hidden="true"] {
  color: rgba(31, 36, 40, 0.46);
  transition: transform 0.18s ease, color 0.18s ease;
}

.site-footer-home:hover span[aria-hidden="true"],
.site-footer-home:focus-visible span[aria-hidden="true"] {
  color: var(--shp-purple);
  transform: translateX(-1px);
}

.site-footer-sep {
  color: rgba(31, 36, 40, 0.34);
}

.site-footer-author {
  color: rgba(31, 36, 40, 0.64);
  font-size: 0.84rem;
  font-weight: 700;
  gap: 0;
}

.site-footer-mail {
  color: var(--shp-text);
  font-weight: 800;
  text-decoration: none;
  text-underline-offset: 0.18em;
  transition: color 0.18s ease;
}

.site-footer-mail:hover,
.site-footer-mail:focus-visible {
  color: var(--shp-purple);
  outline: none;
}

.site-footer-author span[aria-hidden="true"] {
  color: var(--shp-pink);
  margin: 0 2px;
}

.site-footer-sheep:hover,
.site-footer-sheep:focus-visible {
  cursor: url("./assets/brand/sheep-cursor.svg") 8 8, url("./assets/brand/sheep-cursor.png") 8 8, auto;
}

.info-drop {
  border-top: 1px solid rgba(132, 92, 255, 0.12);
  margin-top: 20px;
  padding-top: 16px;
}

.source-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.source-links a {
  align-items: center;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(132, 92, 255, 0.14);
  border-radius: 999px;
  color: var(--shp-text);
  display: inline-flex;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1;
  padding: 10px 12px;
  text-decoration: none;
}

.source-links a:hover,
.source-links a:focus-visible {
  border-color: var(--shp-purple);
  color: var(--shp-purple);
}

.info-drop summary {
  cursor: pointer;
  font-size: 0.96rem;
  font-weight: 700;
  list-style: none;
  position: relative;
}

.info-drop summary::-webkit-details-marker {
  display: none;
}

.info-drop summary::after {
  color: var(--shp-purple);
  content: "+";
  font-size: 1.08rem;
  position: absolute;
  right: 0;
  top: 0;
}

.info-drop[open] summary::after {
  content: "−";
}

.info-drop-body {
  color: var(--shp-muted);
  display: grid;
  gap: 10px;
  line-height: 1.56;
  margin-top: 12px;
}

.info-drop-body p {
  margin: 0;
}

.leverage-list {
  display: grid;
  gap: 12px;
}

.leverage-item {
  background: rgba(245, 243, 238, 0.84);
  border: 1px solid rgba(132, 92, 255, 0.12);
  border-radius: 18px;
  display: grid;
  gap: 8px;
  padding: 16px;
}

.leverage-item strong {
  font-size: 0.98rem;
}

.leverage-item p,
.leverage-item span {
  line-height: 1.46;
  margin: 0;
}

.leverage-delta {
  color: var(--shp-purple);
  font-size: 0.92rem;
  font-weight: 700;
}

.reading-notes {
  line-height: 1.56;
  margin: 14px 0 0;
  padding-left: 18px;
}

.reading-notes.compact {
  margin-top: 12px;
}

.reading-notes li + li {
  margin-top: 8px;
}

.technical-note {
  border-top: 1px solid rgba(132, 92, 255, 0.1);
  margin-top: 14px;
  padding-top: 12px;
}

.metric-value,
.anchor-figure,
.control output,
.balance-meta span:last-child {
  font-variant-numeric: tabular-nums;
}

@media (max-width: 1180px) {
  .layout-grid {
    grid-template-columns: 1fr;
  }

  .controls {
    position: static;
  }

  .context-strip {
    grid-template-columns: 1fr;
  }

  .preset-buttons-main {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .intro-video,
  .hero-card,
  .metrics-grid,
  .facts-grid,
  .double-grid,
  .insight-grid,
  .concept-rows,
  .quick-grid,
  .quick-double {
    grid-template-columns: 1fr;
  }

  .hero-note {
    border-radius: 24px;
  }

  .scene-layout {
    grid-template-columns: 1fr;
  }

  .window-mix-grid {
    grid-template-columns: 1fr;
  }

  .anchor-logic {
    grid-template-columns: 1fr;
  }

  .mode-summary-grid,
  .preset-buttons-main,
  .preset-buttons-bonus {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .app-shell {
    width: min(var(--max), calc(100% - 20px));
    margin-top: 14px;
  }

  .brand-bar,
  .brand-meta,
  .brand-copy {
    justify-content: flex-start;
  }

  .anchor-compare {
    grid-template-columns: 1fr;
  }

  .hero-card,
  .context-card,
  .controls,
  .scene-card,
  .quick-card,
  .metric,
  .quick-double .card,
  .double-grid .card,
  .insight-grid .card,
  .fact-card,
  .targets {
    padding: 18px;
  }

  .hero-copy h1 {
    font-size: clamp(2.36rem, 16vw, 3.2rem);
  }

  .metric-value {
    align-items: start;
    flex-direction: column;
    gap: 4px;
  }

  .metric-unit {
    font-size: 0.38em;
  }

  .quick-value {
    align-items: start;
    flex-direction: column;
    gap: 4px;
  }

  .quick-value .metric-unit {
    font-size: 0.38em;
  }

  .cta-link {
    width: 100%;
  }

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

  .mode-summary-grid,
  .preset-buttons-main,
  .preset-buttons-bonus {
    grid-template-columns: 1fr;
  }

  .segmented-group,
  .segmented-group-two {
    grid-template-columns: 1fr;
  }

  .massing-scene {
    min-height: 360px;
  }

  .scene-building-wrap {
    bottom: 34px;
  }

  .scene-caption {
    border-radius: 16px;
  }

  .scene-sun {
    width: 62px;
    height: 62px;
  }

  .shp-video-lazy-play {
    border-radius: 10px;
    height: 44px;
    width: 64px;
  }

  .shp-video-lazy-play::before {
    border-bottom-width: 9px;
    border-left-width: 14px;
    border-top-width: 9px;
    left: 26px;
    top: 13px;
  }

  .site-footer {
    gap: 10px;
    padding: 20px 18px;
  }

  .error-card {
    padding: 22px;
  }

  .error-actions {
    flex-direction: column;
  }
}

@keyframes rotate-slow {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}
