:root {
  color-scheme: light;
  --paper: #e9e2d4;
  --paper-raised: #ddd3c0;
  --paper-soft: #e1d8c8;
  --ink: #24231e;
  --ink-soft: #3b3931;
  --muted: #655e53;
  --muted-2: #786f62;
  --rule: #817666;
  --rust: #9a4d32;
  --rust-soft: #c98561;
  --panel: #2e322b;
  --panel-2: #3d433a;
  --panel-text: #f1e9d9;
  --panel-muted: #cfc5b2;
  --blue: #256fa8;
  --blue-light: #7ba9c7;
  --serif: "Source Serif 4", Georgia, serif;
  --mono: "IBM Plex Mono", "Courier New", monospace;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--paper);
}

body {
  margin: 0;
  min-width: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
}

.skip-link {
  position: fixed;
  left: 1rem;
  top: 1rem;
  z-index: 20;
  transform: translateY(-160%);
  background: var(--ink);
  color: var(--paper);
  padding: 0.7rem 1rem;
  font: 500 0.75rem/1 var(--mono);
  text-decoration: none;
}

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

.site-header {
  width: min(1328px, calc(100% - 7rem));
  margin: 0 auto;
  min-height: 83px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  border-bottom: 1px solid color-mix(in srgb, var(--rule) 55%, transparent);
}

.wordmark,
.desktop-nav a,
.mobile-nav summary,
.mobile-nav a,
.micro-label,
.public-index a,
.path-code,
.path-action,
.current-meta,
.current-link {
  font-family: var(--mono);
  text-transform: uppercase;
}

.wordmark {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-decoration: none;
}

.desktop-nav {
  display: flex;
  gap: 2.7rem;
}

.desktop-nav a {
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-decoration: none;
}

.desktop-nav a:hover,
.desktop-nav a:focus-visible,
.public-index a:hover,
.public-index a:focus-visible {
  color: var(--rust);
}

.mobile-nav {
  display: none;
}

.micro-label {
  margin: 0;
  font-size: 0.69rem;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.13em;
}

.muted { color: var(--muted-2); }
.rust, .signal-rust { color: var(--rust); }

.threshold-shell {
  width: min(1328px, calc(100% - 7rem));
  margin: 3.3rem auto 0;
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 54px;
}

.public-index {
  padding-top: 0.25rem;
}

.public-index ol {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
}

.public-index li {
  border-bottom: 1px solid color-mix(in srgb, var(--rule) 32%, transparent);
}

.public-index a {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 0.55rem;
  padding: 1.05rem 0 0.9rem;
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-decoration: none;
}

.public-index a span {
  color: var(--rust);
  font-weight: 500;
}

.threshold-main {
  min-width: 0;
}

.threshold-hero {
  display: grid;
  grid-template-columns: minmax(0, 540px) minmax(390px, 520px);
  gap: 36px;
  align-items: start;
}

.hero-copy {
  padding-top: 0.25rem;
}

.hero-copy h1 {
  margin: 1.2rem 0 1.8rem;
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(4.6rem, 7.1vw, 6rem);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 0.92;
}

.hero-deck {
  max-width: 530px;
  margin: 0;
  color: var(--ink-soft);
  font-size: 1.75rem;
  line-height: 1.35;
}

.hero-body {
  max-width: 520px;
  margin: 2.8rem 0 0;
  color: var(--muted);
  font-size: 1.06rem;
  line-height: 1.58;
}

.primary-cta {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  margin-top: 2.5rem;
  padding: 1rem 1.35rem;
  background: var(--rust);
  color: #f4eedf;
  font: 500 0.7rem/1 var(--mono);
  letter-spacing: 0.06em;
  text-decoration: none;
  text-transform: uppercase;
}

.primary-cta:hover,
.primary-cta:focus-visible {
  background: #7f3e2b;
}

.current-file {
  min-height: 664px;
  padding: 2.15rem;
  background: var(--panel);
  color: var(--panel-text);
}

.current-meta {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1.3rem;
  border-bottom: 1px solid color-mix(in srgb, #b9ac94 25%, transparent);
  color: #d8c9ae;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.13em;
}

.current-visual {
  position: relative;
  height: 254px;
  margin: 2.25rem 0;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: var(--panel-2);
}

.current-visual > p {
  position: absolute;
  left: 1.4rem;
  top: 1.2rem;
  margin: 0;
  color: #968d7d;
  font: 500 0.66rem/1.4 var(--mono);
  letter-spacing: 0.13em;
}

.stillpoint-mark {
  position: relative;
  width: 138px;
  height: 138px;
  border: 2px solid var(--blue-light);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--panel-text);
  box-shadow: inset 0 0 0 18px color-mix(in srgb, var(--blue) 8%, transparent);
}

.stillpoint-mark::before,
.stillpoint-mark::after {
  content: "";
  position: absolute;
  background: var(--blue-light);
  opacity: 0.7;
}

.stillpoint-mark::before {
  width: 174px;
  height: 1px;
  left: -20px;
  top: 50%;
}

.stillpoint-mark::after {
  width: 1px;
  height: 174px;
  left: 50%;
  top: -20px;
}

.stillpoint-mark span {
  position: relative;
  z-index: 1;
  width: 90px;
  height: 90px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--panel);
  font-family: var(--serif);
  font-size: 2.6rem;
}

.current-file h2 {
  margin: 1.1rem 0 0.85rem;
  font-size: 2.8rem;
  line-height: 1.02;
  font-weight: 600;
}

.current-file > p:not(.micro-label) {
  margin: 0;
  max-width: 420px;
  color: var(--panel-muted);
  font-size: 1rem;
  line-height: 1.5;
}

.current-link {
  display: inline-block;
  margin-top: 1.5rem;
  color: var(--rust-soft);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-decoration: none;
}

.current-link:hover,
.current-link:focus-visible {
  color: #efb38e;
}

.active-paths {
  margin-top: 5.5rem;
  border-top: 1px solid color-mix(in srgb, var(--rule) 55%, transparent);
}

.active-paths > .micro-label {
  padding: 2.3rem 0 1.5rem;
}

.path-row {
  min-height: 158px;
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr) 190px;
  gap: 24px;
  align-items: center;
  border-bottom: 1px solid color-mix(in srgb, var(--rule) 32%, transparent);
}

.path-row h2 {
  margin: 0;
  font-size: 1.8rem;
  line-height: 1.2;
  font-weight: 600;
}

.path-row div p {
  margin: 0.65rem 0 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.45;
}

.path-code,
.path-action {
  margin: 0;
  color: var(--muted-2);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.12em;
}

.path-action {
  justify-self: end;
  color: var(--rust);
  text-align: right;
}

.future-access {
  margin-top: 5rem;
  min-height: 92px;
  padding: 1.4rem 1.7rem;
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr) 130px;
  gap: 24px;
  align-items: center;
  border: 1px solid var(--rule);
  background: var(--paper-raised);
}

.future-access > p:not(.micro-label) {
  margin: 0;
  color: #4a463e;
  font-size: 1.18rem;
  font-style: italic;
  line-height: 1.45;
}

.future-access > span {
  justify-self: end;
}

.archive-note {
  margin-top: 2.6rem;
  padding-top: 2rem;
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 24px;
  border-top: 1px solid color-mix(in srgb, var(--rule) 32%, transparent);
}

.archive-note > p:not(.micro-label) {
  margin: 0;
  max-width: 680px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.5;
}

.site-footer {
  width: min(1328px, calc(100% - 7rem));
  margin: 4.7rem auto 0;
  padding: 1.5rem 0 2.7rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  border-top: 1px solid color-mix(in srgb, var(--rule) 32%, transparent);
}

.footer-line {
  color: #5a5144;
  font-size: 1.05rem;
  font-style: italic;
}

/* Shared fallback styling for simple pages such as the 404. */
body:not(.threshold-page):not(.document-page) {
  min-height: 100vh;
  display: grid;
  place-items: center;
}

body:not(.threshold-page):not(.document-page) main {
  width: min(42rem, calc(100% - 3rem));
  padding: 3rem;
  border-top: 2px solid var(--rust);
}

body:not(.threshold-page):not(.document-page) h1 {
  margin: 0.5rem 0 1rem;
  font-size: clamp(3rem, 10vw, 6rem);
  line-height: 0.95;
}

body:not(.threshold-page):not(.document-page) .eyebrow {
  color: var(--rust);
  font: 500 0.7rem/1.3 var(--mono);
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

body:not(.threshold-page):not(.document-page) a {
  color: var(--rust);
}

@media (max-width: 1180px) {
  .site-header,
  .threshold-shell,
  .site-footer {
    width: min(100% - 3rem, 1040px);
  }

  .threshold-shell {
    grid-template-columns: 130px minmax(0, 1fr);
    gap: 34px;
  }

  .threshold-hero {
    grid-template-columns: minmax(0, 1fr) minmax(360px, 440px);
  }

  .hero-copy h1 {
    font-size: 5rem;
  }

  .path-row,
  .future-access {
    grid-template-columns: 130px minmax(0, 1fr) 150px;
  }
}

@media (max-width: 880px) {
  .site-header {
    width: calc(100% - 2.5rem);
    min-height: 59px;
  }

  .wordmark {
    font-size: 0.7rem;
  }

  .desktop-nav {
    display: none;
  }

  .mobile-nav {
    display: block;
    position: relative;
  }

  .mobile-nav summary {
    cursor: pointer;
    color: var(--rust);
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    list-style: none;
  }

  .mobile-nav summary::-webkit-details-marker {
    display: none;
  }

  .mobile-nav nav {
    position: absolute;
    right: 0;
    top: 2rem;
    z-index: 10;
    min-width: 180px;
    padding: 1rem;
    background: var(--panel);
    color: var(--panel-text);
    box-shadow: 0 15px 40px rgba(36, 35, 30, 0.15);
  }

  .mobile-nav a {
    display: block;
    padding: 0.7rem 0;
    color: inherit;
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-decoration: none;
  }

  .threshold-shell {
    width: calc(100% - 2.5rem);
    margin-top: 2rem;
    display: block;
  }

  .public-index {
    display: none;
  }

  .threshold-hero {
    display: block;
  }

  .hero-copy h1 {
    margin-top: 1rem;
    font-size: clamp(4rem, 19vw, 5.2rem);
    line-height: 0.92;
  }

  .hero-deck {
    max-width: 36rem;
    font-size: 1.4rem;
    line-height: 1.36;
  }

  .hero-body {
    display: none;
  }

  .primary-cta {
    display: none;
  }

  .current-file {
    min-height: 0;
    margin-top: 2.7rem;
    padding: 1.45rem;
  }

  .current-meta {
    font-size: 0.63rem;
  }

  .current-meta .signal-rust {
    display: none;
  }

  .current-visual {
    height: 150px;
    margin: 1.4rem 0 1.8rem;
  }

  .stillpoint-mark {
    width: 100px;
    height: 100px;
  }

  .stillpoint-mark::before {
    width: 126px;
    left: -14px;
  }

  .stillpoint-mark::after {
    height: 126px;
    top: -14px;
  }

  .stillpoint-mark span {
    width: 66px;
    height: 66px;
    font-size: 2rem;
  }

  .current-file h2 {
    font-size: 2.1rem;
  }

  .current-file > p:not(.micro-label) {
    display: none;
  }

  .current-link {
    margin-top: 1.3rem;
    font-size: 0.63rem;
  }

  .active-paths {
    margin-top: 2.7rem;
  }

  .active-paths > .micro-label {
    padding-top: 1.5rem;
  }

  .path-row {
    min-height: 86px;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1rem;
    padding: 1rem 0;
  }

  .path-code {
    display: none;
  }

  .path-row h2 {
    font-size: 1.45rem;
  }

  .path-row div p {
    margin-top: 0.35rem;
    font: 500 0.67rem/1.4 var(--mono);
    letter-spacing: 0.08em;
  }

  .path-action {
    font-size: 0.62rem;
  }

  .future-access {
    margin-top: 2rem;
    grid-template-columns: 1fr auto;
    padding: 1rem 0;
    border: 0;
    border-top: 1px solid color-mix(in srgb, var(--rule) 32%, transparent);
    background: transparent;
  }

  .future-access > p:not(.micro-label) {
    display: none;
  }

  .archive-note {
    display: none;
  }

  .site-footer {
    width: calc(100% - 2.5rem);
    margin-top: 2.4rem;
    padding-bottom: 2rem;
  }

  .footer-line {
    display: none;
  }
}

@media (max-width: 460px) {
  .site-header,
  .threshold-shell,
  .site-footer {
    width: calc(100% - 2.5rem);
  }

  .hero-copy h1 {
    font-size: 4rem;
  }

  .hero-deck {
    font-size: 1.35rem;
  }
}

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