/* WelcomeMat Ambassador Portal
 *
 * Tokens, type and component shapes lifted from the design canvas
 * "Ambassador Portal - Vendor Agreement.html" so the portal is the same surface
 * as the rest of getwelcomemat.com rather than a lookalike.
 *
 * No framework. The site has none, the four screens are forms and a document,
 * and a build step would be the largest thing in the directory.
 */

* { margin: 0; padding: 0; box-sizing: border-box; }

/* ── THE hidden ATTRIBUTE HAS TO WIN ──────────────────────────────────────── */
/* `hidden` works through the BROWSER's stylesheet, which is `[hidden] { display:
 * none }` at UA origin — and any author rule that sets `display` beats it.
 * `.login` sets `display: grid` and `.filters` sets `display: flex`, so
 * `<div class="login" hidden>` and `<div class="filters" hidden>` both rendered
 * anyway. On the signed-in Home that showed the whole sign-in card, grey band
 * and all, underneath the page — the card's own `background: var(--wash)` and
 * `min-height: calc(100vh - 64px)`.
 *
 * Stated once, here, rather than fixed per element: every future `hidden` panel
 * that happens to carry a class with a `display` would hit this again, and the
 * next one would be found the same way — on a live page. `!important` is load
 * bearing, because the whole point is to outrank an author `display` further
 * down this file.
 *
 * It does not fight anything legitimate: nothing in this portal sets `hidden`
 * and then expects the element to be visible. */
[hidden] { display: none !important; }

:root {
  --ink:    #16232E;
  --blue:   #1E6FB8;
  --deep:   #0F4675;
  --gold:   #F4B400;
  --forest: #2E7D32;
  --soft:   #5A6B78;
  --line:   #DCE3E9;
  --wash:   #F2F6F9;
  --sand:   #FBF7F1;
  --rose:   #B3261E;   /* refusals only; not a brand colour */
}

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

body {
  font-family: 'Source Sans 3', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.5;
  background: #fff;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--deep); }

/* ── Nav ──────────────────────────────────────────────────────────────── */

nav {
  background: #fff;
  border-bottom: 1px solid var(--line);
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 40px;
  gap: 16px;
  flex-wrap: wrap;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: Manrope, sans-serif;
  font-weight: 800;
  font-size: 21px;
  letter-spacing: -.03em;
  color: var(--blue);
  line-height: 1;
}
.logo svg, .logo img { width: 30px; height: 30px; display: block; }
.logo .mat { color: var(--forest); }
.logo small {
  font-family: 'Source Sans 3', sans-serif;
  font-weight: 500;
  font-size: 14px;
  color: var(--soft);
  letter-spacing: 0;
  margin-left: 10px;
  padding-left: 12px;
  border-left: 1px solid var(--line);
}

/* ── THE NAV WRAPS, AND THAT IS ONE PROPERTY ──────────────────────────────
   `.who` holds every nav link plus the mode switch, the community label, the
   name, the avatar and Sign out. It was a flex container with NO flex-wrap, so
   it defaulted to `nowrap` and became ONE UNBREAKABLE LINE.

   `nav` has had `flex-wrap: wrap` all along, but that can only break between
   `.logo` and `.who` — it cannot break INSIDE `.who`. And a nowrap flex item's
   min-content width is the sum of its children, so `.who` OVERFLOWED rather
   than shrinking.

   That is one cause with two symptoms, which is why fixing it at 375px also
   has to be checked at 1100: at 375 the nav was cut off after "Agreements" and
   Sign out could not be reached at all; between about 990px and 1245px the
   page scrolled sideways, because above ~1245 everything happened to fit and
   below ~990 nav's own wrap moved `.who` onto its own line and hid the worst
   of it.

   `min-width: 0` lets it shrink below its content's natural width in the first
   place; `row-gap` keeps wrapped lines off each other; `justify-content:
   flex-end` keeps it against the right edge, which is where it sits when it
   fits on one line, so wrapping does not also move it.

   NO MENU BUTTON, by decision 2026-10-15: a hamburger hides every link behind
   a control that then needs open/close state, focus handling and a second
   layout to test. Wrapping needs none of that and keeps every link tappable. */
.who {
  display: flex; flex-wrap: wrap; justify-content: flex-end;
  align-items: center; gap: 10px 14px; min-width: 0;
  font-size: 14px; color: var(--soft);
}
.who b { color: var(--ink); font-weight: 600; }
.who .av {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--deep); color: #fff;
  display: grid; place-items: center;
  font-weight: 700; font-size: 13px;
}
.who a { font-size: 14px; }

/* ── NAV LINKS ARE 44px TO TAP ON A PHONE ─────────────────────────────────
   Once `.who` wraps, the links stack — and a bare `<a>` is only as tall as its
   line box, about 21px at 14px/1.5. That is half a tap target, in the one place
   where every row of them is now a separate row.

   `min-height` with `inline-flex` rather than vertical padding, and the reason
   is exactness: padding adds to whatever line-height happens to be inherited,
   so `padding: 10px 0` gives 41px today and something else the day the body's
   line-height moves. `min-height: 44px` IS 44px, and centring keeps the text
   where it was.

   THE ROW GAP COMES DOWN TO MATCH. The targets are now 44px and touch-separated
   by their own height, so the 10px between rows is no longer doing any work and
   would only make four rows taller. 4 rows x 44px + 3 x 2px = 182px, against
   4 x 44 + 3 x 10 = 206px.

   700px and not 1080px: this is about fingers, not about layout. Between 700
   and 1080 the nav still fits in one or two rows and is being used with a
   mouse. Desktop is untouched — the rule is inside the query. */
@media (max-width: 700px) {
  .who { gap: 2px 14px; }
  .who a { display: inline-flex; align-items: center; min-height: 44px; }
}

/* ── Type ─────────────────────────────────────────────────────────────── */

h1 { font-weight: 600; font-size: 28px; letter-spacing: -.4px; line-height: 1.15; }
h2 {
  font-size: 12px; letter-spacing: .11em; text-transform: uppercase;
  color: var(--soft); font-weight: 700; margin: 0 0 14px;
}

.crumb { font-size: 13.5px; color: var(--soft); margin-bottom: 10px; }
.help  { font-size: 12.5px; color: var(--soft); margin-top: 5px; }
.help.ok   { color: var(--forest); }
.help.warn { color: var(--rose); }

/* ── Controls ─────────────────────────────────────────────────────────── */

/**
 * 44px, NOT 42. Apple's and Google's touch-target floors are both 44 CSS pixels,
 * and the portal is used standing in a car park on a phone — 0212's round found
 * the 42px buttons genuinely hard to hit at 375px. The two pixels cost nothing in
 * layout and the fields match, because `input` and `.calfield` move with them.
 *
 * `.btn.lg` stays taller; it was already above the floor.
 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 20px; border-radius: 8px;
  font-weight: 600; font-size: 15px;
  border: 1px solid transparent; cursor: pointer;
  font-family: inherit; white-space: nowrap;
}
.btn.p { background: var(--blue);   color: #fff; }
.btn.p:hover:not(:disabled) { background: var(--deep); }
.btn.g { background: #fff; color: var(--ink); border-color: var(--line); }
.btn.g:hover:not(:disabled) { border-color: var(--soft); }
.btn.f { background: var(--forest); color: #fff; }
.btn.lg { height: 50px; font-size: 17px; padding: 0 28px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

label { display: block; font-size: 13px; font-weight: 600; color: var(--soft); margin-bottom: 5px; }

/* input[type=month] IS IN THIS LIST, and was missing until 2026-10-16.

   Five month pickers on four pages — the Ambassadors list and detail, All
   communities, and both ends of the override range — were therefore unstyled
   browser defaults sitting beside styled fields: no border of ours, the wrong
   height, the wrong font, and under 44px on a phone.

   Their inline `width` survives this rule, because an inline style beats a
   stylesheet one. That is why they are narrow by declaration and full-width
   here: the two do not fight.

   An attribute selector matches the ATTRIBUTE, so this also covers the
   browsers that fall back to a text box for type=month — the element still
   says month and still gets the field style. (BACKLOG carries the fallback
   itself, which is a behaviour question, not a styling one.) */
input[type=text], input[type=email], input[type=tel], input[type=date],
input[type=month], input[type=number], select, textarea {
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  font-size: 15px;
  font-family: inherit;
  color: var(--ink);
  background: #fff;
  width: 100%;
}
textarea { height: auto; min-height: 72px; padding: 10px 12px; line-height: 1.5; resize: vertical; }
select { appearance: none; background-image: none; cursor: pointer; }
input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--blue);
  outline-offset: -1px;
  border-color: var(--blue);
}
input:disabled, select:disabled, textarea:disabled { background: var(--wash); color: var(--soft); }

.g2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.g3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px 16px; }
.f  { display: grid; gap: 14px; }
.sec { margin-bottom: 30px; }

.seg { display: flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; height: 44px; }
.seg button {
  flex: 1; border: 0; border-right: 1px solid var(--line);
  background: #fff; font-family: inherit; font-weight: 600; font-size: 14px;
  color: var(--soft); cursor: pointer;
}
.seg button:last-child { border-right: 0; }
.seg button.on { background: var(--deep); color: #fff; }

/* ── A CONSTRAINED CALENDAR ───────────────────────────────────────────────
   For a date where only SOME days are legal — the banner start, which must
   fall on a billing cycle of its agreement (0205). A native input[type=date]
   cannot express that: min/max bound a range, but there is no way to disable
   the days in between, and the browser owns the popover.

   So `.calfield` is a button dressed as an input — same 42px height, border,
   radius and focus ring as the text fields above, so a form using both does
   not look like a form built twice. */

.calwrap { position: relative; }

.calfield {
  height: 44px; width: 100%;
  border: 1px solid var(--line); border-radius: 8px;
  padding: 0 12px;
  font-size: 15px; font-family: inherit; color: var(--ink);
  background: #fff; cursor: pointer; text-align: left;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.calfield svg { color: var(--soft); flex: none; }
.calfield:hover:not(:disabled) { border-color: var(--soft); }
.calfield:focus { outline: 2px solid var(--blue); outline-offset: -1px; border-color: var(--blue); }
.calfield:disabled { background: var(--wash); color: var(--soft); cursor: not-allowed; }
.calfield.empty { color: var(--soft); }

.calpop {
  position: absolute; z-index: 40; top: calc(100% + 6px); left: 0;
  width: 268px; padding: 12px;
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 10px 28px rgba(22, 35, 46, .14);
}
.calpop .calhead {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px;
}
.calpop .calhead .m { font-weight: 700; font-size: 14.5px; color: var(--ink); }
.calpop .calhead button {
  width: 28px; height: 28px; border-radius: 7px;
  border: 1px solid var(--line); background: #fff;
  color: var(--ink); cursor: pointer; font-family: inherit; font-size: 15px;
  line-height: 1; display: flex; align-items: center; justify-content: center;
}
.calpop .calhead button:hover:not(:disabled) { border-color: var(--soft); }
/* A month with no legal date in it is not navigable, rather than navigable and
   then empty — the disabled arrow is what says "this is the first month". */
.calpop .calhead button:disabled { opacity: .35; cursor: not-allowed; }

.calpop .calgrid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.calpop .dow {
  font-size: 11px; font-weight: 700; color: var(--soft); text-transform: uppercase;
  text-align: center; padding-bottom: 4px; letter-spacing: .04em;
}
.calpop .day {
  height: 32px; border: 0; border-radius: 7px; background: #fff;
  font-family: inherit; font-size: 13.5px; color: var(--ink); cursor: pointer;
}
.calpop .day:hover:not(:disabled) { background: var(--wash); }
/* Not greyed into illegibility: the shape of the month still has to read, and a
   vendor asking "why not the 8th?" is answered by the help line, not by a blank
   grid. */
.calpop .day:disabled { color: #B9C4CD; cursor: not-allowed; background: #fff; }
.calpop .day.on { background: var(--blue); color: #fff; font-weight: 700; }
.calpop .day.blank { visibility: hidden; }

/* ── A MONTH PICKER ───────────────────────────────────────────────────────
   0212's runs made the DAY grid the wrong control. A banner start is always a
   billing cycle — the 1st or the 15th — so a 42-cell month showed one clickable
   day and 41 dead ones, and in testing the live form it read as broken: the
   single live day looked like a bug and the ‹ › arrows were not noticed.

   So the grid holds the CYCLE DATES themselves, three across, a year at a time.
   Twelve cells fill one screen of a 12-month term, every one of them meaningful,
   and the year header pages with the same ‹ › the day calendar uses.

   FITS 335px: 3 × 84px plus two 8px gaps plus 2 × 12px padding is 300, inside the
   268px popover's width + padding at the narrowest phone the portal supports.    */
.calpop.monthpop { width: 300px; }
.calpop .monthgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.calpop .mo {
  min-height: 44px; border: 1px solid var(--line); border-radius: 8px;
  background: #fff; font-family: inherit; font-size: 13.5px; font-weight: 600;
  color: var(--ink); cursor: pointer; padding: 4px 2px; line-height: 1.25;
}
.calpop .mo:hover:not(:disabled) { border-color: var(--soft); background: var(--wash); }
/* Legible, not erased. An Ambassador has to be able to read WHICH month is
   unavailable to understand the reason printed under the grid. */
.calpop .mo:disabled { color: #B9C4CD; border-color: #ECF0F3; cursor: not-allowed; background: #fff; }
.calpop .mo.on { background: var(--blue); color: #fff; border-color: var(--blue); }
/* The reasons, under the grid: one line per distinct reason actually present, so
   the picker explains itself instead of relying on a tooltip no phone shows. */
.calpop .why { margin-top: 10px; font-size: 12px; color: var(--soft); line-height: 1.45; }
.calpop .why b { color: var(--ink); font-weight: 600; }

/* ── THE BANNER RUNS ──────────────────────────────────────────────────────
   One row per run: when it starts, how long, and a way to remove it. Stacked on a
   phone and in a line on a desk, because three controls side by side at 375px
   leaves none of them tappable.                                                 */
.runs { display: grid; gap: 10px; }
.runrow { border: 1px solid var(--line); border-radius: 10px; padding: 12px; background: #fff; }
.runrow.inherited { background: var(--wash); }
.runmain { display: grid; grid-template-columns: 1fr 168px auto; gap: 10px; align-items: start; }
.runmain .seg button { font-size: 13px; }
.runrow .runhelp { margin-top: 8px; font-size: 12.5px; color: var(--soft); line-height: 1.45; }
.runrow .runhelp.warn { color: var(--rose); }
.runtotal { font-size: 13px; font-weight: 600; color: var(--soft); margin-top: 4px; }
.runtotal.warn { color: var(--rose); }

@media (max-width: 560px) {
  .runmain { grid-template-columns: 1fr; }
  .calpop.monthpop { width: min(300px, calc(100vw - 48px)); }
}

.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.plan {
  border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px;
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  background: #fff; cursor: pointer; text-align: left; font-family: inherit;
}
.plan .n { font-weight: 600; color: var(--ink); }
.plan .d { font-size: 12.5px; color: var(--soft); }
.plan .pr {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 600; font-size: 22px; color: var(--blue); white-space: nowrap;
}
.plan .pr span { font-size: 13px; font-family: 'Source Sans 3', sans-serif; color: var(--soft); }
.plan.on { border-color: var(--blue); background: #F3F8FD; box-shadow: inset 0 0 0 1px var(--blue); }

/* ── The header mode switch ───────────────────────────────────────────────
   Only drawn for somebody holding a seat AND somewhere to sell. Built on `.seg`,
   which already gives the filled `.on` state, so this adds only the sizing.

   SHOWN AT EVERY WIDTH (2026-11-10). It used to be hidden at 900px and below,
   on the reasoning that the nav links collapsed there too; they have wrapped
   instead since 2026-10-15, and a hidden switch left a VP on a phone with no
   way into My communities, so no way to start an agreement. `.who` wraps, so
   on a phone the switch takes a row of its own; under 700px its buttons are
   44px to tap, like the nav links. */

.seg.modeswitch { height: 34px; border-radius: 999px; flex: none; }
.seg.modeswitch button { flex: none; padding: 0 12px; font-size: 13px; white-space: nowrap; }
@media (max-width: 700px) {
  .seg.modeswitch { height: auto; }
  .seg.modeswitch button { min-height: 44px; }
}

/* ── Panels ───────────────────────────────────────────────────────────────
   A content panel, for a form or a status card inside a page. NOT `.card`,
   which is the sign-in box: that one is max-width 420px with 38px of padding
   and would render a page-width form as a narrow column. The ok/warn variants
   borrow `.msg`'s palette so a green panel and a green message agree. */

.panel {
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  padding: 16px; width: 100%;
}
.panel.ok   { background: #F6FBF6; border-color: #BFE0C1; }
.panel.warn { background: #FFFCF2; border-color: #F0DFA8; }
.panel + .panel { margin-top: 14px; }

/* ── Sign-in ──────────────────────────────────────────────────────────── */

.login { background: var(--wash); display: grid; place-items: center; padding: 20px; min-height: calc(100vh - 64px); }
.card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 38px 36px; width: 100%; max-width: 420px; }
.card h1 { font-size: 26px; margin: 18px 0 6px; }
.card p { color: var(--soft); font-size: 15px; margin-bottom: 24px; }
.card .btn { width: 100%; margin-top: 6px; }
.card .foot { font-size: 13px; color: var(--soft); margin-top: 22px; text-align: center; }
.card .back { display: block; text-align: center; margin-top: 14px; font-size: 13.5px; }

/* ── Shell ────────────────────────────────────────────────────────────── */

.main { padding: 36px 44px 60px; }
.head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 30px; gap: 20px; flex-wrap: wrap; }

/* ── A ROW OF BUTTONS ─────────────────────────────────────────────────────
   `.acts` HAD NO BASE RULE. Of its 24 uses, 11 are `.head .acts` and 2 are
   `.seat .acts` — both already flex — and the remaining ELEVEN were an
   unstyled block div: clients/detail:315, events/index:60, categories:54 and
   :211, seats:51 and :75, ambassadors/detail:344 and :392, onboard:160, :271
   and :280. Two `.btn`s in one of those sat as inline boxes and WRAPPED WITH
   NO ROW GAP at narrow widths, leaving two 44px tap targets touching.

   `/leader/onboard/` does exactly that in its owner-only branch — "Mark active
   now" plus "Their page" measure about 293px against roughly 303px of room at
   375px, so they wrap on any narrower phone. And
   `/leader/ambassadors/detail.html:392` had already patched around it with an
   inline `gap:8px;flex-wrap:wrap` — the same bug found once and fixed in one
   place. That inline style is LEFT ALONE: it is now redundant except that its
   8px gap still wins over the 10px here, which is a difference of two pixels
   on one row and not worth a second edit to prove a point.

   `flex-wrap` is the half that matters: `.btn` is `white-space: nowrap`, so a
   row that could not wrap would push its panel wider than the screen instead.
   The row gap comes from `gap`, which is what stops the wrapped line sitting
   flush against the one above it.

   NO `justify-content`, AND THAT WAS CHECKED RATHER THAN ASSUMED. Switching a
   block div to flex stops `text-align` positioning its children, so any
   `.acts` inheriting `text-align: right` or `center` would have jumped from
   right or centre to left. Every source of those in this stylesheet is a TABLE
   OR LIST CELL — `.num`, `.doc td:last-child`, `.kv dd`, and the inline
   `text-align:right` on `<td>`s — plus `.empty`, `.loading`, `.done` and
   `.card .foot`/`.back`. No `.acts` sits inside any of them: the two that
   looked like they might, `home.js:421` and `onboard:160`, turned out to be a
   `.head .acts` and a sibling of `.empty` rather than a child. So every one of
   the eleven was already left-aligned, and flex-start keeps them there.

   `.head .acts` below is left as it is — it sets the same display and gap, and
   inherits this `flex-wrap` because it never declares one. */
.acts { display: flex; gap: 10px; flex-wrap: wrap; }
.head .acts { display: flex; gap: 10px; }

.shell { display: grid; grid-template-columns: minmax(0, 1fr) 480px; align-items: start; }
.side { background: var(--wash); border-left: 1px solid var(--line); padding: 36px 34px; position: sticky; top: 0; max-height: 100vh; overflow-y: auto; }

/* ── Status pill ──────────────────────────────────────────────────────── */

.status {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--soft); background: #fff; border: 1px solid var(--line);
  border-radius: 999px; padding: 5px 12px; white-space: nowrap;
}
.status i { width: 8px; height: 8px; border-radius: 50%; background: #B7C2CB; }
.status.sent i      { background: var(--gold); }
.status.signed i    { background: var(--forest); }
.status.active i    { background: var(--forest); }
.status.active      { color: var(--forest); }
.status.cancelled i { background: var(--rose); }
/* 0294. Withdrawn is final but not a fault: muted text, grey dot. */
.status.withdrawn   { color: var(--soft); opacity: .8; }
.status.withdrawn i { background: #B7C2CB; }

/* ── List ─────────────────────────────────────────────────────────────── */

.list { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.row {
  /* Vendor · Community · Plan · Start · Term ends · Status */
  display: grid; grid-template-columns: 1.7fr 1fr 1fr .8fr .8fr auto;
  gap: 14px; align-items: center; padding: 13px 18px;
  border-bottom: 1px solid var(--line); font-size: 14.5px;
  background: #fff; width: 100%; text-align: left; font-family: inherit; color: inherit;
}
a.row:hover { background: var(--wash); }
.row:last-child { border-bottom: 0; }
.row.h {
  background: var(--wash); font-size: 12px; letter-spacing: .08em;
  text-transform: uppercase; color: var(--soft); font-weight: 700;
}
.row b { font-weight: 600; }
.row .m { color: var(--soft); font-size: 13px; }

.empty { padding: 48px 20px; text-align: center; color: var(--soft); }
.empty p { margin-bottom: 18px; }

/* ── A person in a row ────────────────────────────────────────────────────
   0133 put avatar_url on community_team() and 0138 put it on
   portal_advisors(), and until now nothing rendered either. A face beside a
   name is how an ambassador recognises a neighbour they have met once at a
   meeting; initials are the fallback and are never blank, because an empty
   circle reads as a broken image rather than as "no photo yet". */
.person { display: flex; align-items: center; gap: 10px; min-width: 0; }
.face {
  width: 30px; height: 30px; border-radius: 50%; flex: none;
  object-fit: cover; background: var(--deep);
  display: grid; place-items: center;
  font-size: 11.5px; font-weight: 700; color: #fff; letter-spacing: .02em;
}
.person .nm { min-width: 0; }
.person .nm b,
.person .nm .m { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Advisors: Person · Appointed · Last active · action. One column fewer than
   the agreements grid `.row` is shaped for. */
.row.adv { grid-template-columns: 1.6fr 1fr 1fr auto; }
/* Categories: Category · Limit · Live listings · actions. The limit is the
   column Corporate came to the page to change, so it sits beside the name
   rather than at the end where the buttons are. */
.row.cat { grid-template-columns: 1.6fr .7fr 1fr auto; }
/* READ-ONLY, for a VP or an SVP: Category · Limit and nothing else. The Live
   listings column is dropped rather than filled with em dashes, because
   category_live_counts is owner-only and returns a leader no rows — a column of
   placeholders would read as "none sold" rather than "not shown to you". */
.row.cat.ro { grid-template-columns: 1.6fr .7fr; }
/* A retired category is still rendered — it is on every vendor and agreement
   that was ever sold under it — but it must not read as sellable. Dimmed
   rather than struck through: a strikethrough on a word that still appears in
   the directory says "this is wrong", and it is not wrong, it is closed. */
.row.cat.off { background: var(--wash); color: var(--soft); }
.row.cat.off b { font-weight: 500; }
/* Two columns, not four: a Watch alert's title, type, author, age and
   resolution all belong in one readable block, and the second column is the
   two actions. Columnising them would set an alert's TEXT in a 1fr cell. */
.row.watch { grid-template-columns: 1fr auto; align-items: start; }
/* The same gold tint and ink the app's WATCH ADVISOR tag uses, so an Ambassador
   who sees both surfaces reads one badge, not two. */
.watchchip {
  display: inline-block;
  margin-left: 8px;
  padding: 1px 6px;
  border-radius: 999px;
  background: #FBF1D7;
  color: #7A5500;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .06em;
  vertical-align: middle;
}

/* Filter chips above the list. */
.filters { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  height: 32px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--line); background: #fff;
  font-family: inherit; font-size: 13.5px; font-weight: 600; color: var(--soft);
  cursor: pointer;
}
.chip:hover { border-color: var(--soft); }
.chip.on { background: var(--deep); border-color: var(--deep); color: #fff; }
.chip .count {
  display: inline-grid; place-items: center; min-width: 20px; height: 20px;
  padding: 0 6px; border-radius: 999px;
  background: var(--wash); color: var(--soft);
  font-size: 12px; font-weight: 700;
}
.chip.on .count { background: rgba(255,255,255,.22); color: #fff; }
/* Nothing to chase is worth saying quietly rather than showing a zero. */
.chip.empty-count { opacity: .55; }

/* Renewal countdown, beside the status pill. Gold at 90 days, red at 30 —
   the same two colours the app already uses for "attention" and "refusal". */
.pill {
  display: inline-flex; align-items: center;
  font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  border-radius: 999px; padding: 4px 9px; margin-left: 8px; white-space: nowrap;
}
.pill.warn   { background: #FFF6DC; color: #7A5A00; border: 1px solid #F0DFA8; }

/* A HELD STATE WRITTEN AS PROSE, not as a pill. The Ambassadors list prints the
   payout hold as a sentence — "no W-9 on file and no bank details on file" —
   and a pill is for a short label: its uppercase, letter-spacing and radius
   fight prose, and a wrapped two-line pill in a table cell reads as a broken
   control.

   #7A5A00 IS SHARED WITH .pill.warn ABOVE, deliberately: the same ink means the
   same state, so the list and the Ambassador detail card (whose panel uses the
   matching .panel.warn background) look like one thing. If that colour moves,
   move both. It is not `--rose`, which is a different colour used by
   .help.warn. */
.held { color: #7A5A00; font-size: 13px; line-height: 1.35; white-space: normal; }
.pill.urgent { background: #FDECEA; color: #7A1B15; border: 1px solid #F3C4BF; }
.pill.ended  { background: #FDECEA; color: #7A1B15; border: 1px solid #F3C4BF;
               text-transform: none; letter-spacing: 0; font-weight: 600; }
/* The listing's state. Forest for live because that is what the app already
   uses for a healthy vendor; grey for pending because "not yet" is not a
   warning and should not compete with the renewal pills beside it. */
.pill.live    { background: #E9F5EA; color: #1E5C22; border: 1px solid #BFE0C1; }
.pill.pending { background: var(--wash); color: var(--soft); border: 1px solid var(--line);
                text-transform: none; letter-spacing: 0; font-weight: 600; }

/* ── The document ─────────────────────────────────────────────────────── */

.doc {
  background: #fff; border: 1px solid var(--line); border-radius: 6px;
  padding: 30px; font-size: 12.5px; line-height: 1.55; color: var(--ink);
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.doc h3 { font-family: 'Cormorant Garamond', Georgia, serif; font-size: 22px; font-weight: 600; margin-bottom: 2px; }
.doc .sub { color: var(--soft); font-size: 12px; margin-bottom: 16px; }
.doc h4 { font-size: 11px; letter-spacing: .09em; text-transform: uppercase; color: var(--soft); font-weight: 700; margin: 14px 0 5px; }
.doc p { margin-bottom: 6px; text-wrap: pretty; }
.doc ul { padding-left: 20px; margin-bottom: 6px; }
.doc mark { background: #FFF3C4; color: inherit; padding: 0 3px; border-radius: 2px; }
.doc .more { color: var(--soft); font-style: italic; }
.doc table { width: 100%; border-collapse: collapse; margin: 6px 0 4px; }
.doc td { padding: 5px 0; border-bottom: 1px solid var(--line); }
.doc td:last-child { text-align: right; font-weight: 600; }
.doc .sig { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 18px; }
.doc .sig div { border-top: 1px solid var(--ink); padding-top: 5px; font-size: 11.5px; color: var(--soft); }

/* The full terms, folded away until asked for. <details> rather than a script:
   it opens with JavaScript broken, and it is keyboard-operable for free. */
.terms-fold { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 12px; }
.terms-fold summary {
  cursor: pointer; font-size: 12px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--soft); list-style: none;
}
.terms-fold summary::-webkit-details-marker { display: none; }
.terms-fold summary::before { content: '▸ '; }
.terms-fold[open] summary::before { content: '▾ '; }
.terms-fold .body { margin-top: 12px; }

/* ── Signing page ─────────────────────────────────────────────────────── */

.signwrap { background: var(--wash); min-height: calc(100vh - 64px); padding: 40px 20px 70px; }
.signcol { max-width: 760px; margin: 0 auto; }
.signcol .doc { padding: 44px 52px; font-size: 14px; }
.signcol .doc h3 { font-size: 30px; }
.signcol .doc h4 { font-size: 12px; margin-top: 20px; }
.intro { display: flex; justify-content: space-between; align-items: center; margin-bottom: 22px; gap: 16px; flex-wrap: wrap; }
.intro p { color: var(--soft); }

.signbox { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 26px 28px; margin-top: 22px; }
.signbox .g2 { align-items: end; }
.chk { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--ink); margin: 16px 0 20px; cursor: pointer; }
.chk input { width: 18px; height: 18px; flex: none; margin-top: 2px; accent-color: var(--blue); }
.sigline {
  min-height: 64px; border: 1px dashed #B7C2CB; border-radius: 8px;
  display: flex; align-items: center; padding: 0 16px;
  font-family: 'Cormorant Garamond', Georgia, serif; font-style: italic;
  font-size: 28px; color: var(--ink); background: var(--sand);
  overflow-wrap: anywhere;
}
.sigline:empty::before { content: 'Your name will appear here'; color: #B7C2CB; font-size: 18px; }
.meta { font-size: 12.5px; color: var(--soft); margin-top: 12px; }
.signrow { display: flex; justify-content: space-between; align-items: center; margin-top: 18px; gap: 20px; flex-wrap: wrap; }

.done { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 34px 32px; text-align: center; }
.done .tick {
  width: 52px; height: 52px; border-radius: 50%; background: var(--forest); color: #fff;
  display: grid; place-items: center; margin: 0 auto 18px; font-size: 26px;
}
.done h1 { font-size: 24px; margin-bottom: 8px; }
.done p { color: var(--soft); margin-bottom: 20px; }

/* ── Messages ─────────────────────────────────────────────────────────── */

/* `overflow-wrap: anywhere` because a message is often NOT prose. showMessage
   prints whatever the server said, and a database error or a URL arrives as one
   unbroken token with no space to break at — which then runs straight through
   the coloured border and off the side of a phone. `anywhere` breaks mid-token
   as a last resort; `break-word` would not, because it does not shrink the
   box's min-content width, so a long token can still force the box wider than
   its parent. Found at 375px with a blocked function URL in the box. */
.msg { border-radius: 8px; padding: 12px 14px; font-size: 14px; margin-bottom: 16px; line-height: 1.5; overflow-wrap: anywhere; }
.msg.err  { background: #FDECEA; color: #7A1B15; border: 1px solid #F3C4BF; }
.msg.ok   { background: #E9F5EA; color: #1E5C22; border: 1px solid #BFE0C1; }
.msg.warn { background: #FFF8E1; color: #6B4E00; border: 1px solid #F0DFA8; }
.msg:empty { display: none; }

.loading { padding: 48px 20px; text-align: center; color: var(--soft); }

/* ── Narrow screens ───────────────────────────────────────────────────── */

/* ── DATA TABLES (Clients, sponsors) ────────────────────────────────────────
 *
 * The .list / .row pattern above is a CSS grid, which is right for two or three
 * fields and wrong for the Clients table: seven money columns have to line up
 * digit for digit down the page, and a grid with seven tracks cannot be read
 * across. So these screens use a real table.
 *
 * .tblwrap scrolls HORIZONTALLY and the page never does — eight columns do not
 * fit a phone, and the alternative (dropping columns at a breakpoint) would hide
 * the number somebody opened the screen for.
 */
.tblwrap { border: 1px solid var(--line); border-radius: 10px; overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 760px; }
.tbl th, .tbl td { padding: 11px 14px; border-bottom: 1px solid var(--line); text-align: left; }
.tbl thead th {
  background: var(--wash); font-size: 12px; font-weight: 600; color: var(--soft);
  letter-spacing: .04em; text-transform: uppercase; white-space: nowrap;
}
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover { background: var(--wash); }
.tbl a { color: var(--ink); font-weight: 600; text-decoration: none; }
.tbl a:hover { color: var(--blue); text-decoration: underline; }

/* Money, right-aligned and tabular so the columns align on the decimal point
 * rather than on glyph width. */
.num { text-align: right !important; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* A negative Ambassador share is a real answer and is shown as one, never hidden
 * and never rendered as zero. See the help line on the Clients screen. */
.neg { color: #7A1B15; }

/* The totals row. Inside <tfoot> so it stays with the table when it scrolls. */
.tbl tfoot td {
  border-top: 2px solid var(--line); border-bottom: 0;
  font-weight: 700; background: var(--wash);
}

/* ── EVENT CARDS AND THEIR SOLD/SLOTS BARS ──────────────────────────────── */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.evcard {
  border: 1px solid var(--line); border-radius: 12px; padding: 20px 22px; background: #fff;
}
.evcard h3 { font-size: 17px; margin: 0 0 2px; }
.evcard .when { font-size: 13px; color: var(--soft); margin-bottom: 14px; }
.lvl { margin-bottom: 12px; }
.lvl .t { display: flex; justify-content: space-between; font-size: 13.5px; margin-bottom: 5px; gap: 10px; }
.lvl .t b { font-weight: 600; }
.bar { height: 7px; border-radius: 999px; background: var(--line); overflow: hidden; }
/* Width is set inline from sold/slots — the only inline style on these pages,
 * because it is data and not design. Full is green; anything else is blue. */
.bar i { display: block; height: 100%; background: var(--blue); border-radius: 999px; }
.bar.full i { background: #2E7D32; }

/* ── READ-ONLY FACTS, AND THE PRIVATE SPLIT BOX ─────────────────────────── */
/* Signed terms are a definition list, not a form: nothing here is editable, and
 * a disabled input would invite the reader to try. */
.kv { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 9px 18px; font-size: 14px; }
.kv dt { color: var(--soft); margin: 0; }
.kv dd { margin: 0; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }

/* AMBASSADOR-FACING ONLY. Tinted and labelled so it cannot be mistaken for part
 * of the document — a vendor never sees retail or the split. */
.splitbox {
  background: var(--wash); border: 1px solid var(--line); border-radius: 10px;
  padding: 16px 18px; margin-top: 16px;
}
.splitbox h4 {
  font-size: 12px; text-transform: uppercase; letter-spacing: .06em;
  color: var(--soft); margin: 0 0 10px;
}

/* ── THE LEADER SUMMARY STRIP ────────────────────────────────────────────── */
/* Four figures across every community, for a VP or Senior VP. A strip rather
 * than a card: it is a heading for the table under it, not a panel of its own,
 * and it carries no action. The 1px gaps are the border showing through, so the
 * dividers cannot drift out of alignment with the outer edge. */
.strip {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px; background: var(--line);
  border: 1px solid var(--line); border-radius: 10px; overflow: hidden;
  margin-bottom: 10px;
}
.strip > div { background: var(--wash); padding: 13px 16px; }
.strip .k {
  font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em;
  color: var(--soft);
}
.strip .v {
  font-size: 20px; font-weight: 700; letter-spacing: -.3px;
  font-variant-numeric: tabular-nums; margin-top: 2px;
}
/* The qualifier under a figure — "Before collection", "after barter". Part of
 * the number's meaning rather than decoration, so it is always rendered and
 * never a tooltip. */
.strip .sub { font-size: 12px; color: var(--soft); margin-top: 3px; line-height: 1.35; }
.strip:empty { display: none; }

/* ── SEATS ───────────────────────────────────────────────────────────────── */
/* One tile per seat, INCLUDING the empty ones: leadership_seats.user_id is
 * nullable precisely so a vacancy is a row and not an absence, and an org chart
 * with holes in it is the thing Corporate needs to see. A filled seat is tinted;
 * a vacant one is left plain and says so. */
.seats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.seat {
  border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px;
  background: #fff;
}
.seat.on { background: var(--wash); border-color: #C6D4E0; }
.seat .n {
  font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em;
  color: var(--soft);
}
.seat .who { font-weight: 600; margin-top: 3px; word-break: break-word; }
.seat .vacant { color: var(--soft); font-style: italic; margin-top: 3px; }
.seat .since { font-size: 13px; color: var(--soft); margin-top: 4px; }
.seat .acts { margin-top: 10px; display: flex; gap: 8px; flex-wrap: wrap; }

@media (max-width: 1080px) {
  .shell { grid-template-columns: 1fr; }
  .strip { grid-template-columns: 1fr 1fr; }
  .seats { grid-template-columns: 1fr; }
  .side { border-left: 0; border-top: 1px solid var(--line); position: static; max-height: none; }
  .main { padding: 28px 20px 48px; }
  nav { padding: 10px 20px; }
  .row { grid-template-columns: 1fr auto; gap: 8px 12px; }
  /* `hide-narrow` IS A TABLE-ROW CLASS AND NOTHING ELSE. The `.row` scope is
     deliberate, and as of 2026-10-15 it is also the only place the class is
     used: it hides the columns a `.list`/`.row` grid cannot fit on a phone.

     It used to be on 21 NAV LINKS and on five month-picker labels as well,
     where this rule never reached them — so the class promised a behaviour it
     did not have, and the nav looked like it had a narrow-width story when it
     had none. Those were removed rather than this scope being widened: the nav
     now WRAPS (see .who), and widening it would have hidden the month pickers'
     labels and left four pages with an unlabelled input. */
  .row .hide-narrow { display: none; }
  .row.h { display: none; }
  .g2, .g3, .plans { grid-template-columns: 1fr; }
  .signcol .doc { padding: 28px 22px; }
  .cards { grid-template-columns: 1fr; }
}
