/* ==========================================================================
   Desistor Network — Components
   ========================================================================== */

/* ---------------- Icon default ----------------
   inline-block (not the bare svg{display:block} from base) so that
   vertical-align actually applies and an icon sits on the text's optical
   centre wherever it is used inline rather than inside a flex row.        */
.ico { width: 20px; height: 20px; flex: none; display: inline-block; vertical-align: -0.18em; }
.ico--lg { width: 30px; height: 30px; }
.ico--xl { width: 40px; height: 40px; }
/* Icon used on its own above a heading — needs to be a block so the
   heading's margin is the only thing between them. */
.ico-lead { display: block; margin-bottom: var(--s-4); color: var(--teal); }
.ico-lead .ico { display: block; vertical-align: baseline; }

/* ---------------- Buttons ----------------
   Signature shape from the approved design: rounded top-left + bottom-right,
   square top-right + bottom-left. Hover only ever changes the BACKGROUND —
   the label colour is held constant so text can never wash out on hover.     */
.btn {
  --btn-bg: var(--teal); --btn-fg: #fff; --btn-bd: var(--teal);
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  font-family: var(--font); font-size: var(--fs-sm); font-weight: var(--fw-semi);
  line-height: 1; text-align: center; white-space: nowrap;
  /* Height comes from min-height alone, never from the padding + tallest
     child. Without this a button with an icon is taller than the same
     button without one, and rows of mixed buttons never line up. */
  padding: 0 var(--s-6); min-height: 55px;
  border: 2px solid var(--btn-bd); border-radius: var(--r-btn); box-shadow: 0px 1px 4px rgba(25, 33, 61, 0.08);
  background: var(--btn-bg); color: var(--btn-fg);
  cursor: pointer; text-decoration: none !important;
  transition: background var(--t), border-color var(--t), color var(--t), transform var(--t-fast), box-shadow var(--t);
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--sh-sm); }
.btn:active { transform: translateY(0); }
.btn:disabled, .btn.is-disabled { opacity: .45; pointer-events: none; }
.btn .ico { width: 18px; height: 18px; flex: none; }
/* .btn's own display:inline-flex above overrides the browser default
   [hidden]{display:none}, which left buttons with the `hidden` attribute
   still visible (e.g. the "Add another session" button when the frequency
   is Single). Reinstate the attribute's effect. */
.btn[hidden] { display: none; }

.btn--primary       { --btn-bg: var(--teal);  --btn-bd: var(--teal);  --btn-fg:#fff; }
.btn--primary:hover { --btn-bg: var(--teal-700); --btn-bd: var(--teal-700); --btn-fg:#fff; }

.btn--salmon        { --btn-bg: var(--salmon); --btn-bd: var(--salmon); --btn-fg:#fff; }
.btn--salmon:hover  { --btn-bg: var(--salmon-700); --btn-bd: var(--salmon-700); --btn-fg:#fff; }

.btn--accent        { --btn-bg: var(--amber); --btn-bd: var(--amber); --btn-fg:#fff; }
.btn--accent:hover  { --btn-bg: var(--amber-700); --btn-bd: var(--amber-700); --btn-fg:#fff; }

.btn--coral         { --btn-bg: var(--coral); --btn-bd: var(--coral); --btn-fg:#fff; }
.btn--coral:hover   { --btn-bg: var(--coral-700); --btn-bd: var(--coral-700); --btn-fg:#fff; }

/* White button on a dark panel — the hero's second CTA */
.btn--white         { --btn-bg: #fff; --btn-bd: #fff; --btn-fg: var(--teal); }
.btn--white:hover   { --btn-bg: var(--teal-050); --btn-bd: var(--teal-050); --btn-fg: var(--teal-700); }

/* Outline buttons invert deliberately — background and label change together */
.btn--ghost         { --btn-bg: transparent; --btn-bd: var(--teal); --btn-fg: var(--teal); }
.btn--ghost:hover   { --btn-bg: var(--teal); --btn-bd: var(--teal); --btn-fg: #fff; }

.btn--ghost-light       { --btn-bg: transparent; --btn-bd: rgba(255,255,255,.75); --btn-fg:#fff; }
.btn--ghost-light:hover { --btn-bg: #fff; --btn-bd:#fff; --btn-fg: var(--teal); }

.btn--quiet         { --btn-bg: #fff; --btn-bd: var(--border); --btn-fg: var(--text); border: none; box-shadow: 0px 1px 4px rgba(25, 33, 61, 0.08); color: var(--teal) !important; }
.btn--quiet:hover   { --btn-bg: var(--teal); --btn-bd: var(--teal); --btn-fg: #fff; color: #fff !important; }

.btn--danger        { --btn-bg: #fff; --btn-bd: var(--danger); --btn-fg: var(--danger); }
.btn--danger:hover  { --btn-bg: var(--danger); --btn-bd: var(--danger); --btn-fg: #fff; }

.btn--sm { min-height: 38px; padding: 0 var(--s-4); font-size: var(--fs-xs); border-radius: var(--r-btn-sm); }
.btn--sm .ico { width: 16px; height: 16px; }
.btn--lg { min-height: 56px; padding: 0 var(--s-8); font-size: var(--fs-base); }
/* A full-width button takes its width from its container, so it does not need
   the generous side padding of an inline button — and a long label wraps
   rather than overflowing the padding box, as "Log Peer Mentoring Session"
   was doing in the 300px dashboard rail. */
.btn--block { display:flex; width: 100%; padding-inline: var(--s-4);
  white-space: normal; padding-block: var(--s-3); line-height: 1.25; }
/* Stacked full-width buttons always get the same gap, whether or not the page
   remembered a margin utility. With the signature shape the two facing corners
   interlock, so they need a real gap to read as separate controls. */
.btn--block + .btn--block { margin-top: var(--s-3); }
.btn--icon { padding: 0; width: 55px; min-height: 55px; border-radius: var(--r-btn); }
/* UX 15 Sep H5 + G5: carousel arrows are light rounded squares with no
   outline — a tinted fill instead of the white-on-border treatment. */
.btn--soft { --btn-bg: var(--white); --btn-bd: transparent; --btn-fg: var(--teal-800); }
.btn--soft:hover { color: var(--amber); }
.btn--icon.btn--sm { width: 38px; min-height: 38px; }
.btn--round { border-radius: var(--r-pill); }

.linkish {
  display:inline-flex; align-items:center; gap: var(--s-2);
  font-weight: var(--fw-sm); font-size: var(--fs-sm); color: var(--teal);
  background:none; border:0; padding:0; cursor:pointer; font-family:var(--font); 
}
.linkish::after { content:'\F135'; font-family: "bootstrap-icons"; font-size: 22px; transition: transform var(--t); }
/* Hi-Fi 16 Sep: "Learn more"/"Read more" read as underlined links. */
.linkish--plain { text-decoration: none; }
.linkish:hover { color: var(--teal-700); text-decoration: none !important; }
.linkish:hover::after { transform: translateX(3px); }
.linkish--plain::after { content: none; }
.lnkline { border-bottom: var(--teal) solid 1px; }
.lnkline:hover { border-bottom-color: transparent; }

/* Date pill — UX 15 Sep: news and card dates read as a tinted pill with a
   calendar icon rather than bare coral text. */
.datepill {
  display:inline-flex; align-items:center; gap: 6px;
  font-size: var(--fs-sm); line-height:1;
  padding: 7px 12px; border-radius: var(--r-2xs);
  background: var(--coral-100); color: var(--amber);
  /* a long venue name shortens rather than pushing out of the card rail */
  white-space: nowrap; min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis;
}
.datepill .ico { flex: none; }
/* In a flex-column card body a max-width:100% pill stretches to the full
   card; it has to hug its own text, as every Hi-Fi card shows. */
.datepill { align-self: flex-start; width: fit-content; }
.card__rail > .datepill { align-self: center; }
.datepill .ico { width: 16px; height: 16px; }

/* Spotlight card — Hi-Fi 16 Sep. Date and Venue share one bordered box that
   a hairline divides in two, rather than sitting in two separate tints. */
.spot__content { margin-top: 100px; }
@media (max-width: 1699px) { 
  .spot__content { margin-top: 20px; }
}
@media (max-width: 991px) { 
  .spot__content { margin-top: 0px; }
}
.spot__title { font-size: var(--fs-h3); margin: var(--s-4) 0 var(--s-3); color: var(--navy); }
.spot__rule { display:block; width:104px; height:4px; background: var(--coral); margin-bottom: var(--s-4); }
.metabox-row { background: #fafafa; /*display:grid; grid-template-columns: repeat(2, minmax(0,1fr));*/ display: flex; flex-flow: wrap;
  border-radius: var(--r-sm); overflow:hidden;
  margin: var(--s-5) 0; }
.metabox { align-items: center; display: flex; gap: 10px; padding: var(--s-3) var(--s-4); min-width: 0; width: 50%; }
.metabox + .metabox {  }
.metabox__k {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: #FDF1ED;
  border-radius: 100%;

}
.metabox__title { font-size: var(--fs-xs); line-height: 1.2; opacity: 0.5; }
.metabox__k .ico { width: 14px; height: 14px; color: var(--coral); }
.metabox__v { font-size: var(--fs-xs); color: var(--text); line-height: 1.2; }
.metabox__v small { display:block; font-size: var(--fs-2xs); font-weight: var(--fw-reg); color: var(--text-muted); }
@media (max-width: 420px) { .metabox-row { grid-template-columns: 1fr; }
  .metabox + .metabox { border-left:0; border-top:1px solid var(--border-soft); } }

/* Confirmation mark — the Thank You page the enquiry form now lands on. */
.ty__mark { display:flex; justify-content:center; }
.ty__ico {
  width: 34px; height: 34px; padding: 15px; box-sizing: content-box;
  border-radius: 50%; background: var(--teal-050); color: var(--teal);
}

/* ---------------- Badges / chips / pills ---------------- */
/* Hi-Fi 16 Sep: the default chip is a pale peach wash with coral text. */
.badge {
  display:inline-flex; align-items:center; gap: var(--s-1);
  font-size: var(--fs-xs); font-weight: var(--fw-semi); line-height:1; 
  padding: 6px 12px; border-radius: var(--r-pill);
  background: var(--peach-050); color: var(--coral-700);
  text-transform: uppercase; 
  /* break-word, not anywhere: a status label should wrap between words,
     never mid-word. */
  white-space: normal; max-width: 100%; overflow-wrap: break-word; text-wrap: balance;
}
.badge--nowrap { white-space: nowrap; }
.badge--amber { background: var(--amber-100); color: var(--amber-700); }
.badge--coral { background: var(--coral-100); color: var(--amber); }
.badge--cream { background: var(--cream); color: var(--amber-700); }
.badge--ok    { background: var(--ok-bg); border: #A7F3D0 solid 1px; color: var(--teal); padding-left: 25px; position: relative; }
.badge--ok:before { background: #10B981; border-radius: 100%; content: ""; height: 6px; left: 10px; position: absolute; top: 50%; transform: translateY(-50%); width: 6px; }
.badge--warn  { background: var(--warn-bg); color: var(--warn); }
.badge--danger{ background: var(--danger-bg);color: var(--danger); }
.badge--grey  { background: var(--ink-100); color: var(--ink-500); }
.badge--solid { background: var(--teal); color:#fff; }
.badge--lg { font-size: var(--fs-xs); padding: 8px 14px; }

/* Hi-Fi 16 Sep: focus-area chips are a pale peach wash with small uppercase
   coral text, matching the tag on every other page. */
.tag {
  display:inline-flex; align-items:center; gap:6px;
  font-size: var(--fs-2xs); font-weight: var(--fw-bold);
  text-transform: uppercase; letter-spacing: .04em;
  padding: 6px 11px; border-radius: var(--r-pill);
  background: var(--peach-050); color: var(--coral-700); border:1px solid transparent;
}
.tag--removable button { border:0; background:none; cursor:pointer; color:inherit; font-size:14px; line-height:1; padding:0; }
button.tag:hover { background: var(--peach-100); }
button.tag { transition: border-color var(--t), background var(--t); }

.chip-row { display:flex; flex-wrap:wrap; gap: var(--s-2); }

/* Tier pill — colour-coded per BRD tier */
.tier { display:inline-flex; align-items:center; gap:6px; font-size:var(--fs-2xs); font-weight:var(--fw-x);
  padding:5px 11px; border-radius:var(--r-pill); text-transform:uppercase; letter-spacing:.06em; }
.tier--MT { background:var(--teal);      color:#fff; }
.tier--AM { background:var(--teal-100);  color:var(--teal-800); }
.tier--MM { background:var(--amber);     color:#fff; }
.tier--AS { background:var(--cream);     color:var(--amber-700); }
.tier--PA { background:var(--coral-100); color:var(--coral-700); }

/* ---------------- Cards ---------------- */
/* UX 15 Sep: "No outline for all, use drop shadow instead". The border is kept
   transparent rather than removed so nothing shifts by a pixel. */
.card {
  background: var(--surface); border: 1px solid transparent;
  border-radius: var(--r-lg); padding: var(--s-6);
  box-shadow: var(--sh-card);
}
/* Flush cards carry a media block + body. Making the card a column and
   letting the body grow means sibling cards in a grid row share one
   baseline for their closing CTA, whatever the title/excerpt length. */
.card--flush { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
/* 1 0 auto, not 1 1 auto: the body must never be compressed below its own
   content, which was clipping the last chip row on taller event cards. */
.card--flush > .card__body { flex: 1 0 auto; display: flex; flex-direction: column; }
.card__body > .btn--block:last-child,
.card__body > .linkish:last-child,
.card__body > .row:last-child {
  margin-top: auto; padding-top: var(--s-5);
}

.card--type { border: none; box-shadow: none; padding: var(--s-4); }
.card--type .card__media { aspect-ratio: 4/2.4; border-radius: var(--r-lg); }
.card--type .card__body { padding: var(--s-4) 0; }
.card--type .tag {
    font-size: var(--fs-3xs);
    font-weight: var(--fw-semi);
    letter-spacing: normal;
    padding: 6px 11px;
    border-radius: var(--r-pill);
    background: var(--coral-100);
    color: var(--amber);
}

/* A flex column stretches its children to full width by default, which turned
   every inline pill inside a card into a full-width bar. Anything that is
   sized by its own content hugs the start instead. */
.card--flush > .card__body > .badge,
.card--flush > .card__body > .tag,
.card--flush > .card__body > .tier,
.card--flush > .card__body > .linkish,
.card--flush > .card__body > .btn:not(.btn--block),
.grid > .card > .badge,
.grid > .card > .tag,
.grid > .card > .tier,
.grid > .card > .linkish,
.grid > .card > .btn:not(.btn--block) { align-self: flex-start; }
/* The same treatment for plain cards whose last element is the CTA. */
.grid > .card { display:flex; flex-direction:column; }
.grid > .card > .btn:last-child,
.grid > .card > .linkish:last-child { margin-top: auto; padding-top: var(--s-4); align-self: flex-start; }
.grid > .card > .btn--block:last-child { align-self: stretch; }
.card--bdr { border: #DCE1EC solid 1px; }
.card--raised { box-shadow: var(--sh-card); border-color: transparent; }
.card--warm { background: var(--cream-200); border-color: var(--cream-400); }
.card--teal { background: var(--teal); color:#fff; border-color: transparent; }
.card--teal h2, .card--teal h3, .card--teal h4 { color:#fff; }
.card--link { display:block; color:inherit; text-decoration:none !important; transition: box-shadow var(--t), transform var(--t); }
/* A flush card that is also a link still needs to be a column, otherwise
   display:block above wins and its CTA stops bottom-aligning. */
.card--flush.card--link { display:flex; flex-direction:column; }
.card--link:hover { box-shadow: var(--sh-md); transform: translateY(-3px); }

/* A neutral placeholder: the tinted one read as an odd blue panel wherever a
   lazy image had not arrived yet. */
.card__media { aspect-ratio: 4/3; overflow:hidden; background: var(--ink-100); }
.card__media img, .card__media > svg { width:100%; height:100%; object-fit: cover; }
.card__body { padding: var(--s-6); }
.card__title { font-size: var(--fs-lg); font-weight: var(--fw-semi); margin: var(--s-3) 0; }
/* Programme / event card — Hi-Fi 16 Sep.
     PD3  the agency name is the orange element, set as a plain coral eyebrow
     PD4  date and location are two peach pills on one rail
     PD5  every child of the body shares one left edge
     PD6  no tag on the card itself; the single tag lives on the agency banner */
.card--prog .card__media { position: relative; }
.card__flags { position:absolute; inset: 12px 12px auto 12px; display:flex; justify-content:space-between; gap: var(--s-2); }
.card__flag { font-size: var(--fs-xs); font-weight: var(--fw-semi); line-height: 1; padding: 7px 12px; text-transform: uppercase; }
.card__flag--dark  { background: #323232; color:#fff; }
.card__flag--light { background:#f9f9f9; color: var(--teal); margin-left:auto; }
.card__eyebrow { font-size: var(--fs-xs); text-transform: uppercase; color: var(--amber); }
.card--prog .card__title { font-size: var(--fs-lg); margin: var(--s-3) 0 var(--s-4); }
.card--prog .card__title a { color: var(--navy); }
.card--prog .card__title a:hover { color: var(--teal); }
/* Hi-Fi 16 Sep: the date and the venue share one line. The venue shortens
   rather than dropping to a second row, so the rail is always one line and
   every card in a row keeps the same rhythm. */
.card__rail { display:flex; align-items:center; gap: var(--s-2); flex-wrap: wrap; margin-bottom: var(--s-4); }
.card__rail > .datepill:first-child { flex: none; }
.card__rail > .datepill + .datepill { flex: 0 1 auto; min-width: 0; }
.card__cta { display:flex; align-items:center; gap: var(--s-5); margin-top: auto; padding-top: var(--s-5); }
.card--prog > .card__body > * { align-self: flex-start; }
.card--prog > .card__body > .card__rail,
.card--prog > .card__body > .card__cta { align-self: stretch; }
.card__meta { display:flex; flex-wrap:wrap; gap: var(--s-4); font-size: var(--fs-xs); color: var(--text-muted); }
.card__meta .ico { width:16px; height:16px; color: var(--amber); }

.card-head { display:flex; justify-content:space-between; align-items:center; gap:var(--s-4);
  margin-bottom: var(--s-5); padding-bottom: var(--s-4); border-bottom:1px solid var(--border-soft); flex-wrap:wrap; }
.card-head h3, .card-head h2 { margin:0; font-size: var(--fs-h4); }
/* The title block absorbs the slack and wraps; without this a long title
   pushes the action button onto its own line and the card head stops
   matching its siblings. */
.card-head > :first-child { flex: 1 1 240px; min-width: 0; }
.card-head > :last-child:not(:first-child) { flex: 0 1 auto; min-width: 0; }
/* Filter controls beside a card title stay on one line for as long as
   they fit, instead of stacking search over select. */
.card-head .filterbar, .card-head .row { margin-bottom: 0; flex-wrap: wrap; justify-content: flex-end; }
.card-head .searchbox { flex: 1 1 200px; }

/* Stat tile — a column so the label sits on one baseline across a row of
   tiles even when one value wraps to two lines and its neighbours do not. */
/* G5: no outline anywhere — the stat tile was the last component still
   carrying a border instead of the card shadow. */
.stat { background: var(--surface); border:1px solid transparent; box-shadow: var(--sh-card);
  border-radius: var(--r-lg); padding: var(--s-5); display:flex; flex-direction:column; }
.stat__label { font-size: var(--fs-xs); color: var(--text-muted); font-weight: var(--fw-semi);
  margin-top: auto; padding-top: var(--s-2); }
.stat__value { font-size: clamp(1.75rem, 1.4rem + 1.4vw, 2.25rem); font-weight: var(--fw-x); line-height:1.15;
  margin-top: var(--s-1); color: var(--teal); text-wrap: balance; }
.stat__foot { font-size: var(--fs-xs); color: var(--text-faint); margin-top: var(--s-1); }
.stat--amber .stat__value { color: var(--amber); }
.stat--coral .stat__value { color: var(--coral); }

/* Dashboard summary tile — UX 15 Sep D1/D2. The value drops to the size of
   the Quick Shortcuts button text, which is what the feedback asks for and
   is also what lets every label hold one line: 'Of Peer Mentoring Conducted'
   needed 214px and was wrapping inside a 190px tile. Weight and colour carry
   the hierarchy now instead of size. */
.stat--tile { padding: var(--s-4) var(--s-5); gap: 2px; }
.stat--tile .stat__value { font-size: var(--fs-sm); line-height: 1.3; margin-top: 0; }
.stat--tile .stat__label {
  font-size: var(--fs-2xs); margin-top: 0; padding-top: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* Small label/value rows — the claims summary in the partner dashboard rail. */
.dl-rows > div {
  display:flex; justify-content:space-between; align-items:baseline; gap: var(--s-4);
  padding: var(--s-3) 0; border-bottom: 1px solid var(--border-soft);
}
.dl-rows > div:last-child { border-bottom: 0; padding-bottom: 0; }
.dl-rows span { font-size: var(--fs-xs); color: var(--text-muted); }
.dl-rows b { font-size: var(--fs-sm); white-space: nowrap; }

/* Filter rail — Hi-Fi 16 Sep: the heading sits above a hairline rule. */
.frail { border: #EBEBEB solid 1px; border-radius: var(--r-md); box-shadow: none; padding: var(--s-5); }
.frail__h { font-size: var(--fs-lm); font-weight: var(--fw-bold); color: var(--teal);
  margin: 0 0 var(--s-4); padding-bottom: var(--s-4); border-bottom:1px solid var(--border-soft); }

/* Icon tile — Hi-Fi 16 Sep: a teal rounded square, not a bare glyph. */
.ico-lead { display:inline-grid; place-items:center; width:70px; height:70px;
  border-radius: var(--l-btn); background: var(--teal); color:#fff; margin-bottom: var(--s-4); }
.ico-lead .ico, .ico-lead .ico--lg { width:56px; height:56px; color:#fff; }

/* ---------------- Forms ---------------- */
.field { margin-bottom: var(--s-5); }
.field > label, .label {
  display:block; font-size: var(--fs-xs); font-weight: var(--fw-semi);
  color: var(--text); margin-bottom: var(--s-2);
}
.label .req { color: var(--coral); }
.hint { font-size: var(--fs-xs); color: var(--text-faint); margin-top: var(--s-2); }

/* UX 15 Sep: "Rounded rectangle for all search bar and sort by" — the pill
   radius is the field default now, not the signature notch. */
/* Hi-Fi 16 Sep: fields are rounded RECTANGLES on a light grey fill with a
   hairline border — not pills. G6's "rounded rectangle" read literally. */
.input, .select, .textarea {
  width: 100%; font-family: var(--font); font-size: var(--fs-xs); color: var(--text);
  padding: 13px var(--s-4); min-height: 40px;
  background: #F8F8F8; border: 1px solid var(--border-soft); border-radius: var(--r-sm);
  transition: border-color var(--t), box-shadow var(--t), background var(--t);
}
.input:focus, .select:focus, .textarea:focus { background-color: #fff; }
.textarea { border-radius: var(--r-field); min-height: 130px; }
.input::placeholder, .textarea::placeholder { color: #A4A8A9; }
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-050);
}
.input:disabled, .select:disabled, .textarea:disabled { background: var(--ink-100); color: var(--text-faint); cursor:not-allowed; }
.input[readonly] { background: var(--bg-soft); }
.textarea { min-height: 120px; resize: vertical; line-height: var(--lh-base); }
.select {
  appearance:none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236E686A' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat:no-repeat; background-position: right var(--s-4) center; padding-right: var(--s-10);
}
.field.is-error .input, .field.is-error .select, .field.is-error .textarea { border-color: var(--danger); }
.field.is-error .err { display:block; }
.err { display:none; color: var(--danger); font-size: var(--fs-xs); font-weight: var(--fw-semi); margin-top: var(--s-2); }

.check { color: var(--teal); display:flex; align-items:flex-start; gap: var(--s-2); font-size: var(--fs-sm); cursor:pointer; margin-bottom: var(--s-3); }
.check input { flex:none; width:16px; height:16px; accent-color: var(--teal); cursor:pointer; }
.check span { line-height: 1.5; }
.check--box { border:1.5px solid var(--border); border-radius: var(--r-sm); padding: var(--s-4); transition: border-color var(--t), background var(--t); }
.check--box:hover { border-color: var(--teal-300); background: var(--teal-050); }
.check--box:has(input:checked) { border-color: var(--teal); background: var(--teal-050); }

/* Attendance tick — BRD §7 option 3 / §9.1: a digital checkbox list beside
   the registered members' names, available without entering an edit mode so
   a partner can mark and correct attendance at any point. */
.tick { display:inline-flex; align-items:center; justify-content:center; cursor:pointer; margin:0; }
.tick input { width:20px; height:20px; margin:0; accent-color: var(--teal); cursor:pointer; }
.att__tick { width:1%; white-space:nowrap; text-align:center; }
th.att__tick { text-align:center; }

.radio-cards { display:grid; gap: var(--s-3); }
.radio-card { display:flex; gap:var(--s-3); align-items:flex-start; border:1.5px solid var(--border);
  border-radius: var(--r-md); padding: var(--s-4); cursor:pointer; transition: all var(--t); }
.radio-card:hover { border-color: var(--teal-300); }
.radio-card:has(input:checked) { border-color: var(--teal); background: var(--teal-050); box-shadow: 0 0 0 1px var(--teal); }
.radio-card input { flex:none; margin-top:3px; accent-color: var(--teal); width:18px; height:18px; }
.radio-card__t { font-weight: var(--fw-bold); font-size: var(--fs-sm); }
.radio-card__d { font-size: var(--fs-xs); color: var(--text-muted); margin-top:2px; }

.switch { position:relative; display:inline-block; width:46px; height:26px; flex:none; }
.switch input { opacity:0; width:0; height:0; }
.switch__track { position:absolute; inset:0; background: var(--ink-200); border-radius: var(--r-pill); transition: background var(--t); cursor:pointer; }
.switch__track::before { content:''; position:absolute; height:20px; width:20px; left:3px; top:3px; background:#fff; border-radius:50%; transition: transform var(--t); box-shadow: var(--sh-xs); }
.switch input:checked + .switch__track { background: var(--teal); }
.switch input:checked + .switch__track::before { transform: translateX(20px); }
.switch-row { display:flex; align-items:center; justify-content:space-between; gap:var(--s-4); padding: var(--s-3) 0; }

.field-grid { display:grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 0 var(--s-5); }
.field-grid--3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.field-grid .span-2 { grid-column: 1 / -1; }
@media (max-width: 760px) { .field-grid, .field-grid--3 { grid-template-columns: 1fr; } }

.fieldset { border:1px solid transparent; box-shadow: var(--sh-card); border-radius: var(--r-md); padding: var(--s-5); margin-bottom: var(--s-6); }
.fieldset > legend { font-size: var(--fs-sm); font-weight: var(--fw-x); color: var(--teal); padding-inline: var(--s-2); }

/* File drop */
.dropzone { border: 2px dashed var(--border); border-radius: var(--r-md); padding: var(--s-8);
  text-align:center; background: var(--bg-soft); cursor:pointer; transition: all var(--t); }
.dropzone:hover, .dropzone.is-over { border-color: var(--teal); background: var(--teal-050); }
.dropzone__ico { width:36px; height:36px; margin:0 auto var(--s-3); color: var(--teal); }
.filelist { list-style:none; padding:0; margin: var(--s-3) 0 0; }
.filelist li { display:flex; align-items:center; gap:var(--s-3); font-size: var(--fs-xs);
  padding: var(--s-2) var(--s-3); background: var(--white); border:1px solid var(--border-soft); border-radius: var(--r-xs); margin-bottom: var(--s-2);
  /* min-width:0 lets the filename shrink below its intrinsic width (flex
     default is min-content, which with an un-whitespaced upload name is the
     whole string). Without this the <b> pushes the size + ATTACHED badge out
     of the modal. */
  min-width: 0; flex-wrap: wrap; }
.filelist li b {
  /* Take remaining room, but allow breaking a long upload name mid-"word"
     (random hex / underscore names have no spaces to break at). */
  flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; word-break: break-word;
}
.filelist li .t-faint,
.filelist li .badge { flex: none; }

/* OTP input */
.otp { display:flex; gap: var(--s-3); justify-content:center; }
.otp input {
  width: 56px; height: 64px; text-align:center; font-size: 1.5rem; font-weight: var(--fw-x);
  font-family: var(--font); border:1.5px solid var(--border); border-radius: var(--r-sm); color: var(--teal);
}
.otp input:focus { outline:none; border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-050); }
@media (max-width: 480px) { .otp input { width: 44px; height: 54px; font-size: 1.25rem; } }

/* ---------------- Tables ---------------- */
/* The fade on the right edge is the scroll affordance: without it a table
   that is wider than its card reads as clipped/broken rather than as
   something you can push sideways. It disappears once scrolled to the end. */
.table-wrap {
  /* G5: no outline on the table box either. */
  overflow-x:auto; border:1px solid transparent; box-shadow: var(--sh-card); border-radius: var(--r-md);
  background:
    /* Cover first so it paints ON TOP: it is parked at the content's right
       edge, so it hides the fade whenever the table already fits or has
       been scrolled all the way across. */
    linear-gradient(to right, #fff, #fff) right center / 26px 100% no-repeat local,
    /* The fade itself, pinned to the scroller's right edge. */
    linear-gradient(to right, rgba(34,34,34,0), rgba(34,34,34,.13)) right center / 26px 100% no-repeat scroll,
    var(--white);
}
.table { width:100%; border-collapse: collapse; font-size: var(--fs-sm); min-width: 680px; }
.table th {
  text-align:left; font-size: var(--fs-2xs); font-weight: var(--fw-x); text-transform:uppercase; letter-spacing:.06em;
  color: var(--text-muted); background: var(--bg-soft); padding: var(--s-4); border-bottom:1px solid var(--border-soft);
  /* Headers wrap. Holding them on one line was forcing tables hundreds of
     pixels wider than their card and clipping the last columns. */
  white-space: normal; line-height: 1.3; vertical-align: bottom;
}
.table td { padding: var(--s-4); border-bottom:1px solid var(--border-soft); vertical-align: middle; }
.table tr:last-child td { border-bottom:0; }
.table tbody tr:hover { background: var(--teal-050); }
.table .tag { margin-bottom: 5px; }
/* Status badges never wrap inside a table — a two-line status pill was
   the original F033 complaint. */
.table .badge { white-space: nowrap; }
.table__sub { display:block; font-size: var(--fs-2xs); color: var(--text-faint); margin-top:2px; }
/* UX 15 Sep M1/M4: a record's name inside a table is the link to its page,
   and reads as one — underlined, in the body colour, not as a stray teal
   word among plain cells. */
.tlink { color: var(--text); font-weight: var(--fw-bold); text-decoration: underline;
  text-underline-offset: 3px; text-decoration-thickness: 1px; text-decoration-color: var(--border); }
.tlink:hover { color: var(--teal); text-decoration-color: var(--teal); }
/* NOT display:flex — a flex <td> stops being a table cell, so the row's
   border and height no longer run through it. That is why the Actions
   column was rendering detached, with no divider lines behind it. The
   buttons are already inline-flex, so a margin does the same job. */
.table__actions { white-space: nowrap; vertical-align: middle; }
.table__actions > * { vertical-align: middle; }
.table__actions > * + * { margin-left: var(--s-2); }
.table--compact th, .table--compact td { padding: var(--s-3); }

.empty { text-align:center; padding: var(--s-12) var(--s-6); color: var(--text-muted); }
.empty__ico { width:44px; height:44px; margin:0 auto var(--s-4); color: var(--ink-200); }
.empty h4 { margin-bottom: var(--s-2); }

/* ---------------- Alerts / toast ---------------- */
.alert {
  display:flex; gap: var(--s-3); align-items:flex-start;
  padding: var(--s-4); border-radius: var(--r-md); font-size: var(--fs-sm);
  background: var(--info-bg); color: var(--teal-800); border-left: 4px solid var(--teal);
  margin-bottom: var(--s-5);
}
.alert .ico { width:20px; height:20px; flex:none; margin-top:1px; }
.alert--ok     { background: var(--ok-bg);     color:#1E5C42; border-color: var(--ok); }
.alert--warn   { background: var(--warn-bg);   color:#77560A; border-color: var(--warn); }
.alert--danger { background: var(--danger-bg); color:#8C2828; border-color: var(--danger); }
.alert strong { display:block; margin-bottom:2px; }

#toaster { position: fixed; right: var(--s-5); bottom: var(--s-5); z-index: var(--z-toast); display:flex; flex-direction:column; gap:var(--s-3); max-width: min(380px, calc(100vw - 32px)); }
.toast {
  background: var(--teal-900); color:#fff; padding: var(--s-4) var(--s-5); border-radius: var(--r-md);
  box-shadow: var(--sh-lg); font-size: var(--fs-sm); display:flex; gap:var(--s-3); align-items:flex-start;
  animation: toastIn 260ms cubic-bezier(.4,0,.2,1);
}
.toast--ok { background:#1E5C42; } .toast--warn { background:#8A6208; } .toast--err { background:#8C2828; }
.toast .ico { width:18px; height:18px; flex:none; margin-top:1px; }
@keyframes toastIn { from { opacity:0; transform: translateY(12px) } to { opacity:1; transform:none } }

/* ---------------- Modal ---------------- */
.modal-backdrop {
  position: fixed; inset:0; background: rgba(20,62,62,.55); backdrop-filter: blur(3px);
  z-index: var(--z-modal); display:flex; align-items:center; justify-content:center;
  padding: var(--s-5); overflow-y:auto; animation: fadeIn 160ms ease;
}
@keyframes fadeIn { from{opacity:0} to{opacity:1} }
.modal {
  background:#fff; border-radius: var(--r-xl); width:100%; max-width: 640px;
  max-height: calc(100vh - 64px); display:flex; flex-direction:column; overflow:hidden;
  box-shadow: var(--sh-lg); animation: modalIn 220ms cubic-bezier(.4,0,.2,1);
}
@keyframes modalIn { from{opacity:0; transform: translateY(16px) scale(.98)} to{opacity:1; transform:none} }
.modal--sm { max-width: 460px; } .modal--lg { max-width: 880px; } .modal--xl { max-width: 1080px; }
.modal__head { display:flex; align-items:flex-start; justify-content:space-between; gap:var(--s-4);
  padding: var(--s-6); border-bottom:1px solid var(--border-soft); }
.modal__head h3 { margin:0; font-size: var(--fs-h3); }
.modal__head p { margin: var(--s-2) 0 0; font-size: var(--fs-sm); color: var(--text-muted); }
.modal__x { border:0; background: var(--bg-soft); width:36px; height:36px; border-radius:50%; cursor:pointer;
  font-size:18px; line-height:1; color: var(--text-muted); flex:none; transition: all var(--t); }
.modal__x:hover { background: var(--ink-100); color: var(--text); }
.modal__body { padding: var(--s-6); overflow-y:auto; flex:1; }
.modal__foot { padding: var(--s-5) var(--s-6); border-top:1px solid var(--border-soft);
  display:flex; gap: var(--s-3); justify-content:flex-end; flex-wrap:wrap; background: var(--bg-soft); }
@media (max-width:560px){ .modal__foot { flex-direction:column-reverse; } .modal__foot .btn { width:100%; } }

/* ---------------- Tabs ---------------- */
.tabs { display:flex; gap: var(--s-1); border-bottom:2px solid var(--border-soft); margin-bottom: var(--s-6); overflow-x:auto; overflow-y:hidden; }
.tab {
  border:0; background:none; font-family:var(--font); font-size: var(--fs-sm); font-weight: var(--fw-bold);
  color: var(--text-muted); padding: var(--s-3) var(--s-5); cursor:pointer; white-space:nowrap;
  border-bottom:3px solid transparent; margin-bottom:-2px; transition: all var(--t);
}
.tab:hover { color: var(--teal); }
.tab.is-active { color: var(--teal); border-bottom-color: var(--teal); }
.tab-panel[hidden] { display:none; }

/* ---------------- Steps ---------------- */
.steps { display:flex; gap: var(--s-2); margin-bottom: var(--s-8); flex-wrap:wrap; }
.step { display:flex; align-items:center; gap: var(--s-3); flex:1 1 0; min-width:150px; }
.step__n { width:32px; height:32px; border-radius:50%; flex:none; display:grid; place-items:center;
  font-size: var(--fs-xs); font-weight: var(--fw-x); background: var(--ink-100); color: var(--text-faint); }
.step__t { font-size: var(--fs-xs); font-weight: var(--fw-bold); color: var(--text-faint); }
.step.is-active .step__n { background: var(--teal); color:#fff; }
.step.is-active .step__t { color: var(--text); }
.step.is-done .step__n { background: var(--ok); color:#fff; }
.step.is-done .step__t { color: var(--text-muted); }

/* ---------------- Progress / meter ---------------- */
.meter { height:10px; background: var(--ink-100); border-radius: var(--r-pill); overflow:hidden; }
.meter__fill { height:100%; background: var(--teal); border-radius: var(--r-pill); transition: width var(--t-slow); }
.meter--amber .meter__fill { background: var(--amber); }
.meter--coral .meter__fill { background: var(--coral); }

/* ---------------- Avatar ---------------- */
.avatar { width:44px; height:44px; border-radius:50%; flex:none; display:grid; place-items:center;
  background: var(--teal); color:#fff; font-weight: var(--fw-x); font-size: var(--fs-sm); overflow:hidden; }
.avatar img { width:100%; height:100%; object-fit:cover; }
.avatar--sm { width:32px; height:32px; font-size: var(--fs-2xs); }
.avatar--lg { width:88px; height:88px; font-size: 1.5rem; }
.avatar--amber { background: var(--amber); } .avatar--coral { background: var(--coral); }

/* ---------------- Search / filter bar ---------------- */
.filterbar { display:flex; gap: var(--s-3); flex-wrap:wrap; align-items:center; margin-bottom: var(--s-6); }
.searchbox { position:relative; flex:1 1 240px; min-width:0; }
.filterbar .input, .filterbar .select { 
  background-color: #FFFFFF;
  border: 1px solid #F1F3F7;
  box-shadow: 0px 1px 4px rgba(25, 33, 61, 0.08);
  border-radius: 8px; color: var(--teal); }
.filterbar .input { padding-right: var(--s-10); }
.filterbar .input::placeholder, .filterbar .textarea::placeholder { color: var(--teal); }
.searchbox .ico { position:absolute; right: var(--s-4); top:50%; transform:translateY(-50%); width:18px; height:18px; color: var(--teal); pointer-events:none; }
.filterbar .select { width:auto; min-width:170px; flex:0 1 auto; }

/* ---------------- Pagination ---------------- */
.pager { display:flex; gap: var(--s-2); justify-content:center; align-items:center; margin-top: var(--s-10); flex-wrap:wrap; }
/* Hi-Fi 16 Sep: circular pager buttons, teal fill on the current page. */
.pager button { min-width:50px; width:50px; height:50px; border:1px solid var(--border-soft); background:#fff; border-radius:50%;
  font-family:var(--font); font-size:var(--fs-2xs); cursor:pointer; color: var(--text-dark); transition: all var(--t); }
.pager button:hover:not(:disabled):not(.is-active) { border-color: var(--teal); color: var(--teal); background: var(--teal-050); }
.pager button.is-active { background: var(--teal); border-color: var(--teal); color:#fff; }
.pager button.is-active:hover { background: var(--teal-700); border-color: var(--teal-700); color:#fff; }
.pager button:disabled { opacity:.4; cursor:not-allowed; }
.pager button.pico { font-size: 26px; }

/* ---------------- Dots (hero carousel) ---------------- */
.dots { display:flex; gap: var(--s-3); }
.dots button { width:9px; height:9px; border-radius:50%; border:0; background: rgba(255,255,255,.38); cursor:pointer; padding:0; transition: background var(--t); }
.dots button:hover { background: rgba(255,255,255,.65); }
.dots button.is-active { background:#fff; }

/* ---------------- Accordion ---------------- */
/* G5: no outline — shadow separates the panel from the page. */
.acc { border:1px solid #DCE1EC; border-radius: var(--r-lg); overflow:hidden; margin-bottom: var(--s-4); background:#fff; }
.acc__head { width:100%; text-align:left; border:0; background:none; font-family:var(--font); font-size: var(--fs-base);
  font-weight: var(--fw-bold); padding: var(--s-4) var(--s-5); cursor:pointer; display:flex; justify-content:space-between; gap:var(--s-4); align-items:center; color:var(--text); }
.acc__head:hover { background: var(--teal); color: var(--white); }
.acc__head:hover::after { border-bottom-color: var(--white); border-right-color: var(--white); }
/* Hi-Fi 16 Sep: a chevron, and the question reads in teal. */
.acc__head { color: var(--teal); }
.acc__head::after { content:''; flex:none; width:11px; height:11px; margin-right:4px;
  border-right:2px solid var(--teal); border-bottom:2px solid var(--teal);
  transform: rotate(45deg) translate(-3px,-3px); transition: transform var(--t); }
.acc.is-open .acc__head::after { transform: rotate(-135deg) translate(-3px,-3px); }
.acc__body { padding: 0 var(--s-5) var(--s-5); }
.acc:not(.is-open) .acc__body { display:none; }

/* ---------------- Breadcrumb ---------------- */
.crumbs { display:flex; gap: var(--s-2); align-items:center; flex-wrap:wrap;
  font-size: var(--fs-sm); color: var(--text-dark); margin-bottom: var(--s-5); }
.crumbs a { color: var(--text-crum); }
.crumbs a:hover { color: var(--teal); }
.crumbs__sep { color: var(--text-dark); font-size: var(--fs-h4); line-height: 1; }
.crumbs span[aria-current] { color: var(--text-dark); font-weight: var(--fw-bold); }

/* ---------------- Definition list (profile fields) ---------------- */
.dl { display:grid; grid-template-columns: minmax(180px, 34%) 1fr; gap: var(--s-3) var(--s-5); font-size: var(--fs-sm); }
.dl dt { color: var(--text-muted); font-weight: var(--fw-semi); }
.dl dd { margin:0; font-weight: var(--fw-semi); }
@media (max-width: 620px) { .dl { grid-template-columns: 1fr; gap: var(--s-1) 0; } .dl dd { margin-bottom: var(--s-3); } }

/* ---------------- QR ---------------- */
.qr { width: 190px; height: 190px; padding: var(--s-3); background:#fff; border:1px solid var(--border); border-radius: var(--r-md); }
.qr svg, .qr img { width:100%; height:100%; }

/* ---------------- Timeline ---------------- */
.tl { list-style:none; padding:0; margin:0; }
.tl li { position:relative; padding: 0 0 var(--s-6) var(--s-8); border-left:2px solid var(--border-soft); }
.tl li:last-child { border-left-color:transparent; padding-bottom:0; }
.tl li::before { content:''; position:absolute; left:-7px; top:4px; width:12px; height:12px; border-radius:50%; background: var(--teal); box-shadow: 0 0 0 3px #fff; }
.tl__t { font-weight: var(--fw-bold); font-size: var(--fs-sm); }
.tl__d { font-size: var(--fs-xs); color: var(--text-faint); }

/* Stacked definition list — label above value, everything left-aligned */
.dl--stack { grid-template-columns: 1fr; gap: 0; font-size: var(--fs-sm); }
.dl--stack dt { font-size: var(--fs-xs); color: var(--text-faint); font-weight: var(--fw-semi); margin-top: var(--s-4); }
.dl--stack dt:first-child { margin-top: 0; }
.dl--stack dd { margin: 2px 0 0; font-weight: var(--fw-bold); color: var(--navy); }

/* Dashboard tables fill their column instead of forcing a horizontal scroll (F033) */
.table--fit { min-width: 0; width: 100%; }
.table--fit th, .table--fit td { padding: var(--s-3); }
.table--fit th:first-child, .table--fit td:first-child { padding-left: var(--s-4); }
.table--fit th:last-child,  .table--fit td:last-child  { padding-right: var(--s-4); }
@media (max-width: 700px) { .table--fit { min-width: 520px; } }
/* The name column is what a squeezed table sacrifices first, and a
   four-line title sets the height of every cell beside it. A floor keeps
   rows to two lines and lets the table scroll instead. It is not viewport
   conditional: what squeezes the column is the card it sits in, so the
   partner dashboard hit this at 1440 once its claims rail was added. */
.table--fit th:first-child, .table--fit td:first-child { min-width: 180px; }

/* Free-text cells are what make a wide table's rows ragged: squeezed to
   100px they wrap to ten lines and set the row height for everything
   beside them. A floor and a ceiling keep rows to two or three lines. */
.table td.cell-text { min-width: 190px; max-width: 320px; }
.table--fit td.cell-text { min-width: 150px; max-width: 260px; }
@media (max-width: 700px) { .table td.cell-text { min-width: 150px; } }

/* Card heading — one level below the page h1 so dashboards do not skip from
   h1 straight to h3, while keeping the size the design calls for. */
.cardh { font-size: var(--fs-h3); line-height: var(--lh-snug); margin: 0 0 var(--s-3); }
.card-head .cardh { margin: 0; }


