:root {
  --paper: #fbfaf6;
  --paper-deep: #f2eee4;
  --ink: #101210;
  --muted: #5f615b;
  --line: rgba(16, 18, 16, 0.16);
  --pink: #ff3f8f;
  --green: #0e6248;
  --acid: #dcf676;
  --sky: #e7f0eb;
  --section-color: var(--pink);
  --display: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --reading: Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
  --shadow: 0 18px 45px rgba(16, 18, 16, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background-color: var(--paper);
  background-image: linear-gradient(rgba(16, 18, 16, 0.035) 1px, transparent 1px);
  background-size: 100% 24px;
}

a {
  color: inherit;
}

button,
input,
select {
  font: inherit;
}

button {
  color: inherit;
}

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

[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  color: white;
  background: var(--ink);
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

:focus-visible {
  outline: 3px solid var(--pink);
  outline-offset: 3px;
}

.eyebrow {
  margin: 0;
  font-size: 0.7rem;
  font-weight: 760;
  letter-spacing: 0.16em;
  line-height: 1.2;
  text-transform: uppercase;
}

/* Index */

.index-page {
  min-height: 100vh;
  min-width: 0;
}

.atlas-header,
.atlas-footer,
.index-page main {
  width: min(1180px, calc(100% - 64px));
  margin-inline: auto;
}

.atlas-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  border-bottom: 1px solid var(--ink);
}

.wordmark {
  display: flex;
  align-items: baseline;
  gap: 10px;
  text-decoration: none;
}

.wordmark span {
  color: var(--green);
  font-family: var(--sans);
  font-size: 0.82rem;
  font-style: normal;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.wordmark strong {
  font-size: 0.78rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.prototype-stamp {
  margin: 0;
  color: var(--pink);
  font-size: 0.69rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.index-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(260px, 0.5fr);
  gap: clamp(48px, 8vw, 112px);
  align-items: center;
  padding: clamp(48px, 6vw, 74px) 0 clamp(42px, 5vw, 62px);
}

.index-intro h1 {
  max-width: 900px;
  margin: 16px 0 0;
  font-family: var(--display);
  font-size: clamp(3.2rem, 5.4vw, 5.6rem);
  font-weight: 500;
  letter-spacing: -0.06em;
  line-height: 0.91;
}

.index-intro .eyebrow {
  color: var(--pink);
}

.intro-note {
  padding: 18px 0 0;
  border-top: 1px solid var(--ink);
  color: var(--green);
}

.intro-note > p {
  margin: 0 0 24px;
  font-family: var(--reading);
  font-size: clamp(1.08rem, 1.55vw, 1.34rem);
  line-height: 1.45;
}

.intro-note dl {
  margin: 0;
  border-top: 1px solid var(--line);
}

.intro-note dl div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.72rem;
}

.intro-note dt {
  color: var(--green);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.intro-note dd {
  margin: 0;
  font-weight: 700;
}

.cabinet {
  padding: 22px 0 46px;
  border-top: 1px solid var(--ink);
}

.cabinet-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 26px;
}

.cabinet-heading h2 {
  margin: 6px 0 0;
  font-family: var(--display);
  font-size: clamp(2.15rem, 3.5vw, 3.7rem);
  font-weight: 500;
  letter-spacing: -0.055em;
}

.cabinet-heading > p {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.catalog-groups {
  display: block;
}

.family-group + .family-group {
  margin-top: 76px;
}

.family-heading,
.suit-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
}

.family-heading {
  margin-bottom: 28px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--ink);
}

.family-heading h3 {
  margin: 6px 0 0;
  font-family: var(--display);
  font-size: clamp(2.5rem, 4.2vw, 4.6rem);
  font-weight: 500;
  letter-spacing: -0.055em;
  line-height: 0.95;
}

.family-heading > p,
.suit-heading > p {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 0.68rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.suit-group + .suit-group {
  margin-top: 46px;
}

.suit-heading {
  margin-bottom: 13px;
}

.suit-heading h4 {
  margin: 0;
  color: var(--green);
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.card-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 0;
  border-top: 1px solid var(--ink);
  border-left: 1px solid var(--ink);
}

.card-entry-wrap {
  min-width: 0;
  border: 0;
  border-right: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  background: transparent;
  box-shadow: none;
}

.card-entry {
  display: flex;
  min-height: 100%;
  flex-direction: column;
  text-decoration: none;
}

.index-card-figure {
  position: relative;
  display: grid;
  place-items: center;
  isolation: isolate;
  min-height: 280px;
  padding: 36px;
  overflow: hidden;
  border-bottom: 1px solid var(--ink);
  background: transparent;
}

.index-card-figure::before {
  position: absolute;
  z-index: -1;
  top: 50%;
  left: 50%;
  width: 220px;
  height: 220px;
  border: 1px solid rgba(16, 18, 16, 0.16);
  border-radius: 50%;
  background:
    linear-gradient(rgba(16, 18, 16, 0.13), rgba(16, 18, 16, 0.13)) center / 130% 1px no-repeat,
    linear-gradient(rgba(16, 18, 16, 0.13), rgba(16, 18, 16, 0.13)) center / 1px 130% no-repeat;
  content: "";
  transform: translate(-50%, -50%);
}

.index-card-figure img {
  z-index: 1;
  width: min(100%, 132px);
  border-radius: 0;
  clip-path: inset(1.8% round 0.8%);
  box-shadow: 0 0 0 1px var(--ink), 18px 18px 0 rgba(16, 18, 16, 0.045);
  transition: transform 300ms ease;
}

.card-entry:hover .index-card-figure img {
  transform: rotate(-1.2deg) translateY(-4px);
}

.card-catalog-number {
  position: absolute;
  z-index: 2;
  top: 22px;
  left: 22px;
  display: block;
  width: auto;
  height: auto;
  color: var(--pink);
  background: transparent;
  font-family: var(--sans);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  white-space: nowrap;
}

.listened-mark {
  position: absolute;
  z-index: 3;
  right: 28px;
  bottom: 28px;
  padding: 7px 9px;
  border: 1px solid var(--green);
  color: var(--green);
  background: var(--paper);
  font-size: 0.67rem;
  font-weight: 780;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.entry-copy {
  display: flex;
  min-height: 310px;
  flex-direction: column;
  padding: 28px 26px 24px;
}

.entry-kicker {
  margin: 0 0 14px;
  color: var(--green);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.entry-copy h3,
.entry-copy h4,
.entry-copy h5 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(2.25rem, 3.4vw, 3.8rem);
  font-weight: 500;
  letter-spacing: -0.06em;
  line-height: 0.96;
}

.entry-deck-line {
  max-width: 620px;
  margin: 20px 0 28px;
  font-family: var(--reading);
  font-size: clamp(1rem, 1.15vw, 1.14rem);
  line-height: 1.48;
}

.entry-action {
  display: flex;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 13px;
  border-top: 1px solid var(--ink);
  font-size: 0.75rem;
  font-weight: 760;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.entry-action span:last-child {
  color: var(--pink);
  font-size: 1rem;
  transition: transform 180ms ease;
}

.card-entry:hover .entry-action span:last-child {
  transform: translate(4px, -4px);
}

.deck-map {
  padding: 62px 0 76px;
}

.deck-map-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 16px;
  border-top: 1px solid var(--ink);
  border-left: 1px solid var(--ink);
}

.deck-map-grid > div {
  display: grid;
  min-height: 170px;
  padding: 20px;
  border-right: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}

.deck-map-grid .is-current {
  color: var(--ink);
  background: transparent;
  box-shadow: inset 0 4px 0 var(--pink);
}

.deck-map-grid strong {
  align-self: start;
  font-family: var(--sans);
  font-size: 3rem;
  font-weight: 400;
}

.deck-map-grid span {
  align-self: end;
  font-size: 0.82rem;
  font-weight: 760;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.deck-map-grid small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.7rem;
}

.deck-map-grid .is-current small {
  color: var(--green);
}

.atlas-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 0 34px;
  border-top: 1px solid var(--ink);
  color: var(--muted);
  font-size: 0.7rem;
}

.atlas-footer p {
  margin: 0;
}

/* Read Along */

.lesson-page {
  overflow-x: hidden;
  --header-height: 92px;
  --player-height: 104px;
  --player-total-height: calc(var(--player-height) + env(safe-area-inset-bottom, 0px));
  --control-border: var(--ink);
  --control-fill: rgba(251, 250, 246, 0.94);
  --control-radius: 999px;
  height: 100svh;
  min-height: 0;
  padding-bottom: 0;
  overflow: hidden;
}

.lesson-page[data-section="symbols"] {
  --section-color: #745b19;
}

.lesson-page[data-section="meaning"] {
  --section-color: var(--green);
}

.lesson-page[data-section="shadow"] {
  --section-color: #785784;
}

.lesson-page[data-section="remember"] {
  --section-color: var(--pink);
}

.study-header {
  position: relative;
  z-index: 10;
  display: grid;
  align-items: center;
  border-bottom: 1px solid var(--ink);
  background: rgba(251, 250, 246, 0.94);
  backdrop-filter: blur(12px);
  height: var(--header-height);
  min-height: var(--header-height);
  grid-template-columns: minmax(260px, 1fr) minmax(300px, auto) minmax(260px, 1fr);
  grid-template-rows: 1fr;
  gap: 16px;
  padding: 12px max(32px, calc((100% - 1180px) / 2));
}

.study-nav-start,
.study-nav-end {
  display: flex;
  min-width: 0;
  gap: 14px;
  align-items: center;
}

.study-nav-end {
  justify-content: flex-end;
}

.back-link {
  justify-self: start;
  font-size: 0.72rem;
  font-weight: 760;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
  display: inline-flex;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
}

.card-step {
  display: inline-grid;
  min-width: 0;
  min-height: 44px;
  grid-auto-flow: column;
  gap: 8px;
  align-items: center;
  color: var(--ink);
  text-decoration: none;
}

.card-step-copy {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.card-step-copy small,
.card-step-copy > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-step-copy small {
  color: var(--green);
  font-size: 0.54rem;
  font-weight: 780;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.card-step-copy > span {
  max-width: 128px;
  font-family: var(--reading);
  font-size: 0.78rem;
}

.card-step-arrow {
  position: relative;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid var(--ink);
  border-radius: 50%;
  color: var(--pink);
  font-size: 0;
  line-height: 1;
  transition: color 140ms ease, background 140ms ease, border-color 140ms ease, transform 140ms ease;
}

.card-step-arrow::before {
  width: 8px;
  height: 8px;
  border-top: 1.5px solid currentColor;
  border-right: 1.5px solid currentColor;
  content: "";
}

.card-step-previous .card-step-arrow::before {
  transform: translateX(1px) rotate(-135deg);
}

.card-step-next .card-step-arrow::before {
  transform: translateX(-1px) rotate(45deg);
}

.card-step:hover .card-step-arrow {
  color: var(--paper);
  background: var(--ink);
}

.card-step-previous:hover .card-step-arrow {
  transform: translateX(-2px);
}

.card-step-next:hover .card-step-arrow {
  transform: translateX(2px);
}

.card-step.is-disabled {
  pointer-events: none;
  opacity: 0.28;
}

.back-link,
.study-identity span {
  color: var(--pink);
}

.back-link-arrow {
  display: inline-block;
  margin-right: 6px;
  color: var(--pink);
  transition: transform 160ms ease;
}

.back-link:hover .back-link-arrow {
  transform: translateX(-3px);
}

.study-identity {
  display: flex;
  align-items: baseline;
  gap: 10px;
  justify-self: start;
}

.study-identity span {
  font-weight: 800;
  font-size: 0.67rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.lesson-shell {
  margin-inline: auto;
  display: grid;
  width: min(1180px, calc(100% - 64px));
  height: calc(100svh - var(--header-height) - var(--player-total-height));
  min-height: 0;
  grid-template-columns: minmax(350px, 0.9fr) minmax(460px, 1.1fr);
  gap: clamp(64px, 7vw, 112px);
  align-items: stretch;
  justify-content: center;
  padding: clamp(24px, 4vh, 38px) 0;
  overflow: hidden;
}

.card-meta-line {
  display: flex;
  justify-content: center;
  gap: 20px;
  color: var(--muted);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin: 14px 0 0;
  text-align: center;
}

.card-meta-line p {
  justify-content: center;
  display: flex;
  gap: 15px;
  margin: 0;
}

.card-meta-line p:first-child span + span::before {
  margin-right: 15px;
  content: "·";
}

.card-and-caption {
  position: relative;
  display: grid;
  min-height: 0;
  place-items: center;
  isolation: isolate;
}

.card-and-caption::before,
.card-and-caption::after {
  position: absolute;
  z-index: 0;
  top: 50%;
  left: 50%;
  background: rgba(16, 18, 16, 0.14);
  content: "";
  pointer-events: none;
  transform: translate(-50%, -50%);
}

.card-and-caption::before {
  width: min(546px, 118%);
  height: 1px;
}

.card-and-caption::after {
  width: 1px;
  height: min(546px, 118%);
}

.card-stage {
  position: relative;
  z-index: 1;
  width: fit-content;
  margin: 0 auto;
  max-height: 100%;
  padding: 0;
}

.card-stage::before {
  position: absolute;
  z-index: -1;
  top: 50%;
  left: 50%;
  width: 420px;
  height: 420px;
  border: 1px solid rgba(16, 18, 16, 0.14);
  border-radius: 50%;
  background: transparent;
  box-shadow: none;
  content: "";
  transition: border-color 300ms ease, transform 300ms ease;
  transform: translate(-50%, -50%);
}

.card-stage img {
  width: 210px;
  max-height: calc(100svh - var(--header-height) - var(--player-total-height) - 110px);
  border-radius: 0;
  clip-path: inset(1.8% round 0.8%);
  box-shadow: 0 0 0 1px var(--ink), 28px 28px 0 rgba(16, 18, 16, 0.045);
}

.card-stage figcaption {
  margin-top: 11px;
  color: var(--ink);
  font-size: 0.6rem;
  letter-spacing: 0.07em;
  text-align: center;
  text-transform: uppercase;
}

.focus-field {
  position: absolute;
  z-index: 2;
  overflow: hidden;
  border-radius: 0;
  pointer-events: none;
  inset: 0 0 20px;
}

.focus-line {
  position: absolute;
  top: 48%;
  width: 42%;
  height: 1px;
  background: var(--acid);
  opacity: 0;
  transition: opacity 450ms ease, transform 750ms ease;
}

.focus-line-left {
  left: -32%;
  transform: rotate(11deg);
}

.focus-line-right {
  right: -32%;
  transform: rotate(-11deg);
}

.is-looking-pause .focus-line {
  opacity: 0.95;
}

.is-looking-pause .focus-line-left {
  transform: translateX(73%) rotate(11deg);
}

.is-looking-pause .focus-line-right {
  transform: translateX(-73%) rotate(-11deg);
}

.looking-state {
  margin: 0;
  position: absolute;
  z-index: 4;
  top: 18px;
  right: 18px;
  max-width: calc(100% - 36px);
  padding: 8px 10px;
  border: 1px solid var(--ink);
  border-radius: 0;
  color: var(--ink);
  background: var(--acid);
  box-shadow: none;
  font-size: 0.62rem;
  font-weight: 780;
  letter-spacing: 0.04em;
  line-height: 1.25;
  text-transform: none;
}

.looking-state::before {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 6px;
  border-radius: 50%;
  content: "";
  background: var(--ink);
}

.reader-column {
  position: relative;
  display: flex;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border: 0;
  border-left: 0;
  background: transparent;
  box-shadow: none;
}

.follow-notice {
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--ink);
  font-size: 0.67rem;
  position: absolute;
  z-index: 5;
  top: 12px;
  right: 14px;
  display: block;
  min-height: 0;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
}

.follow-notice button {
  cursor: pointer;
  font-weight: 760;
  min-height: 44px;
  padding: 0 15px;
  border: 1px solid var(--ink);
  border-radius: 0;
  color: var(--paper);
  background: var(--green);
  box-shadow: none;
  font-size: 0.66rem;
}

.reader-scroll {
  scrollbar-color: var(--green) transparent;
  position: relative;
  flex: 1;
  width: 100%;
  height: auto;
  min-height: 0;
  max-height: none;
  padding: 0 8px 104px 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scroll-behavior: smooth;
  scroll-padding-block: 66px 104px;
}

.reader-section {
  padding: 0;
  border-bottom: 0;
}

.reader-section + .reader-section {
  margin-top: 32px;
}

.passage {
  border: 0;
  text-align: left;
  position: relative;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
  width: 100%;
  padding: 18px 10px;
  border-bottom: 1px solid var(--line);
  border-left: 3px solid transparent;
  color: var(--muted);
  background: transparent;
  transition: background 150ms ease, border-color 150ms ease, color 150ms ease;
}

.passage:hover {
  color: var(--ink);
  background: transparent;
}

.passage.is-current {
  border-left-color: var(--pink);
  color: var(--ink);
  background: transparent;
  box-shadow: none;
}

.passage.is-current + .passage {
  color: var(--green);
}

.reader-scroll.is-held .passage.is-current {
  border-left-style: dashed;
}

.player {
  border-top: 1px solid var(--ink);
  color: var(--ink);
  background: rgba(251, 250, 246, 0.96);
  box-shadow: none;
  backdrop-filter: blur(12px);
  position: fixed;
  z-index: 30;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  width: 100%;
  height: var(--player-total-height);
  min-height: var(--player-total-height);
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  gap: 14px;
  align-items: center;
  padding: 10px clamp(14px, 2.6vw, 36px) calc(10px + env(safe-area-inset-bottom, 0px));
}

.player-status {
  position: absolute;
  right: clamp(10px, 2.6vw, 36px);
  bottom: calc(100% + 8px);
  max-width: min(360px, calc(100vw - 20px));
  margin: 0;
  padding: 8px 10px;
  border: 1px solid var(--ink);
  color: var(--paper);
  background: var(--ink);
  font-size: 0.65rem;
  font-weight: 720;
  letter-spacing: 0.04em;
  line-height: 1.3;
}

.transport-cluster {
  display: grid;
  align-items: center;
  grid-template-columns: 44px 50px 44px;
  gap: 3px;
}

.section-step {
  position: relative;
  display: grid;
  padding: 0;
  place-items: center;
  border: 1px solid var(--ink);
  border-radius: 999px;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
  width: 44px;
  height: 44px;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease, transform 140ms ease;
}

.section-step:hover {
  color: var(--ink);
  background: rgba(16, 18, 16, 0.06);
}

.section-step:disabled {
  color: var(--ink);
  background: transparent;
  cursor: default;
  opacity: 0.28;
}

.section-step span {
  display: none;
}

.section-step::before,
.section-step::after {
  position: absolute;
  top: 50%;
  display: block;
  background: currentColor;
  content: "";
}

.section-step::before {
  width: 8px;
  height: 12px;
  transform: translateY(-50%);
}

.section-step::after {
  width: 2px;
  height: 12px;
  transform: translateY(-50%);
}

#previousSectionButton::before {
  left: 19px;
  clip-path: polygon(100% 0, 100% 100%, 0 50%);
}

#previousSectionButton::after {
  left: 16px;
}

#nextSectionButton::before {
  left: 17px;
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}

#nextSectionButton::after {
  left: 26px;
}

.play-button {
  position: relative;
  display: grid;
  place-items: center;
  border: 1px solid var(--ink);
  border-radius: 50%;
  color: var(--ink);
  background: var(--pink);
  cursor: pointer;
  width: 50px;
  height: 50px;
  transition: background 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.play-button .play-icon,
.play-button .pause-icon {
  display: none !important;
}

.play-button::before {
  grid-area: 1 / 1;
  width: 11px;
  height: 13px;
  background: currentColor;
  clip-path: polygon(0 0, 100% 50%, 0 100%);
  content: "";
  transform: translateX(1px);
}

.play-button.is-playing::before {
  width: 12px;
  height: 14px;
  background: linear-gradient(90deg, currentColor 0 4px, transparent 4px 8px, currentColor 8px 12px);
  clip-path: none;
  transform: none;
}

.timeline-group {
  min-width: 0;
}

.timeline-labels {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  margin-bottom: 3px;
  font-size: 0.64rem;
}

.autoplay-next {
  display: inline-flex;
  height: 44px;
  min-height: 44px;
  padding: 7px 10px;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--control-border);
  border-radius: var(--control-radius);
  color: var(--muted);
  background: var(--control-fill);
  cursor: pointer;
  font-size: 0.58rem;
  font-weight: 760;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease, transform 140ms ease;
  white-space: nowrap;
}

.autoplay-next-dot {
  flex: 0 0 7px;
  width: 7px;
  height: 7px;
  border: 1px solid currentColor;
  border-radius: 50%;
  background: transparent;
}

.autoplay-next[aria-pressed="true"] {
  border-color: var(--green);
  color: var(--paper);
  background: var(--green);
}

.autoplay-next[aria-pressed="true"] .autoplay-next-dot {
  border-color: var(--pink);
  background: var(--pink);
}

.autoplay-next span {
  color: inherit;
}

.timeline-labels p {
  min-width: 0;
  margin: 0;
}

.timeline-labels p:first-child {
  display: flex;
}

.timeline-labels span {
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.timeline-wrap {
  position: relative;
  --timeline-thumb-size: 15px;
  --timeline-thumb-radius: 7.5px;
  --timeline-range-height: 20px;
  --timeline-range-center: 10px;
  --timeline-node-size: 44px;
  height: 52px;
}

.timeline {
  --progress-x: 7.5px;
  position: absolute;
  z-index: 1;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 20px;
  margin: 0;
  appearance: none;
  background: transparent;
  cursor: pointer;
}

.section-nodes {
  position: absolute;
  z-index: 2;
  pointer-events: none;
  top: auto;
  right: var(--timeline-thumb-radius);
  bottom: var(--timeline-range-height);
  left: var(--timeline-thumb-radius);
  height: var(--timeline-node-size);
}

.section-node {
  position: absolute;
  top: 0;
  left: var(--position);
  display: grid;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  pointer-events: auto;
  transform: translateX(-50%);
  width: var(--timeline-node-size);
  height: var(--timeline-node-size);
}

.section-node-dot {
  position: absolute;
  width: 7px;
  height: 7px;
  border: 1px solid var(--ink);
  border-radius: 50%;
  background: var(--ink);
  box-shadow: 0 0 0 2px var(--paper);
  pointer-events: none;
  transition: width 150ms ease, height 150ms ease, background 150ms ease;
  top: calc(100% + var(--timeline-range-center));
  left: 50%;
  bottom: auto;
  transform: translate(-50%, -50%);
}

.section-node:hover .section-node-dot,
.section-node:focus-visible .section-node-dot {
  width: 10px;
  height: 10px;
  background: var(--paper);
}

.section-node.is-active .section-node-dot {
  width: 11px;
  height: 11px;
  border-color: var(--green);
  background: var(--green);
}

.section-node-tooltip {
  position: absolute;
  bottom: calc(100% + 2px);
  left: 50%;
  padding: 4px 6px;
  color: var(--ink);
  background: var(--paper);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.22);
  font-size: 0.57rem;
  font-weight: 760;
  letter-spacing: 0.07em;
  line-height: 1;
  opacity: 0;
  pointer-events: none;
  text-transform: uppercase;
  transform: translate(-50%, 3px);
  transition: opacity 120ms ease, transform 120ms ease;
  white-space: nowrap;
}

.section-node:hover .section-node-tooltip,
.section-node:focus-visible .section-node-tooltip {
  opacity: 1;
  transform: translate(-50%, 0);
}

.section-node:first-child .section-node-tooltip {
  left: 50%;
  transform: translate(0, 3px);
}

.section-node:first-child:hover .section-node-tooltip,
.section-node:first-child:focus-visible .section-node-tooltip {
  transform: translate(0, 0);
}

.section-node:last-child .section-node-tooltip {
  right: 50%;
  left: auto;
  transform: translate(0, 3px);
}

.section-node:last-child:hover .section-node-tooltip,
.section-node:last-child:focus-visible .section-node-tooltip {
  transform: translate(0, 0);
}

.section-node:focus-visible {
  outline: 2px solid var(--pink);
  outline-offset: -2px;
}

.timeline::-webkit-slider-runnable-track {
  height: 3px;
  background: linear-gradient(to right, var(--pink) 0 var(--progress-x), rgba(16, 18, 16, 0.24) var(--progress-x) 100%);
}

.timeline::-moz-range-track {
  height: 3px;
  background: rgba(16, 18, 16, 0.24);
}

.timeline::-moz-range-progress {
  height: 3px;
  background: var(--pink);
}

.timeline::-webkit-slider-thumb {
  box-sizing: border-box;
  width: var(--timeline-thumb-size, 15px);
  height: var(--timeline-thumb-size, 15px);
  margin-top: -6px;
  appearance: none;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--paper);
  box-shadow: 0 0 0 1px var(--paper);
}

.timeline::-moz-range-thumb {
  box-sizing: border-box;
  width: var(--timeline-thumb-size, 15px);
  height: var(--timeline-thumb-size, 15px);
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--paper);
}

.speed-control {
  position: relative;
  grid-template-columns: auto auto;
  gap: 8px;
  align-items: center;
  font-size: 0.64rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: block;
}

.speed-control::after {
  position: absolute;
  top: 50%;
  right: 12px;
  width: 7px;
  height: 7px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  content: "";
  pointer-events: none;
  transform: translateY(-70%) rotate(45deg);
}

.speed-control select {
  width: 76px;
  height: 44px;
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid var(--control-border);
  border-radius: var(--control-radius);
  color: var(--ink);
  background: var(--control-fill);
  cursor: pointer;
  min-width: 76px;
  min-height: 44px;
  padding: 0 28px 0 12px;
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 720;
  letter-spacing: 0.02em;
  line-height: 1;
  transition: background 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}

.load-error {
  margin: 20vh auto;
  padding: 24px;
  max-width: 500px;
  border: 1px solid var(--ink);
  font-family: var(--display);
  font-size: 1.4rem;
}

.skip-link-player {
  left: 174px;
}

.study-identity h1 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(1.8rem, 3.2vw, 2.85rem);
  font-weight: 500;
  letter-spacing: -0.055em;
  line-height: 1;
}

.lesson-format {
  display: flex;
  justify-self: end;
  gap: 9px;
  align-items: center;
  margin: 0;
  color: var(--green);
  font-size: 0.65rem;
  font-weight: 760;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.lesson-format time::before {
  margin-right: 9px;
  content: "·";
}

.card-study {
  display: grid;
  min-width: 0;
  min-height: 0;
  grid-template-rows: minmax(0, 1fr) auto;
}

.card-meta-line {
  grid-row: 2;
}

.card-and-caption {
  grid-row: 1;
}

.is-looking-pause .card-stage::before {
  border-color: var(--pink);
  background: transparent;
  transform: translate(-50%, -50%) rotate(2deg);
}

.reader-section h2 {
  position: sticky;
  z-index: 3;
  top: 0;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 0;
  padding: 18px 10px 12px;
  border-bottom: 1px solid var(--ink);
  color: var(--ink);
  background: linear-gradient(var(--paper) 76%, rgba(251, 250, 246, 0));
  font-size: 0.66rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.reader-section h2 small {
  font-size: 0.61rem;
  font-weight: 500;
  letter-spacing: 0;
}

.passage.is-current .passage-seek {
  border-color: var(--pink);
}

.passage p {
  margin: 0;
  font-family: var(--reading);
  font-size: clamp(1.05rem, 1.25vw, 1.17rem);
  letter-spacing: -0.006em;
  line-height: 1.6;
}

.passage-seek {
  display: inline-flex;
  width: 44px;
  height: 44px;
  padding: 0;
  align-items: center;
  justify-content: center;
  gap: 4px;
  align-self: start;
  border: 1px solid var(--ink);
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-family: var(--sans);
  font-size: 0.59rem;
  font-weight: 720;
  font-variant-numeric: tabular-nums;
}

.passage-seek::before {
  width: 5px;
  height: 7px;
  background: currentColor;
  clip-path: polygon(0 0, 100% 50%, 0 100%);
  content: "";
}

@media (hover: hover) {
  .section-step:not(:disabled):hover,
  .autoplay-next:not([aria-pressed="true"]):hover,
  .speed-control select:hover {
    border-color: var(--ink);
    background: var(--paper-deep);
  }

  .play-button:hover {
    background: #ff66a7;
    box-shadow: 0 0 0 3px rgba(255, 63, 143, 0.13);
  }
}

.section-step:not(:disabled):active,
.play-button:active,
.autoplay-next:active {
  transform: scale(0.96);
}

.passage-seek:hover,
.passage-seek:focus-visible {
  color: var(--ink);
  background: var(--paper-deep);
}

.timeline-labels p:first-child span {
  color: var(--green);
  font-weight: 780;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.section-node:first-child {
  left: calc(0px - var(--timeline-thumb-radius));
  transform: none;
}

.section-node:first-child .section-node-dot {
  left: var(--timeline-thumb-radius);
}

@media (max-width: 1039px) {
  .study-header {
    grid-template-columns: 1fr auto 1fr;
    padding-inline: 18px;
  }

  .study-identity {
    justify-self: center;
  }

  .study-identity h1 {
    font-size: clamp(1.45rem, 3.2vw, 2.2rem);
  }

  .card-step-copy {
    display: none;
  }

  .card-step-arrow {
    width: 36px;
    height: 36px;
  }

  .lesson-shell {
    width: calc(100% - 32px);
    grid-template-columns: minmax(250px, 0.78fr) minmax(360px, 1.22fr);
    gap: clamp(28px, 4vw, 44px);
  }

  .card-stage::before {
    width: 360px;
    height: 360px;
  }

  .card-and-caption::before {
    width: min(468px, 118%);
  }

  .card-and-caption::after {
    height: min(468px, 118%);
  }
}

@media (max-width: 900px) {
  .index-intro {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 34px;
  }

  .intro-note {
    max-width: 620px;
  }

  .entry-copy {
    padding: 28px 26px 24px;
  }

  .lesson-page {
    --header-height: 68px;
    --player-height: 124px;
  }

  .study-header {
    grid-template-columns: 1fr auto 1fr;
    grid-template-rows: 1fr;
    gap: 10px;
    padding: 8px 14px;
  }

  .study-identity {
    justify-self: center;
  }

  .player {
    grid-template-areas: "transport autoplay speed"
        "timeline timeline timeline";
    grid-template-columns: 140px minmax(76px, 1fr) 68px;
    grid-template-rows: 48px 60px;
    gap: 0 8px;
    padding: 8px max(10px, env(safe-area-inset-right, 0px)) calc(8px + env(safe-area-inset-bottom, 0px)) max(10px, env(safe-area-inset-left, 0px));
  }

  .transport-cluster {
    width: 140px;
    justify-self: start;
    grid-area: transport;
  }

  .timeline-group {
    grid-area: timeline;
    align-self: end;
  }

  .speed-control {
    grid-area: speed;
  }

  .speed-control::after {
    right: 10px;
  }

  .speed-control select {
    width: 68px;
    min-width: 68px;
    padding: 0 24px 0 10px;
    font-size: 16px;
    letter-spacing: -0.025em;
  }

  .autoplay-next {
    grid-area: autoplay;
    width: 100%;
    min-width: 0;
    max-width: 80px;
    padding-inline: 6px;
    gap: 5px;
    justify-self: center;
    justify-content: center;
    font-size: 0.55rem;
    letter-spacing: 0.06em;
  }

  .timeline-wrap {
    height: 48px;
  }
}

@media (max-width: 700px) {
  .study-identity > span,
  .lesson-format {
    display: none;
  }

  .back-link-arrow {
    display: none;
  }

  .back-link-label {
    display: block;
    font-size: 0.54rem;
    letter-spacing: 0.1em;
  }

  .back-link {
    width: 36px;
    padding: 0;
    justify-content: center;
  }

  .back-link-arrow {
    margin-right: 0;
  }

  .study-nav-start,
  .study-nav-end {
    gap: 4px;
  }

  .study-identity {
    gap: 0;
  }

  .card-step {
    min-width: 44px;
    justify-items: center;
  }

  .atlas-header,
    .atlas-footer,
    .index-page main {
    width: min(100% - 28px, 620px);
  }

  .index-intro {
    gap: 30px;
    padding: 40px 0 46px;
  }

  .index-intro h1 {
    font-size: clamp(3.05rem, 14vw, 5rem);
  }

  .intro-note {
    margin-left: 0;
  }

  .family-heading,
    .suit-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .family-heading > p,
    .suit-heading > p {
    margin-bottom: 0;
  }

  .card-list {
    grid-template-columns: 1fr;
  }

  .card-entry {
    display: flex;
  }

  .index-card-figure {
    min-height: 280px;
    padding: 32px;
    border-bottom: 1px solid var(--ink);
  }

  .index-card-figure::before {
    width: 210px;
    height: 210px;
  }

  .index-card-figure img {
    width: min(100%, 132px);
  }

  .entry-copy {
    min-height: 0;
    padding: 34px 22px 40px;
  }

  .entry-copy h3,
    .entry-copy h4,
    .entry-copy h5 {
    font-size: clamp(2.8rem, 14vw, 4.5rem);
  }

  .entry-deck-line {
    margin-bottom: 38px;
  }

  .deck-map-grid {
    grid-template-columns: 1fr;
  }

  .deck-map-grid > div {
    min-height: 125px;
  }

  .atlas-footer {
    display: block;
  }

  .atlas-footer p + p {
    margin-top: 7px;
  }

  .lesson-shell {
    display: grid;
    height: calc(100svh - var(--header-height) - var(--player-total-height));
    min-height: 0;
    grid-template-columns: 1fr;
    width: 100%;
    grid-template-rows: minmax(150px, 40fr) minmax(0, 60fr);
    gap: 10px;
    padding: 10px 14px;
    overflow: hidden;
  }

  .card-stage img {
    width: auto;
    max-height: calc((100svh - var(--header-height) - var(--player-total-height)) * 0.34);
    border-radius: 0;
  }

  .card-meta-line {
    margin: 5px 0 0;
    font-size: 0.58rem;
  }

  .card-meta-line p:first-child span:not(:first-child) {
    display: none;
  }

  .reader-scroll {
    height: auto;
    min-height: 0;
    max-height: none;
    padding: 0 6px 72px;
    scroll-padding-block: 60px 78px;
  }

  .transport-cluster {
    grid-template-columns: 44px 48px 44px;
    gap: 2px;
  }

  .section-step {
    width: 44px;
    height: 44px;
  }

  .play-button {
    width: 48px;
    height: 48px;
  }

  .timeline-labels {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 0;
  }

  .timeline-labels p:first-child {
    display: flex;
  }

  .section-node {
    width: 44px;
    height: 44px;
  }

  .section-node-tooltip {
    display: none;
  }

  .card-study {
    margin: 0;
  }

  .card-stage {
    padding: 0;
  }

  .card-stage::before {
    top: 50%;
    left: 50%;
    width: 280px;
    height: 280px;
    transform: translate(-50%, -50%);
  }

  .is-looking-pause .card-stage::before {
    transform: translate(-50%, -50%) rotate(2deg);
  }

  .card-and-caption::before {
    width: min(364px, 118%);
  }

  .card-and-caption::after {
    height: min(364px, 118%);
  }

  .card-stage figcaption {
    margin-top: 5px;
    font-size: 0.49rem;
  }

  .focus-field {
    inset: 0 0 17px;
    border-radius: 0;
  }

  .looking-state {
    top: 8px;
    right: 8px;
    max-width: calc(100% - 16px);
    padding: 6px 8px;
    font-size: 0.55rem;
  }

  .reader-column {
    height: 100%;
    border-top: 1px solid var(--ink);
    border-left: 0;
  }

  .reader-section {
    padding-bottom: 0;
  }

  .reader-section h2 {
    padding: 14px 8px 8px;
  }

  .passage {
    display: grid;
    grid-template-columns: 50px minmax(0, 1fr);
    gap: 8px;
    padding: 13px 8px;
  }

  .passage p {
    font-size: clamp(1.03rem, 4.5vw, 1.12rem);
    line-height: 1.62;
  }

  .passage-seek {
    width: 44px;
    min-width: 44px;
    height: 44px;
    margin-bottom: 1px;
    padding: 0;
  }

  .follow-notice {
    top: 8px;
    right: 8px;
  }
}

@media (max-width: 420px) {
  .lesson-page {
    --player-height: 124px;
  }

  .atlas-header {
    min-height: 64px;
  }

  .prototype-stamp {
    max-width: 70px;
    text-align: right;
  }

  .index-card-figure {
    min-height: 326px;
    padding: 34px;
  }

  .study-identity span {
    display: none;
  }

  .lesson-format {
    display: none;
  }

  .back-link {
    width: 36px;
    padding: 0;
    justify-content: center;
  }

  .back-link-arrow {
    margin-right: 0;
  }

  .study-nav-start,
  .study-nav-end {
    gap: 4px;
  }

  .timeline-labels p:first-child {
    max-width: 86px;
  }

  .skip-link-player {
    left: 154px;
  }

  .study-header {
    padding-inline: 10px;
  }

  .study-identity {
    gap: 0;
  }

  .study-identity h1 {
    font-size: 1.05rem;
  }

  .lesson-format time {
    display: none;
  }

  .lesson-format time::before {
    display: none;
  }

  .lesson-format {
    font-size: 0.58rem;
  }

  .card-meta-line p:first-child span:not(:first-child) {
    display: none;
  }

  .player {
    padding-inline: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
    *::before,
    *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
  }
}
