/* ===========================================================================
   Brim — application design system
   ---------------------------------------------------------------------------
   Single stylesheet for every Brim customer-facing surface.

   Derived directly from the two approved golden references:
     docs/mockups/BRIM-GUEST-FIRST-ONBOARDING-v1.html   (guest onboarding)
     docs/mockups/BRIM-CORE-PRODUCT-SURFACES-v2.html    (app surfaces)

   Guest onboarding lives in guest-season.css, which loads alongside this file.

   Rules that are structural, not stylistic:
     - Paper is the canvas. Field is an accent surface, never the page.
     - No colour is hard-coded outside the token block below.
     - Sodium is Brim's accent. Dusk belongs to Goodfolk, and appears inside
       Brim only where the Season Mosaic spec assigns it to a game state.
   =========================================================================== */

/* ---------------------------------------------------------------------------
   1 · Tokens
   --------------------------------------------------------------------------- */

:root {
  /* Core */
  --ink:          #15181C;
  --paper:        #F5F6F3;
  --white:        #FFFFFF;

  /* Brim */
  --field:        #17352C;
  --sodium:       #F0B429;

  /* Mosaic dispositions (see BRIM-SEASON-MOSAIC-IMPLEMENTATION-SPEC.md) */
  --dusk:         #6E7FD9;
  --dusk-light:   #A7B5EC;
  --dusk-pale:    #C3C9EE;
  --sage:         #9DB19A;
  --ahead:        #ECEFEA;

  /* Support */
  --slate:        #69717F;
  --line:         #E0E2DE;
  --coral:        #E2563F;

  /* Tints */
  --field-tint:   #EDF2EF;
  --sodium-tint:  #FEF6E4;
  --dusk-tint:    #EEF0FB;
  --coral-tint:   #FBEEEB;

  /* Readable text on tinted grounds */
  --on-field-tint: #284A40;
  --on-coral-tint: #8D3D31;
  --on-sodium:     #493600;
  --on-field-mute: #C7D7CE;
  --on-field-dim:  #B7CDC1;

  /* Type */
  --display: 'Bricolage Grotesque', system-ui, -apple-system, sans-serif;
  --ui:      'Inter', system-ui, -apple-system, sans-serif;
  --mono:    'DM Mono', ui-monospace, SFMono-Regular, monospace;

  --track-display: -.055em;
  --track-tight:   -.03em;
  --track-mono:     .16em;

  /* Space — 4px base */
  --s1: 4px;   --s2: 8px;   --s3: 12px;  --s4: 16px;
  --s5: 20px;  --s6: 24px;  --s7: 32px;  --s8: 40px;
  --s9: 48px;  --s10: 64px;

  /* Radius */
  --r-xs: 7px;  --r-sm: 12px; --r-md: 16px;
  --r-lg: 18px; --r-xl: 24px; --r-2xl: 30px; --r-pill: 999px;

  /* Elevation */
  --lift-1: 0 2px 8px rgba(21, 24, 28, .06);
  --lift-2: 0 16px 44px rgba(21, 24, 28, .06);
  --lift-3: 0 20px 60px rgba(21, 24, 28, .09);
  --lift-sheet: 0 -20px 80px rgba(21, 24, 28, .18);

  /* Motion */
  --ease: cubic-bezier(.2, .7, .3, 1);
  --fast: .12s;
  --base: .18s;
  --slow: .25s;

  /* Layout */
  --rail-w: 236px;
  --app-max: 1180px;
  --read-max: 1000px;
  --mast-h: 74px;

  --focus: 0 0 0 3px var(--paper), 0 0 0 6px var(--field);
}


/* ---------------------------------------------------------------------------
   1b · Protected token aliases
   The acceptance suite asserts these exact names. They are aliases, not a
   second palette: every value points at the token above it.
   --------------------------------------------------------------------------- */

:root {
  --brim-ink:        var(--ink);
  --brim-paper:      var(--paper);
  --brim-field:      var(--field);
  --brim-sodium:     var(--sodium);
  --brim-dusk:       var(--dusk);
  --brim-dusk-light: var(--dusk-light);
  --brim-dusk-pale:  var(--dusk-pale);
  --brim-slate:      var(--slate);
  --brim-line:       var(--line);
  --brim-coral:      var(--coral);
  --brim-sage:#9DB19A;
  --brim-ahead:      var(--ahead);
  --shell-rail-width: var(--rail-w);
}

/* ---------------------------------------------------------------------------
   2 · Base
   --------------------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100%;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--ui);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
svg { display: block; }
img { max-width: 100%; }

:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 0;
  box-shadow: var(--focus);
  border-radius: var(--r-sm);
}

.u-visually-hidden {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--field); color: var(--paper);
  padding: var(--s3) var(--s4); border-radius: 0 0 var(--r-sm) 0;
  font-weight: 700;
}
.skip:focus { left: 0; }

/* ---------------------------------------------------------------------------
   3 · Typography
   --------------------------------------------------------------------------- */

.display,
.pagehead h1 {
  font: 700 clamp(32px, 8vw, 56px)/.98 var(--display);
  letter-spacing: var(--track-display);
  color: var(--field);
  margin: 0;
}

.h2 { font: 700 20px var(--display); letter-spacing: var(--track-tight); margin: 0; }
.h3 { font: 700 17px var(--display); letter-spacing: var(--track-tight); margin: 0; }

.eyebrow {
  font: 500 11px var(--mono);
  letter-spacing: var(--track-mono);
  text-transform: uppercase;
  color: var(--slate);
  margin: 0 0 var(--s2);
}
.eyebrow--field { color: var(--field); }

.lede  { color: var(--slate); font-size: 16px; line-height: 1.55; max-width: 34ch; margin: 0; }
.muted { color: var(--slate); }
.micro { font-size: 12px; line-height: 1.45; color: var(--slate); margin: var(--s2) 0; }
.micro--center { text-align: center; }

.mono {
  font: 500 10px var(--mono);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--slate);
}

/* ---------------------------------------------------------------------------
   4 · Application shell
   Mobile: masthead + fixed bottom nav.
   Desktop (>=900px): persistent left rail, no bottom nav.
   --------------------------------------------------------------------------- */

.shell { min-height: 100dvh; }

.rail { display: none; }

.app {
  width: 100%;
  max-width:760px;
  margin: 0 auto;
  padding: 0 var(--s5) 104px;
}

.mast {
  height: var(--mast-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s4);
}
.mast__brand { width: 92px; }
.mast__brand svg { width: 100%; height: auto; }

.avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--field);
  color: var(--paper);
  font-weight: 700; font-size: 12px;
  flex: 0 0 auto;
}

.screen-inner { max-width: 100%; }

.pagehead {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--s5);
  margin: var(--s1) 0 var(--s4);
}
.pagehead p {
  color: var(--slate);
  font-size: 13.5px;
  line-height: 1.5;
  max-width: 42ch;
  margin: 10px 0 0;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3);
  margin: var(--s6) 2px 10px;
}
.section-title h2 { font: 700 18px var(--display); letter-spacing: var(--track-tight); margin: 0; }
.section-title a,
.section-title button { color: var(--field); font-size: 11px; font-weight: 700; }

/* Bottom navigation — mobile only */
.bottom-nav {
  position: fixed; z-index: 90;
  left: 0; right: 0;
  bottom:max(10px,env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  padding:
    var(--s2)
    max(10px, env(safe-area-inset-right))
    calc(7px + env(safe-area-inset-bottom))
    max(10px, env(safe-area-inset-left));
  background: rgba(245, 246, 243, .96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
}

.navbtn {
  position: relative;
  color: var(--slate);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: var(--s1);
  min-height: 50px;
  font-size: 10px; font-weight: 600;
}
.navbtn svg {
  width: 20px; height: 20px;
  stroke: currentColor; fill: none;
  stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.navbtn.is-active { color: var(--field); }
.navbtn__dot {
  position: absolute; top: 5px; right: calc(50% - 13px);
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--coral);
  border: 2px solid var(--paper);
}

/* ---------------------------------------------------------------------------
   5 · Surfaces
   --------------------------------------------------------------------------- */

.card {
  background: rgba(255, 255, 255, .72);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}
.card--solid { background: var(--white); }
.card--raised { background: var(--white); border-radius: var(--r-xl); box-shadow: var(--lift-2); }
.card--pad { padding: var(--s4); }

.note {
  padding: var(--s3) 13px;
  background: var(--field-tint);
  border-radius: 15px;
  color: var(--on-field-tint);
  font-size: 12px;
  line-height: 1.45;
}
.note--review {
  background: var(--coral-tint);
  border: 1px solid #E9C7C1;
  border-radius: var(--r-md);
  color: #873A2E;
}
.note--review strong { display: block; font-size: 11px; }
.note--review span   { display: block; font-size: 10px; color: #9A564B; margin-top: 3px; }

/* ---------------------------------------------------------------------------
   6 · Buttons
   Primary is Field on Paper. Sodium is never a button fill — it is an accent
   for marks, promotion dots and attention glyphs only.
   --------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s2);
  min-height: 54px;
  padding: 0 var(--s5);
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  font-weight: 700;
  text-align: center;
  transition: transform var(--fast) var(--ease), background var(--fast) var(--ease);
}
.btn:active { transform: translateY(1px); }

.btn--primary { background: var(--field); border-color: var(--field); color: var(--white); }
.btn--secondary { background: rgba(255, 255, 255, .76); border-color: var(--line); color: var(--field); }
.btn--quiet { background: transparent; border-color: transparent; color: var(--field); }
.btn--block { width: 100%; }
.btn--sm { min-height: 40px; border-radius: var(--r-sm); font-size: 11px; padding: 0 var(--s3); }

.link { color: var(--field); font-weight: 700; }

.back {
  align-self: flex-start;
  padding: var(--s2) 0;
  color: var(--slate);
  font-weight: 700;
}

.actions {
  display: grid;
  gap: 10px;
  margin-top: auto;
  padding-top: 28px;
}

/* ---------------------------------------------------------------------------
   7 · Forms
   --------------------------------------------------------------------------- */

.form { display: grid; gap: var(--s3); }

.field label,
.field > .field__label {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 700;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 50px;
  border: 1px solid #D5DAD6;
  border-radius: 14px;
  background: var(--white);
  padding: 0 14px;
  outline: none;
  transition: border-color var(--fast) var(--ease), box-shadow var(--fast) var(--ease);
}
.field textarea { padding: 12px 14px; line-height: 1.5; resize: vertical; }

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--field);
  box-shadow: 0 0 0 3px rgba(23, 53, 44, .1);
}

.field__hint  { font-size: 11px; color: var(--slate); margin: 6px 0 0; }
.field__error { font-size: 11px; color: var(--coral); margin: 6px 0 0; font-weight: 600; }
.field.is-invalid input { border-color: var(--coral); }

.choice {
  display: flex;
  align-items: center;
  gap: var(--s3);
  padding: var(--s3) 0;
  font-size: 13px;
  cursor: pointer;
}
.choice + .choice { border-top: 1px solid var(--line); }
.choice input { width: 20px; height: 20px; accent-color: var(--field); flex: 0 0 auto; }
.choice strong { display: block; font-size: 13px; }
.choice span   { display: block; font-size: 11px; color: var(--slate); margin-top: 2px; }


/* Field primitives usable without the .field wrapper, for converted views that
   lay out their own labels and inputs. */
.field__label {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 700;
}
.field__control {
  width: 100%;
  min-height: 50px;
  border: 1px solid #D5DAD6;
  border-radius: 14px;
  background: var(--white);
  padding: 0 14px;
  outline: none;
  transition: border-color var(--fast) var(--ease), box-shadow var(--fast) var(--ease);
}
textarea.field__control { min-height: 96px; padding: 12px 14px; line-height: 1.5; }
select.field__control  { padding-right: var(--s8); }
.field__control:focus {
  border-color: var(--field);
  box-shadow: 0 0 0 3px rgba(23, 53, 44, .1);
}

/* ---------------------------------------------------------------------------
   8 · Small parts
   --------------------------------------------------------------------------- */

.pill {
  font-size: 11px; font-weight: 600;
  color: var(--slate);
  background: var(--field-tint);
  padding: 6px var(--s2);
  border-radius: var(--r-pill);
}

.state-pill {
  font: 600 9px var(--mono);
  padding: 6px var(--s2);
  border-radius: var(--r-pill);
  background: var(--field-tint);
  color: var(--field);
  white-space: nowrap;
}
.state-pill--decide { background: var(--coral-tint); color: #9B493B; }
.state-pill--ahead  { background: var(--ahead); color: #5A6170; }

.chev { font-size: 22px; color: var(--slate); line-height: 1; }

.badge {
  width: 46px; height: 46px;
  border-radius: 14px;
  background: var(--field);
  color: var(--white);
  display: grid; place-items: center;
  font-weight: 800;
  flex: 0 0 auto;
}

.glyph {
  width: 32px; height: 32px;
  border-radius: 11px;
  display: grid; place-items: center;
  background: var(--field-tint);
  color: var(--field);
  font-weight: 700;
  flex: 0 0 auto;
}

.count-pill {
  font: 600 10px var(--mono);
  color: var(--on-coral-tint);
  background: var(--coral-tint);
  padding: 7px 9px;
  border-radius: var(--r-pill);
  white-space: nowrap;
}

.filters {
  display: flex; gap: 6px;
  overflow-x:auto;
  padding-bottom: var(--s1);
  margin-bottom: 14px;
  scrollbar-width: none;
}
.filters::-webkit-scrollbar { display: none; }

.filter {
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: var(--r-pill);
  padding: 7px 10px;
  font-size: 10px;
  color: var(--slate);
  white-space: nowrap;
}
.filter.is-active { background: var(--field); border-color: var(--field); color: var(--paper); }

.view-toggle {
  display: flex; gap: var(--s1);
  background: #E8ECE7;
  border-radius: var(--r-pill);
  padding: var(--s1);
  width: max-content;
  margin: var(--s6) 0 14px;
}
.view-toggle button {
  border-radius: var(--r-pill);
  padding: var(--s2) 15px;
  font-size: 11px; font-weight: 700;
  color: var(--slate);
}
.view-toggle button.is-active {
  background: var(--white);
  color: var(--field);
  box-shadow: var(--lift-1);
}

/* ---------------------------------------------------------------------------
   9 · Facts grid — the "here is what Brim found" pattern
   --------------------------------------------------------------------------- */

.facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.fact {
  background: var(--paper);
  border-radius: var(--r-md);
  padding: 13px;
}
.fact small {
  display: block;
  font: 500 10px var(--mono);
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--slate);
}
.fact strong { display: block; margin-top: var(--s1); font-size: 14px; }

/* A fact Brim could not determine. Uses line weight, not colour, so it reads
   as "not answered yet" rather than "something is wrong". */
.fact--unknown {
  background: transparent;
  border: 1.5px dashed #B8C2BC;
}
.fact--unknown strong { color: var(--slate); font-weight: 600; }

.econ {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  overflow: hidden;
}
.econ > div { padding: 13px; border-right: 1px solid var(--line); }
.econ > div:last-child { border-right: 0; }
.econ small {
  display: block;
  font: 500 8px var(--mono);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--slate);
}
.econ strong { display: block; font: 700 16px var(--display); margin-top: var(--s1); color: var(--field); }


/* Definition-list variant of the fact tile. */
.fact dt {
  font: 500 10px var(--mono);
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--slate);
}
.fact dd { margin: var(--s1) 0 0; font-size: 14px; font-weight: 700; }

/* ---------------------------------------------------------------------------
   10 · Rows
   --------------------------------------------------------------------------- */

.row {
  display: grid;
  grid-template-columns:32px minmax(0,1fr) 22px;
  gap: var(--s3);
  align-items: center;
  padding: 14px;
}
.row strong { display: block; font-size: 12px; }
.row span   { display: block; font-size: 11px; color: var(--slate); margin-top: 2px; }
.row + .row { border-top: 1px solid var(--line); }

.attention-icon {
  width: 28px; height: 28px;
  border-radius: 10px;
  background: var(--sodium);
  color: var(--on-sodium);
  display: grid; place-items: center;
  font-weight: 800; font-size: 12px;
  flex: 0 0 auto;
}

.game-list { overflow: hidden; }
.game-row {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: var(--s3);
  align-items: center;
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  transition: background var(--fast) var(--ease);
}
.game-row:last-child { border-bottom: 0; }
.game-row:hover { background: rgba(255, 255, 255, .6); }

.datebox { text-align: center; }
.datebox b     { display: block; font: 700 18px/1 var(--display); color: var(--field); }
.datebox small { font: 500 8px var(--mono); text-transform: uppercase; color: var(--slate); }

.opponent strong { display: block; font-size: 12px; }
.opponent span   { display: block; font-size: 11px; color: var(--slate); margin-top: 2px; }

.more-list { overflow: hidden; }
.more-row {
  display: grid;
  grid-template-columns: 32px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 13px;
  border-bottom: 1px solid var(--line);
}
.more-row:last-child { border-bottom: 0; }
.more-row strong { display: block; font-size: 12.5px; }
.more-row span   { display: block; font-size: 11px; color: var(--slate); margin-top: 2px; }
.more-icon {
  width: 30px; height: 30px;
  border-radius: 10px;
  background: var(--field-tint);
  display: grid; place-items: center;
  color: var(--field); font-weight: 700;
}
.group-label {
  font: 500 9px var(--mono);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--slate);
  margin: var(--s5) var(--s1) var(--s2);
}

.tool-row {
  padding: 15px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
}
.tool-row strong { display: block; font-size: 12px; }
.tool-row span   { display: block; font-size: 11px; color: var(--slate); margin-top: 2px; }

/* ---------------------------------------------------------------------------
   11 · Home
   --------------------------------------------------------------------------- */

.home-lead {
  padding: var(--s5);
  background: var(--field);
  color: var(--paper);
  border-radius: var(--r-xl);
  min-height: 188px;
  position: relative;
  overflow: hidden;
}
.home-lead::after {
  content: "";
  position: absolute;
  width: 170px; height: 170px;
  border-radius: 50%;
  background: rgba(240, 180, 41, .1);
  right: -55px; top: -70px;
}
.home-lead .small {
  font: 500 10px var(--mono);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--on-field-dim);
}
.home-lead h2 {
  font: 700 38px/1 var(--display);
  letter-spacing: -.045em;
  margin: 46px 0 5px;
  position: relative; z-index: 1;
}
.home-lead p { margin: 0; color: var(--on-field-mute); font-size: 12px; }

.season-progress { padding: var(--s4); }
.progress-top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--s3);
  margin-bottom: var(--s3);
}
.progress-top h3 { font: 700 17px var(--display); margin: 0; color: var(--field); }
.progress-top p  { margin: 3px 0 0; color: var(--slate); font-size: 11px; }
.progress-top strong { font: 700 20px var(--display); color: var(--field); }
.progress-link { display: flex; justify-content: flex-end; margin-top: var(--s3); }
.progress-link a { font-size: 11px; font-weight: 700; color: var(--field); }

/* ---------------------------------------------------------------------------
   12 · Season
   --------------------------------------------------------------------------- */

.season-hero { padding-top: var(--s1); }
.season-kicker {
  display: flex; align-items: center; gap: 10px;
  color: var(--slate);
  font: 500 11px var(--mono);
  letter-spacing: var(--track-mono);
  text-transform: uppercase;
  margin: 0 0 var(--s4);
}
.season-kicker::before {
  content: "";
  width: var(--s1); height: 22px;
  border-radius: var(--r-pill);
  background: var(--dusk);
}
/* On mobile the display headline is demoted below the grid: the mosaic is the
   subject of this screen and must not start under the fold. */
.season-hero h1 {
  font: 700 clamp(30px, 7.5vw, 40px)/1 var(--display);
  letter-spacing: -.045em;
  color: var(--ink);
  margin: var(--s6) 0 var(--s5);
  max-width: 14ch;
}
.season-hero .mosaic-wrap { max-width: 630px; }

.story-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.story { padding: var(--s4); min-height: 114px; }
.story b    { display: block; font: 700 27px var(--display); color: var(--field); }
.story span { display: block; font-size: 11px; font-weight: 700; margin-top: var(--s1); }
.story p    { margin: var(--s1) 0 0; color: var(--slate); font-size: 11px; line-height: 1.4; }

.season-tools { display: grid; gap: 10px; }

/* ---------------------------------------------------------------------------
   13 · Season Mosaic
   Colour mapping is owned by BRIM-SEASON-MOSAIC-IMPLEMENTATION-SPEC.md.
   Every state is paired with a text label in the legend and an accessible
   name on the square, so colour is never the only carrier of meaning.
   --------------------------------------------------------------------------- */

.mosaic-wrap { position: relative; }

.mosaic {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
  width: 100%;
}

.square {
  aspect-ratio: 1 / 1;
  border-radius: var(--r-xs);
  border: 1px solid transparent;
  position: relative;
  display: block;
  min-width: 0;
}
a.square { transition: transform var(--fast) var(--ease); }
a.square:hover { transform: translateY(-1px); }
a.square:focus-visible { box-shadow: var(--focus); }

.square--went       { background: var(--dusk); }
.square--sold       { background: var(--field); }
.square--gifted     { background: var(--dusk-light); }
.square--swapped    { background: var(--sage); }
.square--empty      { background: var(--paper); border: 2px solid var(--coral); }
.square--ahead      { background: var(--ahead); }
.square--split      { background: linear-gradient(135deg, var(--field) 0 50%, var(--dusk-light) 50% 100%); }
.square--unresolved { background: var(--paper); border: 1.5px dashed #A7ADA7; }

.square__promo {
  position: absolute;
  width: 6px; height: 6px; border-radius: 50%;
  right: var(--s1); top: var(--s1);
  background: var(--sodium);
  box-shadow: 0 0 0 1.5px rgba(245, 246, 243, .9);
}
.square__need {
  position: absolute;
  width: 7px; height: 7px; border-radius: 50%;
  right: 3px; bottom: 3px;
  background: var(--coral);
  box-shadow: 0 0 0 1.5px rgba(245, 246, 243, .92);
}

.mosaic--compact { grid-template-columns: repeat(8, 1fr); gap: 5px; max-width: 330px; }

/* The guest preview mosaic is read-only. It is shown small and dense so the
   whole season reads as one object rather than a page of tiles. */
.mosaic--preview { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 4px; }

.mosaic--compact .square,
.mosaic--preview .square { border-radius: 3px; }
.mosaic--compact .square--empty,
.mosaic--preview .square--empty { border-width: 1.5px; }
.mosaic--compact .square__promo,
.mosaic--compact .square__need,
.mosaic--preview .square__promo,
.mosaic--preview .square__need { width: var(--s1); height: var(--s1); right: 2px; }
.mosaic--compact .square__promo,
.mosaic--preview .square__promo { top: 2px; }
.mosaic--compact .square__need,
.mosaic--preview .square__need  { bottom: 2px; }

/* Grouped so the two states that share a hue are read side by side under one
   heading, instead of competing across a flat list of eight. */
.legend {
  display: flex; flex-wrap: wrap;
  gap: 11px 17px;
  margin: var(--s3) 0 0; padding: 0;
  list-style: none;
}
.legend-group ul { margin:0; padding: 0; }
.legend-group { margin-top: var(--s5); }
.legend-group__label {
  font: 500 9px var(--mono);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--slate);
  margin: 0;
}
.legend li {
  display: flex; align-items: center; gap: 7px;
  font: 500 10px var(--mono);
  color: var(--slate);
}
.legend-swatch { width: 13px; height: 13px; border-radius: 3px; flex: 0 0 13px; }
.legend-swatch--went    { background: var(--dusk); }
.legend-swatch--sold    { background: var(--field); }
.legend-swatch--gifted  { background: var(--dusk-light); }
.legend-swatch--swapped { background: var(--sage); }
.legend-swatch--empty   { background: var(--paper); border: 1.5px solid var(--coral); }
.legend-swatch--ahead   { background: var(--ahead); }
.legend-swatch--unresolved { background: var(--paper); border: 1.5px dashed #A7ADA7; }
.legend-swatch--promo,
.legend-swatch--need    { border-radius: 50%; width: 7px; height: 7px; flex-basis: 7px; }
.legend-swatch--promo   { background: var(--sodium); }
.legend-swatch--need    { background: var(--coral); }


/* ---------------------------------------------------------------------------
   13b · Season mosaic — shipped component contract
   src/views/components/season-mosaic.php emits these names, and four
   acceptance suites assert them. The generic .mosaic/.square names above are
   the preview vocabulary; these are what the application actually renders.
   --------------------------------------------------------------------------- */

.brim-season-mosaic {
  display: grid;
  grid-template-columns:repeat(7,minmax(0,1fr));
  gap: 6px;
  width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
}

.brim-season-square {
  aspect-ratio: 1 / 1;
  border-radius: var(--r-xs);
  border: 1px solid transparent;
  position: relative;
  display: block;
  min-width: 0;
  background: var(--brim-ahead);
}
a.brim-season-square { transition: transform var(--fast) var(--ease); }
a.brim-season-square:hover { transform: translateY(-1px); }
a.brim-season-square:focus-visible { box-shadow: var(--focus); }

.brim-season-square[data-grid-state="went"]{background:var(--brim-dusk)}
.brim-season-square[data-grid-state="sold"]{background:var(--brim-field)}
.brim-season-square[data-grid-state="gifted"]{background:var(--brim-dusk-light)}
.brim-season-square[data-grid-state="swapped"]{background:var(--brim-sage)}
.brim-season-square[data-grid-state="ahead"]{background:var(--brim-ahead)}
.brim-season-square[data-grid-state="empty"]{background:var(--brim-paper);border:1.5px solid var(--brim-coral)}
.brim-season-square[data-grid-state="unresolved"]{background:var(--brim-paper);border:1.5px dashed #A7ADA7}
.brim-season-square[data-grid-state="split"]{
  background:linear-gradient(135deg,var(--brim-split-a,var(--brim-field)) 0 50%,var(--brim-split-b,var(--brim-dusk-light)) 50% 100%)
}
[data-split-a="sold"]{--brim-split-a:var(--brim-field)}
[data-split-a="went"]{--brim-split-a:var(--brim-dusk)}
[data-split-b="went"]{--brim-split-b:var(--brim-dusk)}
[data-split-b="gifted"]{--brim-split-b:var(--brim-dusk-light)}

.brim-season-square__promotion {
  position: absolute;
  width: 6px; height: 6px; border-radius: 50%;
  right: var(--s1); top: var(--s1);
  background: var(--brim-sodium);
  box-shadow: 0 0 0 1.5px rgba(245, 246, 243, .9);
}
.brim-season-square__attention {
  position: absolute;
  width: 7px; height: 7px; border-radius: 50%;
  right: 3px; bottom: 3px;
  background: var(--brim-coral);
  box-shadow: 0 0 0 1.5px rgba(245, 246, 243, .92);
}

.brim-season-mosaic--full { grid-template-columns:repeat(7,minmax(0,1fr)); }
.brim-season-mosaic--compact { grid-template-columns:repeat(8,minmax(0,1fr)); gap: 5px; max-width: 330px; }
.brim-season-mosaic--preview { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 4px; }
.brim-season-mosaic--compact .brim-season-square,
.brim-season-mosaic--preview .brim-season-square { border-radius: 3px; }
.brim-season-mosaic--compact .brim-season-square__promotion,
.brim-season-mosaic--compact .brim-season-square__attention,
.brim-season-mosaic--preview .brim-season-square__promotion,
.brim-season-mosaic--preview .brim-season-square__attention { width: var(--s1); height: var(--s1); right: 2px; }
.brim-season-mosaic--compact .brim-season-square__promotion,
.brim-season-mosaic--preview .brim-season-square__promotion { top: 2px; }
.brim-season-mosaic--compact .brim-season-square__attention,
.brim-season-mosaic--preview .brim-season-square__attention { bottom: 2px; }

#season-grid{max-width:100%;overflow-x:hidden}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

@media(min-width:900px){
  .brim-season-mosaic--full { grid-template-columns:repeat(8,minmax(0,1fr)); gap: 12px; }
  .brim-season-mosaic--preview { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 7px; }
  .brim-season-square { border-radius: var(--s2); }
}

/* ---------------------------------------------------------------------------
   14 · Activity
   --------------------------------------------------------------------------- */

.timeline { display: grid; gap: 10px; }
.activity-card {
  padding: var(--s4);
  display: grid;
  grid-template-columns:34px minmax(0,1fr);
  gap: var(--s3);
}
.activity-card small { font: 500 9px var(--mono); color: var(--slate); text-transform: uppercase; }
.activity-card h3    { font: 700 15px var(--display); margin: 3px 0; }
.activity-card p     { font-size: 11.5px; line-height: 1.45; color: var(--slate); margin: 0; }

/* ---------------------------------------------------------------------------
   15 · Inbox
   --------------------------------------------------------------------------- */

.inbox-card { padding: 17px; margin-bottom: var(--s3); }
.inbox-card h2 {
  font: 700 20px var(--display);
  letter-spacing: var(--track-tight);
  margin: var(--s5) 0 7px;
  color: var(--field);
}
.inbox-card p { font-size: 12px; color: var(--slate); line-height: 1.55; }

.source {
  display: flex; justify-content: space-between; gap: var(--s3);
  font: 500 9px var(--mono);
  color: var(--slate);
}

.match {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px;
  background: var(--field-tint);
  border-radius: var(--r-sm);
  padding: var(--s3);
  margin-top: 14px;
}
.match strong { display: block; font-size: 11px; }
.match span   { font-size: 11px; color: var(--slate); }

/* Filing is the expected answer, so it gets the button. Declining is rarer and
   sits beside it as a quiet action: same row, nothing like the same weight. */
.brim-inbox-decision,
.decision {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--s3);
  margin-top: var(--s4);
}
.brim-inbox-decision .btn,
.decision .btn { min-height: 46px; border-radius: var(--r-sm); font-size: 12px; }
.brim-inbox-decision .btn--secondary,
.decision .btn--secondary {
  min-height: auto;
  padding: var(--s2) var(--s1);
  border-color: transparent;
  background: none;
  color: var(--slate);
  font-size: 12px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.brim-inbox-decision .btn--secondary:hover,
.decision .btn--secondary:hover { color: var(--ink); }


/* ---------------------------------------------------------------------------
   15b · Empty states
   An empty surface is usually the good outcome, not a missing feature. These
   read as arrival, not absence, and they never invent a task to look busy.
   --------------------------------------------------------------------------- */

.brim-inbox-empty,
.empty {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: var(--s3);
  padding: var(--s9) var(--s5);
  background: rgba(255, 255, 255, .72);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}
.empty__mark {
  width: 56px; height: 56px;
  border-radius: var(--r-lg);
  background: var(--field-tint);
  color: var(--field);
  display: grid; place-items: center;
  font-size: 24px;
}
.empty h2 {
  font: 700 22px var(--display);
  letter-spacing: var(--track-tight);
  color: var(--field);
  margin: 0;
}
.empty p {
  margin: 0;
  color: var(--slate);
  font-size: 12.5px;
  line-height: 1.55;
  max-width: 36ch;
}
.empty .btn { margin-top: var(--s2); }

/* Waiting on a season rather than on the customer. */
.empty--quiet { background: none; border-style: dashed; }

/* ---------------------------------------------------------------------------
   15c · Pending states
   htmx is in the stack, so anything slower than instant needs a visible state.
   Driven by htmx's own classes; no bespoke wiring per surface.
   --------------------------------------------------------------------------- */

[aria-busy="true"] { cursor: progress; }

.htmx-indicator { opacity: 0; transition: opacity var(--base) var(--ease); }
.htmx-request .htmx-indicator,
.htmx-request.htmx-indicator { opacity: 1; }

/* A request in flight dims its own region and blocks further clicks, so a
   customer cannot file the same thing twice. */
.htmx-request.is-pending,
.is-pending[aria-busy="true"] {
  position: relative;
  pointer-events: none;
  opacity: .55;
}

.btn.htmx-request,
.btn[aria-busy="true"] { pointer-events: none; color: transparent; position: relative; }
.btn.htmx-request::after,
.btn[aria-busy="true"]::after {
  content: "";
  position: absolute;
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-top-color: transparent;
  color: var(--white);
  animation: brim-spin .8s linear infinite;
}
.btn--secondary.htmx-request::after,
.btn--secondary[aria-busy="true"]::after { color: var(--field); }

/* Skeletons. Shape only, never fake content. */
.skeleton {
  background: linear-gradient(90deg, var(--line) 0%, #EDEFEB 40%, var(--line) 80%);
  background-size: 200% 100%;
  border-radius: var(--r-sm);
  animation: brim-shimmer 1.4s linear infinite;
}
@keyframes brim-shimmer { to { background-position: -200% 0; } }
.skeleton--line { height: 12px; margin: var(--s2) 0; }
.skeleton--title { height: 22px; width: 60%; }
.skeleton--square { aspect-ratio: 1 / 1; border-radius: var(--r-xs); }

@media(prefers-reduced-motion:reduce) {
  .skeleton { animation: none; background: var(--line); }
}

/* ---------------------------------------------------------------------------
   16 · More / profile
   --------------------------------------------------------------------------- */

.profile { padding: 14px; display: flex; align-items: center; gap: 11px; }
.profile-avatar {
  width: 40px; height: 40px;
  border-radius: 14px;
  background: var(--field);
  color: var(--paper);
  display: grid; place-items: center;
  font-weight: 700;
}
.profile strong { font-size: 12px; display: block; }
.profile span   { font-size: 10px; color: var(--slate); }

/* ---------------------------------------------------------------------------
   17 · Sheet
   --------------------------------------------------------------------------- */

.sheet-backdrop {
  position: fixed; z-index: 200; inset: 0;
  background: rgba(21, 24, 28, .34);
  display: none;
  align-items: flex-end;
  justify-content: center;
  padding: var(--s5);
}
.sheet-backdrop.is-open { display: flex; }

.sheet {
  width: min(100%, 520px);
  background: var(--paper);
  border-radius: 26px;
  padding: 11px var(--s5) calc(var(--s5) + env(safe-area-inset-bottom));
  box-shadow: var(--lift-sheet);
}
.sheet__handle {
  width: 42px; height: var(--s1);
  border-radius: var(--r-pill);
  background: #C7CCC6;
  margin: 0 auto 15px;
}
.sheet__head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: var(--s3);
}
.sheet__head h2 {
  font: 700 27px var(--display);
  letter-spacing: -.04em;
  color: var(--field);
  margin: 2px 0;
}
.sheet__head p { font-size: 11.5px; color: var(--slate); margin: 0; }
.sheet__close { font-size: 25px; color: var(--slate); line-height: 1; }
.sheet__actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s2); margin-top: 17px; }
/* Actions that set a disposition carry that disposition's mosaic colour as a
   chip. The customer learns the grid by choosing from it. Actions that are not
   dispositions stay neutral, so the two kinds stay legible as different. */
.sheet-action {
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: 14px;
  min-height: 68px;
  padding: 9px;
  font-size: 11px; font-weight: 700;
  color: var(--field);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 7px;
  transition: border-color var(--fast) var(--ease);
}
.sheet-action:hover { border-color: #C2C8C1; }
.sheet-action__chip { width: 14px; height: 14px; border-radius: var(--s1); flex: 0 0 auto; }
.sheet-action__chip--went    { background: var(--dusk); }
.sheet-action__chip--sold    { background: var(--field); }
.sheet-action__chip--gifted  { background: var(--dusk-light); }
.sheet-action__chip--swapped { background: var(--sage); }
.sheet-action__chip--none    { background: transparent; border: 1.5px solid var(--line); }
.sheet__note { font-size: 11px; color: var(--slate); text-align: center; margin: 14px 0 0; }

/* Minimum drop-target height, kept in the system stylesheet so the value holds
   wherever the attach component is used. */
.drop { min-height:270px; }


/* ---------------------------------------------------------------------------
   23 · Legacy canvas bridge
   ---------------------------------------------------------------------------
   The 100 views still on Tailwind were written for a dark Field shell, so their
   colour utilities resolve to near-white text and hairline borders. On the
   Paper canvas that is invisible rather than merely off-brand.

   This block re-points those utilities to light-canvas values, scoped to
   [data-ui="legacy"] so it can never touch a converted surface. It is a bridge,
   not a destination: every rule here disappears when its views convert, and the
   whole block goes with the last one.
   --------------------------------------------------------------------------- */

[data-ui="legacy"] .text-paper       { color: var(--ink) !important; }
[data-ui="legacy"] .text-paper\/90,
[data-ui="legacy"] .text-paper\/80,
[data-ui="legacy"] .text-paper\/70,
[data-ui="legacy"] .text-paper\/65,
[data-ui="legacy"] .text-paper\/60,
[data-ui="legacy"] .text-paper\/55,
[data-ui="legacy"] .text-paper\/50,
[data-ui="legacy"] .text-paper\/45,
[data-ui="legacy"] .text-paper\/40 { color: var(--slate) !important; }

[data-ui="legacy"] .bg-paper\/5,
[data-ui="legacy"] .bg-paper\/10    { background-color: rgba(255, 255, 255, .72) !important; }
[data-ui="legacy"] .bg-paper         { background-color: var(--paper) !important; }

/* My mechanical conversion stripped border-colour utilities in 290 places
   across 76 files, leaving a bare `border`. Tailwind's bare .border sets only
   border-width, and this build has no preflight default, so those borders fall
   back to currentColor and render as heavy dark outlines. Give them the
   system's hairline instead. */
[data-ui="legacy"] .border { border-color: var(--line); }

[data-ui="legacy"] .border-paper\/10,
[data-ui="legacy"] .border-paper\/15,
[data-ui="legacy"] .border-paper\/20,
[data-ui="legacy"] .border-paper\/25,
[data-ui="legacy"] .border-paper\/30 { border-color: var(--line) !important; }

/* Field-tinted variants were already light; only their contrast needs help. */
[data-ui="legacy"] .text-field\/45,
[data-ui="legacy"] .text-field\/65,
[data-ui="legacy"] .text-field\/70  { color: var(--slate) !important; }

/* Surfaces the legacy shell painted dark. */
[data-ui="legacy"] .bg-field         { background-color: var(--field) !important; }
[data-ui="legacy"] .bg-field .text-paper,
[data-ui="legacy"] .bg-field h1,
[data-ui="legacy"] .bg-field h2,
[data-ui="legacy"] .bg-field h3      { color: var(--paper) !important; }

/* Type and shape, brought closer to the system without touching markup. */
[data-ui="legacy"] .font-display     { font-family: var(--display); letter-spacing: var(--track-tight); }
[data-ui="legacy"] .font-mono        { font-family: var(--mono); }
[data-ui="legacy"] .rounded-xl       { border-radius: var(--r-lg); }
[data-ui="legacy"] .rounded-lg       { border-radius: var(--r-sm); }
[data-ui="legacy"] .shadow-sm        { box-shadow: var(--lift-1); }


/* ---------------------------------------------------------------------------
   19b · Shell states and cards
   Emitted by views/partials/shell-states.php and shell-card.php. The class
   names are a contract; only their presentation lives here.
   --------------------------------------------------------------------------- */

.shell-state {
  display: grid;
  gap: var(--s2);
  justify-items: center;
  text-align: center;
  padding: var(--s7) var(--s5);
  background: rgba(255, 255, 255, .72);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}
.shell-state__title { font: 700 17px var(--display); color: var(--field); margin: 0; }
.shell-state__body  { font-size: 12.5px; color: var(--slate); margin: 0; max-width: 40ch; line-height: 1.55; }
.shell-state__actions { margin: var(--s2) 0 0; display: flex; gap: var(--s3); flex-wrap: wrap; justify-content: center; }
.shell-action {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 40px; padding: 0 var(--s4);
  border: 1px solid var(--line); border-radius: var(--r-sm);
  background: var(--white); color: var(--field);
  font-size: 12px; font-weight: 700;
}
.shell-state--error   { background: var(--coral-tint); border-color: #E9C7C1; }
.shell-state--error .shell-state__title { color: var(--on-coral-tint); }
.shell-state--success { background: var(--field-tint); border-color: transparent; }
.shell-state--loading .shell-state__title { color: var(--slate); }
.shell-state--empty   { border-style: dashed; background: none; }

.shell-card {
  background: rgba(255, 255, 255, .72);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: var(--s4);
}
.shell-card__label { font: 500 10px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--slate); margin: 0; }
.shell-card__value { font: 700 20px var(--display); color: var(--field); margin: var(--s1) 0 0; }
.shell-card__hint  { font-size: 11px; color: var(--slate); margin: var(--s1) 0 0; }


/* ---------------------------------------------------------------------------
   24 · Goodfolk share page
   Reference: brim-goodfolk-mockups, "Goodfolk 01". Dusk is Goodfolk's accent;
   Sodium belongs to Brim and never appears here.
   --------------------------------------------------------------------------- */

.gf-share { width: min(100%, 430px); margin: 0 auto; padding: 0 var(--s5) var(--s9); }

.gf-listing { padding: var(--s7) 0 0; text-align: center; }
.gf-slug {
  display: inline-flex; align-items: center; gap: var(--s2);
  font: 500 10.5px var(--mono);
  letter-spacing: .13em; text-transform: uppercase;
  color: var(--dusk);
  margin: 0 0 var(--s5);
}
.gf-slug__mark { display: inline-flex; }
.gf-listing__title {
  font: 700 25px/1.15 var(--display);
  letter-spacing: -.03em;
  color: var(--ink);
  margin: 0;
}
.gf-listing__where { color: var(--slate); font-size: 13px; margin: 7px 0 0; }
.gf-price {
  font: 700 30px var(--display);
  letter-spacing: -.035em;
  color: var(--ink);
  margin: 14px 0 0;
}
.gf-price__note { font-size: 12px; color: var(--slate); margin: 0; }

/* Seller card. The Dusk edge is the only ornament; the facts carry the weight. */
.gf-cred {
  position: relative;
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: var(--s4);
  margin-top: var(--s6);
}
.gf-cred__edge { position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--dusk); }
.gf-cred__head { display: flex; align-items: center; gap: 11px; padding-left: var(--s1); margin-bottom: 11px; }
.gf-cred__avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--dusk); color: var(--white);
  display: grid; place-items: center;
  font-weight: 600; font-size: 13px;
  flex: 0 0 auto;
}
.gf-cred__head strong { display: block; font-size: 15px; font-weight: 600; }
.gf-cred__head .mono { display: block; font-size: 11px; }
.gf-cred__facts { list-style: none; margin: 0; padding: 0 0 0 var(--s1); }
.gf-cred__facts li {
  display: flex; align-items: center; gap: var(--s2);
  padding: 7px 0;
  border-top: 1px solid var(--line);
  color: var(--dusk);
}
.gf-cred__facts b { color: var(--ink); font-weight: 500; font-size: 13px; }
.gf-cred__none { font-size: 12.5px; color: var(--slate); margin: var(--s2) 0 0; padding-left: var(--s1); line-height: 1.55; }

/* Verified panel. Dusk tint, deeper Dusk text: the one moment the page is
   allowed to feel like good news. */
.gf-verified {
  border: 1px solid var(--dusk);
  background: var(--dusk-tint);
  border-radius: 12px;
  padding: 15px;
  margin-top: var(--s5);
}
.gf-verified__head {
  display: flex; align-items: center; gap: var(--s2);
  font: 500 10px var(--mono);
  letter-spacing: .11em; text-transform: uppercase;
  color: #3D4C9E;
  margin: 0 0 var(--s2);
}
.gf-verified__facts { font-size: 13.5px; line-height: 1.6; color: #2E3873; margin: 0; }
.gf-verified__foot {
  font: 400 11px var(--mono);
  color: #5A64A8;
  margin: 9px 0 0;
  border-top: 1px solid #D6DBF5;
  padding-top: 9px;
}

/* Unverified is not an error state. It is an honest one. */
.gf-unverified {
  border: 1.5px dashed #B8C2BC;
  border-radius: 12px;
  padding: 15px;
  margin-top: var(--s5);
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--slate);
}
.gf-unverified__head {
  font: 500 10px var(--mono);
  letter-spacing: .11em; text-transform: uppercase;
  color: var(--ink);
  margin: 0 0 var(--s2);
}
.gf-unverified p { margin: 0; }

.gf-timer {
  text-align: center;
  font: 400 11px var(--mono);
  color: var(--slate);
  margin: var(--s5) 0 11px;
}

.gf-btn {
  display: block; width: 100%;
  text-align: center;
  padding: 14px;
  border-radius: 11px;
  font: 600 14.5px var(--ui);
  border: 0;
  cursor: pointer;
}
.gf-btn--primary { background: var(--dusk); color: var(--white); }
.gf-btn--quiet {
  background: var(--white);
  color: var(--ink);
  border: 1px solid var(--line);
  font-size: 13px;
  padding: 11px;
}
.gf-btn:focus-visible { outline: 2px solid var(--dusk); outline-offset: 2px; }

.gf-consent { font-size: 11.5px; color: var(--slate); text-align: center; margin: 6px 0 0; }
.gf-money {
  font-size: 11.5px;
  color: var(--slate);
  text-align: center;
  line-height: 1.55;
  margin: 6px 0 0;
}

.gf-state {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: var(--s5);
  margin-top: var(--s5);
}
.gf-state p { font-size: 12.5px; color: var(--slate); line-height: 1.55; margin: var(--s2) 0 0; }
.gf-state__note { font-size: 11px; }

.gf-buyers { list-style: none; margin: var(--s4) 0 0; padding: 0; display: grid; gap: var(--s2); }
.gf-buyers li {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s3);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: var(--s3);
  font-size: 12.5px;
}
.gf-buyers form { margin: 0; }

.gf-pay {
  background: var(--field-tint);
  border-radius: 14px;
  padding: var(--s5);
  margin-top: var(--s5);
}
.gf-pay__note { font: 400 13px var(--mono); color: var(--field); margin: var(--s2) 0 0; line-height: 1.6; }

.gf-footnote {
  font: 400 10.5px var(--mono);
  color: var(--slate);
  text-align: center;
  margin: var(--s7) 0 0;
}

@media (min-width: 820px) {
  .gf-share { width: min(100%, 470px); }
  .gf-listing { padding-top: var(--s9); }
  .gf-listing__title { font-size: 30px; }
}


/* --- Goodfolk handoff, buyer context and ID ------------------------------- */

.gf-handoff {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: var(--s5);
  margin-top: var(--s5);
}
.gf-handoff__eyebrow {
  font: 500 10px var(--mono);
  letter-spacing: .13em; text-transform: uppercase;
  color: var(--dusk);
  margin: 0 0 var(--s2);
}
.gf-handoff__title { font: 700 20px var(--display); letter-spacing: var(--track-tight); color: var(--ink); margin: 0; }
.gf-handoff__lede { font-size: 12.5px; color: var(--slate); line-height: 1.55; margin: var(--s2) 0 0; }
.gf-handoff__waiting { font-size: 12.5px; color: var(--slate); margin: var(--s3) 0 0; line-height: 1.55; }
.gf-handoff__fallback { font-size: 11.5px; color: var(--slate); margin: var(--s1) 0 0; }
.gf-handoff__actions { display: flex; flex-wrap: wrap; gap: var(--s3); margin-top: var(--s5); }
.gf-handoff__actions .gf-btn { width: auto; padding: 10px var(--s4); }

.gf-steps { list-style: none; margin: var(--s5) 0 0; padding: 0; display: grid; gap: 0; }
.gf-step {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: var(--s3);
  padding: var(--s3) 0;
  position: relative;
}
/* Connector line between dots, so the list reads as one sequence. */
.gf-step:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 8px; top: 26px; bottom: -4px;
  width: 1.5px;
  background: var(--line);
}
.gf-step__dot {
  width: 17px; height: 17px;
  border-radius: 50%;
  border: 2px solid var(--line);
  background: var(--white);
  margin-top: 3px;
  position: relative; z-index: 1;
}
.gf-step--complete .gf-step__dot { background: var(--dusk); border-color: var(--dusk); }
.gf-step--current .gf-step__dot { border-color: var(--dusk); box-shadow: 0 0 0 4px var(--dusk-tint); }
.gf-step__body { min-width: 0; }
.gf-step__label { display: block; font: 600 14px var(--ui); color: var(--ink); }
.gf-step--pending .gf-step__label { color: var(--slate); font-weight: 500; }
.gf-step__status {
  display: block;
  font: 500 10px var(--mono);
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--slate);
  margin-top: 2px;
}
.gf-step--current .gf-step__status { color: var(--dusk); }
.gf-step__note { display: block; font-size: 12px; color: var(--slate); line-height: 1.5; margin-top: var(--s2); }

.gf-proof {
  display: block;
  background: var(--dusk-tint);
  border-radius: var(--r-sm);
  padding: var(--s3);
  margin-top: var(--s2);
}
.gf-proof__head {
  display: block;
  font: 500 10px var(--mono);
  letter-spacing: .11em; text-transform: uppercase;
  color: #3D4C9E;
  margin-bottom: var(--s2);
}
.gf-proof__fields { margin: 0; display: grid; gap: 3px; }
.gf-proof__fields div { display: flex; gap: var(--s2); font-size: 12px; }
.gf-proof__fields dt { font: 500 10px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: #5A64A8; flex: 0 0 auto; }
.gf-proof__fields dd { margin: 0; color: #2E3873; }

.gf-buyer-context {
  background: var(--white);
  border: 1px solid var(--line);
  border-left: 4px solid var(--dusk);
  border-radius: 14px;
  padding: var(--s5);
  margin-top: var(--s6);
}
.gf-buyer-context__eyebrow {
  font: 500 10px var(--mono);
  letter-spacing: .13em; text-transform: uppercase;
  color: var(--dusk);
  margin: 0 0 var(--s2);
}
.gf-buyer-context__facts { list-style: none; margin: var(--s3) 0 0; padding: 0; display: grid; gap: var(--s2); }
.gf-buyer-context__facts li { font-size: 13px; color: var(--slate); }
.gf-buyer-context__facts b { color: var(--ink); font-weight: 600; }
.gf-buyer-context__facts .mono { font-size: 11px; }
.gf-buyer-context__note { font-size: 11.5px; color: var(--slate); line-height: 1.55; margin: var(--s4) 0 0; }

.gf-id {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: var(--s5);
  margin-top: var(--s5);
}
.gf-id__eyebrow {
  font: 500 10px var(--mono);
  letter-spacing: .13em; text-transform: uppercase;
  color: var(--dusk);
  margin: 0 0 var(--s2);
}
.gf-id__lede { font-size: 12.5px; color: var(--slate); line-height: 1.55; margin: var(--s2) 0 0; }
.gf-id__notice { font-size: 12px; color: var(--slate); margin: var(--s3) 0 0; }
.gf-id__grid { display: grid; gap: var(--s5); margin-top: var(--s5); }
.gf-id__channel-head {
  display: flex; align-items: center; gap: var(--s2);
  font-size: 13px; font-weight: 600;
  margin: 0 0 var(--s3);
}
.gf-id__tick {
  font: 500 9px var(--mono);
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--dusk);
  background: var(--dusk-tint);
  padding: 4px 7px;
  border-radius: var(--r-pill);
}
.gf-id__channel.is-done .gf-id__channel-head { color: var(--slate); }
.gf-id__testing { font: 400 11px var(--mono); color: var(--slate); margin: var(--s2) 0 0; }
.gf-id__foot { font-size: 11.5px; color: var(--slate); line-height: 1.55; margin: var(--s5) 0 0; }

@media (min-width: 820px) {
  .gf-id__grid { grid-template-columns: 1fr 1fr; gap: var(--s6); }
}


/* --- Goodfolk payment surfaces -------------------------------------------- */

.gf-pay-panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: var(--s5);
  margin-top: var(--s5);
}
.gf-pay-panel__eyebrow {
  font: 500 10px var(--mono);
  letter-spacing: .13em; text-transform: uppercase;
  color: var(--dusk);
  margin: 0 0 var(--s2);
}
.gf-pay-panel__title { font: 700 22px var(--display); letter-spacing: var(--track-tight); color: var(--ink); margin: 0; }
.gf-pay-panel__lede { font-size: 12.5px; color: var(--slate); line-height: 1.55; margin: var(--s3) 0 0; }
.gf-pay-panel__where {
  font: 500 14px var(--mono);
  color: var(--ink);
  background: var(--dusk-tint);
  border-radius: var(--r-sm);
  padding: var(--s4);
  margin: var(--s4) 0 0;
  word-break: break-word;
}
.gf-pay-panel__note { font-size: 12px; color: var(--slate); line-height: 1.55; margin: var(--s4) 0 0; }
.gf-pay-panel__manual { margin: var(--s5) 0 0; }

/* Seller-confirmed payment. Deliberately plain: this is a moment to slow
   someone down, not to congratulate them. */
.gf-confirm {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: var(--s5);
  margin-top: var(--s5);
}
.gf-confirm__eyebrow {
  font: 500 10px var(--mono);
  letter-spacing: .13em; text-transform: uppercase;
  color: var(--slate);
  margin: 0 0 var(--s2);
}
.gf-confirm__title { font: 700 21px var(--display); letter-spacing: var(--track-tight); color: var(--ink); margin: 0; }
.gf-confirm__lede { font-size: 12.5px; color: var(--slate); line-height: 1.55; margin: var(--s3) 0 0; }
.gf-confirm__label {
  background: var(--paper);
  border-radius: var(--r-sm);
  padding: var(--s4);
  margin: var(--s4) 0 0;
}
.gf-confirm__label p { font-size: 12px; color: var(--slate); line-height: 1.55; margin: 0; }
.gf-confirm__label p + p { margin-top: var(--s2); }
.gf-confirm__label strong { color: var(--ink); }
.gf-confirm__warning {
  font-size: 12px;
  color: var(--on-coral-tint);
  background: var(--coral-tint);
  border-radius: var(--r-sm);
  padding: var(--s3);
  margin: var(--s3) 0 0;
  line-height: 1.5;
}
.gf-confirm__hint { font-size: 11.5px; color: var(--slate); text-align: center; margin: var(--s2) 0 0; }

.gf-btn--hold {
  background: var(--field);
  color: var(--white);
  position: relative;
  overflow: hidden;
  touch-action: none;
  user-select: none;
  margin-top: var(--s4);
}
.gf-btn--hold[aria-pressed="true"] { background: var(--on-field-tint); }


/* --- Goodfolk claimed state ----------------------------------------------- */

.gf-claimed {
  background: var(--dusk-tint);
  border: 1px solid var(--dusk);
  border-radius: 14px;
  padding: var(--s5);
  margin-top: var(--s5);
}
.gf-claimed__eyebrow {
  font: 500 10px var(--mono);
  letter-spacing: .13em; text-transform: uppercase;
  color: #3D4C9E;
  margin: 0 0 var(--s2);
}
.gf-claimed__title { font: 700 21px var(--display); letter-spacing: var(--track-tight); color: #2E3873; margin: 0; }
.gf-claimed__lede { font-size: 13px; color: #2E3873; line-height: 1.6; margin: var(--s3) 0 0; }
.gf-claimed__note { font-size: 12.5px; color: #5A64A8; line-height: 1.55; margin: var(--s3) 0 0; }
.gf-claimed__expiry {
  display: block;
  font-size: 11px;
  color: #5A64A8;
  margin: var(--s3) 0 0;
  border-top: 1px solid #D6DBF5;
  padding-top: var(--s3);
}


/* ---------------------------------------------------------------------------
   25 · The season arriving
   ---------------------------------------------------------------------------
   Reconstructing a season from a messy spreadsheet is the one genuinely
   surprising thing Brim does, and the preview is the moment it lands. This is
   the delight layer for that moment.

   What it does: squares settle into place in reading order, quickly, with a
   short stagger. Nothing bounces, nothing spins, no colour appears that is not
   already in the system. The effect is a season assembling itself, which is
   what actually happened.

   Constraints it respects:
   - It runs once, on arrival. Re-renders and htmx swaps do not replay it.
   - The stagger is capped, so an 81 game season finishes in about a second
     rather than crawling through eighty separate delays.
   - Under prefers-reduced-motion the whole thing is skipped and every square
     is simply present. The season is the reward, not the animation.
   --------------------------------------------------------------------------- */

@keyframes brim-square-settle {
  from { opacity: 0; transform: scale(.82); }
  to   { opacity: 1; transform: none; }
}

@keyframes brim-card-arrive {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}

.gstep.is-active .preview-card {
  animation: brim-card-arrive .32s var(--ease) both;
}

/* The grid itself fades in as one object, then its squares resolve. */
.gstep.is-active .guest__wide,
.guest__wide .mosaic--preview {
  animation: brim-card-arrive .3s var(--ease) .06s both;
}

.guest__wide .mosaic--preview .square,
.guest__wide .brim-season-mosaic--preview .brim-season-square {
  animation: brim-square-settle .34s var(--ease) both;
  animation-delay: calc(var(--square-index, 0) * 9ms + 160ms);
}

/* Cap the stagger. Beyond forty squares the delay stops growing, so a full
   season lands in roughly a second instead of trailing off. */
.guest__wide .mosaic--preview .square:nth-child(n + 40),
.guest__wide .brim-season-mosaic--preview .brim-season-square:nth-child(n + 40) {
  animation-delay: calc(40 * 9ms + 160ms);
}

@media (prefers-reduced-motion: reduce) {
  .gstep.is-active .preview-card,
  .gstep.is-active .guest__wide,
  .guest__wide .mosaic--preview,
  .guest__wide .mosaic--preview .square,
  .guest__wide .brim-season-mosaic--preview .brim-season-square {
    animation: none;
  }
}

/* ---------------------------------------------------------------------------
   20 · Surface containers
   Named for the shipped contract the acceptance suite asserts. Each is a width
   and a hook, not a second design system: the components inside come from the
   sections above.
   --------------------------------------------------------------------------- */

.brim-home{max-width:930px}
.brim-inbox{max-width:760px}
.brim-activity{max-width:760px}
.brim-more{
  max-width:760px;
}
.brim-money-strip{
  overflow:hidden;
}
.brim-pagehead { display: contents; }

.brim-inbox-card { position: relative; }
.brim-inbox-choices { display: grid; gap: var(--s2); margin-top: var(--s3); }
.brim-inbox-choices label {
  display: flex; align-items: center; gap: var(--s3);
  padding: var(--s3);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--white);
  font-size: 12px;
  cursor: pointer;
}
.brim-inbox-choices input { accent-color: var(--field); width: 18px; height: 18px; }

.brim-activity-card { position: relative; }
.brim-activity-filters{overflow:visible;flex-wrap:wrap}

.brim-more-profile { position: relative; }
.brim-more-links { overflow: hidden; }
/* 9.5f More — grouped capability map */
.brim-more-row { position: relative; }

@media(min-width:820px){
  .brim-inbox{max-width:820px}
  .brim-activity{max-width:820px}
  .brim-more{max-width:820px}
}


/* Sheet: disclosure rows for the decisions that need an amount first. */
.sheet details > summary { list-style: none; }
.sheet details > summary::-webkit-details-marker { display: none; }
.sheet details > summary::after {
  content: "+";
  margin-left: auto;
  color: var(--slate);
  font-weight: 400;
  font-size: 18px;
  line-height: 1;
}
.sheet details[open] > summary::after { content: "\2212"; }
.sheet details > summary:focus-visible { box-shadow: var(--focus); border-radius: var(--r-sm); }
.sheet .legend { font-size: 11px; }

/* ---------------------------------------------------------------------------
   19 · Desktop
   --------------------------------------------------------------------------- */

@media (min-width: 900px) {
  .shell {
    display: grid;
    grid-template-columns: var(--rail-w) 1fr;
    background:linear-gradient(90deg,#EEF1ED 0 236px,transparent 236px);
  }

  .rail {
    display: flex;
    position: sticky; top: 0;
    height: 100vh;
    flex-direction: column;
    padding: 28px 18px 18px;
    width:236px;
    border-right: 1px solid var(--line);
    background:rgba(238,241,237,.9);
  }
  .rail__brand { width: 116px; margin: var(--s1) var(--s2) 34px; }
  .rail__brand svg { width: 100%; height: auto; }
  .rail nav { display: grid; gap: 5px; }
  .rail a {
    color: var(--slate);
    border-radius: 14px;
    padding: 10px 11px;
    display: flex; align-items: center; gap: 10px;
    font-size: 11px; font-weight: 700;
    transition: background var(--fast) var(--ease);
  }
  .rail a svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; }
  .rail a:hover { background: rgba(255, 255, 255, .55); }
  .rail a.is-active { background: var(--white); color: var(--field); box-shadow: 0 5px 20px rgba(21, 24, 28, .04); }
  .rail__foot { margin-top: auto; padding: 11px; color: var(--slate); font-size: 9.5px; line-height: 1.5; }
  .rail__foot strong { display: block; color: var(--ink); font-size: 10.5px; }

  .app { max-width: var(--app-max); margin: 0; padding: 0 48px 70px; }
  .mast { height: 86px; }
  .mast__brand { display: none; }
  .bottom-nav { display: none; }
  .screen-inner { max-width: var(--read-max); }
  .pagehead { margin-top: 28px; }

  .home-grid { display: grid; grid-template-columns:minmax(0,1.5fr) minmax(300px,.85fr); gap: var(--s4); align-items: start; }
  .home-side { display: grid; gap: var(--s3); }

  .season-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, .65fr); gap: var(--s7); align-items: start; }
  .season-hero h1 { font-size: 44px; max-width: 16ch; }
  .season-side { padding-top: 100px; display: grid; gap: var(--s3); }

  /* Nine columns, not eight: at eight the 81-game grid is 11 rows and runs
     885px, past the desktop fold. Nine brings it to 640px and keeps squares
     comfortably clickable. */
  .mosaic { grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 12px; }
  .square { border-radius: var(--s2); }

  .season-hero h1 { margin: var(--s7) 0 var(--s5); }

  /* Desktop spends width before height: the guest preview moves its mosaic
     into the second column rather than pushing it below the fold. */


}


/* ---------------------------------------------------------------------------
   26 · Utilities
   Restored after being lost in an earlier edit. .is-hidden in particular is
   load bearing: the guest view uses it to hide the aside variants that do not
   belong to the current screen, so without it all four render at once.
   --------------------------------------------------------------------------- */

.stack   { display: grid; gap: var(--s3); }
.stack-4 { display: grid; gap: var(--s4); }
.stack-6 { display: grid; gap: var(--s6); }
.grow    { flex: 1; min-width: 0; }
.is-hidden { display: none !important; }

@media (prefers-contrast: more) {
  :root { --slate: #4A5160; --line: #B9BDB7; }
  .card { background: var(--white); }
}

@media print {
  .rail, .bottom-nav, .actions, .sheet-backdrop { display: none !important; }
  body { background: var(--white); }
  .card { box-shadow: none; border-color: #CCC; }
}
