/* Iron Circle HQ — members portal. Same design system as the public site. */
@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Barlow:wght@400;500;600&family=Barlow+Condensed:wght@400;500;600&display=swap');

/* App skin, 2026-07-29. Same black-and-gold identity, restated as a phone app: raised rounded
   cards on a near-black page instead of flat boxes with hairline borders. The token NAMES are
   unchanged on purpose — app.js, calendar.js and the public site all reference them, so the whole
   portal re-skins from these nine lines. --card-2 / --gold-soft / --r are the only additions. */
:root {
  --black: #0b0b0d; --iron: #17171b; --steel: #26262e; --ash: #3a3a44;
  --smoke: #8e8e96;  /* was #77777e: 4.0-4.4:1 on the card blacks, under WCAG 4.5. This passes on all three. */ --silver: #b6b6bc; --white: #f2efe9;
  --gold: #d4af52; --gold-dim: #8a6f2e; --red: #8b1a1a; --amber: #e0982e;
  --green: #4f9257; --ease-out: cubic-bezier(.22, 1, .36, 1);
  --card-2: #1f1f24;                      /* a chip or control sitting ON a card */
  --gold-soft: rgba(212,175,82,.12);      /* the selected/you tint */
  --r: 20px; --r-sm: 14px; --r-xs: 10px; --pill: 999px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
/* One knob for every screen. The whole app is already sized in rem, so scaling the root scales the
   layout AND the type together — a phone, an iPad, a laptop, and a TV across the room all get
   proportionally the same interface instead of a fixed 1080px column with black bars beside it.
   The floor means nothing below ~1250px changes at all; the ceiling stops an ultrawide monitor at
   arm's length from turning into billboard text.
   ponytail: viewport width is the only signal CSS gives us — it can't tell a far-away TV from a big
   desk monitor. If 24px ever feels too large at a desk, lower the ceiling, don't add a toggle. */
html { font-size: clamp(16px, 0.5vw + 9px, 24px); }
body { background: var(--black); color: var(--white); font-family: 'Barlow', sans-serif; line-height: 1.55; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

.bebas { font-family: 'Bebas Neue', sans-serif; letter-spacing: .08em; }
.label { font-family: 'Barlow Condensed', sans-serif; letter-spacing: .25em; text-transform: uppercase; font-size: .8rem; color: var(--gold); }
.label-link { cursor: pointer; transition: filter .15s; }
.label-link:hover { filter: brightness(1.35); }
.muted { color: var(--smoke); }

/* Login */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(ellipse at 50% 35%, #1c1a14 0%, var(--black) 65%); }
.login-box { width: 380px; max-width: 92vw; background: var(--iron); border: 1px solid var(--steel); padding: 2.6rem; }
.login-box h1 { font-family: 'Bebas Neue', sans-serif; font-size: 2.2rem; letter-spacing: .15em; text-align: center; }
.login-box h1 span { color: var(--gold); }
.login-sub { text-align: center; color: var(--smoke); font-family: 'Barlow Condensed', sans-serif;
  letter-spacing: .2em; text-transform: uppercase; font-size: .8rem; margin: .4rem 0 2rem; }
.login-box input { width: 100%; background: var(--black); border: 1px solid var(--steel); color: var(--white);
  padding: .85rem 1rem; font-size: 1rem; margin-bottom: 1rem; font-family: 'Barlow', sans-serif; }
.login-box input:focus { outline: none; border-color: var(--gold); }
.login-box button { width: 100%; background: var(--gold); color: var(--black); border: 1px solid var(--gold);
  font-family: 'Barlow Condensed', sans-serif; letter-spacing: .2em; text-transform: uppercase; font-weight: 600;
  font-size: 1rem; padding: .9rem; transition: all .2s; }
.login-box button:hover { background: transparent; color: var(--gold); }
.login-err { color: #c96a5a; font-size: .85rem; text-align: center; margin-top: .8rem; min-height: 1.2em; }

/* Password reveal-eye (hq/pweye.js wraps each password input in .pw-wrap at load). The wrap is a
   block so it inherits the input's place in the layout; the input keeps its own margin, and the
   button is pulled out of flow so nothing shifts. Padding-right on the input keeps typed text from
   running under the eye. */
.pw-wrap { position: relative; display: block; }
.pw-wrap input[type=password], .pw-wrap input[type=text] { padding-right: 2.9rem !important; }
.pw-eye { position: absolute; top: 0; right: 0; height: 100%; width: 2.8rem !important; display: flex;
  align-items: center; justify-content: center; padding: 0 !important; margin: 0;
  background: none !important; border: none !important; color: var(--smoke) !important;
  cursor: pointer; transition: color .15s; }
/* the input's own margin-bottom would push the button below centre — measure against the box only */
.pw-wrap input { margin-bottom: 0 !important; }
.pw-wrap { margin-bottom: 1rem; }
.fin-form .pw-wrap { margin-bottom: 0; }
.pw-eye:hover { color: var(--gold) !important; }

/* App shell */
.shell { display: flex; min-height: 100vh; }
.sidebar { width: 14rem; background: var(--iron); border-right: 1px solid var(--steel); padding: 1.8rem 0;
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.sidebar .brand { font-family: 'Bebas Neue', sans-serif; font-size: 1.3rem; letter-spacing: .2em; padding: 0 1.6rem 1.6rem; cursor: pointer; }
.sidebar .brand span { color: var(--gold); }
/* Which circle this is, under IC HQ on every page (server-filled, see brandHqPage in server.js). */
.brand .ic-branch { display: block; font-family: 'Barlow Condensed', sans-serif; font-size: .72rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--silver); margin-top: .2rem; line-height: 1.2; white-space: nowrap; }
.brand .ic-branch:empty, .ic-branch-login:empty { display: none; }
.ic-branch-login { text-align: center; color: var(--gold); letter-spacing: .14em; text-transform: uppercase; font-size: .8rem; margin: -.4rem 0 1.4rem; }
.sidebar nav { display: flex; flex-direction: column; flex: 1; }
.sidebar nav button { background: none; border: none; border-left: 2px solid transparent; color: var(--silver);
  text-align: left; padding: .85rem 1.6rem; font-family: 'Barlow Condensed', sans-serif; letter-spacing: .18em;
  text-transform: uppercase; font-size: .9rem; }
.sidebar nav button:hover { color: var(--white); }
.sidebar nav button.active { color: var(--gold); border-left-color: var(--gold); background: rgba(212,175,82,.05); }
.sidebar .me { padding: 1.2rem 1.6rem; border-top: 1px solid var(--steel); font-size: .9rem; }
.sidebar .me .name { font-weight: 600; }
.sidebar .me .role { color: var(--gold-dim); font-family: 'Barlow Condensed', sans-serif; letter-spacing: .15em;
  text-transform: uppercase; font-size: .75rem; }
.sidebar .me button { background: none; border: none; color: var(--smoke); font-size: .8rem; padding: 0; margin-top: .5rem; }
.sidebar .me button:hover { color: var(--red); }

/* min-width:0 for the same reason as .grid > * above: main is a flex item, so it defaults to
   min-width:auto and refuses to shrink below its widest content. The phone tab strips are built to
   scroll sideways inside it — without this, main grew to fit them instead and the whole page
   scrolled sideways on an iPhone. */
/* width:100% matters more than it looks. On a phone .shell becomes a COLUMN, so margin-inline is
   the cross axis — and an auto cross-axis margin cancels flex stretch, leaving main sized to its
   widest content instead of the screen. That's what pushed the Applications and Operations views
   off the side of an iPhone. width:100% restores the stretch; flex-basis:0 means it's ignored on
   the desktop row axis, so the TV centering still works.
   min-width:0 for the same reason as .grid > * — a flex item won't otherwise shrink below its
   content, and the phone tab strips are built to scroll sideways inside main. */
main { flex: 1; width: 100%; min-width: 0; padding: 2.4rem 2.8rem; max-width: 110rem; margin-inline: auto; }
.view { display: none; }
.view.active { display: block; }
.view-title { font-family: 'Bebas Neue', sans-serif; font-size: 2.4rem; letter-spacing: .08em; margin-bottom: .2rem; }

/* ---- the back arrow ----
   Top left of the screen, above the title, because that is where Kadin asked for it and where a
   phone puts it. It sits in the flow rather than pinned, so it can never cover the title or fight
   the fixed bottom tab bar for the same corner.

   A real <button> in the markup (see #view-export in app.html): focusable, Enter/Space work for
   free, and the ring below is the visible focus state a keyboard needs. 44px is Apple's minimum
   touch target and is not negotiable here — this is used one-handed on a phone. The glyph is the
   ← already in this app's vocabulary of plain text marks (⌂ ◎ ⧉ ▦ ◔), not a new icon set: HQ
   deliberately ships no icon font, and the arrow has to stay monochrome on iOS.

   48, not Apple's bare minimum of 44: the root font-size is a clamp() on viewport width, so a box
   sized to the floor lands a hair UNDER it on some widths once the engine has rounded — measured at
   43.99px on a 390pt phone. A target this important does not get to be off by a rounding error. */
.view-back { min-width: 48px; min-height: 48px; display: inline-flex; align-items: center;
  justify-content: center; margin: 0 0 .4rem -.55rem; padding: 0 .55rem;
  background: none; border: none; color: var(--silver); font-size: 1.5rem; line-height: 1;
  cursor: pointer; transition: color .2s var(--ease-out); }
.view-back:hover { color: var(--gold); }
.view-back:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: var(--r-xs); }
/* Colour is the whole of the hover here, so there is nothing left to convey without the fade. */
@media (prefers-reduced-motion: reduce) { .view-back { transition: none; } }

/* The export screen's card: the download and the sentence under it, nothing else competing. */
.export-card { max-width: 42rem; }
.export-note { font-size: .82rem; margin-top: .9rem; }
.view-sub { color: var(--smoke); margin-bottom: 2rem; }

/* Cards & grids */
.card { background: var(--iron); border: 1px solid var(--steel); padding: 1.6rem; }
.grid { display: grid; gap: 1.2rem; }
/* A grid item defaults to min-width:auto, so a wide table pushes its own column open and the whole
   card spills past the edge. This one line is why the Operations tables were "outside the box". */
.grid > * { min-width: 0; }
.g2 { grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); }
.g3 { grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); }
.stat { text-align: center; }
.stat .num { font-family: 'Bebas Neue', sans-serif; font-size: 2.6rem; color: var(--gold); }
.stat .cap { font-family: 'Barlow Condensed', sans-serif; letter-spacing: .2em; text-transform: uppercase;
  font-size: .78rem; color: var(--smoke); }

/* Habits */
/* wrap + a tight row-gap: the sub-line below takes a row of its own instead of fighting the
   controls for the name column's width. */
.habit { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem 1rem; padding: .8rem 0; border-bottom: 1px solid var(--steel); }
.habit:last-child { border-bottom: none; }
.habit .pillar-tag { font-family: 'Barlow Condensed', sans-serif; font-size: .72rem; letter-spacing: .15em;
  text-transform: uppercase; color: var(--gold-dim); width: 66px; flex-shrink: 0; }
/* min-width:0 is what actually lets a flex item shrink below its content — without it `flex:1`
   still floors at min-content and any long word pushes the row wider than the card. */
.habit .h-name { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.habit .h-streak { color: var(--amber); font-size: .85rem; white-space: nowrap; }
.habit .h-unit { font-family: 'Barlow Condensed', sans-serif; font-size: .7rem; letter-spacing: .08em;
  opacity: .75; margin-left: .1rem; }
/* Sessions banked this week on a weekly habit. Deliberately dots and not a "2/4" — a man reads how
   many are left at a glance without doing arithmetic on a phone at 6am. */
/* The sub-line under a habit name. It was `white-space: nowrap` to stop "Target: [5] ×/week"
   breaking after the input — but that also pinned the man's OWN goal text ("Manual labor,
   volleyball, running — anything active counts") to one line, so it ran off the card and printed
   straight over the ✓ button. Kaden + Karstyn reported it 2026-08-04. Only the target phrase needs
   to hold together; the rest wraps and stacks. */
/* margin clears the pillar tag, so it reads as a caption on the name. overflow-wrap because men
   paste URLs into the "how will you actually do it?" field and one unbroken link is all it takes. */
.habit .h-sub { flex: 1 1 100%; min-width: 0; overflow-wrap: anywhere; font-size: .8rem; margin-left: calc(66px + 1rem); }
.habit .h-target-wrap { white-space: nowrap; }
.week-pips { display: flex; gap: 3px; flex-shrink: 0; align-items: center; }
.week-pips .pip { width: 6px; height: 6px; border-radius: 50%; border: 1px solid var(--ash); }
.week-pips .pip-hit { background: var(--gold); border-color: var(--gold); }

/* Streak flame. Kadin's ask: the flame should react when you log a day, and sit dead when you
   don't — "the flame icon won't do anything unless you keep on doing your stuff."
   Deliberately CSS-only: three keyframes on one emoji, no canvas, no particles, no library.
   .lit  = ticked today → gentle continuous burn
   .flare = ticked JUST NOW → one spark-and-settle, applied for a single render (see __flareHabit) */
.habit .flame { display: inline-block; transform-origin: 50% 85%;
  filter: grayscale(.8) opacity(.45); transition: filter .35s var(--ease-out); }
.habit .flame.lit { filter: none; animation: flame-burn 2.6s ease-in-out infinite; }
.habit .flame.lit.flare { animation: flame-flare .55s var(--ease-out), flame-burn 2.6s ease-in-out .55s infinite; }
@keyframes flame-burn {
  0%, 100% { transform: scale(1) rotate(0deg); }
  30% { transform: scale(1.06) rotate(-2.5deg); }
  65% { transform: scale(.97) rotate(2deg); }
}
/* The flare BARELY moves (Kyler, 2026-08-25: "I want the fire emoji to barely move"). The screen
   is the celebration now — see .fireedge below — and a 1.5× bouncing emoji next to it read as a
   second, cheaper animation competing with the first. A short brighten and a hair of scale. */
@keyframes flame-flare {
  0% { transform: scale(1); filter: brightness(1.6) saturate(1.3); }
  40% { transform: scale(1.1); filter: brightness(1.45) saturate(1.2); }
  100% { transform: scale(1); filter: none; }
}
/* Motion is decoration here — the streak number carries the same information without it. */
@media (prefers-reduced-motion: reduce) {
  .habit .flame.lit, .habit .flame.lit.flare { animation: none; }
}
.habit button { width: 30px; height: 30px; border: 1px solid var(--ash); background: none; color: transparent; font-size: 1rem; flex-shrink: 0; }
.habit button.done { background: var(--gold); border-color: var(--gold); color: var(--black); }
.habit button:hover { border-color: var(--gold); }
.habit .habit-del { color: var(--smoke); font-size: .85rem; }
.habit .habit-del:hover { border-color: var(--red); color: #c96a5a; }
/* Text buttons inside a habit row. The rule above is written for the tick box — a fixed 30px square
   with `color: transparent`, because the ✓ is drawn by the border and the fill, not by its label.
   Any button carrying actual WORDS inherits that and renders as a blank square: the weekly
   check-in's "Held it" / "Slipped" pair has been invisible since it shipped, and nobody caught it
   because no habit in the circle has reached 45 days yet, so the card has never once been drawn.
   These opt back out. Keep any new worded button in a habit row on this list. */
.habit .checkin-ans, .habit .habit-unpark {
  width: auto; height: auto; color: var(--gold); border-color: var(--gold-dim);
  font-family: 'Barlow Condensed', sans-serif; letter-spacing: .12em; text-transform: uppercase;
  font-size: .75rem; padding: .45rem .9rem; white-space: nowrap;
}
.habit .checkin-ans:hover, .habit .habit-unpark:hover:not(:disabled) { border-color: var(--gold); background: rgba(212,175,82,.1); }
.habit .habit-unpark:disabled { color: var(--smoke); border-color: var(--steel); cursor: not-allowed; }
/* The three answers need room to sit together on a phone without the name column crushing them. */
#weeklyCheckins .habit { flex-wrap: wrap; row-gap: .5rem; }
#weeklyCheckins .habit .h-name { flex: 1 1 100%; }
/* Backfill row — "I did it, I forgot to tick it". Deliberately the quietest thing in the card:
   it sits under the habit in muted text and only appears when there is actually a day to log, so
   the daily list never reads like it is inviting a man to fill in a week he didn't do. */
.habit .h-back { flex: 1 1 100%; display: flex; align-items: center; flex-wrap: wrap; gap: .4rem;
  margin-left: calc(66px + 1rem); font-size: .78rem; color: var(--smoke); }
.habit .habit-back {
  width: auto; height: auto; color: var(--silver); border-color: var(--steel);
  font-family: 'Barlow Condensed', sans-serif; letter-spacing: .1em; text-transform: uppercase;
  font-size: .7rem; padding: .28rem .6rem; white-space: nowrap;
}
.habit .habit-back:hover:not(:disabled) { border-color: var(--gold); color: var(--gold); }
/* A logged day is still a live button — tapping it un-logs it, so it must not look or act dead. */
.habit .habit-back.logged { color: var(--gold); border-color: var(--gold-dim); }
.habit .habit-del:disabled { opacity: .35; cursor: default; }
.habit .habit-del:disabled:hover { border-color: var(--ash); color: var(--smoke); }
.removal-pending-chip { font-family: 'Barlow Condensed', sans-serif; font-size: .68rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--amber); border: 1px solid var(--amber); padding: .15rem .5rem; white-space: nowrap; flex-shrink: 0; }
/* HTO ("Habit Time Off") — same chip recipe as removal-pending, gold accent instead of amber so it
   reads as "away, by design" rather than "something's wrong". */
.hto-chip { display: inline-block; font-family: 'Barlow Condensed', sans-serif; font-size: .68rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--gold); border: 1px solid var(--gold-dim); padding: .15rem .5rem; white-space: nowrap; }
.habit .approve-req, .habit .decline-req { width: auto; font-family: 'Barlow Condensed', sans-serif; letter-spacing: .12em;
  text-transform: uppercase; font-size: .75rem; padding: .35rem .9rem; background: none; flex-shrink: 0; }
.habit .approve-req { border: 1px solid var(--green); color: #7aa87a; }
.habit .decline-req { border: 1px solid var(--red); color: #c96a5a; }

/* Progress bars */
.bar { height: 8px; background: var(--steel); margin-top: .4rem; }
.bar i { display: block; height: 100%; background: var(--gold); }
.pillar-progress { margin-bottom: 1rem; }
.pillar-progress .row { display: flex; justify-content: space-between; font-size: .9rem; }
.pillar-progress .pct { color: var(--gold); }

/* Feed */
.composer { margin-bottom: 1.6rem; }
.composer textarea { width: 100%; background: var(--iron); border: 1px solid var(--steel); color: var(--white);
  font-family: 'Barlow', sans-serif; font-size: .95rem; padding: .9rem 1rem; min-height: 70px; resize: vertical; }
.composer textarea:focus { outline: none; border-color: var(--gold); }
.composer .row, .rollcall .row { display: flex; gap: .6rem; margin-top: .6rem; align-items: center; }
.composer select { background: var(--iron); border: 1px solid var(--steel); color: var(--silver); padding: .5rem .8rem;
  font-family: 'Barlow Condensed', sans-serif; letter-spacing: .1em; text-transform: uppercase; font-size: .82rem; }
.composer .post-btn, .rollcall .post-btn { margin-left: auto; background: var(--gold); border: 1px solid var(--gold); color: var(--black);
  font-family: 'Barlow Condensed', sans-serif; letter-spacing: .18em; text-transform: uppercase; font-weight: 600;
  padding: .55rem 1.6rem; }
.post { border: 1px solid var(--steel); background: var(--iron); padding: 1.3rem 1.5rem; margin-bottom: 1rem; }
.post.prayer { border-left: 2px solid var(--gold); }
.post.scripture { border-left: 2px solid var(--gold-dim); }
.post.gym { border-left: 2px solid var(--amber); }
.post-head { display: flex; align-items: center; gap: .7rem; margin-bottom: .5rem; }
.post-head .who { font-weight: 600; }
.post-head .kind { font-family: 'Barlow Condensed', sans-serif; font-size: .72rem; letter-spacing: .2em;
  text-transform: uppercase; color: var(--gold-dim); }
.post-head .when { margin-left: auto; color: var(--smoke); font-size: .8rem; }
.post-body { color: var(--silver); white-space: pre-wrap; }
.post-actions { margin-top: .8rem; }
.post-actions button { background: none; border: 1px solid var(--ash); color: var(--silver);
  font-family: 'Barlow Condensed', sans-serif; letter-spacing: .15em; text-transform: uppercase; font-size: .78rem;
  padding: .35rem 1rem; }
.post-actions button.prayed { border-color: var(--gold); color: var(--gold); }

/* Quick-tap reactions. The whole row is always on screen — a picker you have to open is a picker
   nobody uses, and eight buttons is small enough to just show. Untapped ones sit dim so the row
   doesn't compete with the post itself. */
.rx-bar { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .7rem; }
.rx { background: none; border: 1px solid transparent; cursor: pointer;
  font-size: 1rem; line-height: 1; padding: .3rem .45rem; opacity: .4;
  display: inline-flex; align-items: center; gap: .25rem; transition: opacity .15s var(--ease-out); }
.rx:hover { opacity: 1; border-color: var(--ash); }
.rx.on { opacity: 1; border-color: var(--gold); background: rgba(212,175,82,.1); }
.rx .rx-n { font-family: 'Barlow Condensed', sans-serif; font-size: .78rem; color: var(--silver); }
.rx.on .rx-n { color: var(--gold); }
/* A reaction someone else already left is worth seeing even before you hover it. */
.rx:has(.rx-n) { opacity: .85; }
/* Press-and-hold to see who reacted. The chip swells while held so the hold reads as deliberate
   rather than as a tap that didn't register.

   THE BLUE-SCREEN BUG. `.rx` alone carried the selection rules, and that is exactly why holding one
   lit the whole screen up blue: a long press on an element that cannot itself be selected makes iOS
   Safari walk UP the tree for something that can, and every ancestor — .rx-bar, .post, #feedList —
   was selectable, so it selected the post, or the lot. The rules have to hold from the container
   down, not on the leaf. Two more come with them: tap-highlight-color, which is a translucent BLUE
   box by default and is the other half of what he is seeing, and touch-action: manipulation, which
   drops the browser's wait-and-see for a double-tap-to-zoom so a tap is acted on when it lands.

   Post text stays selectable further down — a man has to be able to hold a verse and copy it. Only
   the chrome and the controls go dead, which is what the platform apps do. */
#feedList, .rx-bar, .rx {
  -webkit-user-select: none; user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.rx { transition: opacity .15s var(--ease-out), transform .18s var(--ease-out); }
.rx-hold { transform: scale(1.18); opacity: 1; }
@media (prefers-reduced-motion: reduce) { .rx-hold { transform: none; } }
/* The words themselves are the exception — scripture, a prayer request and a reply are all things
   worth copying out of the feed. The reply box is not optional: user-select is inherited, and it
   reaches form controls, so without this line a man could type into the box but could not select a
   word, place a caret by touch, or reach iOS's paste callout inside it. */
#feedList .post-body, #feedList .comment, #feedList .post-head .who,
#feedList input, #feedList textarea {
  -webkit-user-select: text; user-select: text; -webkit-touch-callout: default;
}

/* Who-reacted sheet — rendered inside the shared modal, so scrim/escape/close come free. */
.rx-tabs { display: flex; gap: .35rem; overflow-x: auto; padding: .2rem 0 .7rem;
  border-bottom: 1px solid var(--steel); margin-bottom: .3rem; }
.rx-tab { background: var(--card-2); border: 1px solid transparent; border-radius: var(--pill);
  color: var(--white); font-size: 1rem; line-height: 1; padding: .35rem .7rem; white-space: nowrap;
  display: inline-flex; align-items: center; gap: .3rem; }
.rx-tab.active { background: var(--gold-soft); border-color: var(--gold-dim); }
.rx-tab-n { font-family: 'Barlow Condensed', sans-serif; font-size: .78rem; color: var(--silver); }
.rx-rows { max-height: 46vh; overflow-y: auto; }
.rx-row { display: flex; align-items: center; gap: .6rem; padding: .5rem .1rem;
  border-bottom: 1px solid var(--steel); }
.rx-row:last-child { border-bottom: 0; }
.rx-row-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rx-row-you { font-family: 'Barlow Condensed', sans-serif; letter-spacing: .16em;
  text-transform: uppercase; font-size: .65rem; color: var(--gold); }
.rx-row-e { margin-left: auto; font-size: 1.1rem; }

/* Scoreboard */
table { width: 100%; border-collapse: collapse; }
th { font-family: 'Barlow Condensed', sans-serif; letter-spacing: .18em; text-transform: uppercase; font-size: .78rem;
  color: var(--smoke); text-align: left; padding: .6rem .8rem; border-bottom: 1px solid var(--ash); }
td { padding: .75rem .8rem; border-bottom: 1px solid var(--steel); font-size: .95rem; }
tr.me-row td { background: rgba(212,175,82,.06); }
td .rank { font-family: 'Bebas Neue', sans-serif; color: var(--gold-dim); font-size: 1.2rem; }
.group-goal { margin-top: 1.6rem; }

/* Applications */
.app-card { border: 1px solid var(--steel); background: var(--iron); padding: 1.4rem 1.6rem; margin-bottom: 1rem; }
.app-card .head { display: flex; align-items: baseline; gap: .8rem; }
.app-card .head .when { margin-left: auto; color: var(--smoke); font-size: .8rem; }
.app-card dl { display: grid; grid-template-columns: 160px 1fr; gap: .3rem .8rem; margin: .9rem 0; font-size: .92rem; }
.app-card dt { color: var(--smoke); font-family: 'Barlow Condensed', sans-serif; letter-spacing: .1em; text-transform: uppercase; font-size: .8rem; }
.app-card dd { color: var(--silver); }
/* `.actions` only ever had a rule scoped to .app-card, so the same markup inside a plain .card came
   out as raw browser buttons — grey box, black text, zero padding. That hit "Replay the walkthrough",
   "Open in Calendar App", "Reset Link" and "Redo goals & habits setup" in Settings, all shipped that
   way. Fixed once at .actions rather than per button; .app-card keeps its own rule below for the
   approve/reject variants. This is part of what Kadin means by "make it look like an app". */
.actions { display: flex; gap: .6rem; flex-wrap: wrap; }
.actions button { font-family: 'Barlow Condensed', sans-serif; letter-spacing: .15em; text-transform: uppercase;
  font-size: .8rem; padding: .45rem 1.2rem; background: none; border: 1px solid var(--gold-dim); color: var(--gold);
  transition: border-color .2s, color .2s; }
.actions button:hover { border-color: var(--gold); }
.app-card .actions { display: flex; gap: .6rem; }
.app-card .actions button { font-family: 'Barlow Condensed', sans-serif; letter-spacing: .15em; text-transform: uppercase;
  font-size: .8rem; padding: .45rem 1.2rem; background: none; border: 1px solid var(--ash); color: var(--silver); }
.app-card .actions .approve { border-color: var(--green); color: #7aa87a; }
.app-card .actions .reject { border-color: var(--red); color: #c96a5a; }
.status-pill { font-family: 'Barlow Condensed', sans-serif; font-size: .72rem; letter-spacing: .2em; text-transform: uppercase;
  padding: .2rem .7rem; border: 1px solid var(--ash); color: var(--smoke); }
.status-pill.approved { border-color: var(--green); color: #7aa87a; }
.status-pill.rejected { border-color: var(--red); color: #c96a5a; }
.status-pill.new { border-color: var(--gold); color: var(--gold); }
/* A speaker inside a fortnight — close enough that the countdown should catch the eye. */
.status-pill.soon { border-color: var(--amber); color: var(--amber); }

/* Guest speakers: one card per NIGHT, one block per man. Two men side by side on a wide screen,
   stacked on a phone — neither of them reads as a footnote to the other. */
.sp-topic { margin-top: .7rem; color: var(--white); font-size: 1rem; }
.sp-topic .label { display: block; font-size: .68rem; margin-bottom: .1rem; }
.sp-people { margin-top: .9rem; display: grid; gap: .7rem; }
.sp-people.sp-two { grid-template-columns: 1fr; }
@media (min-width: 720px) { .sp-people.sp-two { grid-template-columns: 1fr 1fr; } }
.sp-person { background: var(--card-2); border-radius: var(--r-sm); padding: .75rem .9rem; }
.sp-name { font-family: 'Bebas Neue', sans-serif; letter-spacing: .06em; font-size: 1.08rem; color: var(--gold); }
.sp-work { font-family: 'Barlow Condensed', sans-serif; letter-spacing: .1em; text-transform: uppercase;
  font-size: .72rem; color: var(--smoke); }
.sp-bio { margin-top: .35rem; color: var(--silver); font-size: .92rem; white-space: pre-wrap; }
.sp-links { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .55rem; }
.sp-links a { font-family: 'Barlow Condensed', sans-serif; letter-spacing: .12em; text-transform: uppercase;
  font-size: .7rem; color: var(--gold); border: 1px solid var(--gold-dim); border-radius: var(--pill);
  padding: .2rem .7rem; }
.sp-links a:hover { background: var(--gold-soft); }

.status-pill.archived { border-color: var(--ash); color: var(--silver); }
.score-chip { font-family: 'Barlow Condensed', sans-serif; font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; padding: .2rem .7rem; border: 1px solid; }
.score-chip.strong { border-color: var(--green); color: #7aa87a; }
.score-chip.standard { border-color: var(--ash); color: var(--silver); }
.score-chip.weak { border-color: var(--amber); color: var(--amber); }

/* Application filter tabs */
/* A .filter-tabs that fits inside a card header — no bottom margin, smaller type. */
.mini-tabs { display: flex; gap: .35rem; flex-shrink: 0; }
.mini-tabs button { background: none; border: 1px solid var(--ash); color: var(--smoke);
  font-family: 'Barlow Condensed', sans-serif; letter-spacing: .12em; text-transform: uppercase;
  font-size: .68rem; padding: .28rem .6rem; white-space: nowrap; }
.mini-tabs button:hover { border-color: var(--gold); color: var(--silver); }
.mini-tabs button.active { border-color: var(--gold); color: var(--gold); background: rgba(212,175,82,.06); }
/* All-Time habit rows. The dot strip is the point: a percentage hides WHERE the misses fell, and
   scattered misses versus a three-week collapse are the same number and completely different men. */
.at-row { padding: .8rem 0; border-bottom: 1px solid var(--steel); }
.at-row:last-of-type { border-bottom: none; }
.at-top { display: flex; align-items: center; gap: .3rem 1rem; flex-wrap: wrap; }
.at-name { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.at-pct { color: var(--gold); font-family: 'Barlow Condensed', sans-serif; font-size: 1.15rem; letter-spacing: .04em; }
.at-sub { font-size: .78rem; }
/* The day board: one square per day since the habit started, week per column, weekdays down the
   rows. Scrolls sideways rather than shrinking — squares small enough to fit a year on a phone are
   too small to read or tap. */
.hb-scroll { overflow-x: auto; padding-bottom: .25rem; margin: .55rem 0 .4rem; }
.hb-months { display: grid; grid-auto-flow: column; grid-auto-columns: 13px; gap: 3px; margin-bottom: 3px; }
.hb-months span { font-size: .6rem; line-height: 1; color: var(--smoke); white-space: nowrap; }
.hb-grid { display: grid; grid-auto-flow: column; grid-template-rows: repeat(7, 13px);
  grid-auto-columns: 13px; gap: 3px; }
.hb-cell { width: 13px; height: 13px; padding: 0; border-radius: 3px; border: 1px solid transparent;
  background: var(--gold); cursor: default; }
.hb-cell.miss { background: var(--steel); }
.hb-cell.pre { background: var(--card-2); }   /* before this habit had any record — not a miss */
.hb-cell.today { border-color: var(--white); }
.hb-cell:not([disabled]) { cursor: pointer; box-shadow: 0 0 0 1px var(--gold-dim); }
.hb-cell:not([disabled]):hover { border-color: var(--gold); }
/* Weekly habits get one square per WEEK, carrying the session count against the target. A day board
   would paint a 4×/week habit's three rest days grey and call a man who hit his target exactly 57%
   consistent. Bigger than a day cell because it holds a number, and wraps rather than scrolls —
   a year is 52 of these, not 365. */
.hb-weeks { display: flex; flex-wrap: wrap; gap: 4px; margin: .55rem 0 .4rem; }
.hb-week { width: 22px; height: 22px; border-radius: 4px; display: flex;
  align-items: center; justify-content: center; font-size: .62rem; font-variant-numeric: tabular-nums;
  background: var(--steel); color: var(--smoke); border: 1px solid transparent; }
.hb-week.hit { background: var(--gold); color: var(--black); font-weight: 600; }
.hb-week.part { background: var(--gold-dim); color: var(--white); }   /* short of target, not nothing */
.hb-week.pre { background: var(--card-2); }                            /* approved time off */
.hb-week.now { background: var(--card-2); border-color: var(--gold-dim); color: var(--gold); }
.hb-week { cursor: pointer; }
.hb-week.open { border-color: var(--white); }
/* The days inside an opened week. A weekly habit is judged by the week, but the days underneath are
   still the record, and this is where they get fixed. */
.hb-weekdays { display: flex; flex-wrap: wrap; gap: .5rem; margin: .1rem 0 .5rem; }
.hb-wd { display: flex; flex-direction: column; align-items: center; gap: .2rem;
  font-size: .58rem; color: var(--smoke); text-transform: uppercase; letter-spacing: .06em; }
/* LOGGED LATE — filled in outside the three-day "I forgot" window. Hatched rather than a different
   colour: it still reads as a day he kept (because it is), but it can never be mistaken for one he
   ticked on the day. This mark is the entire reason any-day backfill is safe to offer, so it must
   survive a theme change and a squint. */
.hb-cell.late { background-image: repeating-linear-gradient(45deg,
  transparent 0 2px, rgba(11,11,13,.55) 2px 4px); }
.hb-cell.late.miss, .hb-cell.late.pre { background-image: none; }
/* A day a streak freeze covered. Icy blue, not the grey of an ordinary miss (Kyler, 2026-09-03):
   he did not do it, but he had banked a perfect week and it cost him nothing — and that is the
   whole reward for the perfect week, so it has to be visible on the board.
   Set AFTER .miss so it wins on specificity ties without an !important. */
/* Background only — .hb-cell:not([disabled]) above owns box-shadow to draw the "you can tap this"
   gold ring, and an inset shadow here would silently cancel it on the days that are still open. */
.hb-cell.frozen { background: #4a86c4; }
.ic-chip { display: inline-block; margin-left: .5rem; font-family: 'Barlow Condensed', sans-serif;
  font-size: .66rem; letter-spacing: .1em; text-transform: uppercase; color: var(--smoke);
  border: 1px solid var(--steel); padding: .1rem .4rem; border-radius: var(--pill); }
.filter-tabs { display: flex; gap: .5rem; margin-bottom: 1.2rem; flex-wrap: wrap; }
.filter-tabs button { background: none; border: 1px solid var(--ash); color: var(--silver);
  font-family: 'Barlow Condensed', sans-serif; letter-spacing: .18em; text-transform: uppercase;
  font-size: .8rem; padding: .45rem 1.2rem; }
.filter-tabs button.active { border-color: var(--gold); color: var(--gold); background: rgba(212,175,82,.06); }

/* Goal editor */
.goal-row { display: flex; gap: .6rem; align-items: center; padding: .5rem 0; border-bottom: 1px solid var(--steel); }
.goal-row:last-child { border-bottom: none; }
.goal-row input, .goal-row select { background: var(--black); border: 1px solid var(--steel); color: var(--white);
  font-family: 'Barlow', sans-serif; font-size: .92rem; padding: .55rem .8rem; }
.goal-row input:focus, .goal-row select:focus { outline: none; border-color: var(--gold); }
.goal-row .g-text { flex: 1; }
.goal-row .g-by { color-scheme: dark; }
.goal-row .g-del { background: none; border: none; color: var(--smoke); font-size: 1rem; padding: .3rem; }
.goal-row .g-del:hover { color: var(--red); }
.add-goal { margin-top: 1rem; background: none; border: 1px solid var(--gold-dim); color: var(--gold);
  font-family: 'Barlow Condensed', sans-serif; letter-spacing: .18em; text-transform: uppercase;
  font-size: .82rem; padding: .5rem 1.4rem; }
.add-goal:hover { border-color: var(--gold); }

/* The ledger export is an <a href> rather than a button — the download has to come from the server
   with a Content-Disposition header, because a browser-built `data:` URL is refused on iOS and the
   button did nothing there. Borrows the goal button's look the same way summary.add-goal does;
   these three lines are only what an <a> needs that a <button> already has. */
.fin-export { display: inline-block; text-decoration: none; cursor: pointer; }

/* Habit-add drawer. <details> carries the open/closed state, so there is no JS toggle and no way
   for the button and the panel to disagree about which one is showing. summary.add-goal reuses the
   goal button's look; list-style:none kills the default disclosure triangle on every engine. */
.habit-add { margin-top: .9rem; }
.habit-add > summary { display: inline-block; list-style: none; cursor: pointer; user-select: none; }
.habit-add > summary::-webkit-details-marker { display: none; }
.habit-add[open] > summary { border-color: var(--gold); }
.habit-add-row { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .9rem;
  padding-top: .9rem; border-top: 1px solid var(--steel); }
.habit-add-row input, .habit-add-row select { background: var(--black); border: 1px solid var(--steel);
  color: var(--white); padding: .5rem .7rem; font-family: 'Barlow', sans-serif; font-size: .95rem; }
.habit-add-actions { display: flex; gap: .5rem; flex: 1 1 100%; }
/* Reason field inside the habit-removal modal — replaces the native prompt() that used to fire on
   a mis-tap. Matches the goal-removal modal's furniture so the two destructive flows look alike. */
.habit-del-reason { width: 100%; margin-top: .8rem; background: var(--black); border: 1px solid var(--steel);
  color: var(--white); padding: .55rem .7rem; font-family: 'Barlow', sans-serif; font-size: .95rem;
  border-radius: var(--r-xs); resize: vertical; }
.habit-del-reason:focus { outline: none; border-color: var(--gold); }
/* Green, and the only filled button in the card — Kadin wanted the committing action to look like
   a commit rather than a second copy of the button that opened the drawer. */
/* black on green, not white: the lighter --green reads 3.28:1 against --white, under the 4.5
   floor for 13px uppercase. Against black it is 7.9:1 and the button still reads as "commit". */
.submit-habit { background: var(--green); border: 1px solid var(--green); color: var(--black);
  font-family: 'Barlow Condensed', sans-serif; letter-spacing: .18em; text-transform: uppercase;
  font-size: .82rem; padding: .55rem 1.4rem; transition: all .2s; }
.submit-habit:hover { background: transparent; color: #7fc98a; }

/* Wins, comments */
.post.win { border-left: 2px solid var(--gold); background: linear-gradient(90deg, rgba(212,175,82,.06), var(--iron) 40%); }
.comments { margin-top: .9rem; border-top: 1px solid var(--steel); padding-top: .7rem; }
.comment { font-size: .88rem; color: var(--silver); padding: .25rem 0; }
.comment b { color: var(--white); font-weight: 600; }
.comment .when { color: var(--smoke); font-size: .75rem; margin-left: .4rem; }
.comment-add { display: flex; gap: .5rem; margin-top: .5rem; }
.comment-add input { flex: 1; background: var(--black); border: 1px solid var(--steel); color: var(--white);
  font-family: 'Barlow', sans-serif; font-size: .88rem; padding: .45rem .7rem; }
.comment-add input:focus { outline: none; border-color: var(--gold); }
.comment-add button { background: none; border: 1px solid var(--ash); color: var(--silver); padding: 0 .8rem; }
.comment-add button:hover { border-color: var(--gold); color: var(--gold); }

/* Goal blocks + milestones */
.goal-block { border-bottom: 1px solid var(--steel); padding: .6rem 0; }
.goal-block:last-child { border-bottom: none; }
.goal-done .g-text { text-decoration: line-through; color: var(--smoke); }
.g-win { background: none; border: 1px solid var(--gold-dim); color: var(--gold);
  font-family: 'Barlow Condensed', sans-serif; letter-spacing: .12em; text-transform: uppercase;
  font-size: .75rem; padding: .45rem .8rem; white-space: nowrap; }
.g-win:hover { border-color: var(--gold); }
.goal-done .g-win { border-color: var(--ash); color: var(--smoke); cursor: default; }
.milestones { padding: .4rem 0 0 .4rem; }
.ms-row { display: block; font-size: .88rem; color: var(--silver); padding: .2rem 0; cursor: pointer; }
.ms-row input { accent-color: var(--gold); margin-right: .5rem; }
.ms-done { text-decoration: line-through; color: var(--smoke); }
.ms-add { display: flex; gap: .5rem; margin-top: .4rem; }
.ms-add input { flex: 1; background: var(--black); border: 1px solid var(--steel); color: var(--white);
  font-family: 'Barlow', sans-serif; font-size: .85rem; padding: .4rem .7rem; }
.ms-add input:focus { outline: none; border-color: var(--gold); }
.ms-add button { background: none; border: 1px solid var(--ash); color: var(--silver); padding: 0 .8rem; }
.ms-add button:hover { border-color: var(--gold); color: var(--gold); }

/* Calendar */
.cal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.cal-head button { background: none; border: 1px solid var(--ash); color: var(--silver); padding: .35rem .9rem; font-size: 1rem; }
.cal-head button:hover { border-color: var(--gold); color: var(--gold); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px; background: var(--steel); border: 1px solid var(--steel); }
.cal-dow { background: var(--iron); padding: .4rem; text-align: center; font-family: 'Barlow Condensed', sans-serif;
  letter-spacing: .15em; text-transform: uppercase; font-size: .72rem; color: var(--smoke); }
.cal-cell { background: var(--black); min-height: 74px; padding: .3rem; font-size: .8rem; }
.cal-cell.empty { background: var(--iron); }
.cal-cell.today { outline: 1px solid var(--gold); outline-offset: -1px; }
.cal-day { color: var(--smoke); font-size: .75rem; }
.cal-evt { background: rgba(212,175,82,.12); border-left: 2px solid var(--gold); color: var(--silver);
  padding: .15rem .35rem; margin-top: .25rem; font-size: .72rem; line-height: 1.3; }
.cal-evt.personal { border-left-color: var(--smoke); background: rgba(119,119,126,.12); }
.cal-evt .evt-del { background: none; border: none; color: var(--smoke); font-size: .7rem; padding: 0 .1rem; float: right; }
.cal-evt .evt-del:hover { color: var(--red); }
.cal-cell:not(.empty) { cursor: pointer; }

/* Shared modal — calendar day list + event detail (any future modal reuses this) */
.modal-scrim { position: fixed; inset: 0; z-index: 150; background: rgba(0,0,0,.6);
  opacity: 0; pointer-events: none; transition: opacity .3s var(--ease-out); }
body.modal-open .modal-scrim { opacity: 1; pointer-events: auto; }
.modal-panel { position: fixed; top: 50%; left: 50%; transform: translate(-50%,-46%); width: min(520px, 92vw);
  max-height: 82vh; overflow-y: auto; background: var(--iron); border: 1px solid var(--gold-dim); z-index: 151;
  padding: 1.8rem 2rem; opacity: 0; pointer-events: none; transition: opacity .3s var(--ease-out), transform .3s var(--ease-out); }
body.modal-open .modal-panel { opacity: 1; pointer-events: auto; transform: translate(-50%,-50%); }
.modal-close { position: absolute; top: .7rem; right: 1rem; background: none; border: none; color: var(--smoke);
  font-size: 1.6rem; line-height: 1; padding: .2rem .5rem; }
.modal-close:hover { color: var(--gold); }
.day-modal-evt { border-bottom: 1px solid var(--steel); padding: .6rem 0; cursor: pointer; }
.day-modal-evt:last-child { border-bottom: none; }
.day-modal-evt:hover .h-name, .day-modal-evt:hover b { color: var(--gold); }
.speaker-block { margin-top: 1rem; border-top: 1px solid var(--steel); padding-top: .9rem; }

/* Sync-to-calendar tiles, inside the shared modal. Three of them because the button they replaced
   fired webcal:// — an Apple-only scheme — so the Android half of the circle got a dead link. The
   logos are the point: a man finds his own calendar by its mark faster than by reading three words. */
.cal-sync-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; }
.cal-sync-tile { background: var(--card-2); border: 1px solid var(--steel); border-radius: var(--r-sm);
  padding: .9rem .3rem; display: flex; flex-direction: column; align-items: center; gap: .5rem;
  color: var(--white); font-family: 'Barlow', sans-serif; font-size: .88rem; font-weight: 500;
  transition: border-color .15s var(--ease-out), background .15s var(--ease-out); }
.cal-sync-tile:hover { border-color: var(--gold); background: var(--gold-soft); }
.cal-sync-tile svg { display: block; }
.cal-sync-alt { display: block; width: 100%; margin-top: .7rem; padding: .4rem; background: none;
  border: none; color: var(--smoke); font-size: .84rem; text-align: center;
  text-decoration: underline; text-underline-offset: 3px; }
.cal-sync-alt:hover { color: var(--gold); }
.cal-sync-or { display: flex; align-items: center; gap: .7rem; margin: 1.1rem 0 .8rem;
  color: var(--smoke); font-family: 'Barlow Condensed', sans-serif; font-size: .82rem;
  text-transform: uppercase; letter-spacing: .12em; }
.cal-sync-or::before, .cal-sync-or::after { content: ''; flex: 1; height: 1px; background: var(--steel); }

/* Founder finance form */
.fin-form { display: grid; gap: .6rem; margin-top: .8rem; }
.fin-form input, .fin-form select, .fin-form textarea { background: var(--black); border: 1px solid var(--steel); color: var(--white);
  font-family: 'Barlow', sans-serif; font-size: .92rem; padding: .6rem .8rem; }
.fin-form textarea { resize: vertical; }
.fin-form input:focus, .fin-form select:focus, .fin-form textarea:focus { outline: none; border-color: var(--gold); }
.fin-form button { background: var(--gold); border: 1px solid var(--gold); color: var(--black);
  font-family: 'Barlow Condensed', sans-serif; letter-spacing: .18em; text-transform: uppercase;
  font-weight: 600; padding: .6rem; }
.fin-form button:hover { background: transparent; color: var(--gold); }

/* Mobile nav — hamburger + slide-out drawer, same shapes/timings as the public site's
   .nav-toggle/.nav-drawer/.nav-scrim (site/style.css + site/motion.js). Desktop hides the
   topbar and parks the scrim off-screen and inert, so >780px is untouched. */
.hq-topbar { display: none; }
.hq-nav-scrim { position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,.55);
  opacity: 0; pointer-events: none; transition: opacity .35s var(--ease-out); }
body.hq-nav-open .hq-nav-scrim { opacity: 1; pointer-events: auto; }

/* Feed photos */
.post-img { display: block; max-width: 100%; max-height: 420px; object-fit: cover;
  margin-top: .8rem; border: 1px solid var(--steel); }
.photo-btn { display: inline-flex; align-items: center; gap: .4rem; cursor: pointer;
  font-family: 'Barlow Condensed', sans-serif; letter-spacing: .14em; text-transform: uppercase;
  font-size: .78rem; color: var(--gold); border: 1px solid var(--gold-dim); padding: .45rem .9rem; }
.photo-btn:hover { border-color: var(--gold); }

/* Roster tags (Brothers) */
.roster-tag { display: inline-block; font-family: 'Barlow Condensed', sans-serif; font-size: .66rem;
  letter-spacing: .14em; text-transform: uppercase; color: var(--gold); border: 1px solid var(--gold-dim);
  padding: .15rem .5rem; margin-right: .35rem; }

/* "You" trend sparkline — bars are set inline as a % height */
.spark { display: flex; align-items: flex-end; gap: 2px; height: 68px;
  border-bottom: 1px solid var(--steel); }
.spark i { flex: 1 1 auto; background: var(--gold-dim); min-height: 2px; }
.spark i:hover { background: var(--gold); }
/* Today's bar, so the right-hand end of the sparkline reads as "now" rather than as an unexplained
   short bar — the day is not over yet and it is the one bar that is still moving. */
.spark i.td { background: var(--gold); }
.trend-up { color: #7aa87a; }
.trend-down { color: #c96a5a; }
.spark-sm { height: 26px; width: 110px; gap: 1px; }

/* ---- sidebar footer: gear + notepad next to your name ---- */
.me-head { display: flex; align-items: flex-start; justify-content: space-between; gap: .6rem; }
.me-icons { display: flex; gap: .3rem; }
.sidebar .me .icon-btn { margin-top: 0; font-size: 1rem; line-height: 1; padding: .3rem;
  color: var(--smoke); border-radius: 3px; cursor: pointer; }
.sidebar .me .icon-btn:hover { color: var(--gold); background: rgba(212,175,82,.08); }
.nav-count { display: inline-block; min-width: 18px; padding: 0 5px; margin-left: .4rem;
  background: var(--gold); color: var(--black); border-radius: 9px; font-size: .7rem; font-weight: 700;
  font-family: 'Barlow', sans-serif; letter-spacing: 0; text-align: center; }

/* ---- notification bell (floats top-right on every view) ---- */
.bell-wrap { position: fixed; top: 1rem; right: 1.2rem; z-index: 70; display: flex; gap: .6rem; align-items: flex-start; }
/* same circle as the bell it sits beside */
.refresh-btn { width: 40px; height: 40px; cursor: pointer; display: flex; align-items: center; justify-content: center;
  background: var(--iron); border: 1px solid var(--steel); border-radius: 50%; color: var(--silver); }
.refresh-btn:hover { border-color: var(--gold); color: var(--gold); }
.refresh-btn.spin .bell-ico { animation: ic-spin .8s linear infinite; }
@keyframes ic-spin { to { transform: rotate(360deg); } }
/* Clean WHITE, not gold (Kadin, 08-10) — resting and hovered. The gold accent everywhere else
   stands; the bell itself stays the one quiet white mark in the corner. The count badge keeps its
   gold: that's the "you have something" signal, not the bell. */
.bell-btn { position: relative; width: 40px; height: 40px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  background: var(--iron); border: 1px solid var(--steel); border-radius: 50%; color: var(--white); }
.bell-btn:hover { border-color: var(--white); color: var(--white); }
/* Stroke-only, inheriting the button's colour — so hover tints the icon and the ring together
   instead of leaving a yellow emoji sitting inside a grey circle. */
.bell-ico { width: 20px; height: 20px; display: block; }
.bell-count { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 4px;
  background: var(--gold); color: var(--black); border-radius: 9px; font-size: .68rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center; }
.bell-panel { position: absolute; top: 48px; right: 0; width: min(340px, calc(100vw - 2.4rem));
  max-height: min(70vh, 460px); overflow-y: auto; background: var(--iron); border: 1px solid var(--steel);
  opacity: 0; visibility: hidden; transform: translateY(-6px); transition: opacity .2s, transform .2s var(--ease-out), visibility .2s; }
body.bell-open .bell-panel { opacity: 1; visibility: visible; transform: none; }
.bell-scrim { position: fixed; inset: 0; z-index: 69; background: transparent; display: none; }
body.bell-open .bell-scrim { display: block; }
/* center, not baseline: bell lines carry a profile picture now, and an image on the text baseline
   sits visibly high against a one-line label */
.bell-item { display: flex; gap: .6rem; align-items: center; width: 100%; text-align: left;
  padding: .7rem 1rem; background: none; border: none; border-top: 1px solid var(--steel);
  color: var(--silver); font-size: .88rem; cursor: pointer; }
.bell-item:hover { background: rgba(212,175,82,.06); color: var(--white); }
.bell-item.unread { border-left: 2px solid var(--gold); }
/* An unread line should look like the one you still have to deal with. It used to be a hairline on
   text the same colour as everything else — and since opening the panel marked them all read, you
   almost never saw it anyway. */
.bell-item.unread .bell-text { color: var(--white); font-weight: 600; }
.bell-item .bell-text { flex: 1; }
/* The chevron is the affordance the panel never had: these are destinations, not a log. */
.bell-item .bell-go { color: var(--smoke); font-size: 1.1rem; line-height: 1; flex-shrink: 0; }
.bell-item:hover .bell-go { color: var(--gold); }
/* ---- member profile card (opened by clicking any avatar) ---- */
/* The avatar is wrapped in a button so it's tab-reachable; the button itself must add no box of its
   own, or every avatar in the feed would suddenly gain padding. */
.avatar-btn { display: inline-flex; padding: 0; border: none; background: none; cursor: pointer;
  border-radius: 50%; line-height: 0; flex-shrink: 0; }
.avatar-btn:hover .avatar { outline: 2px solid var(--gold); outline-offset: 1px; }
.avatar-btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.mp-head { display: flex; align-items: center; gap: 1rem; }
.mp-name { font-size: 1.8rem; line-height: 1.1; }
.mp-role { font-size: .88rem; }
.mp-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: .6rem; margin-top: 1.2rem; }
.mp-stat { background: var(--black); border: 1px solid var(--steel); padding: .7rem .5rem; text-align: center;
  border-radius: var(--r-xs); }
.mp-stat-v { font-family: 'Bebas Neue', sans-serif; font-size: 1.5rem; color: var(--gold); line-height: 1.1; }
.mp-stat-l { font-family: 'Barlow Condensed', sans-serif; letter-spacing: .1em; text-transform: uppercase;
  font-size: .64rem; color: var(--smoke); margin-top: .15rem; }
.mp-pillar { display: flex; gap: .6rem; align-items: flex-start; padding: .45rem 0; border-bottom: 1px solid var(--steel); }
.mp-pillar:last-of-type { border-bottom: none; }
.mp-pillar .pillar-tag { font-family: 'Barlow Condensed', sans-serif; font-size: .68rem; letter-spacing: .15em;
  text-transform: uppercase; color: var(--gold-dim); width: 74px; flex-shrink: 0; }
/* A habit in the profile card is a ROW now, not a chip: name + its own streak on top, the
   consistency read underneath. Chips could not carry two numbers per habit. */
.mp-hlist { display: flex; flex-direction: column; gap: .4rem; flex: 1; min-width: 0; }
.mp-habit { font-size: .85rem; color: var(--silver); background: var(--black); border: 1px solid var(--steel);
  padding: .4rem .55rem; border-radius: var(--r-xs); }
.mp-habit-done { border-color: var(--gold-dim); color: var(--white); }
.mp-h-top { display: flex; align-items: baseline; gap: .5rem; }
.mp-h-name { flex: 1; min-width: 0; }
.mp-h-streak { font-family: 'Bebas Neue', sans-serif; font-size: 1.1rem; color: var(--gold); flex-shrink: 0; }
.mp-h-zero { color: var(--smoke); }
.mp-h-unit { font-family: 'Barlow Condensed', sans-serif; font-size: .62rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--gold-dim); margin-left: .18rem; }
.mp-h-sub { font-size: .74rem; margin-top: .15rem; }
.mp-goals { margin: .5rem 0 0 1.1rem; color: var(--silver); }
.mp-goals li { margin-bottom: .3rem; }
.mp-goal-done { color: var(--smoke); text-decoration: line-through; }
@media (max-width: 480px) {
  .mp-stats { grid-template-columns: repeat(2, 1fr); }
  .mp-pillar { flex-wrap: wrap; }
  .mp-pillar .pillar-tag { width: 100%; }
}

.bell-head { display: flex; align-items: baseline; gap: .8rem; padding: .9rem 1rem .5rem; }
.bell-head .label { flex: 1; }
.bell-markall { background: none; border: none; cursor: pointer; padding: 0;
  font-family: 'Barlow Condensed', sans-serif; letter-spacing: .1em; text-transform: uppercase;
  font-size: .7rem; color: var(--smoke); }
.bell-markall:hover { color: var(--gold); }
.bell-markall:disabled { cursor: default; color: var(--gold-dim); } /* the "All read ✓" state */
.bell-markall:disabled:hover { color: var(--gold-dim); }
/* Where a notification lands. Brief, so it says "this one" and then gets out of the way. */
@keyframes notif-flash { 0%, 100% { background: transparent; } 25%, 60% { background: rgba(212,175,82,.16); } }
.notif-flash { animation: notif-flash 1.8s ease-in-out; outline: 1px solid var(--gold-dim); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .notif-flash { animation: none; } }
.bell-item .when { margin-left: auto; color: var(--smoke); font-size: .75rem; white-space: nowrap; }

/* ---- applications: collapsed to a name until you open one ---- */
details.app-card > summary { cursor: pointer; list-style: none; }
details.app-card > summary::-webkit-details-marker { display: none; }
.app-caret { color: var(--gold-dim); transition: transform .2s; display: inline-block; }
details.app-card[open] .app-caret { transform: rotate(90deg); }
.app-card .actions .del { border-color: var(--ash); color: var(--smoke); margin-left: auto; }
.app-card .actions .del:hover { border-color: var(--red); color: #c96a5a; }

/* ---- profile ---- */
/* aspect-ratio on top of the width/height the tag already carries: a face that has not arrived yet
   still occupies its own circle, so the line it sits on does not jump when the bytes land. */
.avatar { border-radius: 50%; object-fit: cover; border: 1px solid var(--steel); flex-shrink: 0;
  vertical-align: middle; aspect-ratio: 1; }
.avatar-blank { display: inline-flex; align-items: center; justify-content: center; border-radius: 50%;
  background: var(--steel); color: var(--gold-dim); font-family: 'Bebas Neue', sans-serif; }
.profile-edit { display: flex; gap: 1.4rem; margin-top: 1rem; flex-wrap: wrap; }
.profile-photo { display: flex; flex-direction: column; gap: .6rem; align-items: center; }
.profile-photo img { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; border: 1px solid var(--steel); }
.profile-blank { width: 120px; height: 120px; font-size: 2rem; }

/* ---- photo cropper (2026-08-05) ----
   Round, because a profile photo is round EVERYWHERE in HQ — the feed, the scoreboard, the partner
   card, the member card. Showing him a square to frame and then serving it round is how you get a
   man whose ears are inside the crop and outside the circle. The stored JPEG is still square; the
   corners just never get looked at.
   touch-action:none is load-bearing: without it the browser claims the drag as a page scroll and
   the photo only moves for the first few pixels. */
.crop-frame {
  position: relative; overflow: hidden; margin: 0 auto;
  width: min(280px, 76vw); aspect-ratio: 1; border-radius: 50%;
  border: 1px solid var(--steel); background: var(--black);
  cursor: grab; touch-action: none; user-select: none;
}
.crop-frame:active { cursor: grabbing; }

/* ---- unsaved-changes bar (2026-08-05) ----
   Pinned to the BOTTOM, above the safe area, because HQ's header is where the nav lives and a man
   ticking habits on a phone is looking at the bottom half of the screen. It only ever appears when
   a write actually failed, so it is allowed to be loud. */
#saveWarn {
  display: none; position: fixed; left: 0; right: 0; z-index: 300;
  bottom: 0; padding: .7rem 1rem calc(.7rem + env(safe-area-inset-bottom));
  background: #8a2f1e; color: #fff; text-align: center;
  font-size: .88rem; letter-spacing: .02em;
}
.crop-img { position: absolute; top: 0; left: 0; transform-origin: 0 0; pointer-events: none; -webkit-user-drag: none; }
.crop-zoom { display: block; width: min(280px, 76vw); margin: 1rem auto 0; accent-color: var(--gold); }

.pair-form { grid-template-columns: 1fr 1fr auto; }

/* ---- who-has-been-with-who matrix ---- */
.matrix { border-collapse: collapse; font-size: .85rem; }
.matrix td, .matrix th { border: 1px solid var(--steel); padding: .35rem .5rem; text-align: center; }
.matrix .mx-r { text-align: left; white-space: nowrap; color: var(--silver); }
.matrix .mx-h { color: var(--gold-dim); font-family: 'Barlow Condensed', sans-serif; letter-spacing: .1em; }
.matrix .mx-x { color: var(--steel); }
.matrix .mx-now { background: rgba(212,175,82,.14); }
.mx-yes { color: #7aa87a; }
.mx-no { color: var(--smoke); }

/* ============================================================================
   PHONE LAYOUT (≤780px). Everything below this line is mobile-only — the
   desktop/laptop app above is untouched. Shape on a phone:
     · topbar (brand + hamburger)  → the hamburger opens YOU: profile, settings, sign out
     · fixed bottom tab bar        → WHERE: the same #sideNav buttons, thumb height
     · content between the two, single column, 16px inputs so iOS stops zooming
   --------------------------------------------------------------------------- */
@media (max-width: 780px) {
  /* ---- chrome: topbar + hamburger ---- */
  /* Hamburger left, brand beside it, bell alone in the right corner (.bell-wrap below) — the
     order every phone app uses, and what Kadin asked for. flex-start, not space-between: the two
     belong together on the left rather than pushed to opposite edges. */
  .hq-topbar { display: flex; align-items: center; justify-content: flex-start; gap: .55rem;
    position: sticky; top: 0; z-index: 50; padding: 1rem 1.2rem;
    padding-top: calc(1rem + env(safe-area-inset-top));
    background: rgba(11,11,13,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--steel); }
  .hq-topbar .brand { padding: 0; }
  .hq-nav-toggle { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 5px;
    width: 44px; height: 44px; margin-left: -.55rem; /* pull the 44px tap target back to the edge optically */
    padding: 0; background: none; border: none; cursor: pointer; }
  .hq-nav-toggle span { display: block; height: 2px; width: 24px; background: var(--gold);
    transition: transform .3s var(--ease-out), opacity .2s; }
  body.hq-nav-open .hq-nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  body.hq-nav-open .hq-nav-toggle span:nth-child(2) { opacity: 0; }
  body.hq-nav-open .hq-nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .shell { flex-direction: column; }
  /* Slides on `left`, not `transform`, and carries no backdrop-filter: either one would make the
     drawer a containing block for its own position:fixed child, and the bottom tab bar below
     lives inside #sideNav — it would slide off-screen with the drawer instead of pinning to the viewport. */
  .sidebar { position: fixed; top: 0; left: -100vw; z-index: 61; width: min(78%, 320px); height: 100%;
    transform: none; transition: left .35s var(--ease-out);
    background: var(--black); backdrop-filter: none; border-right: 1px solid var(--steel);
    overflow-y: auto; padding-top: calc(1.8rem + env(safe-area-inset-top)); }
  body.hq-nav-open .sidebar { left: 0; }
  .sidebar .brand { display: none; } /* topbar already shows IC HQ on mobile */
  body.hq-nav-open .bell-wrap { opacity: 0; pointer-events: none; } /* the bell floats above the drawer otherwise */

  /* The drawer is account-only now that the nav moved to the bottom bar, so it becomes a plain
     list: name, then Settings / Feedback / Sign out as full-width rows. The icon buttons already
     carry title="…", so ::after labels them without touching the markup or the desktop sidebar. */
  .sidebar .me { border-top: none; }
  .sidebar .me-head { flex-direction: column; align-items: stretch; gap: 1rem; }
  .sidebar .me-icons { flex-direction: column; gap: 0; }
  .sidebar .me .icon-btn,
  .sidebar .me > button { display: flex; align-items: center; gap: .7rem; width: 100%;
    text-align: left; padding: .85rem 0; margin-top: 0; border-radius: 0;
    border-top: 1px solid var(--steel); color: var(--silver); }
  .sidebar .me .icon-btn { font-size: 1.15rem; }
  .sidebar .me .icon-btn::after,
  .sidebar .me > button { font-family: 'Barlow Condensed', sans-serif; letter-spacing: .18em;
    text-transform: uppercase; font-size: .85rem; }
  .sidebar .me .icon-btn::after { content: attr(title); }
  /* 📝 renders as colour emoji next to the monochrome gear; swap the glyph on mobile only */
  .sidebar .me .icon-btn[title="Feedback"] { font-size: 0; }
  .sidebar .me .icon-btn[title="Feedback"]::before { content: "✎"; font-size: 1.15rem; }

  /* ---- bottom tab bar: #sideNav lifted out of the drawer and pinned to the thumb ----
     Icon + short label come from data-icon/data-short so the desktop text stays as written. */
  #sideNav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 55;
    flex-direction: row; flex: 0 0 auto;
    background: rgba(15,15,18,.96); backdrop-filter: blur(12px); border-top: 1px solid var(--steel);
    padding-bottom: env(safe-area-inset-bottom); }
  #sideNav button { position: relative; flex: 1 1 0; min-width: 0;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .18rem;
    border-left: none; border-top: 2px solid transparent;
    padding: .55rem .1rem .5rem; font-size: 0; letter-spacing: 0; }
  #sideNav button::before { content: attr(data-icon); font-size: 1.25rem; line-height: 1; }
  #sideNav button::after { content: attr(data-short); font-family: 'Barlow Condensed', sans-serif;
    font-size: .62rem; letter-spacing: .1em; text-transform: uppercase; line-height: 1; }
  #sideNav button.active { color: var(--gold); border-top-color: var(--gold); background: rgba(212,175,82,.06); }
  #sideNav .nav-count { position: absolute; top: .3rem; left: 50%; margin-left: .5rem;
    font-size: .6rem; min-width: 15px; padding: 0 4px; }

  /* ---- content ---- */
  main { padding: 1rem 1rem; padding-bottom: calc(80px + env(safe-area-inset-bottom)); }
  .view-title { font-size: 1.4rem; margin-bottom: .1rem; }
  .view-sub { font-size: .88rem; line-height: 1.4; margin-bottom: .9rem; }
  .card { padding: .9rem; }
  .grid { gap: .7rem; }
  /* iOS zooms the whole page when you focus a control under 16px. This is the only thing that stops it. */
  input, select, textarea { font-size: 16px !important; }

  /* Dashboard is sized to land greeting + stats + all five habits on one iPhone screen,
     so the daily check-off needs no scrolling at all. Everything here is about vertical budget. */
  .g3 { grid-template-columns: repeat(4, 1fr); gap: .5rem; }
  .stat { padding: .6rem .3rem; }
  .stat .num { font-size: 1.55rem; line-height: 1.1; }
  .stat .cap { font-size: .56rem; letter-spacing: .08em; }
  /* the stats grid and the cards under it carry inline margins from app.html */
  #view-dashboard .grid, #view-dashboard .card[style] { margin-bottom: .7rem !important; }
  #view-dashboard .card[style*="margin-top"] { margin-top: .7rem !important; }

  /* habits: one row per habit. The pillar tag is dropped — it eats 66px of name width and the
     Onboarding card right below already breaks the same five pillars out. */
  .habit { gap: .2rem .55rem; padding: .5rem 0; }
  .habit .pillar-tag { display: none; }
  /* basis 0, NOT auto. In a wrapping flex row the browser decides line breaks from each item's
     BASE size and only shrinks afterwards — an auto-basis name claims its full text width, so a
     long habit name pushed the ✕ onto a line of its own. A zero basis means every control fits on
     the first line by definition, and the name then grows into whatever is left. */
  .habit .h-name { flex: 1 1 0; min-width: 0; overflow-wrap: anywhere; font-size: .95rem; }
  .habit .h-sub { margin-left: 0; } /* no pillar tag on a phone, so nothing to clear */
  .habit .h-streak { font-size: .8rem; }
  .habit button { width: 42px; height: 42px; }
  /* Was 30×30 and nine pixels from the ✓ — "secondary, not a 44px target on purpose", which read
     well right up until men aiming for the tick hit Remove instead and got an approval dialog.
     Staying visually secondary is the correct instinct; doing it by shrinking the TOUCH target is
     what broke. The box is a full 44px now and pushed away from the tick; the glyph stays small and
     dim, so it still recedes without being a trap. */
  .habit .habit-del { width: 44px; height: 44px; font-size: .8rem; margin-left: .35rem; opacity: .75; }
  .habit .habit-del:active { opacity: 1; }
  .habit .approve-req, .habit .decline-req { padding: .5rem .9rem; }

  /* filter tabs become an edge-to-edge scroll strip instead of wrapping to three rows */
  .filter-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none;
    margin: 0 -1rem 1rem; padding: 0 1rem .25rem; }
  .filter-tabs::-webkit-scrollbar { display: none; }
  .filter-tabs button { flex: 0 0 auto; padding: .55rem 1.1rem; }

  /* the goal row ran its deadline, visibility, Complete and ✕ controls straight off a phone screen */
  .goal-row { flex-wrap: wrap; gap: .5rem; }
  .goal-row .g-text { flex: 1 1 100%; }
  .goal-row .g-by, .goal-row .g-share { flex: 1 1 40%; min-width: 0; }
  .goal-row .g-del { width: 44px; height: 44px; }

  /* applications */
  .app-card dl { grid-template-columns: 1fr; gap: .1rem .8rem; }
  .app-card dl dd { margin-bottom: .5rem; }
  .app-card .actions { flex-wrap: wrap; }
  .app-card .actions button { padding: .55rem 1.1rem; }
  .app-card .actions .del { margin-left: 0; }
  /* rows of name + action buttons are the one thing that pushed the page sideways on a phone */
  .app-card .head { flex-wrap: wrap; row-gap: .3rem; }
  .app-card .head .when { margin-left: 0; }

  /* feed */
  .composer .row { flex-wrap: wrap; }
  .composer .post-btn { padding: .6rem 1.6rem; }
  .post { padding: 1.1rem 1.1rem; }
  .post-head { flex-wrap: wrap; row-gap: .2rem; }
  .post-head .when { margin-left: 0; flex: 1 1 100%; }
  .post-actions button { padding: .5rem 1rem; }
  /* One even row of eight rather than seven-and-an-orphan — a grid divides the width up instead of
     wrapping whatever doesn't fit. Cells are ~40px at 390px, and the taller padding carries the
     touch target the rest of the way. */
  .rx-bar { display: grid; grid-template-columns: repeat(8, 1fr); gap: .15rem; }
  .rx { min-height: 44px; padding: .5rem .1rem; font-size: 1.1rem; opacity: .55; justify-content: center; }
  .rx .rx-n { font-size: .7rem; }
  .comment-add input, .ms-add input { min-width: 0; }

  /* tables: tighten first so the scoreboard fits, and scroll inside the card if it still can't.
     The headers are what overflow, not the data — letter-spacing plus one long line each.
     Wrapping them ("BEST / STREAK") is what gets the last column back on screen. */
  th, td { padding: .5rem .45rem; }
  td { font-size: .9rem; }
  main table { display: block; overflow-x: auto; white-space: nowrap; }
  main table th { white-space: normal; letter-spacing: .05em; font-size: .68rem; }
  .pair-form { grid-template-columns: 1fr; }
  .profile-edit { justify-content: center; }

  /* The hamburger moved to the left, so the bell takes the right corner it used to dodge. */
  .bell-wrap { top: calc(.95rem + env(safe-area-inset-top)); right: 1.1rem; }
  .bell-btn { width: 40px; height: 40px; }
  .bell-panel { width: calc(100vw - 2rem); right: 0; }

  /* modals become bottom sheets — reachable, and they don't fight the keyboard */
  .modal-panel { top: auto; bottom: 0; left: 0; width: 100%; max-height: 88vh;
    transform: translateY(100%); border: 1px solid var(--steel); border-bottom: none;
    padding: 1.5rem 1.2rem calc(1.5rem + env(safe-area-inset-bottom)); }
  body.modal-open .modal-panel { transform: none; }
  .modal-close { width: 44px; height: 44px; top: .4rem; right: .4rem; }

  /* (the calendar FAB is lifted clear of the tab bar in calendar.css, and the onboarding overlay
     in app.html's own <style> block — both load after this file and would otherwise win) */
}

/* ---------------------------------------------------------------------------
   GUIDED WALKTHROUGH — a ring on the real element plus a caption beside it.
   No dimming scrim on purpose: .sidebar is a sticky stacking context, so a
   cut-out would need the target lifted above a layer it can't escape.
   --------------------------------------------------------------------------- */
.tour-spot { position: relative; z-index: 1; border-radius: 2px;
  box-shadow: 0 0 0 2px var(--gold), 0 0 18px -2px rgba(212,175,82,.55);
  animation: tour-pulse 1.8s ease-in-out infinite; }
@keyframes tour-pulse {
  0%, 100% { box-shadow: 0 0 0 2px var(--gold), 0 0 18px -2px rgba(212,175,82,.55); }
  50%      { box-shadow: 0 0 0 2px var(--gold), 0 0 26px 1px rgba(212,175,82,.8); }
}
@media (prefers-reduced-motion: reduce) { .tour-spot { animation: none; } }

#tourPop { position: fixed; z-index: 200; width: 21rem; max-width: calc(100vw - 2rem);
  background: var(--iron); border: 1px solid var(--gold); padding: 1.3rem 1.4rem;
  box-shadow: 0 18px 44px rgba(0,0,0,.7); }
#tourPop[hidden] { display: none; }
.tour-count { font-family: 'Barlow Condensed', sans-serif; letter-spacing: .22em; text-transform: uppercase;
  font-size: .7rem; color: var(--gold-dim); }
.tour-title { font-size: 1.35rem; color: var(--white); margin: .25rem 0 .5rem; }
.tour-body { color: var(--silver); font-size: .93rem; line-height: 1.5; }
.tour-nav { display: flex; align-items: center; gap: .6rem; margin-top: 1.1rem; }
.tour-nav button { font-family: 'Barlow Condensed', sans-serif; letter-spacing: .16em;
  text-transform: uppercase; font-size: .78rem; padding: .5rem 1rem; background: none;
  border: 1px solid var(--ash); color: var(--silver); }
.tour-nav .tour-skip { border: none; padding-left: 0; color: var(--smoke); margin-right: auto; }
.tour-nav .tour-skip:hover { color: var(--red); }
.tour-nav .tour-next { background: var(--gold); border-color: var(--gold); color: var(--black); font-weight: 600; }
.tour-nav .tour-next:hover { background: transparent; color: var(--gold); }
.tour-nav button:hover { border-color: var(--gold); color: var(--gold); }

/* Phone: nothing fits beside anything, so the caption pins to the bottom above the tab bar. */
@media (max-width: 780px) {
  #tourPop { left: .8rem !important; right: .8rem; top: auto !important;
    bottom: calc(5rem + env(safe-area-inset-bottom)); width: auto; }
}

/* The "finish setting up" card — present but not alarming. */
.setup-nudge { border-color: var(--gold-dim); }
.setup-nudge .actions { display: flex; gap: .6rem; flex-wrap: wrap; }
.setup-nudge button { font-family: 'Barlow Condensed', sans-serif; letter-spacing: .16em;
  text-transform: uppercase; font-size: .78rem; padding: .5rem 1.1rem;
  background: var(--gold); border: 1px solid var(--gold); color: var(--black); font-weight: 600; }
.setup-nudge button:hover { background: transparent; color: var(--gold); }
.ghost-btn { background: none !important; border: 1px solid var(--ash) !important; color: var(--silver) !important; }
.ghost-btn:hover { border-color: var(--gold) !important; color: var(--gold) !important; }

/* Demo account welcome card — the instructions the review guys land on. */
.demo-card { border-color: var(--gold); margin-bottom: 1.2rem; }
.demo-card .demo-body { margin-top: .8rem; color: var(--silver); }
.demo-card .demo-body p { margin-bottom: .7rem; }
.demo-card .demo-body b { color: var(--white); }
.demo-card .demo-body ul { margin: 0 0 .7rem 1.1rem; }
.demo-card .demo-body li { margin-bottom: .4rem; }
.demo-card .actions { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: .4rem; }
.demo-card button { font-family: 'Barlow Condensed', sans-serif; letter-spacing: .16em;
  text-transform: uppercase; font-size: .78rem; padding: .55rem 1.2rem;
  background: var(--gold); border: 1px solid var(--gold); color: var(--black); font-weight: 600; }
.demo-card button:hover { background: transparent; color: var(--gold); }
.fb-prompts { margin: 0 0 1rem 1.1rem; color: var(--silver); font-size: .9rem; }
.fb-prompts li { margin-bottom: .25rem; }

/* ============================================================================
   APP SKIN — 2026-07-29
   Everything below re-shapes the existing components into the app language from
   docs/hq-app-mockup.html: raised rounded cards, pill controls, a floating tab
   bar, a dot-style month calendar. It is appended rather than woven in so the
   change is one reviewable block and reverts by deleting it. Same selectors as
   above, so equal specificity + later position wins — no !important needed
   except where the phone block below already used it.
   ============================================================================ */

/* ---- surfaces ---- */
.card, .post, .app-card, .login-box, .bell-panel, #tourPop, .ob-box {
  border-radius: var(--r);
}
.card, .post, .app-card {
  box-shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px -14px rgba(0,0,0,.9);
}
/* the coloured left rule on feed posts has to follow the corner now */
.post.prayer, .post.scripture, .post.gym, .post.win { overflow: hidden; }
.modal-panel { border-radius: var(--r); }

/* ---- controls: everything tappable becomes a pill ---- */
.actions button, .app-card .actions button, .filter-tabs button, .add-goal, .g-win,
.photo-btn, .status-pill, .score-chip, .roster-tag, .hto-chip, .removal-pending-chip,
.composer .post-btn, .rollcall .post-btn, .fin-form button, .login-box button, .submit-habit,
.setup-nudge button, .demo-card button, .tour-nav button, .cal-today-btn,
.habit .approve-req, .habit .decline-req, .ob-primary, .ob-ghost,
.post-actions button, .comment-add button, .ms-add button, .cal-jump-year button, .g-del,
.modal-close {
  border-radius: var(--pill);
}
.login-box input, .ob-input, .fin-form input, .fin-form select, .fin-form textarea,
.goal-row input, .goal-row select, .habit-add-row input, .habit-add-row select,
.comment-add input, .ms-add input, .composer textarea, .composer select,
.cal-ed-input, .cal-ed-select {
  border-radius: var(--r-xs);
}
.habit button, .habit .habit-del { border-radius: var(--r-xs); }
.bar, .bar i, .spark i { border-radius: var(--pill); }

/* the one filled, primary action reads as filled — gold pill, dark text */
.composer .post-btn, .rollcall .post-btn, .fin-form button, .login-box button { font-weight: 600; }

/* ---- filter tabs become a segmented control ---- */
.filter-tabs {
  background: var(--card-2); border: 1px solid var(--steel); border-radius: var(--pill);
  padding: 4px; gap: 2px; width: max-content; max-width: 100%;
}
.filter-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.filter-tabs::-webkit-scrollbar { display: none; }
.filter-tabs button {
  flex: 0 0 auto; border: 1px solid transparent; background: none; padding: .45rem 1.1rem;
  transition: background .18s var(--ease-out), color .18s var(--ease-out);
}
.filter-tabs button.active {
  background: var(--gold); border-color: var(--gold); color: var(--black); font-weight: 600;
}

/* ---- desktop sidebar: rounded nav pills instead of a left rule ---- */
.sidebar nav { padding: 0 .7rem; gap: 2px; }
.sidebar nav button {
  border-left: none; border-radius: var(--r-sm); padding: .7rem .9rem;
  transition: background .15s, color .15s;
}
.sidebar nav button:hover { background: var(--card-2); }
.sidebar nav button.active { border-left-color: transparent; background: var(--gold-soft); color: var(--gold); }
/* #sideNav2 holds the views that don't earn a thumb tab. On desktop it sits directly under
   #sideNav and reads as one list; on a phone it stays behind the hamburger (see phone block). */
#sideNav { flex: 0 0 auto; }
#sideNav2 { flex: 1; margin-top: 2px; }

/* ---- dashboard stat cards ---- */
.stat { background: var(--card-2); }
.stat .num { color: var(--gold); }

/* ---- dashboard hero + quick actions + streak ring ---- */
.hero { background: linear-gradient(160deg, #1d1c19 0%, var(--iron) 55%); }
.hero-num { font-family: 'Bebas Neue', sans-serif; font-size: 3.2rem; line-height: 1;
  letter-spacing: .02em; margin: .3rem 0 .1rem; }
.hero-num small { font-size: 1.1rem; color: var(--smoke); letter-spacing: .08em; }
.hero-sub { font-size: .88rem; color: var(--silver); }
.hero-sub b { color: var(--gold); }
/* the rounded, separated buttons — the "acts like an app" part of the brief */
.quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; margin-top: 1rem;
  max-width: 34rem; }  /* full-bleed across a 1200px card turns three buttons into three banners */
.qa { background: var(--card-2); border: 1px solid var(--steel); border-radius: var(--r-sm);
  padding: .75rem .3rem .65rem; display: flex; flex-direction: column; align-items: center; gap: .3rem;
  transition: transform .18s var(--ease-out), border-color .18s var(--ease-out); }
.qa:hover { border-color: var(--gold-dim); }
.qa:active { transform: scale(.96); }
.qa .g { font-size: 1.05rem; color: var(--gold); line-height: 1; }
.qa .t { font-family: 'Barlow Condensed', sans-serif; letter-spacing: .12em; text-transform: uppercase;
  font-size: .72rem; color: var(--silver); }
.streak-card { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.2rem; }
.ring { width: 4.6rem; height: 4.6rem; flex-shrink: 0; }
.ring text { font-family: 'Bebas Neue', sans-serif; fill: var(--white); }
#ringArc { transition: stroke-dashoffset .5s var(--ease-out); }
@media (prefers-reduced-motion: reduce) { #ringArc { transition: none; } }
.streak-meta .big { font-size: 1.4rem; }
.streak-meta .cap { font-size: .85rem; }
/* The record, under the live streak. Gold so it reads as an achievement rather than as a second
   status line, and it is deliberately smaller than the streak — the streak is the one that moves. */
.streak-meta .best-line { color: var(--gold); font-size: .78rem;
  font-family: 'Barlow Condensed', sans-serif; letter-spacing: .12em; text-transform: uppercase; }
.freeze { display: inline-flex; align-items: center; gap: .35rem; background: var(--card-2);
  border: 1px solid var(--steel); border-radius: var(--pill); padding: .2rem .7rem;
  font-size: .78rem; color: var(--silver); margin-top: .4rem; }
/* A banked freeze is an ASSET — it should not look like the empty state does. */
.freeze.has { border-color: var(--gold-dim); color: var(--gold); background: var(--gold-soft); }
/* The same fact, on the list he actually ticks. */
.freeze-note { font-size: .78rem; color: var(--smoke); border: 1px solid var(--steel);
  border-radius: var(--r-xs); padding: .35rem .6rem; margin-bottom: .8rem; }
.freeze-note.has { border-color: var(--gold-dim); color: var(--gold); background: var(--gold-soft); }
.habit .h-back-note { flex: 1 1 100%; margin-left: calc(66px + 1rem); font-size: .76rem;
  color: var(--gold); margin-top: .35rem; }

/* switching views should feel like a screen change, not a repaint */
.view.active { animation: hq-fade .22s var(--ease-out); }
@keyframes hq-fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.card, .actions button, .filter-tabs button, .add-goal, .habit button, #sideNav button { -webkit-tap-highlight-color: transparent; }
.habit button:active, .actions button:active, .filter-tabs button:active, #sideNav button:active { transform: scale(.96); }
@media (prefers-reduced-motion: reduce) {
  .view.active { animation: none; }
  .qa:active, .habit button:active, .actions button:active, .filter-tabs button:active, #sideNav button:active { transform: none; }
}

/* ---- goals: one collapsed row per goal, tap to open the editor ---- */
.goal-block { border-bottom: 1px solid var(--steel); padding: 0; }
.goal-block:last-child { border-bottom: none; }
.goal-sum { display: flex; align-items: center; gap: .7rem; padding: .85rem .2rem; cursor: pointer;
  list-style: none; user-select: none; border-radius: var(--r-xs); }
.goal-sum::-webkit-details-marker { display: none; }
.goal-sum:hover { background: var(--card-2); }
.goal-sum .gs-mark { color: var(--gold-dim); flex-shrink: 0; width: 1rem; text-align: center; }
.goal-sum .gs-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.goal-sum .gs-meta { color: var(--smoke); font-family: 'Barlow Condensed', sans-serif;
  letter-spacing: .1em; text-transform: uppercase; font-size: .7rem; white-space: nowrap; flex-shrink: 0; }
.goal-sum .gs-caret { color: var(--gold-dim); flex-shrink: 0; transition: transform .2s var(--ease-out); }
.goal-block[open] > .goal-sum { background: var(--gold-soft); }
.goal-block[open] > .goal-sum .gs-caret { transform: rotate(90deg); }
.goal-block[open] > .goal-sum .gs-mark { color: var(--gold); }
.goal-done > .goal-sum .gs-text { text-decoration: line-through; color: var(--smoke); }
.goal-done > .goal-sum .gs-mark { color: var(--green); }
.goal-block > .goal-row { border-bottom: none; padding-top: .2rem; }
.goal-block > .milestones { padding-bottom: .8rem; }
@media (prefers-reduced-motion: reduce) { .goal-sum .gs-caret { transition: none; } }

/* ---- analytics (#view-stats, rendered by renderStats in app.js) ---- */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: .9rem; margin-bottom: 1.2rem; }
.kpi-card { background: var(--iron); border: 1px solid var(--steel); border-radius: var(--r); padding: 1.1rem 1.2rem; }
.kpi-num { font-family: 'Bebas Neue', sans-serif; font-size: 2rem; letter-spacing: .03em; line-height: 1.1; margin-top: .2rem; }
.kpi-sub { font-size: .78rem; color: var(--smoke); }
.kpi-sub b { color: #7aa87a; font-weight: 600; }
.kpi-sub b.dn { color: #c96a5a; }
.bars { display: flex; align-items: flex-end; gap: 6px; height: 6rem; margin-top: .9rem; }
/* six bars across a 1200px card turn into billboards — cap the chart, not the card */
.bars, .bars-x { max-width: 40rem; }
.bars .b { flex: 1; background: var(--gold-dim); border-radius: 6px 6px 3px 3px; min-height: 6px; }
.bars .b.hi { background: var(--gold); }
.bars-x { display: flex; gap: 6px; margin-top: .4rem; }
.bars-x span { flex: 1; text-align: center; font-family: 'Barlow Condensed', sans-serif;
  font-size: .62rem; letter-spacing: .08em; color: var(--smoke); text-transform: uppercase;
  overflow: hidden; white-space: nowrap; }
.meter { height: 5px; border-radius: var(--pill); background: var(--card-2); overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: var(--pill); background: var(--gold); }
.pillar-row { display: flex; align-items: center; gap: .6rem; padding: .5rem 0 .3rem; }
.pillar-row .sw { width: 9px; height: 9px; border-radius: 3px; flex-shrink: 0; }
.pillar-row .pn { flex: 1; font-size: .9rem; color: var(--silver); }
.pillar-row .pv { font-weight: 600; font-size: .9rem; }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: .8rem; margin-bottom: .4rem; }

/* ---- phone: floating pill tab bar + dot calendar ---- */
@media (max-width: 780px) {
  /* The bar detaches from the bottom edge and floats — the single change that makes HQ read as an
     app rather than a website with a nav strip. It carries the FIVE primary views; Mentorship,
     Library, Applications and Operations live in #sideNav2 behind the hamburger, because eight
     equal-width tabs on a 390px screen is a row of unreadable slivers. */
  #sideNav {
    left: 50%; right: auto; transform: translateX(-50%);
    bottom: calc(.7rem + env(safe-area-inset-bottom));
    width: min(27rem, calc(100% - 1.6rem));
    background: rgba(23,23,27,.92); border: 1px solid var(--steel); border-top: 1px solid var(--steel);
    border-radius: var(--pill); padding: 5px; padding-bottom: 5px;
    box-shadow: 0 12px 32px rgba(0,0,0,.55);
  }
  #sideNav button {
    border-top: none; border-radius: var(--pill); padding: .5rem .1rem .45rem;
  }
  #sideNav button.active {
    border-top-color: transparent; background: var(--gold); color: var(--black);
  }
  #sideNav button.active::after { font-weight: 600; }
  #sideNav .nav-count { top: .1rem; }
  main { padding-bottom: calc(5.4rem + env(safe-area-inset-bottom)); }
  #tourPop { bottom: calc(5.6rem + env(safe-area-inset-bottom)); }

  /* #sideNav2 stays in the drawer and renders as the same full-width rows as Settings / Sign out */
  #sideNav2 { flex: 0 0 auto; padding: 0; margin: 0; }
  #sideNav2 button {
    display: flex; align-items: center; gap: .7rem; width: 100%; border-radius: 0;
    border-top: 1px solid var(--steel); padding: .85rem 1.6rem; font-size: .85rem;
  }
  #sideNav2 button::before { content: attr(data-icon); font-size: 1.1rem; width: 1.3rem; }
  #sideNav2 button.active { background: var(--gold-soft); color: var(--gold); }

  .card, .post, .app-card { border-radius: var(--r-sm); padding: 1rem; }
  /* 11rem min gives one column on a 390px screen; the KPI row is meant to read 2x2 */
  .kpi-grid { grid-template-columns: 1fr 1fr; gap: .6rem; }
  .kpi-card { padding: .8rem .9rem; }
  .kpi-num { font-size: 1.6rem; }
  .kpi-sub { font-size: .72rem; }
  /* the label and its right-hand caption fight for a 358px line — stack them instead of wrapping both */
  .card-head { flex-direction: column; align-items: flex-start; gap: .1rem; margin-bottom: .6rem; }
  /* the hero has to leave room for the habit list on one iPhone screen */
  .hero-num { font-size: 2.6rem; }
  .streak-card { gap: .8rem; }
  .ring { width: 3.9rem; height: 3.9rem; }
  .streak-meta .big { font-size: 1.15rem; }
  .streak-meta .cap { font-size: .8rem; line-height: 1.3; }
  .filter-tabs { margin: 0 0 .9rem; }
  /* A long goal name plus a date plus a visibility word will not share one 358px line, so the
     meta drops to a second line. `order` keeps the caret up on line one with the name — without
     it the caret wraps BELOW the meta and every row becomes three lines tall. */
  .goal-sum { flex-wrap: wrap; row-gap: .1rem; padding: .65rem .2rem; }
  .goal-sum .gs-text { flex: 1 1 0; min-width: 0; order: 1; }
  .goal-sum .gs-caret { order: 2; }
  .goal-sum .gs-meta { order: 3; flex: 1 1 100%; padding-left: 1.7rem; }
  /* the base .filter-tabs rule further up re-declares padding and took 2.4px off a 36px tap target */
  .filter-tabs button { padding: .55rem 1.1rem; }
  /* the sheet is pinned to the bottom edge — round only the corners that are actually on screen */
  .modal-panel { border-radius: var(--r) var(--r) 0 0; }
  /* Applications and Operations moved behind the hamburger, so their unread badge went with them.
     The hamburger carries the signal now; the count itself still shows on the row in the drawer. */
  .hq-nav-toggle { position: relative; }
  body.hq-nav-dot .hq-nav-toggle::after { content: ''; position: absolute; top: .3rem; right: .2rem;
    width: 8px; height: 8px; border-radius: 50%; background: var(--gold); }
  #sideNav2 .nav-count { margin-left: auto; }
}

/* Delete-a-post ✕ — deliberately quiet until you reach for it. Sits in the post header, pushed to
   the right edge; `.when` above it no longer owns margin-left:auto on its own. */
.post-head .post-del { background: none; border: none; color: var(--smoke); font-size: .9rem;
  line-height: 1; padding: .3rem .4rem; margin-left: .2rem; border-radius: var(--pill);
  opacity: .5; transition: opacity .15s, color .15s; flex-shrink: 0; }
.post-head .post-del:hover { opacity: 1; color: #c96a5a; }
@media (max-width: 780px) {
  /* .post-head wraps and `.when` already takes a full line, so without `order` the ✕ lands on a
     third line by itself. Order puts it at the right of the NAME row, where a thumb expects it. */
  .post-head .post-del { order: 2; margin-left: auto; opacity: 1; width: 36px; height: 36px; }
  .post-head .when { order: 3; margin-left: 0; flex: 1 1 100%; }
}

/* Confetti — the 45-day solidify celebration (2026-07-30). Pointer-events:none so it never eats a
   tap on the way down; the burst removes itself after 4s (see confetti() in app.js). */
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 9999; overflow: hidden; }
.confetti i {
  position: absolute; top: -12px; width: 8px; height: 14px; border-radius: 1px;
  animation: confetti-fall 2.6s linear forwards;
}
@keyframes confetti-fall {
  to { transform: translateY(105vh) rotate(720deg); opacity: .1; }
}
@media (prefers-reduced-motion: reduce) { .confetti { display: none; } }

/* ---- Finance dashboard (2026-08-05) --------------------------------------------------
   Layout modelled on the reference Kadin sent: a strip of stat cards with sparklines, a
   wide chart, a narrower panel beside it. Colours are ours — gold on iron, never the
   reference's green, which reads as a trading app rather than as HQ. Charts are inline
   SVG built in app.js; this project has no chart library and isn't getting one. */
.fin-stats { display: grid; gap: 1.2rem; margin-bottom: 1.2rem;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); }
.fin-stat { background: var(--iron); border: 1px solid var(--steel); border-radius: var(--r-sm);
  padding: 1.1rem 1.2rem; position: relative; overflow: hidden; }
.fin-stat .fin-stat-name { font-family: 'Barlow Condensed', sans-serif; letter-spacing: .18em;
  text-transform: uppercase; font-size: .72rem; color: var(--silver); }
.fin-stat .fin-stat-sub { color: var(--smoke); font-size: .78rem; margin-top: .15rem; }
.fin-stat .fin-stat-val { font-family: 'Bebas Neue', 'Barlow Condensed', sans-serif;
  font-size: 2rem; line-height: 1.1; margin-top: .5rem; letter-spacing: .02em; }
.fin-stat .fin-stat-val .cents { color: var(--smoke); }
.fin-stat .fin-stat-delta { font-size: .8rem; margin-top: .2rem; }
.fin-stat .up { color: var(--amber); } .fin-stat .down { color: var(--green); }
.fin-stat .flat { color: var(--smoke); }
.fin-spark { position: absolute; right: 0; bottom: 0; width: 58%; height: 46%; opacity: .85; pointer-events: none; }
.fin-stat.is-alert { border-color: var(--gold-dim); }

.fin-grid { display: grid; gap: 1.2rem; margin-bottom: 1.2rem;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
@media (max-width: 900px) { .fin-grid { grid-template-columns: minmax(0, 1fr); } }
.fin-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.fin-sub { font-size: .82rem; margin-top: .2rem; }
.fin-legend { font-family: 'Bebas Neue', 'Barlow Condensed', sans-serif; font-size: 1.5rem; color: var(--gold); }
/* One chart, two screens — and the styling rides on the class spendChartSvg() puts on the <svg>
   itself, NOT on whichever container it happens to land in. That container coupling is exactly
   what broke the member view: `.fin-chart .dot` gave the Operations chart a gold fill, and
   #myMoneyChart matched none of these rules, so the identical markup drew SVG's own defaults —
   black dots and black text — on a near-black card. Style the markup, not the neighbourhood. */
.spend-chart { display: block; width: 100%; height: auto; }
.spend-chart .gridline { stroke: var(--steel); stroke-width: 1; }
.spend-chart .axis { fill: var(--smoke); font-family: 'Barlow', sans-serif; }
/* The dark stroke is what separates a gold dot from the gold line it sits on. */
.spend-chart .dot { fill: var(--gold); stroke: var(--black); stroke-width: 1; }
.spend-chart .peak { fill: var(--white); font-family: 'Barlow', sans-serif; }
.fin-chart { margin-top: 1rem; }
.fin-chart .hit:hover ~ .dot, .fin-chart .hit:focus ~ .dot { r: 5; }

.fin-publish { margin-top: 1.2rem; border-top: 1px solid var(--steel); padding-top: .9rem;
  font-size: .82rem; color: var(--smoke); }
.fin-publish b { color: var(--white); }
.fin-publish .held { color: var(--amber); }
.fin-publish .live { color: var(--green); }
.fin-publish ul { margin: .4rem 0 0 1rem; }

/* the allocation rows already use .pillar-progress; these just tighten it inside the card */
#finAlloc .pillar-progress { margin-bottom: .75rem; }
#finAlloc .internal-note { color: var(--smoke); font-size: .78rem; margin-top: .6rem; }

/* ---- Finance on a phone ---------------------------------------------------------------
   The desktop layout did not survive 375px: four stat cards stacked into 630px of scrolling
   before the chart, and the chart's SVG (viewBox 640 wide, squeezed into ~343px) rendered its
   10px axis labels at about 5px — legible on a laptop, not on a phone. Two-up cards, bigger
   type relative to the box, and app.js draws a narrower viewBox below 780px so text lands
   close to 1:1. */
@media (max-width: 780px) {
  .fin-stats { grid-template-columns: 1fr 1fr; gap: .6rem; margin-bottom: .8rem; }
  /* extra bottom padding reserves a clear strip for the sparkline, which otherwise draws
     straight through the delta line ("18 transactions logged") and makes both unreadable */
  .fin-stat { padding: .7rem .75rem 1.5rem; border-radius: var(--r-xs); }
  .fin-stat .fin-stat-name { font-size: .62rem; letter-spacing: .12em; }
  .fin-stat .fin-stat-sub { font-size: .68rem; margin-top: .05rem;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .fin-stat .fin-stat-val { font-size: 1.45rem; margin-top: .3rem; }
  .fin-stat .fin-stat-delta { font-size: .68rem; line-height: 1.3; }
  /* full-width strip along the bottom instead of a block that collides with the number */
  .fin-spark { width: 100%; height: 24%; opacity: .4; }

  .fin-grid { gap: .8rem; margin-bottom: .8rem; }
  .fin-card-head { flex-direction: column; align-items: flex-start; gap: .2rem; }
  .fin-legend { font-size: 1.35rem; }
  .fin-chart { margin-top: .6rem; }
  .fin-publish { font-size: .78rem; }
  .fin-publish ul { margin-left: .9rem; }

  /* the ledger table is six columns of small text; let it scroll rather than crush every cell */
  #finRows { font-size: .82rem; }
  .ops-pane .card > table { display: block; overflow-x: auto; white-space: nowrap; }
  #finAlloc .pillar-progress .row { font-size: .88rem; }
  #finAlloc .pillar-progress .pct { font-size: .8rem; }
}

/* very narrow (SE-class): one column reads better than two cramped ones */
@media (max-width: 360px) {
  .fin-stats { grid-template-columns: 1fr; }
  .fin-stat .fin-stat-val { font-size: 1.6rem; }
}

/* Library filter chips — one flat row, no counts. Scrolls sideways on a phone rather than
   wrapping into three ragged lines. */
/* A pairing leadership marked by hand as having happened before HQ existed. A hollow ring, not the
   solid one: both mean "these two have been partners", and the difference is whether the app was
   there to see it. */
.mx-pre { color: var(--gold-dim); }
.mx-tap { cursor: pointer; }
.mx-tap:hover { background: var(--gold-soft); }

/* The scoreboard carries six columns since consistency joined it, and on a phone that is the one
   table in the app tight enough to need its own padding. */
.sb-short { display: none; }
@media (max-width: 560px) {
  #sub-score th, #sub-score td { padding: .6rem .38rem; font-size: .88rem; }
  #sub-score th { letter-spacing: .08em; font-size: .68rem; }
  /* Exactly one of the two names is in the DOM's flow at any width, so a screen reader reads one
     name rather than the same man twice. */
  #sub-score .sb-long { display: none; }
  #sub-score .sb-short { display: inline; }
}

/* A video in the feed shares .post-img's box but must NOT be cropped to fill it — object-fit:cover
   on a portrait phone clip cuts the top and bottom off the thing being shown. Contain, on black. */
video.post-img { object-fit: contain; background: #000; width: 100%; }
.post-video-fallback { margin-top: .8rem; padding: 1rem; border: 1px dashed var(--steel);
  font-size: .9rem; }
.post-video-fallback a { color: var(--gold); }

/* Where every man sits on a 0-100% line, with you picked out. Not a leaderboard — the scoreboard
   already ranks and names everyone, and doing it twice with worse manners helps nobody. */
.spread { position: relative; height: 34px; margin-top: 1rem; border-radius: var(--pill);
  background: linear-gradient(90deg, rgba(139,26,26,.35), rgba(58,58,68,.5) 55%, rgba(212,175,82,.3)); }
.spread i { position: absolute; top: 8px; width: 6px; height: 18px; margin-left: -3px;
  border-radius: 3px; background: var(--smoke); }
.spread i.me { background: var(--gold); width: 8px; height: 26px; top: 4px; margin-left: -4px;
  box-shadow: 0 0 10px rgba(212,175,82,.6); }
.spread-mid { position: absolute; top: -3px; bottom: -3px; width: 1px; margin-left: -.5px;
  background: var(--white); opacity: .55; }
.spread-x { display: flex; justify-content: space-between; margin-top: .4rem;
  font-size: .72rem; color: var(--smoke); }

/* ---- pull down to refresh ---------------------------------------------------------------- */
/* Suppress the BROWSER's own pull-to-refresh so the two gestures don't both fire — in Safari that
   meant a full page reload (losing the view he was on, which is the one thing he asked for) racing
   HQ's in-place one. */
html, body { overscroll-behavior-y: contain; }
.ptr { position: fixed; top: -40px; left: 50%; z-index: 9997; width: 34px; height: 34px;
  border-radius: 50%; background: var(--iron); border: 1px solid var(--steel);
  display: none; align-items: center; justify-content: center;
  transform: translate(-50%, 0); pointer-events: none; }
.ptr.on { display: flex; }
.ptr i { display: block; width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid var(--gold-dim); border-top-color: transparent; }
/* Gold once he has pulled far enough — the gesture has to say "let go now" before he lets go. */
.ptr.ready { border-color: var(--gold-dim); }
.ptr.ready i { border-color: var(--gold); border-top-color: transparent; }
.ptr.spin i { animation: ptr-spin .7s linear infinite; }
@keyframes ptr-spin { to { transform: rotate(360deg); } }
/* Reduced motion keeps the indicator (it is the feedback that the pull worked) and drops only the
   spin, which is the part that is purely decorative. */
@media (prefers-reduced-motion: reduce) { .ptr.spin i { animation: none; } }

/* ---- the running list ------------------------------------------------------------------- */
.agenda-item { display: flex; align-items: flex-start; gap: .8rem; padding: .85rem 0;
  border-bottom: 1px solid var(--steel); }
.agenda-item:last-child { border-bottom: none; }
.agenda-body { flex: 1; min-width: 0; }
.agenda-text { color: var(--white); line-height: 1.4; overflow-wrap: anywhere; }
.agenda-meta { font-size: .78rem; margin-top: .25rem; }
/* A real 26px target. The tick is the whole interaction on this screen and it is used with a thumb;
   anything smaller is the classic "I tapped it three times and nothing happened". */
.agenda-tick { flex: none; width: 26px; height: 26px; margin-top: .1rem; border-radius: 6px;
  border: 1px solid var(--ash); background: var(--card-2); color: var(--gold);
  font-size: .95rem; line-height: 1; cursor: pointer; }
.agenda-tick:hover { border-color: var(--gold-dim); }
.agenda-item.done .agenda-tick { background: var(--gold-soft); border-color: var(--gold-dim); }
/* Struck through, not hidden — the archive is meant to be readable. */
.agenda-item.done .agenda-text { color: var(--smoke); text-decoration: line-through; }
.agenda-del { flex: none; background: none; border: none; color: var(--smoke); cursor: pointer;
  font-size: 1rem; padding: 0 .3rem; line-height: 1; }
.agenda-del:hover { color: var(--red); }
#agendaArchiveBox summary::-webkit-details-marker { color: var(--gold-dim); }

/* Scoreboard period tabs. Scrolls sideways on a phone rather than wrapping to two rows and pushing
   the table down the screen. */
.score-periods { display: flex; gap: .4rem; overflow-x: auto; padding-bottom: .9rem;
  scrollbar-width: none; }
.score-periods::-webkit-scrollbar { display: none; }
.score-periods button { background: var(--card-2); border: 1px solid transparent;
  border-radius: var(--pill); padding: .45rem .9rem; color: var(--silver);
  font-family: 'Barlow Condensed', sans-serif; letter-spacing: .1em; text-transform: uppercase;
  font-size: .78rem; white-space: nowrap; cursor: pointer; }
.score-periods button.on { background: var(--gold-soft); border-color: var(--gold-dim); color: var(--gold); }

/* ---- the pairing board: drag a man onto a man to swap them ------------------------------- */
.pair-row { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem;
  padding: .7rem 0; border-bottom: 1px solid var(--steel); }
.pair-row:last-child { border-bottom: none; }
.pair-row.free .pair-man { color: var(--gold); border-color: var(--gold-dim); }
.pair-link { color: var(--smoke); }
/* touch-action:none is the load-bearing line. Without it the browser claims the gesture as a scroll
   the moment a finger moves, pointermove stops firing, and the drag simply never starts on a
   phone — which is the one place Kyler most wanted it. */
.pair-man { display: inline-block; background: var(--card-2); border: 1px solid var(--steel);
  border-radius: var(--pill); padding: .4rem .85rem; color: var(--white); cursor: grab;
  touch-action: none; -webkit-user-select: none; user-select: none; }
.pair-man:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.pair-man.dragging { opacity: .35; cursor: grabbing; }
/* The man you are about to swap WITH. Gold, because the whole question mid-drag is "is it going to
   land on him or the one next to him". */
.pair-man.drop-target { border-color: var(--gold); background: var(--gold-soft); color: var(--gold); }
/* The chip that follows the finger. pointer-events:none so elementFromPoint sees straight through
   it to the chip underneath — otherwise every drop target is the ghost itself. */
.pair-ghost { position: fixed; z-index: 9999; pointer-events: none; opacity: .92;
  transform: translate(-50%, -50%); box-shadow: 0 8px 24px rgba(0,0,0,.55);
  border-color: var(--gold); }
@media (prefers-reduced-motion: reduce) { .pair-ghost { box-shadow: none; } }

/* Library search. type=search so iOS shows the native clear "x" and the search-key return —
   nothing custom to build or keep working. */
.lib-search { margin-bottom: .9rem; }
.lib-search input { width: 100%; background: var(--card-2); border: 1px solid var(--steel);
  border-radius: var(--pill); padding: .7rem 1rem; color: var(--white); font-size: .95rem;
  -webkit-appearance: none; appearance: none; }
.lib-search input::placeholder { color: var(--silver); opacity: .7; }
.lib-search input:focus { outline: none; border-color: var(--gold-dim); background: var(--iron); }
.lib-chips { display: flex; gap: .4rem; overflow-x: auto; padding-bottom: .9rem; margin-bottom: .2rem;
  scrollbar-width: none; }
.lib-chips::-webkit-scrollbar { display: none; }
.lib-chip { background: var(--card-2); border: 1px solid transparent; border-radius: var(--pill);
  color: var(--silver); font-family: 'Barlow Condensed', sans-serif; letter-spacing: .14em;
  text-transform: uppercase; font-size: .72rem; padding: .35rem .85rem; white-space: nowrap; }
.lib-chip.on { background: var(--gold-soft); border-color: var(--gold-dim); color: var(--gold); }

/* ---- The burn (2026-08-25) ---------------------------------------------------------------
   Kyler's ask, in his words: one habit → "fire on the edges of my iPhone", the flame emoji itself
   barely moving. Every habit for the day → the fire "starts on the outside, comes in, consumes
   the screen", the screen goes dark, and an emblem lands in the middle saying "Well done, Kyler".
   Semi-fast. And: it cannot look cheesy or kiddish — which is the whole reason this is a gold-on-
   iron emblem in the app's own typeface and not a cartoon flame with a bounce on it.

   Composited properties ONLY inside the keyframes (transform + opacity), on nine plain elements.
   The blur and the gradients are static. No canvas, no particle engine, no library — nine men on
   old phones get this for free, several times a day, without a layout on any frame. */
.fireedge { position: fixed; inset: 0; pointer-events: none; z-index: 9998; overflow: hidden; }

/* The four edges. Each is a band of heat pinned to one side, growing inward from it. */
.fireedge i { position: absolute; display: block; opacity: 0;
  animation: fe-edge 1.15s var(--ease-out) forwards; }
/* Shallow and steep on purpose. A deep, gently-fading band on four sides overlaps in the middle
   and washes the whole screen gold — which reads as a filter over the app, not as fire around it.
   The heat has to die out inside the first third of the band. */
.fireedge i.fe-t { top: 0; left: -6%; right: -6%; height: 17vh; transform-origin: 50% 0;
  background: linear-gradient(to bottom, rgba(255,196,92,.95) 0%, rgba(224,152,46,.62) 16%, rgba(139,26,26,.22) 38%, transparent 70%); }
.fireedge i.fe-b { bottom: 0; left: -6%; right: -6%; height: 17vh; transform-origin: 50% 100%;
  background: linear-gradient(to top, rgba(255,196,92,.95) 0%, rgba(224,152,46,.62) 16%, rgba(139,26,26,.22) 38%, transparent 70%); }
.fireedge i.fe-l { left: 0; top: -6%; bottom: -6%; width: 13vw; transform-origin: 0 50%;
  background: linear-gradient(to right, rgba(255,196,92,.9) 0%, rgba(224,152,46,.55) 16%, rgba(139,26,26,.2) 38%, transparent 70%); }
.fireedge i.fe-r { right: 0; top: -6%; bottom: -6%; width: 13vw; transform-origin: 100% 50%;
  background: linear-gradient(to left, rgba(255,196,92,.9) 0%, rgba(224,152,46,.55) 16%, rgba(139,26,26,.2) 38%, transparent 70%); }
.fireedge i { filter: blur(10px); }
@keyframes fe-edge {
  0%   { opacity: 0; transform: scale(.35); }
  22%  { opacity: 1; transform: scale(1.06); }
  55%  { opacity: .9;  transform: scale(1); }
  100% { opacity: 0; transform: scale(.9); }
}

/* ---- the full burn: every habit for the day is in --------------------------------------- */
/* The edges hold instead of fading, because the ring is about to take over from them. */
.fireedge.full i { animation: fe-edge-hold 2.5s var(--ease-out) forwards; }
@keyframes fe-edge-hold {
  0%   { opacity: 0; transform: scale(.35); }
  14%  { opacity: 1; transform: scale(1.08); }
  38%  { opacity: .85; transform: scale(1.15); }
  62%  { opacity: 0; transform: scale(1.3); }
  100% { opacity: 0; transform: scale(1.3); }
}
/* The ring that closes. A single element whose gradient IS the wall of fire; shrinking it drives
   the wall from outside the viewport into the middle of it. */
.fireedge u { position: absolute; left: 50%; top: 50%; width: 200vmax; height: 200vmax;
  margin: -100vmax 0 0 -100vmax; display: block; border-radius: 50%; opacity: 0;
  background: radial-gradient(circle at 50% 50%,
    transparent 0 34%, rgba(224,152,46,.9) 46%, rgba(212,175,82,.55) 56%,
    rgba(139,26,26,.4) 68%, transparent 84%);
  filter: blur(18px);
  animation: fe-close 2.5s var(--ease-out) forwards;
}
@keyframes fe-close {
  0%   { opacity: 0; transform: scale(1.15); }
  12%  { opacity: 1; transform: scale(.95); }
  36%  { opacity: 1; transform: scale(.24); }
  /* Out before the emblem is up. A shrinking ring still glowing behind the text reads as a smudge
     on the screen rather than as the fire that put the emblem there. */
  50%  { opacity: 0; transform: scale(.06); }
  100% { opacity: 0; transform: scale(.04); }
}
/* The ground going dark under it. Solid black on opacity — cheaper than a backdrop-filter and it
   does not fight the emblem's contrast the way a blur does. */
.fireedge s { position: absolute; inset: 0; display: block; background: #000; opacity: 0;
  animation: fe-dark 2.5s var(--ease-out) forwards; }
/* Holds at full dark instead of fading out at 100%: the emblem now waits for a tap, and a ground
   that lifted on its own timer would leave gold text floating over a live habit list. */
@keyframes fe-dark {
  0%, 8% { opacity: 0; }
  34%    { opacity: .96; }
  100%   { opacity: .96; }
}
/* The emblem. Gold on iron, the app's own typeface, a hairline ring — the same object language as
   every card in HQ. Nothing bounces and nothing is cartooned; that is the "not cheesy" part. */
/* Centred by flex, not by a hand-guessed negative margin — the line wraps to two rows for a long
   name and a fixed offset puts the whole emblem off-centre when it does. */
.fireedge .fe-medal { position: absolute; inset: 0; opacity: 0; display: flex;
  flex-direction: column; align-items: center; justify-content: center;
  padding: 0 2rem; text-align: center; animation: fe-medal 2.5s var(--ease-out) forwards; }
.fireedge .fe-medal svg { width: 6.4rem; height: 6.4rem; display: block; margin: 0 0 .9rem; }
.fireedge .fe-medal .fe-line { font-family: 'Bebas Neue', sans-serif; letter-spacing: .1em;
  font-size: 2rem; line-height: 1.05; color: var(--white); max-width: 20rem;
  text-shadow: 0 0 26px rgba(224,152,46,.55); }
/* The Good boy payout, under the line it belongs to (Kyler, 2026-10-31). */
.fireedge .fe-medal .fe-bonus { font-family: 'Barlow Condensed', sans-serif; letter-spacing: .2em;
  text-transform: uppercase; font-size: .9rem; color: var(--gold); margin-top: .5rem; }
/* The verse sits between the praise and its reference: readable sentence case, not the condensed
   caps the rest of the emblem uses — it is the one thing here a man is meant to actually READ. */
.fireedge .fe-medal .fe-verse { font-family: 'Barlow', sans-serif; font-size: .92rem;
  line-height: 1.45; color: var(--silver); margin-top: .7rem; max-width: 22rem; }
.fireedge .fe-medal .fe-sub { font-family: 'Barlow Condensed', sans-serif; letter-spacing: .28em;
  text-transform: uppercase; font-size: .72rem; color: var(--gold); margin-top: .45rem; }
@keyframes fe-medal {
  0%, 24% { opacity: 0; transform: scale(.9); }
  40%     { opacity: 1; transform: scale(1.02); }
  48%     { opacity: 1; transform: scale(1); }
  100%    { opacity: 1; transform: scale(1); }
}
/* ---- the held state ------------------------------------------------------------------------ */
/* `held` is added by burn() once the entrance has finished, and it is what makes the overlay
   clickable. Set from the start and the same touch that ticked the last habit would close the
   emblem before it finished arriving. */
.fireedge.full.held { pointer-events: auto; cursor: pointer; }
.fireedge.full.held:focus { outline: none; }
/* The way out, said plainly. A full-screen overlay with no visible exit is the thing that turns a
   celebration into a bug report. Fades in after the emblem so it doesn't compete with it. */
.fireedge .fe-medal .fe-dismiss { font-family: 'Barlow Condensed', sans-serif; letter-spacing: .22em;
  text-transform: uppercase; font-size: .66rem; color: var(--smoke); margin-top: 1.6rem; opacity: 0;
  animation: fe-hint .6s var(--ease-out) 2.6s forwards; }
@keyframes fe-hint {
  from { opacity: 0; }
  to   { opacity: 1; }
}
/* Dismissal. One transition on the wrapper takes the ground, the emblem and the hint out together,
   so nothing outlives anything else on the way off. */
.fireedge.full.out { opacity: 0; transition: opacity .45s ease; pointer-events: none; }
/* Same rule the confetti and the flame follow: the motion is decoration. The streak number, the
   lit flame and the day ring carry every bit of the information without it. */
/* A short viewport — a phone held sideways — has to fit shield + praise + verse + reference inside
   .fireedge's own overflow:hidden, or the emblem is cropped top and bottom with no way to scroll
   it. Shrink the parts rather than let the box clip them. */
@media (max-height: 620px) {
  .fireedge .fe-medal svg { width: 4rem; height: 4rem; margin-bottom: .5rem; }
  .fireedge .fe-medal .fe-line { font-size: 1.5rem; }
  .fireedge .fe-medal .fe-verse { font-size: .82rem; margin-top: .45rem; }
}
@media (prefers-reduced-motion: reduce) { .fireedge { display: none; } }

/* ---- Where Your Money Goes (member-facing; see memberMoney() in server.js) ----
   No new chart machinery: the buckets reuse .pillar-progress/.bar, and the twelve-month line is the
   same hand-written inline SVG the Operations chart uses. Whole dollars only — cents are a receipt
   fingerprint, which is the entire reason this view is aggregated server-side. */
.my-money-big { font-family: 'Bebas Neue', sans-serif; font-size: 2.6rem; letter-spacing: .04em; line-height: 1; margin: .6rem 0 .3rem; color: var(--gold); }
.my-money-big.is-unknown { color: var(--smoke); font-size: 1.4rem; }
.my-money-line { font-family: 'Bebas Neue', sans-serif; font-size: 1.6rem; letter-spacing: .04em; line-height: 1.15; margin: .2rem 0 .3rem; color: var(--gold); }
.my-money-line.is-unknown { color: var(--smoke); }
/* The month stepper under the twelve-month line: ‹ OCTOBER 2026 › with that month's bars beneath. */
.my-money-step { display: flex; align-items: center; gap: .6rem; }
.my-money-step-name { flex: 1; text-align: center; min-width: 0; }
.my-money-step button { background: none; border: 1px solid var(--gold); color: var(--gold); width: 2.6rem; height: 2.6rem; font-size: 1.5rem; line-height: 1; cursor: pointer; flex: none; }
.my-money-step button:disabled { border-color: var(--steel); color: var(--steel); cursor: default; }

/* The self check-in: eight number buttons in a row that wraps under the habit name on a phone. */
.habit .checkin-days { display: flex; gap: .3rem; flex-wrap: wrap; width: 100%; margin-top: .4rem; }
.habit .checkin-days .checkin-ans { min-width: 2.4rem; padding: .35rem 0; }

/* Tuesday roll call (leadership) and the Late CHUDZ card on Dues. */
.rollcall { margin-bottom: 1.2rem; }
.rollcall summary { cursor: pointer; }
.rollcall textarea { width: 100%; min-height: 4.5rem; margin-top: .6rem; background: var(--black); color: var(--white); border: 1px solid var(--steel); padding: .5rem; font: inherit; }
.rollcall input[type=date] { background: var(--black); color: var(--white); border: 1px solid var(--steel); padding: .25rem .4rem; }
.rc-men { margin-top: .8rem; }
.rc-man { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .9rem; padding: .45rem 0; border-bottom: 1px solid var(--steel); }
.rc-man > span:first-child { flex: 1 1 9rem; }
.rc-man button, .chudz-pay { background: none; border: 1px solid var(--gold-dim); color: var(--gold); padding: .35rem .8rem; cursor: pointer;
  font-family: 'Barlow Condensed', sans-serif; letter-spacing: .12em; text-transform: uppercase; font-size: .75rem; text-decoration: none; }

/* Belt race card (2026-10-21) */
#beltCard .belt-row { display: flex; justify-content: space-between; align-items: center; padding: .35rem 0; border-bottom: 1px solid var(--steel); }
#beltCard .belt-row:last-of-type { border-bottom: 0; }

/* Yes/no poll (2026-10-21): the 👍/👎 reactions drawn as vote bars */
.poll { display: grid; gap: .45rem; margin-top: .7rem; }
.poll .poll-opt { position: relative; display: flex; align-items: center; gap: .6rem; width: 100%; min-height: 44px;
  padding: .5rem .8rem; background: var(--iron); border: 1px solid var(--steel); border-radius: 10px; color: var(--white); text-align: left; overflow: hidden; }
.poll .poll-opt.on { border-color: var(--gold); }
.poll .poll-fill { position: absolute; inset: 0 auto 0 0; background: rgba(212,175,82,.16); pointer-events: none; }
.poll .poll-opt > :not(.poll-fill) { position: relative; }
.poll .poll-who { flex: 1; color: var(--smoke); font-size: .85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.poll .poll-n { font-weight: 700; }

/* Operations member list on a phone (2026-10-21): the name could shrink to 12px and print one letter
   per line next to three buttons. Name + avatar take the first line; the buttons wrap beneath. */
#memberList .habit .h-name { flex: 1 1 calc(100% - 64px); min-width: 0; }
#memberList .habit .mem-del { min-width: 44px; min-height: 44px; }

/* Nav condense (2026-10-22): the streak card opens Stats; Vault / Leadership switches */
.streak-card[role="button"] { cursor: pointer; }
.streak-more { font-size: .8rem; color: var(--gold); margin-top: .35rem; letter-spacing: .04em; }
.view-switch { margin-bottom: 1rem; }

/* You and the Circle (2026-10-22 redesign): one track, the line, the clear zone, brothers as dots, you as a pin */
.circ { padding: 56px 6px 40px; }
.circ-track { position: relative; height: 10px; border-radius: 5px; background: var(--steel); }
.circ-zone { position: absolute; top: -6px; bottom: -6px; right: 0; border-radius: 6px; background: color-mix(in oklab, var(--green) 38%, transparent); border: 1px solid var(--green); }
.circ-line { position: absolute; top: -8px; bottom: -8px; width: 2px; margin-left: -1px; background: var(--white); }
.circ-line em { position: absolute; top: 34px; left: 50%; transform: translateX(-50%); white-space: nowrap; font-style: normal; font-size: .72rem; color: var(--silver); }
.circ-track > i { position: absolute; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: var(--silver); opacity: .8; }
.circ-you { position: absolute; top: 50%; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 3px var(--black); z-index: 1; }
.circ-you b { position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%); white-space: nowrap; background: var(--gold); color: #111; font-size: .78rem; font-weight: 700; padding: 3px 8px; border-radius: 999px; }
.circ-you.clear { background: var(--green); }
.circ-you.clear b { background: var(--green); color: #fff; }
.circ-sum { display: flex; flex-wrap: wrap; gap: .3rem 1.2rem; font-size: .88rem; color: var(--silver); }
.circ-sum b { color: var(--white); }

/* Custom polls (2026-10-22) */
.poll-editor { display: grid; gap: .45rem; margin: .5rem 0; }
.poll-editor[hidden] { display: none; }
.poll-editor #pollOptions { display: grid; gap: .4rem; }
.poll-editor input[type=text] { width: 100%; }
.poll-date { display: grid; gap: .3rem; font-size: .85rem; color: var(--smoke); }
.cpoll-date { font-size: .85rem; color: var(--gold); margin-bottom: .1rem; }
.cpoll-seen { font-size: .82rem; color: var(--smoke); margin-top: .2rem; }
.cpoll-info { margin-left: .35rem; width: 22px; height: 22px; padding: 0; border-radius: 50%; border: 1px solid var(--smoke);
  background: none; color: var(--smoke); font: italic 700 .8rem/1 Georgia, serif; cursor: pointer; vertical-align: middle; position: relative; }
.cpoll-info::after { content: ""; position: absolute; inset: -11px; }  /* 44px tap target on a phone */
.cpoll-info:hover, .cpoll-info:focus-visible { border-color: var(--gold); color: var(--gold); }
.cpoll-info-h { font-family: 'Barlow Condensed', sans-serif; letter-spacing: .12em; text-transform: uppercase; font-size: .78rem;
  color: var(--gold); margin: .8rem 0 .1rem; }
.cpoll-info-what { margin-left: auto; color: var(--smoke); font-size: .85rem; text-align: right; }

/* What's new card (2026-10-22) */
.whatsnew { margin: 0; padding-left: 1.1rem; display: grid; gap: .45rem; color: var(--silver); }
.whatsnew b { color: var(--white); }

/* Every screen size (2026-10-22 sweep, 320px to 2560px). The phone-only rules above left a gap at
   tablet width (iPad Air 820: the Ops table pushed the page 106px sideways, goal buttons ran off the
   right edge, a long library link widened the page). These hold at every width. */
.card:has(table) { overflow-x: auto; }
.goal-row { flex-wrap: wrap; }
.view dd, .view dd a { overflow-wrap: anywhere; min-width: 0; }
/* "DASHBOARD" is the longest bottom-bar label; at 320-360px (iPhone SE, iPod) it ran past its tab. */
@media (max-width: 360px) { #sideNav button::after { letter-spacing: .02em; font-size: .58rem; } }
#beltCard .belt-row b { display: inline-flex; align-items: center; gap: .3rem; }
.poll-editor input[type=text], .poll-editor input[type=date] { background: var(--card-2); color: var(--white); border: 1px solid var(--steel);
  border-radius: 8px; padding: .6rem .7rem; font: inherit; font-size: 16px; color-scheme: dark; }
.poll-editor input:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }
.poll-editor .ghost-btn { justify-self: start; }

/* ---- photo proof on check-off (2026-11-13) ---- */
.proof-actions { display: flex; flex-direction: column; gap: .6rem; margin-top: 1.1rem; }
.proof-btn { display: block; text-align: center; cursor: pointer; background: var(--gold); border: 1px solid var(--gold);
  color: var(--black); font-family: 'Barlow Condensed', sans-serif; letter-spacing: .15em; text-transform: uppercase;
  font-weight: 600; padding: .75rem 1rem; }
.proof-skip { font-family: 'Barlow Condensed', sans-serif; letter-spacing: .12em; text-transform: uppercase; padding: .7rem 1rem; }
.proof-actions .is-busy { opacity: .45; pointer-events: none; }
.proof-msg { margin: .6rem 0 0; min-height: 1.2em; color: var(--silver); font-size: .9rem; }
.ic-flash { position: fixed; left: 50%; bottom: calc(1.4rem + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%);
  z-index: 2000; background: var(--iron); border: 1px solid var(--gold); color: var(--white); padding: .7rem 1.1rem;
  max-width: calc(100vw - 2rem); font-size: .95rem; box-shadow: 0 6px 24px rgba(0,0,0,.5); }
