@font-face {
  font-family: Newsreader;
  src: url('/assets/Newsreader-Latin.woff2') format('woff2');
  font-weight: 200 800;
  font-display: swap;
}
@font-face {
  font-family: InterTight;
  src: url('/assets/InterTight-Latin.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url('/assets/IBMPlexMono-Medium.woff2') format('woff2');
  font-weight: 500;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --ink-rgb: 242 240 235;
  --ground-rgb: 10 10 10;
  --muted-rgb: 184 178 168;
  --ink: rgb(var(--ink-rgb));
  --ground: #0a0a0a;
  --quiet: rgb(var(--muted-rgb));
  --muted: var(--quiet);
  --line: #34312d;
  --accent: #f2f0eb;
  --halftone-screen: none;
  --halftone-wash: none;
  /* Night edition waitlist card: smoked obsidian gallery glass with ivory hairline. */
  --sheet-bg: rgb(15 15 15 / .88);
  --sheet-ink: #f2f0eb;
  --sheet-muted: #a6a096;
  --sheet-rule: rgb(242 240 235 / .24);
  --sheet-accent: #f2f0eb;
  --sheet-border: rgb(242 240 235 / .18);
  --sheet-highlight: inset 0 1px 0 rgb(255 255 255 / .07);
  --sheet-shadow: 0 2px 6px rgb(0 0 0 / .32), 0 28px 72px rgb(0 0 0 / .72);
  --medallion-bg: rgb(18 18 18 / .92);
  --medallion-bg-hover: rgb(24 24 24 / .98);
  --medallion-border: rgb(242 240 235 / .22);
  --medallion-border-hover: rgb(242 240 235 / .46);
  --medallion-shadow: 0 4px 18px rgb(0 0 0 / .44);
  --medallion-inv-bg: #f2f0eb;
  --medallion-inv-bg-hover: #ffffff;
  --medallion-inv-ink: #0a0a0a;
  --medallion-inv-border: rgb(242 240 235 / .92);
  --medallion-inv-shadow: 0 4px 20px rgb(0 0 0 / .48);
  --home-medallion-bg: rgb(14 14 14 / .78);
  --home-medallion-bg-hover: rgb(18 18 18 / .88);
  --home-medallion-border: rgb(242 240 235 / .24);
  --home-medallion-border-hover: rgb(242 240 235 / .44);
  --home-medallion-shadow: 0 4px 20px rgb(0 0 0 / .52);

  --serif: Newsreader, Georgia, serif;
  --sans: InterTight, system-ui, -apple-system, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --ease: cubic-bezier(.22, .75, .18, 1);

  --reading-gutter: clamp(1.25rem, 5vw, 5.5rem);
  --reading-width: 78rem;
  --rail-left: max(var(--reading-gutter), calc((100vw - var(--reading-width)) / 2), env(safe-area-inset-left));
  --rail-right: max(var(--reading-gutter), calc((100vw - var(--reading-width)) / 2), env(safe-area-inset-right));
  --masthead-padding: clamp(.75rem, 1.5vw, 1.35rem);
}

:root[data-ruth-theme="day"] {
  color-scheme: light;
  --ink-rgb: 17 16 15;
  --ground-rgb: 245 243 238;
  --muted-rgb: 88 85 79;
  --ink: rgb(var(--ink-rgb));
  --ground: #f5f3ee;
  --quiet: rgb(var(--muted-rgb));
  --muted: var(--quiet);
  --line: #d4cfc7;
  --accent: #11100f;
  /* Crisp 6.5px 0-degree orthogonal Swiss halftone screen & graded architectural wash. */
  --halftone-screen: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='6.5' height='6.5' viewBox='0 0 6.5 6.5'%3E%3Ccircle cx='3.25' cy='3.25' r='.7' fill='%2311100f' fill-opacity='.135'/%3E%3C/svg%3E");
  --halftone-wash: url('/assets/halftone-wash.svg?v=2026-htbg1');
  /* Day edition waitlist card: crisp dot-free archival ivory stationery card over halftone print. */
  --sheet-bg: rgb(252 251 248 / .97);
  --sheet-ink: #11100f;
  --sheet-muted: #5f5b55;
  --sheet-rule: rgb(17 16 15 / .24);
  --sheet-accent: #11100f;
  --sheet-border: rgb(17 16 15 / .15);
  --sheet-highlight: inset 0 1px 0 rgb(255 255 255 / .9);
  --sheet-shadow: 0 1px 2px rgb(17 16 15 / .05), 0 18px 46px rgb(17 16 15 / .10), 0 36px 84px rgb(17 16 15 / .07);
  --medallion-bg: #f7f5f0;
  --medallion-bg-hover: #fbfaf7;
  --medallion-border: rgb(17 16 15 / .17);
  --medallion-border-hover: rgb(17 16 15 / .36);
  --medallion-shadow: 0 2px 12px rgb(17 16 15 / .08);
  --medallion-inv-bg: #11100f;
  --medallion-inv-bg-hover: #211f1d;
  --medallion-inv-ink: #f5f3ee;
  --medallion-inv-border: rgb(17 16 15 / .94);
  --medallion-inv-shadow: 0 3px 14px rgb(17 16 15 / .18);
  --home-medallion-bg: rgb(247 245 240 / .95);
  --home-medallion-bg-hover: rgb(251 250 247 / .99);
  --home-medallion-border: rgb(17 16 15 / .17);
  --home-medallion-border-hover: rgb(17 16 15 / .34);
  --home-medallion-shadow: 0 2px 14px rgb(17 16 15 / .10);
}

@media (prefers-color-scheme: light) {
  :root:not([data-ruth-theme="night"]) {
    color-scheme: light;
    --ink-rgb: 17 16 15;
    --ground-rgb: 245 243 238;
    --muted-rgb: 88 85 79;
    --ink: rgb(var(--ink-rgb));
    --ground: #f5f3ee;
    --quiet: rgb(var(--muted-rgb));
    --muted: var(--quiet);
    --line: #d4cfc7;
    --accent: #11100f;
    --halftone-screen: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='6.5' height='6.5' viewBox='0 0 6.5 6.5'%3E%3Ccircle cx='3.25' cy='3.25' r='.7' fill='%2311100f' fill-opacity='.135'/%3E%3C/svg%3E");
    --halftone-wash: url('/assets/halftone-wash.svg?v=2026-htbg1');
    --sheet-bg: rgb(252 251 248 / .97);
    --sheet-ink: #11100f;
    --sheet-muted: #5f5b55;
    --sheet-rule: rgb(17 16 15 / .24);
    --sheet-accent: #11100f;
    --sheet-border: rgb(17 16 15 / .15);
    --sheet-highlight: inset 0 1px 0 rgb(255 255 255 / .9);
    --sheet-shadow: 0 1px 2px rgb(17 16 15 / .05), 0 18px 46px rgb(17 16 15 / .10), 0 36px 84px rgb(17 16 15 / .07);
    --medallion-bg: #f7f5f0;
    --medallion-bg-hover: #fbfaf7;
    --medallion-border: rgb(17 16 15 / .17);
    --medallion-border-hover: rgb(17 16 15 / .36);
    --medallion-shadow: 0 2px 12px rgb(17 16 15 / .08);
    --medallion-inv-bg: #11100f;
    --medallion-inv-bg-hover: #211f1d;
    --medallion-inv-ink: #f5f3ee;
    --medallion-inv-border: rgb(17 16 15 / .94);
    --medallion-inv-shadow: 0 3px 14px rgb(17 16 15 / .18);
    --home-medallion-bg: rgb(247 245 240 / .95);
    --home-medallion-bg-hover: rgb(251 250 247 / .99);
    --home-medallion-border: rgb(17 16 15 / .17);
    --home-medallion-border-hover: rgb(17 16 15 / .34);
    --home-medallion-shadow: 0 2px 14px rgb(17 16 15 / .10);
  }
}

@view-transition {
  navigation: auto;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation-duration: .24s;
    animation-timing-function: var(--ease);
  }
}

@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) {
    animation: none !important;
  }
}

* { box-sizing: border-box; }

::selection {
  background: color-mix(in srgb, var(--ink) 16%, transparent);
  color: var(--ink);
}

a { color: inherit; }
button, input { font: inherit; color: inherit; -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button, input { border-radius: 0; }
[hidden] { display: none !important; }

a:focus-visible,
button:focus-visible,
input:focus-visible,
[tabindex="-1"]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.skip {
  position: fixed;
  z-index: 30;
  left: var(--rail-left);
  top: 12px;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  background: var(--ink);
  color: var(--ground);
  font: 520 15px/1.2 var(--sans);
  text-decoration: none;
}
.skip:focus {
  width: auto;
  height: auto;
  padding: 12px 18px;
  overflow: visible;
  clip-path: none;
}

/* Shared navigation */
.site-nav {
  display: flex;
  gap: clamp(.9rem, 1.9vw, 1.65rem);
  align-items: center;
  view-transition-name: ruth-nav;
}

.masthead .site-nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-inline-size: 44px;
  min-block-size: 44px;
  box-sizing: border-box;
  color: inherit;
  font: 510 .95rem/1.2 var(--sans);
  letter-spacing: -.01em;
  text-decoration: none;
  background: transparent;
  border: 0;
  padding: 0;
  transition: color .18s ease, opacity .18s ease;
}

.masthead .site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 9px;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .26s var(--ease);
}

.masthead .site-nav a:is([aria-current="page"], :hover, :focus-visible)::after {
  transform: scaleX(1);
}

/* Shared wordmark link */
.ruth-home,
.imprint {
  view-transition-name: ruth-wordmark;
}

.imprint {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: inherit;
  text-decoration: none;
}

.imprint svg {
  display: block;
  height: clamp(26px, 2.7vw, 35px);
  width: auto;
}

/* Wordless Ruth 3x3 diagonal-graded halftone matrix trigger (6.5px pitch, 18x18)
   and full-viewport archival monograph overlay */
.menu-toggle {
  display: none;
  position: relative;
  isolation: isolate;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  pointer-events: auto;
  transition: opacity .18s ease, transform .2s var(--ease);
}

/* Signature matte circular optical loupe medallion shared across every mobile
   and tablet view, keeping the 3x3 halftone matrix razor-clear above both
   Justitia artwork and reading-page halftone washes with exact 0.0px lock. */
.menu-toggle::before {
  content: "";
  position: absolute;
  inset: 1px;
  z-index: -1;
  border-radius: 50%;
  background: var(--medallion-bg);
  border: 1px solid var(--medallion-border);
  box-shadow: var(--medallion-shadow);
  transition: background-color .18s ease, border-color .18s ease, transform .22s var(--ease);
}

@media (hover: hover) {
  .menu-toggle:hover::before {
    background: var(--medallion-bg-hover);
    border-color: var(--medallion-border-hover);
  }
}

.menu-toggle:active {
  transform: scale(.94);
}

.menu-matrix {
  display: block;
  width: 18px;
  height: 18px;
  overflow: visible;
  transition: transform .36s var(--ease);
}

/* Optical centering correction for the diagonal-graded 3x3 halftone weight */
.menu-toggle[aria-expanded="false"] .menu-matrix {
  transform: translate(.35px, .35px);
}

.menu-matrix .mm-d {
  transform-box: fill-box;
  transform-origin: center;
  transition: transform .34s var(--ease), opacity .24s ease;
  transition-delay: calc(var(--d, 0) * 18ms);
}

.menu-matrix .mm-cross {
  transform-box: view-box;
  transform-origin: 9px 9px;
  opacity: 0;
  transform: scale(.45);
  transition: transform .36s var(--ease), opacity .26s ease;
}

@media (hover: hover) {
  .menu-toggle:hover .mm-d {
    transform: scale(1.14);
  }
  .menu-close:hover .menu-matrix {
    transform: rotate(90deg);
  }
}

/* Open morph: all 9 halftone dots are conserved as the 4 cardinal dots glide
   45 degrees inward into the inner diagonal slots, forming a pure-dot x
   with zero wire lines on an inverse-plate circular medallion. */
.menu-toggle[aria-expanded="true"] .mm-nw,
.site-menu[aria-hidden="false"] .menu-close .mm-nw {
  transform: scale(.764);
}

.menu-toggle[aria-expanded="true"] .mm-ne,
.site-menu[aria-hidden="false"] .menu-close .mm-ne,
.menu-toggle[aria-expanded="true"] .mm-sw,
.site-menu[aria-hidden="false"] .menu-close .mm-sw {
  transform: scale(1.046);
}

.menu-toggle[aria-expanded="true"] .mm-ctr,
.site-menu[aria-hidden="false"] .menu-close .mm-ctr {
  transform: scale(1.104);
}

.menu-toggle[aria-expanded="true"] .mm-se,
.site-menu[aria-hidden="false"] .menu-close .mm-se {
  transform: scale(1.478);
}

.menu-toggle[aria-expanded="true"] .mm-n,
.site-menu[aria-hidden="false"] .menu-close .mm-n {
  transform: translate(3.25px, 3.25px) scale(.921);
}

.menu-toggle[aria-expanded="true"] .mm-e,
.site-menu[aria-hidden="false"] .menu-close .mm-e {
  transform: translate(-3.25px, 3.25px) scale(1.273);
}

.menu-toggle[aria-expanded="true"] .mm-s,
.site-menu[aria-hidden="false"] .menu-close .mm-s {
  transform: translate(-3.25px, -3.25px) scale(1.273);
}

.menu-toggle[aria-expanded="true"] .mm-w,
.site-menu[aria-hidden="false"] .menu-close .mm-w {
  transform: translate(3.25px, -3.25px) scale(.921);
}

/* On the closed sheet, prime the close button's matrix so opening reveals the morph */
.menu-close .mm-d {
  opacity: 1;
  transform: translate(0, 0) scale(1);
}

.site-menu {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  background: rgb(var(--ground-rgb) / .95);
  backdrop-filter: blur(24px) saturate(110%);
  -webkit-backdrop-filter: blur(24px) saturate(110%);
  color: var(--ink);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .28s var(--ease), visibility 0s .28s;
}

.site-menu::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 82% 14%, rgb(242 240 235 / .045), transparent 56%);
}

html[data-ruth-theme="day"] .site-menu::before {
  background-image: var(--halftone-wash), var(--halftone-screen);
  background-repeat: no-repeat, repeat;
  background-position: right top, right top;
  background-size: 624px 442px, 6.5px 6.5px;
  opacity: .84;
}

@media (prefers-color-scheme: light) {
  html:not([data-ruth-theme="night"]) .site-menu::before {
    background-image: var(--halftone-wash), var(--halftone-screen);
    background-repeat: no-repeat, repeat;
    background-position: right top, right top;
    background-size: 624px 442px, 6.5px 6.5px;
    opacity: .84;
  }
}

.site-menu[aria-hidden="false"] {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity .28s var(--ease), visibility 0s 0s;
}

.site-menu-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  min-height: 100dvh;
  padding:
    max(var(--masthead-padding), env(safe-area-inset-top))
    var(--rail-right)
    max(26px, env(safe-area-inset-bottom))
    var(--rail-left);
  overflow-y: auto;
}

.site-menu-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: var(--masthead-padding);
  border-bottom: 1px solid var(--line);
}

.menu-imprint {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: inherit;
  text-decoration: none;
}

.menu-imprint svg {
  display: block;
  height: clamp(26px, 2.7vw, 35px);
  width: auto;
}

.menu-close {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-right: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--medallion-inv-ink);
  transition: transform .2s var(--ease);
}

/* Inverse-plate circular optical medallion matching the open button at 0.0px lock:
   solid ink disc with alabaster dots in Day mode, solid ivory disc with obsidian dots in Night mode */
.menu-close::before {
  content: "";
  position: absolute;
  inset: 1px;
  z-index: -1;
  border-radius: 50%;
  background: var(--medallion-inv-bg);
  border: 1px solid var(--medallion-inv-border);
  box-shadow: var(--medallion-inv-shadow);
  transition: background-color .18s ease, border-color .18s ease, transform .22s var(--ease);
}

@media (hover: hover) {
  .menu-close:hover::before {
    background: var(--medallion-inv-bg-hover);
    border-color: var(--medallion-inv-bg-hover);
  }
}

.menu-close:active { transform: scale(.93); }

.site-menu-nav {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(1.25rem, 4vh, 2.25rem) 0 clamp(2rem, 6vh, 3.25rem);
}

.menu-kicker {
  margin: 0 0 .95rem;
  color: var(--quiet);
  font: 520 .7rem/1 var(--sans);
  letter-spacing: .16em;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .28s var(--ease), transform .32s var(--ease);
}

.site-menu[aria-hidden="false"] .menu-kicker {
  opacity: 1;
  transform: translateY(0);
}

.menu-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.menu-row {
  border-bottom: 1px solid var(--line);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .32s var(--ease), transform .36s var(--ease);
  transition-delay: calc(var(--i, 0) * 48ms + 25ms);
}

.menu-row:first-child {
  border-top: 1px solid var(--line);
}

.site-menu[aria-hidden="false"] .menu-row {
  opacity: 1;
  transform: translateY(0);
}

.menu-link {
  display: grid;
  grid-template-columns: 2.2rem minmax(0, 1fr) auto;
  align-items: start;
  column-gap: .65rem;
  padding-block: clamp(1.2rem, 3.2vh, 1.7rem);
  text-decoration: none;
  color: var(--ink);
  transition: opacity .18s ease;
}

.menu-link:active { opacity: .65; }

.menu-num {
  grid-column: 1;
  grid-row: 1;
  padding-top: .58rem;
  color: var(--quiet);
  font: 520 .72rem/1 var(--sans);
  font-variant-numeric: tabular-nums;
  letter-spacing: .12em;
}

.menu-link[aria-current="page"] .menu-num {
  color: var(--ink);
}

.menu-text {
  display: contents;
}

.menu-title {
  grid-column: 2;
  grid-row: 1;
  font: 400 clamp(2.2rem, 9.6vw, 3.05rem)/1.02 var(--serif);
  font-variation-settings: "opsz" 42;
  letter-spacing: -.038em;
}

.menu-sub {
  grid-column: 2 / -1;
  grid-row: 2;
  margin-top: .36rem;
  color: var(--quiet);
  font: 430 .88rem/1.35 var(--sans);
  letter-spacing: -.005em;
}

.menu-current {
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding-top: .6rem;
  color: var(--quiet);
  font: 520 .68rem/1 var(--sans);
  letter-spacing: .14em;
  text-transform: uppercase;
}

.menu-current-dot {
  width: 4px;
  height: 4px;
  background: var(--ink);
}

.menu-arrow {
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
  align-self: start;
  margin-top: .92rem;
  width: 18px;
  height: 12px;
  fill: none;
  stroke: var(--quiet);
  stroke-width: 1.25;
  transition: transform .22s var(--ease), stroke .18s ease;
}

.menu-link:is(:hover, :focus-visible) .menu-arrow {
  transform: translateX(4px);
  stroke: var(--ink);
}

.site-menu-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .75rem 1.5rem;
  padding-top: 1.05rem;
  border-top: 1px solid var(--line);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .3s var(--ease) .15s, transform .34s var(--ease) .15s;
}

.site-menu[aria-hidden="false"] .site-menu-foot {
  opacity: 1;
  transform: translateY(0);
}

.menu-waitlist-btn {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: 520 .98rem/1.1 var(--sans);
  letter-spacing: -.01em;
  text-decoration: none;
}

.menu-waitlist-btn:hover { opacity: .72; }

.menu-plus {
  position: relative;
  width: 13px;
  height: 13px;
}

.menu-plus::before,
.menu-plus::after {
  content: "";
  position: absolute;
  top: 6px;
  left: 0;
  width: 13px;
  height: 1.35px;
  background: currentColor;
}

.menu-plus::after { transform: rotate(90deg); }

.menu-foot-links {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .35rem 1.25rem;
}

.menu-privacy {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--quiet);
  font: 460 .9rem/1.2 var(--sans);
  text-decoration: none;
}

.menu-privacy:is(:hover, :focus-visible) {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: .25em;
}

/* Discreet Day / Night mode switcher:
   - Desktop reading pages: inline inside .colophon-links alongside Privacy
   - Desktop homepage: anchored quietly bottom-left on --rail-left
   - Mobile (all routes): inside .site-menu-foot */
.theme-switch {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--quiet);
  font: 460 .9rem/1.2 var(--sans);
  letter-spacing: -.005em;
  transition: color .18s ease, opacity .18s ease;
}

.theme-switch:is(:hover, :focus-visible) {
  color: var(--ink);
}

.theme-glyph {
  display: block;
  width: 11px;
  height: 11px;
  flex: none;
  transition: transform .38s var(--ease);
}

.theme-switch[data-theme="night"] .theme-glyph {
  transform: rotate(180deg);
}

.home-theme-foot {
  display: none;
  position: fixed;
  z-index: 6;
  inset-block-end: max(var(--masthead-padding), env(safe-area-inset-bottom));
  inset-inline-start: var(--rail-left);
  pointer-events: auto;
}

.home-theme-foot .theme-switch {
  font-size: .84rem;
  font-weight: 480;
  opacity: .88;
}

.home-theme-foot .theme-switch:is(:hover, :focus-visible) {
  opacity: 1;
}

body[data-waitlist-open="true"] .home-theme-foot {
  display: none !important;
}

body[data-menu-open="true"] {
  overflow: hidden !important;
}

/* Inner reading pages switch to the monograph menu at <= 680px, centered inside
   the circular medallion for exact 0.0px lock with .menu-close. */
@media (max-width: 680px) {
  .has-menu-js .reading-edition .masthead .site-nav {
    display: none;
  }
  .has-menu-js .reading-edition .masthead .menu-toggle {
    display: inline-flex;
    justify-content: center;
    margin-right: 0;
  }
  .has-menu-js .reading-edition .colophon-links .theme-switch {
    display: none;
  }
}

@media (min-width: 681px) {
  .reading-edition .site-menu { display: none !important; }
}

/* Homepage switches to a frosted obsidian (Night) or luminous alabaster (Day)
   circular optical medallion over Justitia artwork whenever not in desktop
   left-rail composition. */
@media not all and (min-width: 900px) and (min-height: 550px) and (min-aspect-ratio: 4/3) {
  .has-menu-js body[data-design] > .masthead {
    inset-inline-start: auto;
    inset-inline-end: var(--rail-right);
  }
  .has-menu-js body[data-design] > .masthead .site-nav {
    display: none;
  }
  .has-menu-js body[data-design] > .masthead .menu-toggle {
    display: inline-flex;
    justify-content: center;
    padding: 0;
    margin-right: 0;
  }
  .has-menu-js body[data-design] > .masthead .menu-toggle::before {
    background: var(--home-medallion-bg);
    border: 1px solid var(--home-medallion-border);
    box-shadow: var(--home-medallion-shadow);
    backdrop-filter: blur(20px) saturate(115%);
    -webkit-backdrop-filter: blur(20px) saturate(115%);
  }
  @media (hover: hover) {
    .has-menu-js body[data-design] > .masthead .menu-toggle:hover::before {
      background: var(--home-medallion-bg-hover);
      border-color: var(--home-medallion-border-hover);
    }
  }
}

@media (min-width: 900px) and (min-height: 550px) and (min-aspect-ratio: 4/3),
       (min-width: 1024px) and (min-aspect-ratio: 4/3) {
  .has-menu-js body[data-design] > .masthead {
    inset-inline-start: var(--rail-left);
    inset-inline-end: auto;
  }
  .has-menu-js body[data-design] > .masthead .site-nav {
    display: flex;
  }
  .has-menu-js body[data-design] > .masthead .menu-toggle {
    display: none;
  }
  body[data-design] .site-menu {
    display: none !important;
  }
  .has-menu-js body[data-design] .home-theme-foot {
    display: flex;
  }
}

/* Before launch the public site has no menu. On the homepage the light/dark
   switch then shows at every size as quiet text, bottom left, where the
   background is plain. Reading pages keep it in the colophon. */
.no-menu body[data-design] .home-theme-foot {
  display: flex;
}

.no-menu body[data-design] .home-theme-foot .theme-switch {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: var(--quiet);
  opacity: .88;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.no-menu body[data-design] .home-theme-foot .theme-switch:is(:hover, :focus-visible) {
  color: var(--ink);
  opacity: 1;
}

/* Compact phone landscape (e.g. 667x375): transform monograph sheet into a
   single-screen 3-column Swiss architectural spread so nothing clips off-screen. */
@media (max-height: 520px) {
  .site-menu-inner {
    padding-top: max(var(--masthead-padding), env(safe-area-inset-top));
    padding-bottom: max(12px, env(safe-area-inset-bottom));
  }
  .site-menu-head {
    padding-bottom: 8px;
  }
  .menu-imprint svg {
    height: 22px;
  }
  .site-menu-nav {
    padding-block: .65rem;
  }
  .menu-kicker {
    margin-bottom: .55rem;
  }
  .menu-link {
    padding-block: .75rem;
  }
  .menu-title {
    font-size: clamp(1.5rem, 4.4vw, 1.95rem);
  }
  .menu-num {
    padding-top: .34rem;
  }
  .menu-current {
    padding-top: .36rem;
  }
  .menu-arrow {
    margin-top: .58rem;
  }
  .menu-sub {
    margin-top: .22rem;
    font-size: .8rem;
  }
  .site-menu-foot {
    padding-top: .55rem;
  }
}

@media (max-height: 520px) and (min-width: 520px) {
  .menu-list {
    display: grid;
    /* One row of equal columns, however many entries the index has. */
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
  }
  .menu-row {
    border: 0;
  }
  .menu-row:first-child {
    border-top: 0;
  }
  .menu-row + .menu-row {
    border-left: 1px solid var(--line);
    padding-left: clamp(.85rem, 2.2vw, 1.35rem);
  }
  .menu-row:not(:last-child) {
    padding-right: clamp(.85rem, 2.2vw, 1.35rem);
  }
  .menu-link {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    row-gap: .28rem;
    column-gap: .5rem;
    padding-block: .9rem;
    height: 100%;
    align-content: start;
  }
  .menu-num {
    grid-column: 1;
    grid-row: 1;
    padding-top: 0;
  }
  .menu-current,
  .menu-arrow {
    grid-column: 2;
    grid-row: 1;
    padding-top: 0;
    margin-top: 0;
    align-self: center;
  }
  .menu-title {
    grid-column: 1 / -1;
    grid-row: 2;
    margin-top: .32rem;
    font-size: clamp(1.55rem, 3.4vw, 1.95rem);
  }
  .menu-sub {
    grid-column: 1 / -1;
    grid-row: 3;
    margin-top: .08rem;
    font-size: .78rem;
    line-height: 1.35;
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-menu,
  .menu-kicker,
  .menu-row,
  .site-menu-foot,
  .menu-matrix,
  .menu-matrix .mm-d,
  .menu-matrix .mm-cross,
  .menu-toggle,
  .menu-close,
  .theme-glyph,
  .masthead .site-nav a::after {
    transition: none !important;
  }
  .menu-kicker,
  .menu-row,
  .site-menu-foot {
    transform: none !important;
  }
}

@media (max-width: 22rem) {
  :root { --reading-gutter: 1rem; }
}

@media (forced-colors: active) {
  :root {
    --ink: CanvasText;
    --quiet: CanvasText;
    --muted: CanvasText;
    --ground: Canvas;
    --line: CanvasText;
    --accent: Highlight;
    --halftone-screen: none;
    --halftone-wash: none;
    --sheet-bg: Canvas;
    --sheet-ink: CanvasText;
    --sheet-muted: CanvasText;
    --sheet-rule: CanvasText;
    --sheet-accent: Highlight;
    --sheet-border: CanvasText;
    --sheet-shadow: none;
  }
}
