/* The Sod Father -- a golf media site built around the same "card that opens
   into more detail" idea as Dony's map cards, minus the map. Palette is
   fairway green + cream + a small gold accent instead of Dony's green/white,
   so the two projects don't feel like reskins of each other. */

:root {
  /* --ink softened from a near-black #1b2a1f -- pure near-black text on a
     light cream background is technically high-contrast but reads as
     harsh/glare-y over a long article; this keeps the same warm
     green-black character at a gentler value, closer to how ink actually
     looks on paper than how it looks on a screen. */
  --ink: #2b362f;
  --ink-soft: rgba(43, 54, 47, 0.78);
  --ink-faint: rgba(43, 54, 47, 0.64);
  --cream: #faf6ec;
  --cream-deep: #f1ead8;
  --line: rgba(27, 42, 31, 0.1);
  --fairway: #2f5e3a;
  --fairway-deep: #1f4128;
  --gold: #b8860b;
  --font-serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-sans: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  /* Article body text: Newsreader. Previous choices: "IBM Plex Serif",
     Georgia, serif / Nunito Sans ("Nunito Sans", -apple-system,
     "Segoe UI", sans-serif) / "Source Serif 4", Georgia, serif */
  --font-body: Newsreader, Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-sans);
  background: #fff;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

/* ── Header ──
   Slim single-row bar: the brand at the far left and the account avatar at
   the right; the category row sits underneath. padding-top here
   uses the same env(safe-area-inset-top) pattern the article sheet uses
   for the bottom safe area, so the bar grows to clear the notch/status
   bar in the native app (falls back to 0, so it's a no-op on the web).
   env(safe-area-inset-top) only reports a real value when the page's
   viewport meta tag includes viewport-fit=cover (see base.html) -- without
   it WKWebView always reports 0, which is why this padding alone wasn't
   enough before. max(...) also guarantees at least 20px of clearance even
   on a device that reports a tiny or zero inset. */
.site-header {
  background: #fff;
  border-bottom: 1px solid #e9ece9; /* light rule under the white category bar */
  position: relative; /* scrolls away; the .popbar takes over after 150px */
  z-index: 10;
  padding-top: max(env(safe-area-inset-top), 20px);
}
.site-header__inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 6px 16px 8px;
  /* Two columns: brand at the far left | avatar at the right. */
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}
.site-header__inner > .user-menu { justify-self: end; }
.site-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: #1b2a1f;
  font-family: var(--font-serif);
  font-weight: 800;
  font-size: 32px;
  line-height: 1.1;
  letter-spacing: 0.01em;
  min-width: 0;
  justify-content: flex-start;
  justify-self: start;
}
@media (min-width: 700px) { .site-brand { font-size: 44px; } }
.site-brand__mark { font-size: 20px; flex-shrink: 0; }
.site-brand__slashes { color: var(--gold, #b8860b); margin-right: 0.02em; }
/* LocalLane wordmark: "Lane" in matcha (deeper on light, true matcha on dark) */
.brand-lane { color: #5e9a4c; }
.is-dark .brand-lane, .admin-header .brand-lane { color: #9cc77f; }
.site-brand__text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Pages with their own top bar (the stories page's city search, base.html adds .has-bar):
   no wordmark. On phones the whole brand row goes (the ask button and avatar are hidden
   there anyway), so the search bar sits right under the status bar. */
.site-header.has-bar .site-brand { display: none; }
@media (max-width: 699.98px) {
  .site-header.has-bar .site-header__inner { display: none; }
  .site-header.has-bar .citybar { padding-top: 8px; }
}

/* ── Category chip bar ──
   The same categories as the hamburger drawer, as a horizontally scrolling
   row under the brand bar (inside .site-header, so it's sticky with it).
   White strip, no pills: each category is plain text in the serif face
   with a thin vertical rule on its left to separate it from the previous
   one (the first item has no rule). The active category is dark green with
   a gold underline. Scrollbar hidden -- it's a swipe row on touch -- and the
   right edge fades to white as a hint that there's more off-screen.
   position:relative on the scroller makes each item's offsetLeft relative
   to it, which the "scroll the active chip into view" script in base.html
   relies on. (Class names still say "chip" so the script/markup didn't change.) */
.category-bar {
  background: #fff;
}
.category-bar__scroll {
  position: relative;
  display: flex;
  align-items: center;
  max-width: 1080px;
  margin: 0 auto;
  padding: 10px 32px 10px 16px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent);
  mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent);
}
.category-bar__scroll::-webkit-scrollbar { display: none; }
.category-bar__chip {
  flex: 0 0 auto;
  text-decoration: none;
  white-space: nowrap;
  color: var(--ink-soft);
  font-family: var(--font-serif);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.2;
  padding: 4px 16px;
}
/* Each tab is an "item": the tab link, plus a small arrow button when the
   category has subcategories. The thin rule between tabs sits on the item. */
.category-bar__item {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  border-left: 1px solid rgba(27, 42, 31, 0.22);
}
.category-bar__item:first-child { border-left: none; }
.category-bar__item:first-child .category-bar__chip { padding-left: 0; }
.category-bar__chip:hover { color: var(--fairway-deep); }
.category-bar__chip.is-active {
  color: var(--fairway-deep);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: var(--gold);
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}

/* ── Hero ── */
.site-main { max-width: 1080px; margin: 0 auto; padding: 25px 20px 60px; }
.hero { padding: 28px 0 20px; }
.hero__title {
  font-family: var(--font-serif);
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin: 0 0 8px;
  color: var(--fairway-deep);
}
.hero__sub {
  font-size: 15px;
  color: var(--ink-soft);
  margin: 0;
}
.hero__sub a { color: var(--fairway); font-weight: 700; text-decoration: none; }
.hero__sub a:hover { text-decoration: underline; }

/* ── Hero story ──
   The homepage's featured story/stories (picked by hand in the admin
   portal, not ranked automatically -- see content.py's get_featured).
   No card: no box, no shadow, no white background -- same shared page
   background as everything else, matching the plain bordered-list look
   used below. Still reads as "the big story" because the image and
   headline are simply bigger, and a hairline border-bottom gives each
   one (and the handoff into the regular list) a comfortable, clearly
   separated gap, the same device .story-row uses between its own rows. */
.hero-story {
  display: block;
  text-decoration: none;
  color: inherit;
  padding-bottom: 28px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--line);
}
.hero-story__media {
  position: relative;
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0px;
  overflow: hidden;
  /* Image now sits between the title/dek above it and the byline below
     it (Danny: title, subheader, image, [caption], then author line) --
     margin on both sides instead of just below, since it's no longer
     the first thing in the card. */
  margin: 16px 0;
}
.hero-story__emoji { font-size: 64px; opacity: 0.9; }
.hero-story__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0) 60%, rgba(0,0,0,0.15) 100%);
}
.hero-story__content { background: transparent; }
.hero-story__pill {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--fairway-deep);
  background: rgba(47, 94, 58,0.1);
  border-radius: 7px;
  padding: 4px 9px;
  margin-bottom: 12px;
}
.hero-story__title {
  font-family: var(--font-serif);
  font-size: 30px;
  font-weight: 700;
  line-height: 1.22;
  letter-spacing: -0.005em;
  color: var(--fairway-deep);
  margin: 0 0 8px;
}
.hero-story:hover .hero-story__title { color: var(--fairway); }
.hero-story__dek {
  font-size: 16px;
  color: var(--ink-soft);
  line-height: 1.45;
  margin: 0;
}
/* Byline row: author photo + name/position/date, now its own block below
   the image rather than a plain text line inside .hero-story__content. */
.hero-story__byline {
  display: flex;
  align-items: center;
  gap: 8px;
}
.hero-story__byline-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.hero-story__meta {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink-faint);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin: 0;
}
@media (min-width: 640px) {
  .hero-story__title { font-size: 45px; }
}
@media (max-width: 420px) {
  .hero-story__title { font-size: 32px; }
}

/* ── Story list ──
   A single continuous list, divided by hairline borders rather than
   individual cards -- no boxes, no shadows, one shared page background,
   closer to how The Atlantic or the NYT lay out a list of stories. Each
   row is text (pill/title/meta) with an optional small thumbnail on the
   side when the story has a cover photo; a story with no photo just
   leaves that side empty rather than showing any placeholder. */
.story-list {
  display: flex;
  flex-direction: column;
  max-width: 720px;
  margin: 0 auto;
}
.story-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
}
.story-list > .story-row:first-child { padding-top: 0; }
.story-list > .story-row:last-child { border-bottom: none; }
.story-row__body { flex: 1; min-width: 0; }
.story-row__pill {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--fairway-deep);
  background: rgba(47, 94, 58,0.1);
  border-radius: 6px;
  padding: 3px 8px;
  margin-bottom: 8px;
}
.story-row__title {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.28;
  letter-spacing: -0.005em;
  color: var(--fairway-deep);
  margin: 0 0 5px;
}
.story-row:hover .story-row__title { color: var(--fairway); }
.story-row__meta {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-faint);
  margin: 0;
}
.story-row__thumb {
  flex-shrink: 0;
  width: 92px;
  height: 92px;
  border-radius: 8px;
  background-color: var(--cream-deep);
}
@media (max-width: 420px) {
  .story-row__thumb { width: 72px; height: 72px; }
  .story-row__title { font-size: 16.5px; }
}

/* Slightly smaller heading for the compact "Read next" list at the
   bottom of an article -- same markup, just a lower-emphasis variant. */
.story-list--compact .story-row { padding: 12px 0; gap: 12px; }
.story-list--compact .story-row__title { font-size: 16px; }
.story-list--compact .story-row__thumb { width: 72px; height: 72px; }

.empty-state {
  color: var(--ink-faint);
  font-size: 14px;
  padding: 30px 0;
}

/* ── Article page ──
   Order is title/dek, then the hero photo, then the byline -- .article__header
   carries the top padding (breathing room from the site header) since it's
   always first now, whether or not the story has a cover photo. A story
   with no cover photo just skips .article__hero entirely (no markup at
   all, not even a colored placeholder); .article__body no longer needs
   its own top padding to compensate since .article__header already
   provides it either way. */
.article { max-width: 720px; margin: 0 auto; }
.article__header { padding: 22px 4px 0; }
.article__hero {
  aspect-ratio: 21 / 9;
  border-radius: 20px;
  margin: 16px 0 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.article__hero-emoji { font-size: 64px; opacity: 0.92; }

.article__body { padding: 0 4px 10px; }
.article__pill {
  display: inline-block;
  text-decoration: none;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--fairway-deep);
  background: rgba(47, 94, 58,0.1);
  border-radius: 7px;
  padding: 4px 9px;
  margin-bottom: 12px;
}
.article__title {
  font-family: var(--font-serif);
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.18;
  margin: 0 0 8px;
  color: var(--fairway-deep);
}
.article__dek {
  font-size: 17px;
  color: var(--ink-soft);
  line-height: 1.45;
  margin: 0 0 12px;
}
.article__byline {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.article__avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.article__meta {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink-faint);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin: 0;
}
.article__content p {
  /* Matches a reference style you pasted from another site's inspector --
     translated onto our own variables since --color-inkBase,
     --article-font-family etc. don't exist here (they'd just be invalid,
     silently falling back to inherited values). The font-size/line-height
     math (18px text, 28px line box) and the em-based margin and
     word-wrap come across as-is; direction: ltr isn't meaningful for an
     English-only site so it's left out. */
  color: var(--ink);
  font-family: var(--font-1),-apple-system,Arial,Helvetica,Roboto,system-ui,sans-serif;
  font-size: calc(18px * var(--read-scale, 1));
  font-weight: 400;
  line-height: 1.86;
  line-height: calc(30 / 18);
  margin: 0 0 1em 0;
  word-wrap: break-word;
}
.article__back {
  display: inline-block;
  margin-top: 10px;
  font-size: 14px;
  font-weight: 700;
  color: var(--fairway);
  text-decoration: none;
}
.article__back:hover { text-decoration: underline; }

/* ── Author sign-off ──
   A second, bigger author credit after the story text -- the small byline
   up top (name/date/read time) is for context before you start reading;
   this is a sign-off once you're done, so the name reads on its own,
   bolder, with no date/read-time clutering it up. The photo is now a
   circular avatar sitting right next to the name (like the small byline
   avatar up top, just bigger), not the full-bleed rectangle this used to
   be -- Danny asked to bring the photo in closer to the text and make it
   circular. Being a fixed-size circle, it no longer needs to track the
   card's own height (see base.html -- the old syncAuthorCardPhoto JS
   pixel-height fallback was only for the old edge-to-edge rectangle and
   has been removed, since forcing a fixed-width circle to match the
   card's height would just squash it into an oval).
   display:flex + gap is what brings the photo in close to the text --
   the old layout pinned the photo to the card's far right edge via
   absolute positioning, which left a big stretch of empty space between
   a short name and the photo on a wide card.
   The card's own left/right edges line up exactly with the article text
   column above it (no bleed past .article__body's padding on either
   side) -- it used to carry negative left/right margins that let it
   extend wider than the paragraph text, which read as off-center
   against the text above it. */
/* Sign-off card at the end of a story. Same layout and measurements as the
   name tag that slides up from the bottom: name on the left, the photo
   exactly in the middle, brand on the right, 20px of padding on both
   sides and a 14px gap. */
.article__author-card {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 14px;
  margin: 28px 0 0 0;
  padding: 12px 20px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.article__author-card--no-photo { grid-template-columns: 1fr 1fr; }
.article__author-card-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 2px 10px rgba(43, 54, 47, 0.18);
}
.article__author-card-info {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
}
.article__author-card-label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-faint);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  white-space: nowrap;
}
.article__author-card-name {
  font-size: 13px;
  font-weight: 800;
  color: var(--ink);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  white-space: nowrap;
}
/* Fills the stretch of empty space the card gained once the photo became
   a small circle instead of a full-height rectangle -- a little
   masthead credit, right-aligned so it sits flush with the card's own
   right edge the same way the photo used to. margin-left:auto is what
   pushes it over there: info + avatar stay grouped on the left, this
   soaks up whatever space is left over. No author_position set on the
   story -> just the brand name shows, no empty second line. */
.article__author-card-masthead {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  padding: 0;
  margin: 0;
}
.article__author-card-masthead-brand {
  font-size: 13px;
  font-weight: 800;
  color: var(--fairway-deep);
  font-family: var(--font-serif);
  white-space: nowrap;
}
.article__author-card-masthead-position {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-faint);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

/* ── Sticky author bar ──
   A condensed stand-in for the byline (avatar + name/position/date) that
   locks to the top of the screen while the reader is 100-400px into the
   article -- past where the real byline has scrolled out of view, but
   before they're deep enough into the piece for a reminder of who wrote
   it to stop being useful. It's a separate element toggled by JS (see
   base.html), not the real byline itself going position:fixed, so
   showing/hiding it never shifts the rest of the page. */
.article__sticky-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  max-width: 720px;
  margin: 0 auto;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  box-shadow: 0 2px 10px rgba(27, 42, 31, 0.08);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-100%);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.article__sticky-bar.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
/* The site header is also fixed/sticky at the top, and its height (which
   includes env(safe-area-inset-top)) doesn't reliably match this bar's --
   rather than try to match it, just hide the header underneath instead of
   trusting this bar to fully cover it. visibility (not display) keeps its
   layout space reserved so nothing else on the page reflows. */
body.has-sticky-author-bar .site-header { visibility: hidden; }
.article-sticky-bar__avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

/* Same idea, scoped to the inline article sheet. .article-sheet is
   already position:relative, so position:absolute here stays within the
   sheet's own bounds (not the full viewport) on both the full-bleed
   mobile layout and the centered desktop one, and ignores the sheet's
   own internal scroll the same way .article-sheet__close already does.
   Padding-right clears the close button; border-radius:inherit picks up
   the sheet's own rounded top corners since this sits flush against
   them. */
.article-sheet__sticky-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 60px 14px 20px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  border-top-left-radius: inherit;
  border-top-right-radius: inherit;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.article-sheet__sticky-bar.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* ── Story blocks ──
   Stories are built in the admin portal as a sequence of typed blocks
   (paragraph/photo/quote/subheading/embed) in whatever order the writer
   put them in -- see templates/article.html and base.html's renderSheet.
   .article__content p (above) still styles plain paragraph text; these
   cover the other block types, and are written to come after it in this
   file so a quote's own <p> styling wins over the generic one. */
.article__subheading {
  font-family: var(--font-serif);
  font-size: calc(21px * var(--read-scale, 1));
  font-weight: 700;
  letter-spacing: -0.005em;
  color: var(--fairway-deep);
  margin: 26px 0 12px;
}
.article__quote {
  margin: 20px 0;
  padding: 2px 0 2px 18px;
  border-left: 3px solid var(--gold);
}
.article__quote p {
  font-family: var(--font-serif);
  font-size: calc(19px * var(--read-scale, 1));
  font-style: italic;
  line-height: 1.45;
  color: var(--fairway-deep);
  margin: 0 0 6px;
}
.article__quote cite {
  font-style: normal;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-faint);
}
.article__photo { margin: 20px 0; }
.article__photo img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 14px;
  box-shadow: 0 2px 14px rgba(27, 42, 31,0.14);
}
.article__photo figcaption {
  font-size: 13.5px;
  color: var(--ink-faint);
  margin-top: 8px;
  line-height: 1.45;
}
.article__embed { margin: 20px 0; }
.article__embed iframe, .article__embed img, .article__embed video { max-width: 100%; }

/* ── Related ── */
.related { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line); }
.related__title {
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--ink-faint);
  margin: 0 0 16px;
}

/* ── Footer ── */
.site-footer {
  text-align: center;
  padding: 30px 20px 50px;
  color: var(--ink-faint);
  font-size: 12.5px;
}

/* ── Article sheet (card popping up over the page) ──
   Structure mirrors the proven pattern from the Discover map panel on the
   other app: the close button is a sibling of the scrolling wrapper (both
   children of a flex column), never a descendant of it, so it stays pinned
   in place no matter how far the article is scrolled. */
.article-sheet-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  /* display: none (the old approach) can't be transitioned -- the browser
     has no "before" frame to animate from, so the sheet would just pop
     open instantly no matter what transition the children declared.
     visibility + opacity keeps the element in the render tree (so its
     starting transform actually gets painted) while still removing it
     from layout/hit-testing/tab order when closed; the transition-delay
     on visibility defers that removal until the fade-out has finished. */
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0s linear 0.25s;
}
.article-sheet-overlay.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 0.25s ease, visibility 0s linear 0s;
}

.article-sheet-overlay__scrim {
  position: absolute;
  inset: 0;
  background: rgba(27, 42, 31, 0);
  transition: background 0.3s ease;
}
.article-sheet-overlay.is-open .article-sheet-overlay__scrim {
  background: rgba(27, 42, 31, 0.55);
}

.article-sheet {
  position: relative;
  width: 100%;
  max-width: 720px;
  max-height: 90vh;
  background: #fff;
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -8px 32px rgba(27, 42, 31, 0.3);
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.article-sheet-overlay.is-open .article-sheet { transform: translateY(0); }

/* Travel map stories on a phone: the pop-up card holds the story's own page
   (/article/<slug>?in=sheet, see openSheet in base.html), almost full height
   so the map behind the story has room. */
.article-sheet__frame { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; border: 0; border-radius: inherit;
  background: #fff; opacity: 0; transition: opacity 0.2s ease; }
.article-sheet-overlay.frame-ready .article-sheet__frame { opacity: 1; }
.article-sheet-overlay.is-framed .article-sheet__frame { z-index: 3; }
.article-sheet-overlay.is-framed .article-sheet__close { z-index: 4; }
.article-sheet-overlay.frame-ready .article-sheet__scroll { visibility: hidden; }   /* the quick preview underneath */
.article-sheet-overlay.is-framed .article-sheet { height: calc(100vh - env(safe-area-inset-top, 0px) - 10px);
  height: calc(100dvh - env(safe-area-inset-top, 0px) - 10px); max-height: none; overflow: hidden; }
.article-sheet-overlay.is-framed .article-sheet__sticky-bar, .article-sheet-overlay.is-framed .article-sheet__author-pop { display: none; }
.article-sheet-overlay.frame-map-open .article-sheet__close { opacity: 0; pointer-events: none; }
.is-dark .article-sheet__frame { background: #131a15; }
/* ...and that page, inside the card: just the story. */
html.in-sheet .site-header, html.in-sheet .popbar, html.in-sheet .site-footer, html.in-sheet .bottom-nav,
html.in-sheet .nl-popup { display: none !important; }
html.in-sheet body { padding-bottom: 0; }
/* No footer inside the card, so leave room for the "Written by" bar fixed along the bottom. */
html.in-sheet body.article-page .article { padding-bottom: calc(170px + env(safe-area-inset-bottom, 0px)); }   /* beats the travel-map-story padding further down */
html.in-sheet .article__header { padding-top: 22px; }
@media (max-width: 640px) {
  /* The card already sits below the phone's status bar, so no notch room at the top
     (the iPhone still reports it inside the card). Room for the card's close button at the right. */
  html.in-sheet body.has-route .route-head { padding-top: 8px; }
  html.in-sheet body.has-route .route-head__nums { max-width: calc(100% - 96px); }
}

/* On screens 700px and wider the story opens as the right-hand page of a
   book instead (see "Two-page book layout" at the end of this file). */

.article-sheet__close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 999px;
  background: rgba(27, 42, 31, 0.55);
  color: #fff;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.article-sheet__close:hover { background: rgba(27, 42, 31, 0.75); }

.article-sheet__scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: inherit;
  /* Scrolling still works with wheel, trackpad, touch and keyboard; only
     the scrollbar itself is hidden. */
  scrollbar-width: none;
  -ms-overflow-style: none;
  /* Used to reserve env(safe-area-inset-bottom) (~34px on a Face ID
     iPhone) so content never sat directly under the home-indicator swipe
     bar in the native app, then a capped-down version of the same thing
     -- dropped entirely now (Danny: still a sliver of white space he
     wanted gone). Tradeoff: on a short article, the very bottom of the
     author card can now sit close to the swipe-gesture area in the
     native app. */
  padding-bottom: 0;
}
.article-sheet__scroll::-webkit-scrollbar { display: none; }

/* .article-sheet__header is now the first thing in the sheet (title/dek
   before the photo), so it's the one that needs the top padding/rounded-
   corner clearance the hero used to own when it sat flush against the
   sheet's top edge. */
.article-sheet__header { padding: 20px 14px 0; }

.article-sheet__hero {
  aspect-ratio: 21 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
  /* No longer flush against the sheet's own top edge (title/dek sit above
     it now), so it gets its own uniform rounding instead of inheriting
     and squaring off to match the sheet's shape. */
  border-radius: 0px;
  margin: 16px 14px 20px;
}
.article-sheet__hero-emoji { font-size: 56px; opacity: 0.92; }

/* Horizontal padding kept deliberately tight (vs. the old 22px) so the
   paragraph column stretches closer to the sheet's edges, the same way
   the full article page's own 4px gutter does. */
.article-sheet__body { padding: 0 14px; }

.article-sheet__readmore {
  display: inline-block;
  margin: 4px 0 24px;
  padding: 10px 18px;
  border: none;
  border-radius: 999px;
  background: var(--fairway);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
.article-sheet__readmore:hover { background: var(--fairway-deep); }

body.article-sheet-open { overflow: hidden; }

@media (max-width: 560px) {
  .article__title { font-size: 25px; }
  .article__dek { font-size: 15.5px; }
  /* .article__content p no longer shrinks here -- 18px is a fixed spec now,
     not a responsive one. */
  .article-sheet__header .article__title { font-size: 23px; }
}

/* ── Story actions: Save / Comment / Share ──
   A plain row of icon + label buttons (no pills, no boxes) under a story's
   byline -- on the home-page cards, inside the pop-up sheet, and on the
   article page. Icons are stroked outlines from the sprite at the top of
   base.html; a saved story fills its bookmark gold. The negative left
   margin lines the first icon up with the text edge above it (the button's
   own padding would otherwise indent it). Behaviour: static/js/actions.js. */
.story-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  margin: 10px 0 0 -10px;
}
.story-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 6px 10px;
  border: none;
  background: transparent;
  color: var(--ink-soft);
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.story-action:hover { color: var(--fairway-deep); }
.story-action__icon {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.story-action--text.is-active { color: var(--fairway-deep); }
.story-action--save.is-saved { color: var(--gold); }
.story-action--save.is-saved .story-action__icon { fill: currentColor; }
.story-action__count { font-variant-numeric: tabular-nums; }
.story-action__count:empty { display: none; }

/* List rows are smaller: icons only (the counts stay). */
.story-actions--compact { margin-top: 6px; }
.story-actions--compact .story-action { min-height: 36px; padding: 6px 10px 6px 10px; }
.story-actions--compact .story-action__label { display: none; }

/* In the article / sheet the row sits between the byline rule and the text. */
.article__byline + .story-actions { margin: -10px 0 14px -10px; }

/* ── Share menu (bottom sheet) ── */
.share-menu {
  position: fixed;
  inset: 0;
  z-index: 300;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.25s ease, visibility 0s linear 0.25s;
}
.share-menu.is-open { visibility: visible; opacity: 1; transition: opacity 0.25s ease; }
.share-menu__scrim { position: absolute; inset: 0; background: rgba(0,0,0,0.4); }
.share-menu__panel {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  max-width: 520px;
  margin: 0 auto;
  background: #fff;
  border-radius: 18px 18px 0 0;
  padding: 18px 18px calc(14px + env(safe-area-inset-bottom));
  transform: translateY(24px);
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.share-menu.is-open .share-menu__panel { transform: translateY(0); }
.share-menu__title {
  margin: 0 0 6px;
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 700;
  color: var(--fairway-deep);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.share-menu__item {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 14px 4px;
  border: none;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  text-align: left;
  cursor: pointer;
}
.share-menu__item[hidden] { display: none; }
.share-menu__item .story-action__icon { width: 22px; height: 22px; color: var(--fairway-deep); }
.share-menu__cancel {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 13px;
  border: none;
  border-radius: 12px;
  background: #f2f4f2;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}
@media (prefers-reduced-motion: reduce) {
  .share-menu, .share-menu__panel { transition-duration: 0.01s; }
}

/* ── Comments ── */
.comments { margin: 36px 0 24px; padding-top: 22px; border-top: 1px solid var(--line); }
.comments__title {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 700;
  color: var(--fairway-deep);
  margin: 0 0 14px;
}
.comments__count { font-family: var(--font-sans); font-size: 14px; font-weight: 600; color: var(--ink-faint); }
.comments__count:empty { display: none; }
.comments__list { list-style: none; margin: 0; padding: 0; }
.comments__list[data-empty="true"]::before {
  content: "No comments yet. Be the first.";
  display: block;
  padding: 4px 0 16px;
  color: var(--ink-soft);
  font-size: 15px;
}
.comments__loading { color: var(--ink-faint); font-size: 14px; margin: 0 0 12px; }
.comment { padding: 12px 0; border-bottom: 1px solid var(--line); }
.comment__head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.comment__name { font-weight: 800; font-size: 14.5px; color: var(--ink); }
.comment__time { font-size: 12.5px; color: var(--ink-faint); }
.comment__delete {
  margin-left: auto;
  border: none;
  background: transparent;
  padding: 2px 0;
  color: var(--ink-faint);
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
}
.comment__delete:hover { color: #a33; }
.comment__body {
  margin: 4px 0 0;
  font-size: 15.5px;
  line-height: 1.5;
  color: var(--ink);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.comments__compose { margin-top: 18px; }
.comments__as { display: block; font-size: 13px; color: var(--ink-soft); margin-bottom: 8px; }
.comments__form textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  border: 1px solid rgba(27, 42, 31, 0.22);
  border-radius: 10px;
  font-family: var(--font-sans);
  font-size: 16px; /* 16px stops iOS zooming into the field */
  line-height: 1.45;
  color: var(--ink);
  resize: vertical;
  background: #fff;
}
.comments__form textarea:focus { outline: 2px solid var(--fairway-deep); outline-offset: 1px; }
.comments__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; }
.comments__error { color: #a33; font-size: 13px; }
.comments__signin { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.comments__signin p { margin: 0; flex-basis: 100%; color: var(--ink-soft); font-size: 15px; }
.comments__alt { color: var(--fairway-deep); font-weight: 700; font-size: 14px; }

/* ── Account pages (sign in / create account / saved) ── */
.account-card { max-width: 420px; margin: 0 auto; padding: 36px 0 20px; }
.account-card__title {
  font-family: var(--font-serif);
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--fairway-deep);
  margin: 0 0 6px;
}
.account-card__sub { margin: 0 0 22px; color: var(--ink-soft); font-size: 16px; }
.account-card__foot { margin: 22px 0 0; color: var(--ink-soft); font-size: 15px; }
.account-card__foot a { color: var(--fairway-deep); font-weight: 700; }
.account-error {
  margin: 0 0 16px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #fbeeee;
  color: #8a2a2a;
  font-size: 14.5px;
}
.account-field { display: block; margin-bottom: 16px; }
.account-field > span { display: block; margin-bottom: 6px; font-size: 13.5px; font-weight: 800; color: var(--ink); }
.account-field em { font-style: normal; font-weight: 500; color: var(--ink-faint); margin-left: 4px; }
.account-field input {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  border: 1px solid rgba(27, 42, 31, 0.22);
  border-radius: 10px;
  font-family: var(--font-sans);
  font-size: 16px;
  color: var(--ink);
  background: #fff;
}
.account-field input:focus { outline: 2px solid var(--fairway-deep); outline-offset: 1px; }
.account-btn {
  display: inline-block;
  padding: 13px 22px;
  border: none;
  border-radius: 10px;
  background: var(--fairway-deep);
  color: #fff;
  font-family: var(--font-sans);
  font-size: 15.5px;
  font-weight: 800;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
}
.account-form .account-btn { width: 100%; }
.account-btn:hover { background: #1a3622; }
.account-btn:disabled { opacity: 0.6; cursor: default; }
.account-btn--small { padding: 9px 16px; font-size: 14px; }
.account-btn--ghost { background: transparent; color: var(--fairway-deep); border: 1px solid rgba(27, 42, 31, 0.28); }
.account-btn--ghost:hover { background: #f2f4f2; }
.account-signout { margin: 36px 0 0; }

/* Drawer: account links under the categories. */

/* ── More story blocks ──
   List, pro tip, key takeaways, table, divider, gallery, video, link card
   and before/after slider. Same class names are used by article.html and
   the pop-up sheet's JS (base.html), so both render identically. Text
   matches the paragraph spec above (18px / 28px line box). */
.article__list {
  margin: 4px 0 1.1em;
  padding-left: 1.3em;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: calc(18px * var(--read-scale, 1));
  line-height: calc(28 / 18);
}
.article__list li { margin: 0 0 0.45em; padding-left: 0.2em; }
.article__list li::marker { color: var(--gold); font-weight: 800; }
.article__list--numbered li::marker { color: var(--fairway-deep); }

.article__tip {
  margin: 22px 0;
  padding: 14px 16px 12px;
  border-radius: 12px;
  border-left: 4px solid var(--fairway);
  background: rgba(47, 94, 58, 0.09);
}
.article__tip--warning { border-left-color: var(--gold); background: rgba(184, 134, 11, 0.12); }
.article__tip-label {
  display: block;
  margin-bottom: 4px;
  font-size: 11.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--fairway-deep);
}
.article__tip--warning .article__tip-label { color: #7a5a06; }
.article__tip p { margin: 0; font-size: calc(16.5px * var(--read-scale, 1)); line-height: 1.55; white-space: pre-line; }

.article__takeaways {
  margin: 0 0 26px;
  padding: 16px 18px 6px;
  border-radius: 14px;
  background: var(--cream-deep);
}
.article__takeaways-title {
  margin: 0 0 8px;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--fairway-deep);
}
.article__takeaways ul { margin: 0; padding: 0; list-style: none; }
.article__takeaways li {
  position: relative;
  margin: 0 0 12px;
  padding-left: 22px;
  font-family: var(--font-serif);
  font-size: calc(17px * var(--read-scale, 1));
  font-weight: 600;
  line-height: 1.4;
  color: var(--fairway-deep);
}
.article__takeaways li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.5em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
}

.article__table-wrap {
  margin: 22px 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.article__table { width: 100%; border-collapse: collapse; font-size: calc(15.5px * var(--read-scale, 1)); color: var(--ink); }
.article__table th, .article__table td { padding: 11px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.article__table th {
  background: var(--fairway-deep);
  color: #fff;
  font-size: 12.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.article__table tbody tr:nth-child(even) td { background: rgba(27, 42, 31, 0.03); }
.article__table tbody tr:last-child td { border-bottom: none; }
.article__table td:first-child { font-weight: 700; }

.article__divider { border: none; border-top: 1px solid rgba(27, 42, 31, 0.18); margin: 30px 0; }

/* Gallery: a row you swipe sideways; the next photo peeks in at the edge
   so it's obvious there's more. Bleeds to the screen edge on phones. */
.article__gallery { margin: 22px -4px; }
.article__gallery-track {
  display: flex;
  gap: 12px;
  padding: 0 4px 4px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.article__gallery-track::-webkit-scrollbar { display: none; }
.article__gallery-slide { flex: 0 0 86%; margin: 0; scroll-snap-align: start; }
.article__gallery-slide:only-child { flex-basis: 100%; }
.article__gallery-slide img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 14px;
  box-shadow: 0 2px 14px rgba(27, 42, 31, 0.14);
}
.article__gallery-slide figcaption { margin-top: 8px; font-size: 13.5px; line-height: 1.45; color: var(--ink-faint); }

.article__video { margin: 22px 0; }
.article__video-frame { position: relative; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; background: #000; }
.article__video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
/* Interactive map from the ai-app (a map-only page in an iframe) */
.article__map { margin: 22px 0; --map-h: 420px; }
.article__map--short { --map-h: 300px; }
.article__map--tall { --map-h: 560px; }
.article__map-frame { position: relative; height: min(var(--map-h), 75vh); border-radius: 14px; overflow: hidden; background: #e9eceb; border: 1px solid rgba(27, 42, 31, 0.12); }
.article__map-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.article__map figcaption a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.article__video figcaption, .article__map figcaption, .compare figcaption { margin-top: 8px; font-size: 13.5px; line-height: 1.45; color: var(--ink-faint); }

.link-card {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 14px;
  margin: 22px 0;
  padding: 16px;
  border: 1px solid rgba(27, 42, 31, 0.16);
  border-radius: 14px;
  background: #fff;
  color: inherit;
  text-decoration: none;
}
.link-card:hover { border-color: var(--fairway); }
.link-card__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.link-card__kicker { font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.4px; color: var(--ink-faint); overflow-wrap: anywhere; }
.link-card__title { margin: 0; font-family: var(--font-serif); font-size: 18px; font-weight: 700; line-height: 1.25; color: var(--fairway-deep); }
.link-card p.link-card__desc { margin: 0; font-family: var(--font-sans); font-weight: 400; font-size: 14.5px; line-height: 1.45; color: var(--ink-soft); }
.link-card__cta { margin-top: 6px; font-size: 14px; font-weight: 800; color: var(--fairway); }
.link-card:hover .link-card__cta { text-decoration: underline; }
.link-card__thumb { flex: 0 0 88px; width: 88px; border-radius: 10px; background-size: cover; background-position: center; }

/* Before / after slider. The visible "after" photo sits underneath; the
   "before" photo on top is clipped from the right edge by --pos. The range
   input covers the whole image but is invisible, so a drag anywhere moves
   the divider (and keyboard arrows work). --pos is set by actions.js. */
.compare { margin: 22px 0; --pos: 50%; }
.compare__stage {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 14px;
  background: #000;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}
.compare__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.compare__img--before { clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.compare__label {
  position: absolute;
  top: 10px;
  padding: 4px 9px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 11.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  pointer-events: none;
}
.compare__label--before { left: 10px; }
.compare__label--after { right: 10px; }
.compare__handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--pos);
  width: 3px;
  margin-left: -1.5px;
  background: #fff;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.4);
  pointer-events: none;
}
.compare__handle::after {
  content: "\2194";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 38px;
  height: 38px;
  margin: -19px 0 0 -19px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.35);
  color: var(--fairway-deep);
  font-size: 18px;
  font-weight: 800;
  line-height: 38px;
  text-align: center;
}
.compare__range {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
  -webkit-appearance: none;
  appearance: none;
}
.compare__stage:focus-within .compare__handle::after { outline: 2px solid var(--gold); }

/* ── Dark reading mode ──
   The "Dark" button in the story action row adds .is-dark to the pop-up
   sheet (.article-sheet) or, on the full article page, to <body> (which
   carries .article-page). The home feed is never affected. Most of the
   story already reads its colors from the variables below, so redefining
   them in this scope darkens text, headings, borders, tips, takeaways,
   tables and comments in one go; the rules after that cover the places
   that use a fixed white or black. */
/* The dark/light switch is icon-only and sits at the right end of the row,
   so Saved + a 3-digit comment count still fit on a small phone. */
.story-action--theme .story-action__icon { fill: none; }
.story-action--theme .story-action__label,
.story-action--text .story-action__label {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
.story-actions__tools { display: inline-flex; align-items: center; margin-left: auto; }
.story-actions .story-action--text { padding-left: 12px; padding-right: 8px; }
.story-actions .story-action--theme { margin-left: 0; padding-left: 8px; padding-right: 4px; }
/* "Aa": a small A beside a big A, drawn in text so it needs no icon. */
.story-action__aa { display: inline-flex; align-items: baseline; gap: 1px; font-family: var(--font-serif); font-weight: 700; line-height: 1; }
.story-action__aa i { font-style: normal; font-size: 13px; }
.story-action__aa b { font-size: 20px; }
/* In the article / sheet the row is a little tighter and wraps instead of
   overflowing (e.g. "Saved" + a 3-digit comment count on a small phone):
   the two reading tools then drop to a second line, right-aligned. */
.article__byline + .story-actions,
.article-sheet__body .story-actions { flex-wrap: wrap; gap: 0; margin-left: -7px; }
.article__byline + .story-actions .story-action,
.article-sheet__body .story-actions .story-action { padding-left: 7px; padding-right: 7px; gap: 4px; }
.article__byline + .story-actions .story-action--text,
.article-sheet__body .story-actions .story-action--text { padding-left: 8px; padding-right: 4px; }
.article__byline + .story-actions .story-action--theme,
.article-sheet__body .story-actions .story-action--theme { padding-left: 4px; padding-right: 3px; }

.article-sheet.is-dark,
body.article-page.is-dark,
html.is-dark,
.share-menu.is-dark {
  --ink: #e4e9e5;
  --ink-soft: rgba(228, 233, 229, 0.8);
  --ink-faint: rgba(228, 233, 229, 0.62);
  --cream: #252d28;
  --cream-deep: #2c352f;
  --line: rgba(255, 255, 255, 0.14);
  --fairway: #9cc77f;
  --fairway-deep: #cfe5bd;
  --gold: #e3b94f;
  color: var(--ink);
}

body { transition: background-color 0.25s ease; }
.article-sheet { transition: background-color 0.25s ease; }
html.is-dark body,
body.article-page.is-dark,
.article-sheet.is-dark { background: #131a15; }

.is-dark .site-header,
.is-dark .category-bar { background: #131a15; border-color: rgba(255, 255, 255, 0.12); }
.is-dark .site-brand { color: #e4e9e5; }
.is-dark .category-bar__chip { color: rgba(228, 233, 229, 0.78); }
.is-dark .category-bar__item { border-left-color: rgba(255, 255, 255, 0.2); }
.is-dark .category-bar__chip.is-active { color: #cfe5bd; }
/* Dark-mode switch, now inside the avatar menu (see .user-menu__theme). */
.site-switch { position: relative; width: 44px; height: 26px; border-radius: 13px; background: rgba(255, 255, 255, 0.22); transition: background-color 0.2s ease; flex: none; }
.site-switch__knob { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform 0.2s ease; }

.is-dark .article__pill { background: rgba(255, 255, 255, 0.09); }
.is-dark .article__sticky-bar,
.is-dark .article-sheet__sticky-bar { background: #131a15; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5); }
.is-dark .article__photo img,
.is-dark .article__gallery-slide img { box-shadow: none; filter: brightness(0.92); }
.is-dark .article__hero,
.is-dark .article-sheet__hero { filter: brightness(0.9); }
.is-dark .article__author-card-avatar { box-shadow: none; }
.is-dark .article__tip { background: rgba(156, 199, 127, 0.12); }
.is-dark .article__tip--warning { background: rgba(227, 185, 79, 0.14); }
.is-dark .article__tip--warning .article__tip-label { color: #e3b94f; }
.is-dark .article__table th { background: #2f5e3a; color: #fff; }
.is-dark .article__table tbody tr:nth-child(even) td { background: rgba(255, 255, 255, 0.04); }
.is-dark .article__divider { border-top-color: rgba(255, 255, 255, 0.2); }
.is-dark .link-card { background: #252d28; border-color: rgba(255, 255, 255, 0.16); }
.is-dark .comments__form textarea { background: #252d28; border-color: rgba(255, 255, 255, 0.22); color: var(--ink); }
.is-dark .comments__form textarea::placeholder { color: rgba(228, 233, 229, 0.45); }
.is-dark .comment__delete:hover,
.is-dark .comments__error { color: #ff8a80; }
.is-dark .story-action:hover { color: #cfe5bd; }
.is-dark .article-sheet__readmore { background: #2f5e3a; }
.is-dark .article-sheet__close { background: rgba(255, 255, 255, 0.18); }
.share-menu.is-dark .share-menu__panel { background: #252d28; }
.share-menu.is-dark .share-menu__cancel { background: #2f3832; color: var(--ink); }
/* Buttons that use the (now light) green as a fill keep a dark-green fill and white text. */
.is-dark .account-btn,
.is-dark .article-sheet__readmore:hover { background: #2f5e3a; color: #fff; }
.is-dark .account-btn:hover { background: #3d7349; }
.is-dark .account-btn--ghost { background: transparent; color: var(--fairway-deep); border-color: rgba(255, 255, 255, 0.28); }
.is-dark .account-btn--ghost:hover { background: rgba(255, 255, 255, 0.08); }
.is-dark .article__author-card-name { color: var(--ink); }
/* Every heading (feed titles, article title and subheadings, takeaways,
   Read next, Comments, account titles, share sheet) is plain white in dark mode. */
.is-dark h1,
.is-dark h2,
.is-dark h3,
.is-dark .share-menu__title,
.is-dark .hero-story:hover .hero-story__title,
.is-dark .story-row:hover .story-row__title { color: #fff; }
/* Account pages (sign in / sign up / saved stories). */
.is-dark .account-field input { background: #252d28; border-color: rgba(255, 255, 255, 0.22); color: var(--ink); }
.is-dark .account-field input:-webkit-autofill { -webkit-text-fill-color: var(--ink); box-shadow: 0 0 0 100px #252d28 inset; }
.is-dark .account-error { background: rgba(255, 138, 128, 0.14); color: #ffb4ab; }
.is-dark .site-footer { color: rgba(228, 233, 229, 0.6); }

/* ── Bottom author name tag ──
   While reading from roughly 500px to 800px of scroll, the same
   "Written by ... The Sod Father" card that closes the story slides up from
   the bottom edge (the top author bar has gone by then: it shows from 200 to
   400px). After 800px it slides away again and only the sign-off card at the
   end of the story remains. Pointer events stay off so it never blocks taps. */
.article__author-pop,
.article-sheet__author-pop {
  z-index: 50;
  background: #fff;
  border-top: 1px solid var(--line);
  box-shadow: 0 -4px 14px rgba(27, 42, 31, 0.1);
  padding-bottom: max(calc(env(safe-area-inset-bottom) - 14px), 4px);
  opacity: 0;
  pointer-events: none;
  transform: translateY(100%);
  transition: opacity 0.25s ease, transform 0.25s ease, background-color 0.25s ease;
}
.article__author-pop.is-visible,
.article-sheet__author-pop.is-visible { opacity: 1; transform: translateY(0); }
.article__author-pop { position: fixed; left: 0; right: 0; bottom: 0; max-width: 720px; margin: 0 auto; }
.article-sheet__author-pop {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 3;
  border-bottom-left-radius: inherit; border-bottom-right-radius: inherit;
}
/* Centered layout: name on the left, brand on the right, the photo exactly
   in the middle, and the three reading tools centered right under it. */
.article__author-pop .article__author-card,
.article-sheet__author-pop .article__author-card {
  margin: 0; border: none; padding: 8px 20px 0;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 14px;
}
.article__author-pop .article__author-card--no-photo,
.article-sheet__author-pop .article__author-card--no-photo { grid-template-columns: 1fr 1fr; }
.article__author-pop .article__author-card-info,
.article-sheet__author-pop .article__author-card-info { align-items: flex-end; text-align: right; }
.article__author-pop .article__author-card-masthead,
.article-sheet__author-pop .article__author-card-masthead { align-items: flex-start; text-align: left; padding: 0; margin: 0; }
.article__author-pop .article__author-card-avatar,
.article-sheet__author-pop .article__author-card-avatar { width: 44px; height: 44px; }
.author-pop__tools { display: flex; justify-content: center; align-items: center; gap: 6px; padding: 0 20px 2px; }
.author-pop__tools .story-action { min-height: 32px; padding: 4px 14px; }
.author-pop__tools .story-action__label {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
.article__author-pop.is-visible,
.article-sheet__author-pop.is-visible { pointer-events: auto; }
.is-dark .article__author-pop,
.is-dark .article-sheet__author-pop { background: #131a15; border-top-color: rgba(255, 255, 255, 0.12); box-shadow: 0 -4px 14px rgba(0, 0, 0, 0.5); }

/* Drag handle on the spine (only shown in the two-page layout). */
.book-handle { display: none; }

/* ── Two-page book layout (700px and wider) ──
   The feed is the left page and a story opens as the right page, side by
   side, like an open book. Until a story is tapped the feed uses the full
   width as before. Phones and the Duo's outer display (under 700px) keep the
   bottom pop-up sheet. The layout follows the live window width, so folding,
   unfolding or splitting the screen switches between the two on its own.
   JS only adds .book-open on <html> (and .is-current on the open story). */
@media (min-width: 700px) {
  :root { --book-left: clamp(320px, 42vw, 520px); }

  /* Left page: header, feed and footer shrink to the left column. */
  .site-header { width: 100%; transition: width 0.35s cubic-bezier(0.2, 0.8, 0.2, 1); }
  .site-main {
    max-width: none;
    width: min(100%, 1080px);
    margin: 0 0 0 max(0px, calc((100% - 1080px) / 2));
    transition: width 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), margin 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
  }
  html.book-open { scrollbar-width: none; }
  html.book-open::-webkit-scrollbar { display: none; }
  html.book-open body.article-sheet-open { overflow: visible; }
  html.book-open .site-header { width: var(--book-left); }
  html.book-open .site-main { width: var(--book-left); margin-left: 0; }
  html.book-open .site-footer { width: var(--book-left); }
  html.book-open .hero-story__title { font-size: 26px; }
  html.book-open .story-list { max-width: none; }

  /* The story you are reading is marked in the feed. */
  .hero-story.is-current,
  .story-row.is-current {
    background: var(--cream);
    box-shadow: inset 3px 0 0 var(--gold);
    margin-left: -20px; margin-right: -20px;
    padding-left: 23px; padding-right: 20px;
  }
  .story-list > .story-row.is-current:first-child { padding-top: 16px; }
  .hero-story.is-current { padding-top: 16px; }

  /* Right page: full height, no dimmed backdrop, slides in from the right. */
  .article-sheet-overlay {
    inset: 0 0 0 auto;
    width: calc(100% - var(--book-left));
    padding: env(safe-area-inset-top, 0px) 0 0;
    align-items: stretch;
    justify-content: stretch;
  }
  .article-sheet-overlay__scrim { display: none; }
  .article-sheet {
    max-width: none; max-height: none; height: 100%;
    border-radius: 0;
    box-shadow: -10px 0 30px rgba(27, 42, 31, 0.12);
    transform: translateX(100%);
  }
  .article-sheet-overlay.is-open .article-sheet { transform: none; }
  /* Soft shadow along the spine. */
  .article-sheet::before {
    content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 18px; z-index: 4;
    background: linear-gradient(to right, rgba(27, 42, 31, 0.1), rgba(27, 42, 31, 0));
    pointer-events: none;
  }
  .is-dark .article-sheet { box-shadow: -10px 0 30px rgba(0, 0, 0, 0.45); }
  .is-dark .article-sheet::before { background: linear-gradient(to right, rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0)); }
  .article-sheet__scroll { overscroll-behavior: contain; }

  /* Reading column: same narrow 720px column, centered on the page. */
  .article-sheet__header { padding: 28px 24px 0; }
  .article-sheet__header,
  .article-sheet__body { max-width: 720px; margin-left: auto; margin-right: auto; }
  .article-sheet__body { padding: 0 24px; }
  .article-sheet__hero { width: calc(100% - 48px); max-width: 672px; margin: 16px auto 20px; }
  .article-sheet__sticky-bar { padding-left: max(24px, calc((100% - 720px) / 2 + 24px)); }
  .article-sheet__author-pop .article__author-card,
  .article-sheet__author-pop .author-pop__tools { max-width: 720px; margin-left: auto; margin-right: auto; }

  /* Safe areas. On a foldable the status indicator / camera area can sit on
     the right edge in landscape and the insets can differ left and right, so
     each page only pads for the edge of the screen it actually touches: the
     left page for the left inset, the right page for the right inset, and only
     around the title area at the top (the status indicator is up there), so the
     article body keeps even left and right margins. */
  .site-header__inner { padding-left: max(16px, env(safe-area-inset-left, 0px)); }
  .site-main { padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); }
  html.book-open .site-main { padding-right: 20px; }
  .hero-story.is-current,
  .story-row.is-current {
    margin-left: calc(-1 * max(20px, env(safe-area-inset-left, 0px)));
    padding-left: calc(max(20px, env(safe-area-inset-left, 0px)) + 3px);
  }
  .article-sheet__header { padding-right: max(24px, env(safe-area-inset-right, 0px)); }
  .article-sheet__hero {
    width: min(672px, calc(100% - 48px));
    max-width: none;
    margin-left: max(24px, calc((100% - 720px) / 2 + 24px)); margin-right: 0;
  }

  /* Close button sits at the top-left of the right page (next to the feed),
     clear of the status indicator and camera on the right edge. */
  .article-sheet__close { right: auto; left: 20px; }
  .article-sheet__header { padding-top: 60px; }
  .article-sheet__sticky-bar { padding-left: max(68px, calc((100% - 720px) / 2 + 24px)); padding-right: max(24px, env(safe-area-inset-right, 0px)); }
  /* Drag handle: a small grip centered on the spine, halfway down. */
  .book-handle {
    display: flex; align-items: center; justify-content: center;
    position: absolute; z-index: 6; top: 50%; left: -15px;
    width: 30px; height: 72px; margin-top: -36px;
    border-radius: 15px;
    background: var(--cream-deep); border: 1px solid var(--line);
    box-shadow: 0 2px 10px rgba(27, 42, 31, 0.2);
    cursor: col-resize; touch-action: none;
    -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent;
    outline: none;
    transition: background-color 0.15s ease, box-shadow 0.15s ease;
  }
  /* Larger invisible touch target around the visible grip. */
  .book-handle::before { content: ""; position: absolute; inset: -12px -14px; }
  .book-handle__grip {
    width: 6px; height: 26px;
    border-left: 2px solid var(--ink-faint); border-right: 2px solid var(--ink-faint);
  }
  .book-handle:focus-visible { box-shadow: 0 0 0 3px var(--gold); }
  html.book-dragging .book-handle { background: var(--fairway); }
  html.book-dragging .book-handle__grip { border-color: #fff; }
  .is-dark .book-handle { box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5); }
  html.book-full .book-handle { left: 8px; }
  html.book-full .article-sheet::before { display: none; }
  html.book-full .article-sheet { box-shadow: none; }
  html.book-full .article-sheet__close { left: max(20px, calc(env(safe-area-inset-left, 0px) + 10px)); }
  html.book-full .article-sheet__header { padding-left: max(24px, env(safe-area-inset-left, 0px)); }

  /* Pages follow the handle: widths animate when it snaps, but track the
     finger exactly while it is being dragged. */
  .article-sheet-overlay,
  .article-sheet-overlay.is-open {
    transition: opacity 0.25s ease, visibility 0s linear 0.25s, width 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
  }
  .article-sheet-overlay.is-open {
    transition: opacity 0.25s ease, visibility 0s linear 0s, width 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
  }
  html.book-dragging .site-header,
  html.book-dragging .site-main,
  html.book-dragging .site-footer,
  html.book-dragging .article-sheet-overlay { transition: none !important; }
  html.book-dragging { cursor: col-resize; }
  /* While dragging, a thin guide marks the exact middle of the screen, where
     the fold sits on a foldable; the divider clicks onto it when close. */
  html.book-dragging::after {
    content: ""; position: fixed; top: 0; bottom: 0; left: 50%; width: 2px; margin-left: -1px;
    background: var(--gold); opacity: 0.55; z-index: 150; pointer-events: none;
  }
  html.book-dragging body { -webkit-user-select: none; user-select: none; }

  /* The feed page clips instead of spilling while it is squeezed, and
     disappears entirely in the full-page article mode. */
  html.book-open .site-header,
  html.book-open .site-main,
  html.book-open .site-footer { overflow: hidden; }
  html.book-full .site-header { border-bottom-width: 0; }
  html.book-full .site-main,
  html.book-full .site-footer { height: 0; padding-top: 0; padding-bottom: 0; margin-top: 0; margin-bottom: 0; }
}

/* ── Bottom navigation pill (phones and the Duo's outer display) ──
   Stories / Walk / Ask (the round button) / Account, floating at the bottom
   of the screen as a wide pill that stays put while you scroll. Account goes
   straight to the account page (saved stories, dark mode, sign out); on
   phones it replaces the avatar menu at the top.
   Hidden at 700px and wider, where the two-page layout takes over, and on the
   full article page so it never competes with the "Written by" tag. The story
   pop-up sheet, the share sheet and the menu all sit above it. */
.bottom-nav { display: none; }
@media (max-width: 699.98px) {
  .bottom-nav {
    display: flex; align-items: center; gap: 6px; position: fixed; z-index: 90;
    left: 14px; right: 14px; max-width: 420px; margin: 0 auto;
    bottom: max(6px, calc(env(safe-area-inset-bottom, 0px) - 10px));   /* 20px lower than before, never off the screen */
    padding: 5px; border-radius: 999px; box-sizing: border-box;
    background: rgba(255, 255, 255, 0.94); border: 1px solid rgba(27, 42, 31, 0.08);
    -webkit-backdrop-filter: saturate(1.6) blur(16px); backdrop-filter: saturate(1.6) blur(16px);
    box-shadow: 0 10px 30px rgba(27, 42, 31, 0.2);
  }
  .bottom-nav__item {
    flex: 1 1 0; min-width: 0; min-height: 50px;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    padding: 6px 4px; margin: 0; border-radius: 999px;
    color: #1d2a22; text-decoration: none;
    font-family: var(--font-sans); font-size: 12px; font-weight: 700; line-height: 1;
    -webkit-tap-highlight-color: transparent; transition: background 0.15s;
  }
  .bottom-nav__icon {
    width: 23px; height: 23px; fill: none; stroke: currentColor;
    stroke-width: 2.1; stroke-linecap: round; stroke-linejoin: round;
  }
  .bottom-nav__item.is-active { color: var(--fairway-deep); background: #eceeec; }
  .bottom-nav__item:active { background: rgba(27, 42, 31, 0.08); }
  .bottom-nav__item:focus-visible, .bottom-nav__ask:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
  /* Ask: the round button in the middle */
  .bottom-nav__ask {
    flex: none; width: 54px; height: 54px; margin: 0 3px; padding: 0; border: 0; border-radius: 50%; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    background: var(--fairway-deep); color: #fff; box-shadow: 0 6px 16px rgba(31, 65, 40, 0.35);
    -webkit-tap-highlight-color: transparent; transition: transform 0.15s;
  }
  .bottom-nav__ask svg { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
  .bottom-nav__ask:active { transform: scale(0.94); }
  .bottom-nav__me { position: relative; width: 25px; height: 25px; border-radius: 50%; overflow: hidden; display: flex; align-items: center; justify-content: center;
    background: var(--fairway-deep); color: #fff; font-size: 13px; font-weight: 800; }
  .bottom-nav__me img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
  .bottom-nav__item.is-active .bottom-nav__me { box-shadow: 0 0 0 2px var(--fairway-deep); }
  /* A red dot on Account: friend requests waiting (friends.py) */
  .bottom-nav__item { position: relative; }
  .bottom-nav__dot { position: absolute; top: 5px; left: calc(50% + 7px); width: 10px; height: 10px; border-radius: 50%;
    background: #e5484d; box-shadow: 0 0 0 2px #fff; }
  .is-dark .bottom-nav__dot { box-shadow: 0 0 0 2px #131a15; }
  /* On phones the account lives in the pill: no avatar menu at the top. */
  .user-menu { display: none; }
  .is-dark .bottom-nav { background: rgba(19, 26, 21, 0.92); border-color: rgba(255, 255, 255, 0.12); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.55); }
  .is-dark .bottom-nav__item { color: #e4e9e5; }
  .is-dark .bottom-nav__item.is-active { color: #c4e0ae; background: rgba(255, 255, 255, 0.09); }
  .is-dark .bottom-nav__item:active { background: rgba(255, 255, 255, 0.08); }
  .is-dark .bottom-nav__ask { background: #9cc77f; color: #10241a; box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4); }
  /* Keep the last of the page clear of the pill. */
  body { padding-bottom: calc(62px + env(safe-area-inset-bottom, 0px)); }
  body.article-page { padding-bottom: 0; }
  body.article-page .bottom-nav { display: none; }
}

/* Account page details. */
.account-details { margin: 0 0 28px; padding: 0; max-width: 520px; }
.account-details__row {
  display: flex; justify-content: space-between; gap: 16px; align-items: baseline;
  padding: 14px 0; border-bottom: 1px solid var(--line);
}
.account-details dt { font-size: 13.5px; font-weight: 800; color: var(--ink-faint); text-transform: uppercase; letter-spacing: 0.3px; }
.account-details dd { margin: 0; font-size: 16px; color: var(--ink); text-align: right; word-break: break-word; }
.account-details dd a { color: var(--fairway-deep); font-weight: 700; }


/* ---- Type system: Source Serif 4 (headlines + article body), IBM Plex Sans
   (UI, bylines, descriptions), IBM Plex Mono (small uppercase labels). ----
   Plex Mono only ships 400/500, so label weights are set to 500 here. Mono
   letters are wide, so the labels are a touch smaller with a little more
   letter-spacing than the sans versions they replace. */
.hero-story__pill,
.hero-story__meta,
.story-row__pill,
.article__pill,
.article__meta,
.article__author-card-label,
.article__author-card-masthead-position,
.related__title,
.article__tip-label,
.article__takeaways-title,
.compare__label,
.link-card__kicker,
.account-details dt {
  font-family: var(--font-mono);
  font-weight: 500;
  letter-spacing: 0.06em;
}
.hero-story__pill, .article__pill { font-size: 10.5px; }
.story-row__pill { font-size: 10px; }
.hero-story__meta, .article__meta { font-size: 11.5px; }
.article__author-card-label { font-size: 10.5px; }
.article__author-card-masthead-position { font-size: 10px; }
.related__title, .article__takeaways-title, .article__tip-label, .compare__label, .link-card__kicker { font-size: 11px; }
.account-details dt { font-size: 12px; }


/* Dark-mode switch colours. */
.site-switch { background: rgba(27, 42, 31, 0.22); }
.is-dark .site-switch { background: rgba(255, 255, 255, 0.22); }

/* ---- Centered featured story on bigger screens ----
   When the feed has the whole window (no story open beside it), the
   featured story's text, byline and action row are centered under the
   centered category tabs. In the two-page layout the feed is a narrow left
   page, so it stays left-aligned there. */
@media (min-width: 900px) {
  html:not(.book-open) .hero-story__content { text-align: center; }
  html:not(.book-open) .hero-story__title { max-width: 24em; margin-left: auto; margin-right: auto; text-wrap: balance; }
  html:not(.book-open) .hero-story__dek { max-width: 40em; margin-left: auto; margin-right: auto; }
  html:not(.book-open) .hero-story__byline { justify-content: center; }
  html:not(.book-open) .hero-story .story-actions { justify-content: center; margin-left: 0; }

  /* Category tabs: centered when they fit. Auto margins on the first and last
     tab (not justify-content) so a row that is too wide still scrolls from
     its left edge instead of getting cut off. */
  html:not(.book-open) .category-bar__scroll { padding-right: 16px; }
  html:not(.book-open) .category-bar__item:first-child { margin-left: auto; }
  html:not(.book-open) .category-bar__item:last-child { margin-right: auto; }
}

/* ---- Subcategory dropdowns (from the category tabs) ----
   One panel per category that has subcategories. It is positioned with
   script under the tab's arrow (position: fixed, so the sideways-scrolling
   tab row can't clip it) and closes on outside click, Escape, scroll or
   resize. */
.subnav {
  position: fixed;
  z-index: 120;
  min-width: 200px;
  max-width: calc(100vw - 16px);
  padding: 6px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(27, 42, 31, 0.18);
}
.subnav[hidden] { display: none; }
.subnav__link {
  display: block;
  padding: 10px 12px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}
.subnav__link:hover, .subnav__link:focus-visible { background: rgba(27, 42, 31, 0.06); outline: none; }
.subnav__link.is-active { color: var(--fairway-deep); background: rgba(47, 94, 58, 0.1); }
.subnav__link--all { border-bottom: 1px solid var(--line); border-radius: 8px 8px 0 0; margin-bottom: 4px; }
.is-dark .subnav { background: #232b27; border-color: rgba(255, 255, 255, 0.12); box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5); }
.is-dark .subnav__link { color: rgba(255, 255, 255, 0.86); }
.is-dark .subnav__link:hover, .is-dark .subnav__link:focus-visible { background: rgba(255, 255, 255, 0.07); }
.is-dark .subnav__link.is-active { color: #cfe5bd; background: rgba(196, 224, 174, 0.12); }
.is-dark .subnav__link--all { border-bottom-color: rgba(255, 255, 255, 0.12); }

/* ── Avatar menu (right side of the header) ──
   A round button: your photo when signed in (initial underneath as the
   fallback), a default silhouette when signed out. Opens a small panel. */
.user-menu { position: relative; }
.user-menu__btn {
  position: relative; width: 38px; height: 38px; padding: 0;
  border-radius: 50%; border: 1px solid rgba(27, 42, 31, 0.22);
  background: #eef1ee; color: #5b6a5f; cursor: pointer; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.user-menu__btn:hover { border-color: rgba(27, 42, 31, 0.5); }
.user-menu__btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.user-menu__btn.is-signed-in { background: var(--fairway-deep, #1c3924); color: #fff; border-color: transparent; }
.user-menu__ghost { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.user-menu__initial { font-family: var(--font-sans); font-weight: 600; font-size: 15px; line-height: 1; }
.user-menu__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.user-menu__panel {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 130;
  min-width: 200px; padding: 6px; background: #fff; color: #1b2a1f;
  border: 1px solid rgba(27, 42, 31, 0.12); border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.14);
}
.user-menu__panel[hidden] { display: none; }
.user-menu__who { padding: 8px 12px 10px; margin-bottom: 4px; border-bottom: 1px solid rgba(27, 42, 31, 0.1); display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.user-menu__who strong { font-family: var(--font-sans); font-size: 14px; }
.user-menu__who span { font-family: var(--font-sans); font-size: 12px; color: #6b786f; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-menu__form { margin: 0; }
.user-menu__link {
  display: block; width: 100%; box-sizing: border-box; padding: 9px 12px; border-radius: 8px;
  font-family: var(--font-sans); font-size: 14.5px; font-weight: 500; color: inherit;
  text-decoration: none; text-align: left; background: none; border: none; cursor: pointer;
}
.user-menu__link:hover, .user-menu__link:focus-visible { background: rgba(27, 42, 31, 0.07); outline: none; }
.user-menu__link--primary { font-weight: 600; }
.is-dark .user-menu__btn { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.2); color: rgba(228, 233, 229, 0.8); }
.is-dark .user-menu__btn.is-signed-in { background: #2f5a3b; color: #fff; border-color: transparent; }
.is-dark .user-menu__panel { background: #232c26; color: #e4e9e5; border-color: rgba(255, 255, 255, 0.12); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); }
.is-dark .user-menu__who { border-color: rgba(255, 255, 255, 0.12); }
.is-dark .user-menu__who span { color: rgba(228, 233, 229, 0.6); }
.is-dark .user-menu__link:hover, .is-dark .user-menu__link:focus-visible { background: rgba(255, 255, 255, 0.08); }


/* ── Pop-up category bar ──
   Hidden above the page until you scroll ~150px, then slides down from the
   top with the category tabs. Matches the header's width, so in the
   two-page layout it sits over the left page only. */
.popbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 15;
  padding-top: env(safe-area-inset-top, 0px);
  background: #fff; border-bottom: 1px solid #e9ece9;
  box-shadow: 0 6px 18px rgba(27, 42, 31, 0.1);
  transform: translateY(-110%); visibility: hidden;
  transition: transform 0.25s ease, visibility 0s linear 0.25s, width 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.popbar.is-visible { transform: none; visibility: visible; transition: transform 0.25s ease, width 0.35s cubic-bezier(0.2, 0.8, 0.2, 1); }
.popbar .category-bar { background: transparent; }
.popbar .category-bar__scroll { padding-top: 8px; padding-bottom: 8px; }
.is-dark .popbar { background: #131a15; border-color: rgba(255, 255, 255, 0.12); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45); }
@media (min-width: 700px) {
  html.book-open .popbar { right: auto; width: var(--book-left); }
}
@media (prefers-reduced-motion: reduce) {
  .popbar, .popbar.is-visible { transition: none; }
}


/* ── Newsletter (footer form, /newsletter page, timed pop-up) ── */
.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.nl-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.nl-status { margin: 0 0 14px; font-size: 14px; font-weight: 700; color: var(--fairway-deep); }
.nl-status.is-error { color: #a4262c; }
.nl-success {
  margin: 0 0 8px; padding: 12px 14px; border-radius: 10px;
  background: rgba(47, 94, 58, 0.12); color: var(--fairway-deep); font-weight: 700;
}
.footer-newsletter { max-width: 420px; margin: 0 auto 26px; text-align: center; }
.footer-newsletter__title {
  margin: 0 0 10px; font-family: var(--font-serif); font-size: 17px; font-weight: 700; color: var(--ink);
}
.footer-newsletter__row { display: flex; gap: 8px; }
.footer-newsletter__row input[type="email"] {
  flex: 1; min-width: 0; padding: 9px 12px; border: 1px solid rgba(27, 42, 31, 0.22);
  border-radius: 10px; font-family: var(--font-sans); font-size: 16px; color: var(--ink); background: #fff;
}
.footer-newsletter__row input[type="email"]:focus { outline: 2px solid var(--fairway-deep); outline-offset: 1px; }
.footer-newsletter .nl-status { margin: 10px 0 0; }
.footer-newsletter__more { margin: 8px 0 0; font-size: 12.5px; }
.footer-newsletter__more a { color: var(--fairway-deep); font-weight: 700; }
.is-dark .footer-newsletter__row input[type="email"] { background: #252d28; border-color: rgba(255, 255, 255, 0.22); }
.is-dark .nl-status.is-error { color: #ffb4ab; }
.is-dark .nl-success { background: rgba(156, 199, 127, 0.16); }

.nl-popup { position: fixed; inset: 0; z-index: 400; display: flex; align-items: center; justify-content: center; padding: 20px; }
.nl-popup[hidden] { display: none; }
.nl-popup__backdrop { position: absolute; inset: 0; background: rgba(20, 28, 23, 0.55); }
.nl-popup__card {
  position: relative; width: 100%; max-width: 420px; max-height: calc(100vh - 40px); overflow-y: auto;
  padding: 30px 26px 26px; border-radius: 16px; background: var(--cream);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35); animation: nl-in 0.28s ease both;
}
@keyframes nl-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .nl-popup__card { animation: none; } }
.nl-popup__close {
  position: absolute; top: 8px; right: 10px; width: 36px; height: 36px; border: none; border-radius: 50%;
  background: transparent; color: var(--ink-soft); font-size: 26px; line-height: 1; cursor: pointer;
}
.nl-popup__close:hover { background: rgba(27, 42, 31, 0.08); }
.nl-popup__msg { margin: 6px 0 20px; font-family: var(--font-serif); font-size: 21px; line-height: 1.35; font-weight: 600; color: var(--ink); text-align: center; }
.nl-popup__cta { display: block; width: 100%; font-family: var(--font-mono); font-size: 17px; }
.nl-popup__title { margin: 0 0 4px; font-family: var(--font-serif); font-size: 24px; color: var(--fairway-deep); }
.nl-popup__sub { margin: 0 0 18px; color: var(--ink-soft); font-size: 15px; }
.nl-popup__step[data-nl-step="done"] .account-btn { display: block; margin: 0 auto; }
html.nl-open { overflow: hidden; }
.is-dark .nl-popup__close:hover { background: rgba(255, 255, 255, 0.1); }

/* Dark-mode switch row at the bottom of the avatar menu (everyone sees it). */
.user-menu__theme {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: 100%; box-sizing: border-box; margin-top: 4px; padding: 10px 12px;
  background: none; border: none; border-top: 1px solid rgba(27, 42, 31, 0.1);
  font-family: var(--font-sans); font-size: 14.5px; font-weight: 500; color: inherit;
  text-align: left; cursor: pointer;
}
.user-menu__theme:hover, .user-menu__theme:focus-visible { background: rgba(27, 42, 31, 0.07); outline: none; }
.user-menu__theme-label { display: inline-flex; align-items: center; gap: 10px; }
.user-menu__theme-icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.user-menu__theme[aria-checked="true"] .site-switch { background: var(--gold); }
.user-menu__theme[aria-checked="true"] .site-switch__knob { transform: translateX(18px); }
.is-dark .user-menu__theme { border-top-color: rgba(255, 255, 255, 0.12); }
.is-dark .user-menu__theme:hover, .is-dark .user-menu__theme:focus-visible { background: rgba(255, 255, 255, 0.08); }

/* ── Ask: chat screen that answers from the articles ──
   Phones: a full-screen sheet that slides up from the bottom. 700px and wider:
   a floating panel in the bottom-right corner. Hidden (and inert) until
   opened; the slide animates because ask.js adds .is-open a frame after
   un-hiding it. */
.ask {
  position: fixed; inset: 0; z-index: 450;
  visibility: hidden; pointer-events: none;
  transition: visibility 0s linear 0.45s;
}
.ask.is-open { visibility: visible; pointer-events: auto; transition-delay: 0s; }
.ask__backdrop { position: absolute; inset: 0; background: rgba(20, 28, 23, 0); transition: background 0.4s ease; }
.ask.is-open .ask__backdrop { background: rgba(20, 28, 23, 0.5); }
.ask__sheet {
  position: absolute; left: 0; right: 0; bottom: 0; top: 0;
  display: flex; flex-direction: column;
  background: #fff; color: var(--ink);
  transform: translateY(100%);
  transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.ask.is-open .ask__sheet { transform: translateY(0); }
.ask__head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  padding: max(env(safe-area-inset-top), 18px) 18px 12px;
  border-bottom: 1px solid var(--line);
}
.ask__title { margin: 0; font-family: var(--font-serif); font-size: 24px; font-weight: 800; line-height: 1.15; color: var(--ink); }
.ask__slashes { color: var(--gold); }
.ask__title-light { font-family: var(--font-mono); font-size: 12px; font-weight: 500; letter-spacing: 1.5px; text-transform: uppercase; color: var(--fairway); margin-left: 6px; vertical-align: middle; }
.ask__sub { margin: 4px 0 0; font-size: 13px; color: var(--ink-faint); }
.ask__tools { display: flex; align-items: center; gap: 8px; flex: none; }
.ask__close, .ask__expand {
  flex: none; width: 38px; height: 38px; border: none; border-radius: 50%;
  background: rgba(27, 42, 31, 0.08); color: var(--ink); font-size: 24px; line-height: 1; cursor: pointer;
}
/* Full-page toggle: only offered where the chat is a floating panel. */
.ask__expand { display: none; align-items: center; justify-content: center; padding: 0; }
.ask__expand svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.ask__expand-in { display: none; }
.ask.is-wide .ask__expand-out { display: none; }
.ask.is-wide .ask__expand-in { display: block; }
.ask__close:hover, .ask__expand:hover { background: rgba(27, 42, 31, 0.14); }

.ask__log { flex: 1; min-height: 0; overflow-y: auto; padding: 18px 16px 8px; display: flex; flex-direction: column; gap: 14px; -webkit-overflow-scrolling: touch; }
.ask__msg { display: flex; flex-direction: column; max-width: 92%; gap: 8px; }
.ask__msg--user { align-self: flex-end; align-items: flex-end; }
.ask__msg--bot { align-self: flex-start; }
.ask__bubble { padding: 11px 14px; border-radius: 16px; font-family: var(--font-sans); font-size: 15.5px; line-height: 1.55; overflow-wrap: anywhere; }
.ask__msg--bot .ask__bubble { background: #f1f4f1; color: var(--ink); border-bottom-left-radius: 5px; }
.ask__msg--user .ask__bubble { background: #1f4128; color: #fff; border-bottom-right-radius: 5px; white-space: pre-wrap; }
.ask__msg--error .ask__bubble { background: rgba(164, 48, 63, 0.1); color: #7d2432; }
.ask__bubble p { margin: 0 0 10px; }
.ask__bubble p:last-child, .ask__bubble ul:last-child { margin-bottom: 0; }
.ask__bubble ul { margin: 0 0 10px; padding-left: 20px; }
.ask__bubble li { margin: 0 0 4px; }

.ask__msg--typing .ask__bubble { display: inline-flex; gap: 5px; padding: 14px 16px; }
.ask__msg--typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-faint); animation: ask-dot 1.1s infinite ease-in-out; }
.ask__msg--typing span:nth-child(2) { animation-delay: 0.15s; }
.ask__msg--typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes ask-dot { 0%, 80%, 100% { opacity: 0.25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }

.ask__sources { display: flex; flex-direction: column; gap: 6px; }
.ask__source {
  display: flex; flex-direction: column; gap: 2px; padding: 9px 12px; border: 1px solid var(--line);
  border-left: 3px solid var(--gold); border-radius: 8px; text-decoration: none; color: var(--ink); background: #fff;
}
.ask__source:hover { background: #f6f8f6; }
.ask__source-title { font-family: var(--font-serif); font-weight: 700; font-size: 15px; line-height: 1.3; }
.ask__source-pill { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 1px; text-transform: uppercase; color: var(--fairway); }

.ask__chips { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.ask__chips[hidden] { display: none; }
.ask__chip {
  border: 1px solid var(--line); background: #fff; color: var(--ink); border-radius: 999px;
  padding: 8px 14px; font-family: var(--font-sans); font-size: 14px; text-align: left; cursor: pointer;
}
.ask__chip:hover { border-color: var(--fairway-deep); }

.ask__form { display: flex; align-items: flex-end; gap: 10px; padding: 10px 14px 6px; border-top: 1px solid var(--line); }
.ask__input {
  flex: 1; min-width: 0; resize: none; max-height: 120px; padding: 11px 14px;
  border: 1px solid rgba(27, 42, 31, 0.22); border-radius: 20px; background: #fff; color: var(--ink);
  font-family: var(--font-sans); font-size: 16px; line-height: 1.4;
}
.ask__input:focus { outline: 2px solid var(--fairway-deep); outline-offset: 1px; }
.ask__send {
  flex: none; width: 44px; height: 44px; border: none; border-radius: 50%; cursor: pointer;
  background: #1f4128; color: #fff; display: flex; align-items: center; justify-content: center;
}
.ask__send svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.ask__send:disabled { opacity: 0.5; cursor: default; }
.ask__note { margin: 0; padding: 0 18px 10px; min-height: 1.4em; font-size: 12.5px; color: var(--ink-faint); text-align: center; }
.ask__note.is-error { color: #a4262c; }
html.ask-open { overflow: hidden; }

@media (min-width: 700px) {
  .ask__sheet {
    left: auto; top: auto; right: 24px; bottom: 24px; width: 440px; height: min(720px, calc(100vh - 48px));
    border-radius: 18px; box-shadow: 0 18px 60px rgba(0, 0, 0, 0.3); overflow: hidden;
    transform: translateY(32px); opacity: 0;
    transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.3s ease;
    padding-bottom: 0;
  }
  .ask.is-open .ask__sheet { transform: none; opacity: 1; }
  .ask__head { padding-top: 18px; }
  .ask__expand { display: inline-flex; }
  .ask__sheet { transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.3s ease,
                right 0.35s ease, bottom 0.35s ease, width 0.35s ease, height 0.35s ease, border-radius 0.35s ease; }

  /* Full page: the panel grows to fill the window. The conversation itself
     stays in a centred column so lines don't stretch across a wide screen. */
  .ask.is-wide .ask__sheet {
    right: 0; bottom: 0; width: 100vw; height: 100vh; height: 100dvh;
    border-radius: 0; box-shadow: none;
  }
  .ask.is-wide .ask__head,
  .ask.is-wide .ask__log,
  .ask.is-wide .ask__form,
  .ask.is-wide .ask__note {
    padding-left: max(18px, calc((100% - 860px) / 2));
    padding-right: max(18px, calc((100% - 860px) / 2));
  }
  .ask.is-wide .ask__title { font-size: 28px; }
  .ask.is-wide .ask__msg { max-width: 82%; }
  .ask.is-wide .ask__bubble { font-size: 16.5px; }
}
@media (prefers-reduced-motion: reduce) {
  .ask__sheet, .ask__backdrop { transition-duration: 0.01s; }
}

/* Search buttons: the magnifier in the header (larger screens) ... */
.header-tools { display: flex; align-items: center; gap: 10px; justify-self: end; }
.header-ask {
  display: none; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid rgba(27, 42, 31, 0.22); background: transparent; color: #1b2a1f; cursor: pointer;
}
.header-ask:hover { border-color: rgba(27, 42, 31, 0.5); }
.header-ask svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
@media (min-width: 700px) { .header-ask { display: inline-flex; } }

.is-dark .ask__sheet { background: #131a15; }
.is-dark .ask__close, .is-dark .ask__expand { background: rgba(255, 255, 255, 0.12); }
.is-dark .ask__close:hover, .is-dark .ask__expand:hover { background: rgba(255, 255, 255, 0.22); }
.is-dark .ask__msg--bot .ask__bubble { background: #2c352f; }
.is-dark .ask__msg--user .ask__bubble { background: #2f5a3b; }
.is-dark .ask__msg--error .ask__bubble { background: rgba(255, 120, 135, 0.14); color: #ffb0b9; }
.is-dark .ask__source, .is-dark .ask__chip { background: #232c26; }
.is-dark .ask__source:hover { background: #2c352f; }
.is-dark .ask__input { background: #232c26; border-color: rgba(255, 255, 255, 0.22); }
.is-dark .ask__send { background: #2f5a3b; }
.is-dark .ask__note.is-error { color: #ffb4ab; }
.is-dark .header-ask { color: rgba(228, 233, 229, 0.8); border-color: rgba(255, 255, 255, 0.2); }

/* ── Comments: half-page panel that slides up from the bottom ──
   Opened by any Comment button (see static/js/actions.js, which builds the
   markup). Half the screen tall, so the story stays visible above it; the
   list scrolls on its own and the box to write a comment stays pinned at the
   bottom. --kb is set by the script when the phone keyboard is open. */
.csheet {
  position: fixed; inset: 0; z-index: 320;
  visibility: hidden; pointer-events: none;
  transition: visibility 0s linear 0.4s;
}
.csheet.is-open { visibility: visible; pointer-events: auto; transition-delay: 0s; }
.csheet__scrim { position: absolute; inset: 0; background: rgba(0, 0, 0, 0); transition: background 0.35s ease; }
.csheet.is-open .csheet__scrim { background: rgba(0, 0, 0, 0.32); }
.csheet__panel {
  position: absolute; left: 0; right: 0; bottom: var(--kb, 0px);
  max-width: 720px; margin: 0 auto;
  height: 50vh; height: 50dvh; min-height: 340px; max-height: calc(100dvh - 24px - var(--kb, 0px));
  display: flex; flex-direction: column;
  background: #fff; color: var(--ink);
  border-radius: 18px 18px 0 0; box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.22);
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  outline: none;
}
.csheet.is-open .csheet__panel { transform: translateY(0); }
.csheet__head {
  position: relative; flex: none;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 20px 14px 10px 18px; border-bottom: 1px solid var(--line);
}
.csheet__grab { position: absolute; top: 7px; left: 50%; width: 38px; height: 4px; margin-left: -19px; border-radius: 2px; background: rgba(27, 42, 31, 0.2); }
.csheet__headtext { min-width: 0; flex: 1; }
.csheet__title { margin: 0; font-family: var(--font-serif); font-size: 20px; font-weight: 700; line-height: 1.2; color: var(--fairway-deep); }
.csheet__story { margin: 2px 0 0; font-size: 12.5px; color: var(--ink-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.csheet__story:empty { display: none; }
.csheet__close {
  flex: none; width: 36px; height: 36px; border: none; border-radius: 50%;
  background: rgba(27, 42, 31, 0.08); color: var(--ink); font-size: 24px; line-height: 1; cursor: pointer;
}
.csheet__close:hover { background: rgba(27, 42, 31, 0.14); }
.csheet__scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 4px 18px 8px; }
.csheet .comments__list[data-empty="true"]::before { padding: 14px 0 10px; }
.csheet .comments__loading { margin: 14px 0; }
.csheet .comment:last-child { border-bottom: none; }
.csheet__compose.comments__compose { flex: none; margin: 0; padding: 10px 16px 12px; border-top: 1px solid var(--line); }
.csheet__field { display: flex; align-items: flex-end; gap: 8px; }
.csheet__form textarea {
  flex: 1; width: auto; min-width: 0; min-height: 44px; max-height: 110px; box-sizing: border-box;
  padding: 11px 16px; border-radius: 22px; resize: none; overflow-y: auto;
}
.csheet__send {
  flex: none; width: 44px; height: 44px; border: none; border-radius: 50%; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: #1f4128; color: #fff; cursor: pointer;
}
.csheet__send svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.csheet__send:disabled { opacity: 0.5; cursor: default; }
.csheet__form .comments__row { margin-top: 6px; min-height: 1.3em; }
.csheet__form .comments__as { display: block; margin: 0; font-size: 12.5px; color: var(--ink-faint); }
.csheet .comments__signin { align-items: center; gap: 8px 14px; }
.csheet .comments__signin span { color: var(--ink-soft); font-size: 15px; margin-right: auto; }

.is-dark .csheet__panel { background: #131a15; box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.6); }
.is-dark .csheet__scrim { background-color: rgba(0, 0, 0, 0); }
.is-dark .csheet.is-open .csheet__scrim { background: rgba(0, 0, 0, 0.5); }
.is-dark .csheet__grab { background: rgba(255, 255, 255, 0.25); }
.is-dark .csheet__close { background: rgba(255, 255, 255, 0.12); }
.is-dark .csheet__close:hover { background: rgba(255, 255, 255, 0.22); }
.is-dark .csheet__send { background: #2f5a3b; }
@media (prefers-reduced-motion: reduce) {
  .csheet__panel, .csheet__scrim { transition-duration: 0.01s; }
}

/* ── Places to try (saved from the story maps) ── */
.account-section { margin: 34px 0 14px; font-size: 13px; font-weight: 800; letter-spacing: 0.07em; text-transform: uppercase; color: var(--ink-faint); }
.place-list { display: grid; gap: 14px; }
.place-card { display: flex; gap: 14px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.place-card__photo { flex: 0 0 auto; width: 96px; height: 96px; border-radius: 10px; object-fit: cover; background: var(--cream-deep); }
.place-card__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.place-card__cat { font-size: 11.5px; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; color: var(--fairway); }
.place-card__name { margin: 0; font-family: var(--font-serif); font-size: 18px; line-height: 1.25; }
.place-card__addr, .place-card__from { margin: 0; font-size: 14px; color: var(--ink-soft); }
.place-card__from a { color: var(--fairway-deep); font-weight: 700; }
.place-card__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.place-card__actions .account-btn { text-decoration: none; display: inline-block; }
@media (max-width: 480px) { .place-card__photo { width: 76px; height: 76px; } }
.is-dark .place-card { background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.14); }

/* Little confirmation after tapping Save on a map pin */
.place-toast { position: fixed; left: 50%; bottom: calc(86px + env(safe-area-inset-bottom, 0px)); z-index: 300; max-width: min(92vw, 420px);
  transform: translate(-50%, 16px); opacity: 0; pointer-events: none; padding: 11px 16px; border-radius: 12px; background: #1b2a1f; color: #fff;
  font-size: 14px; line-height: 1.4; box-shadow: 0 8px 24px rgba(0,0,0,0.25); transition: opacity 0.25s ease, transform 0.25s ease; }
.place-toast.is-on { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.place-toast a { color: #c4e0ae; font-weight: 700; margin-left: 4px; }

/* ── Place cards (one business or hotel from the directory, inside a story) ──
   The card inside the frame reports its own height (places.js), so the frame
   only needs a sensible starting height for before that message arrives. */
.article__place { margin: 24px 0; }
.article__place iframe { display: block; width: 100%; height: 400px; border: 0; background: transparent; transition: height 0.3s ease; }
.article__place--wide iframe { height: 300px; }
.article__place--strip iframe { height: 420px; }
.article__place--stack iframe { height: 440px; }
.article__place-heading { margin: 0 0 10px; font-family: var(--font-serif); font-size: 22px; line-height: 1.25; }
.article__place--full iframe { height: min(680px, 85vh); border: 1px solid rgba(27, 42, 31, 0.12); border-radius: 14px; background: #fff; transition: none; }
@media (max-width: 560px) { .article__place--wide iframe { height: 520px; } }
.article__place figcaption { margin-top: 8px; font-size: 13.5px; line-height: 1.45; color: var(--ink-faint); }
@media (prefers-reduced-motion: reduce) { .article__place iframe { transition: none; } }

/* ── Safety & trust: legal pages, contact form, delete account, report / block ── */
.footer-legal { margin: 10px 0 0; display: flex; justify-content: center; gap: 18px; flex-wrap: wrap; }
.footer-legal a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.footer-legal a:hover { color: var(--ink); }

.legal { max-width: 680px; margin: 0 auto; padding: 28px 0 10px; font-size: 16px; line-height: 1.65; color: var(--ink); }
.legal__title { font-family: var(--font-serif); font-size: 32px; font-weight: 700; letter-spacing: -0.015em; color: var(--fairway-deep); margin: 0 0 4px; }
.legal__meta { margin: 0 0 22px; color: var(--ink-faint); font-size: 14px; }
.legal h2 { font-family: var(--font-serif); font-size: 21px; line-height: 1.3; color: var(--fairway-deep); margin: 30px 0 8px; }
.legal p { margin: 0 0 14px; }
.legal ul { margin: 0 0 14px; padding-left: 22px; }
.legal li { margin-bottom: 8px; }
.legal a { color: var(--fairway-deep); font-weight: 700; }

.account-field textarea {
  width: 100%; box-sizing: border-box; padding: 12px 14px;
  border: 1px solid rgba(27, 42, 31, 0.22); border-radius: 10px;
  font-family: var(--font-sans); font-size: 16px; line-height: 1.5; color: var(--ink); background: #fff; resize: vertical;
}
.account-field textarea:focus { outline: 2px solid var(--fairway-deep); outline-offset: 1px; }
.account-legal { margin: 14px 0 0; font-size: 13px; line-height: 1.5; color: var(--ink-faint); text-align: center; }
.account-legal a { color: var(--fairway-deep); font-weight: 700; }
.account-note { margin: 0 0 8px; color: var(--ink-soft); font-size: 15px; }
.account-note-list { margin: 0 0 22px; padding-left: 20px; color: var(--ink-soft); font-size: 15px; line-height: 1.6; }
.account-check { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 14px; font-size: 14.5px; line-height: 1.45; color: var(--ink); cursor: pointer; }
.account-check input { width: 18px; height: 18px; margin: 2px 0 0; flex-shrink: 0; accent-color: var(--fairway-deep); }
.account-btn--danger { background: #a33; }
.account-btn--danger:hover { background: #8a2a2a; }
.account-links { list-style: none; margin: 26px 0 0; padding: 18px 0 0; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 10px 22px; font-size: 14.5px; }
.account-links a { color: var(--fairway-deep); font-weight: 700; }
.account-links__danger { color: #a33 !important; }
.blocked-list { list-style: none; margin: 0 0 8px; padding: 0; }
.blocked-list__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.blocked-list__name { font-weight: 800; color: var(--ink); }
.blocked-list form { margin: 0; }

/* Report / Block under each comment */
.comment__tools { display: flex; align-items: center; gap: 14px; margin-top: 6px; flex-wrap: wrap; }
.comment__tool {
  border: none; background: transparent; padding: 2px 0; color: var(--ink-faint);
  font-family: var(--font-sans); font-size: 12.5px; font-weight: 700; cursor: pointer;
}
.comment__tool:hover { color: #a33; }
.comment__notice { margin: 6px 0 0; font-size: 13px; color: var(--ink-soft); }
.comment__reasons { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.comment__reason {
  border: 1px solid var(--line); background: transparent; color: var(--ink);
  font-family: var(--font-sans); font-size: 12.5px; font-weight: 600; padding: 5px 10px; border-radius: 999px; cursor: pointer;
}
.comment__reason:hover { border-color: var(--fairway-deep); color: var(--fairway-deep); }
.comment__reason--cancel { border-color: transparent; color: var(--ink-faint); }

.is-dark .legal h2, .is-dark .legal__title { color: #d9e7cf; }
.is-dark .legal a, .is-dark .account-legal a, .is-dark .account-links a { color: #9cc77f; }
.is-dark .account-field textarea { background: #252d28; border-color: rgba(255, 255, 255, 0.22); color: var(--ink); }
.is-dark .account-btn--danger { background: #c04a4a; }
.is-dark .account-btn--danger:hover { background: #a63e3e; }
.is-dark .account-links__danger, .is-dark .comment__tool:hover { color: #ff8a80 !important; }
.is-dark .comment__reason:hover { border-color: #9cc77f; color: #9cc77f; }

/* ── Account: Saved Stories / Saved Places tabs ── */
.saved-tabs { display: flex; margin: 0 0 6px; border-bottom: 1px solid var(--line); }
.saved-tab {
  flex: 1; border: none; background: transparent; cursor: pointer;
  padding: 16px 8px 13px; margin-bottom: -1px;
  font-family: var(--font-sans); font-size: 15.5px; font-weight: 700; color: var(--ink-faint);
  border-bottom: 3px solid transparent; -webkit-tap-highlight-color: transparent;
}
.saved-tab:hover { color: var(--ink); }
.saved-tab.is-active { color: var(--fairway-deep); border-bottom-color: var(--gold); }
.saved-tab:focus-visible { outline: 2px solid var(--fairway-deep); outline-offset: -2px; border-radius: 6px; }
.saved-tab__n { display: inline-block; min-width: 20px; padding: 1px 6px; margin-left: 4px; border-radius: 999px; background: var(--line); font-size: 12px; font-weight: 800; color: var(--ink-soft); text-align: center; }
.saved-panel { padding-top: 14px; }
.saved-panel[hidden] { display: none; }
.is-dark .saved-tab.is-active { color: #d9e7cf; }

/* ── Large screens (1000px and wider): a bigger, roomier reading page ──
   Phones and tablets (under 1000px) never see any of this; it is one block,
   so deleting it puts the old desktop look straight back.

   Everything is sized from --rp, the width of the page the story is on: the
   right-hand page of the two-page layout (the window minus the feed on the
   left, so it follows the divider as you drag it), the full window once the
   feed is dragged shut, or the window on a story's own address. The column
   keeps a margin at each side (--pad) and grows to at most 880px of text, and
   the type grows with it (up to 23px) so the line length stays about the same. Reading-size changes (the AA button) still work: the sizes below
   multiply by --read-scale. */
@media (min-width: 1000px) {
  .article { --rp: min(100vw, 1700px); }
  .article-sheet { --rp: calc(100vw - var(--book-left, 0px)); }
  .article,
  .article-sheet {
    --pad: clamp(28px, calc(var(--rp) * 0.05), 64px);
    --w: min(880px, calc(var(--rp) - 2 * var(--pad)));
    --col: calc(var(--w) + 2 * var(--pad));
    --t-title: clamp(34px, calc(var(--rp) * 0.034), 58px);
    --t-dek: clamp(19px, calc(var(--rp) * 0.0135), 25px);
    --t-body: clamp(20px, calc(var(--rp) * 0.0145), 23px);
    --t-sub: clamp(26px, calc(var(--rp) * 0.02), 34px);
    --t-quote: clamp(22px, calc(var(--rp) * 0.017), 29px);
    --t-ui: clamp(14.5px, calc(var(--rp) * 0.0075), 17px);
    --t-meta: clamp(12.5px, calc(var(--rp) * 0.0066), 14.5px);
  }
  /* A story's own address: let the page fill the window instead of the 1080px feed width. */
  body.article-page .site-main { max-width: none; width: 100%; margin: 0; padding-left: 0; padding-right: 0; }

  /* The reading column. */
  .article { max-width: var(--col); }
  .article__header { padding: 44px var(--pad) 0; }
  .article__body { padding: 0 var(--pad) 18px; }
  html .article-sheet .article-sheet__header,
  html .article-sheet .article-sheet__body { max-width: var(--col); padding-left: var(--pad); padding-right: var(--pad); }
  html .article-sheet .article-sheet__header { padding-top: 76px; }
  .article-sheet__sticky-bar { padding-left: max(72px, calc((100% - var(--col)) / 2 + var(--pad))); }
  .article__author-pop { max-width: var(--col); }
  .article__sticky-bar { max-width: var(--col); padding-left: var(--pad); padding-right: var(--pad); }
  .article-sheet__author-pop .article__author-card,
  .article-sheet__author-pop .author-pop__tools { max-width: var(--col); }
  .article-sheet__close { width: 42px; height: 42px; top: 20px; font-size: 22px; }

  /* Headline block: a bigger title, a lighter dek, a gold dot on the label. */
  .article__pill { display: inline-flex; align-items: center; font-size: clamp(11.5px, calc(var(--rp) * 0.0068), 15px); padding: 6px 12px 6px 10px; border-radius: 999px; margin-bottom: 20px; }
  .article__pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); margin-right: 8px; flex: none; }
  .article__title { font-size: var(--t-title); line-height: 1.08; letter-spacing: -0.022em; margin: 0 0 16px; text-wrap: balance; }
  .article__dek { font-size: var(--t-dek); line-height: 1.45; margin: 0 0 26px; max-width: 32em; text-wrap: pretty; }
  .article__byline { gap: 14px; margin: 0 0 20px; padding-bottom: 24px; }
  .article__avatar { width: clamp(46px, calc(var(--rp) * 0.026), 56px); height: clamp(46px, calc(var(--rp) * 0.026), 56px); box-shadow: 0 0 0 3px var(--cream-deep); }
  .article__meta { font-size: var(--t-meta); }

  /* Centered headline block: label, title, subtitle, author line and the Save / Share /
     Comment row sit in the middle of the column; the two reading tools stay at its right edge. */
  .article__header,
  html .article-sheet .article-sheet__header { text-align: center; }
  .article__title { margin-left: auto; margin-right: auto; max-width: 18em; }
  .article__dek { margin-left: auto; margin-right: auto; }
  .article__byline { justify-content: center; }
  .article__byline + .story-actions,
  .article-sheet__body .story-actions { position: relative; justify-content: center; margin-left: 0; margin-right: 0; }
  .article__byline + .story-actions .story-actions__tools,
  .article-sheet__body .story-actions .story-actions__tools { position: absolute; right: -6px; top: 50%; transform: translateY(-50%); margin-left: 0; }

  /* Cover photo: a little wider than the text, softly lifted. */
  html .article-sheet .article-sheet__hero {
    width: min(calc(var(--w) + 100px), calc(100% - 2 * var(--pad))); max-width: none; margin: 10px auto 34px;
    border-radius: 22px; box-shadow: 0 14px 36px rgba(27, 42, 31, 0.18);
  }
  .article__hero { margin: 10px 24px 34px; border-radius: 22px; box-shadow: 0 14px 36px rgba(27, 42, 31, 0.18); }

  /* Body text. */
  .article__content p,
  .article__list { font-size: calc(var(--t-body) * var(--read-scale, 1)); line-height: 1.72; }
  .article__content p { margin: 0 0 1.2em; text-wrap: pretty; }
  .article__list li { margin-bottom: 0.55em; }
  .article__subheading { font-size: calc(var(--t-sub) * var(--read-scale, 1)); line-height: 1.2; margin: 1.9em 0 0.55em; }
  .article__quote { margin: 36px 0; padding: 4px 0 4px 28px; border-left-width: 4px; }
  .article__quote p { font-size: calc(var(--t-quote) * var(--read-scale, 1)); line-height: 1.4; }
  .article__quote cite { font-size: var(--t-ui); }
  .article__tip { margin: 30px 0; padding: 18px 22px 16px; border-radius: 14px; }
  .article__tip p { font-size: calc(var(--t-body) * 0.92 * var(--read-scale, 1)); }
  .article__takeaways { padding: 22px 26px 12px; border-radius: 16px; }
  .article__takeaways li { font-size: calc(var(--t-body) * 0.96 * var(--read-scale, 1)); padding-left: 26px; }
  .article__table { font-size: calc(var(--t-body) * 0.85 * var(--read-scale, 1)); }
  .article__table th, .article__table td { padding: 13px 16px; }
  .article__divider { margin: 40px 0; }
  .article__photo { margin: 32px 0; }
  .article__photo img,
  .article__gallery-slide img { border-radius: 18px; box-shadow: 0 8px 26px rgba(27, 42, 31, 0.16); }
  .article__photo figcaption,
  .article__gallery-slide figcaption,
  .article__video figcaption, .article__map figcaption, .article__place figcaption { font-size: calc(var(--t-ui) * 0.97); margin-top: 10px; }
  .article__gallery { margin: 32px -4px; }
  .article__gallery-slide { flex-basis: 72%; }
  .article__video, .article__map { margin: 32px 0; }
  .article__video-frame, .article__map-frame { border-radius: 18px; }
  .article__map { --map-h: 520px; }
  .article__map--short { --map-h: 380px; }
  .article__map--tall { --map-h: 660px; }

  /* Place cards fill the text width. The card inside reports its own height
     (places.js); these are only the starting heights before it does. */
  .article__place { margin: 38px 0; }
  .article__place iframe { height: 480px; }
  /* The card keeps 6px of its own padding; this lines the picture up with the text edges. */
  .article__place:not(.article__place--full) iframe { width: calc(100% + 12px); max-width: none; margin: 0 -6px; }
  .article__place--wide iframe { height: 340px; }
  .article__place--strip iframe { height: 470px; }
  .article__place--stack iframe { height: 520px; }
  .article__place--full iframe { height: min(760px, 85vh); border-radius: 18px; }
  .article__place-heading { font-size: calc(var(--t-sub) * 0.85); margin-bottom: 14px; }

  /* Save / Share / Comment: bigger, with a soft pill that appears on hover. */
  .article__byline + .story-actions,
  .article-sheet__body .story-actions { margin: -12px 0 30px -14px; }
  .article__byline + .story-actions .story-action,
  .article-sheet__body .story-actions .story-action,
  .article__byline + .story-actions .story-action--text,
  .article-sheet__body .story-actions .story-action--text,
  .article__byline + .story-actions .story-action--theme,
  .article-sheet__body .story-actions .story-action--theme {
    min-height: calc(var(--t-ui) * 3); padding: 8px 14px; gap: 8px; font-size: var(--t-ui); border-radius: 999px;
    transition: background-color 0.15s ease, color 0.15s ease;
  }
  .article__byline + .story-actions .story-action:hover,
  .article-sheet__body .story-actions .story-action:hover { background: rgba(27, 42, 31, 0.06); }
  .is-dark .article__byline + .story-actions .story-action:hover,
  .is-dark .article-sheet__body .story-actions .story-action:hover { background: rgba(255, 255, 255, 0.09); }
  .article__byline + .story-actions .story-action__icon,
  .article-sheet__body .story-actions .story-action__icon { width: calc(var(--t-ui) * 1.5); height: calc(var(--t-ui) * 1.5); }

  /* "Read more" and the sign-off card. */
  .article-sheet__readmore { margin: 8px 0 34px; padding: 15px 30px; font-size: calc(var(--t-ui) * 1.1); box-shadow: 0 8px 20px rgba(47, 94, 58, 0.28); transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease; }
  .article-sheet__readmore:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(47, 94, 58, 0.34); }
  .article-sheet__body .article__author-card,
  .article__body .article__author-card {
    margin-top: 40px; padding: 18px 28px; gap: 18px; border: 1px solid var(--line); border-radius: 18px; background: rgba(27, 42, 31, 0.025);
  }
  .is-dark .article-sheet__body .article__author-card,
  .is-dark .article__body .article__author-card { background: rgba(255, 255, 255, 0.04); }
  .article-sheet__body .article__author-card-avatar,
  .article__body .article__author-card-avatar { width: clamp(58px, calc(var(--rp) * 0.032), 68px); height: clamp(58px, calc(var(--rp) * 0.032), 68px); }
  .article-sheet__body .article__author-card-label,
  .article__body .article__author-card-label { font-size: calc(var(--t-meta) * 0.95); }
  .article-sheet__body .article__author-card-name,
  .article__body .article__author-card-name { font-size: var(--t-ui); }
  .article-sheet__body .article__author-card-masthead-brand,
  .article__body .article__author-card-masthead-brand { font-size: calc(var(--t-ui) * 1.2); }
  .article-sheet__body .article__author-card-masthead-position,
  .article__body .article__author-card-masthead-position { font-size: calc(var(--t-meta) * 0.95); }
  .comments { margin-top: 44px; }

  /* Header: the category tabs were 11px, which is tiny on a big screen. */
  .category-bar__scroll { padding-top: 12px; padding-bottom: 12px; }
  .category-bar__chip { font-size: 14px; padding: 6px 20px; }
  .category-bar__chip.is-active { text-underline-offset: 9px; }
  html.book-open .category-bar__chip { padding-left: 14px; padding-right: 14px; }

  /* The home feed when it has the whole window. (Beside an open story the
     feed is a narrow page, so it keeps its compact sizes.) */
  html:not(.book-open) .story-list { max-width: 780px; }
  html:not(.book-open) .story-row { padding: 24px 0; gap: 28px; }
  html:not(.book-open) .story-list > .story-row:first-child { padding-top: 6px; }
  html:not(.book-open) .story-row__title { font-size: 23px; line-height: 1.25; margin-bottom: 7px; }
  html:not(.book-open) .story-row__pill { font-size: 11px; padding: 4px 10px; margin-bottom: 10px; }
  html:not(.book-open) .story-row__meta { font-size: 14px; }
  html:not(.book-open) .story-row__thumb { width: 132px; height: 132px; border-radius: 14px; }
  html:not(.book-open) .story-list--compact .story-row__title { font-size: 19px; }
  html:not(.book-open) .hero-story__dek { font-size: 19px; }
  html:not(.book-open) .hero-story__meta { font-size: 13px; }
  html:not(.book-open) .hero-story__media { border-radius: 20px; }
}

/* ── Phone: the story sheet opens higher ──
   The pop-up story sheet used to top out at 90% of the screen height. On a phone it now rises
   to sit just under the status bar / Dynamic Island (50px from the top). Delete this block to
   go back to the old height. */
@media (max-width: 699px) {
  .article-sheet { max-height: calc(100vh - 50px); max-height: calc(100dvh - 50px); }
}

/* ── Article text color ──
   Body paragraphs in stories use --color-inkBase. Light layout: #2b2724 (warm charcoal). In dark mode the
   variable flips to the light text color so the paragraphs stay readable. Delete this block to
   go back to the old color (--ink, #2b362f). */
:root { --color-inkBase: #2b2724; }
.article-sheet.is-dark,
body.article-page.is-dark,
html.is-dark { --color-inkBase: #ebe6dc; }
.article__content p { color: var(--color-inkBase, var(--ink)); }

/* ── Phone and iPad: centered headline block ──
   Same centered headline as on large screens (which has its own copy of this inside the
   desktop block): label, title, subtitle and the author line sit in the middle. The
   Save / Share / Comment row and the reading tools keep their usual place. Delete this block
   to go back to left-aligned headers on phones and iPads. */
@media (max-width: 999px) {
  .article__header,
  .article-sheet__header { text-align: center; }
  .article__title,
  .article__dek { margin-left: auto; margin-right: auto; text-wrap: balance; }
  .article__byline { justify-content: center; }
  .article__meta { text-align: center; text-wrap: balance; }
}
/* On a phone the author line is long, so the photo sits above it instead of beside it. */
@media (max-width: 560px) {
  .article__byline { flex-direction: column; gap: 8px; }
}

/* ── iPad: a slightly narrower reading column ──
   iPads held sideways (touch screens 1000px wide and up; upright iPads are left as they were). The text column is 30px narrower than the original while a
   story sits beside the feed, and 65px narrower when it fills the whole screen (the full-width
   book page, or the story's own page). Change --ipad-trim below to adjust; delete this block to
   go back to the old width. */
@media (min-width: 1000px) and (pointer: coarse) {
  .article, .article-sheet { --ipad-trim: 30px; }
  html.book-full .article-sheet,
  body.article-page .article { --ipad-trim: 165px; }
}
/* The trim, applied to the column's width and padding. */
@media (min-width: 1000px) and (pointer: coarse) {
  .article, .article-sheet {
    --pad: calc(clamp(28px, calc(var(--rp) * 0.05), 64px) + var(--ipad-trim) / 2);
    --w: min(calc(880px - var(--ipad-trim)), calc(var(--rp) - 2 * var(--pad)));
    --col: calc(var(--w) + 2 * var(--pad));
  }
}

/* ── Story page: name bars run edge to edge ──
   On a story's own page, the author bar that drops in from the top and the name tag that slides
   up from the bottom now stretch the full width of the window, from both ends of the page. What
   is inside them still lines up with the text column. Delete this block to go back to the
   narrower bars. */
.article__sticky-bar,
.article__author-pop { max-width: none; }
.article__sticky-bar {
  padding-left: max(20px, calc((100% - 720px) / 2 + 20px));
  padding-right: 20px;
}
@media (min-width: 1000px) {
  .article__sticky-bar {
    padding-left: max(var(--pad), calc((100% - var(--col)) / 2 + var(--pad)));
    padding-right: var(--pad);
  }
}

/* ── Extra space at the bottom of stories ──
   The story's own page gets 20px of extra room under the end of the story.
   In the pop-up sheet the bottom name bar now stays on screen, so the sheet's scroll area gets
   bottom space equal to that bar (base.html measures it and sets the exact value; this is the
   fallback) so the last sentence scrolls clear of it instead of hiding underneath.
   Delete this block to go back. */
.article { padding-bottom: 50px; }
.article-sheet__inner { padding-bottom: calc(110px + env(safe-area-inset-bottom, 0px)); }

/* ── One name bar only ──
   The bottom name tag now stays on screen, so the sign-off card that used to close the story is
   hidden (it showed the same name twice). Delete this block to bring the sign-off card back. */
.article__body > .article__author-card,
.article-sheet__body > .article__author-card { display: none; }

/* ── Links inside story text: underlined, in the accent color ──
   A writer makes one with [words](https://address) in a paragraph, list,
   tip or takeaway (see textlinks.py). Covers the article page and the
   pop-up sheet, which both use .article__content. */
.article__content p a,
.article__content li a {
  color: var(--fairway);
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}
.article__content p a:hover,
.article__content li a:hover { color: var(--fairway-deep); }

/* ── Ask: places and story links inside an answer ── */
.ask__inline-link { color: var(--fairway); text-decoration: underline; text-underline-offset: 2px; }
.ask__places { display: flex; flex-direction: column; gap: 6px; margin-bottom: 6px; }
.ask__places-label { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 1px; text-transform: uppercase; color: var(--ink-faint); }
.ask__place { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); text-decoration: none; min-height: 44px; }
.ask__place:hover { background: #f6f8f6; }
.ask__place svg { flex: 0 0 20px; width: 20px; height: 20px; fill: none; stroke: var(--fairway); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ask__place-name { flex: 1; min-width: 0; font-family: var(--font-sans); font-weight: 700; font-size: 14.5px; line-height: 1.3; }
.ask__place-go { flex: 0 0 auto; font-family: var(--font-sans); font-size: 12.5px; font-weight: 700; color: var(--fairway); }
.is-dark .ask__place { background: #232c26; }
.is-dark .ask__place:hover { background: #2c352f; }

/* ── Share button on a story's map ──
   Sits on the map, under the map's own zoom and full-screen buttons, and is
   sized and styled to match them (those live inside the map's iframe: 10px
   in from the corner, 29px buttons, 10px apart). */
.map-share { position: absolute; z-index: 2; top: 118px; right: 10px; width: 29px; height: 29px; padding: 0; display: flex; align-items: center; justify-content: center; border: 0; border-radius: 4px; background: #fff; color: #333; box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1); cursor: pointer; }
.no-map-fullscreen .map-share { top: 79px; }                 /* no full-screen button above it (iPhone) */
.map-share::after { content: ""; position: absolute; inset: -5px; }   /* a bigger target for a finger */
.map-share:hover { background: #f2f2f2; }
.map-share:focus-visible { outline: 2px solid var(--fairway); outline-offset: 2px; }
.map-share__icon { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ── "Sign in to share" pop-up (built on the share menu's sheet) ── */
.signin-pop__panel { padding: 22px 20px calc(20px + env(safe-area-inset-bottom)); max-width: 420px; }
.signin-pop__close { position: absolute; top: 10px; right: 12px; width: 36px; height: 36px; border: 0; border-radius: 50%; background: none; color: var(--ink-faint); font-size: 24px; line-height: 1; cursor: pointer; }
.signin-pop__title { margin: 0 0 4px; font-family: var(--font-serif); font-size: 22px; color: var(--fairway-deep); }
.signin-pop__sub { margin: 0 0 16px; font-family: var(--font-sans); font-size: 14.5px; color: var(--ink-soft); }
.signin-pop__error { margin: 0 0 14px; }
.signin-pop__error[hidden] { display: none; }
.signin-pop__form { font-family: var(--font-sans); }
.signin-pop__foot { margin: 16px 0 0; text-align: center; font-family: var(--font-sans); font-size: 15px; color: var(--ink-soft); }
.signin-pop__foot a { color: var(--fairway-deep); font-weight: 700; }
@media (min-width: 700px) {
  /* a centred box on larger screens */
  .signin-pop .signin-pop__panel { top: 50%; bottom: auto; border-radius: 18px; transform: translateY(calc(-50% + 16px)); }
  .signin-pop.is-open .signin-pop__panel { transform: translateY(-50%); }
}

/* ── List button on a story's map (phones), under the share button ── */
.map-list { position: absolute; z-index: 2; top: 157px; right: 10px; width: 29px; height: 29px; padding: 0; display: none; align-items: center; justify-content: center; border: 0; border-radius: 4px; background: #fff; color: #333; box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1); cursor: pointer; }
.no-map-fullscreen .map-list { top: 118px; }
.map-list::after { content: ""; position: absolute; inset: -5px; }
.map-list:focus-visible { outline: 2px solid var(--fairway); outline-offset: 2px; }
@media (max-width: 640px) { .map-list { display: flex; } }

/* ── The list of places (static/js/map-list.js) ── */
html.mlist-open, html.mlist-open body { overflow: hidden; }
.mlist { position: fixed; inset: 0; z-index: 320; visibility: hidden; font-family: var(--font-sans); }
.mlist.is-open { visibility: visible; }
.mlist__scrim { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.4); opacity: 0; transition: opacity 0.25s ease; }
.mlist.is-open .mlist__scrim { opacity: 1; }
.mlist__panel { position: absolute; left: 0; right: 0; bottom: 0; max-height: 86vh; max-height: 86dvh; display: flex; flex-direction: column;
  background: rgba(20, 20, 22, 0.9); -webkit-backdrop-filter: blur(18px) saturate(160%); backdrop-filter: blur(18px) saturate(160%);
  color: #fff; border-radius: 20px 20px 0 0; box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.35);
  transform: translateY(100%); transition: transform 0.32s cubic-bezier(0.22, 0.8, 0.25, 1); }
.mlist.is-open .mlist__panel { transform: translateY(0); }
.mlist__head { flex: 0 0 auto; display: flex; align-items: center; gap: 10px; padding: 14px 14px 10px 18px; }
.mlist__title { flex: 1; min-width: 0; margin: 0; font-family: var(--font-sans); font-size: 17px; font-weight: 800; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mlist__count { margin-left: 7px; font-weight: 600; opacity: 0.6; }
.mlist__close { flex: 0 0 auto; width: 34px; height: 34px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.14); color: #fff; font-size: 20px; line-height: 1; cursor: pointer; }
.mlist__status { margin: 4px 18px 18px; font-size: 14px; color: rgba(255, 255, 255, 0.75); }
.mlist__status[hidden] { display: none; }
.mlist__list { flex: 1 1 auto; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; display: flex; flex-direction: column; gap: 10px; padding: 2px 12px calc(16px + env(safe-area-inset-bottom, 0px)); }
.mlist__list:empty { display: none; }
.mlist__card { display: flex; align-items: stretch; gap: 12px; width: 100%; padding: 8px; box-sizing: border-box; text-align: left; font: inherit; color: #fff; background: rgba(255, 255, 255, 0.07); border: 0.5px solid rgba(255, 255, 255, 0.1); border-radius: 16px; cursor: pointer; }
.mlist__card:active { background: rgba(255, 255, 255, 0.14); }
.mlist__card--stop { position: relative; }
.mlist__num { position: absolute; top: 3px; left: 3px; z-index: 1; margin: 0; width: 26px; height: 26px; vertical-align: 0;
  box-shadow: 0 0 0 2px #fff, 0 2px 6px rgba(0, 0, 0, 0.35); }
.mlist__step { font-size: 11px; font-weight: 800; letter-spacing: 0.07em; text-transform: uppercase; color: var(--c, #b3d69a); filter: brightness(1.25); }
.mlist__img, .mlist__ph { flex: 0 0 88px; width: 88px; height: 88px; border-radius: 12px; object-fit: cover; background-color: #2b2f36; }
.mlist__info { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 4px; }
.mlist__name { font-size: 15px; font-weight: 800; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mlist__addr { font-size: 12.5px; line-height: 1.35; color: rgba(255, 255, 255, 0.65); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mlist__meta { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: rgba(255, 255, 255, 0.7); }
.mlist__rating { color: #f5b301; font-weight: 800; }
.mlist__cat { text-transform: capitalize; }

/* The second card: the place's listing, over the list, with "Back to listing" */
.mlist__detail { position: absolute; left: 0; right: 0; bottom: 0; height: 92vh; height: 92dvh; display: flex; flex-direction: column; background: #fff; color: #1c1f1d;
  border-radius: 20px 20px 0 0; overflow: hidden; box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.35);
  transform: translateY(100%); transition: transform 0.32s cubic-bezier(0.22, 0.8, 0.25, 1); }
.mlist__detail[hidden] { display: none; }
.mlist.is-detail .mlist__detail { transform: translateY(0); }
.mlist__bar { flex: 0 0 auto; padding: 12px; border-bottom: 1px solid #e3e6e4; }
.mlist__back { font: inherit; font-size: 14px; font-weight: 700; padding: 9px 16px; min-height: 40px; border: 0; border-radius: 999px; background: #eef1ef; color: #1c1f1d; cursor: pointer; }
.mlist__detail-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; padding-bottom: env(safe-area-inset-bottom, 0px); }
.mlist__frame { display: block; width: 100%; height: 100%; border: 0; }
.mlist__hero { display: block; width: 100%; height: 240px; object-fit: cover; background: #d9ddda; }
.mlist__simple-body { padding: 16px 18px 24px; display: flex; flex-direction: column; gap: 10px; }
.mlist__simple-name { margin: 0; font-family: var(--font-sans); font-size: 22px; font-weight: 800; color: #1c1f1d; }
.mlist__simple-meta { display: flex; gap: 10px; font-size: 13.5px; color: #4a514d; }
.mlist__simple-meta .mlist__rating { color: #b8780a; }
.mlist__simple-addr, .mlist__simple-note { margin: 0; font-size: 14.5px; line-height: 1.5; }
.mlist__simple-note { padding-left: 12px; border-left: 3px solid #2f5e3a; font-style: italic; }
.mlist__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.mlist__actions a { padding: 9px 16px; border-radius: 999px; background: #eef1ef; color: #1c1f1d; font-weight: 700; font-size: 13.5px; text-decoration: none; }
.mlist__actions a.is-primary { background: #1d6fa5; color: #fff; }
@media (prefers-reduced-motion: reduce) { .mlist__panel, .mlist__detail, .mlist__scrim { transition: none; } }

/* ── Travel map story (phones): the story's map sits behind the story ──
   static/js/map-story.js moves .mapstory to the end of <body>; templates/article.html
   adds body.has-mapstory when the story has "Travel map story" switched on. */
.mapstory, .mapstory-peek, .story-action--map { display: none; }
@media (max-width: 640px) {
  body.has-mapstory .mapstory { display: block; position: fixed; inset: 0; z-index: 1; background: #e9eceb;
    transition: z-index 0s linear 0s; }
  .mapstory__frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

  /* The story is a card that scrolls up over the map. */
  body.has-mapstory .site-main { position: relative; z-index: 2; padding: 0 0 0; background: transparent; }
  body.has-mapstory .site-footer { position: relative; z-index: 2; background: #fff; }
  body.has-mapstory .article { position: relative; background: #fff; border-radius: 22px 22px 0 0;
    padding: 4px max(20px, env(safe-area-inset-right, 0px)) 60px max(20px, env(safe-area-inset-left, 0px));
    box-shadow: 0 -10px 28px rgba(0, 0, 0, 0.16); }
  body.has-mapstory.is-dark .article, html.is-dark body.has-mapstory .article,
  body.has-mapstory.is-dark .site-footer, html.is-dark body.has-mapstory .site-footer { background: #131a15; }
  body.has-mapstory .article__map--behind { display: none; }      /* the map behind replaces it on phones */

  /* The strip of map above the story: tap it to explore. */
  /* A short strip: the story card starts high, with just enough map showing above it to invite a tap. */
  body.has-mapstory .mapstory-peek { display: flex; align-items: center; justify-content: center; width: 100%; height: 124px;
    padding: 0 0 14px; border: 0; background: transparent; cursor: pointer; -webkit-tap-highlight-color: transparent; }
  .mapstory-peek__chip { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 999px;
    background: rgba(22, 23, 26, 0.55); -webkit-backdrop-filter: blur(14px) saturate(160%); backdrop-filter: blur(14px) saturate(160%);
    border: 0.5px solid rgba(255, 255, 255, 0.2); color: #fff; font-family: var(--font-sans); font-size: 14px; font-weight: 700;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22); }
  .mapstory-peek__chip svg, .mapstory__back svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
  body.has-mapstory .story-action--map { display: inline-flex; }

  /* Map open: the story slides down out of sight (still at the same scroll spot), the map is on top. */
  body.has-mapstory .site-main, body.has-mapstory .site-header, body.has-mapstory .site-footer {
    transition: transform 0.42s cubic-bezier(0.22, 0.8, 0.25, 1); }
  body.mapstory-open .site-main, body.mapstory-open .site-header, body.mapstory-open .site-footer { transform: translateY(105vh); }
  body.mapstory-open .mapstory { z-index: 250; transition: z-index 0s linear 0.42s; }
  body.mapstory-open .article__author-pop, body.mapstory-open .article__sticky-bar, body.mapstory-open .popbar {
    visibility: hidden; opacity: 0; pointer-events: none; }

  .mapstory__bar { position: absolute; left: 0; right: 0; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); z-index: 3;
    display: flex; justify-content: center; align-items: center; gap: 8px; pointer-events: none;
    opacity: 0; transform: translateY(12px); transition: opacity 0.2s ease, transform 0.2s ease; }
  body.mapstory-open .mapstory__bar { opacity: 1; transform: none; transition-delay: 0.3s; }
  .mapstory__back, .mapstory__list { pointer-events: auto; border: 0.5px solid rgba(255, 255, 255, 0.2); color: #fff;
    background: rgba(22, 23, 26, 0.6); -webkit-backdrop-filter: blur(16px) saturate(160%); backdrop-filter: blur(16px) saturate(160%);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25); cursor: pointer; }
  .mapstory__back { display: inline-flex; align-items: center; gap: 6px; height: 46px; padding: 0 20px 0 14px; border-radius: 999px;
    font-family: var(--font-sans); font-size: 15px; font-weight: 700; }
  .map-list.mapstory__list, .map-share.mapstory__share { position: static; display: flex; width: 46px; height: 46px; border-radius: 50%; box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25); }
  .mapstory__share { pointer-events: auto; border: 0.5px solid rgba(255, 255, 255, 0.2); color: #fff; background: rgba(22, 23, 26, 0.6);
    -webkit-backdrop-filter: blur(16px) saturate(160%); backdrop-filter: blur(16px) saturate(160%); cursor: pointer; }
  .map-list.mapstory__list::after, .map-share.mapstory__share::after { display: none; }
  .mapstory__list .map-share__icon, .mapstory__share .map-share__icon { width: 19px; height: 19px; }
}
@media (max-width: 640px) and (prefers-reduced-motion: reduce) {
  body.has-mapstory .site-main, body.has-mapstory .site-header, body.has-mapstory .site-footer, .mapstory__bar { transition: none; }
  body.mapstory-open .mapstory { transition: none; }
}

/* ── Route stories (phones): the story's places are numbered stops ──
   "This story is a route" in the editor. templates/article.html adds body.is-route (the
   story fills the screen, no map strip); static/js/map-story.js adds body.has-route once
   the map has matched the stops, and body.route-head-on while the numbered header shows. */
.route-num { display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; min-width: 21px; height: 21px;
  padding: 0 5px; margin-right: 5px; border-radius: 999px; background: var(--c, #2f5e3a); color: #fff; font: 700 12px/1 var(--font-sans);
  vertical-align: 2px; text-decoration: none; }
.route-num[hidden] { display: none; }
.article__place.has-route-num { position: relative; }
.route-num--card { position: absolute; z-index: 2; top: 10px; left: 10px; min-width: 30px; height: 30px; margin: 0; padding: 0 9px; border: 0;
  font-size: 14.5px; vertical-align: 0; box-shadow: 0 0 0 2.5px #fff, 0 3px 10px rgba(0, 0, 0, 0.3); cursor: pointer; }
.article__content .route-flash { animation: route-flash 1.8s ease; border-radius: 6px; }
@keyframes route-flash { 0%, 35% { background-color: rgba(47, 94, 58, 0.14); box-shadow: 0 0 0 8px rgba(47, 94, 58, 0.14); }
  100% { background-color: transparent; box-shadow: 0 0 0 8px transparent; } }

.route-card { margin: 34px 0 8px; border: 1px solid var(--line); border-radius: 22px; overflow: hidden; background: #fff;
  box-shadow: 0 8px 28px rgba(27, 42, 31, 0.1); font-family: var(--font-sans); }
.route-card__map { position: relative; display: block; width: 100%; height: 160px; padding: 0; border: 0; background: #212326; cursor: pointer; }
.route-card__map svg { display: block; width: 100%; height: 100%; }
.route-card__map-label { position: absolute; right: 12px; bottom: 12px; padding: 7px 12px; border-radius: 999px; background: rgba(16, 18, 20, 0.74);
  border: 0.5px solid rgba(255, 255, 255, 0.2); color: #fff; font: 700 13px var(--font-sans); }
.route-card__body { padding: 16px 18px 18px; }
.route-card__h { margin: 0; font: 700 22px/1.2 var(--font-serif); color: var(--ink); }
.route-card__sub { margin: 4px 0 10px; font-size: 13.5px; color: var(--ink-faint); }
.route-card__list { list-style: none; margin: 0; padding: 0; }
.route-card__list button { display: flex; align-items: center; gap: 11px; width: 100%; padding: 9px 0; border: 0; border-top: 1px solid var(--line);
  background: none; color: var(--ink); font: 400 15px var(--font-sans); text-align: left; cursor: pointer; }
.route-card__list .route-num { flex: 0 0 auto; width: 24px; height: 24px; margin: 0; vertical-align: 0; }
.route-card__list b { flex: 1; min-width: 0; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.route-card__leg { font-size: 12.5px; color: var(--ink-faint); white-space: nowrap; }
.route-card__go { display: flex; align-items: center; justify-content: center; min-height: 48px; margin-top: 14px; padding: 0 18px; border-radius: 999px;
  background: #1f4128; color: #fff; font-weight: 700; font-size: 15px; text-decoration: none; text-align: center; }
.route-card__go + .route-card__go { margin-top: 8px; }
.route-card__row { display: flex; gap: 10px; margin-top: 10px; }
.route-card__row > button, .route-card .map-share.route-card__share { position: static; flex: 1; width: auto; height: 46px; display: flex; align-items: center; justify-content: center; gap: 7px;
  border: 0; border-radius: 999px; background: #eef1ef; color: #1c1f1d; box-shadow: none; font: 700 15px var(--font-sans); cursor: pointer; }
.route-card__row > button[hidden] { display: none; }
.route-card .map-share.route-card__share::after { display: none; }
.route-card__save svg, .mapstory__save svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }
.route-card__save.is-saved { background: #1f4128; color: #fff; }
.route-card__save.is-saved svg, .mapstory__save.is-saved svg { fill: currentColor; }
.is-dark .route-card, html.is-dark .route-card { background: #232b27; box-shadow: none; }
.is-dark .route-card__row > button, html.is-dark .route-card__row > button,
.is-dark .route-card .map-share.route-card__share, html.is-dark .route-card .map-share.route-card__share { background: #2f3832; color: var(--ink); }
.is-dark .route-card__save.is-saved, html.is-dark .route-card__save.is-saved { background: #9cc77f; color: #12201a; }

/* Saved routes on the account page */
.route-list { display: flex; flex-direction: column; gap: 12px; }
.saved-route { padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.is-dark .saved-route { background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.14); }
.saved-route__title { margin: 0; font-family: var(--font-serif); font-size: 18px; line-height: 1.25; }
.saved-route__title a { color: inherit; text-decoration: none; }
.saved-route__sub { margin: 3px 0 8px; font-size: 13.5px; color: var(--ink-faint); }
.saved-route__stops { list-style: none; margin: 0 0 4px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.saved-route__stops li { display: flex; align-items: center; gap: 9px; font-size: 14.5px; }
.saved-route__stops .route-num { margin: 0; width: 22px; height: 22px; vertical-align: 0; flex: 0 0 auto; }
.saved-route__name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.route-head, .mapstory__save { display: none; }
@media (max-width: 640px) {
  /* The story fills the screen: no map strip above it, no card edge. The map waits behind. */
  body.is-route .mapstory-peek { display: none; }
  body.is-route .site-main { background: #fff; }
  html.is-dark body.is-route .site-main, body.is-route.is-dark .site-main { background: #131a15; }
  body.is-route .article { border-radius: 0; box-shadow: none; }

  /* The numbered header, in place of the author bar at the top. */
  body.has-route .article__sticky-bar { display: none; }
  body.route-head-on .popbar { visibility: hidden; transform: translateY(-110%); }
  body.has-route .route-head { display: block; position: fixed; top: 0; left: 0; right: 0; z-index: 16; box-sizing: border-box;
    padding: calc(env(safe-area-inset-top, 0px) + 10px) 0 9px; background: rgba(255, 255, 255, 0.97);
    -webkit-backdrop-filter: blur(14px) saturate(160%); backdrop-filter: blur(14px) saturate(160%);
    border-bottom: 1px solid var(--line); box-shadow: 0 6px 18px rgba(27, 42, 31, 0.08); font-family: var(--font-sans);
    transform: translateY(-110%); visibility: hidden; transition: transform 0.25s ease, visibility 0s linear 0.25s; }
  html.is-dark body.has-route .route-head, body.has-route.is-dark .route-head { background: rgba(19, 26, 21, 0.97); }
  body.route-head-on .route-head { transform: none; visibility: visible; transition: transform 0.25s ease; }
  .route-head__nums { display: flex; align-items: center; width: max-content; max-width: 100%; margin: 0 auto; box-sizing: border-box;
    padding: 4px 16px; overflow-x: auto; scrollbar-width: none; }
  .route-head__nums::-webkit-scrollbar { display: none; }
  .route-head__num { flex: 0 0 auto; width: 30px; height: 30px; padding: 0; border-radius: 50%; border: 2px solid var(--c, #2f5e3a); background: transparent;
    color: var(--c, #2f5e3a); font: 700 13.5px/1 var(--font-sans); display: flex; align-items: center; justify-content: center; cursor: pointer;
    transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease, opacity 0.2s ease; -webkit-tap-highlight-color: transparent; }
  .route-head__num.is-past { background: var(--c, #2f5e3a); color: #fff; opacity: 0.45; }
  .route-head__num.is-now { background: var(--c, #2f5e3a); color: #fff; transform: scale(1.18); box-shadow: 0 3px 10px rgba(0, 0, 0, 0.18); }
  .route-head__line { flex: 0 1 22px; min-width: 8px; height: 2px; margin: 0 3px;
    background: radial-gradient(circle, var(--ink-faint) 1px, transparent 1.4px) 0 50% / 6px 2px repeat-x; }
  .route-head__name { display: flex; align-items: center; justify-content: center; gap: 7px; max-width: calc(100% - 32px); margin: 5px auto 0; padding: 2px 4px;
    border: 0; background: none; color: var(--ink); font: 700 15.5px/1.3 var(--font-sans); cursor: pointer; }
  .route-head__label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .route-head__label small { font-size: 13.5px; font-weight: 500; color: var(--ink-faint); }
  .route-head__name svg { flex: 0 0 auto; width: 17px; height: 17px; fill: none; stroke: var(--fairway); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

  /* Save route, on the map's bottom bar. */
  body.is-route .mapstory__save:not([hidden]) { display: flex; align-items: center; justify-content: center; width: 46px; height: 46px; border-radius: 50%;
    pointer-events: auto; border: 0.5px solid rgba(255, 255, 255, 0.2); color: #fff; background: rgba(22, 23, 26, 0.6);
    -webkit-backdrop-filter: blur(16px) saturate(160%); backdrop-filter: blur(16px) saturate(160%); box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25); cursor: pointer; }
  body.is-route .mapstory__save svg { width: 19px; height: 19px; }
  body.is-route .mapstory__save.is-saved { background: #fff; color: #1f4128; }
}
@media (max-width: 640px) and (prefers-reduced-motion: reduce) {
  .route-head, .route-head__num { transition: none; }
  .article__content .route-flash { animation: none; }
}

/* ── Plan a walk (templates/walk.html, static/js/walk-planner.js) ──
   A full-screen page: the walk's map fills it, the ask bar sits along the bottom. */
body.walk-page .site-header, body.walk-page .popbar, body.walk-page .site-footer, body.walk-page .bottom-nav,
body.walk-page .nl-popup { display: none !important; }
body.walk-page { padding-bottom: 0; overflow: hidden; background: #e9eceb; }
body.walk-page .site-main { padding: 0; max-width: none; }
.walkplan { position: fixed; inset: 0; overflow: hidden; font-family: var(--font-sans);
  background: radial-gradient(circle at 20% 15%, #24372d 0, transparent 55%), radial-gradient(circle at 85% 80%, #2b2433 0, transparent 50%), #15181a;
  color: #fff; }
.walkplan__map { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.walkplan__map[hidden] { display: none; }
.walkplan__home { position: absolute; z-index: 5; top: calc(env(safe-area-inset-top, 0px) + 12px); left: 12px; width: 42px; height: 42px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; color: #fff; background: rgba(16, 18, 20, 0.7); border: 0.5px solid rgba(255, 255, 255, 0.2);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25); }
.walkplan__home svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.walkplan.has-walk .walkplan__home, .walkplan.is-exploring .walkplan__home { top: calc(env(safe-area-inset-top, 0px) + 68px); }   /* below the map's route label or filter chips */

/* The welcome sits as a card over the explore map, just above the ask bar. */
.walkplan__intro { position: absolute; z-index: 6; left: 12px; right: 12px; bottom: calc(env(safe-area-inset-bottom, 0px) + 78px); max-width: 560px; margin: 0 auto;
  padding: 16px 16px 14px; border-radius: 20px; text-align: center; background: rgba(16, 18, 20, 0.88); border: 0.5px solid rgba(255, 255, 255, 0.16);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35); }
.walkplan__intro[hidden] { display: none; }
.walkplan__badge { display: inline-flex; align-items: center; gap: 7px; padding: 7px 13px; border-radius: 999px; background: rgba(156, 199, 127, 0.14);
  color: #c4e0ae; font-size: 13px; font-weight: 700; }
.walkplan__badge svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.walkplan__h { margin: 8px 0 4px; font: 700 21px/1.2 var(--font-serif); color: #fff; }
.walkplan__sub { margin: 0 auto 10px; max-width: 30em; font-size: 14px; line-height: 1.4; color: rgba(255, 255, 255, 0.75); }
.walkplan__lead { margin: 2px 34px 10px; font-size: 14.5px; line-height: 1.4; color: rgba(255, 255, 255, 0.85); }
.walkplan__lead b { color: #9cc77f; }
.walkplan__intro-close { position: absolute; top: 8px; right: 8px; width: 30px; height: 30px; border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, 0.14); color: #fff; font-size: 19px; line-height: 1; cursor: pointer; }
/* Over the map the ideas run in one row you can swipe, so the card stays short. */
.walkplan__intro .walkplan__ideas { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; }
.walkplan__intro .walkplan__ideas::-webkit-scrollbar { display: none; }
.walkplan__intro .walkplan__idea { flex: 0 0 auto; }
.walkplan__intro .walkplan__fine { margin-top: 10px; font-size: 12px; }
.walkplan__ideas { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.walkplan__idea { padding: 9px 14px; border-radius: 999px; border: 0.5px solid rgba(255, 255, 255, 0.22); background: rgba(255, 255, 255, 0.08);
  color: #fff; font: 600 14px var(--font-sans); cursor: pointer; }
.walkplan__idea:active { background: rgba(255, 255, 255, 0.18); }
.walkplan__fine { margin: 18px 0 0; font-size: 12.5px; color: rgba(255, 255, 255, 0.5); }

.walkplan__ask { position: absolute; z-index: 6; left: 10px; right: 10px; bottom: calc(env(safe-area-inset-bottom, 0px) + 12px); max-width: 640px; margin: 0 auto;
  display: flex; align-items: center; gap: 6px; padding: 6px; border-radius: 999px; background: #fff; box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35); }
.walkplan__input { flex: 1; min-width: 0; height: 44px; padding: 0 6px 0 12px; border: 0; background: transparent; color: #15171a;
  font: 500 16px var(--font-sans); outline: none; }
.walkplan__input::placeholder { color: #7a817d; }
.walkplan__ask button { flex: 0 0 auto; width: 44px; height: 44px; border: 0; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.walkplan__ask button[hidden] { display: none; }
.walkplan__ask svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.walkplan__list, .walkplan__mic { background: #eef1ef; color: #15171a; }
.walkplan__go { background: #1f4128; color: #fff; }
.walkplan__mic.is-recording { background: #d93a3a; color: #fff; animation: walk-rec 1.2s ease-in-out infinite; }
@keyframes walk-rec { 0%, 100% { box-shadow: 0 0 0 0 rgba(217, 58, 58, 0.5); } 50% { box-shadow: 0 0 0 8px rgba(217, 58, 58, 0); } }
.walkplan__ask.is-busy .walkplan__go { opacity: 0.5; }

.walkplan__msg { position: absolute; z-index: 6; left: 12px; right: 12px; bottom: calc(env(safe-area-inset-bottom, 0px) + 76px); max-width: 620px; margin: 0 auto;
  padding: 13px 14px 11px 16px; border-radius: 18px; background: rgba(16, 18, 20, 0.92); color: #fff; border: 0.5px solid rgba(255, 255, 255, 0.18);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35); }
.walkplan__msg[hidden] { display: none; }
.walkplan__msg-text { margin: 0; font-size: 15px; line-height: 1.45; }
.walkplan__msg.is-busy .walkplan__msg-text::before { content: ""; display: inline-block; width: 12px; height: 12px; margin-right: 9px; vertical-align: -1px;
  border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.3); border-top-color: #c4e0ae; animation: walk-spin 0.8s linear infinite; }
@keyframes walk-spin { to { transform: rotate(360deg); } }
.walkplan__msg-row { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 8px; }
.walkplan__msg.is-busy .walkplan__msg-row { display: none; }
.walkplan__msg-stops { margin-right: auto; padding: 8px 14px; border: 0; border-radius: 999px; background: #fff; color: #15171a; font: 800 13.5px var(--font-sans); cursor: pointer; }
.walkplan__msg-stops[hidden] { display: none; }
.walkplan__msg-close { width: 32px; height: 32px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.14); color: #fff; font-size: 18px; cursor: pointer; }
/* The map's own place cards and buttons sit above the ask bar. */
.walkplan.has-walk .walkplan__msg { bottom: calc(env(safe-area-inset-bottom, 0px) + 76px); }

.wsheet { position: fixed; inset: 0; z-index: 320; visibility: hidden; font-family: var(--font-sans); }
.wsheet.is-open { visibility: visible; }
.wsheet__scrim { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.4); opacity: 0; transition: opacity 0.25s ease; }
.wsheet.is-open .wsheet__scrim { opacity: 1; }
.wsheet__panel { position: absolute; left: 0; right: 0; bottom: 0; max-width: 640px; margin: 0 auto; max-height: 86vh; max-height: 86dvh; display: flex; flex-direction: column;
  border-radius: 22px 22px 0 0; background: #1b1d20; color: #fff; padding-bottom: env(safe-area-inset-bottom, 0px);
  transform: translateY(100%); transition: transform 0.32s cubic-bezier(0.2, 0.8, 0.2, 1); }
.wsheet.is-open .wsheet__panel { transform: translateY(0); }
.wsheet__head { display: flex; align-items: center; gap: 10px; padding: 16px 14px 4px 18px; }
.wsheet__title { flex: 1; min-width: 0; margin: 0; font: 800 18px/1.25 var(--font-sans); color: #fff; }
.wsheet__close { flex: 0 0 auto; width: 34px; height: 34px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.14); color: #fff; font-size: 20px; cursor: pointer; }
.wsheet__sub { margin: 2px 18px 10px; font-size: 14px; line-height: 1.45; color: rgba(255, 255, 255, 0.7); }
.wsheet__list { flex: 1 1 auto; min-height: 0; overflow-y: auto; list-style: none; margin: 0; padding: 0 12px; display: flex; flex-direction: column; gap: 8px;
  overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.wsheet__stop { display: flex; gap: 12px; padding: 12px; border-radius: 16px; background: rgba(255, 255, 255, 0.07); border: 0.5px solid rgba(255, 255, 255, 0.1); }
.wsheet__stop.is-hl { border-color: #c4e0ae; background: rgba(156, 199, 127, 0.1); }
.wsheet__num { flex: 0 0 auto; width: 28px; height: 28px; margin: 0; vertical-align: 0; font-size: 13.5px; box-shadow: 0 0 0 2px #fff; }
.wsheet__body { flex: 1; min-width: 0; }
.wsheet__top { display: flex; align-items: baseline; gap: 8px; }
.wsheet__name { flex: 1; min-width: 0; font-size: 15.5px; font-weight: 800; }
.wsheet__leg { flex: 0 0 auto; font-size: 12.5px; color: rgba(255, 255, 255, 0.6); }
.wsheet__meta { margin-top: 2px; font-size: 13px; color: rgba(255, 255, 255, 0.65); text-transform: capitalize; }
.wsheet__why { margin: 6px 0 0; font-size: 14px; line-height: 1.45; color: #fff; }
.wsheet__show { margin-top: 8px; padding: 6px 12px; border: 0; border-radius: 999px; background: rgba(255, 255, 255, 0.14); color: #fff; font: 700 12.5px var(--font-sans); cursor: pointer; }
.wsheet__actions { display: flex; gap: 8px; padding: 12px 12px 14px; }
.wsheet__actions > * { flex: 1; height: 44px; display: flex; align-items: center; justify-content: center; gap: 7px; border: 0; border-radius: 999px;
  font: 800 14px var(--font-sans); text-decoration: none; cursor: pointer; background: rgba(255, 255, 255, 0.12); color: #fff; }
.wsheet__actions > [hidden] { display: none; }
.wsheet__save { background: #fff !important; color: #15171a !important; }
.wsheet__save svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }
.wsheet__save.is-saved { background: #c4e0ae !important; }
.wsheet__save.is-saved svg { fill: currentColor; }
@media (prefers-reduced-motion: reduce) { .wsheet__panel, .wsheet__scrim { transition: none; } .walkplan__mic.is-recording { animation: none; } }

.walkplan.is-walking .walkplan__home, .walkplan.is-walking .walkplan__msg { display: none; }

/* Area tools: Draw area / Redraw area, New walk and the drawn-area note, in one row under the
   map's route pill (left of it is the back button, so the row starts after it and wraps if it must). */
.walkplan__tools { position: absolute; z-index: 5; left: 62px; right: 12px; top: calc(env(safe-area-inset-top, 0px) + 69px);
  display: flex; flex-direction: row; flex-wrap: wrap; justify-content: flex-start; align-items: center; gap: 8px; pointer-events: none; }
.walkplan__tools > * { pointer-events: auto; }
/* iPad and wider: the row sits centred right under the map's "Walking route" pill. */
@media (min-width: 700px) { .walkplan__tools { left: 12px; right: 12px; justify-content: center; } }
.walkplan__tool { display: inline-flex; align-items: center; gap: 7px; height: 40px; padding: 0 14px 0 11px; border: 0.5px solid rgba(255, 255, 255, 0.2); border-radius: 999px;
  background: rgba(16, 18, 20, 0.8); color: #fff; font: 700 13.5px var(--font-sans); cursor: pointer;
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25); }
.walkplan__tool[hidden] { display: none; }
.walkplan__tool svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.walkplan__tool.is-on { background: #9cc77f; color: #131a15; border-color: #9cc77f; }
.walkplan__area { display: flex; align-items: center; gap: 6px; height: 40px; box-sizing: border-box; padding: 0 6px 0 13px; border-radius: 999px; background: #9cc77f; color: #131a15;
  font: 700 12.5px/1.3 var(--font-sans); box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25); }
.walkplan__area[hidden] { display: none; }
.walkplan__area-clear { flex: 0 0 auto; width: 26px; height: 26px; border: 0; border-radius: 50%; background: rgba(11, 36, 20, 0.15); color: #131a15; font-size: 17px; line-height: 1; cursor: pointer; }
.walkplan.is-walking .walkplan__tools, .walkplan.is-walking .walkplan__area { display: none; }
/* A full-screen listing is open on the map (its own "Back to map" is at the top): hide our buttons and ask bar. */
.walkplan.has-panel .walkplan__tools, .walkplan.has-panel .walkplan__home, .walkplan.has-panel .walkplan__ask,
.walkplan.has-panel .walkplan__msg { display: none; }

/* "Plan your own walk" link under a route story's "Walk this route" card */
.route-card__plan { display: block; margin-top: 12px; text-align: center; font-size: 14px; font-weight: 700; color: var(--fairway); }
@media (max-width: 699px) { .walkplan__tools { gap: 5px; } .walkplan__tool { padding: 0 10px 0 8px; gap: 5px; font-size: 13px; } .walkplan__area { padding-left: 10px; font-size: 13px; } }

/* Dark mode switch on the account page (the pill's Account button replaces the avatar menu on phones). */
.account-theme { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; max-width: 420px; margin: 18px auto 0;
  padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: none; color: var(--ink); font: 700 15px var(--font-sans); cursor: pointer; box-sizing: border-box; }
.account-theme[aria-checked="true"] .site-switch { background: var(--gold); }
.account-theme[aria-checked="true"] .site-switch__knob { transform: translateX(18px); }
.is-dark .account-theme { color: #e4e9e5; border-color: rgba(255, 255, 255, 0.14); }

/* ── Story cards ──
   Stories on the feed (and the saved list) sit in the same cards as the "Walks this week" strip
   (templates/index.html): a soft cream card with a hairline border in light mode, a faint white
   tint in dark mode, rounded corners. The featured story is a bigger card whose photo runs edge to
   edge. The compact "Read next" list under an article stays a plain list. */
.hero-story {
  padding: 18px 18px 6px; margin: 0 0 24px; border: 1px solid var(--line); border-radius: 18px;
  background: var(--cream); overflow: hidden;
}
/* The photo leads: flush with the card's top and sides; the category floats on it, top left. */
.hero-story__media { margin: -18px -18px 16px; }
.hero-story__pill--over { position: absolute; z-index: 1; top: 16px; left: 18px; margin: 0;
  background: rgba(255, 255, 255, 0.9); color: var(--fairway-deep); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
html.is-dark .hero-story__pill--over { background: rgba(19, 26, 21, 0.78); color: #c4e0ae; }
.hero-story__byline { margin-top: 14px; }
.hero-story.is-current { padding-top: 18px; }
.story-list:not(.story-list--compact) { gap: 12px; }
.story-list:not(.story-list--compact) > .story-row,
.story-list:not(.story-list--compact) > .story-row:first-child,
.story-list:not(.story-list--compact) > .story-row:last-child {
  padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--cream);
}
.story-list:not(.story-list--compact) .story-row__thumb { border-radius: 10px; }
html.is-dark .hero-story,
html.is-dark .story-list:not(.story-list--compact) > .story-row {
  background: rgba(255, 255, 255, 0.05); border-color: rgba(255, 255, 255, 0.12);
}
/* The story open beside the feed on iPad: a gold edge on its card (it used to be a full-width band). */
.hero-story.is-current,
.story-list:not(.story-list--compact) > .story-row.is-current {
  margin-left: 0; margin-right: 0; padding-left: 18px; border-color: var(--gold); box-shadow: inset 3px 0 0 var(--gold);
}
.story-list:not(.story-list--compact) > .story-row.is-current { padding-left: 14px; }

/* The phone's status bar on the stories feed: an opaque strip under the clock, so the search bar and
   stories scrolling up don't run into it before the pop-up search bar slides down. */
@media (max-width: 699.98px) {
  body.feed-page::before { content: ""; position: fixed; z-index: 14; top: 0; left: 0; right: 0;
    height: env(safe-area-inset-top, 0px); background: #fff; pointer-events: none; }
  html.is-dark body.feed-page::before { background: #131a15; }
}

/* ── Articles: the cover photo first ──
   Same order as the featured card on the feed: the photo, with the category floating on its top
   left, then the title and subheader; the author line and Save / Share / Comment stay below.
   (templates/article.html, and the quick preview in base.html's renderSheet.) No photo: unchanged. */
.article__hero--top, .article-sheet__hero--top { position: relative; }
.article__hero--top { margin-top: 22px; margin-bottom: 18px; }   /* top and bottom only: the sides follow the layout rules above */
.article-sheet__hero--top { margin-top: 20px; margin-bottom: 18px; }
.article__hero--top + .article__header,
html.in-sheet .article__hero--top + .article__header,
.article-sheet__hero--top + .article-sheet__header,
html .article-sheet .article-sheet__hero--top + .article-sheet__header { padding-top: 0; }
.article__pill.article__pill--over { position: absolute; z-index: 1; top: 14px; left: 14px; margin: 0;
  background: rgba(255, 255, 255, 0.9); color: var(--fairway-deep); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.is-dark .article__pill.article__pill--over, html.is-dark .article__pill.article__pill--over { background: rgba(19, 26, 21, 0.78); color: #c4e0ae; }
@media (min-width: 700px) {
  /* iPad: the card's close button sits at its top left, so the photo starts below it. */
  html.in-sheet .article__hero--top, .article-sheet__hero--top { margin-top: 60px; }
}
@media (min-width: 1000px) {
  .article__hero--top { margin-top: 44px; margin-bottom: 30px; }
  html .article-sheet .article-sheet__hero--top { margin-top: 76px; margin-bottom: 30px; }
  html.in-sheet .article__hero--top { margin-top: 60px; }
}

/* iPhone zooms the whole page in when you tap into a text box whose text is smaller than 16px, and
   stays zoomed -- the map and its buttons then sit half off the screen (it happened when tagging a
   place on a video). On touch screens every text box uses at least 16px so that never happens. */
@media (hover: none) and (pointer: coarse) {
  input[type="text"], input[type="search"], input[type="email"], input[type="password"], input[type="url"],
  input[type="tel"], input[type="number"], input:not([type]), textarea, select { font-size: 16px !important; }
}

/* ── Notifications in the iOS app (static/js/native.js) ── */
.account-details__row[hidden] { display: none; }
.push-row__on { margin-right: 10px; color: #1b7f55; font-weight: 700; }
.push-row__btn { padding: 0; border: 0; background: none; color: var(--fairway-deep); font: 700 16px var(--font-sans); cursor: pointer; }
.push-card { position: fixed; z-index: 60; left: 12px; right: 12px; bottom: calc(env(safe-area-inset-bottom, 0px) + 84px);
  max-width: 440px; margin: 0 auto; padding: 18px 18px 14px; border-radius: 20px; background: #fff; color: #1f2522;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.22); animation: push-card-in 0.25s ease-out; }
.push-card__t { margin: 0 0 4px; font: 800 18px/1.25 var(--font-serif); }
.push-card__s { margin: 0 0 14px; font-size: 14.5px; line-height: 1.45; color: rgba(31, 37, 34, 0.7); }
.push-card__row { display: flex; gap: 10px; }
.push-card__row button { flex: 1; padding: 12px; border-radius: 12px; font: 700 15px var(--font-sans); cursor: pointer; }
.push-card__no { border: 1px solid rgba(47, 94, 58, 0.25); background: #fff; color: #2f5e3a; }
.push-card__yes { border: 0; background: #2f5e3a; color: #fff; }
@keyframes push-card-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
