/* Jamigos — clean minimal, editorial. Hand-written, offline, no framework.
   Light near-white canvas, ink text, one deep warm-orange accent, serif display. */

:root {
  --bg: #fafaf9;
  --surface: #ffffff;
  --ink: #1c1917;
  --text-secondary: #57534e;
  --text-muted: #79716b;
  --hairline: #e7e5e4;
  --hairline-strong: #d6d3d1;
  --accent: #c2410c;
  --accent-ink: #9a3412;
  --accent-soft: #fff7ed;
  --accent-border: #fddcba;
  --danger: #b91c1c;
  --danger-soft: #fef2f2;
  --on-accent: #ffffff;
  --fab-shadow: rgba(28, 25, 23, 0.22);
  --nav-backdrop: rgba(250, 250, 249, 0.92);
  --chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 4l4 4 4-4' fill='none' stroke='%2357534e' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
  --radius: 10px;

  --text-0: 0.75rem;   /* 12px */
  --text-1: 0.875rem;  /* 14px */
  --text-2: 1rem;      /* 16px */
  --text-3: 1.25rem;   /* 20px */
  --text-4: 1.75rem;   /* 28px */
  --text-5: 2.5rem;    /* 40px */

  --space-1: 0.25rem;  /* 4px */
  --space-2: 0.5rem;   /* 8px */
  --space-3: 0.75rem;  /* 12px */
  --space-4: 1rem;     /* 16px */
  --space-5: 1.25rem;  /* 20px */
  --space-6: 1.5rem;   /* 24px */
  --space-7: 2rem;     /* 32px */
  --space-8: 2.5rem;   /* 40px */
  --space-9: 3rem;     /* 48px */
  --space-10: 4rem;    /* 64px */

  --width-narrow: 28rem;   /* auth/confirm centered cards */
  --width-form: 40rem;     /* create/edit form pages */
  --width-profile: 36rem;  /* profile card */

  --tracking-wide: 0.12em; /* overlines & fact labels */

  --font-display: Charter, 'Bitstream Charter', 'Sitka Text', Cambria, Georgia, serif;
  --font-ui: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Dark mode follows the OS — same tokens, night palette. No toggle, no JS:
   if members want one, the idea box will say so. */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #171512;
    --surface: #201d1a;
    --ink: #f3efe9;
    --text-secondary: #c6beb4;
    --text-muted: #958b80;
    --hairline: #2f2b27;
    --hairline-strong: #433d37;
    --accent: #fb923c;
    --accent-ink: #fdba74;
    --accent-soft: #2f1f12;
    --accent-border: #5a3a1d;
    --danger: #f87171;
    --danger-soft: #3a1c1c;
    --on-accent: #1c1917;
    --fab-shadow: rgba(0, 0, 0, 0.55);
    --nav-backdrop: rgba(23, 21, 18, 0.88);
    --chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 4l4 4 4-4' fill='none' stroke='%23c6beb4' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; color-scheme: light dark; }

body {
  font-family: var(--font-ui);
  font-size: var(--text-2);
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  margin: 0;
  -webkit-font-smoothing: antialiased;
}
/* A 40-letter venue or a pasted calendar URL must never push the page
   sideways on a phone — break it rather than scroll it. Scoped to page
   content: nav, labels, pills and buttons keep their words whole (at tablet
   widths flex shrinking would otherwise split "Sessions" mid-word). */
main { overflow-wrap: anywhere; }
dt, .pill, .btn, .overline { overflow-wrap: normal; }

h1, h2, h3, .display {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.15;
  color: var(--ink);
  margin: 0 0 var(--space-2);
}
h1 { font-size: var(--text-5); }
h2 { font-size: var(--text-4); }
h3 { font-size: var(--text-3); }
p { margin: 0 0 var(--space-4); }

hr { border: 0; border-top: 1px solid var(--hairline); margin: var(--space-6) 0; }

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-ink); text-decoration: underline; }

.prose, .lead { max-width: 65ch; }
.lead { font-size: var(--text-3); line-height: 1.5; color: var(--text-secondary); }

.muted { color: var(--text-muted); }
.small { font-size: var(--text-1); }

/* ---------- layout ---------- */

.container { max-width: 72rem; margin: 0 auto; padding: 0 var(--space-5) var(--space-10); }
main.container { padding-top: var(--space-8); }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: var(--bg); padding: var(--space-2) var(--space-4);
  border-radius: 0 0 var(--radius) 0; z-index: 100;
}
.skip-link:focus { left: 0; color: var(--bg); }

/* ---------- soundbars (the signature mark) ---------- */
/* A five-bar equalizer, pure CSS. Nav: the wordmark's logo. Hero: the one
   animated moment on the site. Footer: a static sign-off. Everything else
   stays quiet so this one motif carries the identity. */

.soundbars {
  display: inline-flex; align-items: flex-end; gap: 3px;
  /* Sits on the baseline, tallest bar at cap height, so it reads as a glyph
     in the wordmark rather than a badge hanging off it. */
  height: 0.72em; vertical-align: baseline;
}
/* Standalone (hero, footer): a block, so no line-box slop around the bars. */
.soundbars-block { display: flex; }
.soundbars i {
  width: 3px; border-radius: 2px; background: var(--accent);
  transform-origin: bottom;
}
.soundbars i:nth-child(1) { height: 45%; }
.soundbars i:nth-child(2) { height: 90%; }
.soundbars i:nth-child(3) { height: 60%; }
.soundbars i:nth-child(4) { height: 100%; }
.soundbars i:nth-child(5) { height: 35%; }

@keyframes soundbar-pulse {
  0%, 100% { transform: scaleY(0.55); }
  50% { transform: scaleY(1); }
}
.soundbars-live { height: 1.75rem; gap: 4px; }
.soundbars-live i { width: 4px; animation: soundbar-pulse 1.5s ease-in-out infinite; }
.soundbars-live i:nth-child(1) { animation-delay: -0.30s; }
.soundbars-live i:nth-child(2) { animation-delay: -0.90s; }
.soundbars-live i:nth-child(3) { animation-delay: -0.15s; }
.soundbars-live i:nth-child(4) { animation-delay: -0.60s; }
.soundbars-live i:nth-child(5) { animation-delay: -1.20s; }
/* the wordmark starts playing on hover */
.brand:hover .soundbars i { animation: soundbar-pulse 1.5s ease-in-out infinite; }
.brand:hover .soundbars i:nth-child(2) { animation-delay: -0.9s; }
.brand:hover .soundbars i:nth-child(3) { animation-delay: -0.15s; }
.brand:hover .soundbars i:nth-child(4) { animation-delay: -0.6s; }
.brand:hover .soundbars i:nth-child(5) { animation-delay: -1.2s; }

/* ---------- nav ---------- */

.site-nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3) var(--space-7);
  padding: var(--space-3) var(--space-5);
  background: var(--nav-backdrop);
  backdrop-filter: saturate(1.4) blur(6px);
  border-bottom: 1px solid var(--hairline);
}
.brand {
  display: inline-flex; align-items: baseline; gap: var(--space-2);
  font-family: var(--font-display);
  font-size: var(--text-3); font-weight: 700; letter-spacing: -.02em;
  color: var(--ink);
}
.brand:hover { color: var(--accent); text-decoration: none; }
.beta-tag {
  align-self: center;
  font-family: var(--font-ui);
  font-size: var(--text-0); font-weight: 500;
  letter-spacing: var(--tracking-wide); text-transform: uppercase;
  color: var(--accent-ink);
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  border-radius: 999px;
  padding: 0 var(--space-2);
}
.nav-links { display: flex; gap: var(--space-5); }
.nav-links a { color: var(--text-secondary); font-size: var(--text-1); font-weight: 500; white-space: nowrap; }
.brand, .nav-me { white-space: nowrap; }
.nav-links a:hover { color: var(--ink); text-decoration: none; }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: var(--space-3); }
.nav-me {
  display: inline-flex; align-items: center; gap: var(--space-2);
  color: var(--ink); font-size: var(--text-1); font-weight: 500;
  padding: var(--space-1) var(--space-3) var(--space-1) var(--space-1);
  border: 1px solid transparent; border-radius: 999px;
}
.nav-me:hover { border-color: var(--hairline-strong); text-decoration: none; background: var(--surface); }

/* Phones: brand + account on the first row, the links on a second row that
   scrolls sideways (no wrapping, no JS menu). The row bleeds to the screen
   edge so a half-visible last link hints that there is more. The name next
   to the avatar collapses to screen readers only — the avatar is the link. */
@media (max-width: 640px) {
  .site-nav { flex-wrap: wrap; gap: var(--space-1) var(--space-3); padding: var(--space-2) var(--space-4) 0; }
  .nav-links {
    order: 3; flex: 0 0 calc(100% + 2 * var(--space-4));
    gap: var(--space-5); overflow-x: auto; scrollbar-width: none;
    margin: 0 calc(-1 * var(--space-4)); padding: 0 var(--space-4);
  }
  .nav-links::-webkit-scrollbar { display: none; }
  .nav-links a { flex-shrink: 0; white-space: nowrap; padding: var(--space-2) 0 var(--space-3); }
  .nav-right { margin-left: auto; gap: var(--space-2); }
  .nav-bell { width: 2.75rem; height: 2.75rem; }  /* 44px tap target */
  .nav-me { padding: var(--space-1); }
  .nav-name {
    position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
  }
}

/* ---------- buttons ----------
   One base, three intents (primary / ghost / danger), three sizes
   (btn-sm / default / btn-big). Every variant carries the same 1px border so
   a ghost and a primary side by side are exactly the same box. */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  font-family: var(--font-ui); font-size: var(--text-1); font-weight: 600; line-height: 1.2;
  min-height: 2.5rem; padding: var(--space-2) var(--space-5);
  border: 1px solid transparent; border-radius: var(--radius);
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s, transform 0.1s;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-ink); border-color: var(--accent-ink); color: var(--on-accent); }
.btn-ghost { background: var(--surface); border-color: var(--hairline-strong); color: var(--ink); }
.btn-ghost:hover { background: var(--accent-soft); border-color: var(--accent-border); color: var(--accent-ink); }
.btn-danger { background: var(--surface); border-color: var(--danger); color: var(--danger); }
.btn-danger:hover { background: var(--danger-soft); color: var(--danger); }
.btn-sm { min-height: 2rem; padding: var(--space-1) var(--space-3); font-size: var(--text-0); }
.btn-big { min-height: 3rem; font-size: var(--text-2); padding: var(--space-3) var(--space-6); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; transform: none; }

/* Quiet text links that act as buttons (host tools, in-line actions). */
.text-action { font-weight: 600; font-size: var(--text-1); }
.text-action:hover { text-decoration: underline; }
.text-danger { color: var(--danger); font-weight: 600; font-size: var(--text-1); }
.text-danger:hover { color: var(--danger); text-decoration: underline; }
.inline-form { display: inline; }

/* ---------- focus ---------- */

a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ---------- forms ---------- */

input, select, textarea {
  font-family: var(--font-ui); font-size: var(--text-2); color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--hairline-strong); border-radius: var(--radius);
  padding: var(--space-3) var(--space-4); width: 100%;
}
input:hover, select:hover, textarea:hover { border-color: var(--text-muted); }
select {
  appearance: none; -webkit-appearance: none; cursor: pointer;
  padding-right: var(--space-8);
  background-image: var(--chevron); background-repeat: no-repeat;
  background-position: right var(--space-4) center; background-size: 12px;
}
input::placeholder, textarea::placeholder { color: var(--text-muted); }
textarea { resize: vertical; }
input[type="search"] { -webkit-appearance: none; appearance: none; }
/* iOS gives date/time inputs an intrinsic width and ignores width: 100%
   unless the native look is dropped — and then collapses their height. */
input[type="datetime-local"], input[type="date"], input[type="time"] {
  display: block; min-width: 0; max-width: 100%; min-height: 2.75rem;
  -webkit-appearance: none; appearance: none;
}

.field { margin-bottom: var(--space-5); }
.field label { display: block; font-weight: 600; font-size: var(--text-1); margin-bottom: var(--space-1); }
.field .help, .help { display: block; font-size: var(--text-0); color: var(--text-muted); margin-top: var(--space-1); }
.field .error { color: var(--danger); font-size: var(--text-1); margin: var(--space-1) 0 0; }
.field-compact { margin-bottom: var(--space-3); }

/* intent picker: one radio card per kind of jam, each with a plain-words blurb */
.intent-field { border: 0; padding: 0; margin: 0 0 var(--space-5); }
.intent-field > legend { font-weight: 600; font-size: var(--text-1); margin-bottom: var(--space-2); padding: 0; }
.intent-choice {
  display: flex; gap: var(--space-3); align-items: flex-start;
  padding: var(--space-3) var(--space-4); margin-bottom: var(--space-2);
  border: 1px solid var(--hairline-strong); border-radius: var(--radius);
  background: var(--surface); cursor: pointer;
}
.intent-choice:hover { border-color: var(--accent-border); }
.intent-choice:has(:checked) { border-color: var(--accent); background: var(--accent-soft); }
.intent-choice input[type="radio"] { width: auto; margin: .3em 0 0; flex-shrink: 0; accent-color: var(--accent); }
.intent-choice .intent-text { display: flex; flex-direction: column; gap: var(--space-1); }
.intent-choice .help { margin-top: 0; }

/* tentative set list on the jam page */
.setlist-block { margin: var(--space-5) 0; }
.setlist { margin: var(--space-2) 0 var(--space-2); padding-left: var(--space-6); }
.setlist li { margin-bottom: var(--space-1); }

/* min-width: 0 — Chrome gives fieldsets min-content width, which lets a
   wide child push the form sideways on phones */
fieldset { border: 0; padding: 0; margin: 0 0 var(--space-7); min-width: 0; }
legend { padding: 0; margin-bottom: var(--space-4); }

/* ---------- cards & pills ---------- */

.card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: var(--space-6);
  transition: border-color 0.15s;
}
a.card:hover, .card.hoverable:hover { border-color: var(--hairline-strong); }

/* Card pages (forms, sign-in, confirmations, idea box) all sit centered,
   the same distance from the nav, so moving between them feels like one
   place rather than four. */
.form-card { max-width: var(--width-form); margin: 0 auto; }

.overline {
  display: block;
  font-size: var(--text-0); font-weight: 600;
  text-transform: uppercase; letter-spacing: var(--tracking-wide);
  color: var(--text-muted);
  margin-bottom: var(--space-2);
}

.pill {
  display: inline-block;
  font-size: var(--text-0); font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg);
  border: 1px solid var(--hairline);
  border-radius: 999px;
  padding: var(--space-1) var(--space-3);
  margin: 0 var(--space-1) var(--space-1) 0;
}
.pill-accent { color: var(--accent-ink); background: var(--accent-soft); border-color: var(--accent-border); }
.pills { margin-bottom: var(--space-3); }

/* ---------- avatars ---------- */

.avatar {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2rem; height: 2rem; font-size: 1.125rem;
  background: var(--bg); border: 1px solid var(--hairline);
  border-radius: 999px; overflow: hidden; flex-shrink: 0;
}
.avatar-lg { width: 3rem; height: 3rem; font-size: 1.5rem; }
.avatar-xl { width: 4rem; height: 4rem; font-size: 2rem; }
/* A cluster of two or three emoji shares the same circle: glyphs shrink
   and tuck together so 🎸🎤 reads as one mark, not a marquee. */
.avatar[data-glyphs="2"] { font-size: .7em; letter-spacing: -.15em; padding-right: .1em; }
.avatar[data-glyphs="3"] { font-size: .5em; letter-spacing: -.2em; padding-right: .15em; }
.avatar-lg[data-glyphs="2"] { font-size: 1rem; }
.avatar-lg[data-glyphs="3"] { font-size: .8rem; }
.avatar-xl[data-glyphs="2"] { font-size: 1.4rem; }
.avatar-xl[data-glyphs="3"] { font-size: 1.05rem; }

/* ---------- flash messages ---------- */

.flash-group { margin-bottom: var(--space-6); }
.flash {
  padding: var(--space-3) var(--space-4); border-radius: var(--radius);
  border: 1px solid var(--hairline); background: var(--surface);
  font-size: var(--text-1); color: var(--text-secondary);
  margin-bottom: var(--space-2);
}
.flash.success { border-left: 3px solid var(--accent); }
.flash.error { border-left: 3px solid var(--danger); background: var(--danger-soft); color: var(--danger); }
.flash.info { border-left: 3px solid var(--hairline-strong); }
.flash .error, p.error { color: var(--danger); }

/* ---------- grids ---------- */

.card-grid {
  display: grid; gap: var(--space-5);
  grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr));
}

/* "Load more jams" appender lives inside the grid as a full-width row */
.load-more { grid-column: 1 / -1; justify-self: center; margin-top: var(--space-4); }

.value-grid {
  display: grid; gap: var(--space-5);
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
}

/* ---------- hero / page header ---------- */

.hero, .page-header { max-width: 65ch; margin-bottom: var(--space-9); }
.hero h1, .page-header h1 { margin-bottom: var(--space-4); }
.hero h1 { font-size: clamp(2rem, 9vw, 3.25rem); text-wrap: balance; }
.hero .soundbars-live { margin-bottom: var(--space-3); }
.hero-actions, .page-actions {
  display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center;
  margin-top: var(--space-6);
}
.page-actions { margin-top: var(--space-7); }

.page-head {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: var(--space-3) var(--space-6); max-width: none;
}
.page-head h1 { margin: 0; }
/* The page's main call to action sits at the right edge, full size — not a
   small button lost at the baseline of a big serif heading. */
.page-head-cta { margin-left: auto; }
/* .meta-line zeroes margins below; the extra selector keeps the breathing room */
.card-grid + .host-nudge, .host-nudge.meta-line { margin-top: var(--space-8); text-align: center; }

/* ---------- session cards ---------- */

.session-card { display: flex; flex-direction: column; gap: var(--space-2); }
.session-card h3 { margin: 0; }
/* the date is the decision datum — it leads in ink */
.session-card .when { color: var(--ink); font-weight: 600; }
/* the footer meta sits under a ticket-stub tear line */
.session-card .mt-auto { border-top: 1px dashed var(--hairline-strong); padding-top: var(--space-2); }
.session-card h3 a { color: var(--ink); }
.session-card h3 a:hover { color: var(--accent); text-decoration: none; }
/* emoji + name travel together: if the line is too short, the whole
   "🎤 Ífe" wraps, never the name alone */
.host-link {
  white-space: nowrap;
  /* …and an 80-letter name truncates rather than widening the card */
  display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom;
}
.meta-line { font-size: var(--text-1); color: var(--text-secondary); margin: 0; }
.meta-line .muted { color: var(--text-muted); }

/* ---------- filter bar ---------- */

.filter-bar {
  display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center;
  margin-bottom: var(--space-7);
}
.filter-bar input[type="search"] { flex: 1 1 220px; width: auto; }
.filter-bar select { flex: 0 1 auto; width: auto; }
/* compact on desktop; phones restore 16px text (below that iOS zooms on focus) */
.filter-bar input, .filter-bar select { min-height: 2.5rem; padding-top: var(--space-2); padding-bottom: var(--space-2); font-size: var(--text-1); }
.hero .filter-bar { margin-top: var(--space-7); margin-bottom: 0; }

/* On the list page the bar becomes one quiet control group. */
.filter-panel {
  padding: var(--space-4); background: var(--surface);
  border: 1px solid var(--hairline); border-radius: var(--radius);
}
/* A non-default choice lights up its select, so active filters are visible at a glance. */
.filter-panel select:has(option:checked:not([value=""])):not([name="when"]),
.filter-panel select[name="when"]:has(option[value="past"]:checked),
.filter-panel input[type="search"]:not(:placeholder-shown) {
  border-color: var(--accent); background-color: var(--accent-soft);
}
.filter-clear { margin-left: var(--space-3); white-space: nowrap; }
@media (max-width: 640px) {
  .filter-panel { display: grid; grid-template-columns: 1fr 1fr; }
  .filter-panel input[type="search"], .filter-panel .btn { grid-column: 1 / -1; }
  .filter-panel select { width: 100%; }
  .filter-bar input, .filter-bar select { font-size: var(--text-2); min-height: 2.75rem; }
  .filter-bar .btn { flex: 1 1 100%; }
}

.result-count { font-size: var(--text-1); color: var(--text-muted); margin-bottom: var(--space-5); }

/* ---------- htmx indicators ---------- */

.htmx-indicator { display: none; font-size: var(--text-1); color: var(--text-muted); }
.htmx-request .htmx-indicator, .htmx-request.htmx-indicator { display: inline; }

/* ---------- session detail ---------- */

.detail-layout { display: grid; gap: var(--space-8); grid-template-columns: 1fr; align-items: start; }
@media (min-width: 900px) {
  .detail-layout { grid-template-columns: 1fr 340px; }
}
.detail-main { max-width: 65ch; display: flex; flex-direction: column; gap: var(--space-7); }
.detail-main > * { margin: 0; }
.detail-aside { display: flex; flex-direction: column; gap: var(--space-5); }

/* Page head: who/what, then when and where — the two things a buddy
   scans for — set large and in ink, not tucked into a muted meta line. */
.detail-head h1 { margin-bottom: var(--space-4); }
.detail-when { margin: 0; font-size: var(--text-3); font-weight: 600; color: var(--ink); line-height: 1.35; }
.detail-where { margin: var(--space-1) 0 0; font-size: var(--text-2); color: var(--text-secondary); }
.detail-head .pills { margin: var(--space-4) 0 0; }
.detail-section .overline { margin-bottom: var(--space-3); }
.prose-lead { font-size: 1.0625rem; line-height: 1.65; }
.prose-lead + .vibe { margin-top: var(--space-5); }

.fact-list { margin: 0; }

.fact-row { display: flex; gap: var(--space-4); padding: var(--space-3) 0; border-bottom: 1px solid var(--hairline); font-size: var(--text-1); line-height: 1.5; }
.fact-row:first-child { padding-top: 0; }
.fact-row:last-child { border-bottom: 0; }
.fact-row dt { flex: 0 0 var(--space-10); font-weight: 600; text-transform: uppercase; letter-spacing: var(--tracking-wide); font-size: var(--text-0); color: var(--text-secondary); padding-top: 0.2em; }
.fact-row dd { margin: 0; color: var(--ink); }

.capacity-block { margin-top: var(--space-5); padding-top: var(--space-4); border-top: 1px solid var(--hairline); }
.capacity-line { margin: 0; font-size: var(--text-1); color: var(--text-secondary); }
.capacity-line strong { color: var(--ink); }

/* Segmented like channel LEDs on a mixing desk — seats read as cells.
   A native <meter> so the fill needs no inline style; browsers without
   mask support gracefully fall back to a continuous bar. */
.capacity-meter {
  display: block; width: 100%; height: 8px; background: var(--hairline);
  border: 0; border-radius: 0; overflow: hidden; margin: var(--space-3) 0 0;
  -webkit-appearance: none; appearance: none;
  -webkit-mask-image: repeating-linear-gradient(90deg, #000 0 14px, transparent 14px 18px);
  mask-image: repeating-linear-gradient(90deg, #000 0 14px, transparent 14px 18px);
}
.capacity-meter::-webkit-meter-bar { background: var(--hairline); border: 0; border-radius: 0; }
.capacity-meter::-webkit-meter-optimum-value,
.capacity-meter::-webkit-meter-suboptimum-value,
.capacity-meter::-webkit-meter-even-less-good-value { background: var(--accent); }
.capacity-meter::-moz-meter-bar { background: var(--accent); }

/* A button that reads as a text link — for quiet, in-list actions
   (remove a buddy, take down a post) that must still be POSTs. */
.btn-link {
  background: none; border: 0; padding: 0; font: inherit; cursor: pointer;
  color: var(--text-muted); font-size: var(--text-0); text-decoration: underline;
}
.btn-link:hover { color: var(--danger); }
.push-right { margin-left: auto; }

.buddy { display: inline-flex; align-items: center; gap: var(--space-2); color: var(--ink); font-weight: 500; }
.buddy:hover { color: var(--accent); text-decoration: none; }
.attendee-list { list-style: none; margin: 0; padding: 0; }
.attendee-list li {
  display: flex; align-items: center; gap: var(--space-3);
  padding: var(--space-3) 0; border-bottom: 1px solid var(--hairline); font-size: var(--text-1);
}
.attendee-list li:first-child { padding-top: 0; }
.attendee-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.attendee-list .buddy { flex: 0 0 auto; font-size: var(--text-2); }
/* "brings …" sits beside the name and wraps inside its own cell, never to a new row */
.attendee-list .brings { flex: 1 1 0; min-width: 0; color: var(--text-secondary); }

.vibe {
  margin: var(--space-5) 0 0; padding: var(--space-1) 0 var(--space-1) var(--space-5);
  border-left: 3px solid var(--accent);
  color: var(--text-secondary); font-style: italic;
  /* the host's own words are the most human thing on the page —
     they get the display face */
  font-family: var(--font-display); font-size: var(--text-3); line-height: 1.4;
  max-width: 65ch;
}

.host-actions { display: flex; flex-wrap: wrap; gap: var(--space-5); }

/* ---------- wall ---------- */

.wall-post {
  padding: var(--space-4) 0; border-bottom: 1px solid var(--hairline);
}
.wall-post:last-child { border-bottom: 0; }
.wall-post p { margin: var(--space-2) 0 0; }
.wall-post-head { display: flex; align-items: center; gap: var(--space-3); }
.wall-time { font-size: var(--text-0); color: var(--text-muted); }
.wall-posts { list-style: none; margin: var(--space-5) 0 0; padding: 0; }
.wall-sub { font-size: var(--text-1); color: var(--text-muted); margin-bottom: var(--space-5); }
.wall-empty { padding: var(--space-2) 0; }

/* ---------- profile ---------- */

.profile-card { max-width: var(--width-profile); margin: 0 auto var(--space-8); text-align: center; }
.profile-card .avatar-xl { margin-bottom: var(--space-4); }
.profile-card h1 { margin-bottom: var(--space-1); }
.stage-label { display: block; margin: var(--space-3) 0 var(--space-4); }
.stage-label .overline { margin-bottom: var(--space-1); }

.profile-card .prose { margin: var(--space-4) auto 0; text-align: left; }

.profile-section { text-align: left; margin-top: var(--space-6); }
/* …and what sits under the card lines up with it instead of the full page */
.profile-body { max-width: var(--width-profile); margin: 0 auto; }

/* Schedule list: title left, when · where right, one hairline per row.
   Profiles, waitlists — anywhere a jam is a line rather than a card. */
.schedule-list { list-style: none; margin: 0; padding: 0; }
.schedule-list li {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline;
  gap: var(--space-1) var(--space-4); padding: var(--space-3) 0; border-bottom: 1px solid var(--hairline);
}
.schedule-list li:first-child { padding-top: 0; }
.schedule-list li:last-child { border-bottom: 0; }
.schedule-list a { font-weight: 500; }

.feed-card { max-width: var(--width-form); }
.feed-url {
  display: block; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: var(--text-1); padding: var(--space-3) var(--space-4);
  background: var(--bg); border: 1px solid var(--hairline); border-radius: var(--radius);
  overflow-wrap: anywhere;
}
.profile-section .pills { margin: 0; }

/* ---------- misc ---------- */

.footer {
  border-top: 1px solid var(--hairline);
  padding: var(--space-6) var(--space-5);
  text-align: center; font-size: var(--text-0); color: var(--text-muted);
}
.footer p { margin: 0; }
.footer .soundbars { justify-content: center; height: 1rem; margin-bottom: var(--space-3); }
body:has(.idea-fab) .footer { padding-bottom: calc(var(--space-6) + 3.25rem); }

/* Floating boîte à idées button: a circle that unfolds its label on hover/focus. */
.idea-fab {
  position: fixed; right: var(--space-5); bottom: var(--space-5); z-index: 40;
  display: inline-flex; align-items: center; gap: 0;
  height: 3.25rem; min-width: 3.25rem; padding: 0 var(--space-4);
  border-radius: 999px; background: var(--accent); color: var(--on-accent);
  box-shadow: 0 6px 18px var(--fab-shadow);
  font-size: var(--text-1); font-weight: 600; white-space: nowrap;
  transition: gap 0.15s ease, background 0.15s ease;
}
.idea-fab:hover, .idea-fab:focus-visible { background: var(--accent-ink); color: var(--on-accent); text-decoration: none; gap: var(--space-2); }
.idea-fab-icon { font-size: var(--text-3); line-height: 1; }
.idea-fab-label { max-width: 0; overflow: hidden; transition: max-width 0.2s ease; }
.idea-fab:hover .idea-fab-label, .idea-fab:focus-visible .idea-fab-label { max-width: 10rem; }
@media (max-width: 640px) {
  .idea-fab { right: var(--space-4); bottom: var(--space-4); padding: 0; justify-content: center; }
  .idea-fab-label { display: none; }
}
@media print { .idea-fab { display: none; } }

/* Share row: the no-JS links always show; the native-sheet and copy buttons
   unhide themselves only when the browser can actually do the thing. */
.share-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.share-row .share-status { flex-basis: 100%; min-height: 1.2em; }
.footer .share-row { justify-content: center; margin: var(--space-3) 0; }

.centered { max-width: var(--width-narrow); margin: 0 auto; }
.centered + .centered { margin-top: var(--space-6); }

.section { margin-bottom: var(--space-8); }
.mt-auto { margin-top: auto; }
.actions-center { justify-content: center; }

/* spacing utilities */
.mb-0 { margin-bottom: 0; }
.mb-3 { margin-bottom: var(--space-3); }
.mt-4 { margin-top: var(--space-4); }
.mt-8 { margin-top: var(--space-8); }

.principles { list-style: none; counter-reset: principle; margin: var(--space-8) 0; padding: 0; }
.principles li {
  counter-increment: principle;
  display: grid; grid-template-columns: 4rem 1fr; gap: var(--space-6);
  padding: var(--space-7) 0; border-bottom: 1px solid var(--hairline);
}
.principles li:last-child { border-bottom: 0; }
.principles li::before {
  content: "0" counter(principle);
  font-family: var(--font-display); font-size: var(--text-4); font-weight: 700;
  color: var(--accent); line-height: 1;
}
.principles h2 { font-size: var(--text-3); margin-bottom: var(--space-2); }
.principles p { max-width: 60ch; color: var(--text-secondary); }
@media (max-width: 560px) {
  .principles li { grid-template-columns: 1fr; gap: var(--space-2); }
}

/* ---------- auth (dev sign-in rows on the login page) ---------- */

.id-row {
  display: flex; align-items: center; gap: var(--space-2);
  padding: var(--space-2);
  border: 1px solid var(--hairline); border-radius: var(--radius);
  margin-bottom: var(--space-2); background: var(--bg);
}
.id-row:hover { border-color: var(--hairline-strong); }
.id-row .id-name { flex: 1 1 auto; min-width: 0; }

/* ---------- notifications ---------- */

.nav-bell {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.25rem; height: 2.25rem;
  color: var(--text-secondary);
  border: 1px solid transparent; border-radius: 999px;
}
.nav-bell:hover { color: var(--ink); background: var(--surface); border-color: var(--hairline-strong); text-decoration: none; }
.bell-icon { display: block; }
/* the count sits on the bell's shoulder; hidden (not zero) when all is read */
.nav-badge {
  position: absolute; top: -0.25rem; right: -0.25rem;
  display: inline-block;
  min-width: 1.25rem;
  text-align: center;
  font-size: var(--text-0); font-weight: 600; line-height: 1.25rem;
  color: var(--accent-ink);
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  border-radius: 999px;
  padding: 0 var(--space-1);
}
.nav-badge.is-empty { display: none; }

.notification-row { margin-bottom: var(--space-4); padding: var(--space-4) var(--space-5); }
.notification-unread { border-left: 3px solid var(--accent); background: var(--accent-soft); }

/* two stacked forms (update what you bring / leave) breathe a little */
#join-leave form + form { margin-top: var(--space-3); }

/* ---------- phones (≤640px) ----------
   One block, tokens only. Tighter rhythm, one-column everything, full-width
   actions with the primary first, 44px tap targets. Nav and filter panel
   have their own 640px blocks next to their desktop rules. */

@media (max-width: 640px) {
  .container { padding: 0 var(--space-4) var(--space-8); }
  main.container { padding-top: var(--space-6); }
  .card { padding: var(--space-5); }
  .notification-row { padding: var(--space-4); }
  .hero, .page-header { margin-bottom: var(--space-7); }
  .page-head-cta { flex: 1 1 100%; margin-left: 0; }

  /* type scale steps down one notch; the hero h1 clamps on its own */
  h1 { font-size: var(--text-4); }
  h2 { font-size: var(--text-3); }
  .lead { font-size: 1.125rem; }

  /* actions stack, primary (first in markup) on top */
  .hero-actions .btn, .page-actions .btn { flex: 1 1 100%; }
  #join-leave .btn { width: 100%; }
  .wall form .btn, #wall form .btn { width: 100%; }
  /* …except pagination, which keeps Previous / Next side by side */
  nav.page-actions .btn { flex: 1 1 auto; }
  nav.page-actions .meta-line { flex-basis: 100%; text-align: center; order: 1; }

  /* thumbs: 44px for buttons, a taller hit area for quiet text actions */
  .btn { min-height: 2.75rem; }
  .btn-sm { min-height: 2.75rem; }
  .host-actions .text-action, .host-actions .text-danger { display: inline-block; padding: var(--space-2) 0; }

  /* the facts stack label-over-value; join/leave comes first in the aside */
  .fact-row { flex-direction: column; gap: var(--space-1); }
  .fact-row dt { flex-basis: auto; padding-top: 0; }
  .detail-layout { gap: var(--space-7); }
  .detail-main { gap: var(--space-6); }
  .detail-when { font-size: var(--text-2); }
  .vibe { padding-left: var(--space-4); }
}

/* ---------- reduced motion ---------- */

@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;
  }
}
