/* The site's own look, after the components' (internal/ui/components/css):
   the parts only its pages use, and the art of the home page. */

@layer moin-components {
  /* A receipt: paper with torn edges at the top and the bottom, lying on
     the page. Its parts under each other, a hairline between. */
  .moin-receipt {
    width: 100%;
    max-width: 30rem;
    margin-inline: auto;
    filter: drop-shadow(0 1px 1px light-dark(rgb(0 0 0 / 6%), transparent))
      drop-shadow(0 20px 30px light-dark(rgb(0 0 0 / 8%), transparent))
      drop-shadow(0 0 0.5px light-dark(transparent, rgb(255 255 255 / 30%)));
  }
  .moin-receipt-paper {
    --tooth: 0.75rem;
    display: flex;
    flex-direction: column;
    padding: 2.25rem var(--space-5) 2.5rem;
    background: var(--card);
    color: var(--card-foreground);
    -webkit-mask:
      conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / var(--tooth) 51% repeat-x,
      conic-gradient(from 135deg at top, #0000, #000 1deg 89deg, #0000 90deg) top / var(--tooth) 51% repeat-x;
    mask:
      conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / var(--tooth) 51% repeat-x,
      conic-gradient(from 135deg at top, #0000, #000 1deg 89deg, #0000 90deg) top / var(--tooth) 51% repeat-x;
  }
  @media (min-width: 30rem) {
    .moin-receipt-paper { padding: 2.5rem var(--space-8) 2.75rem; }
  }
  .moin-receipt-paper > * { padding-block: var(--space-5); }
  .moin-receipt-paper > :first-child { padding-block-start: 0; }
  .moin-receipt-paper > :last-child { padding-block-end: 0; }
  .moin-receipt-paper > * + * { border-top: 1px solid var(--border); }
  /* The sum: the one big number. */
  .moin-receipt-total {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: var(--weight-title);
    line-height: 1;
    letter-spacing: -0.04em;
  }
  .moin-receipt-total > small {
    color: var(--muted-foreground);
    font-size: 1rem;
    font-weight: 400;
    letter-spacing: 0;
  }

  /* A line to tick off: a box, the name and a note, the value at the end.
     Ticked, the name and the value are struck through. */
  .moin-tick {
    position: relative;
    display: grid;
    grid-template-columns: 1.125rem minmax(0, 1fr) auto;
    align-items: center;
    column-gap: var(--space-3);
    min-height: var(--press);
    margin-inline: calc(-1 * var(--space-2));
    padding-inline: var(--space-2);
    border-radius: var(--radius-md);
    cursor: pointer;
  }
  .moin-tick:hover { background: var(--hover); }
  .moin-tick:active { background: var(--active); }
  .moin-tick:has(:focus-visible) { box-shadow: var(--focus); }
  .moin-tick > input { position: absolute; opacity: 0; pointer-events: none; }
  .moin-tick-box {
    display: grid;
    place-items: center;
    width: 1.125rem;
    height: 1.125rem;
    border-radius: var(--radius-sm);
    box-shadow: inset 0 0 0 1.5px color-mix(in oklab, var(--foreground) 28%, transparent);
  }
  .moin-tick-box > .moin-icon { width: 0.875rem; height: 0.875rem; color: var(--card); opacity: 0; }
  .moin-tick:has(:checked) .moin-tick-box { background: var(--foreground); box-shadow: none; }
  .moin-tick:has(:checked) .moin-tick-box > .moin-icon { opacity: 1; }
  .moin-tick-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .moin-tick-strike { position: relative; transition: color 200ms var(--ease); }
  .moin-tick-strike::after {
    content: "";
    position: absolute;
    top: 55%;
    left: -2px;
    right: -2px;
    height: 1px;
    background: var(--foreground);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 240ms var(--ease);
  }
  .moin-tick:has(:checked) .moin-tick-strike { color: var(--muted-foreground); }
  .moin-tick:has(:checked) .moin-tick-strike::after { transform: scaleX(1); }
  @media (prefers-reduced-motion: reduce) {
    .moin-tick-strike,
    .moin-tick-strike::after { transition: none; }
  }
}


/* The wall of containers at the bottom of the home page's last card, out to
   its edges and round with its corners. light-dark() takes colors only, so
   every shade is a whole color with its alpha. */
.moin-harbor-in-card {
  height: clamp(9rem, 24vw, 18rem);
  margin-bottom: calc(-1 * var(--pad));
  overflow: hidden;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}
/* Gulls over the wall, on its right, in the air between the words and it. */
.moin-gulls {
  align-self: flex-end;
  width: clamp(5rem, 12vw, 8rem);
  margin: var(--space-4) 8% 0 0;
  fill: none;
  stroke: var(--muted-foreground);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.7;
}
.moin-harbor {
  display: block;
  width: 100%;
  height: 100%;
  font-family: var(--font-sans);
  user-select: none;
}
.moin-harbor-shade { stop-color: light-dark(rgb(0 0 0 / 0.12), rgb(0 0 0 / 0.6)); }
.moin-harbor-card { fill: var(--card); }
.moin-harbor-muted { fill: var(--muted); }
.moin-harbor-ink { fill: var(--foreground); }
.moin-harbor-tint-5 { fill: color-mix(in oklab, var(--foreground) 5%, transparent); }
.moin-harbor-tint-9 { fill: color-mix(in oklab, var(--foreground) 9%, transparent); }
.moin-harbor-side { fill: light-dark(rgb(0 0 0 / 0.1), rgb(0 0 0 / 0.5)); }
.moin-harbor-foot { fill: light-dark(rgb(0 0 0 / 0.18), rgb(0 0 0 / 0.65)); }
.moin-harbor-on-ink { fill: var(--background); }
.moin-harbor-on-steel { fill: var(--foreground); }
.moin-harbor-owner { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; opacity: 0.55; }
.moin-harbor-type { font-size: 9px; font-weight: 700; letter-spacing: 0.08em; opacity: 0.45; }
.moin-harbor-app { font-size: 20px; font-weight: 800; letter-spacing: -0.01em; opacity: 0.60; }
.moin-harbor-app[data-ink] { opacity: 0.85; }
.moin-harbor-rib { fill: color-mix(in oklab, var(--foreground) 7.5%, transparent); }
.moin-harbor-rib-ink { fill: color-mix(in oklab, var(--background) 14%, transparent); }
.moin-harbor-rail { fill: color-mix(in oklab, var(--foreground) 10%, transparent); }
.moin-harbor-rail-ink { fill: color-mix(in oklab, var(--background) 12%, transparent); }

/* The landing page: the start of its hero, the watcher's chat and the two
   roads. */
.moin-hero-start { width: min(100%, 34rem); margin-inline: auto; }
.moin-pre { white-space: pre-line; }
.moin-chat {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-6);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--card);
  color: var(--card-foreground);
}
/* The chat's avatar, and its messages at the bottom, the newest last, as
   Telegram shows them. */
.moin-chat-avatar { width: 2.5rem; height: 2.5rem; border-radius: 50%; }
.moin-chat-messages { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; gap: var(--space-2); }
.moin-chat-message {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  max-width: 28rem;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md) var(--radius-md) var(--radius-md) var(--radius-sm);
  background: var(--muted);
  font-size: 0.875rem;
  overflow-wrap: anywhere;
}
.moin-chat-message time { float: right; margin: 0.25rem 0 0 var(--space-3); font-size: 0.75rem; }
.moin-roads { display: block; width: 100%; height: auto; color: var(--foreground); }
.moin-roads-muted { fill: var(--muted-foreground); }
.moin-roads-ink { fill: var(--foreground); }
.moin-roads-ink-text { fill: var(--background); }
.moin-roads[data-tall] { max-width: 22rem; margin-inline: auto; }
@media (min-width: 40rem) { .moin-roads[data-tall] { display: none; } }
@media (max-width: 39.99rem) { .moin-roads:not([data-tall]) { display: none; } }



/* A post from X, as X shows it: who wrote it, the words, what people did
   with it. Every card has the same size, so the row is calm: the words are
   cut to fit. The link to the post stretches over the whole card; the
   links in the words sit on top. */
.moin-tweet {
  position: relative;
  box-sizing: border-box;
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  width: 17.5rem;
  height: 12.5rem;
  overflow: hidden;
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  background: var(--card);
  color: var(--card-foreground);
  transition: background-color var(--fast) var(--ease);
}
@media (min-width: 40rem) { .moin-tweet { width: 21.25rem; } }
.moin-tweet:hover { background-image: linear-gradient(var(--hover), var(--hover)); }
.moin-tweet:has(.moin-tweet-view:focus-visible) { box-shadow: var(--focus); }
.moin-tweet-head {
  flex: none;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-width: 0;
}
.moin-tweet-head > .moin-icon { align-self: flex-start; margin-inline-start: auto; color: var(--muted-foreground); }
.moin-tweet-face {
  flex: none;
  width: 2rem;
  height: 2rem;
  border-radius: var(--radius-full);
  background: var(--muted);
  object-fit: cover;
}
.moin-tweet-who { display: flex; flex-direction: column; min-width: 0; }
.moin-tweet-name {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  min-width: 0;
  font-size: 0.875rem;
  line-height: 1.125rem;
  font-weight: 600;
}
.moin-tweet-check { flex: none; width: 0.875rem; height: 0.875rem; }
.moin-tweet-meta { font-size: 0.8125rem; line-height: 1rem; color: var(--muted-foreground); }
/* Five lines at most, then an ellipsis. */
.moin-tweet-text {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 5;
  overflow: hidden;
  min-height: 0;
  font-size: 0.875rem;
  line-height: 1.25rem;
  white-space: pre-line;
  overflow-wrap: anywhere;
}
/* Links in the words: quiet, the underline comes with the pointer. */
.moin-tweet-inner {
  position: relative;
  z-index: 1;
  color: var(--muted-foreground);
  text-decoration: none;
}
.moin-tweet-inner:hover { color: var(--foreground); text-decoration: underline; text-underline-offset: 2px; }
.moin-tweet-foot {
  flex: none;
  display: flex;
  gap: var(--space-4);
  margin-block-start: auto;
  font-size: 0.75rem;
  line-height: 1rem;
  color: var(--muted-foreground);
  font-variant-numeric: tabular-nums;
}
.moin-tweet-view:focus-visible { outline: none; }
.moin-tweet-view::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
}

/* The marquee: a row of posts that site.js moves slowly to the left, and a
   hand can drag or swipe. It holds its posts twice, so the loop has no
   seam. The edges fade out. Reduced motion: it only scrolls, and the copy
   goes. */
.moin-marquee {
  overflow-x: auto;
  scrollbar-width: none;
  cursor: grab;
  user-select: none;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
}
.moin-marquee::-webkit-scrollbar { display: none; }
.moin-marquee[data-dragging] { cursor: grabbing; }
.moin-marquee img { -webkit-user-drag: none; }
.moin-marquee-row { display: flex; width: max-content; }
.moin-marquee-track {
  display: flex;
  gap: var(--space-4);
  padding-inline-end: var(--space-4);
}
@media (max-width: 39.99rem) {
  .moin-marquee {
    -webkit-mask-image: linear-gradient(to right, transparent, #000 4%, #000 96%, transparent);
    mask-image: linear-gradient(to right, transparent, #000 4%, #000 96%, transparent);
  }
}
@media (prefers-reduced-motion: reduce) {
  .moin-marquee { padding-inline: var(--gutter, 1rem); }
  .moin-marquee-track[aria-hidden] { display: none; }
}

/* "Open source." in the hero: the one word that stands out, a quiet link
   to the code. */
.moin-hero-open { font-weight: 600; }

@layer moin-components {
  /* Compare: the choices side by side. One grid; each column spans every
     row on the rows' own lines, so the rows line up and a column is one
     surface from head to foot. */
  .moin-compare {
    display: grid;
    grid-template-columns: minmax(12rem, 1.5fr) repeat(var(--cols), minmax(0, 1fr));
    column-gap: var(--space-2);
    padding-block-start: var(--space-4);
    font-size: 0.875rem;
    line-height: 1.25rem;
  }
  .moin-compare[data-cols="2"] { --cols: 2; }
  .moin-compare[data-cols="3"] { --cols: 3; }
  .moin-compare[data-cols="4"] { --cols: 4; }
  .moin-compare[data-cols="5"] { --cols: 5; }
  .moin-compare[data-cols="6"] { --cols: 6; }
  .moin-compare[data-cols="7"] { --cols: 7; }
  .moin-compare-labels,
  .moin-compare-col {
    display: grid;
    grid-row: 1 / span var(--compare-rows);
    grid-template-rows: subgrid;
    min-width: 0;
  }
  .moin-compare-cell,
  .moin-compare-head,
  .moin-compare-foot {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-1);
    min-width: 0;
    padding: var(--space-3) var(--space-4);
    text-align: center;
  }
  .moin-compare-cell { min-height: 4.5rem; border-top: 1px solid var(--border); }
  .moin-compare-labels .moin-compare-cell { align-items: flex-start; font-weight: 500; text-align: start; padding-inline-start: 0; }
  .moin-compare-head { gap: 2px; padding-block: var(--space-6) var(--space-4); }
  .moin-compare-name.moin-link { text-decoration: none; }
  .moin-compare-name.moin-link:hover { text-decoration: underline; }
  .moin-compare-name { font-size: 1.125rem; line-height: 1.5rem; font-weight: 500; }
  .moin-compare-head .moin-small { font-size: 0.875rem; line-height: 1.25rem; color: var(--foreground); }
  .moin-compare-foot { justify-content: flex-start; padding-block: var(--space-5) var(--space-2); }
  .moin-compare-foot .moin-button { width: 100%; }
  .moin-compare-text { display: flex; flex-direction: column; align-items: center; gap: 2px; }
  .moin-compare-what { display: none; }
  .moin-compare-text:not(:has(.moin-small)) { display: none; }
  /* Only a plain yes has a color: the other answers are quiet. */
  .moin-compare .moin-mark:not([data-kind="yes"]) {
    border-color: var(--border);
    color: var(--muted-foreground);
  }
  /* The featured column: raised past the top and bottom of the card, one
     surface with a quiet ink edge and a soft shadow. */
  .moin-compare-col[data-featured] {
    position: relative;
    isolation: isolate;
    border-radius: var(--radius-lg);
  }
  .moin-compare-col[data-featured]::before {
    content: "";
    position: absolute;
    inset: 0 0 calc(-1 * var(--space-3));
    z-index: -1;
    border-radius: inherit;
    background: var(--card);
    box-shadow: inset 0 0 0 1px light-dark(rgb(0 0 0 / 14%), rgb(255 255 255 / 28%));
  }
  .moin-compare-col[data-featured] .moin-compare-name { font-weight: 600; }
  .moin-compare-badge {
    position: absolute;
    inset-block-start: 0;
    inset-inline-start: 50%;
    translate: -50% -50%;
    padding: 2px var(--space-3);
    border-radius: var(--radius-full);
    background: var(--primary);
    color: var(--primary-foreground);
    font-size: 0.6875rem;
    line-height: 1rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
  }
  /* On a phone: one card for each choice, the featured one first. */
  @media (max-width: 47.99rem) {
    .moin-compare { display: flex; flex-direction: column; gap: var(--space-6); padding: 0; background: none; }
    .moin-compare[data-reverse] { flex-direction: column-reverse; }
    .moin-compare-labels { display: none; }
    .moin-compare-col {
      display: flex;
      flex-direction: column;
      padding: var(--pad);
      border-radius: var(--radius-lg);
      background: var(--card);
    }
    .moin-compare:not([data-reverse]) > .moin-compare-col[data-featured] { order: -1; }
    .moin-compare[data-cols="5"] > .moin-compare-col,
    .moin-compare[data-cols="6"] > .moin-compare-col,
    .moin-compare[data-cols="7"] > .moin-compare-col { padding-block: var(--space-4); }
    .moin-compare-col[data-featured]::before { inset: 0; }
    .moin-compare > .moin-compare-col[data-featured]:has(.moin-compare-badge) { margin-block-start: var(--space-4); padding-block-start: calc(var(--pad) + var(--space-2)); }
    .moin-compare-head { align-items: flex-start; padding: 0 0 var(--space-3); text-align: start; }
    .moin-compare-cell {
      flex-direction: row;
      align-items: flex-start;
      justify-content: flex-start;
      min-height: 0;
      gap: var(--space-3);
      padding: var(--space-2) 0;
      border-top: 0;
      text-align: start;
    }
    .moin-compare-text { align-items: flex-start; }
    .moin-compare-text:not(:has(.moin-small)) { display: flex; }
    .moin-compare-what { display: inline; }
    .moin-compare-foot { padding: var(--space-4) 0 0; border-top: 0; }
  }
  /* With words: each answer reads from the start, its mark, its words and
     the line under them, the label at the top of its row. */
  .moin-compare-answer { color: var(--foreground); font-weight: 500; }
  .moin-compare[data-text] .moin-compare-text { display: flex; align-items: flex-start; }
  .moin-compare[data-text] .moin-mark { margin-block-start: 1px; }
  @media (min-width: 48rem) {
    .moin-compare[data-text] { grid-template-columns: minmax(10rem, 1fr) repeat(var(--cols), minmax(0, 1.25fr)); }
    .moin-compare[data-text] :is(.moin-compare-cell, .moin-compare-head) {
      align-items: flex-start;
      justify-content: flex-start;
      text-align: start;
    }
    .moin-compare[data-text] .moin-compare-col .moin-compare-cell { flex-direction: row; gap: var(--space-3); }
    .moin-compare[data-text] .moin-compare-cell { min-height: 0; padding-block: var(--space-4); }
    /* Room under the table for the featured column, raised past it. */
    .moin-compare { padding-block-end: var(--space-3); }
    .moin-compare-head + .moin-compare-group { padding-block-start: 0; }
  }
  @media (max-width: 47.99rem) {
    .moin-compare[data-text] .moin-compare-what { color: var(--muted-foreground); }
  }
  /* A group: its name over its first row, in the labels; the columns run
     through it. */
  .moin-compare-group {
    display: flex;
    align-items: flex-end;
    padding: var(--space-8) 0 var(--space-3);
    font-family: var(--font-heading);
    font-size: 1.125rem;
    line-height: 1.5rem;
    font-weight: 600;
  }
  .moin-compare-col .moin-compare-group > span { visibility: hidden; }
  @media (max-width: 47.99rem) {
    .moin-compare-group { padding: var(--space-4) 0 var(--space-1); font-size: 1rem; }
    .moin-compare-col .moin-compare-group > span { visibility: visible; }
    .moin-compare-head + .moin-compare-group { padding-block-start: 0; }
  }
}

@layer moin-components {
  /* Features: a grid of short items, each a line icon, a bold title and one
     muted line. No cards. Three across, two on a tablet, one on a phone. */
  .moin-features {
    display: grid;
    gap: var(--space-6) var(--space-8);
    padding-block: var(--space-4);
  }
  .moin-feature {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
  }
  .moin-feature > .moin-icon { width: 1.5rem; height: 1.5rem; margin-block-start: 1px; }
  .moin-feature-title { font-weight: 600; }
  .moin-feature-note { color: var(--muted-foreground); }
  @media (min-width: 40rem) { .moin-features { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
  @media (min-width: 64rem) {
    .moin-features { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 56rem; margin-inline: auto; }
    .moin-feature { flex-direction: column; align-items: center; gap: var(--space-2); text-align: center; }
    .moin-feature > .moin-stack { align-items: center; }
  }
}

@layer moin-components {
  /* A drawing on its ground: light, dark, or the page's own. A ground with a
     scheme keeps it whatever the page's theme, so the kit inside it too. */
  .moin-ground {
    display: flex;
    flex-direction: column;
    min-width: 0;
    border-radius: var(--radius-lg);
    background: var(--card);
    color: var(--foreground);
    box-shadow: inset 0 0 0 1px var(--border);
    overflow: hidden;
  }
  [data-scheme="light"] { color-scheme: light; }
  [data-scheme="dark"] { color-scheme: dark; }
  .moin-ground[data-scheme="dark"] { background: var(--background); }
  .moin-ground-art {
    display: grid;
    flex: 1;
    place-items: center;
    min-height: 13rem;
    padding: var(--space-8) var(--pad);
  }
  .moin-ground-art > img { height: 4.5rem; max-width: 80%; object-fit: contain; }
  .moin-ground-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-2);
    min-height: calc(var(--press) + 2 * var(--space-3));
    padding: var(--space-3) var(--space-3) var(--space-3) var(--space-5);
    border-top: 1px solid var(--border);
    font-size: 0.875rem;
    line-height: 1.25rem;
  }
  @media (max-width: 39.99rem) {
    .moin-ground-art { min-height: 10rem; }
    .moin-ground-art > img { height: 3.5rem; }
  }

  /* A color, light and dark side by side, each drawn from its token. */
  .moin-swatch {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    min-width: 0;
    padding: var(--space-2) var(--space-2) var(--space-4);
    border-radius: var(--radius-lg);
    background: var(--card);
  }
  .moin-swatch-chips,
  .moin-swatch-values {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  /* The outline is drawn over both halves, so a white half shows on a white
     card. */
  .moin-swatch-chips {
    height: 6rem;
    overflow: hidden;
    border-radius: calc(var(--radius-lg) - var(--space-2));
    outline: 1px solid var(--border);
    outline-offset: -1px;
  }
  .moin-swatch-chips > span { background: var(--swatch); }
  .moin-swatch-text {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
    padding-inline: var(--space-3);
    font-size: 0.875rem;
    line-height: 1.25rem;
  }
  .moin-swatch-values { font-size: 0.75rem; line-height: 1rem; }
  @media (max-width: 39.99rem) {
    .moin-swatch-chips { height: 4rem; }
    .moin-swatch-text { padding-inline: var(--space-2); }
  }

  /* One size of type: its name and setting, then the size, live. */
  .moin-specimen {
    display: grid;
    gap: var(--space-3);
    padding-block: var(--space-6);
    border-top: 1px solid var(--border);
  }
  .moin-specimen:first-child { border-top: 0; padding-block-start: 0; }
  .moin-specimen:last-child { padding-block-end: 0; }
  .moin-specimen-sample { min-width: 0; overflow-wrap: break-word; }
  @media (min-width: 48rem) {
    .moin-specimen { grid-template-columns: 12rem minmax(0, 1fr); align-items: center; gap: var(--space-6); }
  }
}

/* The brand page: the mark with its sun coming up, the glyphs of the two
   fonts, and the wordmark set in a font it must never be set in. */
.moin-brand-story { align-items: center; gap: var(--space-8); }
.moin-brand-sunrise { display: grid; place-items: center; }
.moin-sunrise { width: min(100%, 15rem); height: auto; }
@media (prefers-reduced-motion: no-preference) {
  .moin-sunrise-sun { animation: moin-sunrise 2.4s var(--ease) 0.3s both; }
}
@keyframes moin-sunrise {
  from { transform: translateY(8px); }
}
.moin-brand-glyphs { font-weight: 600; letter-spacing: -0.04em; }
.moin-brand-wrong-font { font-family: Georgia, "Times New Roman", serif; font-style: italic; font-size: 3rem; line-height: 1; }

/* Kill your SaaS subscriptions: each bill and the command that replaces it,
   and a dock that keeps the sum in view while you tick. */
.moin-swaps { margin-block: calc(-1 * var(--pad)) calc(var(--pad) - var(--space-4)); }
.moin-swaps:not(:has(> :not([hidden]))) { display: none; }
.moin-swap {
  display: grid;
  gap: var(--space-4);
  padding-block: var(--pad);
  border-bottom: 1px solid var(--border);
}
.moin-swap > .moin-command { width: 100%; }
@media (min-width: 52rem) {
  .moin-swap { grid-template-columns: minmax(0, 1fr) minmax(0, 26rem); align-items: center; column-gap: var(--space-8); }
}
.moin-kill-dock {
  position: fixed;
  z-index: 30;
  right: var(--gutter, 1rem);
  bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px));
  left: var(--gutter, 1rem);
  display: flex;
  max-width: 26rem;
  margin-inline: auto;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-1) var(--space-1) var(--space-1) var(--space-5);
  border-radius: var(--radius-md);
  background: var(--popover);
  color: var(--popover-foreground);
  box-shadow: 0 0 0 1px var(--border), 0 12px 32px -12px rgb(0 0 0 / 30%);
  transform: translateY(150%);
  visibility: hidden;
  transition: transform 260ms var(--ease), visibility 0s 260ms;
}
.moin-kill-dock[data-show] { transform: none; visibility: visible; transition: transform 260ms var(--ease); }
@media (prefers-reduced-motion: reduce) {
  .moin-kill-dock,
  .moin-kill-dock[data-show] { transition: none; }
}

/* Docs: sticky sidebar on the left (a smooth slide-over sheet on phones),
   readable article in the middle, and a sticky "On this page" TOC on the
   right on wide screens. */
.moin-docs-page {
  max-width: 82rem;
  padding-block: 1.5rem 6rem;
}
@media (min-width: 64rem) {
  .moin-docs-page { padding-block: 3rem 8rem; }
}

/* Mobile & tablet bar: Menu pill on the left (< 64rem), "On this page"
   pill on the right (< 78rem). Both open crisp slide-over sheets. */
.moin-docs-bar {
  position: sticky;
  top: 4.5rem;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  margin-block-end: var(--space-6);
  padding-block: var(--space-2);
  background: color-mix(in oklab, var(--background) 88%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
@media (min-width: 64rem) {
  .moin-docs-bar [data-docs-open="docs-nav"] { display: none; }
  .moin-docs-bar { justify-content: flex-end; }
}
@media (min-width: 78rem) {
  .moin-docs-bar { display: none; }
}

/* Mobile & tablet slide-over backdrop */
.moin-docs-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: var(--dim);
  opacity: 0;
  transition: opacity 200ms var(--ease);
}
.moin-docs-backdrop[data-open] { opacity: 1; }
@media (min-width: 78rem) {
  .moin-docs-backdrop { display: none !important; }
}

/* Three-column grid on desktop: sidebar | readable article | TOC */
.moin-docs-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}
@media (min-width: 64rem) {
  .moin-docs-shell {
    grid-template-columns: 14.5rem minmax(0, 1fr);
    column-gap: 3rem;
  }
}
@media (min-width: 78rem) {
  .moin-docs-shell {
    grid-template-columns: 14.5rem minmax(0, 44rem) 13.5rem;
    justify-content: space-between;
    column-gap: 3rem;
  }
}

/* Shared sheet header for both slide-over drawers on mobile/tablet */
.moin-docs-sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-block-end: var(--space-4);
  padding-inline: var(--space-2);
}
.moin-docs-sheet-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--foreground);
  text-decoration: none;
}

/* Left sidebar: slide-over sheet from left on mobile, quiet sticky column on desktop. */
.moin-docs-nav {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 50;
  width: min(20rem, 86vw);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: var(--space-4) var(--space-4) calc(var(--space-8) + env(safe-area-inset-bottom, 0px));
  background: var(--popover);
  color: var(--popover-foreground);
  box-shadow: var(--shadow-float);
  transform: translateX(-105%);
  visibility: hidden;
  transition: transform 240ms var(--ease), visibility 0s 240ms;
}
.moin-docs-nav[data-open] {
  transform: translateX(0);
  visibility: visible;
  transition: transform 240ms var(--ease);
}

@media (min-width: 64rem) {
  .moin-docs-nav {
    position: sticky;
    top: 5.75rem;
    z-index: auto;
    width: auto;
    max-height: calc(100svh - 7.5rem);
    padding: 0 var(--space-2) var(--space-8) 0;
    background: transparent;
    color: inherit;
    box-shadow: none;
    transform: none;
    visibility: visible;
    transition: none;
  }
  .moin-docs-nav .moin-docs-sheet-head { display: none; }
}

.moin-docs-groups {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}
.moin-docs-group-title {
  margin-block-end: var(--space-1);
  padding-inline: var(--space-3);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.25rem;
  color: var(--foreground);
}
.moin-docs-links {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.moin-docs-link {
  display: flex;
  align-items: center;
  min-height: 2.25rem;
  padding: 0.375rem var(--space-3);
  border-radius: var(--radius-md);
  color: var(--muted-foreground);
  font-size: 0.875rem;
  line-height: 1.35;
  text-decoration: none;
  transition: background var(--fast) var(--ease), color var(--fast) var(--ease);
}
@media (max-width: 63.99rem) {
  .moin-docs-link { min-height: var(--press); }
}
.moin-docs-link:hover {
  background: var(--hover);
  color: var(--foreground);
}
.moin-docs-link:focus-visible { outline: none; box-shadow: var(--focus); }
.moin-docs-link[aria-current="page"] {
  background: var(--hover);
  color: var(--foreground);
  font-weight: 600;
}

/* Center column */
.moin-docs-main {
  width: 100%;
  max-width: 44rem;
  margin-inline: auto;
  min-width: 0;
}
.moin-docs-head {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-block-end: var(--space-6);
  padding-block-end: var(--space-6);
  border-bottom: 1px solid var(--border);
}
.moin-docs-head > .moin-title {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  line-height: 1.15;
  letter-spacing: var(--tracking-title);
}
.moin-docs-head > .moin-lead {
  max-width: 60ch;
  font-size: 1.0625rem;
  line-height: 1.55;
}
.moin-docs-article { min-width: 0; }
.moin-docs-next { margin-block-start: var(--space-8); }
.moin-docs-foot {
  display: flex;
  justify-content: flex-start;
  margin-block-start: var(--space-6);
}

/* Right TOC: mirror slide-over sheet from right on mobile/tablet,
   quiet sticky rail with active scroll indicator on wide screens. */
.moin-docs-toc {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  width: min(20rem, 86vw);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: var(--space-4) var(--space-4) calc(var(--space-8) + env(safe-area-inset-bottom, 0px));
  background: var(--popover);
  color: var(--popover-foreground);
  box-shadow: var(--shadow-float);
  transform: translateX(105%);
  visibility: hidden;
  transition: transform 240ms var(--ease), visibility 0s 240ms;
}
.moin-docs-toc[data-open] {
  transform: translateX(0);
  visibility: visible;
  transition: transform 240ms var(--ease);
}
.moin-docs-toc-title {
  display: none;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.25rem;
  color: var(--foreground);
}
@media (min-width: 78rem) {
  .moin-docs-toc {
    position: sticky;
    top: 5.75rem;
    right: auto;
    bottom: auto;
    z-index: auto;
    width: auto;
    gap: var(--space-2);
    max-height: calc(100svh - 7.5rem);
    padding: 0 0 var(--space-8) 0;
    background: transparent;
    color: inherit;
    box-shadow: none;
    transform: none;
    visibility: visible;
    transition: none;
  }
  .moin-docs-toc .moin-docs-sheet-head { display: none; }
  .moin-docs-toc-title { display: block; }
}
.moin-docs-toc-list {
  display: flex;
  flex-direction: column;
  border-inline-start: 1px solid var(--border);
}
.moin-docs-toc-link {
  display: block;
  margin-inline-start: -1px;
  padding: 0.4375rem 0 0.4375rem var(--space-3);
  border-inline-start: 2px solid transparent;
  color: var(--muted-foreground);
  font-size: 0.875rem;
  line-height: 1.4;
  text-decoration: none;
  transition: color var(--fast) var(--ease), border-color var(--fast) var(--ease);
}
@media (min-width: 78rem) {
  .moin-docs-toc-link {
    padding: 0.3125rem 0 0.3125rem var(--space-3);
    font-size: 0.8125rem;
  }
}
.moin-docs-toc-link[data-depth="3"] {
  padding-inline-start: var(--space-6);
}
.moin-docs-toc-link:hover {
  color: var(--foreground);
}
.moin-docs-toc-link:focus-visible { outline: none; box-shadow: var(--focus); border-radius: var(--radius-sm); }
.moin-docs-toc-link[aria-current="true"] {
  border-inline-start-color: var(--foreground);
  color: var(--foreground);
  font-weight: 500;
}

@media (prefers-reduced-motion: reduce) {
  .moin-docs-nav,
  .moin-docs-nav[data-open],
  .moin-docs-toc,
  .moin-docs-toc[data-open],
  .moin-docs-backdrop { transition: none; }
}
