/* Header wordmark: every view. */
body > header .brand.wordmark {
  flex: 0 0 auto;
  width: auto;
  height: auto;
  align-self: center;
  font-family: 'Chakra Petch', sans-serif;
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: 0.06em;
  color: #12303d;
  text-decoration: none;
  white-space: nowrap;
}
body > header .brand.wordmark span {
  color: #96610b;
}

/* Dark landing theme (matches the splash art). */
body.landing-view {
  --bg: #0c1115;
  --panel: #131c23;
  --line: #2b3942;
  --muted: #a0b0bb;
  --text: #edf3f4;
  --blue: #71dfd2;
  --red: #fb827b;
  --gold: #eed7a1;
  background: var(--bg);
  color: var(--text);
}
body.landing-view > header {
  background: var(--bg);
  border-bottom-color: var(--line);
  box-shadow: none;
}
body.landing-view > header:after {
  display: none;
}
body.landing-view > header .brand.wordmark {
  color: var(--text);
}
body.landing-view > header .brand.wordmark span {
  color: var(--gold);
}
body.landing-view > header .nav {
  color: var(--muted);
}
body.landing-view > header .nav:hover {
  background: var(--panel);
  border-color: var(--line);
}
body.landing-view > header .nav.active {
  background: var(--panel);
  border-color: var(--line);
  color: var(--text);
  box-shadow: none;
}
body.landing-view > header .nav span {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
}
body.landing-view > header .edition {
  color: var(--muted);
}
body.landing-view main {
  padding: 0;
  max-width: none;
}

.landing {
  display: flex;
  flex-direction: column;
  gap: 44px;
  padding-bottom: 48px;
  font-family: 'DM Sans', sans-serif;
}
.landing h2,
.landing h3,
.mode-name strong {
  font-family: 'Chakra Petch', sans-serif;
  font-weight: 600;
  letter-spacing: 0;
}
.hero {
  position: relative;
  overflow: hidden;
}
/* Past its display width the art stops growing; a blurred, dimmed copy fills the sides and the edges fade into it. */
.hero:before {
  content: '';
  position: absolute;
  inset: -40px;
  background: url('art/splash-960.webp') center 18% / cover;
  filter: blur(36px) brightness(0.45) saturate(1.2);
}
.hero picture {
  position: relative;
  display: block;
  width: min(100%, 1440px);
  min-height: 260px;
  margin: 0 auto;
  aspect-ratio: 100 / 43;
}
@media (min-width: 1441px) {
  .hero picture {
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent);
  }
}
.hero img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
}
.hero:after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, color-mix(in srgb, var(--bg) 85%, transparent) 85%, var(--bg));
}
.hero-copy {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 36px;
  z-index: 1;
  text-align: center;
}
.hero-lead {
  margin: 0 auto;
  max-width: 720px;
  font-size: 1.375rem;
  font-weight: 500;
  line-height: 1.4;
}
.hero-sub {
  margin: 10px 0 0;
  font-size: 0.875rem;
  color: var(--muted);
}
.landing-step,
.landing-foot {
  width: min(1200px, 100% - 32px);
  margin: 0 auto;
  box-sizing: border-box;
}
.step-head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 18px;
}
.step-head h2 {
  margin: 0;
  font-size: 1.875rem;
}
.step-num {
  font-family: 'Chakra Petch', sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 0.12em;
}
.step-head .tutorial-opt-in,
.step-head .side-note {
  margin: 0 0 0 auto;
}
.landing .tutorial-opt-in {
  gap: 12px;
  padding: 8px 12px;
  background: var(--panel);
  border-color: var(--line);
  color: var(--text);
}
.landing .tutorial-opt-in small {
  margin-top: 2px;
  color: var(--muted);
}
/* Settings, not choices: the checkboxes are drawn as switches (role="switch" keeps their semantics). */
.landing .tutorial-opt-in input {
  appearance: none;
  position: relative;
  width: 40px;
  height: 22px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #0c1115;
  cursor: pointer;
  transition:
    background 0.15s,
    border-color 0.15s;
}
.landing .tutorial-opt-in input::before {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--muted);
  transition:
    transform 0.15s,
    background 0.15s;
}
.landing .tutorial-opt-in input:checked {
  background: color-mix(in srgb, var(--blue) 35%, #0c1115);
  border-color: var(--blue);
}
.landing .tutorial-opt-in input:checked::before {
  transform: translateX(18px);
  background: var(--blue);
}
.landing .tutorial-opt-in input:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}
@media (prefers-reduced-motion: reduce) {
  .landing .tutorial-opt-in input,
  .landing .tutorial-opt-in input::before {
    transition: none;
  }
}
.step-head .step-options {
  margin: 0 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.step-head .step-options > * {
  margin: 0;
}
.landing .expansion-opt-in input:disabled + span {
  opacity: 0.6;
}
.side-note {
  color: var(--muted);
}
.mode-grid,
.side-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
/* Angled shapes (approved mockup v3): notched mode cards, blade-cut faction panels, slanted buttons, diamond selector. */
.mode-card,
.mode-inner {
  clip-path: polygon(26px 0, 100% 0, 100% calc(100% - 26px), calc(100% - 26px) 100%, 0 100%, 0 26px);
}
.side-frame,
.side {
  clip-path: polygon(0 0, calc(100% - 34px) 0, 100% 34px, 100% 100%, 34px 100%, 0 calc(100% - 34px));
}
.slant {
  clip-path: polygon(14px 0, 100% 0, calc(100% - 14px) 100%, 0 100%);
}
.mode-slot {
  display: flex;
}
.mode-slot:focus-within {
  filter: drop-shadow(0 0 2px var(--gold)) drop-shadow(0 0 6px color-mix(in srgb, var(--gold) 50%, transparent));
}
.mode-card {
  display: block;
  width: 100%;
  padding: 2px;
  border: 0;
  background: var(--line);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.mode-card:focus-visible {
  outline: none;
}
.mode-card[aria-pressed='true'] {
  background: var(--gold);
}
.mode-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: flex-start;
  height: 100%;
  box-sizing: border-box;
  padding: 28px 34px;
  background: var(--panel);
}
.mode-inner:before {
  content: '';
  position: absolute;
  top: 0;
  right: 44px;
  width: 64px;
  height: 3px;
  background: var(--line);
}
.mode-card[aria-pressed='true'] .mode-inner {
  background: #17242c;
}
.mode-card[aria-pressed='true'] .mode-inner:before {
  background: var(--gold);
}
.mode-head {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
}
.mode-icon {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--muted);
  clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px);
}
.mode-card[aria-pressed='true'] .mode-icon {
  color: var(--gold);
  border-color: var(--gold);
}
.mode-icon svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.mode-name {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex-grow: 1;
}
.mode-name strong {
  font-size: 1.625rem;
}
.mode-radio {
  width: 18px;
  height: 18px;
  margin-right: 4px;
  flex-shrink: 0;
  box-sizing: border-box;
  transform: rotate(45deg);
  border: 2px solid #51646f;
}
.mode-card[aria-pressed='true'] .mode-radio {
  border-color: var(--gold);
  background: radial-gradient(var(--gold) 0 3px, transparent 4px);
}
.mode-body {
  font-size: 1rem;
  line-height: 1.55;
  color: #c9d4db;
}
.side-frame {
  padding: 2px;
  background: var(--line);
}
.side {
  display: flex;
  gap: 22px;
  align-items: center;
  height: 100%;
  box-sizing: border-box;
  padding: 26px 42px 26px 30px;
  background: var(--panel);
}
.side.blue {
  border-top: 4px solid var(--blue);
}
.side.red {
  border-top: 4px solid var(--red);
}
.side img {
  width: 96px;
  height: 96px;
  flex-shrink: 0;
}
.side-copy {
  flex-grow: 1;
}
.side h3 {
  margin: 4px 0 8px;
  font-size: 1.75rem;
}
.side p {
  margin: 0;
  color: #c9d4db;
  line-height: 1.5;
}
.side.blue .eyebrow {
  color: var(--blue);
}
.side.red .eyebrow {
  color: var(--red);
}
.side .primary {
  flex-shrink: 0;
  min-height: 48px;
  padding: 13px 32px;
  border: 0;
  border-radius: 0;
  font-weight: 700;
}
.side .primary:focus-visible {
  outline: none;
}
.cta-slot {
  display: flex;
  flex-shrink: 0;
}
.cta-slot:focus-within {
  filter: drop-shadow(0 0 2px var(--gold)) drop-shadow(0 0 6px color-mix(in srgb, var(--gold) 50%, transparent));
}
.side.blue .primary {
  background: var(--blue);
  color: #0b1c20;
}
.side.red .primary {
  background: var(--red);
  color: #2a0d0b;
}
.landing-foot {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 24px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  font-size: 0.8125rem;
  color: var(--muted);
}

.landing .eyebrow {
  margin: 0;
}
.mode-name .eyebrow {
  color: var(--muted);
}
.landing .tag {
  background: transparent;
  border-color: var(--line);
  color: var(--muted);
}
.landing .tags {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
body.landing-view .side.blue .primary:hover:not(:disabled) {
  background: #a6efe6;
  color: #0b1c20;
}
body.landing-view .side.red .primary:hover:not(:disabled) {
  background: #ffa39d;
  color: #2a0d0b;
}
body.landing-view .mode-card:hover:not(:disabled) {
  background: var(--muted);
}
body.landing-view .mode-card[aria-pressed='true']:hover:not(:disabled) {
  background: var(--gold);
}
@media (max-width: 760px) {
  .mode-grid,
  .side-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .hero-copy {
    position: static;
    padding: 4px 16px 0;
  }
  .hero-lead {
    font-size: 1.0625rem;
  }
  .hero-sub {
    display: none;
  }
  .landing {
    gap: 32px;
  }
  .step-head h2 {
    font-size: 1.5rem;
  }
  .step-head .tutorial-opt-in,
  .step-head .side-note {
    margin: 0;
    flex-basis: 100%;
  }
  .mode-card,
  .mode-inner {
    clip-path: polygon(18px 0, 100% 0, 100% calc(100% - 18px), calc(100% - 18px) 100%, 0 100%, 0 18px);
  }
  .side-frame,
  .side {
    clip-path: polygon(0 0, calc(100% - 24px) 0, 100% 24px, 100% 100%, 24px 100%, 0 calc(100% - 24px));
  }
  .mode-inner,
  .side {
    padding: 18px 22px;
  }
  .side {
    flex-wrap: wrap;
  }
  .side img {
    width: 64px;
    height: 64px;
  }
  .cta-slot {
    flex-basis: 100%;
  }
  .side .primary {
    flex-grow: 1;
    justify-content: center;
  }
  .hero {
    height: auto;
    overflow: visible;
  }
  .hero:before {
    display: none;
  }
  .hero picture {
    aspect-ratio: auto;
    min-height: 0;
  }
  .hero img {
    height: 300px;
  }
  .hero:after {
    height: 300px;
    inset: 0 0 auto;
  }
}
