/* ==========================================================================
   Liminalis — marketing site
   Aesthetic: annotated technical journal. Hairline rules, mono marginalia,
   serif long-form, one amber accent used sparingly.
   Palette lifted from the application itself (frontend/liminalis/src/index.css).
   ========================================================================== */

:root {
  /* Surfaces */
  --bg: #16181d;
  --bg-deep: #121419;
  --panel: #191c22;
  --panel-2: #181b21;
  --card: #1c2027;
  --chip: #262b33;
  --input: #13151a;

  /* Lines */
  --border: #22262d;
  --border-2: #2a2f37;
  --border-3: #2f343d;
  --hair: rgba(255, 255, 255, 0.055);

  /* Ink */
  --text: #c2c8d0;
  --text-bright: #edeff2;
  --text-soft: #9aa1ab;
  --muted: #6b727d;
  --muted-2: #5d646f;

  /* Accents */
  --accent: #e8b15a;
  --accent-bg: rgba(232, 177, 90, 0.13);
  --accent-border: rgba(232, 177, 90, 0.28);
  --good: #5fb389;
  --warn: #d9a45b;
  --bad: #d9736b;

  /* Per-lens hues — used only inside lens contexts */
  --novel: #e8b15a;
  --campaign: #cf8a6b;
  --legislation: #6f9fc4;
  --lens: var(--accent);
  --lens-bg: rgba(232, 177, 90, 0.11);
  --lens-border: rgba(232, 177, 90, 0.26);

  /* Type */
  --sans: "Schibsted Grotesk", ui-sans-serif, system-ui, "Segoe UI", sans-serif;
  --serif: "Literata", Georgia, "Times New Roman", serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, "Courier New", monospace;

  /* Rhythm */
  --wrap: 1180px;
  --gutter: clamp(20px, 5vw, 56px);
  --rail: 172px;

  color-scheme: dark;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

*,
*::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(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  overflow-x: hidden;
}

/* Atmosphere: a faint engineering grid + a single warm bloom at the top.
   Fixed, non-interactive, cheap. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.016) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.016) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(to bottom, #000 0%, #000 55%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 55%, transparent 100%);
}
body::after {
  content: "";
  position: fixed;
  top: -340px;
  left: 50%;
  width: 1200px;
  height: 760px;
  margin-left: -600px;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(232, 177, 90, 0.075), transparent 62%);
}

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

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}

hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 56px 0;
}

::selection {
  background: rgba(232, 177, 90, 0.24);
  color: var(--text-bright);
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: #16181d;
  padding: 10px 16px;
  z-index: 200;
  font-weight: 600;
}
.skip:focus {
  left: 12px;
  top: 12px;
}

/* ---------- Layout primitives ---------------------------------------- */

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding-inline: var(--gutter);
}
.wrap-narrow {
  max-width: 780px;
  margin: 0 auto;
  padding-inline: var(--gutter);
}

section {
  position: relative;
}
.band {
  padding-block: clamp(56px, 9vw, 104px);
}
.band + .band {
  border-top: 1px solid var(--hair);
}
.band-deep {
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.16), rgba(0, 0, 0, 0.28));
}

/* The signature layout: a mono marginal rail beside the content column. */
.rail {
  display: grid;
  gap: clamp(20px, 3vw, 40px);
  grid-template-columns: 1fr;
}
@media (min-width: 1024px) {
  .rail {
    grid-template-columns: var(--rail) minmax(0, 1fr);
    gap: 44px;
  }
}
.rail > .note {
  font-family: var(--mono);
  font-size: 11.5px;
  line-height: 1.7;
  color: var(--muted-2);
  border-left: 1px solid var(--border-2);
  padding-left: 14px;
}
@media (min-width: 1024px) {
  .rail > .note {
    border-left: 0;
    border-right: 1px solid var(--border-2);
    padding-left: 0;
    padding-right: 14px;
    text-align: right;
    position: sticky;
    top: 96px;
    align-self: start;
  }
}
.note strong {
  color: var(--text-soft);
  font-weight: 500;
  display: block;
}
.note + .note {
  margin-top: 14px;
}

.cols {
  display: grid;
  gap: clamp(18px, 2.6vw, 28px);
  grid-template-columns: 1fr;
}
@media (min-width: 700px) {
  .cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 700px) {
  .cols-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 1000px) {
  .cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (min-width: 700px) {
  .cols-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 1000px) {
  .cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.stack > * + * {
  margin-top: 18px;
}
.center {
  text-align: center;
}
.mono {
  font-family: var(--mono);
}

/* ---------- Typography ------------------------------------------------ */

h1,
h2,
h3,
h4 {
  color: var(--text-bright);
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.14;
  letter-spacing: -0.015em;
  margin: 0;
  text-wrap: balance;
}
h1 {
  font-size: clamp(2.35rem, 6.2vw, 4.1rem);
  letter-spacing: -0.028em;
}
h2 {
  font-size: clamp(1.72rem, 3.6vw, 2.6rem);
  letter-spacing: -0.022em;
}
h3 {
  font-size: clamp(1.16rem, 1.9vw, 1.42rem);
  line-height: 1.25;
}
h4 {
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.4;
}

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

.kicker {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  color: var(--muted-2);
  text-transform: uppercase;
  margin: 0 0 14px;
  display: block;
}
.kicker .n {
  color: var(--accent);
}

.lede {
  font-family: var(--serif);
  font-size: clamp(1.06rem, 1.9vw, 1.32rem);
  line-height: 1.62;
  color: var(--text-soft);
  text-wrap: pretty;
}
.dek {
  color: var(--text-soft);
  max-width: 62ch;
  text-wrap: pretty;
}
.small {
  font-size: 0.87rem;
  color: var(--muted);
}
.tight {
  max-width: 66ch;
}

em,
i {
  color: var(--text-soft);
}
strong,
b {
  color: var(--text-bright);
  font-weight: 600;
}

.hl {
  color: var(--text-bright);
  background: linear-gradient(to bottom, transparent 62%, rgba(232, 177, 90, 0.22) 62%);
  padding-inline: 1px;
}

code,
kbd,
.code {
  font-family: var(--mono);
  font-size: 0.86em;
  color: var(--accent);
  background: var(--accent-bg);
  border: 1px solid var(--accent-border);
  border-radius: 4px;
  padding: 1px 5px;
  white-space: nowrap;
}
pre {
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.72;
  background: var(--input);
  border: 1px solid var(--border-2);
  border-radius: 8px;
  padding: 16px 18px;
  overflow-x: auto;
  color: var(--text-soft);
  margin: 0 0 18px;
}
pre code {
  background: none;
  border: 0;
  padding: 0;
  color: inherit;
  font-size: inherit;
  white-space: pre;
}

blockquote {
  margin: 0;
  border-left: 2px solid var(--accent-border);
  padding: 4px 0 4px 22px;
  font-family: var(--serif);
  font-size: clamp(1.05rem, 1.7vw, 1.25rem);
  line-height: 1.56;
  color: var(--text-bright);
  font-style: italic;
}
blockquote cite {
  display: block;
  margin-top: 10px;
  font-family: var(--mono);
  font-size: 11px;
  font-style: normal;
  letter-spacing: 0.08em;
  color: var(--muted-2);
  text-transform: uppercase;
}

ul,
ol {
  margin: 0 0 1.05em;
  padding-left: 1.1em;
}
li {
  margin-bottom: 0.42em;
}
li::marker {
  color: var(--muted-2);
}

.ticks {
  list-style: none;
  padding: 0;
}
.ticks li {
  position: relative;
  padding-left: 26px;
  margin-bottom: 0.7em;
}
.ticks li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.66em;
  width: 11px;
  height: 1px;
  background: var(--accent);
}

/* ---------- Badges & chips -------------------------------------------- */

.badge {
  display: inline-block;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--lens);
  background: var(--lens-bg);
  border: 1px solid var(--lens-border);
  border-radius: 5px;
  padding: 3px 8px;
  white-space: nowrap;
}
.badge-muted {
  color: var(--muted);
  background: var(--chip);
  border-color: var(--border-3);
}
.badge-good {
  color: var(--good);
  background: rgba(95, 179, 137, 0.12);
  border-color: rgba(95, 179, 137, 0.28);
}
.badge-warn {
  color: var(--warn);
  background: rgba(217, 164, 91, 0.12);
  border-color: rgba(217, 164, 91, 0.28);
}
.badge-bad {
  color: var(--bad);
  background: rgba(217, 115, 107, 0.12);
  border-color: rgba(217, 115, 107, 0.28);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

/* ---------- Buttons ---------------------------------------------------- */

.btns {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--sans);
  font-size: 0.93rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  padding: 11px 20px;
  border-radius: 7px;
  border: 1px solid var(--border-3);
  color: var(--text-bright);
  background: var(--card);
  transition:
    border-color 0.18s ease,
    background 0.18s ease,
    transform 0.18s ease,
    color 0.18s ease;
}
.btn:hover {
  text-decoration: none;
  border-color: var(--border-3);
  background: var(--chip);
  transform: translateY(-1px);
}
.btn:active {
  transform: translateY(0);
}
.btn .arw {
  color: var(--muted);
  transition:
    transform 0.18s ease,
    color 0.18s ease;
}
.btn:hover .arw {
  transform: translateX(3px);
  color: var(--accent);
}

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #15171b;
}
.btn-primary:hover {
  background: #f0bd6c;
  border-color: #f0bd6c;
  color: #15171b;
}
.btn-primary .arw {
  color: rgba(21, 23, 27, 0.55);
}
.btn-primary:hover .arw {
  color: #15171b;
}

.btn-ghost {
  background: transparent;
}

.txtlink {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex;
  gap: 7px;
  align-items: center;
}
.txtlink .arw {
  transition: transform 0.18s ease;
}
.txtlink:hover {
  text-decoration: none;
}
.txtlink:hover .arw {
  transform: translateX(3px);
}

/* ---------- Header ----------------------------------------------------- */

.site-head {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(22, 24, 29, 0.86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--hair);
}
.head-inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
  height: 62px;
  display: flex;
  align-items: center;
  gap: 18px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text-bright);
  font-family: var(--serif);
  font-size: 1.12rem;
  letter-spacing: -0.02em;
  margin-right: auto;
  white-space: nowrap;
}
.brand:hover {
  text-decoration: none;
  color: var(--text-bright);
}
.brand .mark {
  width: 27px;
  height: 27px;
  flex: none;
  display: block;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: #fefefe;
  box-shadow: 0 2px 8px -2px rgba(0, 0, 0, 0.6);
  transition:
    border-color 0.18s ease,
    transform 0.18s ease;
}
.brand:hover .mark {
  border-color: var(--accent-border);
  transform: translateY(-1px);
}
.site-foot .brand .mark {
  width: 30px;
  height: 30px;
  border-radius: 9px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 2px;
}
.nav a {
  font-size: 0.875rem;
  color: var(--text-soft);
  padding: 7px 11px;
  border-radius: 6px;
  white-space: nowrap;
  transition:
    color 0.16s ease,
    background 0.16s ease;
}
.nav a:hover {
  color: var(--text-bright);
  background: rgba(255, 255, 255, 0.04);
  text-decoration: none;
}
.nav a[aria-current="page"] {
  color: var(--accent);
}

.navtoggle {
  display: none;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-soft);
  background: var(--card);
  border: 1px solid var(--border-2);
  border-radius: 6px;
  padding: 7px 12px;
  cursor: pointer;
}

@media (max-width: 899px) {
  .navtoggle {
    display: block;
  }
  .nav {
    position: absolute;
    top: 62px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--panel);
    border-bottom: 1px solid var(--border);
    padding: 8px var(--gutter) 16px;
    display: none;
  }
  .nav.open {
    display: flex;
  }
  .nav a {
    padding: 12px 4px;
    border-bottom: 1px solid var(--hair);
    border-radius: 0;
  }
  .nav a:last-child {
    border-bottom: 0;
  }
}

/* ---------- Hero ------------------------------------------------------- */

.hero {
  padding-block: clamp(52px, 9vw, 110px) clamp(44px, 7vw, 80px);
}
.hero h1 {
  margin-bottom: 22px;
}
.hero .lede {
  max-width: 60ch;
}
.hero .btns {
  margin-top: 30px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-soft);
  background: var(--card);
  border: 1px solid var(--border-2);
  border-radius: 999px;
  padding: 5px 14px 5px 8px;
  margin-bottom: 26px;
}
.eyebrow .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(232, 177, 90, 0.16);
  flex: none;
}

.pagehead {
  padding-block: clamp(44px, 7vw, 82px) clamp(28px, 4vw, 46px);
}
.pagehead h1 {
  font-size: clamp(2.1rem, 5vw, 3.35rem);
  margin-bottom: 20px;
}

/* ---------- Cards ------------------------------------------------------ */

.card {
  background: var(--card);
  border: 1px solid var(--border-2);
  border-radius: 11px;
  padding: clamp(20px, 2.4vw, 26px);
  position: relative;
}
.card h3,
.card h4 {
  margin-bottom: 9px;
}
.card p:last-child {
  margin-bottom: 0;
}
.card .kicker {
  margin-bottom: 11px;
}

a.card {
  color: var(--text);
  display: block;
  transition:
    border-color 0.2s ease,
    transform 0.2s ease,
    background 0.2s ease;
}
a.card:hover {
  text-decoration: none;
  border-color: var(--border-3);
  background: #1f242b;
  transform: translateY(-2px);
}

.card-flat {
  background: transparent;
  border-color: var(--border);
}

/* Numbered feature blocks with a hairline top rule */
.feat {
  border-top: 1px solid var(--border-2);
  padding-top: 20px;
}
.feat .num {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  color: var(--accent);
  display: block;
  margin-bottom: 12px;
}
.feat h3 {
  margin-bottom: 10px;
}
.feat p {
  color: var(--text-soft);
  font-size: 0.95rem;
  margin-bottom: 0;
}

/* ---------- Lens cards -------------------------------------------------- */

.lens-novel {
  --lens: var(--novel);
  --lens-bg: rgba(232, 177, 90, 0.11);
  --lens-border: rgba(232, 177, 90, 0.28);
}
.lens-campaign {
  --lens: var(--campaign);
  --lens-bg: rgba(207, 138, 107, 0.11);
  --lens-border: rgba(207, 138, 107, 0.3);
}
.lens-legislation {
  --lens: var(--legislation);
  --lens-bg: rgba(111, 159, 196, 0.11);
  --lens-border: rgba(111, 159, 196, 0.3);
}

.lenscard {
  display: block;
  color: var(--text);
  background: var(--card);
  border: 1px solid var(--border-2);
  border-radius: 11px;
  padding: 24px;
  position: relative;
  overflow: hidden;
  transition:
    border-color 0.2s ease,
    transform 0.2s ease,
    background 0.2s ease;
}
.lenscard::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: var(--lens);
  opacity: 0.62;
}
.lenscard:hover {
  text-decoration: none;
  border-color: var(--lens-border);
  background: #1f242b;
  transform: translateY(-2px);
}
.lenscard h3 {
  color: var(--text-bright);
  margin: 12px 0 9px;
}
.lenscard p {
  color: var(--text-soft);
  font-size: 0.93rem;
}
.lenscard .txtlink {
  color: var(--lens);
  margin-top: 16px;
}

/* ---------- Stats / proof band ------------------------------------------ */

.stats {
  display: grid;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 11px;
  overflow: hidden;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (min-width: 860px) {
  .stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
.stat {
  background: var(--panel);
  padding: 22px 20px;
}
.stat .v {
  font-family: var(--mono);
  font-size: clamp(1.5rem, 3.4vw, 2.05rem);
  color: var(--accent);
  letter-spacing: -0.02em;
  line-height: 1.1;
  display: block;
}
.stat .k {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin-top: 9px;
  display: block;
  line-height: 1.55;
}

/* ---------- Tables ------------------------------------------------------ */

.tablewrap {
  overflow-x: auto;
  border: 1px solid var(--border-2);
  border-radius: 10px;
  background: var(--panel-2);
  -webkit-overflow-scrolling: touch;
}
table {
  border-collapse: collapse;
  width: 100%;
  min-width: 560px;
  font-size: 0.9rem;
}
thead th {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted-2);
  text-align: left;
  font-weight: 400;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-2);
  white-space: nowrap;
  background: var(--input);
}
tbody td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--hair);
  vertical-align: top;
  color: var(--text-soft);
}
tbody tr:last-child td {
  border-bottom: 0;
}
tbody th {
  padding: 12px 16px;
  border-bottom: 1px solid var(--hair);
  text-align: left;
  font-weight: 500;
  color: var(--text-bright);
  vertical-align: top;
  white-space: nowrap;
}
tbody tr:last-child th {
  border-bottom: 0;
}
td.num,
th.num {
  font-family: var(--mono);
  font-size: 0.83rem;
  text-align: right;
  white-space: nowrap;
}
tr.hi td,
tr.hi th {
  background: rgba(232, 177, 90, 0.055);
}
tr.hi td.num {
  color: var(--accent);
}

.tnote {
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 12px;
  font-family: var(--mono);
  line-height: 1.65;
}

/* ---------- Callouts ---------------------------------------------------- */

.callout {
  border: 1px solid var(--border-2);
  border-left: 2px solid var(--accent);
  background: var(--panel-2);
  border-radius: 0 10px 10px 0;
  padding: 20px 22px;
}
.callout .kicker {
  margin-bottom: 8px;
}
.callout-quiet {
  border-left-color: var(--border-3);
}
.callout-good {
  border-left-color: var(--good);
}
.callout-warn {
  border-left-color: var(--warn);
}

/* ---------- Definition rows --------------------------------------------- */

.defs {
  border-top: 1px solid var(--border);
}
.defrow {
  display: grid;
  gap: 6px 32px;
  grid-template-columns: 1fr;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}
@media (min-width: 760px) {
  .defrow {
    grid-template-columns: 220px minmax(0, 1fr);
  }
}
.defrow dt {
  color: var(--text-bright);
  font-weight: 600;
  font-size: 0.97rem;
}
.defrow dd {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.95rem;
}
dl.defs {
  margin: 0;
}

/* ---------- Steps -------------------------------------------------------- */

.steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin: 0;
}
.steps > li {
  counter-increment: step;
  position: relative;
  padding-left: 52px;
  padding-bottom: 30px;
  margin: 0;
  border-left: 1px solid var(--border-2);
  margin-left: 15px;
}
.steps > li:last-child {
  border-left-color: transparent;
  padding-bottom: 0;
}
.steps > li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: -15px;
  top: -2px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--accent);
  background: var(--bg);
  border: 1px solid var(--accent-border);
  border-radius: 50%;
}
.steps h4 {
  margin-bottom: 6px;
}
.steps p {
  color: var(--text-soft);
  font-size: 0.94rem;
  margin-bottom: 0;
}

/* ---------- Prose (legal / long-form) ------------------------------------ */

.prose {
  font-family: var(--serif);
  font-size: 1.02rem;
  line-height: 1.78;
}
.prose h2 {
  font-size: clamp(1.3rem, 2.4vw, 1.62rem);
  margin: 44px 0 14px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
}
.prose h2:first-child {
  margin-top: 0;
  border-top: 0;
  padding-top: 0;
}
.prose h3 {
  font-size: 1.08rem;
  margin: 26px 0 10px;
}
.prose ul,
.prose ol {
  margin-bottom: 1.2em;
}
.prose .ph {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--warn);
  background: rgba(217, 164, 91, 0.09);
  border: 1px dashed rgba(217, 164, 91, 0.34);
  border-radius: 4px;
  padding: 1px 6px;
  white-space: normal;
}

.draftbar {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  border: 1px dashed rgba(217, 164, 91, 0.36);
  background: rgba(217, 164, 91, 0.06);
  border-radius: 9px;
  padding: 15px 18px;
  margin-bottom: 34px;
  font-family: var(--sans);
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--text-soft);
}
.draftbar b {
  color: var(--warn);
  font-weight: 600;
}

.updated {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin-bottom: 26px;
}

/* ---------- Tabs (JS-enhanced, degrades to stacked) ----------------------- */

.tabbar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  border-bottom: 1px solid var(--border-2);
  margin-bottom: 24px;
}
.tabbtn {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  padding: 10px 12px;
  cursor: pointer;
  transition:
    color 0.16s ease,
    border-color 0.16s ease;
}
.tabbtn:hover {
  color: var(--text-soft);
}
.tabbtn[aria-selected="true"] {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.tabpanel[hidden] {
  display: none;
}

/* ---------- Footer -------------------------------------------------------- */

.site-foot {
  border-top: 1px solid var(--border);
  background: var(--bg-deep);
  padding-block: 52px 34px;
  margin-top: 0;
}
.foot-grid {
  display: grid;
  gap: 32px;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) {
  .foot-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 960px) {
  .foot-grid {
    grid-template-columns: 1.6fr repeat(3, minmax(0, 1fr));
  }
}
.foot-grid h5 {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin: 0 0 14px;
  font-weight: 400;
}
.foot-grid ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.foot-grid li {
  margin-bottom: 9px;
}
.foot-grid a {
  color: var(--text-soft);
  font-size: 0.89rem;
}
.foot-grid a:hover {
  color: var(--text-bright);
  text-decoration: none;
}
.foot-blurb {
  color: var(--muted);
  font-size: 0.89rem;
  max-width: 38ch;
}
.foot-bottom {
  margin-top: 40px;
  padding-top: 22px;
  border-top: 1px solid var(--hair);
  display: flex;
  flex-wrap: wrap;
  gap: 12px 26px;
  align-items: center;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--muted-2);
}

/* ---------- Reveal on scroll ---------------------------------------------- */

.rv {
  opacity: 0;
  transform: translateY(14px);
}
.rv.in {
  opacity: 1;
  transform: none;
  transition:
    opacity 0.6s ease,
    transform 0.6s cubic-bezier(0.2, 0.7, 0.3, 1);
}
@media (prefers-reduced-motion: reduce) {
  .rv,
  .rv.in {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .btn,
  a.card,
  .lenscard {
    transition: none;
  }
}
.no-js .rv {
  opacity: 1;
  transform: none;
}

/* ---------- Utility -------------------------------------------------------- */

.vh {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.mt-s {
  margin-top: 14px;
}
.mt-m {
  margin-top: 26px;
}
.mt-l {
  margin-top: 44px;
}
.mb-m {
  margin-bottom: 26px;
}

/* Hide bottom footer links */
.site-foot .foot-bottom a {
  display: none;
}

/* Hide the Legal link in the nav list */
.site-foot a[href="../legal/index.html"] {
  display: none;
}

.ph {
  display: none;
}
li.small:has(.ph) {
  display: none;
}
