@font-face {
  font-family: "Matisse Dee";
  src: url("fonts/FOT-Matisse-Pro-L.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Matisse Dee";
  src: url("fonts/FOT-Matisse-Pro-M.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Matisse Dee";
  src: url("fonts/FOT-Matisse-Pro-EB.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --ink: #f3efe2;
  --muted: #bdb49f;
  --dim: #837c6e;
  --ground: #080909;
  --panel: #111413;
  --paper: #e9ddc4;
  --paper-ink: #1d1a16;
  --blue: #74d8ff;
  --green: #73936f;
  --line: rgba(233, 221, 196, 0.22);
  --line-strong: rgba(233, 221, 196, 0.45);
  --shadow: rgba(0, 0, 0, 0.48);
  --measure: 73ch;
  --serif: "Matisse Dee", Georgia, "Times New Roman", serif;
  --sans: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", "Courier New", monospace;
  font-family: var(--sans);
  letter-spacing: 0;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(116, 216, 255, 0.08) 1px, transparent 1px),
    linear-gradient(rgba(233, 221, 196, 0.035) 1px, transparent 1px),
    radial-gradient(circle at 50% 0, rgba(116, 216, 255, 0.16), transparent 360px),
    var(--ground);
  background-size: 34px 34px, 34px 34px, auto, auto;
  font-size: 16px;
  line-height: 1.58;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 40;
  pointer-events: none;
  background: linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 100% 5px;
  opacity: 0.34;
}

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

a {
  color: var(--blue);
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--ink);
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 4px;
}

.reading-meter {
  position: fixed;
  inset: 0 0 auto;
  z-index: 60;
  height: 4px;
  background: rgba(233, 221, 196, 0.12);
}

.reading-meter span {
  display: block;
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--green), var(--blue), var(--paper));
}

.site-shell {
  width: min(100% - 24px, 1120px);
  margin: 18px auto 44px;
  border: 1px solid var(--line-strong);
  background:
    linear-gradient(180deg, rgba(20, 83, 119, 0.22), transparent 520px),
    rgba(8, 9, 9, 0.9);
  box-shadow: 0 24px 80px var(--shadow);
}

.utility-bar {
  position: sticky;
  top: 4px;
  z-index: 50;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  min-height: 42px;
  padding: 6px 10px;
  border-bottom: 1px solid #6f6f6f;
  background: #d1cbbc;
  color: #141414;
  font: 700 12px/1.2 var(--mono);
  text-transform: uppercase;
}

.brand {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 2px solid #141414;
  background: var(--ground);
  color: var(--blue);
  text-decoration: none;
}

.utility-bar nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.utility-bar nav a {
  padding: 5px 8px;
  border: 1px solid #57534c;
  background: #f2ead8;
  color: #141414;
  text-decoration: none;
}

.utility-bar nav a[aria-current="page"],
.utility-bar nav a:hover {
  background: #141414;
  color: var(--paper);
}

.hero {
  position: relative;
  border-bottom: 1px solid var(--line-strong);
}

.hero-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  gap: clamp(24px, 5vw, 56px);
  align-items: end;
  padding: clamp(40px, 7vw, 88px) clamp(18px, 5vw, 58px);
}

.hero-compact {
  min-height: 58vh;
  display: grid;
  align-items: end;
  padding: clamp(58px, 10vw, 120px) clamp(18px, 6vw, 72px) clamp(36px, 7vw, 78px);
  background:
    linear-gradient(180deg, rgba(8, 9, 9, 0.16), rgba(8, 9, 9, 0.78)),
    linear-gradient(90deg, rgba(8, 9, 9, 0.9), rgba(8, 9, 9, 0.2)),
    url("dee-praxis-threshold.png") center / cover;
}

.hero-copy {
  max-width: 700px;
}

.page-grimoire .hero-copy {
  max-width: 880px;
}

.kicker,
.folio,
.plate-caption,
.rail-title,
.label {
  color: var(--blue);
  font: 700 11px/1.25 var(--mono);
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 800;
  letter-spacing: 0;
}

h1 {
  max-width: 11ch;
  margin-top: 12px;
  color: var(--ink);
  font-size: 6.5rem;
  line-height: 0.9;
  text-wrap: balance;
}

.page-tome h1 {
  max-width: 10.5ch;
}

.page-grimoire h1 {
  max-width: 15.5ch;
}

.lede {
  max-width: 620px;
  margin: 20px 0 0;
  color: var(--paper);
  font: 400 1.8rem/1.28 var(--serif);
  text-wrap: balance;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 9px 14px;
  border: 1px solid var(--line-strong);
  background: rgba(233, 221, 196, 0.08);
  color: var(--ink);
  font: 700 12px/1 var(--mono);
  text-decoration: none;
  text-transform: uppercase;
}

.button.primary,
.button:hover {
  background: var(--paper);
  color: var(--paper-ink);
}

.threshold-image {
  margin: 0;
  border: 1px solid var(--line-strong);
  background: var(--panel);
}

.threshold-image img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  filter: saturate(0.86) contrast(1.04);
}

.threshold-image figcaption {
  margin: 0;
  padding: 10px 12px;
  color: var(--muted);
  font: 12px/1.4 var(--mono);
}

.content-layout {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  align-items: start;
}

.side-rail {
  min-height: 100%;
  border-right: 1px solid var(--line);
  background: rgba(233, 221, 196, 0.045);
}

.rail-inner {
  position: sticky;
  top: 54px;
  display: grid;
  gap: 14px;
  padding: 18px;
}

.side-rail nav {
  display: grid;
  gap: 7px;
}

.side-rail nav a {
  padding: 7px 8px;
  border-left: 2px solid transparent;
  color: var(--muted);
  font: 700 12px/1.28 var(--sans);
  text-decoration: none;
}

.side-rail nav a:hover {
  border-left-color: var(--blue);
  color: var(--ink);
  background: rgba(116, 216, 255, 0.08);
}

.rail-note {
  margin-top: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.rail-note b {
  display: block;
  color: var(--ink);
  font: 800 18px/1.1 var(--serif);
}

.prose {
  /* max-width: var(--measure); */
  padding: clamp(26px, 5vw, 62px);
}

.prose h1 {
  max-width: none;
  margin: 68px 0 22px;
  padding-top: 22px;
  border-top: 1px solid var(--line-strong);
  color: var(--paper);
  font-size: 3.6rem;
  line-height: 1;
}

.prose h1:first-child {
  margin-top: 0;
}

.prose h2 {
  margin: 34px 0 12px;
  color: var(--ink);
  font-size: 2.35rem;
  line-height: 1.08;
}

.prose p,
.prose li {
  color: rgba(243, 239, 226, 0.86);
  font: 400 19px/1.74 var(--serif);
}

.prose p {
  margin: 0 0 18px;
}

.prose ul {
  margin: 16px 0 24px;
  padding-left: 22px;
}

.prose blockquote {
  margin: 32px 0;
  padding: 18px 22px;
  border-left: 3px solid var(--blue);
  background: rgba(116, 216, 255, 0.075);
}

.prose blockquote p {
  margin: 0;
  color: var(--paper);
  font-size: 1.9rem;
  line-height: 1.26;
}

.prose hr {
  margin: 32px 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.strategy-band {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
  background: rgba(233, 221, 196, 0.04);
}

.strategy-item {
  min-height: 172px;
  padding: 18px;
  border-right: 1px solid var(--line);
}

.strategy-item:last-child {
  border-right: 0;
}

.strategy-item h2 {
  margin-top: 24px;
  color: var(--ink);
  font-size: 25px;
  line-height: 1.05;
}

.strategy-item p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.section {
  border-bottom: 1px solid var(--line);
}

.section-inner {
  width: min(100% - 36px, 960px);
  margin: 0 auto;
  padding: clamp(46px, 8vw, 86px) 0;
}

.section-head {
  display: flex;
  gap: clamp(24px, 5vw, 58px);
  align-items: center;
  margin-bottom: 30px;
}

.section-head > div {
  width: 55%;
  flex: 0 0 55%;
}

.section h2,
.closing h2 {
  margin-top: 9px;
  color: var(--ink);
  font-size: 4.25rem;
  line-height: 0.96;
  text-wrap: balance;
}

.section-head p,
.closing p {
  margin: 0;
  color: var(--paper);
  font: 400 1.5rem/1.42 var(--serif);
}

.plate {
  border: 1px solid var(--line-strong);
  background:
    linear-gradient(rgba(233, 221, 196, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(233, 221, 196, 0.045) 1px, transparent 1px),
    rgba(17, 20, 19, 0.84);
  background-size: 26px 26px, 26px 26px, auto;
}

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

.ledger article,
.instrument-list article,
.practice-card,
.warning-list article,
.map-note {
  padding: 18px;
  border-top: 1px solid var(--line);
}

.ledger article:nth-child(-n + 2) {
  border-top: 0;
}

.ledger article:nth-child(odd) {
  border-right: 1px solid var(--line);
}

.ledger h3,
.instrument-list h3,
.practice-card h3,
.warning-list h3,
.map-note h3 {
  color: var(--ink);
  font-size: 25px;
  line-height: 1.08;
}

.ledger p,
.instrument-list p,
.practice-card p,
.warning-list p,
.map-note p {
  margin: 8px 0 0;
  color: var(--muted);
}

.companion-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(0, 1.1fr);
  gap: 1px;
  background: var(--line);
}

.figure-panel,
.map-notes {
  background: rgba(17, 20, 19, 0.92);
}

.figure-panel {
  display: grid;
  min-height: 420px;
  place-items: center;
  padding: 24px;
}

.symbol {
  position: relative;
  width: min(100%, 360px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  appearance: none;
  background:
    radial-gradient(circle, rgba(116, 216, 255, 0.2), transparent 17%),
    repeating-radial-gradient(circle, transparent 0 18%, rgba(233, 221, 196, 0.12) 18.2% 18.7%),
    conic-gradient(from 22deg, rgba(116, 216, 255, 0.12), transparent 18%, rgba(233, 221, 196, 0.12), transparent 50%, rgba(115, 147, 111, 0.14), transparent 82%);
  cursor: pointer;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.symbol::before,
.symbol::after {
  content: "";
  position: absolute;
  inset: 18%;
  border: 1px solid rgba(116, 216, 255, 0.48);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}

.symbol::after {
  transform: rotate(180deg);
  border-color: rgba(233, 221, 196, 0.38);
}

.symbol span {
  position: relative;
  z-index: 1;
  display: grid;
  width: 72px;
  height: 72px;
  place-items: center;
  border-radius: 50%;
  background: rgba(8, 9, 9, 0.78);
  color: var(--blue);
  font: 800 20px/1 var(--mono);
  box-shadow: 0 0 52px rgba(116, 216, 255, 0.5);
}

.interactive-symbol:hover,
.interactive-symbol:focus-visible,
.interactive-symbol.is-active {
  border-color: var(--blue);
  box-shadow: 0 0 44px rgba(116, 216, 255, 0.22);
  transform: translateY(-2px);
}

.interactive-symbol.is-active::before {
  border-color: var(--paper);
}

.interactive-symbol.is-active::after {
  border-color: var(--blue);
}

.map-notes {
  display: grid;
}

.instrument-list {
  display: grid;
}

.instrument-list article {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}

.instrument-list svg {
  width: 100%;
  color: var(--blue);
  transition: color 180ms ease, filter 180ms ease, transform 180ms ease;
}

.interactive-card {
  cursor: pointer;
  transition: background-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.interactive-card:hover,
.interactive-card:focus-visible,
.interactive-card.is-active {
  background-color: rgba(116, 216, 255, 0.08);
  box-shadow: inset 3px 0 0 var(--blue);
  transform: translateY(-1px);
}

.interactive-card:hover svg,
.interactive-card:focus-visible svg,
.interactive-card.is-active svg {
  color: var(--paper);
  filter: drop-shadow(0 0 12px rgba(116, 216, 255, 0.55));
  transform: translateX(2px);
}

.anatomy-spread {
  display: grid;
  grid-template-columns: minmax(280px, 0.95fr) minmax(0, 1.05fr);
  gap: 1px;
  background: var(--line);
}

.anatomy-plate,
.anatomy-notes {
  background: rgba(17, 20, 19, 0.92);
}

.anatomy-plate {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  color: var(--paper);
  background:
    linear-gradient(rgba(233, 221, 196, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(233, 221, 196, 0.055) 1px, transparent 1px),
    radial-gradient(circle at 50% 44%, rgba(116, 216, 255, 0.16), transparent 190px),
    rgba(17, 20, 19, 0.92);
  background-size: 28px 28px, 28px 28px, auto, auto;
}

.anatomy-plate svg {
  position: absolute;
  inset: 7%;
  width: 86%;
  height: 86%;
  color: rgba(243, 239, 226, 0.82);
}

.anatomy-sigil {
  position: absolute;
  top: 38%;
  left: 50%;
  z-index: 2;
  width: 142px;
  height: 126px;
  padding: 0;
  border: 0;
  color: var(--blue);
  background: transparent;
  transform: translateX(-50%);
  cursor: pointer;
}

.anatomy-sigil:hover,
.anatomy-sigil:focus-visible,
.anatomy-sigil.is-active {
  filter: drop-shadow(0 0 24px rgba(116, 216, 255, 0.78));
  transform: translateX(-50%) translateY(-2px);
}

.anatomy-sigil svg {
  width: 100%;
  height: 100%;
}

.callout {
  position: absolute;
  z-index: 3;
  max-width: 172px;
  color: var(--muted);
  font: 700 11px/1.3 var(--mono);
  text-transform: uppercase;
}

.callout::before {
  content: "";
  display: block;
  width: 72px;
  height: 1px;
  margin-bottom: 7px;
  background: var(--line-strong);
}

.c1 {
  top: 7%;
  left: 8%;
}

.c2 {
  top: 34%;
  right: 5%;
  color: var(--paper);
}

.c3 {
  bottom: 27%;
  left: 7%;
}

.c4 {
  right: 6%;
  bottom: 8%;
}

.anatomy-notes {
  display: grid;
}

.anatomy-notes article {
  padding: 18px;
  border-top: 1px solid var(--line);
}

.anatomy-notes article:first-child {
  border-top: 0;
}

.anatomy-notes h3 {
  color: var(--ink);
  font-size: 25px;
  line-height: 1.08;
}

.anatomy-notes p {
  margin: 8px 0 0;
  color: var(--muted);
}

.practice-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
}

.practice-card {
  min-height: 220px;
  background: rgba(17, 20, 19, 0.92);
}

.practice-card .label {
  display: block;
  margin-bottom: 28px;
  color: var(--green);
}

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

.warning-list article:nth-child(-n + 2) {
  border-top: 0;
}

.warning-list article:nth-child(odd) {
  border-right: 1px solid var(--line);
}

.closing {
  padding: clamp(54px, 8vw, 92px) 0;
  background: var(--paper);
  color: var(--paper-ink);
}

.closing .folio,
.closing h2,
.closing p {
  color: var(--paper-ink);
}

.closing-ledger {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-top: 28px;
  background: rgba(29, 26, 22, 0.24);
}

.closing-ledger div {
  padding: 15px;
  background: rgba(255, 255, 255, 0.45);
}

.closing-ledger b {
  display: block;
  font: 700 11px/1 var(--mono);
  text-transform: uppercase;
}

.closing-ledger span {
  display: block;
  margin-top: 8px;
}

.signup-section {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(233, 221, 196, 0.055);
}

.signup-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: clamp(24px, 5vw, 58px);
  align-items: end;
}

.signup-panel h2 {
  margin-top: 9px;
  color: var(--ink);
  font-size: 3.6rem;
  line-height: 0.98;
  text-wrap: balance;
}

.signup-panel p {
  max-width: 600px;
  margin: 14px 0 0;
  color: var(--paper);
  font: 400 1.35rem/1.42 var(--serif);
}

.signup-form {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line-strong);
  background: rgba(17, 20, 19, 0.92);
}

.signup-form label {
  display: grid;
  gap: 7px;
}

.signup-form label span,
.form-note {
  color: var(--muted);
  font: 700 11px/1.3 var(--mono);
  text-transform: uppercase;
}

.signup-form input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: 0;
  background: var(--paper);
  color: var(--paper-ink);
  font: 16px/1.2 var(--sans);
  padding: 9px 10px;
}

.signup-form .button {
  width: 100%;
}

.signup-form .button.primary {
  border-color: rgba(116, 216, 255, 0.72);
  background: #145377;
  color: var(--ink);
  box-shadow: inset 0 0 0 1px rgba(243, 239, 226, 0.18), 0 0 18px rgba(116, 216, 255, 0.16);
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.signup-form .button.primary:hover,
.signup-form .button.primary:focus-visible {
  border-color: var(--paper);
  background: var(--blue);
  color: #071013;
  box-shadow: inset 0 0 0 1px rgba(7, 16, 19, 0.18), 0 0 26px rgba(116, 216, 255, 0.42);
  transform: translateY(-1px);
}

.form-note {
  margin: 0;
  text-transform: none;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font: 12px/1.3 var(--mono);
}

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 500ms ease, transform 500ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

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

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

@media (max-width: 880px) {
  .site-shell {
    width: min(100% - 14px, 1120px);
    margin-top: 8px;
  }

  .utility-bar {
    grid-template-columns: auto 1fr;
  }

  .utility-bar nav {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .hero-split,
  .content-layout,
  .companion-grid,
  .anatomy-spread,
  .signup-panel {
    grid-template-columns: 1fr;
  }

  .section-head {
    flex-direction: column;
    align-items: stretch;
  }

  .section-head > div {
    width: 100%;
    flex: none;
  }

  .side-rail {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .rail-inner {
    position: static;
  }

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

  .strategy-band,
  .practice-grid,
  .closing-ledger {
    grid-template-columns: 1fr;
  }

  .strategy-item {
    min-height: auto;
    border-right: 0;
    border-top: 1px solid var(--line);
  }

  .strategy-item:first-child {
    border-top: 0;
  }

  .threshold-image img {
    aspect-ratio: 16 / 10;
  }
}

@media (max-width: 620px) {
  body {
    font-size: 15px;
  }

  .hero-split,
  .hero-compact {
    padding-inline: 16px;
  }

  h1 {
    font-size: 3.5rem;
  }

  .lede {
    font-size: 1.25rem;
  }

  .prose {
    padding: 26px 18px;
  }

  .prose p,
  .prose li {
    font-size: 18px;
    line-height: 1.68;
  }

  .signup-panel h2 {
    font-size: 3rem;
  }

  .anatomy-plate {
    min-height: 480px;
  }

  .side-rail nav,
  .ledger,
  .warning-list,
  .instrument-list article {
    grid-template-columns: 1fr;
  }

  .ledger article,
  .warning-list article {
    border-right: 0;
  }

  .ledger article:nth-child(2),
  .warning-list article:nth-child(2) {
    border-top: 1px solid var(--line);
  }
}

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

  .section h2,
  .closing h2 {
    font-size: 3rem;
  }

  .prose h1 {
    font-size: 2.8rem;
  }

  .prose h2 {
    font-size: 2rem;
  }

  .anatomy-plate {
    min-height: 420px;
  }

  .callout {
    max-width: 128px;
    font-size: 10px;
  }

  .anatomy-sigil {
    width: 112px;
    height: 100px;
  }
}
