/* arv.sh — the pinned UI.
   This file is the single source of visual truth for the site. Every page
   links it; pages carry no <style> blocks (checks.sh enforces both).
   Editorial split-pane look: paper/ink palette, zero border radius,
   Newsreader (body) / Fraunces (display) / Inconsolata (labels). */

/* ---------- fonts ---------- */

@font-face {
  font-family: "Newsreader Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url(/fonts/newsreader-vietnamese-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+102-103,U+110-111,U+128-129,U+168-169,U+1A0-1A1,U+1AF-1B0,U+300-301,U+303-304,U+308-309,U+323,U+329,U+1EA0-1EF9,U+20AB;
}
@font-face {
  font-family: "Newsreader Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url(/fonts/newsreader-latin-ext-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: "Newsreader Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url(/fonts/newsreader-latin-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: "Inconsolata Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 200 900;
  src: url(/fonts/inconsolata-vietnamese-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+102-103,U+110-111,U+128-129,U+168-169,U+1A0-1A1,U+1AF-1B0,U+300-301,U+303-304,U+308-309,U+323,U+329,U+1EA0-1EF9,U+20AB;
}
@font-face {
  font-family: "Inconsolata Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 200 900;
  src: url(/fonts/inconsolata-latin-ext-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: "Inconsolata Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 200 900;
  src: url(/fonts/inconsolata-latin-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: "Fraunces Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/fonts/fraunces-vietnamese-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+102-103,U+110-111,U+128-129,U+168-169,U+1A0-1A1,U+1AF-1B0,U+300-301,U+303-304,U+308-309,U+323,U+329,U+1EA0-1EF9,U+20AB;
}
@font-face {
  font-family: "Fraunces Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/fonts/fraunces-latin-ext-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: "Fraunces Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/fonts/fraunces-latin-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

/* ---------- tokens ---------- */

:root {
  --paper: #efede6;
  --surface: #f8f4ea;
  --ink: #11100d;
  --muted: #70695e;
  --hairline: #d8d0c1;
  --accent: #007f75;
  --accent-yellow: #f2d91b;
  --accent-blue: #2157ff;
  --accent-orange: #f05a28;
  --accent-magenta: #d91f8f;

  --body-text: color-mix(in srgb, var(--ink) 90%, transparent);
  --card-bg: color-mix(in srgb, var(--surface) 40%, transparent);
  --link-underline: color-mix(in srgb, var(--accent) 45%, transparent);
  --wm-shadow: rgba(17, 16, 13, 0.18);
  --strong-text: #000;

  --serif: "Newsreader Variable", Georgia, Cambria, "Times New Roman", serif;
  --display: "Fraunces Variable", "Newsreader Variable", Georgia, serif;
  --mono: "Inconsolata Variable", ui-monospace, SFMono-Regular, Menlo, Monaco,
    Consolas, "Liberation Mono", "Courier New", monospace;
}

html.dark {
  --paper: #10100e;
  --surface: #191815;
  --ink: #f0ede5;
  --muted: #a49b8c;
  --hairline: #3b362f;

  --card-bg: color-mix(in srgb, var(--surface) 45%, transparent);
  --link-underline: color-mix(in srgb, var(--accent) 65%, transparent);
  --wm-shadow: rgba(240, 237, 229, 0.16);
  --strong-text: #fff;
}

/* ---------- base ---------- */

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

html {
  overflow-y: auto;
  color-scheme: light;
  scroll-padding-top: 100px;
}

html.dark {
  color-scheme: dark;
}

html,
body {
  height: 100%;
  width: 100%;
}

body {
  margin: 0;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--body-text);
  font-family: var(--serif);
  font-size: 1rem;
  line-height: 1.6;
  font-variant-numeric: oldstyle-nums;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: var(--accent-yellow);
  color: #11100d;
}

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

img {
  max-width: 100%;
}

h1,
h2,
h3,
h4 {
  margin: 0;
}

p,
ul,
ol {
  margin: 0;
}

.hidden {
  display: none;
}

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

/* ---------- split-pane shell ---------- */

.split {
  position: relative;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  width: 100%;
}

.panel {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  min-height: 34vh;
  background: var(--surface);
  border-bottom: 1px solid color-mix(in srgb, var(--ink) 80%, transparent);
}

.panel-img {
  position: absolute;
  inset: 0;
  height: 100%;
  width: 100%;
  object-fit: cover;
  object-position: center;
}

.panel-tint {
  position: absolute;
  inset: 0;
  background: rgba(239, 237, 230, 0.1);
  mix-blend-mode: multiply;
}

html.dark .panel-tint {
  background: rgba(17, 16, 13, 0.35);
  mix-blend-mode: normal;
}

.content-col {
  display: flex;
  flex-direction: column;
  width: 100%;
  background: var(--paper);
}

main.sheet {
  flex: 1;
  min-height: 0;
  padding: 2rem 1rem 4rem;
}

.container {
  width: 100%;
  max-width: 43rem;
}

@media (min-width: 768px) {
  main.sheet {
    padding: 4rem 3rem;
    padding-bottom: 4rem;
  }
}

@media (min-width: 1024px) {
  .split {
    display: grid;
    grid-template-columns: minmax(0, 0.89fr) minmax(0, 1.11fr);
    height: 100vh;
    overflow: hidden;
  }

  .panel {
    height: 100vh;
    min-height: 0;
    border-bottom: 0;
    border-right: 1px solid color-mix(in srgb, var(--ink) 80%, transparent);
  }

  .content-col {
    height: 100vh;
    min-height: 0;
  }

  main.sheet {
    overflow-y: auto;
  }
}

/* ---------- wordmark: home ---------- */

.wordmark-home {
  position: relative;
  z-index: 10;
  margin: auto;
  display: flex;
  width: fit-content;
  padding: 0.5rem 1rem;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  box-shadow: 8px 8px 0 var(--wm-shadow);
  transition: background-color 0.2s, color 0.2s;
}

.wordmark-home:hover,
.wordmark-home:focus-visible {
  background: var(--paper);
  color: var(--ink);
}

.wordmark-home span {
  font-family: var(--display);
  font-size: 1.5rem;
  line-height: 1;
  font-weight: 700;
}

@media (min-width: 768px) {
  .wordmark-home {
    padding: 0.625rem 1.5rem;
  }

  .wordmark-home span {
    font-size: 1.875rem;
  }
}

/* ---------- wordmark: interior cover ---------- */
/* The cover sits on artwork; it keeps light-paper text in both themes. */

.cover {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  overflow: hidden;
  color: #efede6;
  text-decoration: none;
}

.cover:focus-visible {
  outline: 2px solid #efede6;
  outline-offset: -6px;
}

.cover-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(17, 16, 13, 0.2),
    rgba(17, 16, 13, 0.35),
    rgba(17, 16, 13, 0.85)
  );
  transition: opacity 0.3s;
}

.cover:hover .cover-scrim {
  opacity: 0.9;
}

.cover-inner {
  position: relative;
  display: flex;
  min-height: 100%;
  width: 100%;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.25rem;
}

.cover-eyebrow {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  line-height: 1;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.cover-eyebrow .section {
  text-align: right;
}

.cover-block {
  max-width: 34rem;
  display: grid;
  gap: 1rem;
}

.cover-title {
  display: block;
  font-family: var(--display);
  font-weight: 600;
  line-height: 0.86;
  text-wrap: balance;
  overflow-wrap: break-word;
  font-size: clamp(3.05rem, 1.4rem + 4.6vw, 6rem);
}

.cover-title.medium {
  font-size: clamp(2.6rem, 1.2rem + 4vw, 5.2rem);
}

.cover-title.long {
  font-size: clamp(2.15rem, 1rem + 3.3vw, 4.35rem);
}

.cover-desc {
  display: block;
  max-width: 30rem;
  border-top: 1px solid rgba(239, 237, 230, 0.55);
  padding-top: 0.75rem;
  font-size: 0.98rem;
  line-height: 1.5rem;
  color: rgba(239, 237, 230, 0.9);
  text-wrap: pretty;
}

@media (min-width: 640px) {
  .cover-inner {
    padding: 1.75rem;
  }
}

@media (min-width: 768px) {
  .cover-desc {
    font-size: 1.05rem;
  }
}

@media (min-width: 1024px) {
  .cover-inner {
    padding: 2.5rem;
  }
}

/* ---------- tab nav ---------- */

.tabnav {
  display: none;
  width: 100%;
  background: var(--paper);
}

.tabnav-row {
  display: flex;
  align-items: stretch;
}

.tab {
  position: relative;
  z-index: 0;
  margin-left: -1px;
  flex: 1;
  border: 1px solid var(--hairline);
  padding: 0.625rem 1.25rem;
  text-align: center;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--muted);
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

.tab:first-child {
  margin-left: 0;
}

.tab:hover {
  z-index: 10;
  border-color: var(--ink);
  background: var(--surface);
  color: var(--ink);
}

.tab[aria-current="page"] {
  z-index: 10;
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
  font-weight: 700;
}

.icon-cell {
  position: relative;
  z-index: 0;
  margin-left: -1px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--hairline);
  padding: 0 1rem;
  background: none;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

.icon-cell:hover {
  z-index: 10;
  border-color: var(--ink);
  background: var(--surface);
  color: var(--ink);
}

@media (min-width: 768px) {
  .tabnav {
    display: block;
  }
}

/* ---------- mobile menu ---------- */

.menu-toggle {
  position: fixed;
  top: 0.5rem;
  right: 0.5rem;
  z-index: 50;
  display: flex;
  height: 3rem;
  width: 3rem;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
}

.menu-toggle .bars {
  position: relative;
  display: block;
  height: 1rem;
  width: 1.5rem;
}

.menu-toggle .bars span {
  position: absolute;
  left: 0;
  display: block;
  height: 2px;
  width: 100%;
  background: var(--ink);
}

.menu-toggle .bars span:nth-child(1) {
  top: 0;
}

.menu-toggle .bars span:nth-child(2) {
  top: 50%;
  transform: translateY(-50%);
}

.menu-toggle .bars span:nth-child(3) {
  bottom: 0;
}

.mobile-menu {
  position: fixed;
  top: 4rem;
  right: 0.5rem;
  z-index: 40;
  width: min(18rem, calc(100vw - 1rem));
  border: 1px solid var(--ink);
  background: var(--paper);
  padding: 0.5rem;
  pointer-events: none;
  translate: 0 -1rem;
  opacity: 0;
  transition: all 0.3s;
}

.mobile-menu.open {
  pointer-events: auto;
  translate: 0 0;
  opacity: 1;
}

.mobile-menu-list {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.mobile-menu-list a {
  margin-top: -1px;
  width: 100%;
  border: 1px solid var(--hairline);
  background: var(--surface);
  padding: 0.75rem 1rem;
  text-decoration: none;
  color: var(--muted);
}

.mobile-menu-list a:first-child {
  margin-top: 0;
}

.mobile-menu-list a:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.mobile-menu-list a[aria-current="page"] {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
  font-weight: 700;
}

.mobile-menu-icons {
  margin-top: 0.5rem;
  display: flex;
  align-items: stretch;
  gap: 0.5rem;
}

.mobile-menu-icons .icon-cell {
  margin-left: 0;
  padding: 0.75rem 1rem;
  background: var(--surface);
}

.mobile-menu-icons .icon-cell:first-child {
  flex: 1;
}

@media (min-width: 768px) {
  .menu-toggle,
  .mobile-menu {
    display: none;
  }
}

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

footer.site-foot {
  border-top: 1px solid var(--hairline);
  padding: 1.5rem 1rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

@media (min-width: 768px) {
  footer.site-foot {
    padding-left: 3rem;
    padding-right: 3rem;
  }
}

/* ---------- shared bits ---------- */

.eyebrow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 0.75rem;
  row-gap: 0.25rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.eyebrow a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--link-underline);
  transition: color 0.3s, text-decoration-color 0.3s;
}

.eyebrow a:hover {
  text-decoration-color: var(--accent);
}

.page-title {
  font-family: var(--display);
  font-size: 3rem;
  line-height: 0.95;
  font-weight: 600;
  color: var(--ink);
  text-wrap: balance;
}

.lede {
  max-width: 35rem;
  font-size: 1.5rem;
  line-height: 2.25rem;
  text-wrap: pretty;
}

.section-h {
  font-family: var(--display);
  font-size: 1.5rem;
  line-height: 1.25;
  font-weight: 600;
  color: var(--ink);
  text-wrap: balance;
}

.see-all {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--link-underline);
  transition: color 0.3s, text-decoration-color 0.3s;
}

.see-all:hover,
.see-all:focus-visible {
  color: var(--ink);
  text-decoration-color: var(--accent);
}

.row-head {
  align-items: baseline;
}

/* Department slug: the mono eyebrow + accent square that opens a section,
   echoing the cover eyebrows and tab labels. Pair with a heading inside
   .section-head. */
.section-label {
  margin: 0;
  display: inline-flex;
  align-items: center;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.section-label .square {
  margin-right: 0.55rem;
  display: inline-block;
  height: 0.5rem;
  width: 0.5rem;
  background: var(--accent);
}

.section-head {
  display: grid;
  gap: 0.6rem;
  align-content: start;
}

/* The Scotch rule that anchors a page header: a heavy ink rule over a
   hairline, the classic print masthead pairing. */
.groundline {
  height: 0;
  background: none;
  border: 0;
  border-top: 4px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  padding-top: 3px;
  margin: 0;
}

article > .groundline {
  margin-bottom: 2rem;
}

@media (min-width: 768px) {
  .page-title {
    font-size: 3.75rem;
  }
}

/* ---------- entry rows ----------
   Index entries are hairline-divided rows, the same register as the
   divided-list on the Now page: mono date column, display title, muted
   description, arrow that draws on hover. */

.entry-list {
  list-style: none;
  padding: 0;
  margin: 0;
  border-top: 1px solid var(--hairline);
  counter-reset: entry;
}

.entry-list li {
  border-bottom: 1px solid var(--hairline);
}

.entry-list:not(:has(li))::after {
  content: "Nothing here yet.";
  display: block;
  padding: 1rem 0;
  border-bottom: 1px solid var(--hairline);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.entry-row {
  position: relative;
  display: grid;
  grid-template-columns: 2.5rem minmax(0, 1fr);
  align-items: start;
  column-gap: 1rem;
  padding: 1.35rem 2.25rem 1.35rem 0;
  text-decoration: none;
  color: inherit;
  transition: background-color 0.2s ease-in-out;
}

/* Contents-page folio number, counted per list so nothing renumbers by
   hand when a new piece publishes on top. */
.entry-row::before {
  counter-increment: entry;
  content: counter(entry, decimal-leading-zero);
  font-family: var(--display);
  font-size: 1.55rem;
  font-weight: 300;
  line-height: 1;
  font-variant-numeric: lining-nums;
  color: color-mix(in srgb, var(--muted) 75%, transparent);
  transition: color 0.2s;
}

.entry-date {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

.entry-main {
  display: grid;
  gap: 0.4rem;
  min-width: 0;
}

.entry-title {
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--ink);
  transition: color 0.2s;
}

.entry-desc {
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--muted);
}

.entry-row svg {
  position: absolute;
  top: 50%;
  right: 0.25rem;
  height: 1.25rem;
  width: 1.25rem;
  translate: 0 -50%;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  color: var(--muted);
  transition: color 0.2s;
}

.entry-row svg line {
  transform: translateX(3px) scaleX(0);
  transition: transform 0.3s ease-in-out;
}

.entry-row svg polyline {
  transform: translateX(-1px);
  transition: transform 0.3s ease-in-out;
}

.entry-row:hover,
.entry-row:focus-visible {
  background: color-mix(in srgb, var(--surface) 55%, transparent);
}

.entry-row:hover .entry-title,
.entry-row:focus-visible .entry-title {
  color: var(--strong-text);
}

.entry-row:hover::before,
.entry-row:focus-visible::before {
  color: var(--accent);
}

.entry-row:hover svg,
.entry-row:focus-visible svg {
  color: var(--ink);
}

.entry-row:hover svg line,
.entry-row:focus-visible svg line {
  transform: translateX(0) scaleX(1);
}

.entry-row:hover svg polyline,
.entry-row:focus-visible svg polyline {
  transform: translateX(0);
}

@media (min-width: 768px) {
  .entry-row {
    grid-template-columns: 3.25rem minmax(0, 1fr);
    column-gap: 1.25rem;
  }
}

/* ---------- back link ---------- */

.back-link {
  position: relative;
  display: flex;
  width: fit-content;
  flex-wrap: nowrap;
  border: 1px solid var(--hairline);
  background: var(--card-bg);
  padding: 0.375rem 0.75rem 0.375rem 1.75rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  color: inherit;
  transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out,
    border-color 0.2s ease-in-out;
}

.back-link svg {
  position: absolute;
  top: 50%;
  left: 0.5rem;
  height: 1rem;
  width: 1rem;
  translate: 0 -50%;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.back-link svg line {
  transform: translateX(2px) scaleX(0);
  transition: transform 0.3s ease-in-out;
}

.back-link svg polyline {
  transform: translateX(1px);
  transition: transform 0.3s ease-in-out;
}

.back-link:hover,
.back-link:focus-visible {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
}

.back-link:hover svg line,
.back-link:focus-visible svg line {
  transform: translateX(0) scaleX(1);
}

.back-link:hover svg polyline,
.back-link:focus-visible svg polyline {
  transform: translateX(0);
}

/* ---------- now page ---------- */

.now {
  display: grid;
  gap: 4rem;
  font-size: 1.08rem;
  line-height: 2rem;
}

.now header,
.now section {
  display: grid;
  gap: 1.25rem;
  align-content: start;
}

.now .title-block {
  display: grid;
  gap: 1rem;
}

.now .page-title {
  max-width: 11ch;
}

.divided-list {
  list-style: none;
  padding: 0;
}

.divided-list li {
  display: grid;
  gap: 0.75rem;
  padding: 1.25rem 0;
  border-top: 1px solid var(--hairline);
}

.divided-list li:first-child {
  border-top: 0;
}

.divided-list h3 {
  font-family: var(--display);
  font-size: 1.25rem;
  line-height: 1.25;
  font-weight: 600;
  color: var(--ink);
}

.divided-list p {
  line-height: 1.75rem;
  color: color-mix(in srgb, var(--ink) 80%, transparent);
}

.edges {
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  padding: 1.75rem 0;
  display: grid;
  gap: 1.5rem;
}

.edges .edge-body {
  display: grid;
  gap: 1.25rem;
}

.square-list {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}

.square-list li {
  display: flex;
  gap: 0.75rem;
}

.square-list .square {
  margin-top: 0.72em;
  height: 0.5rem;
  width: 0.5rem;
  flex-shrink: 0;
  background: var(--accent);
}

.row-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  row-gap: 0.5rem;
}

.channels {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.channels li {
  display: flex;
  column-gap: 0.5rem;
  white-space: nowrap;
}

.channels a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: color-mix(in srgb, var(--ink) 30%, transparent);
  transition: color 0.3s, text-decoration-color 0.3s;
}

.channels a:hover,
.channels a:focus-visible {
  color: var(--ink);
  text-decoration-color: color-mix(in srgb, var(--ink) 50%, transparent);
}

@media (min-width: 768px) {
  .divided-list li {
    grid-template-columns: 0.72fr 1.28fr;
    gap: 2rem;
  }

  .edges {
    grid-template-columns: 0.82fr 1.18fr;
  }
}

/* ---------- index pages (writing / projects) ---------- */

.index-page {
  display: grid;
  gap: 2rem;
}

.index-page header {
  display: grid;
  gap: 1rem;
}

.index-page .index-lede {
  max-width: 34rem;
  font-size: 1.08rem;
  line-height: 2rem;
  text-wrap: pretty;
}

/* ---------- piece pages (writing / projects) ---------- */

.piece-head {
  margin: 2.25rem 0 1.5rem;
  display: grid;
  gap: 0.25rem;
}

.piece-meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.piece-title {
  font-family: var(--display);
  font-size: 2.25rem;
  line-height: 1.25;
  font-weight: 600;
  color: var(--ink);
}

.piece-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding-top: 0.5rem;
  font-size: 0.9375rem;
}

.piece-links a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: color-mix(in srgb, var(--ink) 30%, transparent);
}

.piece-links a:hover {
  color: var(--ink);
}

/* ---------- table of contents ----------
   A hairline-bounded contents strip in the same register as the entry
   rows: mono label with the accent square, numbered entries, mono +/-
   collapse indicator. */

.toc {
  margin-bottom: 2rem;
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
}

.toc summary {
  display: flex;
  align-items: center;
  padding: 0.8rem 0;
  cursor: pointer;
  list-style: none;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.2s;
}

.toc summary::-webkit-details-marker {
  display: none;
}

.toc summary::before {
  content: "";
  margin-right: 0.55rem;
  height: 0.5rem;
  width: 0.5rem;
  background: var(--accent);
}

.toc summary::after {
  content: "+";
  margin-left: auto;
  font-size: 0.9rem;
}

.toc[open] summary::after {
  content: "\2212";
}

.toc summary:hover {
  color: var(--ink);
}

.toc ul {
  list-style: none;
  margin: 0;
  padding: 0.25rem 0 1.1rem;
  display: grid;
  gap: 0.5rem;
}

.toc nav > ul {
  counter-reset: toc;
}

.toc nav > ul > li {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 0.9rem;
  align-items: baseline;
}

.toc nav > ul > li::before {
  counter-increment: toc;
  content: counter(toc, decimal-leading-zero);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.toc ul ul {
  grid-column: 2;
  padding: 0.15rem 0 0;
  gap: 0.35rem;
}

.toc a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: color-mix(in srgb, var(--ink) 30%, transparent);
  transition: color 0.3s, text-decoration-color 0.3s;
}

.toc a:hover {
  color: var(--ink);
  text-decoration-color: var(--accent);
}

/* ---------- prev / next ---------- */

.post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.375rem;
}

.post-nav a {
  position: relative;
  display: flex;
  align-items: center;
  border: 1px solid var(--hairline);
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  text-decoration: none;
  color: inherit;
  transition: background-color 0.3s ease-in-out, color 0.3s ease-in-out;
}

.post-nav a.prev {
  padding-left: 2.5rem;
}

.post-nav a.next {
  flex-direction: row-reverse;
  padding-right: 2.5rem;
}

.post-nav svg {
  position: absolute;
  top: 50%;
  height: 1.25rem;
  width: 1.25rem;
  translate: 0 -50%;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.post-nav a.prev svg {
  left: 0.5rem;
}

.post-nav a.next svg {
  right: 0.5rem;
}

.post-nav a:hover,
.post-nav a:focus-visible {
  background: color-mix(in srgb, var(--ink) 5%, transparent);
  color: var(--ink);
}

@media (min-width: 640px) {
  .post-nav {
    gap: 0.75rem;
  }
}

/* ---------- prose ---------- */

.prose {
  display: block;
  max-width: 100%;
}

.prose > * + * {
  margin-top: 1.25em;
}

.prose p,
.prose li {
  line-height: 1.78;
}

.prose h2,
.prose h3 {
  font-family: var(--display);
  font-weight: 600;
  color: var(--strong-text);
  letter-spacing: 0;
  line-height: 1.3;
}

.prose h2 {
  font-size: 1.5em;
  margin-top: 2em;
}

.prose h3 {
  font-size: 1.25em;
  margin-top: 1.6em;
}

.prose a {
  font-family: var(--serif);
  color: currentColor;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--link-underline);
  transition: color 0.3s ease-in-out, text-decoration-color 0.3s ease-in-out;
}

.prose a:hover {
  color: var(--strong-text);
  text-decoration-color: var(--accent);
}

.prose ul,
.prose ol {
  padding-left: 1.4rem;
}

.prose li + li {
  margin-top: 0.4rem;
}

.prose blockquote {
  margin: 1.6em 0;
  border-left: 2px solid var(--ink);
  padding-left: 1.2rem;
  color: var(--muted);
  font-style: italic;
}

.prose code {
  font-family: var(--mono);
  font-size: 0.875em;
  background: color-mix(in srgb, var(--ink) 6%, transparent);
  padding: 0.1em 0.35em;
}

.prose pre {
  border: 1px solid var(--hairline);
  background: var(--surface);
  padding: 1.25rem;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 0.875rem;
  line-height: 1.7;
}

.prose pre code {
  background: none;
  padding: 0;
  font-size: inherit;
}

.prose img {
  margin: 1.6em auto;
  display: block;
}

.prose hr {
  border: 0;
  border-top: 1px solid var(--hairline);
  margin: 2.4em 0;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

.prose th {
  font-family: var(--display);
  font-weight: 600;
  color: var(--ink);
  text-align: left;
}

.prose th,
.prose td {
  border-bottom: 1px solid var(--hairline);
  padding: 0.5rem 0.75rem 0.5rem 0;
}

/* ---------- copy-code button ---------- */

.copy-code {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  display: grid;
  place-content: center;
  height: 2.25rem;
  width: 2.25rem;
  border: 1px solid var(--hairline);
  background: var(--paper);
  font-family: var(--mono);
  text-align: center;
  cursor: pointer;
  transition: background-color 0.3s ease-in-out, color 0.3s ease-in-out,
    transform 0.3s ease-in-out;
}

.copy-code:hover {
  background: var(--ink);
  color: var(--paper);
}

.copy-code:active {
  transform: scale(0.9);
}

/* ---------- 404 ---------- */

.notfound {
  margin-top: 4rem;
  display: grid;
  place-items: center;
  gap: 0.75rem;
}

.notfound h1 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--ink);
}

/* ---------- search modal (Pagefind default UI, lazily loaded) ---------- */

#backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  overflow-y: auto;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(2px);
  padding: 1.5rem;
}

#backdrop.hidden {
  display: none;
}

#pagefind-container {
  margin: 0 auto;
  display: flex;
  height: fit-content;
  max-height: 80%;
  width: 100%;
  max-width: 40rem;
  flex-direction: column;
  overflow: auto;
  border: 1px solid var(--hairline);
  background: var(--paper);
  padding: 0.75rem 1rem;
}

.search-hint {
  margin-right: 0.5rem;
  padding: 1rem 0 0.25rem;
  text-align: right;
  font-size: 0.75rem;
  color: var(--muted);
}

.search-hint kbd {
  font-family: var(--mono);
  border: 1px solid var(--hairline);
  padding: 0 0.3em;
}

.search-unavailable {
  padding: 1rem 0;
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--muted);
}

#pagefind-container {
  --pagefind-ui-scale: 0.9;
  --pagefind-ui-primary: var(--accent);
  --pagefind-ui-text: var(--ink);
  --pagefind-ui-background: var(--paper);
  --pagefind-ui-border: var(--hairline);
  --pagefind-ui-tag: var(--surface);
  --pagefind-ui-border-width: 1px;
  --pagefind-ui-border-radius: 0;
  --pagefind-ui-image-border-radius: 0;
  --pagefind-ui-font: "Inconsolata Variable", monospace;
}
