/* Steep Point V1 — original journal composition, using the Saltbush palette. */

/* Brand type, self-hosted so every reader sees the same faces as the Word
   and PowerPoint templates. Charter: Bitstream, free licence. IBM Plex Mono:
   IBM, SIL OFL 1.1. Files live in ../fonts/. */
@font-face {
  font-family: "Charter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/charter-regular.woff2") format("woff2");
}
@font-face {
  font-family: "Charter";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/charter-bold.woff2") format("woff2");
}
@font-face {
  font-family: "Charter";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/charter-italic.woff2") format("woff2");
}
@font-face {
  font-family: "Charter";
  font-style: italic;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/charter-bold-italic.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/ibm-plex-mono-regular.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/ibm-plex-mono-bold.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/ibm-plex-mono-italic.woff2") format("woff2");
}

:root {
  --deep-ocean: #11303f;
  --bone: #f3eee1;
  --limestone: #cfc8b6;
  --kelp-ink: #17231f;
  --eucalyptus: #3e6a5a;
  --saltbush-grey: #52635b;
  --serif: "Charter", "Iowan Old Style", "Palatino Linotype", Palatino,
    Georgia, "Times New Roman", serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas,
    "Liberation Mono", monospace;
  --measure: 41rem;
  --rule: 1px solid var(--limestone);
  --sticky-header-offset: 6.25rem;
  --ease: 160ms ease-out;
  /* The page commits to one light look: keep form controls and scrollbars
     from picking up a dark-mode user-agent rendering. */
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

  :root {
    --ease: 0s;
  }
}

body {
  margin: 0;
  background: var(--bone);
  color: var(--kelp-ink);
  font-family: var(--serif);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3 {
  text-wrap: balance;
}

p,
li {
  text-wrap: pretty;
}

main {
  scroll-margin-top: var(--sticky-header-offset);
}

::selection {
  background: var(--eucalyptus);
  color: var(--bone);
}

a {
  color: inherit;
  text-decoration-color: var(--limestone);
  text-underline-offset: 0.18em;
  transition: text-decoration-color var(--ease), color var(--ease);
}

a:hover {
  text-decoration-color: var(--eucalyptus);
}

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

.hero :focus-visible,
.skip-link:focus-visible {
  outline-color: var(--bone);
}

.hero ::selection,
.site-footer ::selection {
  background: var(--bone);
  color: var(--deep-ocean);
}

.hero a:hover,
.skip-link:hover {
  text-decoration-color: var(--limestone);
}

.skip-link {
  position: fixed;
  z-index: 10;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.5rem 0.75rem;
  color: var(--bone);
  background: var(--deep-ocean);
  font-family: var(--mono);
  font-size: 0.78rem;
  transform: translateY(-200%);
}

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

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

/* Letterhead */

.site-header {
  position: sticky;
  z-index: 5;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding: 2.2rem max(1.4rem, calc((100% - 52rem) / 2 + 1.4rem)) 1.1rem;
  color: var(--kelp-ink);
  background: var(--bone);
  border-bottom: var(--rule);
}

.wordmark {
  display: inline-grid;
  grid-template-columns: auto auto;
  column-gap: 0.275rem;
  row-gap: 0.15rem;
  text-decoration: none;
}

.wordmark-mark {
  grid-column: 1;
  grid-row: 1;
  align-self: center;
  width: auto;
  height: 1.434375rem;
}

.wordmark-copy {
  display: contents;
}

.wordmark-name {
  grid-column: 2;
  grid-row: 1;
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1;
}

.wordmark-descriptor {
  grid-column: 2;
  grid-row: 2;
  color: var(--saltbush-grey);
  font-size: 0.82rem;
  line-height: 1.3;
  letter-spacing: 0.005em;
}

.hero-coords,
.footer-place {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.14em;
}

.primary-nav {
  display: flex;
  gap: 1.15rem;
  flex-wrap: wrap;
}

.primary-nav a {
  /* Vertical padding with a matching negative margin grows the touch target
     to 24px without moving the letterhead's baseline. */
  padding: 0.35rem 0;
  margin: -0.35rem 0;
  color: var(--saltbush-grey);
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-decoration: none;
  text-transform: uppercase;
  text-underline-offset: 0.45em;
  text-decoration-thickness: 1px;
}

.primary-nav a:hover {
  color: var(--eucalyptus);
}

/* The section currently under the letterhead, set by site-nav.mjs. Without
   JavaScript the links simply have no current state. */
.primary-nav a[aria-current] {
  color: var(--kelp-ink);
  text-decoration: underline;
  text-decoration-color: var(--eucalyptus);
}

/* Hero and original illustrative chart treatment */

.hero {
  position: relative;
  overflow: hidden;
  width: 100%;
  color: var(--bone);
  background: var(--deep-ocean);
}

.market-canvas {
  position: absolute;
  z-index: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.65;
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 52rem;
  margin: 0 auto;
  padding: 4.5rem 1.4rem 16rem;
}

.hero h1 {
  max-width: 16ch;
  margin: 0 0 1.2rem;
  font-size: clamp(2.2rem, 5.5vw, 3.4rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0;
}

.hero-subtext {
  font-size: 1.15rem;
  line-height: 1.6;
  max-width: 36rem;
  margin: 0 0 1rem;
  color: rgba(243, 238, 225, 0.88);
}

/* Alpha landing: the hero is the whole page, so it holds the viewport
   below the letterhead and centres its copy. The letterhead is a single
   row here (no navigation), so the offset is its own height rather than
   the wrapped two-row value. */

.hero-alpha {
  display: flex;
  align-items: center;
  min-height: calc(100svh - 5.75rem);
}

.hero-alpha .hero-inner {
  width: 100%;
  padding-bottom: 14rem;
}

/* Early-edition notice, sitting where the subscription form will return. */
.hero-note {
  max-width: 31rem;
  margin: 2.2rem 0 0;
  color: rgba(243, 238, 225, 0.65);
  font-family: var(--mono);
  font-size: 0.74rem;
  line-height: 1.65;
  letter-spacing: 0.03em;
}

.hero-actions {
  max-width: 31rem;
  margin-top: 2.2rem;
  scroll-margin-top: var(--sticky-header-offset);
}

.hero-coords {
  position: absolute;
  z-index: 2;
  top: 1.1rem;
  right: 1.4rem;
  color: rgba(243, 238, 225, 0.62);
  font-size: 0.68rem;
  cursor: help;
}

.specimen-tag {
  position: absolute;
  z-index: 2;
  right: 1.4rem;
  bottom: 0.9rem;
  color: rgba(243, 238, 225, 0.7);
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.canvas-toggle {
  position: absolute;
  z-index: 2;
  left: 1.4rem;
  bottom: 0.9rem;
  padding: 0.4rem 0.7rem;
  color: rgba(243, 238, 225, 0.7);
  background: transparent;
  border: 1px solid rgba(243, 238, 225, 0.35);
  border-radius: 0;
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
}

.canvas-toggle:hover {
  color: var(--bone);
  border-color: rgba(243, 238, 225, 0.7);
}

/* Subscription instrument */

.email-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: stretch;
  max-width: var(--measure);
}

.email-form input {
  flex: 1 1 0;
  min-width: 0;
  min-height: 48px;
  padding: 0.6rem 0.8rem;
  color: var(--bone);
  background: transparent;
  border: 1px solid rgba(243, 238, 225, 0.5);
  border-radius: 0;
  font-family: var(--mono);
  font-size: 1rem;
  transition: border-color var(--ease);
}

.email-form input::placeholder {
  color: rgba(243, 238, 225, 0.6);
  opacity: 1;
}

.email-form input:hover:not(:disabled) {
  border-color: rgba(243, 238, 225, 0.75);
}

/* A focused field is drawn by its own border going solid Bone (11.9:1 on
   Deep Ocean) instead of a second ring outside a translucent one. */
.email-form input:focus-visible {
  outline: none;
  border-color: var(--bone);
}

.email-form input:disabled {
  opacity: 1;
  cursor: not-allowed;
}

.primary-btn {
  min-height: 48px;
  padding: 0.6rem 1.2rem;
  color: var(--deep-ocean);
  background: var(--bone);
  border: 1px solid var(--bone);
  border-radius: 0;
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background-color var(--ease),
    border-color var(--ease),
    opacity var(--ease);
}

.primary-btn:not(:disabled):not([aria-disabled="true"]):hover {
  background: var(--limestone);
  border-color: var(--limestone);
}

.primary-btn:disabled,
.primary-btn[aria-disabled="true"] {
  opacity: 0.7;
  cursor: default;
}

.turnstile-container,
.form-status,
.email-form noscript {
  flex: 0 0 100%;
  max-width: 100%;
}

.turnstile-container[hidden],
.form-status:empty {
  display: none;
}

.form-status,
.form-note {
  font-family: var(--mono);
  line-height: 1.5;
}

.form-status {
  margin: 0;
  color: rgba(243, 238, 225, 0.82);
  font-size: 0.74rem;
  letter-spacing: 0.03em;
}

.form-status[data-state="error"] {
  color: var(--limestone);
}

.form-note {
  margin: 0.7rem 0 0;
  color: rgba(243, 238, 225, 0.65);
  font-size: 0.74rem;
  line-height: 1.65;
  letter-spacing: 0.04em;
}

/* Numbered editorial sections — the Journal spine */

.doc-section {
  max-width: 52rem;
  margin: 0 auto;
  padding: 3.4rem 1.4rem 0;
  scroll-margin-top: var(--sticky-header-offset);
}

.doc-section > p,
.doc-section blockquote,
.doc-section ol,
.doc-section ul {
  max-width: var(--measure);
}

.section-head {
  display: flex;
  align-items: baseline;
  gap: 0.9rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0.55rem;
  border-bottom: var(--rule);
}

.section-no {
  color: var(--eucalyptus);
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 0.95rem;
}

.section-head h2 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0;
}

/* Research lifecycle */

.doc-section .lifecycle-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.8rem 1.6rem;
  max-width: none;
  margin: 1.8rem 0 0;
  padding: 0;
  list-style: none;
}

.lifecycle-card {
  min-width: 0;
  padding-top: 0.9rem;
  border-top: 1px solid var(--kelp-ink);
}

.lifecycle-gate {
  color: var(--eucalyptus);
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
}

.lifecycle-card h3 {
  margin: 0.5rem 0 0.45rem;
  font-size: 1.08rem;
}

.lifecycle-card p {
  margin: 0.45rem 0 0;
  font-size: 0.9rem;
  line-height: 1.6;
}

.lifecycle-card .lifecycle-question {
  margin-top: 0;
  color: var(--saltbush-grey);
  font-family: var(--mono);
  font-size: 0.78rem;
  line-height: 1.5;
}

/* Research-note programme — a real publishing boundary, not an empty archive */

.notes-programme {
  margin: 1.8rem 0 2.2rem;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--kelp-ink);
}

.notes-programme li {
  display: grid;
  grid-template-columns: 5.2rem 1fr auto;
  gap: 1rem;
  align-items: baseline;
  padding: 0.8rem 0;
  border-bottom: var(--rule);
}

.note-kind,
.note-cadence {
  color: var(--saltbush-grey);
  font-family: var(--mono);
  font-size: 0.78rem;
}

.note-cadence {
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.note-subject {
  font-weight: 700;
}

/* Footer */

.site-footer {
  margin-top: 4.5rem;
  color: var(--bone);
  background: var(--deep-ocean);
  scroll-margin-top: 1.5rem;
}

/* With no editorial sections between them, the hero meets the footer
   directly; browsers without :has() keep the journal gap, which is fine. */
main:has(.hero-alpha) + .site-footer {
  margin-top: 0;
}

.footer-inner {
  max-width: 52rem;
  margin: 0 auto;
  padding: 1.8rem 1.4rem 1.6rem;
}

.footer-place {
  max-width: var(--measure);
  margin: 0 0 1rem;
  padding-bottom: 1rem;
  color: var(--bone);
  border-bottom: 1px solid rgba(207, 200, 182, 0.35);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  line-height: 1.7;
}

.footer-copyright {
  margin: 0;
  color: var(--limestone);
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  line-height: 1.6;
}

@media (max-width: 760px) {
  .doc-section .lifecycle-grid {
    grid-template-columns: 1fr;
    gap: 1.35rem;
  }
}

@media (max-width: 640px) {
  :root {
    /* Letterhead height when the nav wraps under the wordmark (~5.5rem),
       plus breathing room above an anchored section. */
    --sticky-header-offset: 6.75rem;
  }

  /* The letterhead is pinned, so on a phone every rem it takes is a rem of
     reading room lost. Tighten the two-row layout without changing it. */
  .site-header {
    row-gap: 0.75rem;
    padding-top: 1.1rem;
    padding-bottom: 0.9rem;
  }

  .primary-nav {
    gap: 1rem;
  }

  .hero-inner {
    padding-top: 3.5rem;
  }

  .email-form {
    flex-direction: column;
  }

  .notes-programme li {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }

  .specimen-tag {
    bottom: 3.1rem;
  }

  .hero-coords {
    top: 0.9rem;
    font-size: 0.62rem;
  }
}

/* Print: the page is a document; drop the chrome and keep the text */

@media print {
  .site-header {
    position: static;
    border-bottom-color: var(--kelp-ink);
  }

  .skip-link,
  .primary-nav,
  .market-canvas,
  .canvas-toggle,
  .specimen-tag,
  .hero-actions {
    display: none;
  }

  .hero,
  .site-footer {
    color: var(--kelp-ink);
    background: none;
  }

  .hero-inner {
    padding-bottom: 2rem;
  }

  .hero-coords,
  .hero-subtext,
  .footer-place,
  .footer-copyright {
    color: var(--kelp-ink);
  }

  .doc-section,
  .lifecycle-card {
    break-inside: avoid;
  }
}
