/* The Mint Gazette: Printer's Green, oxblood and ivory. One type family throughout: Source Serif 4 for the
   masthead, headlines and reading (its optical sizes tune each size), Source Sans 3, its companion, for controls.
   Inks arrive per edition as --ink (main), --ink2 (second ink), --text and --paper. Mobile first. */
:root {
  --ink: #173D2C;
  --ink2: #7A2E2A;
  --text: #221E18;
  --paper: #F4ECD8;
  --hair: color-mix(in srgb, var(--ink) 22%, transparent);
  --line: color-mix(in srgb, var(--ink) 45%, transparent);
  --wash: color-mix(in srgb, var(--ink) 5%, var(--paper));
  --field: color-mix(in srgb, var(--paper) 45%, white);
  --muted: color-mix(in srgb, var(--text) 74%, var(--paper));
  --graphite: #4E4C47;
  --mast: 'Source Serif 4', Georgia, serif;
  --body: 'Source Serif 4', Georgia, serif;
  --sans: 'Source Sans 3', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  --display: var(--body);
  --fell: var(--body);
  --sc: var(--sans);
  --measure: 66ch;
  --radius: 12px;
  --ease: cubic-bezier(.22, .8, .24, 1);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 3.5rem; }
body { margin: 0; color: var(--text); background: var(--paper); font-family: var(--body); font-size: 17px; line-height: 1.6; }
a { color: var(--ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--ink2); }
:focus-visible { outline: 2px solid var(--ink2); outline-offset: 3px; }
img { max-width: 100%; }
.skip { position: absolute; left: .75rem; top: -3rem; z-index: 40; background: var(--ink); color: var(--paper); padding: .5rem .9rem; border-radius: var(--radius); }
.skip:focus { top: .75rem; color: var(--paper); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- nav: a pencil-ruled bar (menu, wordmark, account) and the sections in pencil icons ---------- */
.pencil-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { display: block; width: 24px; height: 24px; color: var(--graphite); flex: none; }
.topnav { position: sticky; top: 0; z-index: 20; background: var(--paper); transition: transform .25s ease; }
.topnav::after { content: ''; position: absolute; left: 0; right: 0; bottom: -4px; height: 6px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='6'%3E%3Cpath d='M0 3.1C30 2.3 60 3.8 90 3S150 2.2 180 3.2 220 3.6 240 3.1' fill='none' stroke='%234E4C47' stroke-width='1.1' stroke-linecap='round' opacity='.85'/%3E%3Cpath d='M0 3.9C40 3.4 70 4.6 120 3.8S200 3.1 240 3.9' fill='none' stroke='%234E4C47' stroke-width='.6' opacity='.5'/%3E%3C/svg%3E") repeat-x; pointer-events: none; }
.topnav.is-hidden { transform: translateY(-110%); }
.topnav-in { display: flex; align-items: center; gap: .35rem; min-height: 3.5rem; padding: 0 .5rem; }
.menu-btn { appearance: none; border: 0; background: none; padding: .55rem; margin: 0; border-radius: 10px; cursor: pointer; color: var(--graphite); }
.menu-btn:hover, .menu-btn[aria-expanded="true"] { background: var(--wash); }
.topnav-brand { font: 500 .92rem/1 var(--mast); letter-spacing: .12em; text-transform: uppercase; color: var(--text); text-decoration: none; white-space: nowrap; padding: .5rem .25rem; }
.topnav-brand:hover { color: var(--ink); }
.topnav-account { margin-left: auto; display: flex; align-items: center; gap: .1rem; font: 500 .78rem/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
.topnav-account a { color: var(--text); text-decoration: none; padding: .6rem .5rem; border-radius: 10px; }
.topnav-account a:hover, .topnav-account a.active { color: var(--ink2); }
.topnav-account .topnav-join { color: var(--ink2); }
.topnav-pen { text-transform: none; letter-spacing: 0; font-size: .95rem; color: var(--ink2) !important; max-width: 11rem; overflow: hidden; text-overflow: ellipsis; }
.topnav-bell { position: relative; display: inline-flex; align-items: center; }
.topnav-bell .badge { position: absolute; top: .1rem; right: 0; margin: 0; }
.badge {
  display: inline-grid; place-items: center; min-width: 1.15rem; height: 1.15rem; padding: 0 .3rem; margin-left: .25rem;
  border-radius: 1rem; background: var(--ink2); color: var(--paper); font: 600 .68rem/1 var(--sans); letter-spacing: 0;
}
.topnav .badge[hidden] { display: none; }
.sections { display: none; }
.sections a { display: flex; align-items: center; gap: .75rem; padding: .6rem .75rem; color: var(--text); text-decoration: none; font: 500 .95rem/1.2 var(--sans); border-radius: 10px; }
.sections a:hover { background: var(--wash); color: var(--text); }
.sections a.active, .sections a.active .icon { color: var(--ink2); }
.sections-open .sections {
  display: flex; flex-direction: column; position: fixed; top: 3.6rem; left: 0; z-index: 25; width: min(17rem, 100vw);
  max-height: calc(100vh - 3.6rem); overflow-y: auto; padding: .6rem .5rem 1rem; background: var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='6' height='240'%3E%3Cpath d='M3.1 0C2.3 30 3.8 60 3 90S2.2 150 3.2 180 3.6 220 3.1 240' fill='none' stroke='%234E4C47' stroke-width='1.1' stroke-linecap='round' opacity='.85'/%3E%3Cpath d='M3.9 0C3.4 40 4.6 70 3.8 120S3.1 200 3.9 240' fill='none' stroke='%234E4C47' stroke-width='.6' opacity='.5'/%3E%3C/svg%3E") repeat-y right top;
  box-shadow: 0 22px 30px -26px rgba(30, 30, 20, .6);
}
@media (min-width: 64rem) {
  .sections.is-rail {
    display: flex; flex-direction: column; position: fixed; top: 3.9rem; left: 0; bottom: 0; z-index: 10; width: 5.6rem;
    padding: 1rem 0; gap: .25rem; background: none; box-shadow: none; overflow: visible;
  }
  .sections.is-rail a { flex-direction: column; gap: .3rem; padding: .55rem .15rem; font-size: .7rem; text-align: center; color: var(--muted); }
  .sections.is-rail a.active { color: var(--text); font-weight: 650; background: none; }
  .sections.is-rail a.active .icon { color: var(--text); }
  .mode-page .menu-btn { display: none; }
  .mode-page .topnav-in { padding-left: 1.6rem; }
  .topnav-brand { font-size: 1.02rem; letter-spacing: .16em; }
}
.read-progress { height: 2px; }
.read-progress span { display: block; height: 100%; background: var(--ink2); transform: scaleX(0); transform-origin: left; }

/* ---------- landing: the masthead gets the stage ---------- */
main.landing { min-height: calc(100svh - 3rem); display: grid; place-items: center; padding: 1rem 1.25rem 3rem; text-align: center; }
.landing-stage { max-width: 42rem; }
.cut, .fl, .seal-word { display: block; color: var(--graphite); }
.cut svg, .fl svg, .seal svg { display: block; width: 100%; height: auto; }
.cut-landing { width: clamp(110px, 30vw, 170px); margin: 0 auto 1.5rem; }
.street-sketch { justify-self: stretch; margin: 2.75rem 0 0; overflow-x: auto; scrollbar-width: none; }
.street-sketch img { display: block; width: 100%; min-width: 760px; height: auto; }
.nameplate { margin: 0; font-weight: 600; color: var(--ink); line-height: 1; }
.np-the { display: block; font-family: var(--mast); font-size: clamp(18px, 4.5vw, 28px); letter-spacing: .38em; padding-left: .38em; margin-bottom: .2em; }
.np-word { display: block; font-family: var(--mast); font-size: clamp(46px, 13vw, 112px); line-height: .95; letter-spacing: -.02em; white-space: nowrap; }
.np-word em { font-weight: 500; }
.motto { font-family: var(--fell); font-style: italic; font-size: clamp(17px, 2.4vw, 21px); line-height: 1.4; margin: 1rem auto 0; max-width: 30rem; color: var(--text); }
.landing-rule { width: 5rem; height: 5px; margin: 2rem auto 1.4rem; border-top: 2px solid var(--ink); border-bottom: 1px solid var(--ink); }
.numb { font-family: var(--sc); color: var(--ink); letter-spacing: .04em; font-size: 1.05rem; margin: 0; }
.landing-lead { font-family: var(--fell); font-style: italic; color: var(--muted); font-size: 1.1rem; margin: .4rem auto 0; max-width: 30rem; }
.landing-actions { margin: 2rem 0 1.1rem; }
.landing-account { font-family: var(--sc); font-size: 1rem; color: var(--muted); margin: 0; }
.landing-account a { padding: .35rem .2rem; }
body.mode-landing .colophon { border-top: 0; padding-top: 0; }

/* ---------- reading: one centred column ---------- */
main.read { max-width: calc(var(--measure) + 2.5rem); margin: 0 auto; padding: 2.5rem 1.25rem 3rem; font-size: 18.5px; line-height: 1.72; }
.read-head { text-align: center; margin: 0 0 3.25rem; }
.read-title { font-family: var(--display); font-weight: 650; letter-spacing: -.012em; font-size: clamp(30px, 6vw, 44px); line-height: 1.1; margin: .35rem 0 0; color: var(--ink); text-wrap: balance; }
.to-reader { font-size: .82em; line-height: 1.55; font-style: italic; color: var(--muted); margin: .9rem auto 0; max-width: 34rem; }
.meta { font-family: var(--sc); font-size: .84em; letter-spacing: .03em; color: var(--muted); margin: 0 0 .5rem; line-height: 1.4; }
.meta a { color: inherit; text-decoration: none; }
.meta a:hover { color: var(--ink2); }
.meta .pen, .pen { font-family: var(--sc); color: var(--ink2); letter-spacing: .02em; }
.meta-loc { font-family: var(--fell); font-style: italic; letter-spacing: 0; }
.dot { color: var(--line); padding: 0 .1em; }
.ed-sec { scroll-margin-top: 0; }
.piece { position: relative; padding: 0 0 3.5rem; margin: 0 0 3.75rem; }
.piece::after { content: '❦'; position: absolute; left: 0; right: 0; bottom: -.7rem; text-align: center; font-size: 1rem; line-height: 1; color: var(--line); }
.piece:focus, .ed-sec:focus { outline: none; }
.piece-title { font-family: var(--display); font-weight: 650; letter-spacing: -.012em; font-size: clamp(28px, 1.1rem + 2.6vw, 40px); line-height: 1.13; margin: 0 0 .8rem; color: var(--text); text-wrap: balance; }
.piece-title a { color: inherit; text-decoration: none; }
.piece-title a:hover { color: var(--ink); }
.dek { font-style: italic; color: var(--muted); font-size: 1.1em; line-height: 1.45; margin: -.2rem 0 1.4rem; max-width: 30em; }
.body-copy p { margin: 0 0 1.4em; }
.body-copy > p:first-child { max-width: 86%; }
.read-time { white-space: nowrap; }
details.continue { margin: 0; }
details.continue > summary {
  display: inline-flex; align-items: baseline; gap: .6rem; min-height: 44px; padding: .55rem 1.1rem; margin: .2rem 0 .4rem;
  list-style: none; cursor: pointer; font-family: var(--sc); font-size: .9em; color: var(--ink);
  border: 1px solid var(--line); border-radius: 999px;
}
details.continue > summary::-webkit-details-marker { display: none; }
details.continue > summary:hover { background: var(--wash); }
.continue-time { font-family: var(--fell); font-style: italic; color: var(--muted); font-size: .92em; }
details.continue[open] > summary { display: none; }
details.continue[open] .continue-body { animation: unfold .35s ease both; }
@keyframes unfold { from { opacity: 0; transform: translateY(-.4rem); } }
kbd { font-family: ui-monospace, Menlo, monospace; font-size: .85em; padding: 0 .3em; border: 1px solid var(--hair); border-radius: 3px; background: var(--field); }

/* ---------- the read view's rail: a quiet contents list, a bottom sheet on narrow screens ---------- */
.rail {
  position: fixed; z-index: 25; left: 0; right: 0; bottom: 0; max-height: 72vh; overflow-y: auto; overscroll-behavior: contain;
  background: var(--paper); border-top: 1px solid var(--line); border-radius: 14px 14px 0 0; box-shadow: 0 -12px 32px -18px rgba(30, 30, 20, .5);
  padding: .4rem 1.1rem 1.5rem; font-size: .92rem;
  transform: translateY(105%); visibility: hidden; transition: transform .28s ease, visibility 0s linear .28s;
}
.rail.is-open, .rail:target { transform: none; visibility: visible; transition: transform .28s ease; }
.rail-top { display: flex; align-items: center; justify-content: space-between; position: sticky; top: -.4rem; background: var(--paper); padding: .6rem 0 .4rem; }
.rail-head { margin: 0; font-family: var(--sc); color: var(--ink); letter-spacing: .04em; }
.rail-close { font-family: var(--sc); font-size: .9rem; padding: .5rem .2rem; }
.rail-list { list-style: none; margin: 0; padding: 0; }
.rail-list a { display: block; padding: .5rem .75rem; border-left: 1px solid var(--hair); color: var(--muted); text-decoration: none; line-height: 1.35; }
.rail-list a:hover { color: var(--ink); }
.rail-list a.is-current { color: var(--ink2); border-left: 2px solid var(--ink2); padding-left: calc(.75rem - 1px); }
.rail-sec { display: block; font-family: var(--sc); font-size: .78em; letter-spacing: .05em; }
.rail-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rail-keys { display: none; margin: 1rem 0 0; font-size: .78em; color: var(--muted); line-height: 1.6; }
.rail-toggle {
  position: fixed; z-index: 24; left: 1rem; bottom: 1rem; display: inline-flex; align-items: center; gap: .45rem; max-width: calc(100vw - 2rem);
  min-height: 44px; padding: .45rem 1rem; border-radius: 999px; background: color-mix(in srgb, var(--paper) 94%, transparent);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); border: 1px solid var(--line); color: var(--ink);
  font-family: var(--sc); font-size: .92rem; text-decoration: none; box-shadow: 0 6px 18px -12px rgba(30, 30, 20, .5);
}
.rail-toggle:hover { color: var(--ink2); }
.rail-now { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 14rem; }
body.rail-open .rail-toggle { visibility: hidden; }
@media (min-width: 1180px) {
  main.read { max-width: min(calc(var(--measure) + 2.5rem), calc(100vw - 28.5rem)); }
  .rail {
    left: 1.25rem; right: auto; bottom: auto; top: 5.5rem; width: 12rem; max-height: calc(100vh - 8rem);
    transform: none; visibility: visible; background: transparent; border: 0; border-radius: 0; box-shadow: none; padding: 0;
    font-size: .8rem; scrollbar-width: none; transition: none;
  }
  .rail::-webkit-scrollbar { display: none; }
  .rail-top { position: static; background: transparent; padding: 0 0 .5rem .75rem; }
  .rail-head { font-size: .95em; color: var(--muted); }
  .rail-close, .rail-toggle { display: none; }
  .rail-list a { padding: .32rem .75rem; }
  .rail-keys { display: block; padding-left: .75rem; }
}
@media (prefers-reduced-motion: reduce) { .rail, .rail.is-open { transition: none; } details.continue[open] .continue-body { animation: none; } }
.body-copy h3 { font-family: var(--sc); font-weight: 400; font-size: 1.05em; letter-spacing: .03em; color: var(--ink); margin: 1.8em 0 .5em; }
.body-copy sup { font-size: .62em; line-height: 0; }
.body-copy sup a { text-decoration: none; color: var(--ink2); }
.body-copy .note { font-size: .9em; background: var(--wash); padding: .8rem 1rem; border-left: 2px solid var(--ink); border-radius: 0 var(--radius) var(--radius) 0; }
.feature-body > p:first-child::first-letter { float: left; font-family: var(--display); font-size: 3.5em; line-height: .8; padding: .08em .1em 0 0; color: var(--ink); }
.letter { font-style: italic; }
.by { font-family: var(--sc); font-size: .9em; text-align: right; color: var(--ink2); margin: .6rem 0 0; }
.by i { font-family: var(--fell); font-style: italic; color: var(--text); }
.piece-pic { margin: 0 0 1.4rem; }
.piece-pic img { display: block; width: 100%; height: auto; max-height: 32rem; object-fit: cover; border-radius: var(--radius); }
.piece-end { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 1.25rem; margin-top: 1.8rem; font-size: .84em; }
.next-piece { font-family: var(--fell); font-style: italic; color: var(--muted); text-decoration: none; padding: .4rem 0; }
.next-piece:hover { color: var(--ink2); }
.like-bar { display: flex; align-items: center; gap: .75rem; margin: 0; }
.like {
  display: inline-flex; align-items: center; gap: .3em; min-height: 44px; padding: .3rem 1.1rem;
  font-family: var(--sans); font-weight: 600; font-size: .92rem; line-height: 1; color: var(--ink2); background: transparent;
  border: 1px solid color-mix(in srgb, var(--ink2) 55%, transparent); border-radius: 999px; cursor: pointer; text-decoration: none;
}
.like:hover { background: color-mix(in srgb, var(--ink2) 7%, var(--paper)); color: var(--ink2); }
.like.is-on { background: var(--ink2); border-color: var(--ink2); color: var(--paper); }
.like.is-own, .like.is-off { cursor: default; border-style: dashed; }
.like-count { font-style: italic; color: var(--muted); }
.printer { margin: 0 0 3.25rem; }
.printer-note { font-family: var(--fell); font-style: italic; font-size: 1.08em; line-height: 1.6; margin: 0; padding-left: 1rem; border-left: 2px solid var(--ink2); }
.facts { margin: 2.25rem 0 0; padding: 1.25rem 1.4rem; background: var(--wash); border-radius: var(--radius); font-size: .86em; line-height: 1.55; }
.facts-title { font-family: var(--sc); font-weight: 400; font-size: 1.05em; letter-spacing: .04em; color: var(--ink); margin: 0 0 .6rem; }
.facts-title:not(:first-child) { margin-top: 1.4rem; }
.facts dl { margin: 0; display: grid; gap: .8rem; }
.facts dt { font-family: var(--display); font-size: 1.35em; color: var(--ink); line-height: 1.1; }
.facts dd { margin: .1rem 0 0; }
.plain { margin: 0; padding-left: 1.1rem; }
.plain li { margin-bottom: .35rem; }
.sources { margin-top: 2rem; font-size: .8em; line-height: 1.55; }
.sources ol { padding-left: 1.4rem; margin: 0 0 .6rem; }
.sources li { margin-bottom: .4rem; overflow-wrap: anywhere; }
.sources li:target { background: color-mix(in srgb, var(--ink2) 12%, transparent); }
.piece-feature .piece-end { justify-content: flex-end; }
.extras { margin: 0 0 3.25rem; font-size: .92em; }
.sec-head { font-family: var(--sc); font-weight: 400; font-size: 1.05em; letter-spacing: .05em; color: var(--ink); text-align: center; margin: 0 0 1.5rem; }
.cgroup { margin-bottom: 1.4rem; }
.cat-head { font-family: var(--sc); font-weight: 400; font-size: 1em; color: var(--ink); margin: 0 0 .3rem; }
.adv { padding: .6rem 0; border-top: 1px solid var(--hair); line-height: 1.5; }
.adv b { font-family: var(--sc); font-weight: 400; color: var(--ink); }
.adv-meta i { color: var(--muted); }
.more { font-style: italic; color: var(--muted); }
.rank-card { margin-bottom: 1.75rem; }
.rank-card h3, .rank-card h4 { font-family: var(--display); font-weight: 650; letter-spacing: -.012em; font-size: 1.3em; line-height: 1.2; margin: 0 0 .4rem; }
.rank-card ol { margin: 0; padding: 0; list-style: none; counter-reset: r; }
.rank-card li { counter-increment: r; display: grid; grid-template-columns: 2.2rem 1fr; padding: .4rem 0; border-bottom: 1px solid var(--hair); }
.rank-card li::before { content: counter(r, upper-roman) '.'; font-family: var(--display); color: var(--ink); grid-row: span 2; }
.rank-card li strong { font-weight: 400; }
.rank-card li span { font-size: .9em; color: var(--muted); font-style: italic; }
.end { text-align: center; padding-bottom: 1rem; }
.end-mark { font-family: var(--fell); font-style: italic; color: var(--muted); font-size: 1.05em; margin: 0 0 1.25rem; }
.end p:not(.end-mark) { margin: .3rem 0; font-size: .92em; }
.single .piece-end { margin-top: 2.2rem; }
.single::after { display: none; }
.preview-banner { text-align: center; font-family: var(--sc); font-size: .85em; }

/* ---------- shared bits ---------- */
.sample-tag {
  display: inline-block; vertical-align: .1em; font-family: var(--sc); font-size: .72rem; letter-spacing: .06em; line-height: 1.5;
  color: var(--ink2); border: 1px solid color-mix(in srgb, var(--ink2) 50%, transparent); padding: 0 .4rem; border-radius: 999px;
}
.center { text-align: center; }
.small { font-size: .85rem; color: var(--muted); }
.empty { font-style: italic; color: var(--muted); }
.kicker { font-family: var(--sc); font-size: .9rem; letter-spacing: .03em; color: var(--muted); }
.headline { font-family: var(--display); font-weight: 650; letter-spacing: -.012em; font-size: clamp(28px, 5vw, 40px); line-height: 1.12; margin: .2rem 0 .6rem; color: var(--text); }
.deck { font-style: italic; color: var(--muted); }
.fl { display: block; width: 90px; margin: 1rem auto; }
.notice { border: 1px solid var(--hair); background: var(--wash); padding: .75rem 1rem; margin: 0 0 1.5rem; border-radius: var(--radius); font-size: .95rem; }
.notice.success { border-left: 3px solid var(--ink); }
.notice.error { border-color: color-mix(in srgb, var(--ink2) 50%, transparent); border-left: 3px solid var(--ink2); background: color-mix(in srgb, var(--ink2) 6%, var(--paper)); color: var(--ink2); }
.notice.dev { border-style: dashed; border-color: var(--ink2); }
code { font-family: ui-monospace, Menlo, monospace; font-size: .88em; overflow-wrap: anywhere; }
.pill { display: inline-block; font-family: var(--sc); font-size: .78rem; line-height: 1.5; padding: 0 .5rem; border: 1px solid; border-radius: 999px; }
.pill-draft { color: var(--muted); }
.pill-in_review, .pill-declined, .pill-pending, .pill-rejected { color: var(--ink2); }
.pill-published, .pill-approved, .pill-delivered, .pill-verified { color: var(--ink); }
form.inline { display: inline; }

/* ---------- inner pages: desks, ledgers, forms ---------- */
main.page { max-width: 46rem; margin: 0 auto; padding: 2.25rem 1.25rem 3rem; }
.banner { margin: 0 0 2.25rem; }
.banner-title { font-family: var(--display); font-weight: 650; letter-spacing: -.012em; font-size: clamp(32px, 7vw, 46px); line-height: 1.08; margin: 0; color: var(--ink); }
.banner p { margin: .5rem 0 0; font-family: var(--fell); font-style: italic; color: var(--muted); }
.head { font-family: var(--sc); font-weight: 400; font-size: 1.15rem; letter-spacing: .04em; color: var(--ink); margin: 0 0 .9rem; }
.head a { color: inherit; text-decoration: none; }
.rules, .rules-band { height: 0; border: 0; border-top: 1px solid var(--hair); margin: 2.75rem 0; }
.box { border: 1px solid var(--hair); border-radius: var(--radius); padding: 1.1rem 1.25rem; background: color-mix(in srgb, var(--paper) 60%, white); }
.box-title { font-family: var(--sc); font-weight: 400; font-size: 1.05rem; color: var(--ink); margin: 0 0 .4rem; }

.button, .button-ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-height: 46px; cursor: pointer;
  font-family: var(--sans); font-weight: 600; font-size: 1rem; line-height: 1.2; letter-spacing: -.005em;
  padding: .7rem 1.4rem; border-radius: 999px; text-decoration: none; border: 1px solid transparent;
}
.button { background: var(--ink); color: var(--paper); box-shadow: 0 1px 2px rgba(20, 30, 20, .14), 0 6px 16px -10px color-mix(in srgb, var(--ink) 70%, transparent); }
.button:hover { color: var(--paper); background: color-mix(in srgb, var(--ink) 88%, black); box-shadow: 0 1px 2px rgba(20, 30, 20, .16), 0 10px 22px -12px color-mix(in srgb, var(--ink) 80%, transparent); }
.button-lg { font-size: 1.08rem; padding: .85rem 2rem; min-height: 52px; }
.button-ghost { background: color-mix(in srgb, var(--paper) 70%, white); color: var(--ink); border-color: var(--hair); }
.button-ghost:hover { background: var(--wash); color: var(--ink); border-color: var(--line); }
.button[disabled], .button-ghost[disabled] { opacity: .42; cursor: not-allowed; box-shadow: none; transform: none; }
.linklike { background: none; border: 0; padding: .2rem 0; font: inherit; font-size: .95rem; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.linklike[disabled] { color: var(--hair); cursor: default; }

.form-wrap { max-width: 40rem; margin: 0 auto; }
.form-wrap.narrow { max-width: 32rem; }
.paper-form { display: flex; flex-direction: column; gap: 1.1rem; margin: 1rem 0; }
.paper-form fieldset { border: 1px solid var(--hair); border-radius: var(--radius); padding: .75rem 1rem 1rem; margin: 0; display: flex; flex-direction: column; gap: .9rem; }
.paper-form legend { font-family: var(--sc); color: var(--ink); padding: 0 .4rem; }
.paper-form label { display: flex; flex-direction: column; gap: .4rem; font-family: var(--sans); font-weight: 600; color: var(--ink); font-size: .95rem; }
.paper-form .hint { font-family: var(--sans); font-weight: 400; font-size: .84rem; line-height: 1.45; color: var(--muted); }
.paper-form input, .paper-form select, .paper-form textarea, .desk-actions input {
  font: inherit; font-family: var(--body); font-size: 16px; color: var(--text); width: 100%;
  padding: .75rem .9rem; background: var(--field); border: 1px solid var(--line); border-radius: var(--radius);
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease), background-color .18s var(--ease);
}
.paper-form input[type=file] { padding: .55rem; }
.paper-form input:focus, .paper-form select:focus, .paper-form textarea:focus, .desk-actions input:focus { outline: none; border-color: var(--ink); background: color-mix(in srgb, var(--paper) 25%, white); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ink) 14%, transparent); }
.paper-form .check { flex-direction: row; align-items: flex-start; gap: .6rem; font-family: var(--sans); font-weight: 400; color: var(--text); font-size: .95rem; }
.paper-form .check input { accent-color: var(--ink); width: 1.15rem; height: 1.15rem; }
.paper-form .check input { width: auto; margin-top: .3rem; }
.paper-form .button { align-self: flex-start; }
.paper-form.compact { gap: .6rem; margin: .5rem 0 0; }
.form-row { display: flex; flex-direction: column; gap: 1.1rem; }
.form-row .grow { flex: 1; }
.column-editor textarea { min-height: 18rem; line-height: 1.65; font-size: 17px; }
.desk-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin-top: .6rem; }
.desk-actions input { flex: 1; min-width: 12rem; }
.fine { border-top: 1px solid var(--hair); padding-top: .75rem; }
.charter { margin: .75rem 0 1rem; }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 1.25rem 0; display: grid; gap: 1rem; }
.steps li { counter-increment: s; font-size: .95rem; }
.steps li::before { content: counter(s, upper-roman) '.'; display: block; font-family: var(--display); color: var(--ink); font-size: 1.3rem; }
.steps strong { font-weight: 400; font-family: var(--sc); color: var(--ink); }
.join-actions { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: center; margin: 1.25rem 0; }
.status-card { border: 1px solid var(--hair); border-left: 3px solid var(--ink); border-radius: var(--radius); padding: 1rem 1.1rem; margin: 0 0 2rem; background: var(--wash); }
.status-card.status-pending { border-left-color: var(--ink2); }
.status-label { font-family: var(--sc); font-size: 1.1rem; color: var(--ink); }
.status-card p { margin: .4rem 0; }
.mine { list-style: none; padding: 0; margin: 0; }
.mine li { padding: .6rem 0; border-bottom: 1px solid var(--hair); }
.private { display: inline-block; margin-left: .4rem; font-size: .85rem; color: var(--muted); border: 1px dashed var(--line); border-radius: 4px; padding: 0 .4rem; }
.dev-link { overflow-wrap: anywhere; }

/* writer's desk: the editor first, the rest beneath it */
.desk-grid { display: grid; gap: 2.25rem; }
.desk-side { display: grid; gap: 1rem; align-content: start; }
.desk-pic { margin: 0; }
.desk-pic img { display: block; max-width: 14rem; height: auto; border-radius: var(--radius); margin-bottom: .4rem; }
.connect-box p { margin: .4rem 0; }
.my-columns { width: 100%; border-collapse: collapse; font-size: .95rem; }
.my-columns th { font-family: var(--sc); font-weight: 400; color: var(--muted); text-align: left; border-bottom: 1px solid var(--line); padding: .4rem .5rem; }
.my-columns td { border-bottom: 1px solid var(--hair); padding: .65rem .5rem; vertical-align: top; }
.my-columns td.num { text-align: center; font-family: var(--display); font-size: 1.1rem; }

/* printer's desk */
.desk-item { border: 1px solid var(--hair); border-radius: var(--radius); padding: 1.1rem 1.25rem; margin-bottom: 1rem; background: color-mix(in srgb, var(--paper) 60%, white); }
.desk-item h3 { font-family: var(--display); font-weight: 650; letter-spacing: -.012em; font-size: 1.5rem; line-height: 1.2; margin: .2rem 0 .5rem; }
.desk-item .body-copy { font-size: .97rem; }
.desk-cols { display: grid; gap: 2.25rem; }
.next-issue > p { margin-top: 0; }
.placed-section { margin-bottom: .9rem; }
.placed { margin: 0; padding-left: 1.4rem; }
.placed li { padding: .4rem 0; border-bottom: 1px solid var(--hair); }
.placed-title { font-family: var(--display); font-size: 1.1rem; }
.placed-actions { display: flex; gap: .9rem; margin-top: .2rem; }
.auto-publish, .print-upload { margin-top: 1.1rem; }
.day-checks { display: flex; flex-wrap: wrap; gap: .3rem 1rem; }
.invite-code { font-size: 1.05rem; letter-spacing: .12em; color: var(--ink); background: var(--wash); padding: 0 .4rem; border-radius: 4px; }
.verification { line-height: 1.55; }
.help .steps-list li { margin-bottom: .5rem; }
.connector-url code { font-size: 1.05rem; }

/* reckonings */
.figures { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--hair); border: 1px solid var(--hair); border-radius: var(--radius); overflow: hidden; margin-bottom: 1rem; }
.figure { text-align: center; padding: 1.1rem .6rem; background: var(--paper); }
.figure-n { font-family: var(--display); font-size: 2.6rem; line-height: 1; color: var(--ink); }
.figure-label { font-family: var(--sc); color: var(--ink2); margin-top: .3rem; }
.figure .small { line-height: 1.4; }
.edition-ledger { list-style: none; padding: 0; margin: 0; }
.edition-ledger li { border-bottom: 1px solid var(--hair); }
.edition-ledger a { display: grid; gap: .1rem; padding: .8rem .2rem; color: var(--text); text-decoration: none; }
.edition-ledger a:hover { background: var(--wash); }
.ledger-no { font-family: var(--sc); color: var(--ink); }
.ledger-title { font-family: var(--display); font-size: 1.3rem; line-height: 1.2; }
.ledger-meta { font-size: .85rem; color: var(--muted); font-style: italic; }

/* bound volumes */
.archive-list { display: grid; gap: .9rem; }
.archive-card { display: grid; grid-template-columns: 4.5rem 1fr; gap: 1rem; align-items: center; border: 1px solid var(--hair); border-radius: var(--radius); padding: .9rem; text-decoration: none; color: var(--text); }
.archive-card:hover { color: var(--text); background: var(--wash); }
.archive-card h3 { font-family: var(--display); font-weight: 650; letter-spacing: -.012em; margin: .1rem 0 0; font-size: 1.35rem; line-height: 1.2; }
.archive-card p { margin: .2rem 0 0; font-size: .9rem; font-style: italic; }
.archive-no { font-family: var(--sc); font-size: .85rem; color: var(--paper); background: var(--ink); text-align: center; padding: .6rem 0 .7rem; line-height: 1; border-radius: 4px; }
.archive-no span { display: block; font-family: var(--display); font-size: 2rem; margin-top: .2rem; }
.archive-card.draft { border-style: dashed; }
.archive-card.draft .archive-no { background: transparent; color: var(--ink2); border: 1px dashed var(--ink2); }
.archive-print { margin: -.3rem 0 .4rem 5.5rem; font-size: .9rem; }

/* notices */
.notice-list { list-style: none; padding: 0; margin: 0 0 1.75rem; }
.notice-list li { padding: .8rem .2rem; border-bottom: 1px solid var(--hair); }
.notice-list li.is-new { background: color-mix(in srgb, var(--ink2) 4%, var(--paper)); padding-left: .6rem; border-left: 2px solid var(--ink2); }
.notice-list .pill { color: var(--ink2); margin-right: .4rem; }

/* ---------- the daily puzzle ---------- */
.word-page { max-width: 32rem; margin: 0 auto; }
.word-head { display: flex; align-items: center; justify-content: center; gap: 1rem; }
.seal-word { width: 70px; flex: none; }
.word-head p { margin: .2rem 0 0; font-family: var(--fell); font-style: italic; color: var(--muted); }
.word-rules { font-size: .95rem; text-align: center; margin: 1rem 0 1.25rem; }
.key-demo { display: inline-grid; place-items: center; width: 24px; height: 24px; font-family: var(--sc); font-size: 15px; vertical-align: middle; border-radius: 3px; }
.board { display: grid; grid-template-rows: repeat(6, 1fr); gap: 6px; width: min(330px, 100%); margin: 0 auto; }
.row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.row.shake { animation: shake .4s; }
.tile {
  aspect-ratio: 1; display: grid; place-items: center; border-radius: 4px;
  font-family: var(--display); font-size: 28px; text-transform: uppercase; line-height: 1;
  border: 2px solid var(--hair); background: var(--field); color: var(--text);
}
.tile.filled { border-color: var(--ink); animation: pop .1s; }
/* Green = solid fill; oxblood = outlined; absent = grey wash. Fill vs. outline keeps them apart for colour-blind readers. */
.tile.correct, .key-demo.correct, .key.correct { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.tile.present, .key-demo.present, .key.present { background: var(--paper); border: 3px solid var(--ink2); color: var(--ink2); box-shadow: inset 0 0 0 2px var(--paper), inset 0 0 0 3px var(--ink2); }
.tile.absent, .key-demo.absent, .key.absent { background: color-mix(in srgb, var(--text) 45%, var(--paper)); border-color: transparent; color: var(--paper); }
.tile.reveal { animation: flip .5s ease both; }
.word-msg { min-height: 32px; text-align: center; font-family: var(--sc); font-size: 1.1rem; color: var(--ink); margin: .75rem 0 .4rem; }
.word-msg .share { margin-left: .5rem; font-size: .9rem; padding: .25rem .8rem; min-height: 0; }
.keyboard { display: flex; flex-direction: column; gap: 6px; user-select: none; margin-bottom: 1rem; }
.krow { display: flex; gap: 5px; justify-content: center; }
.key { flex: 1; max-width: 44px; height: 52px; border: 1px solid var(--hair); border-radius: 4px; cursor: pointer; font-family: var(--sc); font-size: 17px; background: var(--wash); color: var(--text); }
.key.wide { max-width: 70px; font-size: 14px; }
.standings { margin-top: 1.5rem; }
@keyframes pop { 50% { transform: scale(1.08); } }
@keyframes flip { 0% { transform: rotateX(0); } 50% { transform: rotateX(90deg); } 100% { transform: rotateX(0); } }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

/* ---------- colophon ---------- */
.colophon { max-width: 40rem; margin: 0 auto; padding: 1.5rem 1.25rem 2.5rem; text-align: center; border-top: 1px solid var(--hair); }
.colophon p { margin: 0 0 .4rem; }
.colophon .signed { font-family: var(--fell); font-style: italic; color: var(--ink); }

.live-toast {
  position: fixed; left: 1rem; right: 1rem; bottom: 1rem; z-index: 30; background: var(--paper); color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 8px 24px -12px rgba(30, 30, 20, .45); padding: .7rem 1rem; font-style: italic;
}

/* ---------- wider screens ---------- */
@media (min-width: 640px) {
  .form-row { flex-direction: row; gap: .75rem; }
  .form-row .zip { width: 8rem; flex: none; }
  .figures { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .edition-ledger a { grid-template-columns: 6.5rem 1fr auto; gap: 1rem; align-items: baseline; }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .desk-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts dl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .live-toast { left: auto; max-width: 20rem; }
  main.read { font-size: 20px; padding-top: 3.5rem; }
  .piece-end { flex-wrap: nowrap; }
}

/* ---------- phones: the desk table becomes a list ---------- */
@media (max-width: 639px) {
  .my-columns thead { display: none; }
  .my-columns, .my-columns tbody, .my-columns tr, .my-columns td { display: block; width: 100%; }
  .my-columns tr { border-bottom: 1px solid var(--line); padding: .5rem 0; }
  .my-columns td { border: 0; padding: .1rem 0; }
  .my-columns td.num { text-align: left; }
  .my-columns td.num::before { content: 'Likes: '; font-family: var(--sc); font-size: .85rem; }
  .archive-print { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .topnav { transition: none; }
  .tile.filled, .tile.reveal, .row.shake { animation: none; }
}

body.mode-read .live-toast { bottom: 4.5rem; }
@media (min-width: 1180px) { body.mode-read .live-toast { bottom: 1rem; } }

.locate-status { min-height: 1.4em; margin: .3rem 0 0; }
.locate-status.error { color: var(--ink2); }

/* ---------- one feel for every control: soft transitions, a gentle press, no grey tap flash ---------- */
a, button, summary, .button, .button-ghost, .like, .linklike, .rail-toggle, .rail-list a, .sections a, .topnav-account a, .photo-tile, .photo-clear {
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
  transition: background-color .18s var(--ease), color .18s var(--ease), border-color .18s var(--ease), box-shadow .22s var(--ease), opacity .18s var(--ease), transform .14s var(--ease);
}
.button:active, .button-ghost:active, .like:active, details.continue > summary:active, .rail-toggle:active, .photo-tile:active, .photo-clear:active { transform: scale(.97); }
.button:focus-visible, .button-ghost:focus-visible, .like:focus-visible, details.continue > summary:focus-visible, .rail-toggle:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--paper), 0 0 0 5px var(--ink2); }
.like, details.continue > summary, .rail-toggle { font-family: var(--sans); font-weight: 600; }
details.continue > summary { font-size: .9rem; }

/* ---------- picture picker: a photo tile, like choosing from the iOS library ---------- */
.photo-pick { display: flex; flex-direction: column; gap: .45rem; }
.photo-label { font-family: var(--sans); font-weight: 600; color: var(--ink); font-size: .95rem; }
.photo-frame { position: relative; width: min(100%, 22rem); }
.photo-input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.photo-tile {
  display: grid; place-items: center; width: 100%; aspect-ratio: 4 / 3; overflow: hidden; cursor: pointer;
  border-radius: 18px; background: color-mix(in srgb, var(--paper) 55%, white); border: 1.5px dashed var(--line);
  color: var(--ink); font-family: var(--sans);
}
.photo-tile:hover { background: color-mix(in srgb, var(--paper) 35%, white); border-color: var(--ink); }
.photo-frame:focus-within .photo-tile { box-shadow: 0 0 0 3px var(--paper), 0 0 0 5px var(--ink2); }
.photo-empty { display: grid; justify-items: center; gap: .35rem; text-align: center; padding: 1rem; }
.photo-icon { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; background: var(--ink); color: var(--paper); box-shadow: 0 6px 16px -8px color-mix(in srgb, var(--ink) 80%, transparent); }
.photo-icon svg { width: 26px; height: 26px; }
.photo-empty b { font-weight: 600; font-size: 1rem; margin-top: .25rem; }
.photo-empty small { color: var(--muted); font-size: .8rem; }
.photo-frame.has-photo .photo-tile { border: 0; background: #111; box-shadow: 0 10px 30px -16px rgba(0, 0, 0, .55); }
.photo-frame.has-photo .photo-empty { display: none; }
.photo-preview { width: 100%; height: 100%; object-fit: cover; display: block; animation: photo-in .32s var(--ease) both; }
.photo-preview[hidden] { display: none; }
@keyframes photo-in { from { opacity: 0; transform: scale(1.04); } }
.photo-clear {
  position: absolute; top: .55rem; right: .55rem; width: 34px; height: 34px; border-radius: 50%; border: 0; cursor: pointer;
  display: grid; place-items: center; font: 600 1.15rem/1 var(--sans); color: #fff;
  background: rgba(20, 20, 20, .55); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.photo-clear:hover { background: rgba(20, 20, 20, .75); }
.photo-change { position: absolute; left: .55rem; bottom: .55rem; padding: .35rem .8rem; border-radius: 999px; font: 600 .82rem/1.2 var(--sans); color: #fff;
  background: rgba(20, 20, 20, .55); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); pointer-events: none; }
.photo-frame:not(.has-photo) .photo-change, .photo-frame:not(.has-photo) .photo-clear { display: none; }
.photo-status { min-height: 1.2em; margin: 0; font-family: var(--sans); font-size: .84rem; color: var(--ink2); }
@media (prefers-reduced-motion: reduce) {
  a, button, summary, .button, .button-ghost, .like, .linklike, .rail-toggle, .rail-list a, .sections a, .topnav-account a, .photo-tile, .photo-clear { transition: none; }
  .button:active, .button-ghost:active, .like:active, details.continue > summary:active, .rail-toggle:active, .photo-tile:active, .photo-clear:active { transform: none; }
  .photo-preview { animation: none; }
}

/* ---------- the rest of a Numb. is for neighbours ---------- */
.gate { margin: 1rem 0 3rem; padding: 1.6rem 1.5rem; text-align: center; border-radius: 18px; background: color-mix(in srgb, var(--paper) 55%, white); border: 1px solid var(--hair); }
.gate-head { font-family: var(--display); font-weight: 650; letter-spacing: -.012em; font-size: 1.35em; line-height: 1.25; margin: 0 0 .6rem; color: var(--ink); text-wrap: balance; }
.gate p { margin: .5rem auto; max-width: 30em; }
.gate-actions { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: center; margin-top: 1.1rem !important; }

/* Bring a Neighbour: the invite link on the desk, and the seal it earns */
.seal { color: var(--ink2); font-size: .85em; }
.invite-count { margin: .4rem 0 .6rem; }
.invite-link { display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; }
.invite-link input { flex: 1 1 12rem; min-width: 0; font: .85rem var(--sans); }
.invite-link .button, .invite-link .button-ghost { flex: 0 0 auto; }
.landing-count { margin: .2rem 0 0; font: .9rem var(--sans); color: color-mix(in srgb, var(--text) 70%, transparent); }
