/* Axiom Interactive - postulate.css
   Every class is namespaced ax- and hyphenated. No BEM, no state classes:
   state is expressed by aria-* selectors so the markup stays the source
   of truth. Light cool surface, flat, two sans faces, no monospace. */

:root {
  --ax-paper: #F4F5F7;
  --ax-paper-lift: #FFFFFF;
  --ax-paper-sink: #E7E9ED;
  --ax-ink: #14161B;
  --ax-ink-soft: #4A505A;
  --ax-ink-faint: #7C838F;
  --ax-rule: #D3D7DE;
  --ax-rule-firm: #B4BAC4;
  --ax-proof: #C2321B;
  --ax-proof-wash: #FBEDEA;
  --ax-true: #1D4E89;
  --ax-measure: 66ch;
  --ax-inset: clamp(1.25rem, 4vw, 3rem);
  --ax-page: 1160px;
  --ax-display: "Familjen Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ax-text: "Rethink Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--ax-paper);
  color: var(--ax-ink);
  font-family: var(--ax-text);
  font-size: 16.5px;
  line-height: 1.66;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--ax-display);
  font-weight: 600;
  line-height: 1.14;
  letter-spacing: -0.022em;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0 0 1.05em; }
p:last-child { margin-bottom: 0; }

a { color: var(--ax-true); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--ax-proof); }

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

:focus-visible { outline: 2px solid var(--ax-proof); outline-offset: 3px; }

.ax-skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ax-ink);
  color: var(--ax-paper-lift);
  padding: 0.7rem 1.1rem;
  font-weight: 600;
  z-index: 200;
}
.ax-skip:focus { left: 0; }

.ax-width { width: 100%; max-width: var(--ax-page); margin-inline: auto; padding-inline: var(--ax-inset); }

/* ---------- header ---------- */

.ax-top {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(244, 245, 247, 0.92);
  backdrop-filter: saturate(150%) blur(10px);
  -webkit-backdrop-filter: saturate(150%) blur(10px);
  border-bottom: 1px solid var(--ax-rule);
}
.ax-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  min-height: 70px;
}
.ax-top-brand { display: inline-flex; align-items: center; gap: 0.6rem; text-decoration: none; color: var(--ax-ink); flex-shrink: 0; }
.ax-top-glyph { width: 28px; height: 28px; flex-shrink: 0; }
.ax-top-name {
  font-family: var(--ax-display);
  font-size: 1.08rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.ax-top-nav ul { display: flex; align-items: center; gap: 1.7rem; list-style: none; margin: 0; padding: 0; }
.ax-top-link {
  font-size: 0.92rem;
  color: var(--ax-ink-soft);
  text-decoration: none;
  padding: 0.3rem 0;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.ax-top-link:hover { color: var(--ax-ink); border-bottom-color: var(--ax-rule-firm); }
.ax-top-link[aria-current="page"] { color: var(--ax-ink); border-bottom-color: var(--ax-proof); }

.ax-top-button {
  display: none;
  background: none;
  border: 1px solid var(--ax-rule-firm);
  width: 40px; height: 40px; padding: 0;
  cursor: pointer;
  flex-direction: column; align-items: center; justify-content: center; gap: 5px;
}
.ax-top-line { display: block; width: 16px; height: 1.5px; background: var(--ax-ink); transition: transform 0.2s ease, opacity 0.2s ease; }
.ax-top-button[aria-expanded="true"] .ax-top-line:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.ax-top-button[aria-expanded="true"] .ax-top-line:nth-child(2) { opacity: 0; }
.ax-top-button[aria-expanded="true"] .ax-top-line:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

@media (max-width: 860px) {
  .ax-top-button { display: flex; }
  .ax-top-nav {
    position: absolute; inset: 70px 0 auto 0;
    background: var(--ax-paper-lift);
    border-bottom: 1px solid var(--ax-rule);
    display: none;
    padding: 0.5rem var(--ax-inset) 1.25rem;
  }
  .ax-top-nav[data-shown="yes"] { display: block; }
  .ax-top-nav ul { flex-direction: column; align-items: stretch; gap: 0; }
  .ax-top-link { display: block; padding: 0.9rem 0; border-bottom: 1px solid var(--ax-rule); }
}

/* ---------- opening statement ---------- */

.ax-statement { padding-block: clamp(3.5rem, 9vw, 6rem) clamp(2.25rem, 5vw, 3.5rem); text-align: center; }
.ax-statement-title { font-size: clamp(2.2rem, 5.2vw, 3.7rem); margin-bottom: 1.15rem; max-width: 22ch; margin-inline: auto; }
.ax-statement-line { font-size: clamp(1.01rem, 1.85vw, 1.18rem); color: var(--ax-ink-soft); max-width: 44rem; margin-inline: auto; margin-bottom: 1.9rem; }
.ax-statement-acts { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center; }

.ax-eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ax-proof);
  margin-bottom: 0.95rem;
  font-weight: 700;
}

/* ---------- buttons ---------- */

.ax-act {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.76rem 1.4rem;
  font-size: 0.94rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.ax-act[data-kind="solid"] { background: var(--ax-ink); color: var(--ax-paper-lift); }
.ax-act[data-kind="solid"]:hover { background: var(--ax-proof); color: var(--ax-paper-lift); }
.ax-act[data-kind="hollow"] { border-color: var(--ax-rule-firm); color: var(--ax-ink); }
.ax-act[data-kind="hollow"]:hover { border-color: var(--ax-ink); color: var(--ax-ink); }

/* ---------- progress rail ---------- */

.ax-rail {
  display: flex;
  border: 1px solid var(--ax-rule);
  background: var(--ax-paper-lift);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.ax-rail-node {
  flex: 1 0 auto;
  min-width: 8.5rem;
  padding: 0.85rem 1rem;
  border-right: 1px solid var(--ax-rule);
  font-size: 0.82rem;
  color: var(--ax-ink-soft);
  text-decoration: none;
  display: block;
}
.ax-rail-node:last-child { border-right: 0; }
.ax-rail-node:hover { background: var(--ax-paper-sink); color: var(--ax-ink); }
.ax-rail-index {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ax-proof);
  font-weight: 700;
  margin-bottom: 0.2rem;
}

/* ---------- axiom stages ---------- */

.ax-stage {
  display: grid;
  grid-template-columns: 6.5rem minmax(0, 1fr);
  gap: clamp(1.25rem, 3vw, 2.5rem);
  padding-block: clamp(2rem, 4.5vw, 3.25rem);
  border-bottom: 1px solid var(--ax-rule);
  scroll-margin-top: 92px;
}
.ax-stage:last-of-type { border-bottom: 0; }
@media (max-width: 720px) { .ax-stage { grid-template-columns: 1fr; gap: 0.75rem; } }

.ax-stage-mark {
  font-family: var(--ax-display);
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  font-weight: 600;
  color: var(--ax-rule-firm);
  line-height: 1;
  letter-spacing: -0.04em;
}
.ax-stage-title { font-size: clamp(1.35rem, 2.8vw, 1.85rem); margin-bottom: 0.75rem; }
.ax-stage-body { color: var(--ax-ink-soft); max-width: var(--ax-measure); }
.ax-stage-body p:last-child { margin-bottom: 0; }

.ax-consequence {
  border-left: 2px solid var(--ax-proof);
  background: var(--ax-proof-wash);
  padding: 0.9rem 1.1rem;
  margin-top: 1.1rem;
  color: var(--ax-ink);
  font-size: 0.94rem;
}
.ax-consequence-label {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ax-proof);
  font-weight: 700;
  margin-bottom: 0.3rem;
}
.ax-consequence p:last-child { margin-bottom: 0; }

/* ---------- generic block ---------- */

.ax-block { padding-block: clamp(3rem, 7vw, 5.25rem); }
.ax-block[data-shade="lift"] { background: var(--ax-paper-lift); border-block: 1px solid var(--ax-rule); }
.ax-block[data-shade="sink"] { background: var(--ax-paper-sink); border-block: 1px solid var(--ax-rule); }

.ax-block-head { max-width: 46rem; margin-bottom: clamp(1.75rem, 4vw, 2.75rem); }
.ax-block-title { font-size: clamp(1.7rem, 3.5vw, 2.45rem); margin-bottom: 0.8rem; }
.ax-block-line { color: var(--ax-ink-soft); max-width: var(--ax-measure); }

.ax-pair { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: clamp(2rem, 5vw, 4rem); align-items: start; }
@media (max-width: 880px) { .ax-pair { grid-template-columns: 1fr; } }

.ax-prose { max-width: var(--ax-measure); }
.ax-prose h2 { font-size: clamp(1.45rem, 3vw, 1.9rem); margin: 2.3rem 0 0.8rem; }
.ax-prose h3 { font-size: 1.1rem; margin: 1.75rem 0 0.5rem; }
.ax-prose > :first-child { margin-top: 0; }
.ax-prose ul, .ax-prose ol { color: var(--ax-ink-soft); padding-left: 1.15rem; margin: 0 0 1.05em; }
.ax-prose li { margin-bottom: 0.42rem; }
.ax-prose strong { color: var(--ax-ink); font-weight: 700; }
.ax-standfirst { font-size: 1.08rem; color: var(--ax-ink-soft); }

/* ---------- fact list ---------- */

.ax-facts { border-top: 1px solid var(--ax-rule); margin: 0; }
.ax-facts > div {
  display: grid;
  grid-template-columns: minmax(0, 13rem) minmax(0, 1fr);
  gap: 1rem;
  padding-block: 0.78rem;
  border-bottom: 1px solid var(--ax-rule);
}
@media (max-width: 620px) { .ax-facts > div { grid-template-columns: 1fr; gap: 0.15rem; } }
.ax-facts dt { font-size: 0.85rem; color: var(--ax-ink-faint); }
.ax-facts dd { margin: 0; color: var(--ax-ink); min-width: 0; }

/* ---------- legal document ---------- */

.ax-doc {
  display: grid;
  grid-template-columns: minmax(0, 15rem) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 3.75rem);
  align-items: start;
  padding-block: clamp(2.5rem, 6vw, 4.25rem);
}
@media (max-width: 980px) { .ax-doc { grid-template-columns: 1fr; } }

.ax-toc {
  position: sticky;
  top: 92px;
  border: 1px solid var(--ax-rule);
  background: var(--ax-paper-lift);
  padding: 1.2rem 1.1rem;
  max-height: calc(100vh - 122px);
  overflow-y: auto;
}
@media (max-width: 980px) { .ax-toc { position: static; max-height: none; } }
.ax-toc-title {
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ax-ink-faint);
  margin-bottom: 0.8rem;
  font-weight: 700;
}
.ax-toc-list { list-style: none; margin: 0; padding: 0; counter-reset: axq; }
.ax-toc-list li { counter-increment: axq; }
.ax-toc-link {
  display: grid;
  grid-template-columns: 1.8rem 1fr;
  gap: 0.35rem;
  padding: 0.36rem 0;
  color: var(--ax-ink-soft);
  text-decoration: none;
  font-size: 0.85rem;
  line-height: 1.42;
}
.ax-toc-link::before { content: counter(axq) "."; color: var(--ax-ink-faint); font-size: 0.78rem; padding-top: 0.1rem; }
.ax-toc-link:hover { color: var(--ax-proof); }

.ax-doc-body { min-width: 0; }
.ax-doc-head { margin-bottom: 2.3rem; }
.ax-doc-head h1 { font-size: clamp(2rem, 4.2vw, 2.85rem); margin-bottom: 0.9rem; }
.ax-doc-dates {
  display: flex; flex-wrap: wrap; gap: 0.45rem 1.4rem;
  font-size: 0.8rem;
  color: var(--ax-ink-faint);
  margin-top: 1.35rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--ax-rule);
}

.ax-clause { margin-bottom: 2.5rem; scroll-margin-top: 92px; }
.ax-clause-title {
  display: grid;
  grid-template-columns: 2.5rem 1fr;
  gap: 0.4rem;
  font-size: clamp(1.2rem, 2.4vw, 1.5rem);
  margin-bottom: 0.9rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid var(--ax-rule);
}
.ax-clause-no { font-size: 0.95rem; color: var(--ax-proof); font-weight: 700; padding-top: 0.3rem; }
.ax-clause-body { color: var(--ax-ink-soft); max-width: var(--ax-measure); }
.ax-clause-body h3 { font-family: var(--ax-text); font-size: 1rem; font-weight: 700; color: var(--ax-ink); margin: 1.5rem 0 0.5rem; }
.ax-clause-body ul, .ax-clause-body ol { padding-left: 1.15rem; margin: 0 0 1.05em; }
.ax-clause-body li { margin-bottom: 0.44rem; }
.ax-clause-body strong { color: var(--ax-ink); font-weight: 700; }
.ax-clause-body a { overflow-wrap: anywhere; }

.ax-note {
  border: 1px solid var(--ax-rule-firm);
  border-left: 3px solid var(--ax-proof);
  background: var(--ax-proof-wash);
  padding: 1rem 1.15rem;
  margin: 1.35rem 0;
  color: var(--ax-ink);
}
.ax-note p:last-child { margin-bottom: 0; }

.ax-table-wrap {
  overflow-x: auto;
  margin: 1.3rem 0;
  border: 1px solid var(--ax-rule);
  background: var(--ax-paper-lift);
  -webkit-overflow-scrolling: touch;
}
.ax-table { width: 100%; border-collapse: collapse; font-size: 0.87rem; min-width: 34rem; }
.ax-table caption {
  text-align: left;
  padding: 0.78rem 0.95rem;
  font-size: 0.72rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ax-ink-faint);
  border-bottom: 1px solid var(--ax-rule);
}
.ax-table th, .ax-table td { padding: 0.66rem 0.95rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--ax-rule); }
.ax-table thead th {
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ax-ink);
  font-weight: 700;
  background: var(--ax-paper-sink);
}
.ax-table tbody tr:last-child td { border-bottom: 0; }
.ax-table td { color: var(--ax-ink-soft); }

/* ---------- footer ---------- */

.ax-foot {
  background: var(--ax-paper-sink);
  border-top: 1px solid var(--ax-rule);
  padding-block: clamp(2.5rem, 6vw, 3.5rem) 1.8rem;
  font-size: 0.9rem;
}
.ax-foot-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(auto-fit, minmax(140px, 1fr));
  gap: 2rem;
  margin-bottom: 2.15rem;
}
@media (max-width: 700px) { .ax-foot-grid { grid-template-columns: 1fr 1fr; } }
.ax-foot-brand { grid-column: 1 / -1; }
@media (min-width: 701px) { .ax-foot-brand { grid-column: auto; } }
.ax-foot-mark { display: inline-flex; align-items: center; gap: 0.55rem; margin-bottom: 0.8rem; }
.ax-foot-blurb { color: var(--ax-ink-faint); max-width: 26rem; }
.ax-foot-title {
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ax-ink-faint);
  margin-bottom: 0.75rem;
  font-weight: 700;
}
.ax-foot-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.48rem; }
.ax-foot-col a { color: var(--ax-ink-soft); text-decoration: none; }
.ax-foot-col a:hover { color: var(--ax-proof); }
.ax-foot-legal {
  border-top: 1px solid var(--ax-rule);
  padding-top: 1.55rem;
  color: var(--ax-ink-faint);
  font-size: 0.82rem;
  line-height: 1.7;
  display: grid;
  gap: 0.42rem;
}
.ax-foot-legal p { margin: 0; }

/* ---------- reveal ---------- */

@media (prefers-reduced-motion: no-preference) {
  .ax-enter { opacity: 0; transform: translateY(10px); transition: opacity 0.42s ease, transform 0.42s ease; }
  .ax-enter[data-entered="yes"] { opacity: 1; transform: none; }
}
