/* Moxie Lighting — design tokens & global styles */

:root {
  /* Brand */
  --moxie-yellow: #F2C94C;
  --moxie-yellow-deep: #E8B324;
  /* Real Moxie teal/blue — extracted from their Squarespace stylesheet
     where #10B3AA is used as the secondary brand accent. */
  --moxie-blue: #10B3AA;
  --moxie-blue-deep: #0C8B85;
  --moxie-blue-soft: #E0F5F3;
  --moxie-black: #0E0E0E;

  /* Territory accents — Moxie brand palette only: teal (NYC), yellow (NJ),
     charcoal (Upstate). Used by the segmented region-bar on linecard tiles,
     the rail filter chips, and the drawer's "Territory coverage" pills so
     all three surfaces match. */
  --region-nyc: var(--moxie-blue);
  --region-nyc-soft: var(--moxie-blue-soft);
  --region-nyc-ink: #094C49;
  --region-nj: var(--moxie-yellow);
  --region-nj-soft: #FBEEC5;
  --region-nj-ink: var(--accent-ink);
  --region-upstate: #2A2925;
  --region-upstate-soft: #E6E5DE;
  --region-upstate-ink: #1A1A18;

  /* Light mode (default) */
  --bg: #FAFAF7;
  --bg-elev: #FFFFFF;
  --bg-sunk: #F2F1EC;
  --ink: #0E0E0E;
  --ink-2: #2A2A28;
  --ink-3: #6B6B66;
  /* WCAG AA contrast (computed, not eyeballed — see the Accessibility page):
     --ink-4 was #9C9C95 (2.6:1) and is used for real text (labels, counts,
     tips), so it's darkened just enough to clear 4.5:1 on bg / bg-elev /
     bg-sunk. */
  --ink-4: #6E6E67;
  --line: #E6E5DE;
  --line-2: #D8D7CF;
  /* Borders that are the ONLY outline of a form field must reach 3:1
     (WCAG 1.4.11). Decorative dividers keep the lighter --line / --line-2. */
  --line-control: #95927D;
  --accent: var(--moxie-yellow);
  --accent-ink: #1A1505;
  /* Moxie teal (#10B3AA) is 2.5:1 on the light backgrounds — fine as a fill,
     too light for text. Link text and teal text accents use a deeper teal that
     clears 4.5:1; the keyboard focus ring uses one that clears 3:1. */
  --link: #0B7B75;
  --link-hover: #075E59;
  --moxie-blue-text: #0B7B75;
  --focus-ring: #0E9A93;
  --shadow: 0 1px 2px rgba(14, 14, 14, .04), 0 8px 24px rgba(14, 14, 14, .06);
}

[data-theme="dark"] {
  --bg: #0B0B0A;
  --bg-elev: #141413;
  --bg-sunk: #191816;
  --ink: #F4F2EC;
  --ink-2: #DAD7CF;
  --ink-3: #8B8983;
  --ink-4: #838079;         /* was #5C5A55 (2.9:1); now clears 4.5:1 */
  --line: #2A2925;
  --line-2: #36342F;
  --line-control: #666259;  /* form-field borders, 3:1 (WCAG 1.4.11) */
  --accent: var(--moxie-yellow);
  --accent-ink: #1A1505;
  --moxie-blue-soft: #103734;
  --link: #2DD4CB;          /* lighter teal for dark backgrounds */
  --link-hover: #6EEEE7;
  --moxie-blue-text: #2DD4CB;
  --focus-ring: #2DD4CB;
  --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 8px 32px rgba(0, 0, 0, .5);

  /* Region soft fills darken in dark mode so the chips read on a dark surface. */
  --region-nyc-soft: #103734;
  --region-nyc-ink: #6EEEE7;
  --region-nj-soft: #4A3B12;
  --region-nj-ink: #FFE08A;
  --region-upstate-soft: #2A2925;
  --region-upstate-ink: #DAD7CF;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

/* Skip-to-content link — required for ADA / WCAG 2.4.1 (Bypass Blocks).
   Visually hidden until it receives keyboard focus, then snaps into view
   at top-left. No effect for mouse users. */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 10000;
  padding: 12px 16px;
  background: var(--ink);
  color: var(--bg);
  text-decoration: none;
  font-weight: 600;
  border-radius: 0 0 6px 0;
}
.skip-link:focus,
.skip-link:focus-visible {
  left: 0;
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

/* Global keyboard-focus indicator — required for ADA / WCAG 2.4.7 (Focus
   Visible). Only shows when the element is focused via keyboard (not mouse
   click) thanks to :focus-visible, so this is invisible to sighted mouse
   users and doesn't disrupt the existing visual design. */
button:focus-visible,
a:focus-visible,
[role="button"]:focus-visible,
[tabindex]:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}
/* Targets jumped to via skip-link or other in-page anchors shouldn't show
   the focus ring (they're not interactive — just a landmark). */
main:focus,
main:focus-visible,
.legal-doc h2:focus,
[role="dialog"]:focus {
  outline: none;
}

/* Text for screen readers only — visually hidden, still announced. */
.visually-hidden,
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* Stretched link: one real link/button inside a card covers the whole card,
   so the card stays clickable everywhere without nesting interactive
   elements (WCAG 4.1.2). Give the card position:relative; any other control
   inside the card needs position:relative + z-index:2 to sit above it. */
.stretched-link::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
}
/* Keyboard focus outlines the whole card, not just the title it lives in. */
.stretched-link:focus-visible { outline: none; }
/* Drawn inside the card edge: event/post cards clip with overflow:hidden. */
.stretched-link:focus-visible::after { outline: 2px solid var(--focus-ring); outline-offset: -2px; border-radius: 17px; }

/* Keep keyboard-focused elements clear of the 72px sticky nav (plus a little
   breathing room) when the browser scrolls them into view (WCAG 2.4.11). */
html { scroll-padding-top: 96px; }

/* Pinned heroes and sticky filter bars un-pin on short or heavily zoomed
   viewports, where pinning them would leave content that can never be
   scrolled into view (WCAG 1.4.4 / 1.4.10). Desktop at normal zoom keeps the
   pinned effect. */
@media (max-height: 760px), (max-width: 640px) {
  .sticky-hero { position: relative !important; top: auto !important; }
}
@media (max-height: 500px) {
  .sticky-toolbar { position: static !important; }
}

/* Respect the OS "reduce motion" setting site-wide (WCAG 2.3.3 / supports
   2.2.2): no slide-ins, fades, marquee scrolling, or hover lifts. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Archivo", "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color .25s ease, color .25s ease;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
img { display: block; max-width: 100%; }

/* Inline anchor links inside body copy & footer pick up the Moxie blue.
   Buttons styled as anchors (.btn) opt out by setting their own color. */
footer a:not(.btn),
.surface a:not(.btn),
p a:not(.btn),
li a:not(.btn) {
  color: var(--link);
  text-decoration: underline;
  text-decoration-color: color-mix(in oklab, var(--link) 35%, transparent);
  text-underline-offset: 3px;
  transition: color .15s ease, text-decoration-color .15s ease;
}
footer a:not(.btn):hover,
.surface a:not(.btn):hover,
p a:not(.btn):hover,
li a:not(.btn):hover {
  color: var(--link-hover);
  text-decoration-color: var(--link-hover);
}

/* Text selection — Moxie blue tint */
::selection {
  background: color-mix(in oklab, var(--moxie-blue) 30%, transparent);
  color: var(--ink);
}
[data-theme="dark"] ::selection {
  background: color-mix(in oklab, var(--moxie-blue) 50%, transparent);
}

.serif { font-family: "Fraunces", "Tiempos Headline", Georgia, serif; font-weight: 400; letter-spacing: -0.01em; }
.mono { font-family: "JetBrains Mono", "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace; }
.caps { text-transform: uppercase; letter-spacing: 0.12em; }

/* Color utility — blue secondary accent (paired with the yellow primary) */
.text-blue { color: var(--moxie-blue-text); }
[data-theme="dark"] .text-blue { color: var(--link); }
.bg-blue-soft { background: var(--moxie-blue-soft); }

.container {
  width: min(100% - 48px, 1360px);
  margin: 0 auto;
}
.container-wide {
  width: min(100% - 48px, 1560px);
  margin: 0 auto;
}

/* Typographic scale */
.kicker {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.h-display {
  font-family: "Anton", "Archivo Narrow", "Impact", sans-serif;
  font-weight: 400;
  font-size: clamp(56px, 11vw, 200px);
  line-height: 0.86;
  letter-spacing: 0.005em;
  text-transform: uppercase;
}
.h1 {
  font-family: "Anton", "Archivo Narrow", "Impact", sans-serif;
  font-weight: 400;
  font-size: clamp(48px, 7vw, 112px);
  line-height: 0.92;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}
.h2 {
  font-family: "Anton", "Archivo Narrow", "Impact", sans-serif;
  font-weight: 400;
  font-size: clamp(32px, 4.5vw, 72px);
  line-height: 0.96;
  letter-spacing: 0.015em;
  text-transform: uppercase;
}
.h2-serif {
  font-family: "Fraunces", "Tiempos Headline", Georgia, serif;
  font-weight: 400;
  font-size: clamp(28px, 3.5vw, 52px);
  line-height: 1.02;
  letter-spacing: -0.015em;
}
.h3 {
  font-family: "Archivo", system-ui, sans-serif;
  font-weight: 600;
  font-size: clamp(20px, 2vw, 28px);
  line-height: 1.15;
  letter-spacing: -0.005em;
}
.lead {
  font-size: clamp(18px, 1.6vw, 22px);
  line-height: 1.45;
  color: var(--ink-2);
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px;
  border-radius: 999px;
  font-size: 14px; font-weight: 500;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
  transition: transform .15s ease, background-color .2s ease, border-color .2s ease, color .2s ease;
  cursor: pointer;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--moxie-yellow-deep); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-dark { background: var(--ink); color: var(--bg); }

/* Chips */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: var(--bg-elev);
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-2);
  transition: all .15s ease;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}
.chip:hover { border-color: var(--ink-3); color: var(--ink); }
.chip.active {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}
.chip-yellow.active {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}

/* Territory bar — segmented strip at the very bottom of each linecard tile.
   Edge-to-edge (no internal padding above/below the card sides), divided into
   N even segments where N = number of territories. Each segment is filled
   with a Moxie brand color so the strip reads as a clean coverage signal. */
.region-bar {
  display: flex;
  align-items: stretch;
  width: 100%;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1;
  user-select: none;
}
.region-bar .region-seg {
  flex: 1 1 0;
  padding: 6px 4px;
  text-align: center;
  white-space: nowrap;
  min-width: 0;
}
.region-bar .region-seg + .region-seg {
  border-left: 1px solid rgba(0, 0, 0, 0.12);
}
[data-theme="dark"] .region-bar .region-seg + .region-seg {
  border-left-color: rgba(0, 0, 0, 0.35);
}
/* Moxie brand palette only — teal / yellow / charcoal. Ink colors chosen for
   AA contrast on each fill. */
/* Dark ink on teal: white was 2.6:1, ink is 7.4:1 (WCAG 1.4.3). */
.region-seg-nyc      { background: var(--moxie-blue);   color: #0E0E0E;         }
.region-seg-nj       { background: var(--moxie-yellow); color: var(--accent-ink); }
.region-seg-upstate  { background: #2A2925;             color: #F4F2EC;         }
[data-theme="dark"] .region-seg-upstate { background: #5C5A55; color: #F4F2EC; }

/* Active filter chips in the linecard rail pick up the region color so the
   brand → territory link is visible end-to-end. NJ uses dark text on yellow
   for contrast. */
.chip.region-nyc.active     { background: var(--region-nyc);     color: #0E0E0E;            border-color: var(--region-nyc);     }
.chip.region-nj.active      { background: var(--region-nj);      color: var(--accent-ink);  border-color: var(--region-nj);      }
.chip.region-upstate.active { background: var(--region-upstate); color: #F4F2EC;            border-color: var(--region-upstate); }
[data-theme="dark"] .chip.region-upstate.active { background: #5C5A55; color: #F4F2EC; border-color: #5C5A55; }

/* Linecard toolbar — two rows (find / refine), every control a 36px pill
   with the same border, radius and type so the rail reads as one system. */
.lc-toolbar .linecard-rail { display: flex; flex-direction: column; gap: 10px; padding: 14px 0; }
.lc-row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.lc-row-end { display: flex; align-items: center; gap: 8px; margin-left: auto; flex: none; }
.lc-filters { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.lc-row-refine .lc-sort { margin-left: auto; }

.lc-search { position: relative; flex: 1 1 260px; min-width: 0; }
.lc-search > svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--ink-3); pointer-events: none; }
.lc-toolbar .lc-search-input { height: 36px; padding: 0 14px 0 38px; border-radius: 999px; font-size: 13px; }

.lc-pill,
.lc-select,
.lc-seg {
  height: 36px; flex: none;
  border: 1px solid var(--line-2); border-radius: 999px;
  background: var(--bg-elev); color: var(--ink);
  font-size: 13px; font-weight: 500;
  transition: border-color .15s ease, background-color .15s ease, color .15s ease;
}
.lc-pill { display: inline-flex; align-items: center; gap: 7px; padding: 0 14px; font-family: inherit; cursor: pointer; white-space: nowrap; }
.lc-pill:hover, .lc-select:hover { border-color: var(--ink-3); }
.lc-pill.is-on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

.lc-select { position: relative; display: inline-flex; align-items: center; }
.lc-select:focus-within { border-color: var(--focus-ring); }
.lc-select-label { padding-left: 14px; color: var(--ink-3); font-weight: 400; pointer-events: none; }
.lc-select select {
  appearance: none; -webkit-appearance: none;
  height: 100%; margin: 0; padding: 0 32px 0 6px;
  border: 0; border-radius: 999px; background: transparent;
  color: var(--ink); font: inherit; cursor: pointer;
}
.lc-select select:focus { outline: none; }
.lc-select:has(select:focus-visible) { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.lc-select > svg { position: absolute; right: 13px; top: 50%; transform: translateY(-50%); color: var(--ink-2); pointer-events: none; }

/* Segmented groups: mode, region, layout. Buttons sit inside the pill. */
.lc-seg { display: inline-flex; align-items: stretch; gap: 2px; padding: 3px; }
.lc-seg-label { align-self: center; padding: 0 6px 0 10px; font-family: "JetBrains Mono", "IBM Plex Mono", ui-monospace, monospace; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.lc-seg-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 0 13px; border: 0; border-radius: 999px;
  background: transparent; color: var(--ink-2);
  font: inherit; font-size: 13px; font-weight: 500; white-space: nowrap; cursor: pointer;
  transition: background-color .15s ease, color .15s ease;
}
.lc-seg-btn:hover:not(:disabled) { background: var(--bg-sunk); color: var(--ink); }
.lc-seg-btn[aria-pressed="true"],
.lc-seg-btn[aria-pressed="true"]:hover { background: var(--ink); color: var(--bg); }
.lc-seg-btn:disabled { opacity: .4; cursor: not-allowed; }
.lc-view .lc-seg-btn { width: 32px; padding: 0; }

/* Region buttons take their territory color when on (same pairs as the tile
   strips: dark ink on teal and yellow, light ink on charcoal). */
.lc-seg-btn.region-nyc[aria-pressed="true"]     { background: var(--region-nyc); color: #0E0E0E; }
.lc-seg-btn.region-nj[aria-pressed="true"]      { background: var(--region-nj);  color: var(--accent-ink); }
.lc-seg-btn.region-upstate[aria-pressed="true"] { background: var(--region-upstate); color: #F4F2EC; }
[data-theme="dark"] .lc-seg-btn.region-upstate[aria-pressed="true"] { background: #5C5A55; }

.lc-count { font-weight: 400; font-variant-numeric: tabular-nums; color: var(--ink-3); }
.lc-pill.is-on .lc-count,
.lc-seg-btn[aria-pressed="true"] .lc-count { color: inherit; }

@media (max-width: 640px) {
  /* Phones: search gets its own full-width line; filters scroll sideways
     (rule above at 960px) and Sort drops below them. */
  .lc-row { flex-wrap: wrap; }
  .lc-search { order: -1; flex-basis: 100%; }
  .lc-toolbar .lc-search-input { font-size: 16px; }   /* no iOS focus zoom */
  .lc-row-refine .lc-filters { flex-basis: 100%; }
  .lc-row-refine .lc-sort { margin-left: 0; }
}

/* Server-sent text version of each page (functions/_shared/seo.js). It's what
   search engines read, and what visitors see for the moment before the app
   replaces it — so it gets simple, readable typography, nothing hidden. */
.ssr-snapshot { width: min(1120px, 100% - 48px); margin: 0 auto; padding: 22px 0 80px; color: var(--ink); }
.ssr-snapshot header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 18px; margin-bottom: 40px; border-bottom: 1px solid var(--line); }
.ssr-snapshot header p { margin: 0; font-weight: 700; letter-spacing: .02em; }
.ssr-snapshot nav ul, .ssr-snapshot nav ol { display: flex; flex-wrap: wrap; gap: 6px 20px; margin: 0; padding: 0; list-style: none; font-size: 14px; }
.ssr-snapshot a { color: inherit; }
.ssr-snapshot h1 { margin: 12px 0 16px; font-family: "Fraunces", serif; font-size: clamp(34px, 5vw, 56px); font-weight: 400; line-height: 1.05; letter-spacing: -0.02em; }
.ssr-snapshot h2 { margin: 36px 0 10px; font-family: "Fraunces", serif; font-size: 24px; font-weight: 400; }
.ssr-snapshot h3 { margin: 22px 0 8px; font-size: 16px; }
.ssr-snapshot p, .ssr-snapshot li { max-width: 760px; line-height: 1.6; color: var(--ink-2); }
.ssr-snapshot main ul { padding-left: 20px; }
.ssr-snapshot img { max-width: min(420px, 100%); height: auto; }
.ssr-snapshot footer { margin-top: 64px; padding-top: 24px; border-top: 1px solid var(--line); font-size: 14px; color: var(--ink-3); }

/* Line-category dropdown, anchored under the linecard toolbar. */
.lc-popover-anchor { position: relative; height: 0; }
.lc-popover {
  position: absolute; top: 6px; left: 0; z-index: 45;
  width: 100%; max-height: min(72vh, 640px); overflow: auto;
  padding: 20px 22px 24px;
  background: var(--bg-elev); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .16);
}
.lc-cat-cols { display: grid; gap: 0 28px; }
.lc-cat-col { min-width: 0; }
.lc-cat-head { margin: 14px 0 4px; color: var(--ink-2); letter-spacing: .14em; }
.lc-cat-col > .lc-cat-head:first-child { margin-top: 0; }
.lc-cat-head span { color: var(--ink-3); font-weight: 400; }
.lc-cat-item { display: flex; align-items: center; gap: 9px; min-height: 26px; padding: 2px 0; cursor: pointer; }
.lc-cat-item input { flex: none; width: 15px; height: 15px; margin: 0; accent-color: var(--accent); cursor: inherit; }
.lc-cat-item.is-disabled { opacity: .4; cursor: not-allowed; }
.lc-cat-name { flex: 1; min-width: 0; font-size: 13px; line-height: 1.3; color: var(--ink-2); }
.lc-cat-name.is-on { color: var(--ink); font-weight: 500; }
.lc-cat-n { font-size: 11px; color: var(--ink-3); }
.lc-tile-meta { margin-top: 6px; font-size: 12px; color: var(--ink-3); }
.lc-shared { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; padding: 12px 16px; border-radius: 12px; background: var(--bg-sunk); font-size: 14px; }
.lc-empty { padding: 72px 0; text-align: center; color: var(--ink-3); }
.lc-empty p { margin: 10px 0 0; }
.lc-empty .lc-empty-title { margin: 0 0 6px; font-size: 26px; color: var(--ink-2); }

/* Brand page */
.bp-back { display: inline-flex; align-items: center; gap: 6px; padding: 4px 0; border: 0; background: none; color: var(--ink-3); font: inherit; font-size: 13px; cursor: pointer; }
.bp-back:hover { color: var(--ink); }
.bp-logo {
  display: flex; align-items: center; justify-content: center; aspect-ratio: 16 / 9; padding: 32px; overflow: hidden;
  border: 1px solid var(--line); border-radius: 16px; background: #fff; transition: border-color .15s;
}
.bp-logo-link { display: block; text-decoration: none; }
.bp-logo-link:hover .bp-logo { border-color: var(--ink-3); }
.bp-blurb { max-width: 680px; margin: 0 0 18px; }
.bp-highlights { max-width: 680px; margin: 0 0 24px; padding-left: 20px; color: var(--ink-2); font-size: 15px; line-height: 1.55; }
.bp-highlights li + li { margin-top: 6px; }
.linecard-list-blurb { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.bp-facts { display: flex; flex-wrap: wrap; gap: 18px 36px; }
.bp-facts .kicker { margin-bottom: 10px; }
.bp-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.bp-chips a.chip { text-decoration: none; }
.bp-types-row { flex-basis: 100%; }
.bp-types { margin: 0; max-width: 760px; font-size: 14px; line-height: 1.7; color: var(--ink-3); }
.bp-types a { color: var(--ink-2); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
.bp-types a:hover { color: var(--ink); text-decoration-color: currentColor; }

.bp-products-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.bp-tools { display: flex; align-items: center; gap: 10px; flex: 0 1 420px; min-width: 0; }
.bp-tools .lc-search-input { height: 36px; padding: 0 14px 0 38px; border-radius: 999px; font-size: 13px; }
.bp-products { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 32px; align-items: start; }
.bp-products.is-single { grid-template-columns: minmax(0, 1fr); }
.bp-cats { position: sticky; top: 96px; display: flex; flex-direction: column; gap: 2px; max-height: calc(100vh - 120px); overflow: auto; padding-right: 4px; }
.bp-cat {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px; width: 100%;
  padding: 7px 10px; border: 0; border-radius: 8px; background: none; text-align: left;
  color: var(--ink-2); font: inherit; font-size: 14px; cursor: pointer;
}
.bp-cat:hover { background: var(--bg-sunk); color: var(--ink); }
.bp-cat[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.bp-cat-n { font-size: 12px; font-variant-numeric: tabular-nums; opacity: .75; }
.bp-group + .bp-group { margin-top: 36px; }
.bp-group-title { display: flex; align-items: baseline; gap: 10px; margin: 0 0 14px; font-size: 16px; font-weight: 600; }
.bp-group-title .mono { font-size: 12px; font-weight: 400; color: var(--ink-3); }
.bp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.bp-card {
  display: flex; flex-direction: column; min-width: 0; padding: 0; overflow: hidden;
  border: 1px solid var(--line); border-radius: 10px; background: var(--bg-elev);
  color: inherit; font: inherit; text-align: left; text-decoration: none; cursor: pointer; transition: border-color .15s;
}
.bp-card:hover { border-color: var(--ink-3); }
.bp-card .bp-media { display: flex; align-items: center; justify-content: center; aspect-ratio: 1 / 1; padding: 10px; background: #fff; border-bottom: 1px solid var(--line); }
.bp-media img { width: 100%; height: 100%; object-fit: contain; }
.bp-card .bp-body { display: flex; flex-direction: column; gap: 4px; padding: 9px 11px 12px; }
.bp-name { font-size: 13px; line-height: 1.3; color: var(--ink); }
.bp-desc { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 12px; line-height: 1.4; color: var(--ink-3); }
.bp-list { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.bp-row {
  display: flex; align-items: center; gap: 14px; width: 100%; padding: 10px 6px;
  border: 0; border-bottom: 1px solid var(--line); background: none;
  color: inherit; font: inherit; text-align: left; text-decoration: none; cursor: pointer;
}
.bp-row:hover { background: var(--bg-sunk); }
.bp-row .bp-media { display: flex; align-items: center; justify-content: center; flex: none; width: 48px; height: 48px; padding: 4px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.bp-row .bp-body { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.bp-row .bp-name { font-size: 14px; }
.bp-row .bp-desc { -webkit-line-clamp: 1; }
.bp-row-arrow { flex: none; color: var(--ink-4); }
.bp-family { border-bottom: 1px solid var(--line); padding-bottom: 4px; }
.bp-family-title { padding: 12px 6px 4px; font-size: 14px; font-weight: 600; }
.bp-family-title .mono { margin-left: 8px; font-size: 11px; font-weight: 400; color: var(--ink-3); }
.bp-family .bp-row { padding-left: 22px; border-bottom: 0; }
.bp-empty { padding: 24px 0 40px; color: var(--ink-3); font-size: 14px; }
.bp-similar { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.bp-post { display: block; padding: 16px; color: inherit; text-decoration: none; }
@media (max-width: 860px) {
  .bp-products { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  /* Category menu becomes a sideways-scrolling row of chips. */
  .bp-cats { position: static; flex-direction: row; max-height: none; overflow-x: auto; padding: 0 0 6px; scrollbar-width: thin; }
  .bp-cat { flex: none; width: auto; border: 1px solid var(--line-2); border-radius: 999px; white-space: nowrap; }
  .bp-tools { flex-basis: 100%; }
}
@media (max-width: 420px) {
  .bp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
}

/* Product panel: prev/next + close bar over the photo, actions at the foot. */
.pd-topbar { position: absolute; top: 14px; left: 14px; right: 14px; z-index: 2; display: flex; align-items: center; justify-content: space-between; pointer-events: none; }
.pd-topbar > * { pointer-events: auto; }
.pd-nav { display: inline-flex; align-items: center; gap: 4px; padding: 3px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg-elev); }
.pd-nav button { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border: 0; border-radius: 999px; background: none; color: var(--ink); cursor: pointer; }
.pd-nav button:hover { background: var(--bg-sunk); }
.pd-nav .mono { min-width: 54px; text-align: center; font-size: 12px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.pd-close { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg-sunk); color: var(--ink); cursor: pointer; }
.pd-actions { display: flex; flex-wrap: wrap; gap: 8px; padding: 20px 24px 24px; border-top: 1px solid var(--line); }
.pd-actions .btn { flex: 1 1 200px; justify-content: center; }

/* Cards / surfaces */
.surface {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 18px;
}

/* Logo placeholder tile — fallback when no logo image. Border/radius live on
   the outer .logo-tile-card; this inner div sits flush so the rounded corners
   read as a single shape (no "double curve" inside the card frame). */
.logo-tile {
  display: flex; align-items: center; justify-content: center;
  aspect-ratio: 4 / 3;
  background: #FFFFFF;
  padding: 18px;
  text-align: center;
  font-weight: 500;
  font-size: 14px;
  letter-spacing: -0.005em;
  color: var(--ink);
  position: relative;
  overflow: hidden;
  transition: all .2s ease;
  cursor: pointer;
}
[data-theme="dark"] .logo-tile {
  background: #F4F2EC;
  color: #0E0E0E;
}
.logo-tile:hover {
  border-color: var(--ink);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
/* Hover lives on the wrapper so the card and its sibling shortlist button
   (kept outside the link for accessibility) lift together. */
.logo-tile-wrap:hover .logo-tile-card {
  border-color: var(--ink) !important;
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.logo-tile-wrap:hover .logo-bg { opacity: 1; }
.logo-tile-wrap:hover .logo-tile-ext { opacity: 1; }
.logo-tile-wrap:hover .logo-tile-shortlist { transform: translateY(-2px); }
.logo-tile-shortlist:active { transform: scale(.92) !important; }
.logo-tile-wrap:hover .logo-tile-shortlist:active { transform: translateY(-2px) scale(.92) !important; }
.logo-tile-shortlist:hover:not([aria-label*="Remove"]) {
  background: var(--ink) !important;
  color: var(--bg) !important;   /* --ink flips light in dark mode */
  border-color: var(--ink) !important;
}
.logo-tile .logo-bg {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, transparent 40%, color-mix(in oklab, var(--accent) 18%, transparent) 100%);
  opacity: 0;
  transition: opacity .2s ease;
}
.logo-tile:hover .logo-bg { opacity: 1; }
.logo-tile .logo-text {
  position: relative;
  z-index: 1;
  word-break: break-word;
  hyphens: auto;
}
.logo-tile .logo-meta {
  position: absolute;
  top: 10px; right: 10px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 9px;
  letter-spacing: 0.1em;
  color: var(--ink-4);
  text-transform: uppercase;
}

/* Marquee animation */
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 80s linear infinite;
  gap: 64px;
}
.marquee-item {
  font-family: "Anton", "Archivo Narrow", Impact, sans-serif;
  font-size: clamp(56px, 8vw, 112px);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  white-space: nowrap;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 64px;
}
.marquee-dot {
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--accent);
  display: inline-block;
}
/* Alternate every 2nd marquee dot to Moxie blue for a subtle two-color rhythm */
.marquee-item .marquee-dot:nth-of-type(2n) { background: var(--moxie-blue); }

/* Hero light beam — twin sources blend yellow + teal for a 50/50 brand wash */
.beam-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.beam {
  position: absolute;
  top: -10%;
  left: 50%;
  width: 60%;
  height: 130%;
  background:
    radial-gradient(ellipse at 35% 0%, color-mix(in oklab, var(--accent) 28%, transparent) 0%, transparent 55%),
    radial-gradient(ellipse at 65% 0%, color-mix(in oklab, var(--moxie-blue) 24%, transparent) 0%, transparent 55%);
  transform: translateX(-50%);
  filter: blur(20px);
}
[data-theme="dark"] .beam {
  background:
    radial-gradient(ellipse at 35% 0%, color-mix(in oklab, var(--accent) 38%, transparent) 0%, transparent 60%),
    radial-gradient(ellipse at 65% 0%, color-mix(in oklab, var(--moxie-blue) 32%, transparent) 0%, transparent 60%);
}

/* Section dividers */
.rule {
  height: 1px;
  background: var(--line);
  width: 100%;
}

/* Form controls */
.input {
  width: 100%;
  padding: 14px 18px;
  border-radius: 12px;
  border: 1px solid var(--line-control);   /* field boundary needs 3:1 (WCAG 1.4.11) */
  background: var(--bg-elev);
  color: var(--ink);
  font: inherit;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.input:focus {
  border-color: var(--focus-ring);
  box-shadow: 0 0 0 4px color-mix(in oklab, var(--moxie-blue) 22%, transparent);
}

/* Utility */
.flex { display: flex; }
.col { display: flex; flex-direction: column; }
.gap-1 { gap: 8px; } .gap-2 { gap: 16px; } .gap-3 { gap: 24px; } .gap-4 { gap: 32px; }
.mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 32px; }
.center { display: flex; align-items: center; justify-content: center; }
.between { display: flex; align-items: center; justify-content: space-between; }

/* Logo lockup */
.moxie-logo .moxie-logo-light { display: block; }
.moxie-logo .moxie-logo-dark { display: none; }
[data-theme="dark"] .moxie-logo .moxie-logo-light { display: none; }
[data-theme="dark"] .moxie-logo .moxie-logo-dark { display: block; }

.moxie-mark {
  font-family: "Editorial New", "GT Sectra", Georgia, serif;
  font-weight: 400;
  font-size: 28px;
  letter-spacing: -0.025em;
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
}
.moxie-mark::after {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  display: inline-block;
  margin-bottom: 4px;
}

/* Scrollbar polish */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--line-2);
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover { background: var(--ink-4); }

/* Drawer */
.drawer-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 50;
  animation: fadeIn .2s ease;
}
[data-theme="dark"] .drawer-backdrop { background: rgba(0,0,0,.65); }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideIn { from { transform: translateX(100%); } to { transform: translateX(0); } }
.drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: min(540px, 92vw);
  background: var(--bg);
  border-left: 1px solid var(--line);
  z-index: 51;
  animation: slideIn .35s cubic-bezier(.2,.8,.2,1);
  display: flex; flex-direction: column;
  overflow-y: auto;
}

/* Page transitions */
.page-fade {
  animation: pageFade .35s ease;
}
@keyframes pageFade {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ─────────────────────────────────────────────────────────
   MOBILE RESPONSIVE
   Three breakpoints: tablet ≤960, mobile ≤640, small ≤420
   ───────────────────────────────────────────────────────── */

/* Helpers exposed to JSX inline styles via class names */
.grid-1-mobile { /* default desktop, overridden below */ }
.grid-2-mobile { }
.grid-1-tablet { }
.hide-mobile { }
.hide-desktop { display: none; }

@media (max-width: 960px) {
  .container, .container-wide { width: min(100% - 32px, 100%); }

  /* Footer collapses to 2-col on tablet, 1-col on phone */
  .moxie-footer-grid { grid-template-columns: 1fr 1fr !important; gap: 32px !important; }

  /* Project strip: 2 cards per view on tablet */
  .moxie-project-strip { grid-auto-columns: calc((100% - 28px) / 2) !important; }

  /* Cap section padding */
  body { font-size: 15.5px; }

  /* React renders camelCase JSX style props as kebab-case in the DOM,
     so attribute selectors must match the rendered form. */
  [style*="grid-template-columns: 1.4fr 1fr"],
  [style*="grid-template-columns: 1fr 2fr"],
  [style*="grid-template-columns: 2fr 1fr"],
  [style*="grid-template-columns: 1.6fr 1fr"],
  [style*="grid-template-columns: 1fr 1fr 1fr 1fr"],
  [style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
    gap: 32px !important;
  }
  [style*="grid-template-columns: repeat(8"] {
    grid-template-columns: repeat(4, 1fr) !important;
  }
  [style*="grid-template-columns: repeat(5"],
  [style*="grid-template-columns: repeat(4"] {
    grid-template-columns: repeat(3, 1fr) !important;
  }
  [style*="grid-template-columns: repeat(3"] {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  /* Linecard sticky filter rail — stack */
  .linecard-rail {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }
  .linecard-rail .linecard-filters {
    overflow-x: auto;
    flex-wrap: nowrap !important;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
    scrollbar-width: none;
  }
  .linecard-rail .linecard-filters::-webkit-scrollbar { display: none; }

  /* Hide desktop nav, show mobile menu button */
  .nav-desktop { display: none !important; }
  .nav-mobile-btn { display: flex !important; }

  /* Drawer goes nearly full-width on tablet */
  .drawer { width: min(540px, 100vw); }

  /* Buttons shrink */
  .btn { padding: 12px 18px; font-size: 13px; }

  /* List view in linecard collapses extra columns */
  .linecard-list-row {
    grid-template-columns: 1fr 24px !important;
    gap: 12px !important;
    padding: 14px 4px !important;
  }
  .linecard-list-row .linecard-list-blurb,
  .linecard-list-row .linecard-list-cats,
  .linecard-list-row .linecard-list-regions { display: none !important; }
}

/* Legal pages (#/terms, #/privacy, #/accessibility) — readable measure,
   numbered sections, headings clear of the sticky nav when jumped to. */
.legal-doc { max-width: 760px; padding: 56px 0 96px; color: var(--ink-2); font-size: 16px; line-height: 1.65; }
.legal-title { font-size: clamp(34px, 5vw, 52px); line-height: 1.05; letter-spacing: -0.02em; color: var(--ink); margin: 14px 0 8px; }
.legal-meta { font-size: 13px; color: var(--ink-3); margin: 0 0 24px; }
.legal-lead { font-size: 18px; color: var(--ink-2); margin: 0 0 28px; }
.legal-toc { border: 1px solid var(--line); border-radius: 14px; padding: 18px 22px; margin: 0 0 40px; background: var(--bg-elev); }
.legal-toc ol { list-style: none; margin: 0; padding: 0; columns: 2 240px; column-gap: 32px; }
.legal-toc li { margin: 0 0 8px; break-inside: avoid; }
.legal-section { margin: 0 0 32px; }
.legal-section h2 { font-size: 24px; letter-spacing: -0.01em; color: var(--ink); margin: 0 0 12px; scroll-margin-top: 96px; }
.legal-section p, .legal-section ul { margin: 0 0 14px; }
.legal-section ul { padding-left: 22px; }
.legal-section li { margin: 0 0 8px; }
.legal-placeholder { background: color-mix(in oklab, var(--accent) 30%, transparent); color: var(--ink); padding: 0 4px; border-radius: 4px; font-weight: 600; }
.legal-draft { border-top: 1px solid var(--line); padding-top: 18px; margin-top: 40px; }
.footer-legal a { white-space: nowrap; }

/* Rendered blog/highlight post body (HTML from the pipeline) */
.post-body { color: var(--ink-2); font-size: 16px; line-height: 1.65; }
.post-body p { margin: 0 0 16px; }
.post-body h1, .post-body h2, .post-body h3, .post-body h4 {
  font-family: "Fraunces", serif; color: var(--ink); letter-spacing: -0.01em;
  line-height: 1.2; margin: 28px 0 10px;
}
.post-body h2 { font-size: 22px; }
.post-body h3 { font-size: 18px; }
.post-body ul, .post-body ol { margin: 0 0 16px; padding-left: 22px; }
.post-body li { margin: 4px 0; }
.post-body a { color: var(--moxie-blue-text); text-decoration: underline; text-underline-offset: 2px; }
.post-body strong { color: var(--ink); font-weight: 600; }
.post-body img { max-width: 100%; height: auto; border-radius: 10px; margin: 12px 0; }
.post-body blockquote { margin: 16px 0; padding-left: 16px; border-left: 3px solid var(--line-2); color: var(--ink-3); font-style: italic; }

@media (max-width: 640px) {
  body { font-size: 15px; }
  .container, .container-wide { width: min(100% - 24px, 100%); }

  .moxie-footer-grid { grid-template-columns: 1fr !important; }

  /* Hero photos: stack vertically on phones so each image stays legible */
  .hero-photo-grid { grid-template-columns: 1fr !important; }
  .hero-photo-grid > a, .hero-photo-grid > div { height: min(52vh, 420px) !important; }

  /* Project strip: 1 card per view on phones; arrows hug the edges */
  .moxie-project-strip { grid-auto-columns: 100% !important; gap: 16px !important; }
  .moxie-strip-arrow { width: 36px; height: 36px; }

  [style*="grid-template-columns: repeat(8"] {
    grid-template-columns: repeat(3, 1fr) !important;
  }
  [style*="grid-template-columns: repeat(5"],
  [style*="grid-template-columns: repeat(4"] {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  [style*="grid-template-columns: repeat(3"] {
    grid-template-columns: 1fr !important;
  }

  /* Reduce vertical paddings on mobile - only when explicit */
  .pad-mobile-tight { padding-top: 48px !important; padding-bottom: 48px !important; }

  /* Rein in inline-styled sections with very large vertical padding.
     React serializes inline styles to kebab-case without quotes. */
  [style*="padding: 120px"],
  [style*="padding: 96px"] { padding-top: 56px !important; padding-bottom: 56px !important; }
  [style*="padding: 80px 0"] { padding-top: 48px !important; padding-bottom: 32px !important; }
  [style*="padding: 72px"] { padding: 36px !important; }
  [style*="padding-bottom: 120"] { padding-bottom: 60px !important; }

  /* Footer stack */
  footer [style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
    gap: 32px !important;
  }
  footer .between {
    flex-direction: column !important;
    gap: 12px !important;
    align-items: flex-start !important;
  }

  /* Type rein-in for big display text on small screens */
  .h-display { font-size: clamp(48px, 14vw, 96px); line-height: 0.92; }
  .h1 { font-size: clamp(40px, 11vw, 72px); }
  .h2 { font-size: clamp(28px, 8vw, 48px); }

  .marquee-item { font-size: clamp(40px, 14vw, 72px); gap: 32px; }
  .marquee-track { gap: 32px; }

  /* Tighter logo tiles */
  .logo-tile { padding: 10px; border-radius: 10px; }

  /* Drawer fills */
  .drawer { width: 100vw; border-left: none; }

  /* Linecard filter rail: on phones it stacks into four rows (~200px) — pinned
     under the nav it covered a third of the screen. It scrolls with the page
     instead; the results get the full viewport. */
  .linecard-rail-sticky { position: relative !important; top: auto !important; }

  /* Line-type panel: collapse columns */
  .linecard-types-groups { grid-template-columns: repeat(2, 1fr) !important; }
  .linecard-types-checklist { column-count: 2 !important; }

  /* Inputs slightly smaller */
  .input { padding: 12px 14px; font-size: 14.5px; }

  /* Nav becomes 60 tall */
  .nav-bar { height: 60px !important; }

  /* Hide things marked hide-mobile */
  .hide-mobile { display: none !important; }
  .hide-desktop { display: revert; }
}

@media (max-width: 420px) {
  [style*="grid-template-columns: repeat(8"],
  [style*="grid-template-columns: repeat(5"],
  [style*="grid-template-columns: repeat(4"] {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }
  .linecard-grid-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 10px !important; }
  .linecard-grid-dense { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; gap: 8px !important; }
  .linecard-types-groups { grid-template-columns: 1fr !important; }
  .linecard-types-checklist { column-count: 1 !important; }
}

/* Mobile-menu sheet (slides down from top) */
.nav-mobile-sheet {
  position: fixed;
  top: 0; left: 0; right: 0;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  /* Just under the sticky nav (z 30) so the nav bar — and its × close button,
     which keeps keyboard focus — stays visible above the open sheet. The 80px
     top padding already leaves room for it. */
  z-index: 29;
  padding: 80px 24px 32px;
  animation: sheetIn .25s cubic-bezier(.2,.8,.2,1);
  box-shadow: 0 24px 60px rgba(0,0,0,.18);
}
@keyframes sheetIn {
  from { transform: translateY(-100%); }
  to { transform: translateY(0); }
}
.nav-mobile-sheet a {
  display: block;
  padding: 18px 4px;
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.015em;
  border-bottom: 1px solid var(--line);
}
.nav-mobile-sheet a:last-of-type { border-bottom: none; }

/* Default: hide mobile menu button on desktop */
.nav-mobile-btn { display: none; }

/* Team page — compact hero, one-line filter bar, dense card grid. */
.team-hero-inner { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 20px 48px; align-items: end; padding: 48px 0 32px; }
.team-title { margin: 12px 0 0; font-size: clamp(34px, 4.2vw, 62px); line-height: .95; }
.team-title-italic { display: block; margin-top: 4px; font-size: .8em; font-style: italic; font-weight: 300; text-transform: none; letter-spacing: -0.02em; color: var(--moxie-blue-text); }
.team-intro { margin: 0; max-width: 520px; font-size: 16px; line-height: 1.55; color: var(--ink-2); }
.team-toolbar { position: sticky; top: 72px; z-index: 20; background: var(--bg); border-bottom: 1px solid var(--line); }
.team-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px 0; }
.team-search { flex: 0 1 280px; }
.team-toolbar .lc-search-input { height: 36px; padding: 0 14px 0 38px; border-radius: 999px; font-size: 13px; }
.team-bar-end { display: flex; align-items: center; gap: 16px; margin-left: auto; }
.team-section + .team-section { margin-top: 40px; }
.team-section-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.team-section-head h2 { margin: 0; font-size: 24px; font-weight: 400; letter-spacing: -0.01em; }
.team-section-head .mono { font-size: 12px; color: var(--ink-3); }
.team-section-sub { font-size: 13px; color: var(--ink-3); }
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: 14px; }
.team-card { position: relative; display: flex; flex-direction: column; min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-elev); transition: border-color .15s ease; }
.team-card:hover { border-color: var(--ink-3); }
.team-card-photo { position: relative; display: flex; align-items: center; justify-content: center; aspect-ratio: 1 / 1; overflow: hidden; }
.team-card-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity .25s ease; }
.team-card-initials { position: relative; font-size: 56px; line-height: 1; color: rgba(0, 0, 0, .4); }
.team-card-region { position: absolute; top: 8px; left: 8px; z-index: 2; padding: 3px 7px; border-radius: 999px; font-size: 9px; pointer-events: none; color: rgba(255, 255, 255, .95); background: rgba(0, 0, 0, .55); backdrop-filter: blur(4px); }
.team-card-region[data-photo="0"] { color: rgba(0, 0, 0, .6); background: transparent; backdrop-filter: none; }
.team-card-body { padding: 10px 12px 12px; }
.team-card-name { margin: 0; font-size: 17px; line-height: 1.15; letter-spacing: -0.01em; }
.team-card-role { margin-top: 4px; font-size: 12px; line-height: 1.35; color: var(--ink-2); }
.team-card-quirk { margin: 6px 0 0; overflow: hidden; font-size: 11.5px; font-style: italic; line-height: 1.4; color: var(--ink-3); white-space: nowrap; text-overflow: ellipsis; }
@media (max-width: 860px) {
  .team-hero-inner { grid-template-columns: minmax(0, 1fr); padding: 36px 0 24px; }
  .team-search { flex-basis: 100%; }
  .team-bar-end { margin-left: 0; }
}
@media (max-width: 640px) {
  .team-toolbar { position: static; }
  .team-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
}

/* ─────────────────────────────────────────────────────────
   ADMIN — mobile-friendly tweaks for /admin (Site editor)
   ───────────────────────────────────────────────────────── */
.admin-page .container { width: min(100% - 32px, 1360px); }
@media (max-width: 720px) {
  .admin-page .container { width: min(100% - 20px, 100%); }
  .admin-page section:first-of-type .container { padding: 20px 0 12px !important; }
  .admin-page section + section.container { padding: 20px 0 64px !important; }
  /* Header + editor toolbar: stack vertically */
  .admin-page .between {
    flex-direction: column;
    align-items: stretch !important;
    gap: 12px;
  }
  .admin-page .between > div:last-child,
  .admin-page .between > .flex {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }
  /* Toolbar buttons + filter — make filter take whatever's left */
  .admin-page .input { width: 100% !important; min-height: 40px; }
  .admin-page .between input.input { flex: 1 1 140px; }
  /* Touch-friendly buttons */
  .admin-page .btn { min-height: 40px; padding: 10px 14px !important; }
  .admin-page .chip { min-height: 36px; padding: 0 14px !important; }
  /* Tabs — let them scroll horizontally instead of wrapping awkwardly */
  .admin-page section:first-of-type .flex[style*="gap"] {
    flex-wrap: nowrap !important;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 -20px;
    padding: 0 20px 4px;
  }
  .admin-page section:first-of-type .flex[style*="gap"] .chip { flex: 0 0 auto; }
  /* Headings */
  .admin-page h1.serif { font-size: 28px !important; }
  .admin-page h2.serif { font-size: 22px !important; }
  /* Row body grid → single column */
  .admin-page .surface > div[style*="grid"] {
    grid-template-columns: 1fr !important;
    padding: 14px !important;
  }
  /* Banner editor preview text shouldn't overflow */
  .admin-page .surface div[style*="border-radius: 8"] { font-size: 12px !important; }
}

/* ─────────────────────────────────────────────────────────
   INLINE EDIT — only active when an admin toggles edit mode
   on the public site. Visitors never see these styles applied.
   ───────────────────────────────────────────────────────── */
body.moxie-edit-mode .moxie-editable {
  outline: 1px dashed transparent;
  outline-offset: 3px;
  cursor: text;
  border-radius: 3px;
  transition: outline-color .15s ease, background-color .15s ease;
}
body.moxie-edit-mode .moxie-editable:hover {
  outline-color: var(--moxie-blue);
  background-color: rgba(16, 179, 170, 0.10);
}
.moxie-edit-toggle {
  position: fixed; bottom: 24px; right: 24px; z-index: 9999;
  height: 44px; padding: 0 18px; border-radius: 999px;
  background: var(--ink); color: var(--bg); border: none;
  font-size: 13px; font-weight: 500;
  box-shadow: 0 4px 16px rgba(0,0,0,.18);
  cursor: pointer;
  transition: background-color .15s ease, transform .1s ease;
}
.moxie-edit-toggle:hover { transform: translateY(-1px); }
.moxie-edit-toggle.active { background: var(--moxie-blue); color: #fff; }
.moxie-edit-popover {
  position: absolute; z-index: 10000;
  background: var(--bg-elev); color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 12px; padding: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,.18);
}
.moxie-edit-meta {
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--ink-4);
}

/* Per-card edit/delete affordances. Hidden by default; only render when
   parent card is hovered in edit mode. Pos: absolute top-right of card. */
.moxie-card-actions {
  position: absolute; top: 8px; right: 8px; z-index: 5;
  display: flex; gap: 4px;
  opacity: 0; pointer-events: none;
  transition: opacity .15s ease;
}
body.moxie-edit-mode :hover > .moxie-card-actions,
body.moxie-edit-mode .surface:hover > .moxie-card-actions,
body.moxie-edit-mode > .moxie-card-actions {
  /* Always visible while hovering the immediate parent */
  opacity: 1; pointer-events: auto;
}
body.moxie-edit-mode .moxie-card-actions { opacity: 1; pointer-events: auto; }
.moxie-card-actions button {
  width: 28px; height: 28px; border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.96);
  color: var(--ink-2);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0,0,0,.08);
  transition: transform .1s ease, color .15s ease, border-color .15s ease;
}
.moxie-card-actions button:hover { transform: translateY(-1px); border-color: var(--ink-3); }
.moxie-card-actions button:last-child:hover { color: #c0392b; border-color: #c0392b; }

/* "+ Add new" button — appears at section ends when in edit mode. */
.moxie-add-row { margin: 24px 0; display: flex; justify-content: center; }
.moxie-add-btn {
  border: 1px dashed var(--line-2); background: transparent;
  color: var(--ink-2);
  height: 38px; padding: 0 18px; border-radius: 999px;
  font-size: 13px; font-weight: 500; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  transition: border-color .15s ease, color .15s ease, background-color .15s ease;
}
.moxie-add-btn:hover {
  border-color: var(--moxie-blue); color: var(--moxie-blue);
  background-color: rgba(16,179,170,.06);
}

/* Edit modal — full-form editor for one item. */
.moxie-modal-backdrop {
  position: fixed; inset: 0; z-index: 10000;
  background: rgba(14,14,14,.55);
  backdrop-filter: blur(2px);
}
.moxie-modal {
  position: fixed; z-index: 10001;
  top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: min(720px, calc(100vw - 32px));
  max-height: calc(100vh - 64px);
  background: var(--bg-elev); color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,.35);
  display: flex; flex-direction: column;
  overflow: hidden;
}
.moxie-modal-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-sunk);
}
.moxie-modal-body {
  padding: 20px 22px;
  overflow: auto;
  flex: 1 1 auto;
}
.moxie-modal-footer {
  display: flex; align-items: center; gap: 8px;
  padding: 14px 22px;
  border-top: 1px solid var(--line);
  background: var(--bg-sunk);
}

/* Events calendar — month grid view for the Events page. */
/* Project carousel strip — horizontal scroll arrows that float over the track
   edges. Always visible (not just on hover) since the strip is non-obvious
   without an affordance. Disabled state fades. */
.moxie-strip-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px; height: 44px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg-elev);
  color: var(--ink);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 12px rgba(0,0,0,.08);
  transition: background .15s ease, opacity .15s ease, transform .15s ease;
  z-index: 5;
}
.moxie-strip-arrow:hover { background: var(--ink); color: var(--bg); }
.moxie-strip-arrow:disabled { opacity: 0.3; cursor: default; }
.moxie-strip-arrow:disabled:hover { background: var(--bg-elev); color: var(--ink); }

/* Hide the native scrollbar on the strip — desktop will scroll via arrows or
   trackpad-pan; mobile uses swipe gestures. */
.moxie-project-strip {
  scrollbar-width: none;
}
.moxie-project-strip::-webkit-scrollbar { display: none; }

/* Brand link tile inside ProjectDrawer — subtle lift on hover so the user
   reads it as clickable. */
.moxie-brand-link[href]:hover {
  border-color: var(--ink-3);
  transform: translateY(-1px);
}

/* Project carousel arrows — hidden until hover so the image breathes. The
   browser focus ring still surfaces them for keyboard users. */
.moxie-carousel-arrow {
  width: 32px; height: 32px;
  border-radius: 999px;
  border: none;
  background: rgba(0,0,0,.55);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity .15s ease, background .15s ease;
  z-index: 2;
}
.moxie-carousel-arrow:hover { background: rgba(0,0,0,.8); }
.moxie-project-carousel:hover .moxie-carousel-arrow,
.moxie-project-carousel:focus-within .moxie-carousel-arrow,
.moxie-carousel-arrow:focus-visible { opacity: 1; }

/* Event list cards — equal height, image area at fixed 16:9, title clamped to
   2 lines and description clamped to 3, button row pinned to the bottom via
   the inline flex layout. This makes a card with a long description and one
   without visually align. */
.moxie-event-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.18;
}
.moxie-event-desc {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.5;
}

/* Events toolbar — plain text toggles. On = ink + underline (not color
   alone, WCAG 1.4.1); no pills, no per-type tints. */
.ev-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 32px; padding: 14px 0; }
.ev-group { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; }
.ev-end { margin-left: auto; }
.ev-label { font-size: 13px; color: var(--ink-3); }
.ev-tab {
  min-height: 32px; padding: 4px 0;
  border: 0; border-bottom: 2px solid transparent; border-radius: 0;
  background: none; color: var(--ink-2);
  font: inherit; font-size: 14px; font-weight: 500; cursor: pointer;
  transition: color .15s ease, border-color .15s ease;
}
.ev-tab:hover { color: var(--ink); border-bottom-color: var(--line-2); }
.ev-tab[aria-pressed="true"] { color: var(--ink); border-bottom-color: var(--ink); }
.ev-clear { color: var(--moxie-blue-text); }
.ev-count { font-size: 13px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.ev-divider { width: 1px; height: 18px; background: var(--line-2); }
.events-toolbar .ev-date { width: 150px; height: 32px; padding: 0 10px; border-radius: 8px; font-size: 13px; }

/* Event cards — open editorial layout: photo, a quiet meta line, serif
   title, text links. No card box or colored edge. */
.ev-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 56px 32px; }
.ev-card { position: relative; display: flex; flex-direction: column; min-width: 0; }
.ev-media { aspect-ratio: 3 / 2; margin-bottom: 18px; border-radius: 6px; overflow: hidden; background: var(--bg-sunk); }
.ev-media img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.ev-card:hover .ev-media img { transform: scale(1.025); }
.ev-media-fallback { display: flex; align-items: flex-end; height: 100%; padding: 20px 22px; }
.ev-media-fallback span { font-size: clamp(40px, 4vw, 56px); line-height: 1; letter-spacing: -0.02em; color: var(--ink-2); }
.ev-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-3); }
.ev-flag { margin-right: 4px; padding: 1px 6px; border-radius: 2px; background: var(--accent); color: var(--accent-ink); font-size: 12px; font-weight: 600; }
.ev-title { margin: 8px 0 6px; font-size: 25px; line-height: 1.15; letter-spacing: -0.01em; }
.ev-card:hover .moxie-event-title { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.ev-host { margin: 0; font-size: 14px; color: var(--ink-3); }
.ev-desc { margin: 10px 0 0; font-size: 14px; color: var(--ink-2); }
.ev-actions { position: relative; z-index: 2; display: flex; align-items: center; gap: 22px; margin-top: auto; padding-top: 16px; }
.ev-link {
  display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 2px 0;
  border: 0; background: none; color: var(--ink);
  font: inherit; font-size: 14px; font-weight: 500; cursor: pointer;
  text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 4px;
}
.ev-link:hover { text-decoration-color: currentColor; }
.ev-link-strong { color: var(--moxie-blue-text); text-decoration-color: currentColor; }
@media (max-width: 960px) { .ev-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .ev-grid { grid-template-columns: 1fr; gap: 44px; }
  .ev-end { margin-left: 0; }
}

.events-cal { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--bg-elev); }
.events-cal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px;
  background: var(--bg-sunk);
  border-bottom: 1px solid var(--line);
}
.events-cal-grid {
  display: grid;
  /* minmax(0, 1fr) keeps a long event title from blowing out its column —
     without it the column expands to fit content and bleeds into siblings. */
  grid-template-columns: repeat(7, minmax(0, 1fr));
  background: var(--line);
  gap: 1px;
}
.events-cal-dow {
  background: var(--bg-sunk);
  padding: 10px 12px;
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--ink-3);
  min-width: 0;
}
.events-cal-day {
  background: var(--bg-elev);
  /* Uniform rows at normal text settings; min-height (not height) so a cell
     can grow instead of clipping pills under user text-spacing overrides
     (WCAG 1.4.12). The "+N more" pill switches to that day's list view. */
  min-height: 132px;
  padding: 8px 8px 10px;
  display: flex; flex-direction: column; gap: 4px;
  position: relative;
  min-width: 0;
  overflow: hidden;
}
.events-cal-more {
  font-size: 10px;
  color: var(--ink-3);
  font-family: "JetBrains Mono", monospace;
  background: transparent;
  border: none;
  text-align: left;
  padding: 0 4px;
  cursor: pointer;
}
.events-cal-more:hover { color: var(--moxie-blue-text); }
.events-cal-day.out { background: color-mix(in oklab, var(--bg-elev) 80%, var(--bg-sunk) 20%); color: var(--ink-4); }
.events-cal-day.today { background: color-mix(in oklab, var(--moxie-yellow) 12%, var(--bg-elev) 88%); }
.events-cal-day.today .events-cal-num { color: var(--ink); font-weight: 600; }   /* accent-ink vanished on the dark-mode tint */
.events-cal-num {
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-3);
  font-family: "JetBrains Mono", monospace;
}
.events-cal-day.out .events-cal-num { opacity: 0.55; }
.events-cal-event {
  display: block;
  background: var(--moxie-blue-soft);
  color: var(--region-nyc-ink);   /* 8.6:1 light / 9.3:1 dark; moxie-blue-deep failed both */
  font-size: 11px;
  line-height: 1.25;
  padding: 4px 6px;
  border-radius: 4px;
  text-decoration: none;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  border: 1px solid transparent;
  transition: border-color .15s ease, background-color .15s ease;
}
.events-cal-event:hover { border-color: var(--moxie-blue); background: color-mix(in oklab, var(--moxie-blue-soft) 70%, var(--moxie-blue) 10%); }

@media (max-width: 720px) {
  .events-cal-day { min-height: 78px; padding: 4px; }
  .events-cal-event { font-size: 9px; padding: 2px 4px; }
  .events-cal-dow { padding: 6px 4px; font-size: 9px; }
  .events-cal-more { font-size: 9px; }
}

/* Hide all inline-list editing affordances on mobile — admin tabs cover this. */
@media (max-width: 720px) {
  .moxie-card-actions, .moxie-add-row { display: none !important; }
  .moxie-modal { width: 100vw; height: 100vh; max-height: 100vh; border-radius: 0; transform: none; top: 0; left: 0; }
}

/* ─────────────────────────────────────────────────────────
   PRINT — clean linecard export when "Export → PDF" fires
   document.body.classList.add("printing-linecard") then window.print()
   ───────────────────────────────────────────────────────── */
@media print {
  /* Force light theme regardless of current toggle */
  :root, [data-theme="dark"] {
    --bg: #ffffff !important;
    --bg-elev: #ffffff !important;
    --bg-sunk: #f7f7f4 !important;
    --ink: #000000 !important;
    --ink-2: #1a1a1a !important;
    --ink-3: #555 !important;
    --ink-4: #888 !important;
    --line: #ddd !important;
    --line-2: #bbb !important;
  }
  body { background: #fff !important; color: #000 !important; }
  body.printing-linecard nav,
  body.printing-linecard footer,
  body.printing-linecard .linecard-rail-sticky,
  body.printing-linecard .nav-mobile-sheet,
  body.printing-linecard .drawer,
  body.printing-linecard .drawer-backdrop { display: none !important; }
  /* Hide the line-type panel + active filter chips + result toolbar */
  body.printing-linecard section[style*="background: var(--bg-sunk)"]:not(.print-keep),
  body.printing-linecard .linecard-rail,
  body.printing-linecard .linecard-types-checklist,
  body.printing-linecard .linecard-sort-view { display: none !important; }
  body.printing-linecard .marquee-track { display: none !important; }
  body.printing-linecard .page-fade { animation: none !important; }
  /* Tighter logo grid for print */
  body.printing-linecard .linecard-grid-tiles {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }
  body.printing-linecard .linecard-grid-dense {
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
    gap: 6px !important;
  }
  body.printing-linecard .logo-tile-card {
    page-break-inside: avoid;
    break-inside: avoid;
    box-shadow: none !important;
    transform: none !important;
  }
  /* List-view export: keep blurb + region columns visible */
  body.printing-linecard .linecard-list-row .linecard-list-blurb,
  body.printing-linecard .linecard-list-row .linecard-list-cats,
  body.printing-linecard .linecard-list-row .linecard-list-regions { display: block !important; }
  body.printing-linecard .linecard-list-row { page-break-inside: avoid; break-inside: avoid; }
  /* Page setup */
  @page { margin: 12mm; }
  body.printing-linecard h1 { font-size: 24pt !important; }
}
