:root {
  --green: #009900;
  --green-dark: #005f28;
  --green-deep: #013b24;
  --green-soft: #e8f7e8;
  --ink: #18221d;
  --muted: #59665e;
  --paper: #fbfcf8;
  --line: rgba(24, 34, 29, 0.16);
  --gold: #d5a11e;
  --gold-soft: #fff4cf;
  --rose: #9b315b;
  --rose-soft: #f8e8ee;
  --blue: #24539b;
  --blue-soft: #e9f0fb;
  --shadow: 0 20px 60px rgba(1, 59, 36, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
}

body {
  margin: 0;
  overflow-x: hidden;
  font-family: Aptos, "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
}

.mode-toggle {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 40;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 0 15px;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 999px;
  color: white;
  background: rgba(1, 59, 36, 0.92);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(10px);
  cursor: pointer;
  font-family: Ubuntu, Aptos, "Segoe UI", sans-serif;
  font-size: 0.86rem;
  font-weight: 700;
  transition: color 160ms ease, background 160ms ease, transform 160ms ease;
}

.mode-toggle:hover,
.mode-toggle:focus-visible {
  color: var(--green-deep);
  background: white;
  transform: translateY(-1px);
}

.mode-toggle-icon {
  font-size: 1rem;
}

h1,
h2,
h3,
.brand,
.button {
  font-family: Ubuntu, Aptos, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

h1 {
  margin: 0;
  max-width: 11ch;
  font-size: 6.4rem;
  line-height: 0.95;
}

h2 {
  margin: 0;
  font-size: 3.6rem;
  line-height: 1;
}

h3 {
  margin: 0;
}

p {
  line-height: 1.62;
}

a {
  color: inherit;
}

button {
  font: inherit;
}

.hero {
  min-height: 92vh;
  padding: 24px clamp(20px, 5vw, 72px) 64px;
  color: white;
  background: linear-gradient(135deg, var(--green-deep) 0%, var(--green-dark) 58%, var(--green) 100%);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  max-width: 1240px;
  margin: 0 auto;
  padding-right: 176px;
}

.brand {
  flex: 0 0 auto;
  font-weight: 700;
  text-decoration: none;
}

.navlinks {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px 16px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 0.92rem;
}

.navlinks a {
  text-decoration: none;
}

.navlinks a:hover,
.sources a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.72fr);
  gap: clamp(34px, 7vw, 94px);
  align-items: end;
  max-width: 1240px;
  min-height: calc(92vh - 96px);
  margin: 0 auto;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--gold);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0;
  font-size: 0.78rem;
}

.lede {
  max-width: 660px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 1.3rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
}

.button.primary {
  color: var(--green-deep);
  background: white;
}

.button.secondary {
  color: white;
  background: rgba(255, 255, 255, 0.12);
}

.hero-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
}

.hero-cards img {
  width: 100%;
  min-width: 0;
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

.hero-cards img:nth-child(2) {
  transform: translateY(-34px);
}

.band {
  padding: clamp(58px, 8vw, 104px) clamp(20px, 5vw, 72px);
}

.band > * {
  max-width: 1240px;
  margin-left: auto;
  margin-right: auto;
}

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

.section-heading p:not(.eyebrow) {
  max-width: 860px;
  color: var(--muted);
  font-size: 1.08rem;
}

.intro,
.majors,
.conversation {
  background: white;
}

.intro-grid,
.structure-grid,
.question-grid,
.rank-grid,
.major-context {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.intro-grid article,
.structure-panel,
.major-item,
.tarot-card,
.answer,
.sources ul,
.rank-grid article,
.major-context article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: 0 8px 24px rgba(1, 59, 36, 0.05);
}

.intro-grid article {
  padding: 22px;
}

.intro-grid strong {
  color: var(--green-dark);
}

.structure {
  background: var(--green-soft);
}

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

.structure-panel {
  min-height: 260px;
  padding: 28px;
  color: white;
}

.structure-panel span {
  display: inline-block;
  margin-bottom: 34px;
  color: rgba(255, 255, 255, 0.72);
  font-weight: 700;
}

.structure-panel h3 {
  margin-bottom: 14px;
  font-size: 2rem;
}

.structure-panel.major {
  background: var(--green-deep);
}

.structure-panel.minor {
  background: var(--blue);
}

.reading {
  color: white;
  background: #102b23;
}

.reading .section-heading p:not(.eyebrow) {
  color: rgba(255, 255, 255, 0.78);
}

.route-story {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.75fr);
  gap: clamp(34px, 6vw, 76px);
  align-items: center;
}

.route-map {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px 18px;
  min-height: 410px;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background-color: #17382f;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 32px 32px;
}

.route-line {
  position: absolute;
  inset: 75px 14% 72px;
  border: 5px solid rgba(255, 255, 255, 0.32);
  border-left-color: transparent;
  border-radius: 50%;
  transform: rotate(-8deg);
}

.route-map::after {
  content: "";
  position: absolute;
  right: 12%;
  bottom: 68px;
  width: 19%;
  height: 80px;
  border-right: 5px solid var(--gold);
  border-bottom: 5px solid var(--gold);
  transform: skewX(-24deg);
  opacity: 0.65;
}

.route-map[data-route="persist"]::after {
  right: 35%;
  bottom: 46px;
  height: 130px;
  border-color: #74b6ff;
  transform: skewX(18deg);
}

.route-node {
  position: relative;
  z-index: 1;
  align-self: center;
  padding: 14px;
  border-left: 4px solid var(--green);
  background: #f8fbf7;
  color: var(--ink);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22);
}

.route-node span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  margin-bottom: 10px;
  border-radius: 50%;
  color: white;
  background: var(--green);
  font-weight: 700;
}

.route-node strong,
.route-node small {
  display: block;
}

.route-node small {
  margin-top: 5px;
  color: var(--muted);
  line-height: 1.35;
}

.route-node.start {
  grid-column: 1;
  grid-row: 1;
}

.route-node.conditions {
  grid-column: 2;
  grid-row: 1;
}

.route-node.warning {
  grid-column: 3;
  grid-row: 1;
  border-color: var(--rose);
}

.route-node.warning span {
  background: var(--rose);
}

.route-node.choice {
  grid-column: 2;
  grid-row: 2;
  border-color: var(--gold);
}

.route-node.choice span {
  color: var(--ink);
  background: var(--gold);
}

.route-node.destination {
  grid-column: 3;
  grid-row: 2;
}

.route-copy h3 {
  font-size: 1.8rem;
}

.route-copy p {
  color: rgba(255, 255, 255, 0.78);
}

.route-controls {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
}

.route-choice {
  min-height: 42px;
  padding: 0 16px;
  border: 0;
  border-radius: 5px;
  color: white;
  background: transparent;
  cursor: pointer;
  font-weight: 700;
}

.route-choice.active {
  color: var(--green-deep);
  background: white;
}

.route-result {
  min-height: 76px;
  padding-left: 14px;
  border-left: 3px solid var(--gold);
}

.numbers {
  background: var(--gold-soft);
}

.number-sequence {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.number-item {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 12px;
  min-height: 144px;
  padding: 16px;
  border-top: 4px solid var(--gold);
  background: white;
}

.number-item > span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: white;
  background: var(--green-dark);
  font-weight: 700;
}

.number-item strong,
.number-item small {
  display: block;
}

.number-item small {
  margin-top: 2px;
  color: var(--rose);
  font-weight: 700;
}

.number-item p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.4;
}

.formula {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 28px;
  padding: 20px;
  border: 1px solid rgba(213, 161, 30, 0.48);
  background: white;
  text-align: center;
}

.formula span {
  color: var(--rose);
  font-size: 1.4rem;
  font-weight: 700;
}

.suits {
  background: #f5f8f3;
}

.suit-tabs,
.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.suit-tab,
.filter,
.question {
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  cursor: pointer;
}

.suit-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.suit-tab span {
  font-size: 1.25rem;
}

.suit-tab.active,
.filter.active,
.question.active {
  color: white;
  border-color: var(--green);
  background: var(--green);
}

.suit-panel {
  display: grid;
  grid-template-columns: minmax(300px, 0.7fr) minmax(0, 1.3fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
  padding: clamp(28px, 5vw, 56px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: var(--shadow);
}

.suit-symbols {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 14px;
  align-items: center;
}

.suit-symbols div {
  display: grid;
  place-items: center;
  min-height: 190px;
  padding: 18px;
  border-radius: 8px;
  color: white;
  background: var(--green-dark);
  text-align: center;
}

.suit-symbols div:last-child {
  background: var(--blue);
}

.suit-symbols span {
  font-size: 4.4rem;
  line-height: 1;
}

.suit-symbols small {
  opacity: 0.75;
}

.suit-symbols b {
  color: var(--rose);
  font-size: 1.7rem;
}

.suit-copy h3 {
  margin-bottom: 10px;
  font-size: 2.4rem;
}

.suit-element {
  display: inline-block;
  margin: 0 0 8px;
  color: var(--rose);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0;
  font-size: 0.8rem;
}

.suit-copy > strong {
  color: var(--green-dark);
}

.suit-example {
  padding: 14px 16px;
  border-left: 4px solid var(--gold);
  background: var(--gold-soft);
}

.courts {
  background: white;
}

.rank-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 20px;
}

.rank-grid article {
  padding: 20px;
}

.rank-grid span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 16px;
  border-radius: 50%;
  color: white;
  background: var(--green);
  font-family: Ubuntu, sans-serif;
  font-weight: 700;
}

.rank-grid h3 {
  margin-bottom: 6px;
}

.rank-grid p {
  margin-bottom: 0;
  color: var(--muted);
}

.court-formula {
  display: grid;
  grid-template-columns: auto 1fr auto auto 1fr auto auto;
  gap: 12px;
  align-items: center;
  margin: 28px auto 56px;
  padding: 22px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.court-formula span {
  color: var(--muted);
}

.court-formula b {
  color: var(--rose);
  font-size: 1.4rem;
}

.court-groups {
  display: grid;
  gap: 64px;
}

.court-group {
  display: grid;
  grid-template-columns: minmax(180px, 0.3fr) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.court-group > header {
  position: sticky;
  top: 20px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding-top: 10px;
}

.court-group > header > span {
  font-size: 2.3rem;
  line-height: 1;
}

.court-group header h3 {
  font-size: 1.8rem;
}

.court-group header p {
  color: var(--muted);
}

.court-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.court-cards figure {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.court-cards img {
  display: block;
  width: 100%;
  aspect-ratio: 58 / 100;
  object-fit: cover;
  background: #e7ebe7;
}

.court-cards figcaption {
  min-height: 84px;
  padding: 12px;
}

.court-cards figcaption strong,
.court-keyphrase {
  display: block;
}

.court-keyphrase {
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.3;
}

.majors {
  background: #eef3ec;
}

.major-story {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.45fr);
  gap: clamp(36px, 7vw, 92px);
  align-items: start;
}

.major-path {
  padding: 24px;
  border-radius: 8px;
  color: white;
  background: var(--green-deep);
  box-shadow: var(--shadow);
}

.major-path img {
  display: block;
  width: 100%;
  max-height: 360px;
  margin-bottom: 20px;
  border-radius: 5px;
  object-fit: cover;
  object-position: top;
}

.major-path div {
  padding: 12px;
  border-left: 3px solid var(--gold);
  background: rgba(255, 255, 255, 0.08);
}

.major-path strong,
.major-path span {
  display: block;
}

.major-path span {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.72);
}

.major-path i {
  display: block;
  padding: 8px 0;
  color: var(--gold);
  text-align: center;
  font-style: normal;
  font-size: 1.4rem;
}

.major-context {
  margin-top: 30px;
}

.major-context article {
  padding: 22px;
}

.major-context h3 {
  margin-bottom: 8px;
}

.major-context p {
  margin-bottom: 0;
  color: var(--muted);
}

.major-list-heading {
  margin-top: 72px;
}

.majors-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
}

.major-item {
  overflow: hidden;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.major-item[open] {
  border-color: rgba(1, 127, 75, 0.46);
  box-shadow: 0 14px 34px rgba(1, 59, 36, 0.12);
}

.major-item summary {
  display: grid;
  grid-template-columns: 54px 1fr 28px;
  gap: 14px;
  align-items: center;
  min-height: 88px;
  padding: 16px;
  cursor: pointer;
  list-style: none;
}

.major-item summary::-webkit-details-marker {
  display: none;
}

.major-item summary:hover,
.major-item summary:focus-visible {
  background: var(--green-soft);
}

.major-item summary:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: -3px;
}

.major-number {
  display: grid;
  place-items: center;
  width: 48px;
  aspect-ratio: 1;
  border-radius: 50%;
  color: white;
  background: var(--green);
  font-weight: 700;
}

.major-title strong,
.major-title small {
  display: block;
}

.major-title small {
  margin-top: 5px;
  color: var(--rose);
  font-weight: 700;
  line-height: 1.35;
}

.major-toggle {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--green-dark);
}

.major-toggle::before {
  content: "+";
  font-size: 1.25rem;
  line-height: 1;
}

.major-item[open] .major-toggle::before {
  content: "−";
}

.major-reveal {
  padding: 0 20px 20px 84px;
  border-top: 1px solid var(--line);
}

.major-reveal > p:last-child {
  margin-bottom: 0;
  color: var(--muted);
}

.major-keywords {
  margin: 18px 0 8px;
  color: var(--green-dark);
}

.major-keywords strong {
  display: block;
  margin-bottom: 2px;
  color: var(--rose);
  font-size: 0.74rem;
  text-transform: uppercase;
}

.cards {
  background: #f4f7f0;
}

.card-gallery {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.tarot-card {
  overflow: hidden;
  margin: 0;
}

.tarot-card img {
  display: block;
  width: 100%;
  aspect-ratio: 58 / 100;
  object-fit: cover;
  background: #eee;
}

.tarot-card figcaption {
  padding: 14px;
}

.tarot-card strong {
  display: block;
  margin-bottom: 4px;
}

.tarot-card span {
  color: var(--muted);
  font-size: 0.95rem;
}

.sample-readings {
  color: white;
  background: #102b23;
}

.sample-readings .section-heading p:not(.eyebrow) {
  color: rgba(255, 255, 255, 0.78);
}

.reading-accordion {
  display: grid;
  gap: 14px;
}

.reading-example {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  color: var(--ink);
  background: white;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.2);
}

.reading-example summary {
  display: grid;
  grid-template-columns: 52px 1fr 32px;
  gap: 16px;
  align-items: center;
  min-height: 90px;
  padding: 18px 22px;
  cursor: pointer;
  list-style: none;
}

.reading-example summary::-webkit-details-marker {
  display: none;
}

.reading-example summary:hover,
.reading-example summary:focus-visible {
  background: var(--green-soft);
}

.reading-example summary:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: -3px;
}

.reading-example summary strong,
.reading-example summary small {
  display: block;
}

.reading-example summary strong {
  font-family: Ubuntu, Aptos, "Segoe UI", sans-serif;
  font-size: 1.25rem;
}

.reading-example summary small {
  margin-top: 4px;
  color: var(--muted);
}

.reading-count {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  color: white;
  background: var(--rose);
  font-family: Ubuntu, sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
}

.reading-toggle {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--green-dark);
}

.reading-toggle::before {
  content: "+";
  font-size: 1.3rem;
  line-height: 1;
}

.reading-example[open] .reading-toggle::before {
  content: "−";
}

.reading-reveal {
  padding: clamp(22px, 4vw, 44px);
  border-top: 1px solid var(--line);
  background: #f7faf5;
}

.spread-intro {
  max-width: 900px;
  margin: 0 auto 28px;
  color: var(--muted);
  font-size: 1.04rem;
}

.spread-grid {
  display: grid;
  gap: 16px;
  align-items: start;
  justify-content: center;
}

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

.reading-card {
  position: relative;
  overflow: hidden;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: 0 8px 24px rgba(1, 59, 36, 0.08);
}

.reading-card img {
  display: block;
  width: 100%;
  aspect-ratio: 58 / 100;
  object-fit: cover;
  background: #e7ebe7;
}

.position-label {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 1;
  max-width: calc(100% - 24px);
  padding: 7px 10px;
  border-radius: 5px;
  color: white;
  background: rgba(1, 59, 36, 0.92);
  box-shadow: 0 5px 14px rgba(0, 0, 0, 0.24);
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.25;
}

.reading-card figcaption {
  padding: 18px;
}

.reading-card h3 {
  margin-bottom: 10px;
  font-size: 1.25rem;
}

.reading-card figcaption p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.48;
}

.reading-card figcaption p:first-of-type {
  color: var(--green-dark);
}

.cross-spread {
  grid-template-columns: repeat(3, minmax(0, 220px));
  grid-template-rows: repeat(3, auto);
}

.cross-spread .reading-card figcaption {
  min-height: 248px;
}

.cross-top {
  grid-column: 2;
  grid-row: 1;
}

.cross-left {
  grid-column: 1;
  grid-row: 2;
}

.cross-center {
  grid-column: 2;
  grid-row: 2;
}

.cross-right {
  grid-column: 3;
  grid-row: 2;
}

.cross-bottom {
  grid-column: 2;
  grid-row: 3;
}

.reading-story {
  max-width: 900px;
  margin: 30px auto 0;
  padding: 22px 24px;
  border-left: 5px solid var(--gold);
  background: var(--gold-soft);
}

.reading-story h3 {
  margin-bottom: 8px;
}

.reading-story p {
  margin: 0;
  color: var(--muted);
}

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

.question {
  min-height: 82px;
  text-align: left;
  font-weight: 700;
}

.answer {
  margin-top: 14px;
  padding: 24px;
}

.answer h3 {
  margin-bottom: 8px;
  font-size: 1.5rem;
}

.sources {
  color: white;
  background: var(--green-deep);
}

.sources .section-heading p:not(.eyebrow) {
  color: rgba(255, 255, 255, 0.76);
}

.sources ul {
  margin-top: 0;
  padding: 24px 24px 24px 44px;
  color: var(--ink);
  line-height: 1.8;
}

.back-to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 20;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  color: white;
  background: var(--green-dark);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.24);
  text-decoration: none;
  font-size: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.section-navigator {
  position: fixed;
  left: 50%;
  bottom: 20px;
  z-index: 20;
  display: grid;
  grid-template-columns: 42px minmax(140px, 210px) 42px;
  gap: 6px;
  align-items: center;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 8px;
  color: white;
  background: rgba(1, 59, 36, 0.96);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
  transform: translateX(-50%);
  backdrop-filter: blur(8px);
}

.section-nav-button {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;
  color: white;
  background: rgba(255, 255, 255, 0.1);
  cursor: pointer;
  font-size: 1.25rem;
}

.section-nav-button:hover:not(:disabled),
.section-nav-button:focus-visible {
  color: var(--green-deep);
  background: white;
}

.section-nav-button:disabled {
  opacity: 0.32;
  cursor: default;
}

.section-nav-status {
  min-width: 0;
  text-align: center;
  line-height: 1.15;
}

.section-nav-status span,
.section-nav-status strong {
  display: block;
}

.section-nav-status span {
  margin-bottom: 3px;
  color: rgba(255, 255, 255, 0.66);
  font-size: 0.7rem;
}

.section-nav-status strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: Ubuntu, Aptos, "Segoe UI", sans-serif;
  font-size: 0.88rem;
}

.keyboard-hint {
  display: none;
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.64rem;
}

body.slideshow-mode {
  height: 100dvh;
  overflow: hidden;
}

.slideshow-mode main {
  display: contents;
}

.slideshow-mode .presentation-slide {
  display: none;
  width: 100%;
  height: 100dvh;
  min-height: 100dvh;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.slideshow-mode .presentation-slide.active-slide {
  display: block;
  animation: slide-arrive 260ms ease-out both;
}

.slideshow-mode .hero.presentation-slide.active-slide {
  display: block;
  padding-bottom: 96px;
}

.slideshow-mode .hero-grid {
  min-height: calc(100dvh - 142px);
}

.slideshow-mode .band.presentation-slide {
  padding-top: clamp(84px, 9vh, 112px);
  padding-bottom: 112px;
}

.slideshow-mode footer,
.slideshow-mode .back-to-top {
  display: none;
}

.slideshow-mode .section-navigator {
  grid-template-columns: 48px minmax(180px, 240px) 48px;
  padding: 8px;
}

.slideshow-mode .section-nav-button {
  width: 48px;
  height: 48px;
}

.slideshow-mode .keyboard-hint {
  display: block;
}

@keyframes slide-arrive {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

footer {
  padding: 28px clamp(20px, 5vw, 72px) 92px;
  color: white;
  background: #001e12;
}

footer p {
  max-width: 1240px;
  margin: 0 auto;
  color: rgba(255, 255, 255, 0.8);
}

@media (max-width: 1080px) {
  .number-sequence {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .court-group {
    grid-template-columns: 1fr;
  }

  .court-group > header {
    position: static;
  }
}

@media (max-width: 980px) {
  .hero-grid,
  .route-story,
  .suit-panel,
  .major-story {
    grid-template-columns: 1fr;
  }

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

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

@media (max-width: 760px) {
  h1 {
    font-size: 4.4rem;
  }

  h2 {
    font-size: 2.8rem;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
    padding-right: 0;
  }

  .mode-toggle {
    top: 12px;
    right: 12px;
  }

  .navlinks {
    justify-content: flex-start;
  }

  .hero-grid {
    min-height: auto;
    padding-top: 72px;
  }

  .intro-grid,
  .structure-grid,
  .question-grid,
  .major-context {
    grid-template-columns: 1fr;
  }

  .majors-list,
  .card-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .three-card-spread .reading-card {
    display: grid;
    grid-template-columns: minmax(150px, 0.7fr) minmax(0, 1.3fr);
  }

  .cross-spread {
    grid-template-columns: minmax(0, 340px);
    grid-template-rows: none;
  }

  .cross-top,
  .cross-left,
  .cross-center,
  .cross-right,
  .cross-bottom {
    grid-column: 1;
    grid-row: auto;
  }

  .cross-center {
    order: 1;
  }

  .cross-left {
    order: 2;
  }

  .cross-right {
    order: 3;
  }

  .cross-bottom {
    order: 4;
  }

  .cross-top {
    order: 5;
  }

  .route-map {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    min-height: 560px;
  }

  .route-line,
  .route-map::after {
    display: none;
  }

  .route-node.start,
  .route-node.conditions,
  .route-node.warning,
  .route-node.choice,
  .route-node.destination {
    grid-column: auto;
    grid-row: auto;
  }

  .route-node.destination {
    grid-column: 1 / -1;
  }

  .suit-symbols {
    grid-template-columns: 1fr 1fr;
  }

  .suit-symbols b {
    display: none;
  }

  .court-formula {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .court-formula b {
    transform: rotate(90deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .slideshow-mode .presentation-slide.active-slide {
    animation: none;
  }
}

/* Pri Mateo */
.about-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 92% 8%, rgba(213, 161, 30, 0.18), transparent 26rem),
    var(--paper);
}

.about-header {
  padding: 24px clamp(20px, 5vw, 72px) clamp(54px, 7vw, 88px);
  color: white;
  background:
    linear-gradient(115deg, rgba(1, 59, 36, 0.98), rgba(0, 95, 40, 0.9)),
    var(--green-deep);
}

.about-topbar,
.about-intro,
.about-main,
.about-footer > * {
  width: min(100%, 1240px);
  margin-inline: auto;
}

.about-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-right: 178px;
}

.about-back {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 0 15px;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 999px;
  color: white;
  background: rgba(255, 255, 255, 0.1);
  text-decoration: none;
  font-family: Ubuntu, Aptos, "Segoe UI", sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
}

.about-back:hover,
.about-back:focus-visible {
  color: var(--green-deep);
  background: white;
}

.about-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.75fr);
  gap: clamp(32px, 7vw, 96px);
  align-items: end;
  margin-top: clamp(70px, 10vw, 132px);
}

.about-intro h1 {
  max-width: none;
  font-size: clamp(4.4rem, 9vw, 8rem);
}

.about-deck {
  margin: 0 0 8px;
  color: rgba(255, 255, 255, 0.82);
  font-size: clamp(1.18rem, 2vw, 1.52rem);
  line-height: 1.55;
}

.about-main {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.72fr);
  gap: clamp(44px, 7vw, 96px);
  align-items: start;
  padding: clamp(64px, 8vw, 112px) 0;
}

.about-story h2,
.more-card h2 {
  font-size: clamp(2.8rem, 5vw, 4.8rem);
}

.about-milestones {
  display: grid;
  gap: 0;
  margin: 48px 0 0;
  padding: 0;
  list-style: none;
}

.about-milestones li {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  padding: 28px 0;
  border-top: 1px solid var(--line);
}

.about-milestones li:last-child {
  border-bottom: 1px solid var(--line);
}

.milestone-mark {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 50% 50% 50% 10px;
  color: var(--green-deep);
  background: var(--gold);
  box-shadow: 8px 8px 0 var(--green-soft);
  font-family: Ubuntu, Aptos, "Segoe UI", sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
}

.about-milestones p {
  margin: 0;
  font-size: clamp(1.24rem, 2vw, 1.72rem);
  line-height: 1.42;
}

.about-milestones strong {
  color: var(--green-dark);
}

.about-closing {
  margin-top: 42px;
  padding: clamp(28px, 4vw, 42px);
  border-left: 8px solid var(--gold);
  border-radius: 0 18px 18px 0;
  background: var(--green-soft);
}

.about-closing p {
  margin: 0;
  font-size: clamp(1.18rem, 1.7vw, 1.45rem);
}

.about-profile {
  position: sticky;
  top: 24px;
  display: grid;
  gap: 24px;
}

.about-portrait {
  position: relative;
  margin: 0;
  overflow: hidden;
  border-radius: 28px 28px 8px 28px;
  background: var(--green-soft);
  box-shadow: var(--shadow);
}

.about-portrait::after {
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 20px 20px 4px 20px;
  content: "";
  pointer-events: none;
}

.about-portrait img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center 34%;
}

.about-portrait figcaption {
  position: absolute;
  right: 26px;
  bottom: 24px;
  z-index: 1;
  padding: 8px 12px;
  border-radius: 999px;
  color: white;
  background: rgba(1, 59, 36, 0.86);
  font-family: Ubuntu, Aptos, "Segoe UI", sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  backdrop-filter: blur(8px);
}

.more-card {
  padding: clamp(28px, 4vw, 42px);
  border-radius: 8px 28px 28px 28px;
  color: white;
  background: var(--green-deep);
  box-shadow: var(--shadow);
}

.more-card h2 {
  margin-bottom: 28px;
}

.more-links {
  display: grid;
}

.more-links a {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 3px 16px;
  padding: 18px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  color: white;
  text-decoration: none;
}

.more-links a:last-child {
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

.more-links a > span:first-child {
  grid-column: 1;
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
}

.more-links strong {
  grid-column: 1;
  font-size: 1.05rem;
}

.more-links a > span:last-child {
  grid-column: 2;
  grid-row: 1 / 3;
  align-self: center;
  font-size: 1.35rem;
  transition: transform 160ms ease;
}

.more-links a:hover > span:last-child,
.more-links a:focus-visible > span:last-child {
  transform: translate(4px, -4px);
}

.about-footer {
  padding: 42px clamp(20px, 5vw, 72px);
  background: #001e12;
}

.about-footer .button {
  width: fit-content;
}

.about-presentation,
.about-presentation-nav {
  display: none;
}

.about-page.slideshow-mode .about-header,
.about-page.slideshow-mode .about-main,
.about-page.slideshow-mode .about-footer {
  display: none;
}

.about-page.slideshow-mode .about-presentation {
  display: block;
}

.about-page.slideshow-mode .about-presentation-nav {
  display: grid;
}

.about-presentation-slide {
  display: none;
  width: 100%;
  height: 100dvh;
  min-height: 100dvh;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-gutter: stable;
}

.about-presentation-slide.active-slide {
  display: block;
  animation: slide-arrive 260ms ease-out both;
}

.about-slide-inner {
  position: relative;
  width: 100%;
  min-height: 100dvh;
  padding: clamp(76px, 9vh, 104px) clamp(40px, 7vw, 112px) 112px;
}

.about-slide-back {
  position: absolute;
  top: 24px;
  left: clamp(40px, 7vw, 112px);
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: rgba(255, 255, 255, 0.84);
  text-decoration: none;
  font-family: Ubuntu, Aptos, "Segoe UI", sans-serif;
  font-size: 0.86rem;
  font-weight: 700;
}

.about-slide-back:hover,
.about-slide-back:focus-visible {
  color: white;
}

.about-slide-back.dark {
  color: var(--green-dark);
}

.about-slide-one {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(300px, 0.72fr);
  gap: clamp(44px, 7vw, 104px);
  align-items: center;
  color: white;
  background:
    radial-gradient(circle at 92% 12%, rgba(213, 161, 30, 0.2), transparent 28rem),
    linear-gradient(135deg, var(--green-deep), var(--green-dark));
}

.about-slide-copy h1 {
  max-width: none;
  font-size: clamp(4.8rem, 8.5vw, 8.4rem);
  line-height: 0.82;
}

.about-slide-lede {
  max-width: 660px;
  margin: 28px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: clamp(1.16rem, 1.7vw, 1.48rem);
}

.about-credential-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: clamp(30px, 5vh, 52px);
}

.about-credential-grid article {
  min-height: 132px;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 16px 16px 4px 16px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
}

.about-credential-grid strong,
.about-credential-grid span {
  display: block;
}

.about-credential-grid strong {
  margin-bottom: 14px;
  color: var(--gold);
  font-family: Ubuntu, Aptos, "Segoe UI", sans-serif;
  font-size: clamp(1.15rem, 1.7vw, 1.5rem);
}

.about-credential-grid span {
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.4;
}

.about-slide-portrait {
  position: relative;
  justify-self: end;
  width: min(100%, 440px);
  height: min(70vh, 650px);
  min-height: 480px;
  margin: 0;
  overflow: hidden;
  border: 12px solid rgba(255, 255, 255, 0.1);
  border-radius: 34px 34px 8px 34px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.3);
}

.about-slide-portrait::after {
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 20px 20px 4px 20px;
  content: "";
}

.about-slide-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 34%;
}

.about-slide-two {
  display: grid;
  grid-template-columns: minmax(0, 1.16fr) minmax(320px, 0.7fr);
  gap: clamp(44px, 7vw, 104px);
  align-items: center;
  background:
    radial-gradient(circle at 90% 8%, rgba(213, 161, 30, 0.15), transparent 24rem),
    var(--paper);
}

.about-slide-legacy h2 {
  max-width: 780px;
  font-size: clamp(3rem, 5.2vw, 5.4rem);
}

.legacy-item {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  max-width: 850px;
  padding: 24px 0;
  border-top: 1px solid var(--line);
}

.about-slide-legacy h2 + .legacy-item {
  margin-top: 30px;
}

.legacy-item > span {
  color: var(--gold);
  font-family: Ubuntu, Aptos, "Segoe UI", sans-serif;
  font-size: 1.55rem;
  font-weight: 700;
}

.legacy-item p {
  margin: 0;
  font-size: clamp(1.05rem, 1.45vw, 1.32rem);
  line-height: 1.5;
}

.legacy-item strong {
  color: var(--green-dark);
}

.legacy-now {
  max-width: 820px;
  margin: 10px 0 0;
  padding: 22px 26px;
  border-left: 7px solid var(--gold);
  border-radius: 0 14px 14px 0;
  background: var(--green-soft);
  font-size: clamp(1rem, 1.3vw, 1.2rem);
}

.about-slide-more {
  align-self: center;
}

.about-slide-more h2 {
  font-size: clamp(2.8rem, 4.2vw, 4.5rem);
}

@media (max-width: 980px) {
  .about-slide-one,
  .about-slide-two {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .about-slide-portrait {
    justify-self: start;
    width: min(100%, 390px);
    height: 480px;
  }

  .about-slide-two {
    padding-top: 94px;
  }
}

@media (max-width: 1300px) {
  .about-main {
    width: auto;
    margin-inline: clamp(20px, 5vw, 72px);
  }
}

@media (max-width: 900px) {
  .about-intro,
  .about-main {
    grid-template-columns: 1fr;
  }

  .about-profile {
    position: static;
    grid-template-columns: minmax(240px, 0.72fr) minmax(300px, 1fr);
  }
}

@media (max-width: 620px) {
  .about-topbar,
  .about-profile {
    grid-template-columns: 1fr;
  }

  .about-topbar {
    align-items: flex-start;
    flex-direction: column;
    padding-right: 0;
  }

  .about-intro {
    margin-top: 64px;
  }

  .about-milestones li {
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 18px;
  }

  .milestone-mark {
    width: 50px;
    height: 50px;
    font-size: 1rem;
  }

  .about-slide-inner {
    padding: 82px 20px 110px;
  }

  .about-slide-back {
    left: 20px;
  }

  .about-credential-grid {
    grid-template-columns: 1fr;
  }

  .about-slide-portrait {
    min-height: 420px;
  }

  .legacy-item {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .about-presentation-slide.active-slide {
    animation: none;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 3.2rem;
  }

  h2 {
    font-size: 2.2rem;
  }

  .lede {
    font-size: 1.08rem;
  }

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

  .hero-cards img:nth-child(2) {
    transform: none;
  }

  .number-sequence,
  .majors-list,
  .card-gallery,
  .rank-grid {
    grid-template-columns: 1fr;
  }

  .major-reveal {
    padding-left: 20px;
  }

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

  .reading-example summary {
    grid-template-columns: 46px 1fr 28px;
    gap: 12px;
    padding: 14px;
  }

  .reading-count {
    width: 44px;
    height: 44px;
  }

  .three-card-spread .reading-card {
    display: block;
  }

  .route-map {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .route-node.destination {
    grid-column: auto;
  }

  .suit-symbols {
    grid-template-columns: 1fr;
  }

  .suit-symbols div {
    min-height: 150px;
  }

  .section-navigator {
    bottom: 12px;
    grid-template-columns: 40px minmax(120px, 1fr) 40px;
    width: min(280px, calc(100vw - 100px));
  }

  .section-nav-button {
    width: 40px;
    height: 40px;
  }

  .back-to-top {
    right: 12px;
    bottom: 80px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .back-to-top {
    transition: none;
  }

}
