/* Return on Tokens: page-scoped design.
   Inherits Spline Sans / Piazzolla and site tokens from typography.css,
   colors.css, and spacing.css. Only page-unique styles live here. */

.rot {
  --rot-ink-deep: var(--color-cta-background);
  --rot-mint: #E9F2EC;
  --rot-mint-line: #D5E4DA;
  --rot-cream: #FDFCF8;
  --rot-green-bright: #7EE0AE;
  --rot-green-muted: #9FC5B2;
  --rot-fg-soft: #7EA890;
  --rot-fg-note: #DCEDE3;
  --rot-fg-overlay: #EAF4EE;
  --rot-radius: 18px;
  --rot-font-mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, monospace;
  color: var(--color-text);
  background: var(--rot-cream);
}

.rot .rot-wrap {
  max-width: 1060px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.rot a:not(.btn) { color: var(--color-accent-dark); }

/* Bucket cards (three-up under the hero) */
.rot-buckets {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
  margin: var(--space-2xl) 0 0;
}
.rot-bucket {
  background: var(--color-background);
  border: 1px solid var(--rot-mint-line);
  border-radius: var(--rot-radius);
  padding: var(--space-lg) var(--space-lg);
}
.rot-bucket .rot-stat {
  font-family: var(--font-family-sans);
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-4-5xl);
  color: var(--rot-ink-deep);
  letter-spacing: -0.02em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.rot-bucket-title {
  font-family: var(--font-family-headers);
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-black);
  color: var(--color-text);
  margin: var(--space-sm) 0 var(--space-xs);
}
.rot-bucket p {
  font-size: var(--font-size-base);
  color: var(--color-text-secondary);
  line-height: var(--line-height-normal);
  margin: 0;
}

/* Sections */
.rot-section { padding: var(--space-3xl) 0; }
.rot-section.rot-alt {
  background: var(--color-background);
  border-top: 1px solid var(--rot-mint-line);
  border-bottom: 1px solid var(--rot-mint-line);
}
/* Two-column split: text block + pull-stat figure.
   Alternating layout swaps the column order on .rot-right sections. */
.rot-split {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
  align-items: center;
}
@media (min-width: 900px) {
  .rot-split {
    grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
    gap: var(--space-2xl);
  }
  .rot-section.rot-right .rot-split .rot-split-text { order: 2; }
  .rot-section.rot-right .rot-split .rot-split-figure { order: 1; }
}
.rot-split-text > *:last-child { margin-bottom: 0; }
.rot-pullstat {
  text-align: center;
  padding: var(--space-xl) 0;
}
.rot-pullstat-num {
  font-family: var(--font-family-headers);
  font-weight: var(--font-weight-black);
  font-size: 96px;
  color: var(--rot-ink-deep);
  line-height: 0.95;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
@media (min-width: 900px) {
  .rot-pullstat-num { font-size: 132px; }
}
.rot-pullstat-label {
  font-family: var(--font-family-sans);
  font-weight: var(--font-weight-semibold);
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  margin-top: var(--space-md);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.rot-section h2 {
  font-family: var(--font-family-headers);
  font-weight: var(--font-weight-black);
  font-size: var(--font-size-3xl);
  line-height: var(--line-height-tight);
  letter-spacing: -0.01em;
  color: var(--color-text);
  margin: 0 0 var(--space-md);
}
@media (min-width: 900px) {
  .rot-section h2 { font-size: var(--font-size-4-5xl); }
}
.rot h3.rot-sub {
  font-family: var(--font-family-headers);
  font-weight: var(--font-weight-black);
  font-size: var(--font-size-xl);
  color: var(--color-text);
  margin: var(--space-xl) 0 var(--space-sm);
}
.rot-section p {
  max-width: 66ch;
  margin: 0 0 var(--space-sm);
  font-size: var(--font-size-base);
  line-height: var(--line-height-normal);
  color: var(--color-text-secondary);
}
.rot-section p strong { color: var(--color-text); font-weight: var(--font-weight-semibold); }
.rot-footnote {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
}

/* Dark deck-styled band */
.rot-deckband { background: var(--rot-ink-deep); }
.rot-deckband h2 { color: #F2FAF5; }
.rot-deckband > .rot-wrap > p { color: var(--rot-fg-note); }
.rot-uc-group { margin-top: var(--space-4xl); }
.rot-uc-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
  flex-wrap: wrap;
}
.rot-uc-head h3 {
  font-family: var(--font-family-headers);
  font-weight: var(--font-weight-black);
  font-size: var(--font-size-3xl);
  color: #F2FAF5;
  letter-spacing: -0.015em;
  line-height: 1.15;
  margin: 0;
}
@media (min-width: 900px) {
  .rot-uc-head h3 { font-size: var(--font-size-4xl); }
}
.rot-uc-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.rot-uc-cards.rot-two { grid-template-columns: repeat(2, 1fr); }
.rot-uc-card {
  position: relative;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.rot-uc-card--lead {
  background: rgba(126, 224, 174, 0.055);
  border-color: rgba(126, 224, 174, 0.28);
}
.rot-uc-card--lead .rot-name { color: var(--rot-green-bright); }
.rot-uc-card .rot-name {
  font-family: var(--rot-font-mono);
  font-weight: var(--font-weight-semibold);
  font-size: 11.5px;
  line-height: 1.2;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--rot-fg-soft);
  margin-bottom: var(--space-lg);
  padding-right: 36px;
}

/* Info toggle: injected by uc-info.js only when JS runs.
   The .is-enhanced flag on .rot-deckband hides the notes as overlays. */
.rot-uc-info {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.06);
  color: #A9C9B8;
  font-family: var(--font-family-headers);
  font-style: italic;
  font-weight: var(--font-weight-black);
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  z-index: 3;
}
.rot-uc-info:hover,
.rot-uc-info:focus-visible {
  background: rgba(126, 224, 174, 0.14);
  border-color: rgba(126, 224, 174, 0.5);
  color: var(--rot-green-bright);
}
.rot-uc-card.is-open .rot-uc-info {
  color: var(--rot-green-bright);
  border-color: rgba(126, 224, 174, 0.6);
  font-style: normal;
}
.rot-deckband.is-enhanced .rot-sp-note {
  position: absolute;
  inset: 0;
  margin: 0;
  padding: 22px 24px;
  border-radius: 14px;
  background: rgba(0, 30, 22, 0.97);
  color: var(--rot-fg-overlay);
  font-size: var(--font-size-sm);
  line-height: 1.55;
  display: flex;
  align-items: center;
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.18s ease, visibility 0.18s ease;
  z-index: 2;
}
.rot-deckband.is-enhanced .rot-uc-card.is-open .rot-sp-note {
  opacity: 1;
  visibility: visible;
}
.rot-statpair {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 10px;
  align-items: end;
  margin-top: auto;
}
.rot-sp-was .rot-sp-val {
  font-family: var(--font-family-sans);
  font-weight: var(--font-weight-semibold);
  font-size: var(--font-size-xl);
  color: #E0A45F;
  letter-spacing: -0.01em;
  line-height: 1.15;
}
.rot-sp-with { text-align: right; }
.rot-sp-with .rot-sp-val {
  font-family: var(--font-family-sans);
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-2xl);
  color: var(--rot-green-bright);
  letter-spacing: -0.015em;
  line-height: 1.1;
}
.rot-sp-arrow {
  color: var(--rot-fg-soft);
  font-size: var(--font-size-xl);
  padding-bottom: 2px;
}
.rot-sp-note {
  font-size: 12.5px;
  color: #8FAF9E;
  margin-top: 10px;
  line-height: 1.45;
}


/* Tables */
.rot table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--space-md) 0 var(--space-xs);
  background: var(--color-background);
  border: 1px solid var(--rot-mint-line);
  border-radius: 12px;
  overflow: hidden;
  font-size: var(--font-size-base);
}
.rot th {
  font-family: var(--font-family-sans);
  text-align: left;
  font-weight: var(--font-weight-semibold);
  color: var(--color-text);
  background: var(--rot-mint);
  padding: var(--space-sm) var(--space-md);
  font-size: var(--font-size-sm);
}
.rot td {
  padding: var(--space-sm) var(--space-md);
  border-top: 1px solid var(--rot-mint-line);
  font-variant-numeric: tabular-nums;
  color: var(--color-text);
}
.rot td.rot-num { font-weight: var(--font-weight-semibold); }
.rot tr.rot-total td {
  font-weight: var(--font-weight-bold);
  background: #F6FAF7;
}

/* Calculator */
.rot-calc {
  background: var(--rot-ink-deep);
  border-radius: 24px;
  padding: 40px;
  color: var(--rot-fg-overlay);
  margin-top: var(--space-xs);
}
.rot-calc h2 { color: #fff; }
.rot-calc .rot-lede {
  color: #BFD8CB;
  max-width: 60ch;
  margin: 0;
  font-size: var(--font-size-lg);
}
.rot-calc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-top: var(--space-xl);
}
.rot-field { margin-bottom: 22px; }
.rot-field label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-family: var(--font-family-sans);
  font-weight: var(--font-weight-semibold);
  font-size: var(--font-size-base);
  color: var(--rot-fg-note);
  margin-bottom: var(--space-sm);
}
.rot-field label output {
  font-variant-numeric: tabular-nums;
  font-weight: var(--font-weight-bold);
  color: #fff;
}
.rot-field-sub {
  font-size: 13px;
  color: #BFD8CB;
  margin: -4px 0 8px;
  line-height: 1.4;
}
.rot-calc input[type="range"] {
  width: 100%;
  accent-color: #6FCF97;
  height: 6px;
  cursor: pointer;
}
.rot-results { display: flex; flex-direction: column; gap: 14px; }
.rot-result {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  padding: 16px 20px;
}
.rot-result .rot-result-label {
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--rot-green-muted);
  font-family: var(--font-family-sans);
  font-weight: var(--font-weight-semibold);
}
.rot-result .rot-result-value {
  font-family: var(--font-family-sans);
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-2xl);
  color: #fff;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}
.rot-result-sub {
  font-family: var(--rot-font-mono);
  font-size: 12.5px;
  color: var(--rot-green-muted);
  margin-top: 6px;
  line-height: 1.45;
}
.rot-result.rot-total { background: #fff; border-color: #fff; }
.rot-result.rot-total .rot-result-label { color: var(--color-accent-dark); }
.rot-result.rot-total .rot-result-value {
  color: var(--rot-ink-deep);
  font-size: var(--font-size-3xl);
}
.rot-calc .rot-footnote { color: var(--rot-green-muted); margin-top: var(--space-md); }

/* Responsive */
@media (max-width: 900px) {
  .rot-uc-cards,
  .rot-uc-cards.rot-two { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 800px) {
  .rot-buckets { grid-template-columns: 1fr; }
  .rot-calc-grid { grid-template-columns: 1fr; }
  .rot-calc { padding: 28px 22px; }
  .rot-section { padding: var(--space-2xl) 0; }
}
@media (max-width: 620px) {
  .rot-uc-cards,
  .rot-uc-cards.rot-two { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .rot *,
  .rot *::before,
  .rot *::after {
    animation: none !important;
    transition: none !important;
  }
}
