/* Steady Cents: "Loose change, leveled."
   One dark bottle-green theme: copper cents on felt, receipt-white type.
   Sections: tokens and base / the scroll film engine / the site / the app (board + report). */

/* ---------- Fonts (self-hosted under /static/site/fonts) ---------- */
@font-face {
  font-family: "Cabinet Grotesk";
  src: url("/static/site/fonts/cabinet-grotesk-800.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Cabinet Grotesk";
  src: url("/static/site/fonts/cabinet-grotesk-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter Tight";
  src: url("/static/site/fonts/inter-tight-latin-ext.woff2") format("woff2");
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Inter Tight";
  src: url("/static/site/fonts/inter-tight-latin.woff2") format("woff2");
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Tokens and base ---------- */
:root {
  --sc-felt: #12352c;
  --sc-vault: #0c2721;
  --sc-raised: #1a4337;
  --sc-ink: #eef2e8;
  --sc-mist: #d3ddd5;
  --sc-sage: #a8bdb0;
  --sc-penny: #d98a55;
  --sc-penny-deep: #ad6234;
  --sc-penny-edge: #7f4422;
  --sc-penny-glint: #f2c49f;
  --sc-paper: #f4f6ef;
  --sc-paper-ink: #0c2721;
  --sc-paper-soft: #4f6a5d;
  --sc-paper-line: #b9c8be;
  --sc-good: #1f6f4a;
  --sc-bad: #a8431f;
  --sc-line: rgb(238 242 232 / 0.14);
  --sc-shade: rgb(12 39 33 / 0.7);
  --sc-display: "Cabinet Grotesk", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --sc-text: "Inter Tight", "Segoe UI", system-ui, -apple-system, sans-serif;
  --sc-mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  /* Chart series, validated on the felt (dark band, >= 3:1, CVD-separated); print swaps in light steps */
  --viz-real: #eef2e8;
  --viz-plan: #cd7c47;
  --viz-alt: #9085e9;
  --viz-grid: rgb(238 242 232 / 0.09);
  --viz-axis: rgb(238 242 232 / 0.34);
  --viz-cushion: rgb(168 189 176 / 0.6);
  --viz-surface: #12352c;
  --viz-good: #0ca30c;
  --viz-warn: #ec835a;
  --sc-gutter: clamp(1.25rem, 5vw, 5rem);
  --sc-ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  background: var(--sc-felt);
  -webkit-text-size-adjust: 100%;
}
body.sc-body {
  margin: 0;
  background: var(--sc-felt);
  color: var(--sc-ink);
  font-family: var(--sc-text);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img {
  max-width: 100%;
}
.sc-body ::selection {
  background: var(--sc-penny);
  color: var(--sc-vault);
}
.sc-body :focus-visible {
  outline: 2px solid var(--sc-penny);
  outline-offset: 3px;
}
.sc-body h1,
.sc-body h2,
.sc-body h3 {
  text-wrap: balance;
}
.sc-body p,
.sc-body dd,
.sc-body li {
  text-wrap: pretty;
}
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- The scroll film engine (layout contract for scrub.js) ---------- */
.scroll-scrub {
  --ss-progress: 0;
  position: relative;
  isolation: isolate;
  color: var(--ss-ink);
  background: var(--ss-bg);
}
.scroll-scrub__stage {
  position: sticky;
  top: 0;
  z-index: 0;
  width: 100%;
  height: 100dvh;
  overflow: hidden;
  background: var(--ss-bg);
}
.scroll-scrub__media,
.scroll-scrub__layer,
.scroll-scrub__picture,
.scroll-scrub__poster,
.scroll-scrub__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.scroll-scrub__media {
  z-index: 0;
}
.scroll-scrub__layer {
  margin: 0;
  overflow: hidden;
  opacity: 0;
  will-change: opacity;
}
.scroll-scrub__layer:first-child {
  opacity: 1;
}
.scroll-scrub__poster,
.scroll-scrub__video {
  display: block;
  object-fit: cover;
  object-position: var(--ss-object-position);
}
.scroll-scrub__poster {
  z-index: 0;
}
.scroll-scrub__video {
  z-index: 1;
}
.scroll-scrub__layer[data-video-painted="true"] .scroll-scrub__poster {
  visibility: hidden;
}
.scroll-scrub__progress {
  position: absolute;
  z-index: 5;
  top: 0;
  right: 0;
  left: 0;
  height: 2px;
  background: color-mix(in srgb, var(--ss-ink) 14%, transparent);
  pointer-events: none;
}
.scroll-scrub__progress span {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--ss-accent);
  transform: scaleX(var(--ss-progress));
  transform-origin: left center;
}
.scroll-scrub__route {
  position: absolute;
  z-index: 6;
  top: clamp(1rem, 3vw, 2rem);
  right: clamp(1rem, 4vw, 4rem);
  left: clamp(1rem, 4vw, 4rem);
  display: flex;
  justify-content: flex-end;
  gap: 0.25rem;
  pointer-events: auto;
}
.scroll-scrub__route-button {
  min-height: 2.75rem;
  padding: 0.65rem 0.9rem;
  border: 0;
  color: var(--ss-muted);
  background: transparent;
  font: inherit;
  cursor: pointer;
}
.scroll-scrub__route-button:focus-visible {
  outline: 2px solid var(--ss-accent);
  outline-offset: 3px;
}
.scroll-scrub__story {
  position: relative;
  z-index: 3;
  margin-top: -100dvh;
  overflow-x: clip; /* keeps the copy scrims from widening the page; clip keeps sticky working */
  pointer-events: none;
}
.scroll-scrub__chapter {
  position: relative;
}
.scroll-scrub__chapter-pin {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  min-height: 100dvh;
  padding: clamp(5rem, 9vw, 8rem) clamp(1.25rem, 6vw, 6rem);
  pointer-events: none;
}
.scroll-scrub__chapter[data-align="right"] .scroll-scrub__chapter-pin {
  justify-content: flex-end;
}
.scroll-scrub__copy {
  position: relative;
  width: min(40rem, 48vw);
  pointer-events: auto;
}
.scroll-scrub__copy::before {
  position: absolute;
  z-index: -1;
  inset: -3rem -5rem;
  content: "";
  background: radial-gradient(
    ellipse at center,
    color-mix(in srgb, var(--ss-bg) 88%, transparent) 0%,
    color-mix(in srgb, var(--ss-bg) 58%, transparent) 52%,
    transparent 76%
  );
  pointer-events: none;
}
.scroll-scrub__title {
  max-width: 14ch;
  margin: 0;
  color: var(--ss-ink);
  font-family: var(--sc-display);
  font-size: clamp(2.5rem, 5vw, 4.9rem);
  font-weight: 800;
  line-height: 0.96;
  letter-spacing: -0.03em;
}
.scroll-scrub__body {
  max-width: 40ch;
  margin: 1.5rem 0 0;
  color: var(--ss-muted);
  font-size: clamp(1.02rem, 1.25vw, 1.2rem);
  line-height: 1.55;
}
.scroll-scrub__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2.25rem;
}

/* ---------- The site ---------- */

/* Skip past the film */
.sc-skip {
  position: fixed;
  z-index: 60;
  top: -5rem;
  left: var(--sc-gutter);
  padding: 0.65rem 1.1rem;
  border-radius: 999px;
  background: var(--sc-penny);
  color: var(--sc-vault);
  font-weight: 600;
  text-decoration: none;
}
.sc-skip:focus {
  top: calc(env(safe-area-inset-top, 0px) + 0.75rem);
}

/* Nav */
.sc-nav {
  position: fixed;
  z-index: 40;
  top: 0;
  right: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: calc(env(safe-area-inset-top, 0px) + clamp(0.85rem, 2vw, 1.35rem)) var(--sc-gutter) 1.4rem;
  background: linear-gradient(to bottom, rgb(12 39 33 / 0.86), rgb(12 39 33 / 0));
  pointer-events: none;
}
.sc-nav > * {
  pointer-events: auto;
}
.sc-wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--sc-ink);
  font-family: var(--sc-display);
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.015em;
  line-height: 1;
  text-decoration: none;
}
.sc-wordmark img {
  flex: none;
  width: 2.1rem;
  height: 2.1rem;
}

/* Groove link: "Open the app" */
.sc-groove {
  position: relative;
  display: inline-block;
  padding-block: 0.35rem 0.7rem;
  color: var(--sc-ink);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.sc-groove::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 0.36rem;
  border-radius: 999px;
  content: "";
  background: repeating-linear-gradient(90deg, var(--sc-penny) 0 2px, transparent 2px 5px);
  box-shadow: inset 0 0 0 1px rgb(217 138 85 / 0.35);
  transition: background-position 0.7s var(--sc-ease-out);
}
.sc-groove:hover::after,
.sc-groove:focus-visible::after {
  background-position: 45px 0;
}

/* Journey chapters: hero sizing and the on-load build */
.sc-journey #start .scroll-scrub__copy {
  width: min(56rem, 64vw);
}
.sc-journey #start .scroll-scrub__title {
  max-width: 16ch;
  font-size: clamp(2.8rem, 6vw, 5.8rem);
  animation: sc-rise 1.2s var(--sc-ease-out) both;
}
.sc-journey #start .scroll-scrub__body {
  animation: sc-rise 1.2s 0.12s var(--sc-ease-out) both;
}
.sc-journey #start .scroll-scrub__actions {
  animation: sc-rise 1.2s 0.24s var(--sc-ease-out) both;
}
.sc-journey #start .scroll-scrub__copy::before {
  background: radial-gradient(
    ellipse at 40% 50%,
    color-mix(in srgb, var(--ss-bg) 92%, transparent) 0%,
    color-mix(in srgb, var(--ss-bg) 70%, transparent) 50%,
    transparent 78%
  );
}
/* The last chapter's film frame is busiest up top (the level across the stacks),
   so its copy settles into the dark floor below them. */
@media (min-width: 861px) {
  .sc-journey #steady .scroll-scrub__chapter-pin {
    align-items: flex-end;
    padding-bottom: clamp(6.5rem, 14vh, 9.5rem);
  }
}
@keyframes sc-rise {
  from {
    transform: translate3d(0, 0.55em, 0);
  }
  to {
    transform: translate3d(0, 0, 0);
  }
}

/* Chapter route: a level vial, the active chapter is the bubble */
.sc-journey .scroll-scrub__route {
  top: auto;
  right: auto;
  bottom: calc(env(safe-area-inset-bottom, 0px) + clamp(1rem, 3vh, 1.75rem));
  left: 50%;
  justify-content: center;
  gap: 0.15rem;
  padding: 0.3rem;
  border-radius: 999px;
  background: var(--sc-shade);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: inset 0 0 0 1px var(--sc-line);
  transform: translateX(-50%);
}
.sc-journey .scroll-scrub__route::before {
  position: absolute;
  top: 50%;
  right: 1.1rem;
  left: 1.1rem;
  height: 1px;
  content: "";
  background: var(--sc-line);
  pointer-events: none;
}
.sc-journey .scroll-scrub__route-button {
  position: relative;
  min-height: 2.6rem;
  padding: 0.55rem 1.05rem;
  border-radius: 999px;
  color: var(--sc-sage);
  font-family: var(--sc-text);
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.3s ease;
}
.sc-journey .scroll-scrub__route-button span {
  position: relative;
  z-index: 1;
}
.sc-journey .scroll-scrub__route-button::before {
  position: absolute;
  inset: 0.18rem;
  border-radius: 999px;
  content: "";
  background: var(--sc-penny);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.35);
  opacity: 0;
  transform: scale(0.35, 0.55);
  transition:
    transform 0.5s cubic-bezier(0.3, 1.4, 0.5, 1),
    opacity 0.25s ease;
}
.sc-journey .scroll-scrub__route-button:hover {
  color: var(--sc-ink);
}
.sc-journey .scroll-scrub__route-button[aria-current="step"],
.sc-journey .scroll-scrub__route-button[aria-current="step"]:hover {
  color: var(--sc-vault);
}
.sc-journey .scroll-scrub__route-button[aria-current="step"]::before {
  opacity: 1;
  transform: none;
}

/* Hero actions + the minted coin */
.sc-hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem 2.25rem;
}
.sc-mint {
  --sc-coin: 10rem;
  position: relative;
  display: grid;
  flex: none;
  place-items: center;
  width: var(--sc-coin);
  height: var(--sc-coin);
  border-radius: 50%;
  color: var(--sc-vault);
  text-decoration: none;
  isolation: isolate;
  -webkit-tap-highlight-color: transparent;
}
.sc-mint::before {
  position: absolute;
  inset: 0;
  z-index: -2;
  border-radius: 50%;
  content: "";
  background: repeating-conic-gradient(var(--sc-penny-deep) 0deg 1.5deg, var(--sc-penny) 1.5deg 3deg);
  box-shadow: 0 22px 44px -20px rgb(0 0 0 / 0.75);
}
.sc-mint::after {
  position: absolute;
  inset: 0.5rem;
  z-index: -1;
  border-radius: 50%;
  content: "";
  background: radial-gradient(circle at 32% 28%, var(--sc-penny-glint), var(--sc-penny) 46%, var(--sc-penny-deep) 100%);
}
.sc-mint__rim {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  animation: sc-spin 12s linear infinite paused;
}
.sc-mint__rim text {
  fill: var(--sc-vault);
  font-family: var(--sc-display);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 1px;
}
.sc-mint__face {
  display: grid;
  place-items: center;
  width: 62%;
  height: 62%;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, var(--sc-penny-glint), var(--sc-penny) 72%);
  box-shadow:
    inset 0 0 0 1.5px rgb(12 39 33 / 0.35),
    inset 0 -6px 12px rgb(12 39 33 / 0.18);
  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease;
}
.sc-mint__label {
  max-width: 6ch;
  font-family: var(--sc-display);
  font-size: 1.08rem;
  font-weight: 800;
  line-height: 1.05;
  text-align: center;
}
.sc-mint:hover .sc-mint__rim,
.sc-mint:focus-visible .sc-mint__rim {
  animation-play-state: running;
}
.sc-mint:active .sc-mint__face {
  box-shadow:
    inset 0 0 0 1.5px rgb(12 39 33 / 0.5),
    inset 0 6px 14px rgb(12 39 33 / 0.42);
  transform: scale(0.94);
}
.sc-mint:focus-visible {
  outline-offset: 6px;
}
@keyframes sc-spin {
  to {
    transform: rotate(360deg);
  }
}

/* Section: the buttons, as a typographic index */
.sc-index {
  position: relative;
  overflow: hidden;
  padding: clamp(6rem, 12vw, 10rem) var(--sc-gutter) clamp(5rem, 9vw, 8rem);
  background:
    linear-gradient(rgb(18 53 44 / 0.86), rgb(18 53 44 / 0.94)),
    url("/static/site/img/felt.webp") center / cover no-repeat,
    var(--sc-felt);
}
.sc-index__title {
  max-width: 14ch;
  margin: 0 0 clamp(2.5rem, 5vw, 4rem);
  font-family: var(--sc-display);
  font-size: clamp(2.4rem, 5vw, 4.4rem);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.03em;
}
.sc-index__list {
  margin: 0;
  padding: 0;
  border-bottom: 1px solid var(--sc-line);
  list-style: none;
}
.sc-index__row {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
  gap: 0.75rem 3rem;
  align-items: center;
  padding: clamp(1.4rem, 3vw, 2.2rem) 0;
  border-top: 1px solid var(--sc-line);
}
.sc-index__question {
  margin: 0;
  color: var(--sc-ink);
  font-family: var(--sc-display);
  font-size: clamp(1.7rem, 3.6vw, 3.2rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.025em;
}
.sc-index__row[data-live="false"] .sc-index__question {
  color: var(--sc-sage);
}
.sc-index__meta {
  min-width: 0;
}
.sc-index__status {
  margin: 0 0 0.3rem;
  color: var(--sc-sage);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.sc-index__row[data-live="true"] .sc-index__status {
  color: var(--sc-penny);
}
.sc-index__name {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.3;
}
.sc-index__detail {
  max-width: 46ch;
  margin: 0.3rem 0 0;
  color: var(--sc-sage);
  font-size: 0.95rem;
}

/* Section: wherever you are, in coin-round crop frames */
.sc-places {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: clamp(3rem, 6vw, 6rem);
  align-items: center;
  overflow: hidden;
  padding: clamp(5rem, 10vw, 9rem) var(--sc-gutter);
  background: var(--sc-vault);
}
.sc-places__frames {
  position: relative;
  justify-self: center;
  width: min(100%, 38rem);
}
.sc-places__frame {
  max-width: 100%;
  margin: 0;
  overflow: hidden;
  border-radius: 50%;
  aspect-ratio: 1;
  box-shadow: 0 30px 60px -30px rgb(0 0 0 / 0.85);
}
.sc-places__frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.sc-places__frame--main {
  width: 100%;
}
.sc-places__frame--detail {
  position: absolute;
  right: -3%;
  bottom: -5%;
  width: 38%;
  box-shadow:
    0 0 0 0.45rem var(--sc-vault),
    0 24px 40px -20px rgb(0 0 0 / 0.85);
}
.sc-places__frame--detail img {
  object-position: 65% 72%;
  transform: scale(2.2);
  transform-origin: 65% 72%;
}
.sc-places__copy {
  min-width: 0;
}
.sc-places__title {
  max-width: 12ch;
  margin: 0 0 2rem;
  font-family: var(--sc-display);
  font-size: clamp(2.2rem, 4.4vw, 3.8rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
}
.sc-places__list {
  display: grid;
  gap: 1.5rem;
  margin: 0;
}
.sc-places__list div {
  display: grid;
  gap: 0.25rem;
  padding-left: 1.25rem;
  border-left: 2px solid var(--sc-penny);
}
.sc-places__list dt {
  font-size: 1.1rem;
  font-weight: 600;
}
.sc-places__list dd {
  max-width: 40ch;
  margin: 0;
  color: var(--sc-sage);
}

/* Section: promises hung beside one oversized cent sign */
.sc-promises {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(1rem, 4vw, 4rem);
  align-items: center;
  overflow: hidden;
  padding: clamp(5rem, 10vw, 9rem) var(--sc-gutter);
  background: var(--sc-felt);
}
.sc-promises__glyph {
  justify-self: start;
  margin: 0 0 0 calc(-0.6 * var(--sc-gutter));
  color: var(--sc-penny);
  font-family: var(--sc-display);
  font-size: clamp(14rem, 34vw, 32rem);
  font-weight: 800;
  line-height: 0.8;
  user-select: none;
}
.sc-promises__body {
  min-width: 0;
}
.sc-promises__title {
  max-width: 13ch;
  margin: 0 0 2.25rem;
  font-family: var(--sc-display);
  font-size: clamp(2.2rem, 4.4vw, 3.8rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
}
.sc-promises__list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.sc-promises__item {
  display: grid;
  grid-template-columns: 3rem minmax(0, 0.95fr) minmax(0, 1fr);
  gap: 1rem 1.5rem;
  align-items: center;
  padding: 1.35rem 0;
  border-top: 1px solid var(--sc-line);
}
.sc-promises__item:last-child {
  border-bottom: 1px solid var(--sc-line);
}
.sc-promises__item img {
  width: 3rem;
  height: 3rem;
}
.sc-promises__item h3 {
  margin: 0;
  font-family: var(--sc-display);
  font-size: clamp(1.2rem, 1.9vw, 1.55rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.sc-promises__item p {
  max-width: 40ch;
  margin: 0;
  color: var(--sc-sage);
}

/* Section: the invite */
.sc-invite {
  position: relative;
  display: grid;
  align-items: end;
  min-height: min(56rem, 100dvh);
  overflow: hidden;
  padding: clamp(6rem, 12vw, 10rem) var(--sc-gutter) clamp(4rem, 8vw, 7rem);
  isolation: isolate;
  scroll-margin-top: 3rem;
}
.sc-invite__plate {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 68% 50%;
}
.sc-invite::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: "";
  background:
    linear-gradient(90deg, rgb(12 39 33 / 0.95) 0%, rgb(12 39 33 / 0.75) 45%, rgb(12 39 33 / 0.08) 100%),
    linear-gradient(0deg, rgb(12 39 33 / 0.85), rgb(12 39 33 / 0) 55%);
}
.sc-invite__panel {
  max-width: 34rem;
}
.sc-invite__title {
  margin: 0;
  font-family: var(--sc-display);
  font-size: clamp(2.8rem, 6vw, 5.2rem);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.035em;
}
.sc-invite__lede {
  max-width: 40ch;
  margin: 1.25rem 0 2rem;
  color: var(--sc-mist);
  font-size: 1.1rem;
}

/* Waitlist form + coin-slot submit */
.sc-join {
  display: grid;
  gap: 0.6rem;
}
.sc-join__trap {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.sc-join__label {
  color: var(--sc-mist);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.sc-join__slot {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem;
  border-radius: 999px;
  background: var(--sc-vault);
  box-shadow: inset 0 0 0 1px var(--sc-line);
  transition: box-shadow 0.2s ease;
}
.sc-join__slot:focus-within {
  box-shadow: inset 0 0 0 2px var(--sc-penny);
}
.sc-join__slot input {
  flex: 1;
  min-width: 0;
  padding: 0.8rem 0.6rem 0.8rem 1.1rem;
  border: 0;
  background: transparent;
  color: var(--sc-ink);
  font: inherit;
  font-size: 1.05rem;
  outline: none;
}
.sc-join__slot input::placeholder {
  color: var(--sc-sage);
  opacity: 1;
}
.sc-join__submit {
  position: relative;
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 0.7rem;
  overflow: hidden;
  padding: 0.85rem 1.35rem 0.85rem 1rem;
  border: 0;
  border-radius: 999px;
  background: var(--sc-penny);
  color: var(--sc-vault);
  font-family: var(--sc-display);
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.15s ease;
}
.sc-join__submit:active {
  transform: translateY(1px);
}
.sc-join__coin {
  position: relative;
  width: 1.1rem;
  height: 1.1rem;
}
.sc-join__coin::before {
  position: absolute;
  top: 46%;
  right: 0;
  left: 0;
  height: 0.24rem;
  border-radius: 999px;
  content: "";
  background: var(--sc-vault);
}
.sc-join__coin::after {
  position: absolute;
  top: -1.3rem;
  left: 0.2rem;
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  content: "";
  background: radial-gradient(circle at 35% 35%, var(--sc-penny-glint), var(--sc-penny-deep));
  box-shadow: 0 0 0 1px var(--sc-vault);
  transition: transform 0.45s cubic-bezier(0.55, 0, 0.75, 0.2);
}
.sc-join__submit:hover .sc-join__coin::after,
.sc-join__submit:focus-visible .sc-join__coin::after {
  transform: translateY(1.6rem);
}
.sc-join__note {
  min-height: 1.6em;
  margin: 0.2rem 0 0;
  color: var(--sc-sage);
  font-size: 0.95rem;
}
.sc-join__note[data-tone="ok"] {
  color: var(--sc-ink);
  font-weight: 600;
}
.sc-join__note[data-tone="err"] {
  color: var(--sc-penny-glint);
  font-weight: 600;
}

/* Footer */
.sc-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.5rem 2rem;
  align-items: center;
  padding: 3rem var(--sc-gutter) calc(2.5rem + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--sc-line);
  background: var(--sc-vault);
}
.sc-footer__line {
  margin: 0.6rem 0 0;
  color: var(--sc-sage);
}
.sc-footer__fine {
  grid-column: 1 / -1;
  max-width: 70ch;
  margin: 0;
  color: var(--sc-sage);
  font-size: 0.875rem;
}

/* 404 */
.sc-state {
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 1rem;
  min-height: 100dvh;
  padding: 2rem var(--sc-gutter);
}
.sc-state__glyph {
  margin: 0;
  color: var(--sc-penny);
  font-family: var(--sc-display);
  font-size: 8rem;
  font-weight: 800;
  line-height: 0.8;
}
.sc-state__title {
  margin: 0;
  font-family: var(--sc-display);
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}
.sc-state__body {
  max-width: 42ch;
  margin: 0;
  color: var(--sc-sage);
}
.sc-state__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  align-items: center;
}
.sc-state__home {
  color: var(--sc-ink);
  font-weight: 600;
  text-decoration-color: var(--sc-penny);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.3em;
}

/* ---------- The app: board and report ---------- */
.sc-app h1,
.sc-app h2 {
  margin: 0;
  font-family: var(--sc-display);
  font-weight: 800;
  letter-spacing: -0.025em;
}
.wrap {
  max-width: 1160px;
  margin: 0 auto;
  padding-inline: var(--sc-gutter);
}
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1.4rem;
}
.top-link {
  color: var(--sc-ink);
  font-weight: 600;
  text-decoration-color: var(--sc-penny);
  text-underline-offset: 0.3em;
}
.badge {
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  color: var(--sc-penny);
  font-size: 0.8rem;
  font-weight: 600;
  box-shadow: inset 0 0 0 1.5px var(--sc-penny);
}
.lede {
  max-width: 34em;
  margin: 0;
  color: var(--sc-sage);
  font-size: 1.12rem;
}

.board {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 56px;
  align-items: start;
  padding-block: 40px 96px;
}
.board-side {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}
.board-side h1 {
  font-size: clamp(2.2rem, 4.4vw, 3.4rem);
  line-height: 1;
}

/* The pad and its copper keys */
.pad {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr));
  gap: 14px;
  width: min(100%, var(--pad-width, 420px));
  padding: 16px;
  border-radius: 26px;
  background: var(--sc-vault);
  box-shadow:
    inset 0 0 0 1px var(--sc-line),
    0 24px 40px -24px rgb(0 0 0 / 0.7);
}
.key {
  position: relative;
  display: flex;
  align-items: flex-end;
  max-width: 100%;
  margin: 0;
  padding: 14px;
  overflow-wrap: break-word;
  border: 0;
  border-radius: 16px;
  aspect-ratio: 1;
  background: linear-gradient(180deg, var(--sc-penny-glint) -40%, var(--sc-penny) 55%, var(--sc-penny-deep) 140%);
  box-shadow:
    0 6px 0 var(--sc-penny-edge),
    0 10px 16px rgb(0 0 0 / 0.35);
  color: var(--sc-vault);
  font: 800 clamp(0.8rem, 3.3vw, 0.98rem) / 1.1 var(--sc-display);
  text-align: left;
  cursor: pointer;
  appearance: none;
  overflow-wrap: anywhere; /* the label is the key's only flex item; this lets long words wrap */
  hyphens: auto;
  transform: translateY(0);
  transition:
    transform 80ms ease-out,
    box-shadow 80ms ease-out;
  -webkit-tap-highlight-color: transparent;
}
.key:hover {
  filter: brightness(1.05);
}
.key:active,
.key.down {
  box-shadow:
    0 1px 0 var(--sc-penny-edge),
    0 2px 6px rgb(0 0 0 / 0.35);
  transform: translateY(5px);
}
.key[disabled] {
  cursor: default;
  filter: saturate(0.35);
  opacity: 0.45;
}
.led {
  position: absolute;
  top: 13px;
  left: 14px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgb(12 39 33 / 0.45);
}
.key[aria-pressed="true"] .led {
  background: var(--sc-ink);
  box-shadow: 0 0 10px 2px rgb(238 242 232 / 0.7);
}
.key.busy .led {
  background: var(--sc-ink);
  animation: blink 0.7s steps(2, end) infinite;
}
@keyframes blink {
  50% {
    opacity: 0.2;
  }
}

/* The printed slip: receipt paper on the felt */
.slip-slot {
  position: relative;
  z-index: 1;
  width: min(100%, 440px);
}
.slip {
  padding: 26px 20px 36px;
  background: var(--sc-paper);
  color: var(--sc-paper-ink);
  font-family: var(--sc-mono);
  font-size: 13px;
  line-height: 1.65;
  filter: drop-shadow(0 10px 14px rgb(0 0 0 / 0.35));
  -webkit-mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / 14px 100%;
  mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / 14px 100%;
}
.slip p {
  margin: 0;
}
.slip-title {
  font-size: 13.5px;
  font-weight: 700;
}
.slip-date {
  color: var(--sc-paper-soft);
}
.slip-verdict {
  margin-top: 12px !important;
  padding-top: 12px;
  border-top: 1px dashed var(--sc-paper-line);
  font-weight: 700;
}
.slip-verdict.short {
  color: var(--sc-bad);
}
.slip-verdict.clear {
  color: var(--sc-good);
}
.slip-todo {
  margin: 12px 0 0;
  padding: 12px 0 0 1.6em;
  border-top: 1px dashed var(--sc-paper-line);
}
.slip-todo li {
  margin-bottom: 6px;
}
.slip-figures {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 16px;
  margin: 12px 0 0;
  padding-top: 12px;
  border-top: 1px dashed var(--sc-paper-line);
}
.slip-figures dt {
  color: var(--sc-paper-soft);
}
.slip-figures dd {
  margin: 0;
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.slip-foot {
  margin-top: 14px !important;
  color: var(--sc-paper-soft);
  font-size: 11.5px;
}
.slip-foot a {
  color: var(--sc-paper-ink);
  font-weight: 700;
}
.slip.printing {
  animation: print 1.1s steps(16, end) both;
}
@keyframes print {
  from {
    clip-path: inset(0 0 100% 0);
  }
  to {
    clip-path: inset(0 0 -20px 0);
  }
}
.empty {
  margin: 0;
  padding: 22px;
  border: 1.5px dashed var(--sc-line);
  border-radius: 18px;
  color: var(--sc-sage);
  font-size: 0.95rem;
}
.empty.err {
  color: var(--sc-penny-glint);
}

/* Report */
.report {
  padding-block: 24px 80px;
}
.report > * {
  max-width: 860px;
}
.report h1 {
  font-size: clamp(2.2rem, 4.4vw, 3.2rem);
  line-height: 1.02;
}
.report .asof {
  margin: 8px 0 28px;
  color: var(--sc-sage);
}
.report .verdict {
  max-width: 36em;
  margin: 0 0 8px;
  font-family: var(--sc-display);
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.25;
}
.report .by {
  margin: 0 0 36px;
  color: var(--sc-sage);
  font-size: 0.9rem;
}
.report h2 {
  margin: 40px 0 14px;
  font-size: 1.45rem;
}
.figures {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  margin: 0;
  border-top: 1px solid var(--sc-line);
}
.figures div {
  padding: 12px 16px 12px 0;
  border-bottom: 1px solid var(--sc-line);
}
.figures dt {
  color: var(--sc-sage);
  font-size: 0.9rem;
}
.figures dd {
  margin: 2px 0 0;
  font-size: 1.15rem;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}
.report ol li {
  margin-bottom: 8px;
}
.table-wrap {
  overflow-x: auto;
}
.report table {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}
.report th,
.report td {
  padding: 10px 14px 10px 0;
  border-bottom: 1px solid var(--sc-line);
  text-align: left;
  vertical-align: top;
}
.report th {
  color: var(--sc-sage);
  font-size: 0.9rem;
  font-weight: 600;
}
.ledger .nowrap,
.ledger .num {
  white-space: nowrap;
}
.ledger__tag {
  display: none;
  color: var(--sc-sage);
  font-size: 0.85rem;
}
.flag-high {
  color: var(--sc-penny-glint);
  font-weight: 600;
}
.flag-medium {
  color: var(--sc-ink);
  font-weight: 600;
}
.flag-info {
  color: var(--sc-sage);
}
.report .notes {
  color: var(--sc-sage);
  font-size: 0.92rem;
}
.report .error {
  color: var(--sc-penny-glint);
  font-size: 1.15rem;
  font-weight: 700;
}

/* ---------- Set Up My Plan ---------- */
a.key {
  text-decoration: none;
}
.key--plan {
  background: linear-gradient(180deg, #ffffff -40%, var(--sc-mist) 55%, var(--sc-sage) 140%);
  box-shadow:
    0 6px 0 #6c8376,
    0 10px 16px rgb(0 0 0 / 0.35);
}
.key--plan:active {
  box-shadow:
    0 1px 0 #6c8376,
    0 2px 6px rgb(0 0 0 / 0.35);
}
.plan-note {
  max-width: 34em;
  margin: 0;
  color: var(--sc-sage);
}
.plan-note a,
.track .asof a,
.empty a,
.plan-review__head a {
  color: var(--sc-ink);
  font-weight: 600;
  text-decoration-color: var(--sc-penny);
  text-underline-offset: 0.3em;
}
.plan {
  padding-block: 20px 88px;
}
.plan > * {
  max-width: 900px;
}
.plan h1 {
  margin: 0 0 12px;
  font-size: clamp(2rem, 4.2vw, 2.9rem);
  line-height: 1.04;
}
.plan h2 {
  font-size: 1.15rem;
}
.plan .lede {
  margin-bottom: 24px;
}
.plan-progress ol {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
}
.plan-progress a {
  display: inline-block;
  padding: 0.28rem 0.75rem;
  border-radius: 999px;
  color: var(--sc-sage);
  font-size: 0.84rem;
  text-decoration: none;
  box-shadow: inset 0 0 0 1px var(--sc-line);
}
.plan-progress .done a {
  color: var(--sc-mist);
  box-shadow: inset 0 0 0 1px rgb(205 124 71 / 0.55);
}
.plan-progress [aria-current="step"] a {
  background: var(--sc-penny);
  color: var(--sc-vault);
  font-weight: 700;
  box-shadow: none;
}
.plan-count {
  margin: 0 0 6px;
  color: var(--sc-sage);
  font-size: 0.9rem;
}
.plan-form {
  display: grid;
  gap: 14px;
}
.plan-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px 14px;
  min-width: 0;
  margin: 0;
  padding: 16px 18px 18px;
  border: 0;
  border-radius: 18px;
  background: var(--sc-vault);
  box-shadow: inset 0 0 0 1px var(--sc-line);
}
.plan-row legend {
  float: left;
  width: 100%;
  margin-bottom: 2px;
  padding: 0;
  font: 800 1.05rem/1.2 var(--sc-display);
}
.field-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
}
.field {
  display: grid;
  gap: 6px;
  align-content: start;
  min-width: 0;
}
.field > span {
  color: var(--sc-sage);
  font-size: 0.84rem;
}
.field--wide {
  grid-column: span 2;
}
.plan input:not([type="checkbox"]):not([type="radio"]),
.plan select {
  width: 100%;
  min-width: 0;
  padding: 0.66rem 0.8rem;
  border: 0;
  border-radius: 10px;
  background: var(--sc-raised);
  color: var(--sc-ink);
  font: inherit;
  font-variant-numeric: tabular-nums;
  box-shadow: inset 0 0 0 1px var(--sc-line);
  color-scheme: dark;
}
.plan input::placeholder {
  color: rgb(168 189 176 / 0.6);
}
.check {
  display: flex;
  align-items: center;
  align-self: end;
  gap: 8px;
  padding-bottom: 0.65rem;
  color: var(--sc-mist);
  font-size: 0.92rem;
}
.check input,
.choice input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--sc-penny);
}
.plan-choices {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  border: 0;
}
.choice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 18px;
  border-radius: 16px;
  background: var(--sc-vault);
  color: var(--sc-mist);
  cursor: pointer;
  box-shadow: inset 0 0 0 1px var(--sc-line);
}
.choice input {
  margin-top: 0.2rem;
}
.choice:has(input:checked) {
  color: var(--sc-ink);
  box-shadow: inset 0 0 0 2px var(--sc-penny);
}
.plan-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 24px;
  margin-top: 18px;
}
.plan-actions form {
  margin: 0;
}
.plan-go {
  display: inline-flex;
  align-items: center;
  padding: 0.85rem 1.45rem;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--sc-penny-glint) -40%, var(--sc-penny) 55%, var(--sc-penny-deep) 140%);
  box-shadow: 0 4px 0 var(--sc-penny-edge);
  color: var(--sc-vault);
  font: 800 1rem/1.1 var(--sc-display);
  text-decoration: none;
  cursor: pointer;
  transition:
    transform 80ms ease-out,
    box-shadow 80ms ease-out;
}
.plan-go:active {
  box-shadow: 0 1px 0 var(--sc-penny-edge);
  transform: translateY(3px);
}
.plan-link {
  padding: 0;
  border: 0;
  background: none;
  color: var(--sc-ink);
  font: inherit;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--sc-penny);
  text-underline-offset: 0.3em;
  cursor: pointer;
}
.plan-errors {
  margin-bottom: 18px;
  padding: 14px 18px;
  border-radius: 16px;
  background: rgb(168 67 31 / 0.2);
  box-shadow: inset 0 0 0 1px rgb(242 196 159 / 0.45);
}
.plan-errors p {
  margin: 0 0 4px;
  font-weight: 700;
}
.plan-errors ul {
  margin: 0;
  padding-left: 1.2em;
}
.plan-hint,
.plan-privacy {
  max-width: 42em;
  margin: 0;
  color: var(--sc-sage);
}
.plan-warn {
  margin: 10px 0 0;
  color: var(--sc-penny-glint);
  font-weight: 600;
}
.plan-steps-list {
  margin: 0 0 18px;
  padding-left: 1.4em;
  color: var(--sc-mist);
}
.plan-review__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--sc-line);
}
.plan-review p {
  margin: 4px 0 0;
  color: var(--sc-mist);
}
.plan-review__list {
  display: grid;
  gap: 4px;
  margin: 6px 0 0;
  padding-left: 0;
  list-style: none;
}
ol.plan-review__list {
  padding-left: 1.3em;
  list-style: decimal;
}
.plan-review__list li {
  color: var(--sc-mist);
}
.plan-review__list li span + span {
  margin-left: 0.6em;
  color: var(--sc-sage);
}
.plan-math {
  margin-top: 28px;
  padding: 18px 20px;
  border-radius: 20px;
  background: var(--sc-vault);
  box-shadow: inset 0 0 0 1px var(--sc-line);
}
.plan-math h2 {
  margin-bottom: 10px;
}
.plan-math dl {
  display: grid;
  gap: 4px;
  margin: 0;
}
.plan-math dl div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}
.plan-math dt {
  color: var(--sc-sage);
}
.plan-math dd {
  margin: 0;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}
.plan-math .plan-math__total {
  margin-top: 6px;
  padding-top: 8px;
  border-top: 1px solid var(--sc-line);
}
.plan-math__total dt {
  color: var(--sc-ink);
  font-weight: 700;
}
.plan-math .plan-hint,
.plan-math .plan-warn {
  margin-top: 10px;
}

/* ---------- On Track ---------- */
.track > * {
  max-width: 960px;
}
.track section {
  margin-top: 8px;
}
.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
  gap: 12px;
}
.tile {
  padding: 16px 18px;
  border-radius: 18px;
  background: var(--sc-vault);
  box-shadow: inset 0 0 0 1px var(--sc-line);
}
.tile p {
  margin: 0;
}
.tile__label {
  color: var(--sc-sage);
  font-size: 0.88rem;
}
.tile__value {
  margin-top: 4px !important;
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.2;
}
.tile__value--bad {
  color: var(--sc-penny-glint);
}
.tile__sub .nowrap {
  white-space: nowrap;
}
.tile__sub {
  margin-top: 2px !important;
  color: var(--sc-sage);
  font-size: 0.85rem;
}
.viz-sub {
  max-width: 44em;
  margin: 0;
  color: var(--sc-sage);
}
.viz-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  margin: 14px 0 0;
  padding: 0;
  color: var(--sc-mist);
  font-size: 0.92rem;
  list-style: none;
}
.viz-legend li {
  display: flex;
  align-items: center;
  gap: 8px;
}
.viz-key {
  width: 28px;
  height: 10px;
  overflow: visible;
}
.viz-plot {
  position: relative;
  margin-top: 6px;
  border-radius: 12px;
}
.viz-plot:focus-visible {
  outline: 2px solid var(--sc-penny);
  outline-offset: 4px;
}
.viz-svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}
.viz-svg--narrow {
  display: none;
}
.viz-line {
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.viz-line--real {
  stroke: var(--viz-real);
}
.viz-line--plan {
  stroke: var(--viz-plan);
}
.viz-line--alt {
  stroke: var(--viz-alt);
}
.viz-dot {
  stroke: var(--viz-surface);
  stroke-width: 2;
}
.viz-dot--plan {
  fill: var(--viz-plan);
}
.viz-dot--alt {
  fill: var(--viz-alt);
}
.viz-dot--real {
  fill: var(--viz-real);
}
.viz-grid {
  stroke: var(--viz-grid);
  stroke-width: 1;
}
.viz-axis,
.viz-today {
  stroke: var(--viz-axis);
  stroke-width: 1;
}
.viz-ref--cushion {
  stroke: var(--viz-cushion);
  stroke-width: 1;
}
.viz-cross {
  stroke: var(--sc-mist);
  stroke-width: 1;
  opacity: 0.7;
  pointer-events: none;
}
.viz-tick,
.viz-note {
  fill: var(--sc-sage);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.viz-note--strong {
  fill: var(--sc-ink);
  font-weight: 600;
}
.viz-end {
  fill: var(--sc-ink);
  font-size: 13px;
  font-weight: 700;
}
.viz-end-sub {
  fill: var(--sc-sage);
  font-size: 11.5px;
}
.viz-note,
.viz-end,
.viz-end-sub {
  /* a halo in the chart's own surface color, so a line passing behind a label never cuts through it */
  paint-order: stroke;
  stroke: var(--viz-surface);
  stroke-width: 4px;
  stroke-linejoin: round;
}
.viz-tip {
  position: absolute;
  top: 6px;
  z-index: 3;
  min-width: 190px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--sc-vault);
  box-shadow:
    inset 0 0 0 1px var(--sc-line),
    0 12px 24px rgb(0 0 0 / 0.4);
  font-size: 0.86rem;
  pointer-events: none;
}
.viz-tip p {
  margin: 0;
}
.viz-tip__date {
  margin-bottom: 4px !important;
  color: var(--sc-sage);
}
.viz-tip__row {
  display: grid;
  grid-template-columns: 18px auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}
.viz-tip__row strong {
  font-variant-numeric: tabular-nums;
}
.viz-tip__row span:last-child {
  color: var(--sc-sage);
}
.viz-tip__key {
  height: 2px;
  border-radius: 2px;
  background: var(--viz-plan);
}
.viz-tip__key--real {
  background: var(--viz-real);
}
.viz-tip__key--alt {
  background: repeating-linear-gradient(90deg, var(--viz-alt) 0 6px, transparent 6px 9px);
}
.viz-table summary {
  margin-top: 12px;
  color: var(--sc-ink);
  font-weight: 600;
  cursor: pointer;
}
.viz-table table + table {
  margin-top: 18px;
}
.todo li {
  margin-bottom: 10px;
}
.goals {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 14px;
}
.goal {
  padding: 18px 20px 20px;
  border-radius: 20px;
  background: var(--sc-vault);
  box-shadow: inset 0 0 0 1px var(--sc-line);
}
.goal__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.goal h3 {
  margin: 0;
  font: 800 1.2rem/1.2 var(--sc-display);
}
.status {
  padding: 0.18rem 0.62rem;
  border-radius: 999px;
  color: var(--sc-mist);
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: inset 0 0 0 1.5px var(--sc-line);
}
.status--good {
  color: var(--sc-ink);
  box-shadow: inset 0 0 0 1.5px var(--viz-good);
}
.status--good span {
  color: var(--viz-good);
}
.status--warn {
  color: var(--sc-ink);
  box-shadow: inset 0 0 0 1.5px var(--viz-warn);
}
.status--warn span {
  color: var(--viz-warn);
}
.meter {
  height: 10px;
  margin: 14px 0 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgb(205 124 71 / 0.22);
}
.meter span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--viz-plan);
}
.goal__nums {
  margin: 0;
  color: var(--sc-mist);
  font-size: 0.95rem;
}
.goal__dates {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0 0;
}
.goal__dates dt {
  color: var(--sc-sage);
  font-size: 0.8rem;
}
.goal__dates dd {
  margin: 2px 0 0;
  font-weight: 700;
}
.goal__fix {
  margin: 10px 0 0;
  color: var(--sc-penny-glint);
  font-size: 0.92rem;
}
.bars {
  display: grid;
  gap: 10px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}
.bars li {
  display: grid;
  grid-template-columns: minmax(8rem, 12rem) minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}
.bars__label {
  color: var(--sc-mist);
}
.bars__track {
  height: 12px;
}
.bars__fill {
  /* real transactions wear the same color as "What happened" in the checking chart */
  display: block;
  height: 100%;
  min-width: 2px;
  border-radius: 0 4px 4px 0;
  background: var(--viz-real);
}
.bars__value {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

/* ---------- Small screens: every multi-column section stacks ---------- */
@media (max-width: 860px) {
  .scroll-scrub__poster,
  .scroll-scrub__video {
    object-position: var(--ss-mobile-position);
  }
  .scroll-scrub__chapter-pin,
  .scroll-scrub__chapter[data-align="right"] .scroll-scrub__chapter-pin {
    align-items: flex-end;
    justify-content: flex-start;
    padding: 6.5rem max(1.25rem, env(safe-area-inset-right)) calc(4rem + env(safe-area-inset-bottom))
      max(1.25rem, env(safe-area-inset-left));
  }
  .scroll-scrub__copy,
  .sc-journey #start .scroll-scrub__copy {
    width: min(100%, 36rem);
  }
  .scroll-scrub__copy::before {
    inset: -3rem -1.25rem;
    background: linear-gradient(
      to top,
      var(--ss-bg) 0%,
      color-mix(in srgb, var(--ss-bg) 82%, transparent) 58%,
      transparent 100%
    );
  }
  .scroll-scrub__title,
  .sc-journey #start .scroll-scrub__title {
    font-size: clamp(2.3rem, 10.5vw, 3.6rem);
  }
  .sc-journey .scroll-scrub__route {
    top: calc(env(safe-area-inset-top, 0px) + 4.4rem);
    bottom: auto;
    max-width: calc(100% - 2rem);
    justify-content: flex-start;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
  }
  .sc-journey .scroll-scrub__route-button {
    flex: 0 0 auto;
  }
  .sc-mint {
    --sc-coin: 8.5rem;
  }
  .sc-mint__label {
    font-size: 0.95rem;
  }
  .sc-places,
  .sc-promises,
  .board {
    grid-template-columns: 1fr;
  }
  .sc-places__frames {
    width: min(100%, 26rem);
  }
  .sc-promises__glyph {
    justify-self: start;
    margin-left: -0.04em;
    font-size: clamp(9rem, 48vw, 14rem);
  }
  .board {
    gap: 40px;
  }
  .pad {
    --pad-width: 100%;
  }
}
@media (max-width: 760px) {
  .sc-index__row {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 480px) {
  .pad {
    --cols: 2;
  }
}
@media (max-width: 640px) {
  .viz-svg--wide {
    display: none;
  }
  .viz-svg--narrow {
    display: block;
  }
  .bars li {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px 12px;
  }
  .bars__label {
    grid-column: 1 / -1;
  }
  .ledger {
    font-size: 0.9rem;
  }
  .ledger th,
  .ledger td {
    padding-right: 10px;
  }
  .ledger__wd,
  .ledger__note {
    display: none;
  }
  .ledger__tag {
    display: block;
  }
  .field--wide {
    grid-column: 1 / -1;
  }
  .goal__dates {
    grid-template-columns: 1fr 1fr;
  }
  .sc-footer {
    grid-template-columns: 1fr;
  }
  .sc-promises__item {
    grid-template-columns: 2.5rem minmax(0, 1fr);
    gap: 0.35rem 1rem;
    align-items: start;
  }
  .sc-promises__item img {
    grid-row: span 2;
    width: 2.5rem;
    height: 2.5rem;
  }
  .sc-join__slot {
    flex-wrap: wrap;
    border-radius: 1.75rem;
  }
  .sc-join__slot input {
    flex-basis: 100%;
  }
  .sc-join__submit {
    justify-content: center;
    width: 100%;
  }
}

/* ---------- Reduced motion: the full story, no movement ---------- */
@media (prefers-reduced-motion: reduce) {
  .scroll-scrub__chapter {
    min-height: 100dvh !important;
  }
  .sc-journey #start .scroll-scrub__title,
  .sc-journey #start .scroll-scrub__body,
  .sc-journey #start .scroll-scrub__actions,
  .sc-mint__rim,
  .slip.printing,
  .key.busy .led {
    animation: none !important;
  }
  .sc-groove::after,
  .sc-join__coin::after,
  .sc-mint__face,
  .sc-join__submit,
  .key,
  .sc-journey .scroll-scrub__route-button,
  .sc-journey .scroll-scrub__route-button::before {
    transition: none;
  }
}

@media print {
  :root {
    --sc-ink: #0c2721;
    --sc-mist: #0c2721;
    --sc-sage: #4f6a5d;
    --sc-line: #b9c8be;
    --sc-penny-glint: #a8431f;
    --sc-vault: #ffffff;
    --viz-real: #0c2721;
    --viz-plan: #ad6234;
    --viz-alt: #6250d6;
    --viz-grid: #e3e9e5;
    --viz-axis: #9fb0a6;
    --viz-cushion: #7d9688;
    --viz-surface: #ffffff;
  }
  .viz-svg--wide {
    display: block !important;
  }
  .viz-svg--narrow,
  .viz-tip,
  .viz-table {
    display: none !important;
  }
  .tile,
  .goal {
    break-inside: avoid;
  }
  body.sc-body {
    background: #fff;
    color: #0c2721;
  }
  .top,
  .no-print {
    display: none;
  }
}
