/* Self-hosted Latin subsets. See fonts/*-OFL.txt for licenses. Optional display
   avoids a late font swap shifting headlines on slow connections. */
@font-face {
  font-family: "Newsreader";
  font-style: normal;
  font-weight: 500;
  font-display: optional;
  src: url("/assets/fonts/newsreader-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Public Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: optional;
  src: url("/assets/fonts/public-sans-latin.woff2") format("woff2");
}
/* LocalWatch, resident surface. "Civic paper": a local newspaper for your town's
   government. Newsreader carries the headlines; Public Sans (the US government's
   typeface) carries the interface. One accent, pine green, chosen because a
   nonpartisan government tool should not lean blue or red. */

:root {
  --paper: #faf9f5;
  --paper-2: #f2f0ea;
  --card: #ffffff;
  --ink: #1b1b18;
  --ink-2: #55534b;
  --ink-3: #6b685e; /* 5.3:1 on paper: small labels must still pass AA */
  --rule: #e4e1d8;
  --rule-2: #efede6;
  --pine: #1e5140;
  --pine-deep: #143b2e;
  --pine-wash: #e6efea;
  --pine-ink: #174233;
  --amber: #8f5410; /* 5.2:1 on its wash */
  --amber-wash: #f6ecdd;
  --red: #a3241c;
  --red-wash: #f7e4e1;
  --serif: "Newsreader", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --sans:
    "Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
  --mast-rule: var(--ink);
  --wrap: 1080px;
  --r: 6px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #141513;
    --paper-2: #1b1d1a;
    --card: #1b1d1a;
    --ink: #edebe4;
    --ink-2: #b3b0a6;
    --ink-3: #94928a;
    --rule: #2c2e2a;
    --rule-2: #232522;
    --pine: #7fbfa0;
    --pine-deep: #9ad0b5;
    --pine-wash: #1b2c25;
    --pine-ink: #a9dcc3;
    --amber: #d9924a;
    --amber-wash: #2e2418;
    --red: #e27a72;
    --red-wash: #34201e;
    --mast-rule: var(--pine);
    --logo-filter: invert(1) brightness(1.1);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #141513;
  --paper-2: #1b1d1a;
  --card: #1b1d1a;
  --ink: #edebe4;
  --ink-2: #b3b0a6;
  --ink-3: #94928a;
  --rule: #2c2e2a;
  --rule-2: #232522;
  --pine: #7fbfa0;
  --pine-deep: #9ad0b5;
  --pine-wash: #1b2c25;
  --pine-ink: #a9dcc3;
  --amber: #d9924a;
  --amber-wash: #2e2418;
  --red: #e27a72;
  --red-wash: #34201e;
  --mast-rule: var(--pine);
  --logo-filter: invert(1) brightness(1.1);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  background: var(--paper);
}
body {
  margin: 0;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
main {
  flex: 1 0 auto;
}
a {
  color: var(--pine);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}
img {
  max-width: 100%;
}
.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 22px;
  padding-left: max(22px, env(safe-area-inset-left, 0px));
  padding-right: max(22px, env(safe-area-inset-right, 0px));
}
:focus-visible {
  outline: 2px solid var(--pine);
  outline-offset: 2px;
  border-radius: 2px;
}
.skip {
  position: absolute;
  left: -9999px;
  top: 8px;
  background: var(--ink);
  color: var(--paper);
  padding: 8px 12px;
  z-index: 100;
}
.skip:focus {
  left: 8px;
}

/* type scale */
.kicker {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.sec {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
  margin: 34px 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--rule);
}

/* ---------- top bar ---------- */
.top {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--paper);
  padding-top: env(safe-area-inset-top, 0px);
  border-bottom: 1px solid var(--rule);
}
.top-row {
  display: flex;
  align-items: center;
  gap: 18px;
  height: 58px;
}
.brand img {
  display: block;
  height: 26px;
  width: auto;
}
.top-search {
  min-width: 0;
  flex: 1 1 auto;
  max-width: 380px;
  margin-left: 6px;
}

/* ---------- city picker (shared with citypicker.js) ---------- */
.citypick {
  position: relative;
}
.citypick > svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-3);
  pointer-events: none;
}
.citypick input {
  width: 100%;
  font: 500 15px/1.2 var(--sans);
  color: var(--ink);
  padding: 11px 14px 11px 40px;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--r);
  outline: none;
  transition:
    border-color 0.12s,
    box-shadow 0.12s;
}
.citypick input::placeholder {
  color: var(--ink-3);
}
.citypick input:focus {
  border-color: var(--pine);
  box-shadow: 0 0 0 3px var(--pine-wash);
}
.citypick.big input {
  font-size: 18px;
  padding: 17px 18px 17px 50px;
  border-width: 1.5px;
  border-color: var(--ink);
}
.citypick.big > svg {
  left: 18px;
  width: 20px;
  height: 20px;
  color: var(--ink);
}
.cp-panel {
  position: absolute;
  z-index: 60;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: 360px;
  overflow-y: auto;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--r);
  box-shadow: 0 18px 50px -24px rgba(0, 0, 0, 0.45);
}
.cp-opt {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 14px;
  cursor: pointer;
  border-bottom: 1px solid var(--rule-2);
}
.cp-opt:last-child {
  border-bottom: 0;
}
.cp-opt.on,
.cp-opt:hover {
  background: var(--pine-wash);
}
.cp-name {
  font-weight: 600;
  font-size: 14.5px;
}
.cp-meta {
  font-size: 12px;
  color: var(--ink-3);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.cp-empty {
  padding: 14px;
  font-size: 13.5px;
  color: var(--ink-3);
}

/* ---------- HOME hero ---------- */
.hero {
  padding: 54px 0 0;
}
.home-feed .feedbar {
  margin-top: 32px;
}
.home-feed .ffilter {
  width: 320px;
  max-width: 100%;
}
.hero h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(34px, 5.2vw, 56px);
  line-height: 1.04;
  letter-spacing: -0.015em;
  margin: 0 0 14px;
  max-width: 18ch;
  font-optical-sizing: auto;
}
.hero-ending {
  white-space: nowrap;
}
.hero p.lede {
  font-size: 18px;
  color: var(--ink-2);
  margin: 0 0 26px;
  max-width: 48ch;
}
.hero .citypick {
  max-width: 560px;
}
.hero .note {
  margin: 12px 2px 0;
  font-size: 13.5px;
  color: var(--ink-3);
}
.hero .note b {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

/* ---------- CITY masthead (the signature) ---------- */
.masthead {
  padding-top: 42px;
}
.masthead h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(44px, 8.5vw, 92px);
  line-height: 0.98;
  letter-spacing: -0.02em;
  margin: 0;
  font-optical-sizing: auto;
  word-break: break-word;
}
.masthead .rule {
  height: 1px;
  background: var(--rule);
  margin: 18px 0 0;
}
.masthead-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  flex-wrap: wrap;
  padding: 16px 0 0;
}
.masthead-counts {
  font-size: 14px;
  color: var(--ink-2);
}
.masthead-counts b {
  color: var(--ink);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.linkbtn {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  font-weight: 600;
  color: var(--pine);
  cursor: pointer;
}
.linkbtn:hover {
  text-decoration: underline;
}

/* follow (the one free action) */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font: 600 14px/1 var(--sans);
  padding: 11px 16px;
  border-radius: var(--r);
  border: 1px solid transparent;
  transition:
    background 0.12s,
    color 0.12s,
    border-color 0.12s;
  text-decoration: none;
}
.btn:hover {
  text-decoration: none;
}
.btn-pine {
  background: var(--pine);
  color: var(--paper);
}
.btn-pine:hover {
  background: var(--pine-deep);
}
.btn-quiet {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.btn-quiet:hover {
  background: var(--ink);
  color: var(--paper);
}
.follow-note {
  flex-basis: 100%;
  font-size: 12.5px;
  color: var(--ink-3);
  margin: 0;
}

/* ---------- feed ---------- */
.feedbar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px 20px;
  flex-wrap: wrap;
  margin: 36px 0 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--rule);
}
.feedbar h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 26px;
  letter-spacing: -0.01em;
  margin: 0;
}
.feedbar .n {
  font-size: 13px;
  color: var(--ink-3);
  margin-left: 8px;
  font-weight: 500;
}
.ffilter {
  font: 500 13.5px var(--sans);
  color: var(--ink);
  padding: 8px 32px 8px 11px;
  border: 1px solid var(--rule);
  border-radius: var(--r);
  background: var(--card)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2355534B' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E")
    no-repeat right 11px center;
  appearance: none;
  cursor: pointer;
  max-width: 60vw;
}
.ffilter:focus {
  outline: none;
  border-color: var(--pine);
  box-shadow: 0 0 0 3px var(--pine-wash);
}

.feed {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: 16px;
  align-items: start;
}
.card {
  display: flex;
  flex-direction: column;
  gap: 9px;
  min-height: 100%;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--r);
  padding: 18px 18px 16px;
  color: var(--ink);
  text-decoration: none;
  transition:
    border-color 0.12s,
    transform 0.12s,
    box-shadow 0.12s;
}
.card:hover {
  text-decoration: none;
  border-color: var(--ink-3);
  transform: translateY(-1px);
  box-shadow: 0 10px 28px -22px rgba(0, 0, 0, 0.5);
}
.card.is-cancelled {
  border-style: dashed;
}
.card-top {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.card .kicker {
  color: var(--ink-3);
}
.card h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 21px;
  line-height: 1.22;
  letter-spacing: -0.01em;
  margin: 0;
  font-optical-sizing: auto;
}
.card.is-cancelled h3 {
  color: var(--ink-2);
}
.card .meta {
  font-size: 13px;
  color: var(--ink-2);
}
.card .meta b {
  color: var(--ink);
  font-weight: 600;
}
.card .sum {
  font-size: 14.5px;
  color: var(--ink-2);
  margin: 0;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card .go {
  margin-top: auto;
  padding-top: 4px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--pine);
}
.card.is-thin .go {
  padding-top: 0;
}
.tag {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 3px 7px;
  border-radius: 3px;
  background: var(--paper-2);
  color: var(--ink-2);
}
.tag-new {
  background: var(--pine-wash);
  color: var(--pine-ink);
}
.tag-agenda {
  background: var(--pine-wash);
  color: var(--pine-ink);
}
.tag-urgent {
  background: var(--amber-wash);
  color: var(--amber);
}
.tag-cancelled {
  background: var(--red-wash);
  color: var(--red);
}
.tag-updated {
  background: var(--paper-2);
  color: var(--ink-2);
}
.tag-pending {
  background: var(--paper-2);
  color: var(--ink-2);
  border: 1px dashed var(--ink-2);
}
.empty {
  padding: 34px 20px;
  text-align: center;
  color: var(--ink-2);
  border: 1px dashed var(--rule);
  border-radius: var(--r);
  font-size: 15px;
}
.quiet {
  color: var(--ink-2);
  font-size: 15.5px;
  margin: 6px 0 0;
  max-width: 56ch;
}
.more {
  text-align: center;
  margin: 22px 0 0;
}

/* past list (city page) */
.plist {
  border-top: 1px solid var(--rule);
}
.prow {
  display: grid;
  grid-template-columns: 136px 1fr;
  gap: 6px 18px;
  padding: 13px 4px;
  border-bottom: 1px solid var(--rule-2);
  color: var(--ink);
  text-decoration: none;
  align-items: start;
}
.prow:hover {
  background: var(--paper-2);
  text-decoration: none;
}
.prow-date {
  font-size: 13px;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
  padding-top: 3px;
  white-space: nowrap;
}
.prow-main {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.prow-head {
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.28;
  font-weight: 500;
}
.prow-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: var(--ink-3);
}

/* not covered */
.nocov {
  max-width: 640px;
  padding: 30px 0 10px;
}
.nocov h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 26px;
  margin: 0 0 8px;
}
.nocov p {
  color: var(--ink-2);
  margin: 0 0 18px;
}
.nocov .btn {
  margin-right: 8px;
  margin-bottom: 8px;
}
.places {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
}
.places li {
  border-bottom: 1px solid var(--rule-2);
}
.places a {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  min-height: 44px;
  padding: 11px 0;
  color: var(--ink);
  text-decoration: none;
}
.places-n {
  font-weight: 600;
  font-size: 15.5px;
}
.places-m {
  font-size: 13px;
  color: var(--ink-3);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.places a:hover .places-n,
.places a:focus-visible .places-n {
  color: var(--pine);
  text-decoration: underline;
  text-underline-offset: 3px;
}
@media (min-width: 640px) {
  .places {
    grid-template-columns: 1fr 1fr;
    column-gap: 40px;
  }
}

/* ---------- MEETING (the story) ---------- */
.story {
  max-width: 760px;
  padding-top: 26px;
  padding-bottom: 40px;
}
.back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-2);
  margin-bottom: 22px;
}
.back:hover {
  color: var(--pine);
  text-decoration: none;
}
.story .kicker {
  margin-bottom: 10px;
}
.story h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(30px, 4.6vw, 42px);
  line-height: 1.1;
  letter-spacing: -0.015em;
  margin: 0 0 10px;
  font-optical-sizing: auto;
}
.story .sub {
  font-size: 16px;
  color: var(--ink-2);
  margin: 0 0 18px;
}
.story .flags {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin: 0 0 20px;
}
.docs {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 14px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.docs .lbl {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-right: 4px;
}
.doclink {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--pine-ink);
  background: var(--pine-wash);
  padding: 8px 12px;
  border-radius: var(--r);
  text-decoration: none;
}
.doclink:hover {
  background: var(--pine);
  color: var(--paper);
  text-decoration: none;
}
.doclink.ext {
  background: transparent;
  border: 1px solid var(--rule);
  color: var(--ink-2);
}
.doclink.ext:hover {
  border-color: var(--ink);
  color: var(--ink);
  background: transparent;
}
.prose {
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  max-width: 68ch;
}
.prose p {
  margin: 0 0 12px;
}
.by {
  display: block;
  font-size: 12.5px;
  color: var(--ink-3);
  font-style: italic;
  margin-top: 6px;
}
.decisions {
  list-style: none;
  padding: 0;
  margin: 10px 0 0;
}
.decisions li {
  position: relative;
  padding: 9px 0 9px 26px;
  border-bottom: 1px solid var(--rule-2);
  font-size: 15px;
  line-height: 1.5;
}
.decisions li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 15px;
  width: 10px;
  height: 6px;
  border-left: 2px solid var(--pine);
  border-bottom: 2px solid var(--pine);
  transform: rotate(-45deg);
}
.items {
  list-style: none;
  padding: 0;
  margin: 0;
}
.items li {
  padding: 8px 0 8px 16px;
  border-bottom: 1px solid var(--rule-2);
  font-size: 15px;
  position: relative;
}
.items li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 17px;
  width: 5px;
  height: 5px;
  background: var(--ink-3);
  border-radius: 1px;
}
.docgroup {
  margin: 0 0 14px;
}
.docgroup-item {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-2);
  margin-bottom: 6px;
}
.docgroup-files {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.docgroup-files .doclink {
  font-size: 12.5px;
  padding: 6px 10px;
  background: var(--paper-2);
  color: var(--ink-2);
}
.docgroup-files .doclink:hover {
  background: var(--pine);
  color: var(--paper);
}

/* step through this body's other meetings */
.seq {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: stretch;
  margin: 0 0 18px;
  border: 1px solid var(--rule);
  border-radius: var(--r);
  background: var(--card);
}
.seq > a:first-child,
.seq > .end:first-child {
  border-radius: var(--r) 0 0 var(--r);
}
.seq > .next {
  border-radius: 0 var(--r) var(--r) 0;
}
.seq a,
.seq .end {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 11px 14px;
  color: var(--ink);
  text-decoration: none;
  min-width: 0;
}
.seq a:hover {
  background: var(--pine-wash);
  text-decoration: none;
}
.seq .next {
  text-align: right;
  align-items: flex-end;
}
.seq .end {
  color: var(--ink-3);
}
.seq .dir {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.seq .end .dir {
  color: var(--ink-3);
}
.seq .when {
  font-size: 13.5px;
  font-weight: 600;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
}
.seq .mid {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  font-size: 11.5px;
  color: var(--ink-3);
  border-left: 1px solid var(--rule);
  border-right: 1px solid var(--rule);
  text-align: center;
  white-space: nowrap;
}

/* ---------- how it works (home, below the feed) ---------- */
.about {
  margin-top: 56px;
  margin-bottom: 10px;
  padding-top: 34px;
  padding-bottom: 6px;
  border-top: 1px solid var(--rule);
}
.about h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 26px;
  margin: 0 0 18px;
  letter-spacing: -0.01em;
}
.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 26px;
}
.about h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 20px;
  margin: 0 0 6px;
}
.about p {
  margin: 0;
  color: var(--ink-2);
  font-size: 14.5px;
}
.about .cell {
  border-top: 2px solid var(--pine);
  padding-top: 12px;
}

/* ---------- company page ---------- */
.company-about {
  max-width: 780px;
  padding-top: 52px;
  padding-bottom: 16px;
}
.company-about h1 {
  font-family: var(--serif);
  font-size: clamp(34px, 6vw, 52px);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.025em;
  margin: 12px 0 24px;
}
.company-about h2 {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 500;
  line-height: 1.2;
  margin: 36px 0 14px;
}
.company-about p {
  color: var(--ink-2);
  margin: 0 0 18px;
  overflow-wrap: anywhere;
}
.company-about .company-lede {
  font-size: 21px;
  color: var(--ink);
}
.company-about p a {
  text-decoration: underline;
  text-underline-offset: 0.15em;
}
.company-about .btn {
  /* Keep text and background in sync when switching appearance. */
  transition: transform 0.15s;
  margin-top: 12px;
}

/* ---------- footer ---------- */
.foot {
  border-top: 1px solid var(--rule);
  margin-top: 48px;
  padding: 22px 0 30px;
}
.foot-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px 24px;
  flex-wrap: wrap;
}
.foot-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}
.foot-nav a {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-2);
}
.foot-nav a:hover {
  color: var(--pine);
  text-decoration: none;
}
.foot-note {
  font-size: 13px;
  color: var(--ink-3);
}

/* ---------- responsive ---------- */
@media (max-width: 720px) {
  .top-row {
    gap: 12px;
  }
  .top-search {
    max-width: none;
  }
  .hero {
    padding: 36px 0 0;
  }
  .home-feed .ffilter {
    width: 100%;
  }
  .masthead {
    padding-top: 30px;
  }
  .feedbar .n {
    display: block;
    margin: 4px 0 0;
  }
  .ffilter {
    max-width: 100%;
  }
  .seq {
    grid-template-columns: 1fr 1fr;
  }
  .seq .mid {
    grid-column: 1 / -1;
    order: 3;
    border: 0;
    border-top: 1px solid var(--rule);
    padding: 7px 12px;
  }
  .prow {
    grid-template-columns: 1fr;
    gap: 3px;
  }
  .prow-date {
    order: 2;
    padding-top: 0;
  }
}
@media (max-width: 480px) {
  .brand img {
    height: 22px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .hero-in {
    animation: none;
  }
  .card,
  .card:hover {
    transform: none;
    transition: none;
  }
  * {
    scroll-behavior: auto !important;
  }
}
/* the wordmark is black ink; in dark themes invert it. Driven by the same
   token blocks as everything else, so an explicit data-theme wins over the OS. */
.logo {
  filter: var(--logo-filter, none);
}
/* the place in a story's kicker is a link to that place's page */
.kicker-place {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--rule);
  text-underline-offset: 3px;
}
.kicker-place:hover {
  color: var(--pine);
  text-decoration-color: var(--pine);
}

/* ---------- theme switch (top bar) ---------- */
.themebtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin-left: auto;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink-2);
  cursor: pointer;
}
.themebtn:hover {
  color: var(--ink);
  border-color: var(--rule);
  background: var(--paper-2);
}
.themebtn svg {
  display: none;
}

/* ---------- jump list on the story strip ---------- */
.seq {
  position: relative;
}
.seq .mid {
  appearance: none;
  background: transparent;
  border: 0;
  border-left: 1px solid var(--rule);
  border-right: 1px solid var(--rule);
  font: inherit;
  font-size: 11.5px;
  color: var(--ink-2);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 14px;
  white-space: normal;
  min-width: 0;
  line-height: 1.4;
  border-radius: 0;
}
.seq .mid:hover {
  background: var(--paper-2);
  color: var(--ink);
}
.seq .mid[aria-expanded="true"] {
  background: var(--paper-2);
  color: var(--ink);
}
.seq .mid[aria-expanded="true"] svg {
  transform: rotate(180deg);
}
.seq .mid svg {
  flex-shrink: 0;
  transition: transform 0.15s;
  color: var(--ink-3);
}
.seq-list {
  position: absolute;
  z-index: 50;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: min(60vh, 520px);
  overflow-y: auto;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--r);
  box-shadow: 0 22px 60px -28px rgba(0, 0, 0, 0.5);
}
.seq-group {
  position: sticky;
  top: 0;
  background: var(--card);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding: 10px 14px 6px;
  border-bottom: 1px solid var(--rule-2);
}
.seq-item {
  display: grid;
  grid-template-columns: 124px 1fr;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--rule-2);
  color: var(--ink);
  text-decoration: none;
  align-items: start;
}
.seq-item:last-child {
  border-bottom: 0;
}
.seq-item:hover {
  background: var(--paper-2);
  text-decoration: none;
}
.seq-item.here {
  background: var(--pine-wash);
}
.seq-date {
  font-size: 12.5px;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
  line-height: 1.35;
  padding-top: 1px;
}
.seq-date small {
  font-size: 11.5px;
}
.seq-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.seq-head {
  font-family: var(--serif);
  font-size: 15.5px;
  line-height: 1.3;
  font-weight: 500;
}
.seq-body {
  font-size: 12px;
  color: var(--ink-3);
}
.seq-here {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--pine-ink);
  margin-top: 2px;
}
@media (max-width: 720px) {
  .seq .mid {
    grid-column: 1 / -1;
    order: 3;
    border: 0;
    border-top: 1px solid var(--rule);
    padding: 9px 12px;
    justify-content: center;
  }
  .seq-item {
    grid-template-columns: 1fr;
    gap: 2px;
  }
  .seq-date {
    order: 2;
  }
}
@media (max-width: 480px) {
  .themebtn {
    margin-left: 0;
  }
}

/* ---------- appearance menu ---------- */
.theme {
  flex-shrink: 0;
  position: relative;
  margin-left: auto;
}
.themebtn {
  margin-left: 0;
}
.themebtn[data-scheme="light"] .ic-light,
.themebtn[data-scheme="dark"] .ic-dark {
  display: block;
}
.thememenu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 70;
  min-width: 232px;
  padding: 6px;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 8px;
  box-shadow: 0 18px 50px -24px rgba(0, 0, 0, 0.5);
}
.thememenu-title {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding: 8px 10px 6px;
}
.thememenu [data-theme-choice] {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  width: 100%;
  text-align: left;
  padding: 9px 34px 9px 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  font: 500 14px/1.3 var(--sans);
  cursor: pointer;
  position: relative;
}
.thememenu [data-theme-choice] small {
  font-size: 12px;
  color: var(--ink-3);
  font-weight: 400;
}
.thememenu [data-theme-choice]:hover,
.thememenu [data-theme-choice]:focus-visible {
  background: var(--paper-2);
  outline: none;
}
.thememenu [data-theme-choice].on {
  color: var(--pine-ink);
}
.thememenu [data-theme-choice].on::after {
  content: "";
  position: absolute;
  right: 12px;
  top: 14px;
  width: 9px;
  height: 5px;
  border-left: 2px solid var(--pine);
  border-bottom: 2px solid var(--pine);
  transform: rotate(-45deg);
}

/* focus moves to the page heading after navigation (screen readers announce it); no ring on it */
h1[tabindex="-1"]:focus {
  outline: none;
}
/* comfortable touch targets */
@media (pointer: coarse) {
  .doclink,
  .linkbtn,
  .seq .mid,
  .ffilter {
    min-height: 40px;
  }
}

/* Loading and reading states reserve room and keep navigation visible. */
.home-loading,
:root[data-home-startup] #startup .loading-view {
  display: none;
}
:root[data-home-startup] .home-loading {
  display: block;
  min-height: calc(100dvh - 58px);
}
.pending-count {
  visibility: hidden;
}
.loading-status {
  color: var(--ink-3);
  font-size: 13.5px;
  animation: show-loading 0s 1s both;
}
@keyframes show-loading {
  from {
    visibility: hidden;
  }
  to {
    visibility: visible;
  }
}
.loading-view,
.story.is-loading {
  min-height: calc(100dvh - 58px);
  padding-top: 54px;
}
.loading-view h1 {
  font: 500 24px/1.3 var(--serif);
  max-width: 28ch;
}
.archive-loading {
  min-height: calc(100dvh - 58px);
}
.past-heading {
  margin-top: 44px;
}
#about,
#main,
h1 {
  scroll-margin-top: 76px;
}
.card,
.prow,
.prose,
.seq-head {
  overflow-wrap: anywhere;
}
.seq .mid {
  white-space: normal;
}
@media (max-width: 480px) {
  .top-row {
    gap: 8px;
  }
  .brand {
    flex-shrink: 0;
  }
  .brand img {
    width: 104px;
    height: auto;
  }
  .top-search {
    margin-left: 0;
  }
  .cp-opt {
    flex-wrap: wrap;
    gap: 2px;
  }
  .cp-meta {
    white-space: normal;
  }
}
@media (pointer: coarse) {
  .themebtn,
  .doclink,
  .linkbtn,
  .seq .mid,
  .ffilter {
    min-height: 44px;
  }
  .themebtn {
    min-width: 44px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
@media (forced-colors: active) {
  .card,
  .cp-panel,
  .thememenu,
  .seq {
    border: 1px solid CanvasText;
  }
  .cp-opt.on,
  .seq-item.here {
    outline: 2px solid Highlight;
    outline-offset: -2px;
  }
  :focus-visible {
    outline: 2px solid Highlight;
  }
  .logo {
    filter: none;
    background: white;
  }
}
