:root {
  --page: #f7f9fb;
  --surface: #ffffff;
  --ink: #0d8367;
  --muted: #62706b;
  --line: #dbe5e1;
  --mint: #52bda8;
  --mint-dark: #0e725f;
  --gold: #a8792a;
  --coral: #a15c54;
  --shadow: 0 20px 60px rgba(29, 42, 38, 0.12);
  --max: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  background: linear-gradient(180deg, #d3f0e3 0%, #d4e2dd 52%, #aae7cf 100%);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  line-height: 1.5;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

a:focus-visible {
  outline: 3px solid rgba(82, 189, 168, 0.45);
  outline-offset: 4px;
}

.site-header,
.hero,
.page-hero,
.store-directory,
.flavor-section,
.calculator-web-section,
.section-grid,
.news-strip,
.site-footer {
  width: min(100% - 40px, var(--max));
  margin: 0 auto;
}

.site-header {
  width: min(calc(100% - clamp(40px, 16vw, 160px)), 1240px);
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--mint-dark);
  font-weight: 850;
  letter-spacing: 0.14em;
}

.brand img {
  width: 40px;
  height: 40px;
}

.top-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 22px;
  color: var(--mint-dark);
  font-size: 0.95rem;
  text-align: right;
}

.top-nav a {
  font-weight: 700;
  border-bottom: 1px solid transparent;
}

.top-nav a:hover,
.top-nav a[aria-current="page"] {
  color: var(--mint-dark);
  border-color: var(--mint);
}

.hero {
  min-height: calc(100vh - 78px);
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  gap: clamp(52px, 8vw, 112px);
  align-items: center;
  padding: 48px 0 70px;
}

.hero-copy {
  transition: transform 420ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.kicker {
  margin: 0 0 18px;
  color: var(--mint-dark);
  font-size: 0.82rem;
  font-weight: 850;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 7ch;
  margin-bottom: 24px;
  font-size: clamp(3.5rem, 12vw, 8.8rem);
  line-height: 0.86;
  letter-spacing: 0;
}

.lede {
  max-width: 590px;
  margin-bottom: 30px;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.25rem);
}

.logo-map {
  position: relative;
  width: min(100%, 500px);
  aspect-ratio: 1.045;
  margin-left: auto;
  filter: drop-shadow(var(--shadow));
}

.interactive-logo {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
}

.logo-piece {
  color: inherit;
  cursor: pointer;
  outline: none;
}

.piece-body,
.branch,
.branch-center {
  transition:
    opacity 260ms ease,
    stroke-width 260ms ease,
    transform 420ms cubic-bezier(0.2, 0.8, 0.2, 1),
    fill 260ms ease;
  transform-box: view-box;
}

.hex-fill {
  fill: #49b99f;
  stroke: rgba(5, 95, 76, 0.16);
  stroke-width: 1.5;
}

.piece-calculators .hex-fill {
  fill: #4bbda5;
}

.piece-toys .hex-fill {
  fill: #4fc0a8;
}

.piece-label {
  pointer-events: none;
}

.piece-label text {
  fill: rgba(225, 255, 247, 0.973);
  font-size: 13px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-anchor: middle;
  text-transform: uppercase;
  pointer-events: none;
}

.logo-branches {
  pointer-events: none;
}

.branch {
  stroke: #0a7a61;
  stroke-linecap: butt;
  stroke-width: 22;
}

.branch-center {
  fill: #0a7a61;
  stroke: #0a7a61;
  stroke-width: 0;
}

.logo-map[data-active="calculators"] .piece-calculators .piece-body {
  transform: translate(38px, -38px);
}

.logo-map[data-active="toys"] .piece-toys .piece-body {
  transform: translate(38px, 38px);
}

.logo-map[data-active="social"] .piece-social .piece-body {
  transform: translate(-46px, 0);
}

.logo-map[data-active="calculators"] .branch-calculators,
.logo-map[data-active="calculators"] .branch-right,
.logo-map[data-active="toys"] .branch-toys,
.logo-map[data-active="toys"] .branch-right,
.logo-map[data-active="social"] .branch-calculators,
.logo-map[data-active="social"] .branch-toys {
  opacity: 1;
  stroke: #0a7a61;
  stroke-width: 12;
}

.logo-map[data-active] .branch-center {
  fill: #0a7a61;
  opacity: 1;
  stroke: #0a7a61;
  transition: fill 260ms ease;
  transform: none;
  transform-origin: 255px 220px;
}

.logo-piece:hover ~ .logo-branches .branch-center,
.logo-piece:focus-visible ~ .logo-branches .branch-center {
  fill: #0a7a61;
  opacity: 1;
  stroke: #0a7a61;
  transition: fill 260ms ease;
  transform: none;
}

.logo-piece:focus-visible .hex-fill {
  stroke: rgba(21, 26, 24, 0.38);
  stroke-width: 3;
}

@media (min-width: 881px) {
  .hero[data-active="social"] .hero-copy {
    transform: translateX(-88px);
  }
}

.page-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 230px;
  gap: clamp(26px, 7vw, 86px);
  align-items: center;
  padding: 58px 0 46px;
}

.page-hero h1 {
  max-width: 10ch;
  font-size: clamp(3rem, 8vw, 6.6rem);
}

.page-logo {
  justify-self: end;
  width: 220px;
  filter: drop-shadow(var(--shadow));
}

@media (min-width: 881px) {
  .page-hero.calculator-index-hero {
    --page-logo-shift: -2px;
  }

  .calculator-index-hero > div {
    margin-top: clamp(14px, 1.8vw, 28px);
  }
}

.store-directory {
  display: grid;
  grid-template-columns: minmax(0, 0.62fr) minmax(480px, 1fr);
  gap: clamp(28px, 6vw, 70px);
  align-items: stretch;
  padding: 44px 0 20px;
  border-top: 0;
}

.store-directory h2 {
  max-width: 9ch;
  margin-bottom: 16px;
  color: var(--ink);
  font-size: clamp(2rem, 4vw, 3.35rem);
  line-height: 0.98;
}

.store-directory p {
  max-width: 360px;
  color: var(--muted);
}

.store-links {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(18px, 2.4vw, 30px);
  align-items: center;
  justify-content: flex-end;
}

.store-badge-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.store-badge-link:hover,
.store-badge-link:focus-visible {
  opacity: 1;
  transform: translateY(-3px);
}

.store-badge {
  width: auto;
  max-width: 100%;
  height: clamp(62px, 4.8vw, 78px);
  transition: filter 180ms ease;
}

.store-badge-link:hover .store-badge,
.store-badge-link:focus-visible .store-badge {
  filter:
    drop-shadow(0 0 5px rgba(94, 226, 205, 0.82))
    drop-shadow(0 0 16px rgba(94, 226, 205, 0.46))
    drop-shadow(0 0 34px rgba(94, 226, 205, 0.28));
}

.flavor-section {
  padding: 0 0 58px;
}

.flavor-shell {
  padding: clamp(28px, 4vw, 44px);
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.flavor-heading {
  margin-bottom: clamp(28px, 4vw, 42px);
  text-align: center;
}

.flavor-heading h2 {
  display: inline-flex;
  align-items: center;
  gap: clamp(18px, 3vw, 36px);
  margin: 0;
  color: var(--mint-dark);
  font-size: 0.95rem;
  font-weight: 850;
  letter-spacing: 0.28em;
  line-height: 1.2;
  text-transform: uppercase;
}

.flavor-heading h2::before,
.flavor-heading h2::after {
  content: "";
  width: clamp(90px, 16vw, 210px);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(14, 114, 95, 0.45));
}

.flavor-heading h2::after {
  background: linear-gradient(90deg, rgba(14, 114, 95, 0.45), transparent);
}

.flavor-grid {
  display: grid;
  grid-template-columns: repeat(16, minmax(0, 1fr));
  gap: clamp(18px, 2.5vw, 28px);
}

.flavor-card {
  grid-column: span 4;
  min-width: 210px;
  min-height: 260px;
  display: grid;
  justify-items: center;
  align-content: start;
  padding: clamp(22px, 3vw, 30px) 20px 26px;
  border: 1px solid rgba(14, 114, 95, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.34);
  text-align: center;
  box-shadow: 0 12px 34px rgba(29, 42, 38, 0.05);
}

.flavor-card:nth-child(1) {
  grid-column: 3 / span 4;
}

.flavor-card:nth-child(2) {
  grid-column: 7 / span 4;
}

.flavor-card:nth-child(3) {
  grid-column: 11 / span 4;
}

.flavor-card h3 {
  margin: 20px 0 8px;
  color: var(--mint-dark);
  font-size: clamp(1.05rem, 1.7vw, 1.25rem);
  line-height: 1.15;
}

.flavor-card p {
  max-width: 24ch;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.45;
}

.reveal-ready .flavor-card[data-flavor-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 720ms cubic-bezier(0.18, 0.82, 0.22, 1),
    transform 720ms cubic-bezier(0.18, 0.82, 0.22, 1);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}

.reveal-ready .flavor-card[data-flavor-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

.flavor-icon {
  width: clamp(104px, 8vw, 132px);
  height: clamp(92px, 7vw, 118px);
  display: block;
  object-fit: fill;
  filter: drop-shadow(0 10px 18px rgba(8, 13, 11, 0.22));
}

.calculator-web-section {
  display: grid;
  grid-template-columns: minmax(0, 0.5fr) minmax(520px, 1.18fr);
  gap: clamp(24px, 5vw, 62px);
  align-items: stretch;
  padding: 52px 0 22px;
  border-top: 0;
}

.calculator-web-section.is-inverted {
  grid-template-columns: minmax(520px, 1.18fr) minmax(0, 0.5fr);
}

.calculator-web-section.is-inverted .calculator-web-copy {
  order: 2;
}

.calculator-web-section.is-inverted .calculator-web-card,
.calculator-web-section.is-inverted .calculator-frame-shell {
  order: 1;
}

.calculator-web-copy h2 {
  max-width: 12ch;
  margin-bottom: 16px;
  color: var(--ink);
  font-size: clamp(2.35rem, 5.1vw, 4.75rem);
  line-height: 0.98;
}

.calculator-web-copy p {
  max-width: 370px;
  color: var(--muted);
}

.calculator-web-card {
  position: relative;
  overflow: hidden;
  display: grid;
  align-content: start;
  gap: 12px;
  min-height: clamp(390px, 40vw, 580px);
  padding: clamp(26px, 4vw, 44px);
  border: 1px solid rgba(14, 114, 95, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 16px 44px rgba(29, 42, 38, 0.08);
  transition:
    border-color 180ms ease,
    transform 180ms ease,
    box-shadow 180ms ease;
}

.calculator-web-card:hover {
  border-color: rgba(14, 114, 95, 0.42);
  box-shadow: 0 20px 54px rgba(29, 42, 38, 0.12);
  transform: translateY(-3px);
}

.reveal-ready .calculator-web-copy[data-calculator-reveal],
.reveal-ready .calculator-web-card[data-calculator-reveal] {
  --calculator-reveal-opacity: 0;
  --calculator-reveal-x: -58px;
  --calculator-reveal-y: 0px;
  opacity: var(--calculator-reveal-opacity);
  transform: translateX(var(--calculator-reveal-x)) translateY(var(--calculator-reveal-y));
  transition:
    opacity 90ms linear,
    transform 90ms linear,
    border-color 180ms ease,
    box-shadow 180ms ease;
  transition-delay: 0ms;
  will-change: opacity, transform;
}

.reveal-ready .calculator-web-card[data-calculator-reveal],
.reveal-ready .calculator-web-section.is-inverted .calculator-web-copy[data-calculator-reveal] {
  --calculator-reveal-x: 58px;
}

.reveal-ready .calculator-web-copy[data-calculator-reveal].is-visible,
.reveal-ready .calculator-web-card[data-calculator-reveal].is-visible,
.reveal-ready .calculator-web-section.is-inverted .calculator-web-copy[data-calculator-reveal].is-visible,
.reveal-ready .calculator-web-section.is-inverted .calculator-web-card[data-calculator-reveal].is-visible {
  --calculator-reveal-opacity: 1;
  --calculator-reveal-x: 0px;
}

.reveal-ready .calculator-web-card[data-calculator-reveal].is-visible:hover,
.reveal-ready .calculator-web-card[data-calculator-reveal].is-visible:focus-visible {
  --calculator-reveal-y: -3px;
  transition-delay: 0ms;
}

.calculator-card-label {
  color: var(--coral);
  font-size: 0.8rem;
  font-weight: 850;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.calculator-web-card strong {
  color: #10231f;
  font-size: clamp(1.7rem, 3vw, 2.45rem);
  line-height: 1;
}

.calculator-web-card span:last-of-type {
  max-width: 42ch;
  color: var(--muted);
}

.calculator-preview-card {
  padding-bottom: clamp(210px, 25vw, 330px);
}

.calculator-card-preview {
  position: absolute;
  top: clamp(190px, 17vw, 240px);
  right: clamp(-58px, -3vw, -22px);
  bottom: auto;
  z-index: 0;
  width: min(66%, 620px);
  max-width: none;
  border-radius: 5px;
  box-shadow:
    0 8px 12px rgba(16, 30, 27, 0.16),
    0 18px 26px rgba(16, 30, 27, 0.14),
    0 34px 48px rgba(16, 30, 27, 0.08);
  pointer-events: none;
}

.calculator-web-section.is-inverted .calculator-preview-card {
  --inverted-preview-copy-width: min(100%, 360px);

  justify-items: end;
  text-align: left;
}

.calculator-web-section.is-inverted .calculator-preview-card > :not(.calculator-card-preview) {
  justify-self: end;
  width: var(--inverted-preview-copy-width);
}

.calculator-web-section.is-inverted .calculator-card-preview {
  right: auto;
  left: clamp(-58px, -3vw, -22px);
}

.calculator-web-section.is-inverted .calculator-preview-card strong {
  display: block;
  max-width: var(--inverted-preview-copy-width);
}

.calculator-web-section.is-inverted .calculator-preview-card span:last-of-type {
  max-width: var(--inverted-preview-copy-width);
}

.calculator-preview-card strong {
  max-width: 17ch;
}

.calculator-preview-card span:last-of-type {
  max-width: 31ch;
}

.calculator-preview-card > :not(.calculator-card-preview) {
  position: relative;
  z-index: 1;
}

.calculator-tool-hero h1 {
  max-width: 9ch;
}

.calculator-frame-shell {
  overflow: hidden;
  border: 1px solid rgba(14, 114, 95, 0.16);
  border-radius: 8px;
  background: #19201d;
  box-shadow: 0 18px 58px rgba(29, 42, 38, 0.14);
}

.calculator-frame {
  display: block;
  width: 100%;
  height: min(760px, 82vh);
  border: 0;
}

.section-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  padding: 38px 0 70px;
}

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

.tile {
  min-height: 220px;
  padding: 24px;
  border: 1px solid var(--line);
  border-top: 4px solid var(--mint);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 12px 34px rgba(29, 42, 38, 0.06);
}

.tile.gold {
  border-top-color: var(--gold);
}

.tile.coral {
  border-top-color: var(--coral);
}

.tile h2,
.tile h3 {
  margin-bottom: 10px;
  font-size: clamp(1.25rem, 2vw, 1.65rem);
  letter-spacing: 0;
}

.tile p {
  color: var(--muted);
}

.toy-preview-grid {
  width: min(100% - 40px, var(--max));
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  padding: 38px 0 76px;
}

.toy-preview-card {
  min-width: 0;
  min-height: 390px;
  display: flex;
  flex-direction: column;
  padding: 22px;
  border: 1px solid rgba(14, 114, 95, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.42);
  box-shadow: 0 16px 36px rgba(29, 42, 38, 0.08);
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity 1050ms cubic-bezier(0.18, 0.82, 0.22, 1),
    transform 1050ms cubic-bezier(0.18, 0.82, 0.22, 1);
}

.js:not(.toy-previews-ready) .toy-preview-card {
  opacity: 0;
  transform: translateY(28px);
}

.toy-preview-card:nth-child(2) {
  transition-delay: 260ms;
}

.toy-preview-card:nth-child(3) {
  transition-delay: 520ms;
}

.toy-preview-card h2 {
  margin-bottom: 10px;
  font-size: clamp(1.65rem, 3vw, 2.15rem);
}

.toy-preview-card p:not(.kicker) {
  color: var(--muted);
}

.toy-button {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid rgba(14, 114, 95, 0.3);
  border-radius: 6px;
  color: var(--mint-dark);
  font-weight: 800;
}

.toy-button:hover {
  border-color: var(--mint-dark);
  background: rgba(255, 255, 255, 0.48);
}

.toy-mock {
  height: 150px;
  min-width: 0;
  margin-bottom: 22px;
  border: 1px solid rgba(14, 114, 95, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.3);
}

.morse-mock {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 12px;
  overflow: hidden;
  padding: 20px;
}

.morse-mock span {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.morse-mock i {
  display: block;
  height: 10px;
  border-radius: 999px;
  background: #10231f;
}

.morse-mock .dot {
  width: 10px;
}

.morse-mock .dash {
  width: 34px;
}

.qr-mock {
  display: grid;
  place-items: center;
  padding: 16px;
  color: var(--mint-dark);
}

.qr-mock img {
  width: 112px;
  height: 112px;
}

.qr-mock:hover {
  border-color: rgba(14, 114, 95, 0.34);
  background: rgba(255, 255, 255, 0.42);
}

.draw-mock {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.roulette-wheel {
  width: 118px;
  height: 118px;
  border-radius: 50%;
  background:
    conic-gradient(
      from -22deg,
      #49b99f 0 45deg,
      #0a7a61 45deg 90deg,
      #4fc0a8 90deg 135deg,
      #2d806e 135deg 180deg,
      #49b99f 180deg 225deg,
      #0a7a61 225deg 270deg,
      #4fc0a8 270deg 315deg,
      #2d806e 315deg 360deg
    );
  box-shadow: 0 18px 36px rgba(29, 42, 38, 0.12);
}

.roulette-center {
  position: absolute;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #10231f;
  color: #e8f4ef;
  font-weight: 900;
}

.roulette-pointer {
  position: absolute;
  top: 16px;
  width: 0;
  height: 0;
  border-right: 12px solid transparent;
  border-left: 12px solid transparent;
  border-top: 22px solid #10231f;
  z-index: 2;
}

.link-list {
  display: grid;
  gap: 0;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.link-list a {
  position: relative;
  display: block;
  padding: 12px 28px 12px 0;
  border-top: 1px solid var(--line);
  font-weight: 720;
}

.link-list li:last-child a {
  border-bottom: 1px solid var(--line);
}

.link-list a::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 3px;
  width: 8px;
  height: 8px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: translateY(-50%) rotate(45deg);
  opacity: 0.55;
}

.link-list a:hover {
  color: var(--mint-dark);
}

.news-strip {
  display: grid;
  grid-template-columns: 0.75fr 1fr 1fr;
  gap: clamp(20px, 4vw, 44px);
  padding: 28px 0 70px;
}

.news-strip h2 {
  margin-bottom: 10px;
  font-size: clamp(1.7rem, 4vw, 2.8rem);
  line-height: 1;
}

.news-strip p {
  color: var(--muted);
}

.news-item {
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.news-item time {
  display: block;
  margin-bottom: 10px;
  color: var(--mint-dark);
  font-size: 0.82rem;
  font-weight: 850;
  letter-spacing: 0.12em;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 26px 0 34px;
  color: var(--muted);
  font-size: 0.95rem;
  border-top: 1px solid var(--line);
}

.site-footer a {
  color: var(--ink);
  font-weight: 750;
}

@media (max-width: 980px) {
  main {
    overflow-x: hidden;
  }

  .hero,
  .page-hero,
  .store-directory,
  .flavor-section,
  .calculator-web-section,
  .section-grid,
  .section-grid.two,
  .toy-preview-grid,
  .news-strip {
    grid-template-columns: 1fr;
  }

  .calculator-web-section,
  .calculator-web-section.is-inverted {
    overflow-x: hidden;
    grid-template-columns: 1fr;
  }

  .calculator-web-section.is-inverted .calculator-web-copy,
  .calculator-web-section.is-inverted .calculator-web-card,
  .calculator-web-section.is-inverted .calculator-frame-shell {
    order: initial;
  }

  .hero {
    min-height: 0;
    padding-top: 34px;
  }

  .logo-map {
    margin: 0 auto;
  }

  .page-logo {
    justify-self: start;
    width: 180px;
  }

  .store-directory {
    grid-template-columns: 1fr;
  }

  .store-links {
    justify-content: center;
  }

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

  .flavor-card {
    grid-column: auto;
    min-width: 0;
  }

  .flavor-card:nth-child(1),
  .flavor-card:nth-child(2),
  .flavor-card:nth-child(3) {
    grid-column: auto;
  }

  .store-directory h2,
  .store-directory p,
  .calculator-web-copy h2,
  .calculator-web-copy p {
    max-width: 100%;
  }

  .calculator-preview-card {
    width: 100%;
    min-height: 520px;
    padding-bottom: 280px;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
  }

  .calculator-card-preview {
    top: auto;
    right: 24px;
    bottom: 24px;
    width: min(62%, 520px);
  }

  .calculator-web-copy,
  .calculator-web-card {
    min-width: 0;
    max-width: 100%;
  }

  .calculator-web-section.is-inverted .calculator-card-preview {
    right: auto;
    left: 24px;
  }
}

@media (min-width: 881px) and (max-width: 980px) {
  .store-directory,
  .calculator-web-section,
  .calculator-web-section.is-inverted {
    grid-template-columns: 1fr;
  }

  .calculator-web-section.is-inverted .calculator-web-copy,
  .calculator-web-section.is-inverted .calculator-web-card,
  .calculator-web-section.is-inverted .calculator-frame-shell {
    order: initial;
  }

  .store-links {
    justify-content: flex-start;
  }

  .calculator-preview-card {
    min-width: 0;
    max-width: 100%;
  }
}

@media (max-width: 560px) {
  .site-header,
  .hero,
  .page-hero,
  .store-directory,
  .flavor-section,
  .calculator-web-section,
  .section-grid,
  .toy-preview-grid,
  .news-strip,
  .site-footer {
    width: min(calc(100% - 28px), var(--max));
  }

  .site-header,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .top-nav {
    align-self: flex-end;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 12px 16px;
  }

  .piece-label text {
    font-size: 11.5px;
  }

  .store-links {
    justify-content: flex-start;
  }

  .store-directory h2 {
    max-width: 9ch;
  }

  .store-directory p {
    max-width: 32ch;
  }

  .flavor-shell {
    padding: 24px 16px;
  }

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

  .flavor-heading h2 {
    display: block;
  }

  .flavor-heading h2::before,
  .flavor-heading h2::after {
    display: none;
  }

  .flavor-card {
    min-height: 0;
  }

  .flavor-card:nth-child(1),
  .flavor-card:nth-child(2),
  .flavor-card:nth-child(3) {
    grid-column: auto;
  }

  .calculator-web-section,
  .calculator-web-section.is-inverted {
    grid-template-columns: 1fr;
  }

  .calculator-preview-card {
    min-height: 520px;
  }

  .calculator-card-preview {
    right: 20px;
    bottom: 24px;
    width: calc(100% - 40px);
  }

  .calculator-web-section.is-inverted .calculator-card-preview {
    right: auto;
    left: 20px;
  }

  .calculator-frame {
    height: 680px;
  }

  .store-badge {
    height: 52px;
  }

  .page-hero {
    gap: 24px;
    padding: 36px 0 34px;
  }

  .page-hero h1 {
    max-width: 7.8ch;
    font-size: clamp(3.7rem, 18vw, 5rem);
    line-height: 0.9;
  }

  .page-hero .lede {
    max-width: 30ch;
    font-size: clamp(1.05rem, 4.4vw, 1.25rem);
  }

  .page-logo {
    width: min(76vw, 300px);
    justify-self: center;
  }

  .calculator-index-hero .page-logo {
    display: none;
  }

  .store-directory {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 30px 0 24px;
  }

  .store-directory h2 {
    max-width: 9ch;
  }

  .store-directory p {
    max-width: 30ch;
    font-size: clamp(1.05rem, 4.3vw, 1.2rem);
  }

  .store-links {
    display: grid;
    grid-template-columns: 1fr;
    justify-items: center;
    justify-content: center;
    gap: 18px;
  }

  .store-badge-link {
    width: min(100%, 280px);
    display: block;
  }

  .store-badge {
    width: 100%;
    height: auto;
    max-height: none;
  }

  .flavor-section {
    padding-top: 18px;
  }

  .flavor-shell {
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

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

  .flavor-card {
    width: 100%;
    min-height: auto;
    padding: 24px 18px;
  }

  .flavor-icon {
    width: 150px;
    height: 120px;
    object-fit: contain;
  }

  .calculator-web-section {
    gap: 22px;
    padding: 38px 0 22px;
    overflow-x: hidden;
  }

  .calculator-web-copy,
  .calculator-web-card {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  .calculator-web-copy h2 {
    max-width: 8.4ch;
    font-size: clamp(3.2rem, 15vw, 4.4rem);
    line-height: 0.92;
  }

  .calculator-web-copy p {
    max-width: 28ch;
    font-size: 1.05rem;
  }

  .calculator-preview-card {
    display: flex;
    min-height: 0;
    padding: 26px 20px 20px;
    flex-direction: column;
    gap: 14px;
  }

  .calculator-preview-card strong {
    max-width: 8.5ch;
    font-size: clamp(2.2rem, 10vw, 3rem);
    line-height: 0.96;
  }

  .calculator-preview-card span:last-of-type {
    max-width: 28ch;
  }

  .calculator-card-preview,
  .calculator-web-section.is-inverted .calculator-card-preview {
    position: relative;
    inset: auto;
    width: calc(100% - 40px);
    margin: 8px auto 0;
    align-self: center;
  }

  .calculator-frame {
    min-height: 580px;
    height: calc(100svh - 72px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .piece-body,
  .branch,
  .branch-center,
  .hero-copy {
    transition-duration: 1ms;
  }

  .reveal-ready .flavor-card[data-flavor-reveal],
  .reveal-ready .calculator-web-copy[data-calculator-reveal],
  .reveal-ready .calculator-web-card[data-calculator-reveal] {
    transition-duration: 1ms;
    transition-delay: 0ms;
  }

  .toy-preview-card {
    transition-duration: 1ms;
    transition-delay: 0ms;
  }
}
