@charset "UTF-8";
/* ==========================================================================
   Just Jenius — justjenius.com
   Editorial system: bone paper, oxblood, ink. Serif display / sans body /
   mono micro-labels. Built to read as a design studio, not a corporate site.
   ========================================================================== */

/* --- tokens --------------------------------------------------------------- */
:root {
  --paper:      #F4EFE6;
  --paper-2:    #EDE7DA;
  --paper-3:    #E2DACA;
  --paper-deep: #1B1815;

  --ink:    #17140F;
  --ink-2:  #47413A;
  --ink-3:  #6B6355;   /* AA-contrast on --paper at small sizes */

  --red:      #9A2424;
  --red-deep: #741B1B;
  --red-soft: #C4756F;

  --rule:      rgba(23, 20, 15, .16);
  --rule-soft: rgba(23, 20, 15, .09);

  --f-display: "Instrument Serif", "Hoefler Text", Georgia, "Times New Roman", serif;
  --f-body:    "Instrument Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --f-mono:    "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --gut: clamp(1.25rem, 4vw, 3.5rem);
  --max: 1680px;
  --band-y: clamp(4.5rem, 11vw, 10rem);

  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* --- reset ---------------------------------------------------------------- */
*, *::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(--paper);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: clamp(1rem, .95rem + .22vw, 1.125rem);
  line-height: 1.62;
  font-synthesis-weight: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, svg, video { display: block; max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4, p, figure, blockquote, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }

::selection { background: var(--red); color: var(--paper); }

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

/* --- layout primitives ---------------------------------------------------- */
.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gut);
}

.band { padding-block: var(--band-y); position: relative; }
.band--rule { border-top: 1px solid var(--rule); }
.band--tint { background: var(--paper-2); }
.band--tight { padding-block: clamp(3rem, 7vw, 6rem); }

.band--dark {
  background: var(--paper-deep);
  color: var(--paper);
  --rule: rgba(244, 239, 230, .18);
  --rule-soft: rgba(244, 239, 230, .1);
  --ink: var(--paper);
  --ink-2: #C8C0B2;
  --ink-3: #A69D8D;
  --red: #D96A5C;
}

/* 12-column editorial rail: sticky label left, content right. */
.rail {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: var(--gut);
  row-gap: clamp(1.75rem, 4vw, 3rem);
}
.rail__label { grid-column: 1 / 4; }
.rail__body  { grid-column: 4 / 13; }
.rail__body--narrow { grid-column: 4 / 11; }
.rail__full  { grid-column: 1 / 13; }

@media (min-width: 60rem) {
  .rail__label {
    position: sticky;
    top: calc(var(--head-h, 3.25rem) + 2.25rem);
    align-self: start;
  }
}
@media (max-width: 59.99rem) {
  .rail__label, .rail__body, .rail__body--narrow { grid-column: 1 / 13; }
}

/* --- type ----------------------------------------------------------------- */
.display,
h1.display, h2.display {
  font-family: var(--f-display);
  font-weight: 400;
  line-height: .96;
  letter-spacing: -.015em;
  text-wrap: balance;
}
.display--xl { font-size: clamp(2.9rem, 9.5vw, 8.5rem); }
.display--l  { font-size: clamp(2.4rem, 6.2vw, 5.25rem); }
.display--m  { font-size: clamp(1.9rem, 3.9vw, 3.25rem); line-height: 1.02; }
.display--s  { font-size: clamp(1.5rem, 2.5vw, 2.15rem); line-height: 1.08; }
.display em, .display i { font-style: italic; color: var(--red); }

.lede {
  font-size: clamp(1.15rem, 1rem + .75vw, 1.6rem);
  line-height: 1.45;
  color: var(--ink-2);
  text-wrap: pretty;
  max-width: 46ch;
}

.meta {
  font-family: var(--f-mono);
  font-size: .6875rem;
  font-weight: 400;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--ink-3);
  line-height: 1.5;
}
.meta--ink { color: var(--ink); }
.meta--red { color: var(--red); }

.body-copy p + p { margin-top: 1.1em; }
.body-copy { max-width: 62ch; color: var(--ink-2); text-wrap: pretty; }
.body-copy strong { color: var(--ink); font-weight: 600; }

.idx {
  font-family: var(--f-display);
  font-size: clamp(3rem, 8vw, 7rem);
  line-height: .8;
  color: var(--red);
  opacity: .22;
  display: block;
  letter-spacing: -.04em;
}

/* --- links & buttons ------------------------------------------------------ */
a { color: inherit; text-decoration: none; }

.link {
  position: relative;
  display: inline;
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0% 1px;
  background-repeat: no-repeat;
  background-position: 0 100%;
  transition: background-size .45s var(--ease);
  padding-bottom: .12em;
}
.link:hover, .link:focus-visible { background-size: 100% 1px; }
.link--on { background-size: 100% 1px; }
.link--on:hover { background-size: 0% 1px; background-position: 100% 100%; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  padding: .95rem 1.7rem;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font-family: var(--f-mono);
  font-size: .75rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transition: color .4s var(--ease), border-color .4s var(--ease);
}
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--ink);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform .4s var(--ease);
  z-index: -1;
}
.btn:hover::before, .btn:focus-visible::before { transform: scaleY(1); }
.btn:hover, .btn:focus-visible { color: var(--paper); }
.btn--red { border-color: var(--red); color: var(--red); }
.btn--red::before { background: var(--red); }
.btn--solid { background: var(--ink); color: var(--paper); }
.btn--solid::before { background: var(--red); transform-origin: bottom; }
.btn--solid:hover, .btn--solid:focus-visible { color: var(--paper); border-color: var(--red); }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn__arrow { transition: transform .4s var(--ease); }
.btn:hover .btn__arrow { transform: translateX(4px); }

/* --- header --------------------------------------------------------------- */
.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: var(--ink);
  color: var(--paper);
  padding: .85rem 1.25rem;
  font-family: var(--f-mono);
  font-size: .75rem;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.skip:focus { left: .5rem; top: .5rem; }

.site-head {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: 100;
  padding-block: 1rem;
  transition: background-color .45s var(--ease), backdrop-filter .45s var(--ease),
              border-color .45s var(--ease);
  border-bottom: 1px solid transparent;
}
.site-head.is-stuck {
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom-color: var(--rule-soft);
}
.site-head__grid {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: var(--gut);
}

.brand { display: inline-flex; align-items: center; gap: .6rem; }
.brand__mark { width: 1.6rem; height: 1.6rem; flex: none; }
.brand__word {
  font-family: var(--f-display);
  font-size: 1.4rem;
  letter-spacing: -.01em;
  line-height: 1;
  white-space: nowrap;
}
.brand__tag {
  display: none;
  font-family: var(--f-mono);
  font-size: .625rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-3);
  border-left: 1px solid var(--rule);
  padding-left: .75rem;
  margin-left: .25rem;
  max-width: 24ch;
  line-height: 1.4;
}
@media (min-width: 82rem) { .brand__tag { display: block; } }

.nav { display: none; }
@media (min-width: 60rem) {
  .nav { display: flex; gap: clamp(1.25rem, 2.4vw, 2.5rem); justify-self: center; }
}
.nav a {
  font-family: var(--f-mono);
  font-size: .6875rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  padding-block: .25rem;
}
.nav a[aria-current="page"] { color: var(--red); }

.head-right { display: flex; align-items: center; gap: 1rem; justify-self: end; }
.head-mail {
  display: none;
  font-family: var(--f-mono);
  font-size: .6875rem;
  letter-spacing: .1em;
  text-transform: uppercase;
}
@media (min-width: 60rem) { .head-mail { display: inline; } }

.burger {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 2.75rem;
  height: 2.25rem;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
  align-items: center;
}
.burger span {
  display: block;
  width: 16px;
  height: 1px;
  background: var(--ink);
  transition: transform .35s var(--ease), opacity .25s var(--ease);
}
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(3px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-3px) rotate(-45deg); }
@media (min-width: 60rem) { .burger { display: none; } }

/* mobile drawer */
.drawer {
  position: fixed;
  inset: 0;
  z-index: 99;
  background: var(--paper);
  padding: 6rem var(--gut) 3rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transform: translateY(-100%);
  transition: transform .55s var(--ease);
  overscroll-behavior: contain;
  overflow-y: auto;
}
.drawer[data-open="true"] { transform: translateY(0); }
.drawer a.drawer__link {
  display: block;
  font-family: var(--f-display);
  font-size: clamp(2.25rem, 11vw, 3.5rem);
  line-height: 1.18;
  border-bottom: 1px solid var(--rule-soft);
  padding-block: .35em;
}
.drawer a.drawer__link[aria-current="page"] { color: var(--red); }
@media (min-width: 60rem) { .drawer { display: none; } }

/* --- hero ----------------------------------------------------------------- */
.hero { padding-top: clamp(7rem, 16vw, 11rem); padding-bottom: clamp(2rem, 5vw, 4rem); }
.hero__head { display: grid; gap: clamp(1.5rem, 3vw, 2.5rem); }
.hero__title { margin-bottom: .1em; }
.hero__foot {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(1.25rem, 4vw, 4rem);
  align-items: end;
  justify-content: space-between;
  border-top: 1px solid var(--rule);
  padding-top: 1.5rem;
  margin-top: clamp(1rem, 3vw, 2rem);
}
.hero__media { margin-top: clamp(2rem, 5vw, 4rem); }

/* --- figures & placeholders ---------------------------------------------- */
.figure { position: relative; margin: 0; }
.figure__frame {
  position: relative;
  overflow: hidden;
  background: var(--paper-3);
  border-radius: 2px;
}
.figure__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.4s var(--ease), filter .6s var(--ease);
}
.figure--zoom:hover .figure__frame img { transform: scale(1.035); }
.ratio-32   { aspect-ratio: 3 / 2; }
.ratio-169  { aspect-ratio: 16 / 9; }
.ratio-11   { aspect-ratio: 1 / 1; }
.ratio-45   { aspect-ratio: 4 / 5; }
.ratio-23   { aspect-ratio: 2 / 3; }

.figure__cap {
  margin-top: .85rem;
  display: flex;
  gap: .75rem;
  align-items: baseline;
  justify-content: space-between;
  font-family: var(--f-mono);
  font-size: .6875rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* Placeholder notes — visible only while html.ph-on. One flag flips them all. */
.ph-note { display: none; }
.ph-on .ph-note {
  display: block;
  margin-top: .6rem;
  font-family: var(--f-mono);
  font-size: .6875rem;
  line-height: 1.5;
  letter-spacing: .04em;
  color: var(--red);
  border-left: 2px solid var(--red);
  padding: .35rem 0 .35rem .7rem;
  background: color-mix(in srgb, var(--red) 5%, transparent);
}
.ph-on .figure__frame::after {
  content: "PLACEHOLDER";
  position: absolute;
  top: .6rem;
  left: .6rem;
  font-family: var(--f-mono);
  font-size: .5625rem;
  letter-spacing: .16em;
  padding: .3rem .55rem;
  background: var(--red);
  color: #fff;
  border-radius: 2px;
  pointer-events: none;
  z-index: 2;
}

.ph-toggle {
  font-family: var(--f-mono);
  font-size: .6875rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  background: none;
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: .5rem 1rem;
  cursor: pointer;
  color: var(--ink-3);
  transition: color .3s var(--ease), border-color .3s var(--ease);
}
.ph-toggle:hover { color: var(--red); border-color: var(--red); }

/* --- grids ---------------------------------------------------------------- */
.grid-2, .grid-3, .grid-4 { display: grid; gap: clamp(1.5rem, 3vw, 2.75rem); }
@media (min-width: 45rem) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 68rem) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

/* offset "layered" gallery — the layered feel from the reference sites */
.stagger > *:nth-child(even) { transform: translateY(clamp(1.5rem, 5vw, 4.5rem)); }
@media (max-width: 44.99rem) { .stagger > *:nth-child(even) { transform: none; } }

/* --- service / list items ------------------------------------------------- */
.entry {
  display: grid;
  gap: 1rem clamp(1.5rem, 4vw, 3.5rem);
  padding-block: clamp(2rem, 4vw, 3.25rem);
  border-top: 1px solid var(--rule);
  align-items: start;
}
@media (min-width: 60rem) {
  .entry { grid-template-columns: 4rem minmax(0, 1.15fr) minmax(0, 1.35fr); }
}
.entry__no {
  font-family: var(--f-mono);
  font-size: .75rem;
  letter-spacing: .1em;
  color: var(--red);
  padding-top: .45rem;
}
.entry__title { font-family: var(--f-display); font-size: clamp(1.6rem, 3vw, 2.5rem); line-height: 1.05; }
.entry__body { color: var(--ink-2); max-width: 54ch; }
.entry__tags { margin-top: 1rem; display: flex; flex-wrap: wrap; gap: .4rem; }
.tag {
  font-family: var(--f-mono);
  font-size: .625rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: .3rem .7rem;
  color: var(--ink-3);
}

/* --- marquee -------------------------------------------------------------- */
.marquee {
  overflow: hidden;
  border-block: 1px solid var(--rule);
  padding-block: clamp(1.1rem, 2.2vw, 1.6rem);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee__track {
  display: flex;
  width: max-content;
  gap: 3.5rem;
  animation: slide 46s linear infinite;
}
.marquee__track > span {
  font-family: var(--f-display);
  font-size: clamp(1.4rem, 3.2vw, 2.6rem);
  white-space: nowrap;
  color: var(--ink-2);
  display: inline-flex;
  align-items: center;
  gap: 3.5rem;
}
.marquee__track > span::after { content: "◆"; font-size: .45em; color: var(--red); }
@keyframes slide { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .marquee__track { animation: none; } }

/* --- stats / facts -------------------------------------------------------- */
.facts { display: grid; gap: clamp(1.5rem, 3vw, 2.5rem); }
@media (min-width: 45rem) { .facts { grid-template-columns: repeat(3, 1fr); } }
.fact { border-top: 1px solid var(--rule); padding-top: 1.1rem; }
.fact__k { font-family: var(--f-display); font-size: clamp(2rem, 4vw, 3rem); line-height: 1; }
.fact__v { margin-top: .5rem; }

/* --- careers -------------------------------------------------------------- */
.job {
  border: 1px solid var(--rule);
  border-radius: 3px;
  background: color-mix(in srgb, var(--paper-2) 70%, transparent);
  padding: clamp(1.5rem, 4vw, 3rem);
}
.job__spec { display: grid; gap: 0; margin-top: 1.75rem; }
.job__row {
  display: grid;
  gap: .25rem 1.5rem;
  padding-block: .85rem;
  border-top: 1px solid var(--rule-soft);
}
@media (min-width: 40rem) { .job__row { grid-template-columns: 13rem 1fr; align-items: baseline; } }
.job__row dt { font-family: var(--f-mono); font-size: .6875rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.job__row dd { margin: 0; }

.duties { display: grid; gap: .9rem; margin-top: 1.25rem; }
.duties li {
  display: grid;
  grid-template-columns: 1.75rem 1fr;
  gap: .5rem;
  color: var(--ink-2);
  align-items: start;
}
.duties li::before {
  content: counter(d, decimal-leading-zero);
  counter-increment: d;
  font-family: var(--f-mono);
  font-size: .6875rem;
  color: var(--red);
  padding-top: .35em;
  letter-spacing: .05em;
}
.duties { counter-reset: d; }

.reqs { display: grid; gap: .7rem; margin-top: 1rem; }
.reqs li { display: grid; grid-template-columns: 1rem 1fr; gap: .65rem; color: var(--ink-2); align-items: start; }
.reqs li::before { content: "—"; color: var(--red); line-height: 1.6; }

/* --- forms ---------------------------------------------------------------- */
.form { display: grid; gap: clamp(1.5rem, 3vw, 2.25rem); max-width: 44rem; }
.field { display: grid; gap: .5rem; }
.field > label { font-family: var(--f-mono); font-size: .6875rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.field .req { color: var(--red); }
.field input, .field textarea, .field select {
  width: 100%;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--rule);
  padding: .7rem 0;
  font-size: 1.0625rem;
  border-radius: 0;
  transition: border-color .3s var(--ease);
  -webkit-appearance: none;
     -moz-appearance: none;
          appearance: none;
}
.field select {
  background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%),
                    linear-gradient(135deg, var(--ink) 50%, transparent 50%);
  background-position: right 6px center, right 1px center;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 1.5rem;
  cursor: pointer;
}
.field textarea { min-height: 9rem; resize: vertical; line-height: 1.55; }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-bottom-color: var(--red);
}
.field input:focus-visible, .field textarea:focus-visible, .field select:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 4px;
}
.field--err input, .field--err textarea, .field--err select { border-bottom-color: var(--red); }
.field__err { font-family: var(--f-mono); font-size: .6875rem; color: var(--red); letter-spacing: .05em; min-height: 1em; }

.grid-form { display: grid; gap: clamp(1.5rem, 3vw, 2.25rem); }
@media (min-width: 45rem) { .grid-form { grid-template-columns: 1fr 1fr; } }

.check { display: grid; grid-template-columns: 1.35rem 1fr; gap: .8rem; align-items: start; cursor: pointer; }
.check input { width: 1.15rem; height: 1.15rem; accent-color: var(--red); margin-top: .28rem; }
.check span { font-size: .9375rem; color: var(--ink-2); line-height: 1.5; }

/* honeypot — off-screen, not display:none (bots skip display:none) */
.hp {
  position: absolute !important;
  left: -9999px !important;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.form-note {
  font-size: .875rem;
  color: var(--ink-3);
  max-width: 52ch;
  line-height: 1.6;
}
.form-status {
  font-family: var(--f-mono);
  font-size: .8125rem;
  letter-spacing: .04em;
  padding: 1rem 1.25rem;
  border-left: 2px solid var(--red);
  background: color-mix(in srgb, var(--red) 6%, transparent);
  display: none;
}
.form-status[data-show="true"] { display: block; }
.form-status[data-kind="ok"] { border-left-color: #2F6B4F; background: color-mix(in srgb, #2F6B4F 8%, transparent); color: #245240; }

.cf-turnstile { min-height: 0; }

/* --- footer --------------------------------------------------------------- */
.site-foot {
  background: var(--paper-deep);
  color: var(--paper);
  padding-block: clamp(3.5rem, 8vw, 6rem) 2rem;
  --rule: rgba(244, 239, 230, .16);
  --ink-3: #A69D8D;
  --ink-2: #C8C0B2;
}
.foot-top { display: grid; gap: clamp(2.5rem, 5vw, 4rem); }
@media (min-width: 60rem) { .foot-top { grid-template-columns: 1.4fr 1fr 1fr 1.2fr; } }
.foot-h { font-family: var(--f-mono); font-size: .625rem; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 1.1rem; }
.foot-list { display: grid; gap: .55rem; }
.foot-list a, .foot-list span { color: var(--paper); opacity: .88; }
.foot-list a:hover { opacity: 1; color: var(--red-soft); }

.foot-word { font-family: var(--f-display); font-size: clamp(2rem, 5vw, 3rem); line-height: 1; }
.foot-addr { font-style: normal; color: var(--ink-2); margin-top: 1rem; line-height: 1.65; }

.statutory {
  margin-top: clamp(3rem, 6vw, 4.5rem);
  padding-top: 1.75rem;
  border-top: 1px solid var(--rule);
  font-size: .8125rem;
  line-height: 1.7;
  color: var(--ink-3);
  max-width: 78ch;
}
.foot-bottom {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.75rem;
  align-items: center;
  justify-content: space-between;
  font-family: var(--f-mono);
  font-size: .6875rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.foot-bottom nav { display: flex; flex-wrap: wrap; gap: 1rem 1.5rem; }
.foot-bottom a:hover { color: var(--red-soft); }

/* --- prose (legal pages) -------------------------------------------------- */
.prose { max-width: 74ch; }
.prose h2 {
  font-family: var(--f-display);
  font-size: clamp(1.6rem, 3vw, 2.35rem);
  line-height: 1.1;
  margin-top: 3.25rem;
  margin-bottom: .9rem;
  scroll-margin-top: 6rem;
}
.prose h2:first-child { margin-top: 0; }
.prose h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: .6rem;
  letter-spacing: .005em;
}
.prose p, .prose ul, .prose ol, .prose table { color: var(--ink-2); }
.prose p + p, .prose ul + p, .prose p + ul, .prose p + ol, .prose ol + p { margin-top: 1em; }
.prose ul, .prose ol { margin-top: .85em; display: grid; gap: .55rem; padding-left: 0; }
.prose ul li { display: grid; grid-template-columns: 1.1rem 1fr; gap: .65rem; }
.prose ul li::before { content: "—"; color: var(--red); }
.prose ol { counter-reset: p; }
.prose ol li { display: grid; grid-template-columns: 2rem 1fr; gap: .5rem; }
.prose ol li::before {
  content: counter(p, decimal) ".";
  counter-increment: p;
  font-family: var(--f-mono);
  font-size: .8125rem;
  color: var(--red);
  padding-top: .2em;
}
.prose a { color: var(--red); text-decoration: underline; text-underline-offset: .18em; text-decoration-thickness: 1px; }
.prose a:hover { text-decoration-thickness: 2px; }
.prose strong { color: var(--ink); font-weight: 600; }
.prose table { width: 100%; border-collapse: collapse; margin-top: 1.25rem; font-size: .9375rem; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: .8rem .9rem; border-top: 1px solid var(--rule); }
.prose th { font-family: var(--f-mono); font-size: .625rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); font-weight: 400; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.toc {
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: 1.5rem;
  background: color-mix(in srgb, var(--paper-2) 60%, transparent);
}
.toc ol { counter-reset: t; display: grid; gap: .45rem; }
.toc li { display: grid; grid-template-columns: 2rem 1fr; gap: .5rem; }
.toc li::before {
  content: counter(t, decimal-leading-zero);
  counter-increment: t;
  font-family: var(--f-mono);
  font-size: .6875rem;
  color: var(--red);
  padding-top: .28em;
}
.toc a { color: var(--ink-2); }
.toc a:hover { color: var(--red); }

/* --- cookie consent ------------------------------------------------------- */
.cc {
  position: fixed;
  z-index: 300;
  inset-inline: 0;
  bottom: 0;
  padding: var(--gut);
  display: none;
}
.cc[data-open="true"] { display: block; }
.cc__panel {
  max-width: 46rem;
  margin-inline: auto;
  background: var(--paper);
  border: 1px solid var(--ink);
  border-radius: 4px;
  padding: clamp(1.25rem, 3vw, 2rem);
  box-shadow: 0 24px 60px -20px rgba(23, 20, 15, .45);
  max-height: min(80vh, 44rem);
  overflow-y: auto;
}
.cc__title { font-family: var(--f-display); font-size: 1.6rem; line-height: 1.1; }
.cc__body { font-size: .9375rem; color: var(--ink-2); margin-top: .75rem; line-height: 1.6; }
.cc__actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }
.cc__actions .btn { flex: 1 1 auto; justify-content: center; min-width: 9rem; }
.cc__prefs { display: none; margin-top: 1.5rem; border-top: 1px solid var(--rule); padding-top: 1.25rem; }
.cc__prefs[data-open="true"] { display: grid; gap: 1.1rem; }
.cc__cat { display: grid; grid-template-columns: 1fr auto; gap: .5rem 1rem; align-items: start; }
.cc__cat h3 { font-size: .9375rem; font-weight: 600; margin: 0; }
.cc__cat p { font-size: .8125rem; color: var(--ink-3); margin-top: .2rem; line-height: 1.55; max-width: 52ch; }

.switch { position: relative; display: inline-block; width: 2.75rem; height: 1.5rem; flex: none; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.switch span {
  position: absolute; inset: 0;
  background: var(--paper-3);
  border: 1px solid var(--rule);
  border-radius: 999px;
  transition: background .3s var(--ease);
  pointer-events: none;
}
.switch span::after {
  content: "";
  position: absolute;
  top: 2px; left: 2px;
  width: 1.125rem; height: 1.125rem;
  background: var(--paper);
  border-radius: 50%;
  transition: transform .3s var(--ease);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
}
.switch input:checked + span { background: var(--red); border-color: var(--red); }
.switch input:checked + span::after { transform: translateX(1.2rem); }
.switch input:disabled + span { opacity: .5; }
.switch input:focus-visible + span { outline: 2px solid var(--red); outline-offset: 3px; }

/* --- reveal --------------------------------------------------------------- */
.rv { opacity: 0; transform: translateY(18px); }
.rv.is-in { opacity: 1; transform: none; transition: opacity .9s var(--ease), transform .9s var(--ease); }
@media (prefers-reduced-motion: reduce) {
  .rv { opacity: 1 !important; transform: none !important; }
  .figure__frame img { transition: none; }
}

/* --- misc ----------------------------------------------------------------- */
.vh {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.rule { border: 0; border-top: 1px solid var(--rule); margin: 0; }
.stack { display: grid; }
.stack-1 { gap: .5rem; }  .stack-2 { gap: 1rem; }
.stack-3 { gap: 1.5rem; } .stack-4 { gap: 2.25rem; }
.stack-5 { gap: clamp(2.5rem, 5vw, 4rem); }
.mt-1 { margin-top: .5rem; }  .mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.75rem; } .mt-4 { margin-top: 2.5rem; }
.mt-5 { margin-top: clamp(2.5rem, 5vw, 4rem); }
.grow { flex: 1; }
.nowrap { white-space: nowrap; }

.pill-note {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-family: var(--f-mono);
  font-size: .625rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--red);
  border: 1px solid color-mix(in srgb, var(--red) 40%, transparent);
  border-radius: 999px;
  padding: .35rem .8rem;
}
.pill-note::before { content: ""; width: .4rem; height: .4rem; border-radius: 50%; background: var(--red); }

@media print {
  .site-head, .drawer, .cc, .burger, .ph-note, .site-foot .foot-top { display: none !important; }
  body { background: #fff; color: #000; }
  .rv { opacity: 1 !important; transform: none !important; }
}
