/* ==========================================================================
   Desistor Network — Layout: header, footer, hero, dashboard shell, cookie bar
   ========================================================================== */

/* ---------------- Header ---------------- */
.hdr {
  position: sticky; top:0; z-index: var(--z-header);
  background: var(--header-bg);
  border-bottom: 1px solid var(--border-soft);
}
.hdr__in { display:flex; align-items:center; gap: var(--s-6); min-height: var(--header-h); }
.hdr__brand { display:flex; align-items:center; gap: var(--s-3); text-decoration:none !important; flex:none; }
.hdr__brand b { font-size: 1.25rem; font-weight: var(--fw-x); color: var(--navy); letter-spacing:-.015em; white-space:nowrap; }
.hdr__brand img { width:auto; display:block; }
.hdr__nav { display:flex; align-items:center; gap: var(--s-1); margin-left:auto; }
/* UX 15 Sep: the hi-fi marks the current page with a peach pill rather than
   an underline, so the nav item carries its own padding and radius and the
   underline comes off entirely. Hover keeps a lighter tint of the same pill
   so the two states read as one system. */
.hdr__nav a {
  font-size: var(--fs-sm); font-weight: var(--fw-reg); color: var(--navy); text-decoration:none !important;
  padding: var(--s-2) var(--s-4); border-radius: 0 15px 0 15px;
  white-space:nowrap; transition: background var(--t), color var(--t);
}
@media (max-width: 1699px) {
  .hdr__nav a { padding: var(--s-2) var(--s-3);}
}
@media (max-width: 1499px) {
  .hdr__nav a { font-size: 16px; padding: var(--s-2) var(--s-1); }
}
.hdr__nav a:hover, .hdr__nav a.is-active, .hdr__nav a.is-active:hover { color: var(--amber) !important; background: var(--coral-100); }

/* Client 17 Sep: "What's Happening" is a parent with no page of its own, so
   it is a button rather than a link. It matches the nav links exactly in
   type, padding and pill radius so the row still reads as one set. The menu
   opens on hover and on focus-within, so it is reachable from the keyboard. */
.hdr__drop { position: relative; }
.hdr__droptop {
  display:flex; align-items:center; gap: 4px;
  /* A button does not inherit line-height the way the sibling links do, so
     without this the parent's pill came out 32px against their 38.4px and
     sat visibly short of the row. Matches the links' 1.6. */
  line-height: 1.6;
  font-family: inherit; font-size: var(--fs-sm); font-weight: var(--fw-reg);
  color: var(--navy); background: none; border: 0; cursor: pointer;
  padding: var(--s-2) var(--s-4); border-radius: 0 15px 0 15px;
  white-space: nowrap; transition: background var(--t), color var(--t);
}
.hdr__droptop:hover { color: var(--amber) !important; background: var(--coral-100); }
.hdr__droptop.is-active { color: var(--coral-700); background: var(--peach-050); }
.hdr__droptop.is-active:hover { background: var(--peach-100); }
.hdr__chev { width:15px; height:15px; flex:none; transition: transform var(--t); }
.hdr__drop:hover .hdr__chev,
.hdr__drop:focus-within .hdr__chev,
.hdr__drop.is-open .hdr__chev { transform: rotate(180deg); }

.hdr__menu {
  position:absolute; top: calc(100% + 8px); left: 0; z-index: 60;
  min-width: 232px; padding: var(--s-2);
  background:#fff; border:1px solid var(--border-soft); border-radius: 0 15px 0 15px;
  box-shadow: var(--sh-card);
  opacity:0; visibility:hidden; transform: translateY(-6px);
  transition: opacity var(--t), transform var(--t), visibility var(--t);
}
.hdr__drop:hover .hdr__menu,
.hdr__drop:focus-within .hdr__menu,
.hdr__drop.is-open .hdr__menu { opacity:1; visibility:visible; transform:none; }
/* A hover bridge across the 8px gap, so the menu does not close as the
   pointer travels from the parent down into it. */
.hdr__drop::after { content:''; position:absolute; top:100%; left:0; right:0; height:10px; }
.hdr__menu a {
  display:block; margin-bottom: 2px; width:100%; padding: var(--s-3) var(--s-4);
  border-radius: 0 15px 0 15px; white-space: nowrap;
}

.hdr__tools { display:flex; align-items:center; gap: var(--s-5); flex:none; }
@media (max-width: 1699px) {
  .hdr__tools { gap: var(--s-3); }
}
.hdr__search { border:0; background:none; cursor:pointer; padding: var(--s-2); color: var(--navy); border-radius: var(--r-btn-sm); }
.hdr__search:hover { background: var(--bg-soft); color: var(--teal); }
.hdr__search .ico { width:24px; height:24px; }
.hdr__burger { display:none; border:0; background:none; cursor:pointer; padding: 0; color: var(--text); }
.hdr__burger .ico { width:26px; height:26px; }

/* logged-in account menu */
.acct { position:relative; }
.acct__btn { display:flex; align-items:center; gap: var(--s-3); background: var(--bg-soft); border:1px solid var(--border-soft);
  border-radius: var(--r-pill); padding: 6px 14px 6px 6px; cursor:pointer; font-family:var(--font); font-size: var(--fs-sm); font-weight: var(--fw-bold); color: var(--text); }
.acct__btn:hover { border-color: var(--teal-300); }
.acct__btn .ico { width:16px; height:16px; color: var(--text-muted); }
/* G5: no outline — the elevation shadow carries the separation. */
.acct__menu { position:absolute; right:0; top: calc(100% + 10px); background:#fff; border:0;
  border-radius: var(--r-md); box-shadow: var(--sh-lg); min-width: 280px; padding: var(--s-2); z-index: var(--z-drop); }
.acct__menu[hidden] { display:none; }
.acct__who { padding: var(--s-3) var(--s-4); border-bottom:1px solid var(--border-soft); margin-bottom: var(--s-2); }
.acct__who b { display:block; font-size: var(--fs-sm); }
.acct__who span { font-size: var(--fs-2xs); color: var(--text-faint); }
.acct__menu a, .acct__menu button {
  display:flex; align-items:center; gap: var(--s-3); width:100%; text-align:left;
  padding: var(--s-3) var(--s-4); border:0; background:none; font-family:var(--font); font-size: var(--fs-sm);
  color: var(--text); border-radius: var(--r-sm); cursor:pointer; margin-bottom: 2px; text-decoration:none !important;
}
.acct__menu a.active, .acct__menu a.is-active, .acct__menu a:hover, .acct__menu button:hover { background: var(--coral-100); color: var(--amber) !important; }
/* Current page in the account (user profile) menu. */
.acct__menu a.activee .ico, .acct__menu a.is-active .ico, .acct__menu a:hover .ico, .acct__menu button:hover .ico { color: var(--amber); }
.acct__menu .ico { width:17px; height:17px; color: var(--text-muted); }
.acct__menu hr { margin: var(--s-2) 0; }

/* mobile nav drawer */
.mnav { position:fixed; inset:0; z-index: var(--z-overlay); display:none; }
.mnav.is-open { display:block; }
.mnav__scrim { position:absolute; inset:0; background: rgba(20,62,62,.5); }
.mnav__panel { position:absolute; right:0; top:0; bottom:0; width: min(340px, 88vw); background:#fff;
  padding: var(--s-6); overflow-y:auto; box-shadow: var(--sh-lg); animation: slideIn 240ms cubic-bezier(.4,0,.2,1); }
@keyframes slideIn { from { transform: translateX(100%) } to { transform:none } }
.mnav__panel a { display:block; padding: var(--s-4) 0; font-weight: var(--fw-bold); border-bottom:1px solid var(--border-soft); color: var(--text); }
.mnav__panel a:hover { color: var(--teal); }
/* Current-section highlight — matches the header's amber accent so the
   active item reads the same way on the slide-out as it does in the bar. */
.mnav__panel a.is-active { color: var(--amber); }
.mnav__panel a.btn { color: var(--white); }
.mnav__x { position:absolute; right: var(--s-5); top: var(--s-5); border:0; background: var(--bg-soft);
  width:38px; height:38px; border-radius:50%; font-size:18px; cursor:pointer; }

@media (max-width: 1199px) {
  .hdr__nav { display:none; }
  .hdr__burger { display:block; }
  .hdr__tools { margin-left:auto; }
}

/* ---------------- Hero (approved hifi homepage) ---------------- */
.hero { background: var(--teal); position:relative; overflow:hidden; }
/* The teal is a true circle, per UX 15 Sep ("this should be a rounded circle").
   Taken from the approved hi-fi: on a 1920x830 hero the circle is 1408.58px
   across, centred at x=316.29 / y=415 — so its chord meets the top and bottom
   edges at 46.1% of the width and it bulges to 53.2% at the middle.
   ::before holds the solid teal up to the chord line and ::after draws the
   bulge, so the two together cover the full height at any hero proportion. */
.hero__grid { position:relative; display:grid; grid-template-columns: 1.05fr 1fr; min-height: 620px; }
.hero__grid::before, .hero__grid::after { content:''; position:absolute; z-index:1; background: var(--teal); }
.hero__grid::before { inset: 0 auto 0 0; width: 46.1%; }
.hero__grid::after {
  top: 50%; left: -20.2%; width: 73.36%; aspect-ratio: 1;
  border-radius: 50%; transform: translateY(-50%);
}
.hero__media { margin-left: -22%; }
/* The panel is now just the text column — the teal behind it is drawn by the
   circle on .hero__grid above. */
.hero__panel {
  background: none; color:#fff; padding: clamp(40px,5vw,88px) 0 clamp(40px,5vw,88px) clamp(24px,4vw,106px);
  display:flex; flex-direction:column; justify-content:center;
  position:relative; z-index:2; margin-right: 0;
  border-radius: 0;
  padding-right: clamp(24px, 3vw, 48px);
}
@media (min-width: 1921px) {
  .hero__panel { padding-left: calc((100vw - 1780px)/2); }
}
/* 805px of an 1920px hero = 42ch at the hi-fi's size, which is what keeps the
   headline to the three lines the UX feedback asks for. */
.hero__panel h1 { font-size: var(--fs-hero); color:#fff; margin-bottom: var(--s-4); max-width: 24ch; letter-spacing:-.02em; }
.hero__panel p { font-size: var(--fs-sm); color: rgba(255,255,255,.85); max-width: 58ch; margin-bottom: var(--s-8); line-height:1.65; }
.hero__cta { display:flex; gap: var(--s-4); flex-wrap:wrap; margin-bottom: var(--s-10); }
.hero__media { position:relative; }
.hero__media img, .hero__media > svg { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; }

@media (max-width: 980px) {
  .hero__grid { grid-template-columns: 1fr; }
  /* Stacked: the artwork is its own row above the panel, so the circle and the
     chord block both come off and the panel carries its own teal again. */
  .hero__grid::before, .hero__grid::after { display: none; }
  .hero__panel { background: var(--teal); }
  .hero__media { margin-left: 0; order:1; min-height: 280px; }
  .hero__panel { order:2; border-radius:0; margin-right:0;
    padding: clamp(32px,6vw,56px) clamp(24px,4vw,80px); }
  .hero__cta { margin-bottom: var(--s-6); }
}

/* Page banner (interior pages) */
.pbanner { background: var(--teal); color:#fff; padding: clamp(40px,5vw,72px) 0; }
.pbanner h1 { color:#fff; margin-bottom: var(--s-3); }
.pbanner p { color: rgba(255,255,255,.85); max-width: 62ch; margin:0; }
.pbanner .crumbs { color: rgba(255,255,255,.7); margin-bottom: var(--s-4); }
.pbanner .crumbs a, .pbanner .crumbs .crumbs__sep { color: rgba(255,255,255,.8); }
.pbanner .crumbs a:hover { color:#fff; }
.pbanner .crumbs span[aria-current] { color:#fff; }
.pbanner--warm { background: var(--cream); color: var(--text); }
.pbanner--warm h1 { color: var(--text); } .pbanner--warm p, .pbanner--warm .crumbs .crumbs__sep { color: var(--text-muted); }

/* The warm variant repainted the background but not the breadcrumbs, which
   stayed white — invisible on cream on FAQ, Privacy and Terms. */
.pbanner--warm .crumbs { color: var(--text-muted); }
.pbanner--warm .crumbs a { color: var(--teal); }
.pbanner--warm .crumbs a:hover { color: var(--teal-700); }
.pbanner--warm .crumbs span[aria-current] { color: var(--text); }

/* ---------------- CTA band ---------------- */
/* Hi-Fi 16 Sep: the band carries the brand notch at block scale — a deep
   radius on the top-left and bottom-right, square on the other two. */
/* Measured off the approved pages: the band is inset from the content column,
   about four fifths of its width, not flush with the cards above it. */
.ctaband { background: var(--teal); color:#fff; text-align:center;
  border-radius: clamp(40px,6vw,100px) 0 clamp(40px,6vw,100px) 0;
  padding: clamp(40px,5vw,72px) clamp(24px,4vw,64px);
  margin-inline: auto; }
.ctaband h2 { color:#fff; font-weight: var(--fw-x); margin-bottom: var(--s-4); max-width: 46ch; margin-inline:auto; }
.ctaband p { color: rgba(255,255,255,.85); max-width: 97ch; margin: 0 auto var(--s-8); }
.ctaband__btns { display:flex; gap: var(--s-4); justify-content:center; flex-wrap:wrap; }

/* ---------------- Footer ---------------- */
/* Hi-Fi 16 Sep: the footer is white with navy type, four columns wide, and
   a centred copyright line under a hairline rule. */
.ftr { background: #fff; color: var(--text); padding: var(--s-16) 0 0; font-size: var(--fs-xs); }
.ftr .wrap { max-width: 1666px; }
.ftr__grid { display:grid; grid-template-columns: 1.3fr 1fr 1fr 1.2fr; gap: var(--s-10); padding-bottom: var(--s-12); }
.ftr__logo-img { height: 40px; width:auto; display:block; margin-bottom: var(--s-4); }
.ftr__socials { display: flex; flex-low: wrap; gap: 10px; }
.ftr__socials li a { align-items: center; background: var(--teal); border-radius: 4px; color: var(--white); display: flex; font-size: var(--fs-3xs); justify-content: center; width: 24px; height: 24px; }
.ftr__socials li a:hover { background: var(--coral); color: var(--white) !important; }
.ftr h4, .ftr__h { color: var(--navy); font-size: var(--fs-base); font-weight: var(--fw-x); margin: 0 0 var(--s-4); }
.ftr a { color: var(--text); }
.ftr a:hover { color: var(--coral) !important; text-decoration: none !important; }
/* Current-section highlight — shares the hover colour so a visitor's eye reads
   it as "you are here" without introducing a third accent. */
.ftr a.is-active { color: var(--coral) !important; font-weight: var(--fw-semi); }
.ftr ul { list-style:none; padding:0; margin:0; }
.ftr li { margin-bottom: var(--s-3); }
.ftr__addr { line-height:1.9; margin-bottom: var(--s-5); }
/* Client 17 Sep: the supplied Yellow Ribbon Cares and Singapore Prison
   Service artwork. The two marks have different proportions, so they are
   matched on optical weight rather than on a single height — the SPS
   lockup is wider and sits slightly smaller to balance it. */
.ftr__powered { display:flex; gap: var(--s-6); flex-wrap:wrap; align-items:center; }
/* Matched on how large the WORDING reads, not on a shared box height: the
   Yellow Ribbon lockup stacks three short lines while the SPS lockup runs a
   crest plus two long ones, so an equal height would leave the SPS wordmark
   visibly smaller than its neighbour. */
.ftr__plogo { height: 60px; width:auto; display:block; }

/* "What's Happening" is a heading inside the Navigation column, not a link. */
.ftr__grp { font-weight: var(--fw-semi); color: var(--navy); margin-top: var(--s-2); }
.ftr__subli { padding-left: var(--s-4); }
.ftr__bot { border-top:1px solid var(--border-soft); padding: var(--s-5) 0; text-align:center;
  font-size: var(--fs-xs); color: var(--text-faint); }
@media (max-width: 980px) { .ftr__grid { grid-template-columns: 1fr 1fr; gap: var(--s-8); } }
@media (max-width: 600px) { .ftr__grid { grid-template-columns: 1fr; } }

/* ---------------- Dashboard shell ---------------- */
.dash { background: #fff; min-height: calc(100vh - var(--header-h)); }
/* stretch, not start: the sidebar is a full-height rail in the approved
   lofi. (It also means position:sticky on .dash__side would be inert, so
   there is deliberately none.) */
/* The grid carries the same minimum height as .dash so the sidebar rail runs
   the full height of the screen. Without it the rail stopped at the content
   and left a band of page background beneath it on short pages. */
.dash__in { display:grid; grid-template-columns: 280px 1fr; gap: var(--s-8); align-items:stretch;
  min-height: calc(100vh - var(--header-h)); }
.dash__who b { display:block; font-size: var(--fs-base); font-weight: var(--fw-x); }
.dashnav a {
  display:flex; align-items:center; gap: var(--s-3); padding: var(--s-3) var(--s-4);
  font-size: var(--fs-sm); font-weight: var(--fw-semi); color: var(--text); border-radius: var(--r-sm);
  text-decoration:none !important; transition: all var(--t);
}
.dashnav a:hover { background: var(--teal-050); color: var(--teal); }
.dashnav a.is-active { background: var(--teal); color:#fff; }
.dashnav a.is-active .ico { color:#fff; }
.dashnav .ico { width:18px; height:18px; color: var(--text-muted); flex:none; }
.dashnav .count { margin-left:auto; font-size: var(--fs-2xs); font-weight: var(--fw-x); background: var(--coral); color:#fff; border-radius: var(--r-pill); padding: 2px 7px; }
.dash__main { min-width:0; }
.dash__head { margin-bottom: var(--s-6); }
.dash__head h1 { font-size: var(--fs-h2); margin-bottom: var(--s-2); }

@media (max-width: 1024px) {
  .dash__in { grid-template-columns: 1fr; gap: var(--s-5); }
  .dash__side { position:static; }
  .dashnav { display:flex; gap: var(--s-1); overflow-x:auto; padding: var(--s-2); }
  .dashnav a { white-space:nowrap; }
  .dashnav .ico { display:none; }
}

/* ---------------- Cookie banner (CookieYes-style) ---------------- */
.cky {
  position: fixed; right: var(--s-5); bottom: var(--s-5); z-index: var(--z-toast);
  width: min(440px, calc(100vw - 40px)); background:#fff; border-radius: var(--r-lg);
  box-shadow: var(--sh-lg); padding: var(--s-6); border:0;
  animation: toastIn 320ms cubic-bezier(.4,0,.2,1);
}
.cky[hidden] { display:none; }
.cky h4 { margin-bottom: var(--s-2); font-size: var(--fs-base); }
.cky p { font-size: var(--fs-xs); color: var(--text-muted); line-height:1.6; margin-bottom: var(--s-5); }
.cky__btns { display:flex; gap: var(--s-3); flex-wrap:wrap; }
.cky__btns .btn { flex:1 1 auto; }
.cky__link { font-size: var(--fs-2xs); margin-top: var(--s-4); display:block; color: var(--text-faint); }
.cky__prefs { border-top:1px solid var(--border-soft); margin-top: var(--s-5); padding-top: var(--s-4); }
.cky__prefs[hidden] { display:none; }
.cky__pref { display:flex; justify-content:space-between; align-items:flex-start; gap: var(--s-4); padding: var(--s-3) 0; border-bottom:1px solid var(--border-soft); }
.cky__pref:last-child { border-bottom:0; }
.cky__pref b { font-size: var(--fs-xs); display:block; }
.cky__pref span { font-size: var(--fs-2xs); color: var(--text-faint); }
@media (max-width:560px){ .cky { left: var(--s-3); right: var(--s-3); bottom: var(--s-3); width:auto; padding: var(--s-5); } }
/* Toasts sit above the cookie bar rather than on top of it — both are
   pinned bottom-right and were overlapping while consent was pending. */
body:has(.cky:not([hidden])) #toaster { bottom: calc(var(--s-5) + 260px); }
@media (max-width:560px){ body:has(.cky:not([hidden])) #toaster { bottom: calc(var(--s-3) + 300px); } }

/* ---------------- Demo helper bar ---------------- */
.demobar {
  background: var(--ink); color:#fff; font-size: var(--fs-2xs); padding: var(--s-2) 0;
  position:relative; z-index: calc(var(--z-header) + 1);
}
.demobar__in { display:flex; align-items:center; gap: var(--s-4); flex-wrap:wrap; justify-content:center; }
.demobar b { color: var(--amber-300); }
.demobar code { background: rgba(255,255,255,.14); padding: 2px 7px; border-radius: 4px; color:#fff; font-weight:700;
  font-size: 1em; }  /* not .92em — it was rendering at 11px */
.demobar button { background:none; border:1px solid rgba(255,255,255,.35); color:#fff; font-family:var(--font);
  font-size: var(--fs-2xs); font-weight:700; padding: 3px 10px; border-radius: var(--r-pill); cursor:pointer; }
.demobar button:hover { background: rgba(255,255,255,.15); }

/* ---------------- Session timeout warning ---------------- */
.idle-warn { text-align:center; }
.idle-warn__n { font-size: 3rem; font-weight: var(--fw-x); color: var(--coral); line-height:1; margin: var(--s-4) 0; }

/* ---------------- Auth pages ---------------- */
.authpage { min-height: calc(100vh - var(--header-h)); display:grid; place-items:center; padding: var(--s-12) 0; background: var(--bg-soft); }
.authcard { width:100%; max-width: 520px; margin-inline: auto; background:#fff; border-radius: var(--r-xl); box-shadow: var(--sh-md); padding: clamp(24px,4vw,48px); }
.authcard--wide { max-width: 820px; }
.authcard__head { text-align:center; margin-bottom: var(--s-8); }
.authcard__head img { width:56px; margin:0 auto var(--s-4); }
.authcard__head h1 { font-size: var(--fs-h2); margin-bottom: var(--s-2); }
.authcard__head p { color: var(--text-muted); font-size: var(--fs-sm); margin:0; }
.authcard__foot { text-align:center; margin-top: var(--s-6); font-size: var(--fs-sm); color: var(--text-muted); }

/* Singpass mock */
.singpass { background:#fff; border:2px solid #F4333D; border-radius: var(--r-lg); padding: var(--s-6); }
.singpass__logo { font-weight: var(--fw-x); font-size: 1.25rem; color:#F4333D; letter-spacing:-.02em; }
.singpass__logo span { color: var(--ink); }
.singpass__note { background: var(--warn-bg); color:#77560A; font-size: var(--fs-2xs); padding: var(--s-3) var(--s-4); border-radius: var(--r-sm); margin-top: var(--s-4); }

/* ---------- Responsive hardening ---------- */
.dash__in > * { min-width: 0; }
.dash__side { min-width: 0; }
.dash__main { min-width: 0; }
.dashnav { max-width: 100%; }

.dl { min-width: 0; }
/* break-word keeps long values (emails, agency names) inside the column
   without slicing ordinary words down the middle. anywhere did both. */
.dl dt, .dl dd { min-width: 0; overflow-wrap: break-word; }

.hdr__in { min-width: 0; }
.hdr__brand { min-width: 0; max-width: 160px; }
.hdr__brand b { overflow: hidden; text-overflow: ellipsis; }

@media (max-width: 560px) {
  /* Scale the wordmark down rather than hiding it — hiding it left the
     mobile header with no brand at all, just a search icon and a button.
     It is allowed to shrink and ellipsis so it can never push the tools
     off the right edge. */
  .hdr__brand { flex: 0 1 auto; }
  .hdr__brand b { font-size: 1rem; letter-spacing: -.02em; }
  .hdr__in { gap: var(--s-3); }
  /* The avatar is identity enough on a 390px header — dropping the first
     name gives the wordmark the ~80px it needs to render in full. */
  .acct__btn > span.nowrap { display: none; }
  .acct__btn { padding: 6px 10px 6px 6px; }
  .hdr__tools { gap: var(--s-2); }
  .hdr__tools .btn { padding-inline: var(--s-3); font-size: var(--fs-2xs); }
  /* Drops ~26px, which is exactly what the wordmark needs to render in
     full instead of truncating to "Desistor Net…". */
  .hdr__tools .btn .ico { display: none; }
  .sec-head { margin-bottom: var(--s-6); }
  .card { padding: var(--s-5); }  
  .card--flush { padding: 0; }
  .card--flush .card__body { padding: var(--s-5); }
}

@media (max-width: 420px) {
  .stat__value { font-size: 1.75rem; }
  .qr { width: 150px; height: 150px; }
  .btn { font-size: var(--fs-xs); padding-inline: var(--s-4); }
}

/* Wide content always scrolls inside its own box, never the page */
.table-wrap, .tabs, .dashnav, .filterbar { color: var(--teal); font-size: 16px; max-width: 100%; }
.tabs { -webkit-overflow-scrolling: touch; }

.row > * { min-width: 0; }
/* .authcard is deliberately absent — it sets its own 520px / 820px max-width
   and this rule was silently overriding both, stretching every auth card
   to the full 1400px container. */
.card, .stat, .alert { max-width: 100%; }
.alert > div { min-width: 0; overflow-wrap: break-word; }
@media (max-width: 620px) {
  .row--nowrap { flex-wrap: wrap; }
  .row--nowrap.row--keep { flex-wrap: nowrap; }
}

/* Auth pages: centre the card with margin, not a shrink-to-fit grid */
.authpage > .wrap { display: block !important; min-width: 0; }

/* ---------------- Minimal footer (dashboard screens, per lofi) ---------------- */
.ftr--min { background: var(--header-bg); color: var(--text-faint); padding: var(--s-6) 0;
  border-top: 1px solid var(--border-soft); text-align:center; font-size: var(--fs-xs); }
.ftr--min a { color: var(--text-faint); }

/* Dashboard sidebar, per lofi: plain column, no card.
   The rail's tint is carried past the container's left edge by ::before —
   without it the panel stopped at the 1400px container and left a pale
   strip of page background down the left of every dashboard on wide
   screens. */
.dash__side { position: relative; background: var(--header-bg); border-right: 1px solid var(--border-soft);
  margin-left: calc(var(--gutter) * -1); padding: var(--s-8) var(--s-5); }
.dash__side::before { content:''; position:absolute; top:0; bottom:0; right:100%;
  width:100vw; background: var(--header-bg); pointer-events:none; }
.dash__who { background: none; border: 0; padding: 0; text-align: center; margin-bottom: var(--s-8); }
/* Centres the admin shield mark, which was sitting hard left against a
   centred name block. */
.dash__who .avatar, .dash__who > svg { margin: 0 auto var(--s-4); }
.dash__who b { display:block; font-size: 1.375rem; font-weight: var(--fw-x); color: var(--navy); margin-bottom: var(--s-3); }
.dash__who .dnid { display:block; font-size: var(--fs-xs); color: var(--text-muted); font-weight: var(--fw-reg); letter-spacing:0; line-height:1.7; }
.dash__who .note { display:block; font-size: var(--fs-xs); color: var(--text-faint); font-style: italic; margin-top: var(--s-4); }
.dashnav { background: none; border: 0; padding: 0; }
.dashnav a { border-radius: 0; padding: var(--s-4) var(--s-5); font-weight: var(--fw-reg); color: var(--text-muted); }
.dashnav a:hover { background: rgba(35,107,107,.06); color: var(--teal); }
.dashnav a.is-active { background: #fff; color: var(--navy); font-weight: var(--fw-bold);
  box-shadow: inset 3px 0 0 var(--teal); }
.dashnav a.is-active .ico { color: var(--teal); }
.dash__main { padding-block: var(--s-8); }
.dash__head h1 { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem); color: var(--navy); }

/* Welcome banner used on dashboard overviews (per lofi) */
.dashwelcome { background: var(--bg-soft); border-radius: var(--r-lg); padding: clamp(24px,3vw,40px); margin-bottom: var(--s-8); }
.dashwelcome h1 { font-size: clamp(1.5rem, 1.1rem + 1.8vw, 2.25rem); color: var(--navy); margin:0; letter-spacing:-.02em; }
.dashwelcome p { font-size: var(--fs-xs); color: var(--text-muted); margin: var(--s-2) 0 0; }
.dashwelcome p b { color: var(--navy); }

@media (max-width: 1024px) {
  .dash__side { margin-left: 0; border-right: 0; border-bottom: 1px solid var(--border-soft);
    padding: var(--s-5) 0; }
  .dash__who { margin-bottom: var(--s-5); }
  .dashnav a.is-active { box-shadow: inset 0 -3px 0 var(--teal); }
}

/* ---------------- Inner page header ----------------
   UX 15 Sep: "All innerpage header should follow this design — solid curve on
   left and image on right". Same construction as the homepage hero: a solid
   teal block to the chord line plus a circle for the bulge. Measured off the
   approved hi-fi (1920x500 banner): chord at 50.5%, bulge to 53.6%, which is a
   1102px circle (57.4% of the width) with its left edge at -3.8%.
   The breadcrumb sits above the banner on white, as the hi-fi shows. */
.sbanner { padding-top: 0; }
.sbanner > .wrap { padding-inline: 0; max-width: none; }
.sbanner .crumbs {
  max-width: var(--maxw-full); margin: 0 auto; padding: var(--s-3) var(--gutter);
  color: var(--text-muted);
}
.sbanner__box {
  position: relative; overflow: hidden; background: var(--cream-200);
  min-height: clamp(260px, 26vw, 500px);
  display: flex; flex-direction: column; justify-content: center;
  padding: clamp(32px,4vw,64px) 0;
  text-align: left; border-radius: 0;
}
.sbanner__box.xltype { min-height: clamp(260px, 36vw, 80vh); }
.sbanner__box::before, .sbanner__box::after {
  content:''; position:absolute; z-index:1; background: var(--teal);
}
.sbanner__box::before { inset: 0 auto 0 0; width: 50.5%; }
.sbanner__box::after {
  top: 50%; left: 0.2%; width: 57.4%; aspect-ratio: 1;
  border-radius: 50%; transform: translateY(-50%);
}
.sbanner__media { position:absolute; inset:0; z-index:0; }
.sbanner__media img { width:100%; height:100%; object-fit:cover; display:block; }
.sbanner__in {
  position: relative; z-index: 2;
  width: 100%; max-width: var(--maxw-xl); margin-inline: auto;
  padding-inline: var(--gutter); max-width: min(var(--maxw-xl), 100%);
}
.sbanner__in .btn { min-width: 19%; }
.sbanner__box h1 { color: #fff; font-size: var(--fs-h1); font-weight: var(--fw-x); line-height: 0.9; margin-bottom: var(--s-6); max-width: 22ch; }
.sbanner__box h1.xltype { font-size: var(--fs-big); }
/* The teal chord is 50.5% of the banner, so at 1440 the safe text column is
   ~630px. A 46ch measure at 14px was only 320px, which broke the About
   subtitle mid-word at 'ex-convicts'. 56ch at base size reads as the two
   balanced lines the hi-fi shows and still clears the photo edge. */
.sbanner__box p { color: var(--white); max-width: 72ch; margin: 0; text-wrap: pretty; }
@media (max-width: 1599px) {
  .sbanner__box h1 { max-width: 19ch; }
  .sbanner__box p { max-width: 60ch; }
}
@media (max-width: 1399px) {
  .sbanner__box h1 { max-width: 15ch; }
  .sbanner__box p { max-width: 40ch; }
}

@media (max-width: 860px) {
  /* Stacked, in document order: photo band on top, teal panel with the title
     below it. The circle construction only reads at desktop widths, so both
     pseudo-elements come off and the panel paints its own teal — keeping the
     text in normal flow instead of absolutely positioned over the photo. */
  .sbanner__box { min-height: 0; padding: 0; display: block; }
  .sbanner__box::before, .sbanner__box::after { display: none; }
  .sbanner__media { position: static; height: clamp(160px, 34vw, 240px); }
  .sbanner__in { position: static; background: var(--teal); padding-block: clamp(28px,6vw,44px); }
  .sbanner__box h1, .sbanner__box p { max-width: none; }
}

/* Organisation banner — Hi-Fi 16 Sep. Flat teal, centred, no artwork: the
   Partner Detail page is the only inner page that does not use the curve. */
.obanner { background: var(--teal); color:#fff; text-align:center;
  padding: clamp(40px,5vw,72px) 0; }
.obanner__in { max-width: 82ch; margin-inline:auto; padding-inline: var(--gutter); }
/* Hi-Fi 16 Sep: the agency mark is a round badge, not bare initials on teal. */
.obanner__mark { display:inline-grid; place-items:center; width:72px; height:72px;
  margin-bottom: var(--s-4); border-radius:50%; background:#fff; overflow:hidden; }
.obanner__mark svg, .obanner__mark img { width:72px; height:72px; border-radius:50%; display:block; }
.obanner__tag { background:#FDF1ED; color: var(--amber); font-size: var(--fs-3xs); margin-bottom: var(--s-4); padding: 8px 15px; }
.obanner h1 { color:#fff; font-weight: var(--fw-x);  margin-bottom: var(--s-3); }
.obanner__contact { color:#fff; font-size: var(--fw-sm); font-weight: var(--fw-bold);
  margin: 0 0 var(--s-4); max-width:none; }
.obanner__desc { color: rgba(255,255,255,.85); font-size: var(--fs-sm); margin:0; max-width:none; }
@media (max-width:700px){ .obanner__contact { font-size: var(--fs-xs); } }

/* Programme / Event Detail — Hi-Fi 16 Sep. */
.pd__hero { border-radius: var(--r-sm); overflow:hidden; aspect-ratio: 21/8; margin-bottom: clamp(28px,3vw,44px); background: var(--ink-100); }
/* 21:8 is 148px tall on a phone, so the hero takes a squarer ratio there */
@media (max-width: 760px) { .pd__hero { aspect-ratio: 16/10; } }
.pd__hero img { width:100%; height:100%; object-fit:cover; display:block; }
.pd__title { font-size: var(--fs-h2); font-weight: var(--fw-x); color: var(--text-dark); margin-bottom: var(--s-4); }
.pd__list { list-style:none; padding:0; margin:0; }
.pd__list li { position:relative; padding-left: var(--s-5); margin-bottom: var(--s-2); font-size: var(--fs-sm); color: var(--text-muted); }
.pd__list li::before { content:'\2022'; position:absolute; left:4px; color: var(--text-dark); font-weight: var(--fw-x); line-height: 1; top: 3px; }
.pd__list b { color: var(--text); }


/* Programme Information Summary card */
.pis { background: rgba(253, 234, 213, 0.5);
  border-width: 4px 1px 1px 1px;
  border-style: solid;
  border-color: #FFFFFF;
  box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.07);
  border-radius: 12px; overflow:hidden; padding: 20px; }
.pis__h { font-size: var(--fs-sm); font-weight: var(--fw-x); color: var(--teal);
  margin:0; padding: 0 0 var(--s-4);  }
.pis__row { display:grid; grid-template-columns: 1fr 1.25fr; gap: var(--s-4);
  padding: var(--s-4) 0; border-bottom:1px solid #E1E4ED; align-items:start; }
/*.pis__row--alt { background: rgba(255,255,255,.55); }*/
.pis__k { font-size: var(--fs-2xs); font-weight: var(--fw-semi); color: #4B5563; }
.pis__v { font-size: var(--fs-sm); color: var(--text); min-width:0; }
.pis__v b { color: #111827; display: block; font-size: var(--fs-2xs); font-weight: var(--fw-bold); line-height: 1.2; }
/* the pills sit on a near-white row, so they take the stronger peach tint to
   still read as pills rather than as loose coral words */
.pis__v .badge { background: var(--coral); color: #fff; font-size: var(--fs-3xs); text-transform: capitalize; padding: 8px 20px; }
.pis__v small { display:block; font-size: var(--fs-3xs); color: #4B5563; margin-top:2px; }
.pis__foot { padding: var(--s-5) 0; }
.pis__note { display:flex; gap: var(--s-2); align-items:flex-start; margin: var(--s-4) 0 0;
  font-size: var(--fs-4xs); color: #4B5563; max-width:none; }
.pis__note .ico { width:16px; height:16px; flex:none; margin-top:1px; color: #4B5563; }
@media (max-width:520px){ .pis__row { grid-template-columns: 1fr; gap: 2px; } }

/* Global Search — Hi-Fi 16 Sep. */
.gs__bar { display:flex; align-items:center; gap: var(--s-4); flex-wrap: wrap; margin-bottom: var(--s-5); }
.gs__bar .searchbox { flex: 1 1 420px; }
.gs__bar .searchbox .ico { display: none; }
.gs__bar .input { background: #fff; border-color: #E1E4ED; color: var(--teal); font-weight: var(--fw-bold); }
.gs__count { flex: 0 0 auto; margin: 0; font-size: var(--fs-2xs); color: var(--teal); max-width:none; }
.gs__tabs { display:flex; gap: var(--s-3); flex-wrap: wrap; margin-bottom: var(--s-8); }
.gs__tab { border:0; background:none; cursor:pointer; font-family: var(--font);
  font-size: var(--fs-sm); font-weight: var(--fw-semi); color: var(--teal);
  padding: var(--s-3) var(--s-5); 
  border-bottom: 2px solid var(--teal); transition: all var(--t); }
.gs__tab:hover { color: var(--teal); }
.gs__tab.is-active { background: var(--teal); color:#fff; border-bottom-color: var(--teal); }

.gs__list { display:flex; flex-direction:column; gap: var(--s-4); }
.gs__row { display:flex; align-items:center; gap: var(--s-6); padding: var(--s-5) var(--s-6);
  background:#fff; border:1px solid var(--border-soft); border-radius: var(--r-sm);
  text-decoration:none !important; transition: border-color var(--t), background var(--t); }
.gs__row:hover { background: var(--cream); }
.gs__main { flex: 1 1 auto; min-width: 0; }
.gs__head { display:flex; align-items:center; gap: var(--s-3); flex-wrap: wrap; margin-bottom: var(--s-2); }
.gs__head .badge { color: var(--amber); padding: 8px 15px; text-transform: capitalize; }
.gs__title { font-size: var(--fs-sm); font-weight: var(--fw-bold); color: var(--teal); margin: 0; }
.gs__meta { font-size: var(--fs-2xs); color: #64748B; margin: 0 0 6px; max-width:none; }
.gs__desc { font-size: var(--fs-xs); color: #6D758F; margin: 0; max-width: 88ch; }
.gs__cta { flex: 0 0 auto; font-size: var(--fs-xs); font-weight: var(--fw-semi); color: var(--teal);
  text-decoration: underline; text-underline-offset: 4px; white-space: nowrap; }

.gs__refine { background: var(--cream-200); border-radius: var(--r-md); padding: var(--s-5); }
.gs__refine-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); }
.gs__refine .check { color: #353E5C; font-size: var(--fs-xs); margin-bottom: var(--s-2); }
@media (max-width: 760px) {
  .gs__row { flex-direction: column; align-items: flex-start; gap: var(--s-3); }
  .gs__count { order: 3; flex: 1 1 100%; }
}

/* Contact Us — Hi-Fi 16 Sep: a white form card beside a filled teal panel. */
.ct__h { font-size: var(--fs-h3); color: var(--teal); margin: 0 0 var(--s-8); }
.ct__details { background: var(--teal); color:#fff; border-radius: var(--r-lg); font-size: var(--fs-xs); padding: clamp(24px,3vw,36px); }
.ct__details-h { font-size: var(--fs-h3); color:#fff; margin: 0 0 var(--s-5); }
.ct__details a { color: #fff; }
.ct__details a:hover { color: #fff !important; }
.ct__org { font-size: var(--fs-xs); line-height:1.7; margin: 0 0 var(--s-5); max-width:none; }
.ct__list { list-style:none; padding:0; margin: 30px 0 0; }
.ct__list li { margin-bottom: var(--s-3); line-height:1.6; padding-left: 25px; position: relative; }
.ct__list li svg { left: 0; position: absolute; top: 2px; }
.ct__list li b { font-weight: var(--fw-bold); }
.ct__list li span, .ct__list li a { display: inline-block; }
.ct__list .ico { width:18px; height:18px; margin-right: var(--s-2); vertical-align:-2px; color: var(--coral); }

/* Progression pathway — Hi-Fi 16 Sep: four ringed teal discs joined by a
   dashed curve, each captioned with its tier and rule. */
.pathway { display:flex; align-items:flex-start; justify-content:space-between; gap: var(--s-2); flex-wrap: wrap; }
@media (max-width: 991px) { .pathway { justify-content: center; } }
.pathway__step { flex: 0 1 200px; margin-top: 30px; position: relative; text-align:center; }
.pathway__step:before { background: url('../img/line-1.svg') center/contain no-repeat; content: ""; display: block; height:48px; position: absolute; right: -160px; top: 22%; width: 144px; }
@media (max-width: 1399px) { .pathway__step:before { right: -110px; width: 100px; } }
@media (max-width: 1199px) { .pathway__step:before { right: -45px; width: 50px; } }
@media (max-width: 991px) { .pathway__step:before { display:none; } }
.pathway__step:nth-child(even):before { background-image: url('../img/line-2.svg'); }
.pathway__step:last-child:before { display: none; }
.pathway__ring { display:grid; place-items:center; width:120px; height:120px; margin:0 auto var(--s-10);
  border-radius:50%; background: var(--teal); color:#fff;
  box-shadow: 0 0 0 10px var(--teal-050), 0 0 0 20px var(--teal-100); }
.pathway__ico { width:56px; height:56px; }
.pathway__t { font-size: var(--fs-lg); font-weight: var(--fw-semi); color: var(--navy); margin:0 0 4px; }
.pathway__d { color: var(--text-muted); margin:0; max-width:none; }
.pathway__link { background: url('../img/line-1.svg') center/contain no-repeat; flex: 0 1 144px; height:48px; margin-top:60px; align-self:flex-start; }
.pathway .pathway__link:nth-child(even) { background-image: url('../img/line-2.svg'); }
@media (max-width: 900px) { .pathway__link { display:none; } .pathway { gap: var(--s-8); } }

/* A section that sits over a photograph, washed back so type stays readable. */
.section--photo { position:relative; isolation:isolate; }
.section--photo::before { content:''; position:absolute; inset:0; z-index:-2;
  background: var(--photo, none) center/cover no-repeat; }
.section--photo::after { content:''; position:absolute; inset:0; z-index:-1;
  background: rgba(253,234,213,.72); }
.section--photo.hp-contact::after { display: none; }  

/* Homepage enquiry block — Hi-Fi 16 Sep: it sits over the sunset photograph
   with no card behind the form, and the fields are white. */
/* The photograph starts behind the band, as the approved page shows — but the
   band was then sitting on top of the first row of the form. The section is
   pulled up by --lap and the CONTENT is pushed down by the same amount, so the
   overlap is only ever the background. */
/* A CTA band that laps up into the section above it — the About page runs
   the band over the foot of the photograph, as the approved page shows. */
.section--lapup { --lap: clamp(40px,8vw,150px);
  margin-top: calc(-1 * var(--lap)); position: relative; z-index: 1;
  padding-bottom: calc(var(--section-y)/3); padding-top: 0; }
/* the section being lapped carries the clearance, so its own content never
   ends up crowded against the band that overlaps it */
.section--lapped { padding-bottom: calc(clamp(40px,8vw,150px) + var(--section-y)); }

.hp-contact { --lap: clamp(40px,5vw,90px);
  margin-top: calc(-1 * var(--lap));
  padding-top: calc(var(--lap) + clamp(56px,7vw,110px));
  padding-bottom: clamp(56px,7vw,160px); }
.ctaband { position: relative; z-index: 1; }
.hp-contact::after { background: rgba(255,255,255,.28); }
.hp-contact h2 { color: var(--navy); font-weight: var(--fw-x); }
.hp-contact p { max-width: 90%; }
.hp-contact__form .input, .hp-contact__form .textarea { background:#fff; border-color: transparent; }
.hp-contact__form .field > label { color: var(--navy); }
/* The copy sits level with the first field rather than floating at the
   vertical centre of a much taller form. */
.hp-contact__grid { align-items: start; }
.req { color: #E02424; }
@media (min-width: 701px) { .hp-contact__grid > :first-child { padding-top: var(--s-6); } }

/* FAQ list — Hi-Fi 16 Sep: full content width, generously spaced. */
.faq { margin-inline: auto; }
.faq .acc__head { padding: var(--s-5) var(--s-6); font-size: var(--fs-h4); }
.faq .acc__body { padding: var(--s-5) var(--s-6) ; }

/* Split feature row (Mission & Vision / Why Join) */
.feat { display:grid; grid-template-columns: 1fr 1fr; gap: clamp(32px,5vw,80px); align-items:center; }
/* 3/2, not 4/3: at half of a 1320px container a 4/3 block is ~495px tall
   next to three lines of copy, which left the row looking half-empty. */
.feat__media { border-radius: var(--r-sm); overflow:hidden; aspect-ratio: 3/2; background: var(--teal-050); }
.feat__media > svg, .feat__media > img { width:100%; height:100%; object-fit:cover; }
.feat h2 { color: var(--navy); font-weight: var(--fw-x); margin-bottom: var(--s-5); }
.feat ul { padding-left: var(--s-5); }
.feat li { margin-bottom: var(--s-3); }
@media (max-width: 860px) { .feat { grid-template-columns: 1fr; } .feat--flip .feat__media { order:-1; } }

/* Partner CTA band (per lofi, on directory + partner detail) */
/* Same band, used at the foot of the listing pages. It sits inside the
   container in the Hi-Fi rather than bleeding to the viewport edge. */
.pband { background: var(--teal); color:#fff; text-align:center;
  border-radius: clamp(40px,6vw,88px) 0 clamp(40px,6vw,88px) 0;
  padding: clamp(48px,6vw,80px) clamp(24px,4vw,64px);
  width: min(1060px, 100% - 2 * var(--gutter));
  margin: 0 auto clamp(48px,6vw,88px); }
/* the band is already the container, so an inner .wrap must not constrain again */
.pband > .wrap { max-width: none; padding-inline: 0; }
.pband h2 { color:#fff; margin-bottom: var(--s-4); max-width: 46ch; margin-inline:auto; }
.pband p { color: rgba(255,255,255,.85); max-width: 62ch; margin: 0 auto var(--s-8); font-size: var(--fs-sm); }
.pband__btns { display:flex; gap: var(--s-4); justify-content:center; flex-wrap:wrap; }

/* Client 17 Sep: the mobile menu has no room for a dropdown, so the parent
   becomes a small section label and its pages are indented beneath it. */
.mnav__grp {
  font-size: var(--fs-2xs); font-weight: var(--fw-bold); text-transform: uppercase;
  letter-spacing: .06em; color: var(--text-faint);
  margin: var(--s-4) 0 var(--s-1);
}
.mnav__sub { padding-left: var(--s-4) !important; }
