/* ==========================================================================
   Cio Design Engineering Consultancy — design system
   ------------------------------------------------------------------------
   Layer order in this file:
     1. Tokens          — one light palette on bare :root, dark overrides
     2. Theming         — prefers-color-scheme + explicit [data-theme]
     3. Base            — reset, type, focus, links
     4. Primitives      — buttons, fields, badges, pills, tables
     5. Public shell    — nav, hero, sections, cards, footer
     6. Admin shell     — sidebar, topbar, dashboard, cio-* data components
     7. Motion          — entrance + scroll reveal (reduced-motion aware)
     8. Reconciliation  — token-ises the per-page <style> blocks that ship
                          hardcoded light hexes, so they follow the theme.
                          These use an `html ` prefix purely to out-specify a
                          page-level rule that loads after this file.
   Loaded after Bootstrap 5.3. No build step.
   ========================================================================== */

/* ==========================================================================
   1. TOKENS — complete light palette, defined on bare :root
   ========================================================================== */
:root {
  color-scheme: light;

  /* --- Brand ------------------------------------------------------------ */
  /* Taken from the logo. --brand is a FILL (white text sits on it);
     --brand-fg is green as TEXT on the page background. They are separate
     roles because a colour that works as a button cannot also be a link. */
  --brand:        #0e7c52;
  --brand-600:    #0c6b47;
  --brand-700:    #0a5739;
  --brand-fg:     #0b6a46;
  --on-brand:     #ffffff;
  --accent:       #f5a524;
  --accent-600:   #e0921a;
  --accent-fg:    #8a5b06;

  /* Derived tints. Hex first as the fallback, color-mix second so the tint
     tracks the surface automatically in either theme. */
  --brand-soft:   #e8f3ee;
  --brand-soft:   color-mix(in srgb, var(--brand) 14%, var(--surface));
  --brand-tint:   #f1f8f4;
  --brand-tint:   color-mix(in srgb, var(--brand) 7%, var(--surface));
  --brand-line:   #c8e0d3;
  --brand-line:   color-mix(in srgb, var(--brand) 28%, var(--surface));
  --accent-soft:  #fdf0d8;
  --accent-soft:  color-mix(in srgb, var(--accent) 20%, var(--surface));

  /* --- Semantic --------------------------------------------------------- */
  --ok:        #0e6e48;
  --ok-fg:     #0b6a46;
  --ok-soft:   #e6f4ec;
  --ok-soft:   color-mix(in srgb, var(--ok) 12%, var(--surface));
  --danger:    #dc2626;
  --danger-fg: #b3261e;
  --danger-soft: #fdecec;
  --danger-soft: color-mix(in srgb, var(--danger) 11%, var(--surface));
  --warn:      #c07f10;
  --warn-fg:   #8a5b06;
  --warn-soft: #fdf3dd;
  --warn-soft: color-mix(in srgb, var(--warn) 15%, var(--surface));
  --info:      #1f6feb;
  --info-fg:   #1d4f9c;
  --info-soft: #e8f0fd;
  --info-soft: color-mix(in srgb, var(--info) 11%, var(--surface));

  /* --- Neutrals / surfaces ---------------------------------------------- */
  --ink:          #0c1a14;   /* headings */
  --ink-700:      #16271f;
  --ink-600:      #25392f;   /* strong body, field labels */
  --body:         #46544c;   /* body copy */
  /* Both de-emphasis steps clear AA on every light surface they land on —
     --surface #fff, --surface-2 #f8faf9, --bg #f5f8f6, --bg-2 #eef3f0 — which
     is what compresses the gap between them to ~0.6 of a ratio point. */
  --muted:        #5c6861;   /* secondary copy       — 5.82 / 5.55 / 5.44 / 5.19 */
  --dim:          #666f6a;   /* placeholders, de-emph — 5.19 / 4.95 / 4.85 / 4.62 */

  --line:         #e4eae6;
  --line-strong:  #d2ddd7;
  /* Boundary of an interactive control (WCAG 1.4.11 wants 3:1). Kept apart
     from --line-strong so raising it does not thicken every hairline. */
  --field-line:   #868d89;
  --bg:           #f5f8f6;   /* page */
  --bg-2:         #eef3f0;   /* inset / sunken */
  --surface:      #ffffff;   /* card */
  --surface-2:    #f8faf9;   /* card sub-panel */
  --surface-3:    #ffffff;   /* popovers, dialogs */

  /* Dark chrome. In light this is near-black; in dark it is the *sidebar*
     colour, which must stay distinct from both the page and the cards.
     Never use --ink as a background — it inverts. */
  --shell:        #0c1a14;
  --shell-2:      #10221a;
  --shell-line:   rgba(255,255,255,.07);
  --shell-fg:     #aebcb4;
  --shell-fg-dim: #76867d;
  --shell-fg-hi:  #ffffff;

  /* --- Elevation -------------------------------------------------------- */
  /* One umbra colour + one strength multiplier = a single shadow family. */
  --umbra: 12 26 20;
  --shadow-k: 1;
  --shadow-xs: 0 1px 1px rgb(var(--umbra) / calc(.05 * var(--shadow-k)));
  --shadow-sm: 0 1px 2px rgb(var(--umbra) / calc(.05 * var(--shadow-k))),
               0 2px 6px -2px rgb(var(--umbra) / calc(.08 * var(--shadow-k)));
  --shadow-md: 0 2px 4px -1px rgb(var(--umbra) / calc(.05 * var(--shadow-k))),
               0 10px 26px -8px rgb(var(--umbra) / calc(.16 * var(--shadow-k)));
  --shadow-lg: 0 4px 8px -2px rgb(var(--umbra) / calc(.06 * var(--shadow-k))),
               0 24px 50px -16px rgb(var(--umbra) / calc(.26 * var(--shadow-k)));
  --shadow-xl: 0 8px 16px -4px rgb(var(--umbra) / calc(.07 * var(--shadow-k))),
               0 44px 84px -26px rgb(var(--umbra) / calc(.36 * var(--shadow-k)));
  --shadow:    var(--shadow-md);           /* legacy alias */
  --shadow-brand: 0 6px 16px -8px rgb(var(--umbra) / calc(.5 * var(--shadow-k)));

  /* --- Focus ------------------------------------------------------------ */
  --focus: #0e7c52;
  --focus-halo: rgba(14,124,82,.22);
  --ring: 0 0 0 3px var(--focus-halo);

  /* --- Radii ------------------------------------------------------------ */
  --r-1: 8px;
  --r-2: 12px;
  --r-3: 16px;
  --r-4: 22px;
  --r-5: 28px;
  --r-pill: 999px;
  --radius:    var(--r-3);   /* legacy alias */
  --radius-sm: var(--r-2);
  --radius-lg: var(--r-5);

  /* --- Spacing (4px base) ----------------------------------------------- */
  --sp-1: 4px;   --sp-2: 8px;   --sp-3: 12px;  --sp-4: 16px;
  --sp-5: 20px;  --sp-6: 24px;  --sp-7: 28px;  --sp-8: 32px;
  --sp-10: 40px; --sp-12: 48px; --sp-16: 64px; --sp-20: 80px; --sp-24: 96px;

  /* --- Type ------------------------------------------------------------- */
  --font-display: 'Space Grotesk', 'Segoe UI', Roboto, system-ui, sans-serif;
  --font-body:    'Inter', 'Segoe UI', Roboto, system-ui, Arial, sans-serif;
  --font-mono:    'Cascadia Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* Fluid scale, ratio ~1.2, fluid from 380px to 1280px viewport */
  --fs-3xs:  .6875rem;                                   /* 11 */
  --fs-2xs:  .75rem;                                     /* 12 */
  --fs-xs:   .8125rem;                                   /* 13 */
  --fs-sm:   .875rem;                                    /* 14 */
  --fs-base: 1rem;                                       /* 16 */
  --fs-md:   clamp(1.0625rem, 1.03rem + .16vw, 1.125rem);
  --fs-lg:   clamp(1.125rem, 1.06rem + .3vw, 1.3rem);
  --fs-xl:   clamp(1.28rem, 1.16rem + .52vw, 1.6rem);
  --fs-2xl:  clamp(1.5rem, 1.28rem + 1vw, 2.1rem);
  --fs-3xl:  clamp(1.9rem, 1.45rem + 1.9vw, 2.85rem);
  --fs-4xl:  clamp(2.4rem, 1.5rem + 3.4vw, 4rem);

  --lh-tight: 1.12;
  --lh-snug:  1.3;
  --lh-body:  1.62;
  --tracking-display: -.022em;
  --tracking-caps: .12em;

  /* --- Motion ----------------------------------------------------------- */
  --ease:        cubic-bezier(.2, .6, .35, 1);
  --ease-out:    cubic-bezier(.16, 1, .3, 1);
  --ease-spring: cubic-bezier(.34, 1.3, .64, 1);
  --dur-1: 110ms;
  --dur-2: 180ms;
  --dur-3: 280ms;
  --dur-4: 460ms;

  /* --- Layout ----------------------------------------------------------- */
  --container: 1180px;
  --nav-h: 74px;
  --side-w: 264px;

  /* --- Bootstrap bridge ------------------------------------------------- */
  --bs-primary: var(--brand);
  --bs-primary-rgb: 14,124,82;
  --bs-link-color: var(--brand-fg);
  --bs-link-hover-color: var(--brand-700);
  --bs-border-radius: var(--r-2);
  --bs-border-color: var(--line);
  --bs-body-font-family: var(--font-body);
  --bs-body-color: var(--body);
  --bs-body-bg: var(--bg);
}

/* ==========================================================================
   2. THEMING
   Only token values change below. Every token above already has a value on
   bare :root, so nothing depends on a media query to exist.
   ========================================================================== */

/* System preference — loses to an explicit light choice. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;

    --brand:      #10845b;
    --brand-600:  #0f7954;
    --brand-700:  #0b6a46;
    --brand-fg:   #56dda6;
    --on-brand:   #ffffff;
    --accent:     #f5b23f;
    --accent-600: #e0921a;
    --accent-fg:  #f0be6a;

    --brand-soft: color-mix(in srgb, var(--brand) 20%, var(--surface));
    --brand-tint: color-mix(in srgb, var(--brand) 11%, var(--surface));
    --brand-line: color-mix(in srgb, var(--brand) 34%, var(--surface));
    --accent-soft: color-mix(in srgb, var(--accent) 20%, var(--surface));

    --ok:        #21a877;
    --ok-fg:     #56dda6;
    --ok-soft:   color-mix(in srgb, var(--ok) 20%, var(--surface));
    --danger:    #e04545;
    --danger-fg: #ff8f86;
    --danger-soft: color-mix(in srgb, var(--danger) 20%, var(--surface));
    --warn:      #d99a1f;
    --warn-fg:   #f0be6a;
    --warn-soft: color-mix(in srgb, var(--warn) 20%, var(--surface));
    --info:      #4a8dff;
    --info-fg:   #85b4ff;
    --info-soft: color-mix(in srgb, var(--info) 20%, var(--surface));

    --ink:         #edf4f0;
    --ink-700:     #dbe6e0;
    --ink-600:     #c3d0c9;
    --body:        #a7b7ae;
    --muted:       #9aa8a1;
    --dim:         #89968f;

    --line:        #3b5046;
    --line-strong: #4e655a;
    --field-line:  #64726a;
    --bg:          #050907;
    --bg-2:        #0c1310;
    --surface:     #1a2620;
    --surface-2:   #212e28;
    --surface-3:   #26342d;

    --shell:        #101815;
    --shell-2:      #16211c;
    --shell-line:   rgba(255,255,255,.08);
    --shell-fg:     #a7b7ae;
    --shell-fg-dim: #7f9188;
    --shell-fg-hi:  #ffffff;

    --umbra: 0 0 0;
    --shadow-k: 2.6;

    --focus: #56dda6;
    --focus-halo: rgba(86,221,166,.26);

    --bs-primary: var(--brand);
    --bs-primary-rgb: 18,153,106;
    --bs-link-color: var(--brand-fg);
    --bs-link-hover-color: var(--brand-fg);
    --bs-border-color: var(--line);
    --bs-body-color: var(--body);
    --bs-body-bg: var(--bg);
  }
}

/* Explicit choice — wins over the system preference in both directions. */
:root[data-theme="dark"] {
  color-scheme: dark;

  --brand:      #10845b;
  --brand-600:  #0f7954;
  --brand-700:  #0b6a46;
  --brand-fg:   #56dda6;
  --on-brand:   #ffffff;
  --accent:     #f5b23f;
  --accent-600: #e0921a;
  --accent-fg:  #f0be6a;

  --brand-soft: color-mix(in srgb, var(--brand) 20%, var(--surface));
  --brand-tint: color-mix(in srgb, var(--brand) 11%, var(--surface));
  --brand-line: color-mix(in srgb, var(--brand) 34%, var(--surface));
  --accent-soft: color-mix(in srgb, var(--accent) 20%, var(--surface));

  --ok:        #21a877;
  --ok-fg:     #56dda6;
  --ok-soft:   color-mix(in srgb, var(--ok) 20%, var(--surface));
  --danger:    #e04545;
  --danger-fg: #ff8f86;
  --danger-soft: color-mix(in srgb, var(--danger) 20%, var(--surface));
  --warn:      #d99a1f;
  --warn-fg:   #f0be6a;
  --warn-soft: color-mix(in srgb, var(--warn) 20%, var(--surface));
  --info:      #4a8dff;
  --info-fg:   #85b4ff;
  --info-soft: color-mix(in srgb, var(--info) 20%, var(--surface));

  --ink:         #edf4f0;
  --ink-700:     #dbe6e0;
  --ink-600:     #c3d0c9;
  --body:        #a7b7ae;
  --muted:       #9aa8a1;
  --dim:         #89968f;

  --line:        #3b5046;
  --line-strong: #4e655a;
  --field-line:  #64726a;
  --bg:          #050907;
  --bg-2:        #0c1310;
  --surface:     #1a2620;
  --surface-2:   #212e28;
  --surface-3:   #26342d;

  --shell:        #101815;
  --shell-2:      #16211c;
  --shell-line:   rgba(255,255,255,.08);
  --shell-fg:     #a7b7ae;
  --shell-fg-dim: #7f9188;
  --shell-fg-hi:  #ffffff;

  --umbra: 0 0 0;
  --shadow-k: 2.6;

  --focus: #56dda6;
  --focus-halo: rgba(86,221,166,.26);

  --bs-primary: var(--brand);
  --bs-primary-rgb: 18,153,106;
  --bs-link-color: var(--brand-fg);
  --bs-link-hover-color: var(--brand-fg);
  --bs-border-color: var(--line);
  --bs-body-color: var(--body);
  --bs-body-bg: var(--bg);
}

/* ==========================================================================
   3. BASE
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scrollbar-color: var(--line-strong) transparent;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: var(--lh-body);
  color: var(--body);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-optical-sizing: auto;
  font-feature-settings: 'cv05' 1, 'cv11' 1, 'ss01' 1;
  transition: background-color var(--dur-3) var(--ease), color var(--dur-3) var(--ease);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--ink);
  line-height: var(--lh-tight);
  font-weight: 600;
  margin: 0 0 .5em;
  letter-spacing: var(--tracking-display);
  text-wrap: balance;
}
h1 { font-size: var(--fs-3xl); }
h2 { font-size: var(--fs-2xl); }
h3 { font-size: var(--fs-xl); letter-spacing: -.015em; }
h4 { font-size: var(--fs-lg); letter-spacing: -.01em; }
h5, h6 { font-size: var(--fs-md); letter-spacing: -.005em; }

p { margin: 0 0 1rem; text-wrap: pretty; }

a {
  color: var(--brand-fg);
  text-decoration: none;
  transition: color var(--dur-1) var(--ease);
}
a:hover { color: var(--brand-700); }

img { max-width: 100%; height: auto; display: block; }
hr { border: 0; border-top: 1px solid var(--line); opacity: 1; margin: var(--sp-6) 0; }

::selection { background: var(--brand); color: var(--on-brand); }

/* Numerals line up in every data context. */
.table, .cio-table, .num, .v, .tx-kpi__val, .cio-kpi__value, .stat-card .v {
  font-variant-numeric: tabular-nums;
}

/* Focus: a real outline (survives forced-colors / Windows high contrast)
   plus a soft halo so it reads on both light and dark surfaces. */
:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  box-shadow: var(--ring);
  border-radius: var(--r-1);
}
:focus:not(:focus-visible) { outline: none; }
/* Fields swap the outline for a border + halo; Windows high-contrast strips
   both, so put the outline back there. */
@media (forced-colors: active) {
  .field input:focus, .field select:focus, .field textarea:focus,
  .dash-search input:focus, .form-control:focus, .form-select:focus {
    outline: 2px solid Highlight; outline-offset: 1px;
  }
  .dash-nav a.active { forced-color-adjust: none; }
}

.skip-link {
  position: absolute; inset-inline-start: -999px; inset-block-start: 0; z-index: 2000;
  background: var(--shell); color: #fff;
  padding: var(--sp-3) var(--sp-5);
  border-radius: 0 0 var(--r-2) 0;
  font-weight: 600;
}
.skip-link:focus { inset-inline-start: 0; color: #fff; }

.container-x {
  width: 100%; max-width: var(--container); margin-inline: auto;
  padding-inline: var(--sp-6);
}

/* ==========================================================================
   4. PRIMITIVES
   ========================================================================== */

/* --- Theme toggle (public nav + admin topbar) ----------------------------- */
.theme-toggle {
  --tt-size: 38px;
  inline-size: var(--tt-size); block-size: var(--tt-size);
  flex: none; display: inline-grid; place-items: center;
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  font-size: 1rem;
  padding: 0;
  transition: color var(--dur-2) var(--ease), border-color var(--dur-2) var(--ease),
              background-color var(--dur-2) var(--ease);
}
.theme-toggle:hover { color: var(--brand-fg); border-color: var(--brand-line); background: var(--brand-tint); }
.theme-toggle i {
  grid-area: 1 / 1;
  transition: opacity var(--dur-2) var(--ease), transform var(--dur-3) var(--ease-spring);
}
.theme-toggle .tt-moon { opacity: 0; transform: rotate(-45deg) scale(.6); }
.theme-toggle .tt-sun  { opacity: 1; transform: none; }
:root[data-theme="dark"] .theme-toggle .tt-moon { opacity: 1; transform: none; }
:root[data-theme="dark"] .theme-toggle .tt-sun  { opacity: 0; transform: rotate(45deg) scale(.6); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .tt-moon { opacity: 1; transform: none; }
  :root:not([data-theme="light"]) .theme-toggle .tt-sun  { opacity: 0; transform: rotate(45deg) scale(.6); }
}
/* Sitting on dark chrome (admin sidebar / dark hero bars) */
.theme-toggle--onshell {
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.14);
  color: var(--shell-fg);
}
.theme-toggle--onshell:hover {
  background: rgba(255,255,255,.12);
  border-color: rgba(255,255,255,.28);
  color: #fff;
}

/* --- Buttons -------------------------------------------------------------- */
.btn {
  --bs-btn-border-radius: var(--radius-sm);
  --btn-bg: transparent;
  --btn-fg: var(--ink-600);
  --btn-bd: transparent;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--fs-sm);
  line-height: 1.25;
  border-radius: var(--radius-sm);
  padding: .68rem 1.3rem;
  letter-spacing: .005em;
  border: 1.5px solid var(--btn-bd);
  background: var(--btn-bg);
  color: var(--btn-fg);
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  transition: transform var(--dur-1) var(--ease),
              box-shadow var(--dur-2) var(--ease),
              background-color var(--dur-2) var(--ease),
              border-color var(--dur-2) var(--ease),
              color var(--dur-2) var(--ease);
}
.btn i { font-size: 1.05em; line-height: 0; }      /* optical: icon sits on the text baseline */
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(1px) scale(.995); transition-duration: 60ms; }
.btn:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; box-shadow: var(--ring); }
.btn:disabled, .btn.disabled, .btn[aria-disabled="true"] {
  opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; filter: saturate(.6);
}
.btn-lg { padding: .92rem 1.8rem; font-size: var(--fs-md); }
.btn-sm { padding: .48rem 1rem; font-size: var(--fs-xs); }

.btn-brand, .btn-primary, .btn-success {
  --btn-bg: var(--brand); --btn-bd: var(--brand); --btn-fg: var(--on-brand);
  box-shadow: var(--shadow-brand);
}
.btn-brand:hover, .btn-primary:hover, .btn-success:hover {
  --btn-bg: var(--brand-600); --btn-bd: var(--brand-600); --btn-fg: var(--on-brand);
  box-shadow: var(--shadow-md);
}
.btn-accent {
  --btn-bg: var(--accent); --btn-bd: var(--accent); --btn-fg: #2a1d05;
  box-shadow: var(--shadow-brand);
}
.btn-accent:hover { --btn-bg: var(--accent-600); --btn-bd: var(--accent-600); --btn-fg: #2a1d05; }

.btn-outline-brand, .btn-outline-primary {
  --btn-bg: transparent; --btn-bd: var(--brand-line); --btn-fg: var(--brand-fg);
}
.btn-outline-brand:hover, .btn-outline-primary:hover {
  --btn-bg: var(--brand); --btn-bd: var(--brand); --btn-fg: var(--on-brand);
}
.btn-ghost {
  --btn-bg: rgba(255,255,255,.08); --btn-bd: rgba(255,255,255,.3); --btn-fg: #fff;
  backdrop-filter: blur(6px);
}
.btn-ghost:hover { --btn-bg: rgba(255,255,255,.18); --btn-bd: rgba(255,255,255,.6); --btn-fg: #fff; }
.btn-outline-secondary {
  --btn-bg: var(--surface); --btn-bd: var(--line-strong); --btn-fg: var(--ink-600);
}
.btn-outline-secondary:hover {
  --btn-bg: var(--ink-600); --btn-bd: var(--ink-600); --btn-fg: var(--surface);
}
.btn-danger { --btn-bg: var(--danger); --btn-bd: var(--danger); --btn-fg: #fff; }
.btn-danger:hover {
  --btn-fg: #fff;
  --btn-bg: color-mix(in srgb, var(--danger) 82%, #000);
  --btn-bd: color-mix(in srgb, var(--danger) 82%, #000);
}

/* --- Form fields ---------------------------------------------------------- */
.field { margin-bottom: 1.05rem; }
.field label {
  display: block; font-size: var(--fs-sm); font-weight: 600;
  color: var(--ink-600); margin-bottom: .4rem;
  transition: color var(--dur-2) var(--ease);
}
.field-control { position: relative; }
.field-control .fic {
  position: absolute; inset-inline-start: 14px; inset-block-start: 50%;
  transform: translateY(-50%); color: var(--dim); font-size: 1rem;
  pointer-events: none; transition: color var(--dur-2) var(--ease);
}
.field input, .field select, .field textarea {
  inline-size: 100%;
  border: 1.5px solid var(--field-line);
  border-radius: var(--r-2);
  padding: .72rem .9rem;
  font-family: var(--font-body); font-size: var(--fs-base);
  color: var(--ink); background: var(--surface);
  transition: border-color var(--dur-2) var(--ease), box-shadow var(--dur-2) var(--ease),
              background-color var(--dur-2) var(--ease);
}
/* Placeholder text is text: it must clear AA wherever it lands, including on
   controls that carry no class of their own (a bare <textarea> in an admin
   page block fell back to the UA grey at 3.40:1 in dark). */
input::placeholder, textarea::placeholder { color: var(--dim); opacity: 1; }
.field input::placeholder, .field textarea::placeholder { color: var(--dim); }
.field-control--icon input { padding-inline-start: 2.6rem; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--muted); }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--brand); box-shadow: var(--ring);
}
.field input:disabled, .field select:disabled, .field textarea:disabled {
  background: var(--bg-2); color: var(--muted); cursor: not-allowed; border-color: var(--line);
}
.field textarea { resize: vertical; min-block-size: 120px; line-height: 1.55; }
.field .hint { font-size: var(--fs-xs); color: var(--muted); margin-top: .35rem; }
/* :has() — the whole field reacts, not just the input */
.field:has(input:focus, select:focus, textarea:focus) > label { color: var(--brand-fg); }
.field:has(input:focus, textarea:focus) .fic { color: var(--brand); }
.field:has(input:disabled, select:disabled, textarea:disabled) > label { color: var(--muted); }
.field:has(input:user-invalid, textarea:user-invalid) > label { color: var(--danger-fg); }
.field input:user-invalid, .field textarea:user-invalid { border-color: var(--danger); }

.field .toggle-pass {
  position: absolute; inset-inline-end: 8px; inset-block-start: 50%;
  transform: translateY(-50%);
  background: none; border: 0; color: var(--muted); cursor: pointer;
  padding: 6px; font-size: 1.05rem; border-radius: var(--r-1); line-height: 0;
}
.field .toggle-pass:hover { color: var(--brand-fg); background: var(--brand-tint); }
.field-check { display: flex; align-items: center; gap: .5rem; font-size: var(--fs-sm); color: var(--ink-600); cursor: pointer; }
.field-check input { inline-size: 16px; block-size: 16px; accent-color: var(--brand); }

/* Bootstrap form controls used directly on admin pages */
.form-control, .form-select {
  background-color: var(--surface);
  border-color: var(--field-line);
  color: var(--ink);
  border-radius: var(--r-1);
  transition: border-color var(--dur-2) var(--ease), box-shadow var(--dur-2) var(--ease);
}
.form-control::placeholder { color: var(--dim); }
.form-control:focus, .form-select:focus {
  background-color: var(--surface); color: var(--ink);
  border-color: var(--brand); box-shadow: var(--ring);
}
.form-control:disabled, .form-select:disabled { background-color: var(--bg-2); color: var(--muted); }

.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px var(--sp-6); }
.form-grid .full { grid-column: 1 / -1; }
.form-actions { display: flex; gap: var(--sp-3); flex-wrap: wrap; margin-top: var(--sp-4); align-items: center; }
@media (max-width: 760px) { .form-grid { grid-template-columns: 1fr; } }

/* --- Flash messages ------------------------------------------------------- */
.flash-msg {
  display: flex; align-items: center; gap: .6rem;
  padding: .7rem .95rem; border-radius: var(--r-2); margin-bottom: var(--sp-3);
  font-size: var(--fs-sm); font-weight: 500;
  border: 1px solid transparent;
  animation: cd-drop var(--dur-3) var(--ease-out) both;
}
.flash-msg i { font-size: 1.05rem; }
.flash-success { background: var(--ok-soft);     border-color: color-mix(in srgb, var(--ok) 30%, transparent);     color: var(--ok-fg); }
.flash-danger  { background: var(--danger-soft); border-color: color-mix(in srgb, var(--danger) 30%, transparent); color: var(--danger-fg); }
.flash-warning { background: var(--warn-soft);   border-color: color-mix(in srgb, var(--warn) 30%, transparent);   color: var(--warn-fg); }
.flash-info    { background: var(--info-soft);   border-color: color-mix(in srgb, var(--info) 30%, transparent);   color: var(--info-fg); }

/* --- Status badges -------------------------------------------------------- */
.badge-soft {
  display: inline-flex; align-items: center; gap: .35rem;
  font-size: var(--fs-2xs); font-weight: 600; line-height: 1.5;
  padding: .18rem .58rem; border-radius: var(--r-pill); white-space: nowrap;
  background: var(--bg-2); color: var(--ink-600);
  border: 1px solid transparent;
}
.st-draft     { background: var(--bg-2);       color: var(--ink-600); border-color: var(--line); }
.st-sent      { background: var(--info-soft);   color: var(--info-fg); }
.st-accepted  { background: var(--ok-soft);     color: var(--ok-fg); }
.st-rejected  { background: var(--danger-soft); color: var(--danger-fg); }
.st-expired   { background: var(--warn-soft);   color: var(--warn-fg); }
.st-ongoing   { background: var(--info-soft);   color: var(--info-fg); }
.st-completed { background: var(--ok-soft);     color: var(--ok-fg); }
.st-on-hold   { background: var(--warn-soft);   color: var(--warn-fg); }
.st-published { background: var(--ok-soft);     color: var(--ok-fg); }
.st-public    { background: var(--ok-soft);     color: var(--ok-fg); }
.st-private   { background: var(--bg-2);        color: var(--ink-600); border-color: var(--line); }
.st-unread    { background: var(--danger-soft); color: var(--danger-fg); }
.st-read      { background: var(--bg-2);        color: var(--ink-600); border-color: var(--line); }

.pill {
  display: inline-flex; align-items: center; gap: .35rem;
  font-size: var(--fs-2xs); font-weight: 600;
  padding: .2rem .58rem; border-radius: var(--r-pill);
}
.pill--admin { background: var(--brand-soft); color: var(--brand-fg); }

/* --- Bootstrap table ------------------------------------------------------ */
.table {
  --bs-table-color: var(--body);
  --bs-table-bg: transparent;
  --bs-table-border-color: var(--line);
  color: var(--body); margin: 0;
}
.table thead th {
  font-size: var(--fs-2xs); letter-spacing: .07em; text-transform: uppercase;
  color: var(--muted); border-bottom: 1px solid var(--line);
  font-weight: 700; background: transparent;
}
.table tbody td { border-bottom: 1px solid var(--line); vertical-align: middle; padding: .8rem .75rem; color: var(--body); }
.table tbody tr:last-child td { border-bottom: 0; }

/* ==========================================================================
   5. PUBLIC SHELL
   ========================================================================== */

/* --- Navigation ----------------------------------------------------------- */
.site-nav {
  position: sticky; inset-block-start: 0; z-index: 1000;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: box-shadow var(--dur-3) var(--ease), border-color var(--dur-3) var(--ease),
              background-color var(--dur-3) var(--ease);
}
@supports not (backdrop-filter: blur(4px)) { .site-nav { background: var(--surface); } }
.site-nav.is-scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 1px 0 var(--line), var(--shadow-sm);
}
.site-nav__inner {
  max-width: var(--container); margin-inline: auto; padding-inline: var(--sp-6);
  block-size: var(--nav-h); display: flex; align-items: center; gap: var(--sp-6);
}

.brand { display: inline-flex; align-items: center; gap: .6rem; font-family: var(--font-display); }
.brand__logo {
  inline-size: 42px; block-size: 42px; border-radius: var(--r-2); flex: none;
  background: #fff; object-fit: contain; padding: 2px;
  border: 1px solid var(--line); box-shadow: var(--shadow-sm);
}
.footer-logo { display: inline-block; background: #fff; border-radius: var(--r-2); padding: 10px 14px; }
.footer-logo img { max-width: 280px; }
.brand__mark {
  inline-size: 38px; block-size: 38px; border-radius: var(--r-2);
  background: linear-gradient(140deg, var(--brand), var(--brand-700));
  color: #fff; display: grid; place-items: center; font-size: 1.15rem;
  box-shadow: var(--shadow-sm);
}
.brand__text {
  font-size: 1.28rem; font-weight: 600; color: var(--ink);
  letter-spacing: -.022em; line-height: 1.05;
}
.brand__text strong { color: var(--brand-fg); font-weight: 700; }
.brand__text small {
  display: block; font-size: .58rem; font-weight: 600; letter-spacing: .16em;
  text-transform: uppercase; color: var(--muted);
  font-family: var(--font-body); margin-top: 2px;
}
.brand--light .brand__text { color: #fff; }
.brand--light .brand__text strong { color: var(--accent); }
.brand--light .brand__text small { color: var(--shell-fg-dim); }

.nav-menu { margin-inline-start: auto; display: flex; align-items: center; gap: .9rem; }
.nav-links { list-style: none; display: flex; align-items: center; gap: .15rem; margin: 0; padding: 0; }
.nav-link {
  position: relative;
  font-weight: 500; font-size: var(--fs-sm); color: var(--ink-600);
  padding: .55rem .8rem; border-radius: var(--r-1); background: none; border: 0;
  cursor: pointer; display: inline-flex; align-items: center; gap: .35rem;
  font-family: var(--font-body);
  transition: color var(--dur-2) var(--ease), background-color var(--dur-2) var(--ease);
}
.nav-link:hover { color: var(--brand-fg); background: var(--brand-tint); }
.nav-link.active { color: var(--ink); font-weight: 600; }
/* Active marker: a short amber rule, not a full underline */
.nav-link.active::after {
  content: ""; position: absolute; inset-inline: .8rem; inset-block-end: .18rem;
  block-size: 2px; border-radius: 2px; background: var(--accent);
  transform: scaleX(0); transform-origin: center;
  animation: cd-underline var(--dur-4) var(--ease-out) both;
}

.nav-admin {
  inline-size: 38px; block-size: 38px; border-radius: var(--r-2); flex: none;
  display: grid; place-items: center; color: var(--muted); font-size: 1.05rem;
  transition: color var(--dur-2) var(--ease), background-color var(--dur-2) var(--ease);
}
.nav-admin:hover { color: var(--brand-fg); background: var(--brand-tint); }

.nav-tools { display: inline-flex; align-items: center; gap: .35rem; }

.nav-toggle {
  margin-inline-start: auto; inline-size: 44px; block-size: 44px;
  border: 1px solid var(--line); border-radius: var(--r-2);
  background: var(--surface); display: none;
  flex-direction: column; gap: 5px; align-items: center; justify-content: center; cursor: pointer;
}
.nav-toggle span {
  inline-size: 20px; block-size: 2px; background: var(--ink); border-radius: 2px;
  transition: transform var(--dur-2) var(--ease), opacity var(--dur-1) var(--ease);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 920px) {
  .nav-toggle { display: flex; order: 3; }
  .nav-menu {
    position: fixed; inset: var(--nav-h) 0 auto 0;
    flex-direction: column; align-items: stretch;
    background: var(--surface); border-bottom: 1px solid var(--line);
    padding: var(--sp-4) var(--sp-6) var(--sp-6); gap: .4rem; margin: 0;
    box-shadow: var(--shadow-lg); max-block-size: calc(100vh - var(--nav-h)); overflow-y: auto;
    transform: translateY(-10px); opacity: 0; pointer-events: none;
    transition: transform var(--dur-3) var(--ease-out), opacity var(--dur-2) var(--ease);
  }
  .nav-menu.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .nav-links { flex-direction: column; align-items: stretch; gap: .1rem; }
  .nav-link { padding: .8rem .9rem; font-size: var(--fs-base); }
  .nav-link.active::after { inset-inline: auto; inset-inline-start: .9rem; inline-size: 20px; }
  .nav-cta .btn { inline-size: 100%; justify-content: center; }
  .nav-tools { align-self: flex-end; }
}

/* --- Section scaffolding -------------------------------------------------- */
.section { padding-block: var(--sp-24); }
.section--tint { background: var(--bg-2); }
.section--ink { background: var(--shell); color: var(--shell-fg); }
.section-head { max-width: 660px; margin: 0 0 var(--sp-12); }
.section-head.center { margin-inline: auto; text-align: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: .5rem; font-family: var(--font-body);
  font-size: var(--fs-2xs); font-weight: 700; letter-spacing: var(--tracking-caps);
  text-transform: uppercase; color: var(--brand-fg); margin-bottom: .9rem;
}
.eyebrow::before { content: ""; inline-size: 26px; block-size: 2px; background: var(--accent); border-radius: 2px; }
.section-head h2 { font-size: var(--fs-3xl); margin-bottom: .5rem; }
.section-head p { font-size: var(--fs-md); color: var(--muted); }
.section--ink .section-head h2 { color: #fff; }
.section--ink .eyebrow { color: var(--accent); }

/* --- Hero ----------------------------------------------------------------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(1100px 520px at 88% -8%, rgba(14,124,82,.42), transparent 62%),
    radial-gradient(760px 480px at 2% 108%, rgba(245,165,36,.16), transparent 60%),
    var(--shell);
  color: #d6e0db;
}
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(900px 540px at 30% 30%, #000 55%, transparent 100%);
          mask-image: radial-gradient(900px 540px at 30% 30%, #000 55%, transparent 100%);
}
.hero__inner {
  position: relative; max-width: var(--container); margin-inline: auto;
  padding: var(--sp-20) var(--sp-6) var(--sp-24);
  display: grid; grid-template-columns: 1.05fr .95fr; gap: var(--sp-16); align-items: center;
}
.hero__eyebrow {
  display: inline-flex; align-items: center; gap: .55rem; padding: .42rem .85rem;
  border: 1px solid rgba(255,255,255,.18); border-radius: var(--r-pill);
  background: rgba(255,255,255,.04);
  font-size: var(--fs-2xs); font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  color: #c3d2ca; margin-bottom: 1.4rem;
}
.hero__eyebrow i { color: var(--accent); }
.hero h1 {
  color: #fff; font-size: var(--fs-4xl); line-height: 1.05;
  letter-spacing: -.028em; margin-bottom: 1.05rem;
}
.hero h1 span { color: var(--accent); }
.hero__lead { font-size: var(--fs-md); color: #b6c5bd; max-width: 520px; margin-bottom: var(--sp-8); }
.hero__actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-bottom: var(--sp-10); }
.hero__points { display: flex; gap: var(--sp-7); flex-wrap: wrap; list-style: none; margin: 0; padding: 0; }
.hero__points li { display: flex; align-items: center; gap: .5rem; font-size: var(--fs-sm); color: #b6c5bd; }
.hero__points i { color: var(--accent); }

.hero__visual { position: relative; }
.hero__frame {
  border-radius: var(--radius-lg); overflow: hidden; border: 1px solid rgba(255,255,255,.14);
  box-shadow: var(--shadow-xl); transform: rotate(1.4deg);
}
.hero__frame img { inline-size: 100%; display: block; aspect-ratio: 4/3.4; object-fit: cover; }
.hero__badge {
  position: absolute; inset-inline-start: -26px; inset-block-end: 34px;
  background: var(--surface); color: var(--ink);
  border-radius: var(--r-3); padding: .95rem 1.15rem; box-shadow: var(--shadow-xl);
  display: flex; align-items: center; gap: .8rem; transform: rotate(-2deg);
}
.hero__badge i { font-size: 1.7rem; color: var(--brand-fg); }
.hero__badge .t { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; line-height: 1.1; }
.hero__badge .s { font-size: var(--fs-xs); color: var(--muted); }

.hero__video { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; object-fit: cover; z-index: 0; }
.hero__overlay {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(100deg, rgba(8,18,13,.95) 0%, rgba(8,18,13,.82) 45%, rgba(8,18,13,.5) 100%);
}
.hero--video::before { z-index: 2; }
.hero--video .hero__inner { position: relative; z-index: 3; grid-template-columns: minmax(0, 760px); }

/* --- Trust strip ---------------------------------------------------------- */
.trust { background: var(--surface); border-bottom: 1px solid var(--line); }
.trust__inner {
  max-width: var(--container); margin-inline: auto; padding: var(--sp-6);
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-6); flex-wrap: wrap;
}
.trust__label {
  font-size: var(--fs-2xs); font-weight: 700; letter-spacing: var(--tracking-caps);
  text-transform: uppercase; color: var(--muted);
}
.trust__items { display: flex; gap: var(--sp-8); flex-wrap: wrap; }
.trust__item { display: flex; align-items: center; gap: .5rem; font-weight: 600; font-size: var(--fs-sm); color: var(--ink-600); }
.trust__item i { color: var(--brand-fg); font-size: 1.15rem; }

/* --- Card grid (portfolio + updates) -------------------------------------- */
.pkg-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-6); }
.pkg-card {
  container-type: inline-size;
  position: relative;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform var(--dur-3) var(--ease-out), box-shadow var(--dur-3) var(--ease),
              border-color var(--dur-2) var(--ease);
}
.pkg-card::after {
  content: ""; position: absolute; inset-block-start: 0; inset-inline: 0; block-size: 2px;
  background: linear-gradient(90deg, var(--brand), var(--accent));
  transform: scaleX(0); transform-origin: left;
  transition: transform var(--dur-3) var(--ease-out);
  z-index: 2;
}
.pkg-card:hover, .pkg-card:focus-within {
  transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: var(--line-strong);
}
.pkg-card:hover::after, .pkg-card:focus-within::after { transform: scaleX(1); }
.pkg-card__media { aspect-ratio: 16/10; overflow: hidden; background: var(--bg-2); position: relative; }
.pkg-card__media img { inline-size: 100%; block-size: 100%; object-fit: cover; transition: transform var(--dur-4) var(--ease-out); }
.pkg-card:hover .pkg-card__media img { transform: scale(1.05); }
.pkg-card__tag { position: absolute; inset-inline-start: 12px; inset-block-start: 12px; }
.pkg-card__body { padding: var(--sp-5) var(--sp-5) var(--sp-6); display: flex; flex-direction: column; flex: 1; }
.pkg-card__title { font-size: var(--fs-lg); margin-bottom: .4rem; }
.pkg-card__meta { font-size: var(--fs-xs); color: var(--muted); margin-bottom: .55rem; display: flex; gap: .9rem; flex-wrap: wrap; }
.pkg-card__meta i { color: var(--brand-fg); margin-inline-end: .25rem; }
.pkg-card__text { font-size: var(--fs-sm); color: var(--muted); margin-bottom: 1rem; flex: 1; }
.pkg-card__link {
  font-weight: 600; font-size: var(--fs-sm); color: var(--brand-fg);
  display: inline-flex; align-items: center; gap: .4rem; margin-top: auto;
}
.pkg-card__link i { transition: transform var(--dur-2) var(--ease-spring); }
.pkg-card:hover .pkg-card__link i, .pkg-card__link:hover i { transform: translateX(4px); }
@container (max-width: 260px) {
  .pkg-card__body { padding: var(--sp-4); }
  .pkg-card__title { font-size: var(--fs-md); }
}

/* Deliberate empty state — the projects / posts tables are empty today, so
   this is what a visitor actually sees. It has to read as "not yet", not
   as "broken". */
.pkg-empty {
  grid-column: 1 / -1;
  display: grid; place-items: center; gap: .35rem;
  text-align: center; color: var(--muted);
  padding: var(--sp-16) var(--sp-6);
  border: 1px dashed var(--line-strong); border-radius: var(--radius);
  background:
    repeating-linear-gradient(135deg, transparent 0 9px, color-mix(in srgb, var(--line) 45%, transparent) 9px 10px),
    var(--surface);
  font-size: var(--fs-sm);
}
.pkg-empty::before {
  content: "\F523"; /* bi-rulers, Bootstrap Icons 1.11.x */
  font-family: 'bootstrap-icons'; font-size: 1.6rem; line-height: 1;
  color: var(--brand-fg); opacity: .7; margin-bottom: .3rem;
}

/* --- Service cards -------------------------------------------------------- */
.svc-card {
  container-type: inline-size;
  position: relative;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: var(--sp-6); block-size: 100%;
  transition: transform var(--dur-3) var(--ease-out), box-shadow var(--dur-3) var(--ease),
              border-color var(--dur-2) var(--ease);
}
.svc-card:hover, .svc-card:focus-within {
  transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--brand-line);
}
.svc-card .ic {
  inline-size: 50px; block-size: 50px; border-radius: var(--r-2);
  background: var(--brand-soft); color: var(--brand-fg);
  display: grid; place-items: center; font-size: 1.4rem; margin-bottom: var(--sp-4);
  transition: background-color var(--dur-2) var(--ease), transform var(--dur-3) var(--ease-spring);
}
.svc-card:hover .ic { transform: translateY(-2px) rotate(-3deg); background: color-mix(in srgb, var(--brand) 22%, var(--surface)); }
.svc-card h3 { font-size: var(--fs-md); margin-bottom: .4rem; letter-spacing: -.01em; }
.svc-card p { font-size: var(--fs-sm); color: var(--muted); margin: 0; }
/* A container cannot restyle itself, so these tighten the card's CONTENTS
   when the column it lands in is narrow. */
@container (max-width: 230px) {
  .svc-card .ic { inline-size: 40px; block-size: 40px; font-size: 1.15rem; margin-bottom: var(--sp-3); }
}

/* --- About / feature split ------------------------------------------------ */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-16); align-items: center; }
.split__visual {
  border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--line);
  box-shadow: var(--shadow-lg); position: relative;
}
.split__visual img { inline-size: 100%; aspect-ratio: 1/1; object-fit: cover; }
.feature-list { list-style: none; padding: 0; margin: 1.5rem 0 var(--sp-8); display: grid; gap: 1rem; }
.feature-list li { display: flex; gap: .85rem; }
.feature-list .ic {
  flex: none; inline-size: 38px; block-size: 38px; border-radius: var(--r-2);
  background: var(--brand-soft); color: var(--brand-fg);
  display: grid; place-items: center; font-size: 1.05rem;
}
.feature-list h4 { font-size: var(--fs-md); margin: .1rem 0; }
.feature-list p { font-size: var(--fs-sm); color: var(--muted); margin: 0; }

/* --- CTA band ------------------------------------------------------------- */
.cta-band {
  position: relative; overflow: hidden;
  background: radial-gradient(700px 360px at 85% 0%, rgba(245,165,36,.22), transparent 60%),
              linear-gradient(135deg, #0a5739, #0e7c52);
  color: #fff; border-radius: var(--radius-lg); padding: var(--sp-16) var(--sp-16);
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-8); flex-wrap: wrap;
  box-shadow: var(--shadow-lg);
}
.cta-band::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 38px 38px;
  -webkit-mask-image: linear-gradient(115deg, #000, transparent 70%);
          mask-image: linear-gradient(115deg, #000, transparent 70%);
}
.cta-band > * { position: relative; }
.cta-band h2 { color: #fff; font-size: var(--fs-2xl); margin-bottom: .3rem; }
.cta-band p { color: rgba(255,255,255,.85); margin: 0; }

/* --- Page hero (inner pages) ---------------------------------------------- */
.page-hero {
  background: radial-gradient(700px 380px at 85% -10%, rgba(14,124,82,.4), transparent 60%), var(--shell);
  color: #c6d3cc; padding: var(--sp-16) 0 var(--sp-16);
}
.page-hero h1 { color: #fff; font-size: var(--fs-3xl); margin-bottom: .45rem; }
.page-hero p { color: #a9bab1; max-width: 560px; margin: 0; }
.page-hero .crumbs { font-size: var(--fs-sm); color: #8fa099; margin-bottom: .9rem; }
.page-hero .crumbs a { color: #b6c5bd; }
.page-hero .crumbs a:hover { color: var(--accent); }

/* --- Detail pages --------------------------------------------------------- */
.detail-cover {
  border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--line);
  box-shadow: var(--shadow-md); margin-bottom: var(--sp-8); background: var(--bg-2);
}
.detail-cover img { inline-size: 100%; max-block-size: 480px; object-fit: cover; }
.detail-layout { display: grid; grid-template-columns: 1.7fr 1fr; gap: var(--sp-8); align-items: start; }
.detail-body { font-size: var(--fs-md); }
.detail-body p { margin-bottom: 1.05rem; }
.detail-facts {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: var(--sp-5) var(--sp-6); position: sticky; inset-block-start: calc(var(--nav-h) + var(--sp-5));
}
.detail-facts h3 { font-size: var(--fs-base); margin-bottom: var(--sp-4); }
.detail-facts dl { margin: 0; display: grid; gap: .8rem; }
.detail-facts dt { font-size: var(--fs-3xs); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.detail-facts dd { margin: .1rem 0 0; color: var(--ink-600); font-weight: 500; }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--sp-4); }
.gallery-grid figure { margin: 0; border-radius: var(--r-2); overflow: hidden; border: 1px solid var(--line); background: var(--surface); }
.gallery-grid img { inline-size: 100%; aspect-ratio: 4/3; object-fit: cover; transition: transform var(--dur-4) var(--ease-out); }
.gallery-grid figure:hover img { transform: scale(1.04); }
.gallery-grid figcaption { padding: 8px 12px; font-size: var(--fs-xs); color: var(--muted); }
.post-meta { display: flex; gap: 1.1rem; flex-wrap: wrap; font-size: var(--fs-sm); color: var(--muted); margin-bottom: 1.3rem; }
.post-meta i { color: var(--brand-fg); margin-inline-end: .3rem; }

/* --- Filter bar ----------------------------------------------------------- */
.filter-bar {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-3);
  padding: var(--sp-3) var(--sp-4); margin-bottom: var(--sp-6);
  transition: border-color var(--dur-2) var(--ease), box-shadow var(--dur-2) var(--ease);
}
.filter-bar:focus-within { border-color: var(--brand-line); box-shadow: var(--shadow-sm); }
.filter-bar form { display: flex; gap: var(--sp-3); flex-wrap: wrap; align-items: end; }
.filter-bar label {
  font-size: var(--fs-3xs); color: var(--muted); margin-bottom: 4px; display: block;
  text-transform: uppercase; letter-spacing: .06em; font-weight: 600;
}
.filter-bar select { min-inline-size: 170px; }

/* --- Footer --------------------------------------------------------------- */
.site-footer { background: var(--shell); color: var(--shell-fg); }
.site-footer__inner {
  max-width: var(--container); margin-inline: auto;
  padding: var(--sp-16) var(--sp-6) var(--sp-10);
  display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.4fr; gap: var(--sp-10);
}
.site-footer__brand p { font-size: var(--fs-sm); margin: 1rem 0 1.2rem; max-width: 320px; }
.site-footer h4 {
  color: #fff; font-size: var(--fs-2xs); letter-spacing: var(--tracking-caps); text-transform: uppercase;
  margin-bottom: 1rem; font-family: var(--font-body); font-weight: 700;
}
.site-footer__col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .55rem; }
.site-footer__col a, .site-footer__col li {
  color: var(--shell-fg); font-size: var(--fs-sm); display: inline-flex; gap: .5rem; align-items: center;
}
.site-footer__col a { transition: color var(--dur-2) var(--ease); }
.site-footer__col a:hover { color: var(--accent); }
.site-footer__col li i { color: var(--brand-fg); }
.site-footer__bar {
  max-width: var(--container); margin-inline: auto; padding: var(--sp-5) var(--sp-6);
  border-top: 1px solid var(--shell-line); display: flex; justify-content: space-between;
  flex-wrap: wrap; gap: 8px;
}
.site-footer__bar p { margin: 0; font-size: var(--fs-xs); color: var(--shell-fg-dim); }

/* ==========================================================================
   6. ADMIN SHELL
   ========================================================================== */

/* --- Auth (admin/login.php) ----------------------------------------------- */
.auth { min-block-size: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; }
.auth__aside {
  position: relative; overflow: hidden; color: #d6e0db; padding: var(--sp-16);
  display: flex; flex-direction: column;
  background: radial-gradient(700px 420px at 80% 0%, rgba(14,124,82,.5), transparent 60%), var(--shell);
}
.auth__aside::before {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 42px 42px;
  -webkit-mask-image: radial-gradient(600px 400px at 70% 20%, #000 50%, transparent 100%);
          mask-image: radial-gradient(600px 400px at 70% 20%, #000 50%, transparent 100%);
}
.auth__aside > * { position: relative; }
.auth__aside h2 { color: #fff; font-size: var(--fs-2xl); margin: auto 0 1rem; max-width: 15ch; }
.auth__aside .lead-sm { color: #b6c5bd; max-width: 380px; font-size: var(--fs-sm); }
.auth__points { list-style: none; padding: 0; margin: 1.6rem 0 auto; display: grid; gap: .9rem; }
.auth__points li { display: flex; gap: .7rem; align-items: flex-start; font-size: var(--fs-sm); }
.auth__points i { color: var(--accent); font-size: 1.1rem; margin-top: .12rem; }
.auth__aside .copyright { color: var(--shell-fg-dim); font-size: var(--fs-xs); }

.auth__main {
  display: flex; align-items: center; justify-content: center;
  padding: var(--sp-12) var(--sp-6); background: var(--bg);
}
.auth-card {
  inline-size: 100%; max-inline-size: 420px;
  animation: cd-rise var(--dur-4) var(--ease-out) both;
}
.auth-card .back-home {
  display: inline-flex; align-items: center; gap: .3rem; font-size: var(--fs-sm);
  font-weight: 600; color: var(--muted); margin-bottom: 1.5rem;
}
.auth-card .back-home:hover { color: var(--brand-fg); }
.auth-card h1 { font-size: var(--fs-xl); margin-bottom: .2rem; }
.auth-card .sub { color: var(--muted); font-size: var(--fs-sm); margin-bottom: 1.4rem; }
.auth-card .btn { inline-size: 100%; justify-content: center; margin-top: .4rem; padding-block: .8rem; }

@media (max-width: 860px) {
  .auth { grid-template-columns: 1fr; }
  .auth__aside { display: none; }
}

/* --- Dashboard frame ------------------------------------------------------ */
.dash { display: grid; grid-template-columns: var(--side-w) 1fr; min-block-size: 100vh; }

.dash-side {
  background: var(--shell); color: var(--shell-fg);
  display: flex; flex-direction: column;
  position: sticky; inset-block-start: 0; block-size: 100vh; min-block-size: 0;
  border-inline-end: 1px solid var(--shell-line);
}
.dash-side__brand { padding: var(--sp-5); border-bottom: 1px solid var(--shell-line); flex: none; }
.dash-side__user {
  padding: var(--sp-5); border-bottom: 1px solid var(--shell-line);
  display: flex; gap: .75rem; align-items: center; flex: none;
}
.dash-avatar {
  inline-size: 44px; block-size: 44px; border-radius: var(--r-2); flex: none;
  background: linear-gradient(140deg, #14a06e, #0a5739);
  color: #fff; display: grid; place-items: center; font-family: var(--font-display);
  font-weight: 700; font-size: 1.1rem; letter-spacing: .01em;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.12);
}
.dash-side__user .nm { color: #fff; font-weight: 600; font-family: var(--font-display); line-height: 1.2; font-size: var(--fs-sm); }
.dash-side__user .rl { font-size: var(--fs-xs); color: var(--shell-fg-dim); }

.dash-nav {
  padding: var(--sp-3) var(--sp-3); display: grid; gap: 2px;
  flex: 1 1 auto; min-block-size: 0; overflow-y: auto;
  scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.16) transparent;
  overscroll-behavior: contain;
}
.dash-nav::-webkit-scrollbar { inline-size: 6px; }
.dash-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.16); border-radius: 3px; }
.dash-nav::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.28); }
.dash-nav__label {
  font-size: var(--fs-3xs); letter-spacing: var(--tracking-caps); text-transform: uppercase;
  color: var(--shell-fg-dim); padding: var(--sp-3) var(--sp-3) 6px; font-weight: 600;
}
.dash-nav a {
  position: relative;
  display: flex; align-items: center; gap: .7rem;
  padding: .58rem .75rem; border-radius: var(--r-1);
  color: var(--shell-fg); font-weight: 500; font-size: var(--fs-sm); cursor: pointer;
  transition: background-color var(--dur-2) var(--ease), color var(--dur-2) var(--ease);
}
.dash-nav a i { font-size: 1.05rem; opacity: .8; transition: opacity var(--dur-2) var(--ease); }
.dash-nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.dash-nav a:hover i { opacity: 1; }
.dash-nav a:focus-visible { outline-color: var(--accent); box-shadow: none; }
/* Active: a quiet tinted row with an amber marker — reads instantly without
   a saturated green slab dominating the sidebar. */
.dash-nav a.active {
  background: color-mix(in srgb, var(--brand) 30%, transparent);
  color: #fff; font-weight: 600;
}
.dash-nav a.active i { opacity: 1; color: #7fe3b8; }
.dash-nav a.active::before {
  content: ""; position: absolute; inset-inline-start: -12px; inset-block: 6px;
  inline-size: 3px; border-radius: 0 3px 3px 0; background: var(--accent);
}

.dash-nav__group { display: contents; }
.dash-nav__label--toggle {
  cursor: pointer; list-style: none;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  user-select: none; line-height: 1.4;
  border-radius: var(--r-1);
  transition: color var(--dur-2) var(--ease), background-color var(--dur-2) var(--ease);
}
.dash-nav__label--toggle > span { flex: 1 1 auto; }
.dash-nav__label--toggle:hover { color: var(--shell-fg); background: rgba(255,255,255,.04); }
.dash-nav__label--toggle::-webkit-details-marker { display: none; }
.dash-nav__label--toggle::marker { content: ''; }
.dash-nav__chev { font-size: .7rem; line-height: 1; opacity: .55; transition: transform var(--dur-2) var(--ease); }
.dash-nav__group:not([open]) .dash-nav__chev { transform: rotate(-90deg); }
/* A collapsed group that contains the current page still signals it */
.dash-nav__group:not([open]):has(a.active) > .dash-nav__label--toggle { color: var(--accent); }

.dash-side__foot { padding: var(--sp-3); border-top: 1px solid var(--shell-line); flex: none; }
.dash-side__foot a {
  display: flex; align-items: center; gap: .7rem; padding: .58rem .75rem; border-radius: var(--r-1);
  color: #c98a8a; font-weight: 500; font-size: var(--fs-sm);
  transition: background-color var(--dur-2) var(--ease), color var(--dur-2) var(--ease);
}
.dash-side__foot a:hover { background: rgba(220,38,38,.16); color: #f3aeae; }

.dash-scrim { display: none; }
.dash-main { background: var(--bg); min-inline-size: 0; }

.dash-top {
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
  padding: var(--sp-3) var(--sp-8);
  display: flex; align-items: center; gap: var(--sp-3);
  position: sticky; inset-block-start: 0; z-index: 20;
  min-block-size: 62px;
}
@supports not (backdrop-filter: blur(4px)) { .dash-top { background: var(--surface); } }
.dash-top h1 { font-size: var(--fs-lg); margin: 0; letter-spacing: -.018em; }
.dash-top .muted { color: var(--muted); font-size: var(--fs-xs); margin-top: 1px; }
.dash-top .theme-toggle { --tt-size: 36px; }
/* Same box the page used to set with an inline flex:1 — identical desktop
   geometry, but now a class the small-screen grid below can address. */
.dash-top__title { flex: 1 1 0; min-inline-size: 0; }
.dash-top__actions { display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap; }
.dash-burger {
  display: none; inline-size: 40px; block-size: 40px; border: 1px solid var(--line);
  border-radius: var(--r-2); background: var(--surface); cursor: pointer;
  font-size: 1.15rem; color: var(--ink);
}

/* Small screens: the topbar was a single flex row, so the title column was
   squeezed to ~85px and "Fee proposals sent to clients" came out as four
   ribbons. Below 620px it becomes a grid — burger · title · theme toggle on a
   full-width first row, page actions on a row of their own — and below 520px,
   where even a full row cannot hold the subtitle on one line, the subtitle is
   dropped rather than shredded. The heading and every control keep their
   order. */
@media (max-width: 620px) {
  .dash-top {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    column-gap: var(--sp-3); row-gap: var(--sp-2);
  }
  .dash-top__actions { grid-column: 1 / -1; }
  .dash-top h1 { overflow-wrap: break-word; }
}
@media (max-width: 520px) {
  .dash-top .muted { display: none; }
}
.dash-body { padding: var(--sp-8); animation: cd-fade var(--dur-3) var(--ease-out) both; }

/* --- Stat cards ----------------------------------------------------------- */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-4); margin-bottom: var(--sp-6); }
.stat-card {
  container-type: inline-size;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: var(--sp-5); display: flex; gap: var(--sp-4); align-items: center;
  transition: border-color var(--dur-2) var(--ease), box-shadow var(--dur-2) var(--ease),
              transform var(--dur-2) var(--ease-out);
}
.stat-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.stat-card .ic {
  inline-size: 46px; block-size: 46px; border-radius: var(--r-2); flex: none;
  display: grid; place-items: center; font-size: 1.3rem;
  background: var(--brand-soft); color: var(--brand-fg);
}
.stat-card .ic.amber { background: var(--accent-soft); color: var(--accent-fg); }
/* Same rule as the KPI values: the dashboard icon chips carried an off-brand
   blue that meant nothing. A chip is a label, not a signal — neutral. */
.stat-card .ic.blue,
.stat-card .ic.ink   { background: var(--bg-2);        color: var(--ink-600); }
.stat-card .v {
  font-family: var(--font-display); font-size: 1.7rem; font-weight: 700;
  color: var(--ink); line-height: 1; letter-spacing: -.02em;
}
.stat-card .l { font-size: var(--fs-xs); color: var(--muted); margin-top: .3rem; line-height: 1.35; }
@container (max-width: 210px) {
  .stat-card .ic { inline-size: 38px; block-size: 38px; font-size: 1.05rem; }
  .stat-card .v { font-size: 1.35rem; }
}

/* --- Dash cards ----------------------------------------------------------- */
.dash-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: var(--sp-6); margin-bottom: var(--sp-6);
}
.dash-card__head {
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4);
  margin-bottom: var(--sp-4); flex-wrap: wrap;
}
.dash-card__head h3 { font-size: var(--fs-md); margin: 0; letter-spacing: -.012em; }
.dash-grid-2 { display: grid; grid-template-columns: 1.4fr 1fr; gap: var(--sp-6); }
/* A grid item's automatic minimum size is its content, so one long activity
   title used to push the whole dashboard wider than the phone. */
.dash-grid-2 > *, .stat-grid > *, .cio-kpis > *, .cio-charts > * { min-inline-size: 0; }
.dash-card { min-inline-size: 0; }

.row-avatar {
  inline-size: 34px; block-size: 34px; border-radius: var(--r-1);
  background: var(--brand-soft); color: var(--brand-fg);
  display: inline-grid; place-items: center; font-weight: 700; font-size: var(--fs-xs);
  margin-inline-end: .6rem; font-family: var(--font-display);
}
.chart-wrap { position: relative; block-size: 260px; }

.dash-search { position: relative; display: inline-flex; align-items: center; }
.dash-search i {
  position: absolute; inset-inline-start: 12px; color: var(--muted); font-size: .95rem; pointer-events: none;
}
.dash-search input {
  border: 1px solid var(--field-line); border-radius: var(--r-2);
  padding: .5rem .9rem .5rem 2.25rem; font-family: var(--font-body);
  font-size: var(--fs-sm); color: var(--ink); background: var(--surface); min-inline-size: 240px;
  transition: border-color var(--dur-2) var(--ease), box-shadow var(--dur-2) var(--ease);
}
.dash-search input::placeholder { color: var(--dim); }
.dash-search input:focus { outline: none; border-color: var(--brand); box-shadow: var(--ring); }
.dash-search:has(input:focus) i { color: var(--brand); }
@media (max-width: 620px) { .dash-search input { min-inline-size: 0; inline-size: 100%; } }

/* --- cio-* data components ------------------------------------------------ */
.cio-kpis { display: grid; gap: var(--sp-4); grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); margin-bottom: var(--sp-5); }
.cio-kpi {
  container-type: inline-size;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-3);
  padding: var(--sp-4) var(--sp-5); box-shadow: var(--shadow-xs);
  transition: border-color var(--dur-2) var(--ease), box-shadow var(--dur-2) var(--ease);
}
.cio-kpi:hover { border-color: var(--line-strong); box-shadow: var(--shadow-sm); }
.cio-kpi__label {
  font-size: var(--fs-3xs); text-transform: uppercase; letter-spacing: .07em;
  color: var(--muted); margin-bottom: 5px; font-weight: 600;
}
/* ADMIN NUMERIC COLOUR RULE — one rule, applied everywhere in the panel:
     ink   … a figure that is a FACT. Counts, proposed value, accepted value,
             money received, cash banked, file totals. The overwhelming
             majority. Colour on a fact is noise, and six coloured numbers in
             a row told the reader nothing.
     amber … the one SIGNAL: money still owed. Outstanding balances, partly
             paid rows. The only KPI that asks him to do something.
     red   … kept strictly for a genuinely negative state (a net balance below
             zero), never for a receivable.
   The off-brand blue (--info-fg) is gone from every admin figure; the palette
   is now ink + the two logo colours. The legacy --blue/--amber/--red
   modifiers stay as the pages' hooks, re-pointed at that rule; --owed is the
   name to use for anything new. */
.cio-kpi__value {
  font-family: var(--font-display); font-size: 1.5rem; font-weight: 700;
  color: var(--ink); line-height: 1.15; letter-spacing: -.02em;
}
.cio-kpi__sub { font-size: var(--fs-xs); color: var(--muted); margin-top: 4px; }
.cio-kpi--blue  .cio-kpi__value,
.cio-kpi--amber .cio-kpi__value { color: var(--ink); }
.cio-kpi--owed  .cio-kpi__value,
.cio-kpi--red   .cio-kpi__value { color: var(--accent-fg); }
/* The signal earns a marker too, so it reads before the eye reaches the digits. */
.cio-kpi--owed, .cio-kpi--red { border-color: color-mix(in srgb, var(--accent) 42%, var(--line)); }
@container (max-width: 180px) { .cio-kpi__value { font-size: 1.2rem; } }

.cio-filter-bar {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-3);
  padding: var(--sp-3) var(--sp-4); margin-bottom: var(--sp-4);
  transition: border-color var(--dur-2) var(--ease), box-shadow var(--dur-2) var(--ease);
}
.cio-filter-bar:focus-within { border-color: var(--brand-line); box-shadow: var(--shadow-sm); }
.cio-filter-bar form { display: grid; gap: var(--sp-3); grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); align-items: end; }
.cio-filter-bar label {
  font-size: var(--fs-3xs); color: var(--muted); margin-bottom: 4px; display: block;
  text-transform: uppercase; letter-spacing: .06em; font-weight: 600;
}
.cio-filter-bar select, .cio-filter-bar input[type=search] { inline-size: 100%; }

.cio-charts { display: grid; gap: var(--sp-5); grid-template-columns: 1.4fr 1fr; align-items: stretch; margin-bottom: var(--sp-5); }
.cio-charts > .cio-chart-card { display: flex; flex-direction: column; min-inline-size: 0; }
.cio-charts > .cio-chart-card canvas { flex: 1 1 auto; }
@media (max-width: 900px) { .cio-charts { grid-template-columns: 1fr; } }
.cio-chart-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-4);
  padding: var(--sp-5) var(--sp-6); box-shadow: none;
}
.cio-chart-card h3 {
  font-size: var(--fs-3xs); margin: 0 0 4px; color: var(--muted);
  font-weight: 600; text-transform: uppercase; letter-spacing: .07em; font-family: var(--font-body);
}
.cio-chart-card .sub { font-size: var(--fs-base); color: var(--ink); font-weight: 600; margin-bottom: var(--sp-3); }
.cio-chart-card canvas { inline-size: 100% !important; block-size: 260px !important; }

/* The table was clipped by overflow:hidden — wide admin tables lost their
   right-hand columns entirely. It scrolls inside its own box now. */
.cio-table-wrap {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-3);
  overflow: hidden;
}
.cio-table-wrap header {
  padding: var(--sp-3) var(--sp-4); border-bottom: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: center; gap: var(--sp-3); flex-wrap: wrap;
}
.cio-table-wrap header h3 { margin: 0; font-size: var(--fs-base); }
.cio-table-wrap > .table-responsive,
.cio-table-wrap > div:has(> .cio-table) { overflow-x: auto; overscroll-behavior-x: contain; }
/* DENSITY. This is the list he scans all day — a 48-row proposal table has to
   fit on a screen, not on seven. Three levers, none of which deletes a fact:
     · line-height 1.62 → 1.3 on the primary line;
     · the stacked sub-lines (project #, location, client, company) typeset at
       12px/1.25 as their own block, so an extra fact costs 15px instead of a
       full 23px body line;
     · cell padding .6rem/.75rem → .28rem/.5rem, which also hands ~90px of
       width back to the two wordy columns so they wrap less to begin with.
   Sub-lines keep their own baseline rhythm rather than being squeezed, so the
   cell still reads as "headline + detail". */
.cio-table { inline-size: 100%; border-collapse: collapse; font-size: var(--fs-sm); line-height: 1.3; }
.cio-table th, .cio-table td {
  padding: .28rem .5rem; text-align: start;
  border-bottom: 1px solid var(--line); vertical-align: top;
}
.cio-table th {
  background: var(--surface-2); font-weight: 600; color: var(--ink-600);
  font-size: var(--fs-3xs); text-transform: uppercase; letter-spacing: .05em;
  white-space: nowrap; padding-block: .4rem;
}
.cio-table th a { color: inherit; text-decoration: none; }
.cio-table th a:hover { color: var(--brand-fg); }
.cio-table tbody tr { transition: background-color var(--dur-1) var(--ease); }
.cio-table tbody tr:hover { background: var(--surface-2); }
.cio-table tbody tr:last-child td { border-bottom: 0; }
.cio-table td.num { text-align: end; font-variant-numeric: tabular-nums; }
.cio-table .title-cell { font-weight: 600; color: var(--ink); }
/* A stacked sub-line is a block of its own — 12px, tight leading, a hair of
   air above it. It stays legible and stops costing a full body line. */
.cio-table .muted {
  color: var(--muted);
  font-size: var(--fs-2xs); line-height: 1.25; font-weight: 400;
}
.cio-table div.muted { margin-block-start: 1px; }
.cio-table td.num .muted { font-variant-numeric: tabular-nums; }
.cio-detail-link { color: var(--brand-fg); text-decoration: none; white-space: nowrap; font-weight: 500; }
.cio-detail-link:hover { text-decoration: underline; }
.cio-thumb { inline-size: 58px; block-size: 42px; object-fit: cover; border-radius: var(--r-1); background: var(--bg-2); }

/* --- Admin gallery editor ------------------------------------------------- */
.upload-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: var(--sp-3); }
.upload-thumb {
  border: 1px solid var(--line); border-radius: var(--r-2); overflow: hidden; background: var(--surface);
  transition: border-color var(--dur-2) var(--ease), box-shadow var(--dur-2) var(--ease);
}
.upload-thumb:focus-within { border-color: var(--brand-line); box-shadow: var(--shadow-sm); }
.upload-thumb img { inline-size: 100%; aspect-ratio: 4/3; object-fit: cover; }
.upload-thumb .ut-body { padding: 9px 10px; display: grid; gap: 6px; }
.upload-thumb input[type=text], .upload-thumb input[type=number] {
  border: 1px solid var(--line-strong); border-radius: var(--r-1); padding: .32rem .5rem;
  font-size: var(--fs-xs); inline-size: 100%; font-family: var(--font-body);
  color: var(--ink); background: var(--surface);
}
.upload-thumb .ut-row { display: flex; gap: 6px; align-items: center; }
.upload-thumb .ut-row input[type=number] { inline-size: 74px; flex: none; }
.ut-del {
  margin-inline-start: auto; border: 0; background: transparent; color: var(--muted); cursor: pointer;
  padding: .3rem .5rem; border-radius: var(--r-1); font-size: .95rem; line-height: 1;
}
.ut-del:hover { background: var(--danger-soft); color: var(--danger-fg); }
.cover-preview { max-inline-size: 260px; border-radius: var(--r-2); border: 1px solid var(--line); margin-bottom: 8px; }

/* ==========================================================================
   7. MOTION — every animation below is switched off by prefers-reduced-motion
   ========================================================================== */
@keyframes cd-fade  { from { opacity: 0; } to { opacity: 1; } }
@keyframes cd-rise  { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes cd-drop  { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
@keyframes cd-underline { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* Scroll reveal. Instead of every element sliding the same 26px in unison,
   siblings inherit a stagger index from main.js and travel a shorter, softer
   distance on an expo-out curve, so a row of cards arrives as a sequence. */
html.js .reveal {
  opacity: 0;
  transform: translateY(var(--reveal-y, 16px)) scale(var(--reveal-s, .994));
  transition:
    opacity var(--dur-4) var(--ease-out),
    transform var(--dur-4) var(--ease-out);
  transition-delay: calc(var(--reveal-i, 0) * 65ms);
  will-change: opacity, transform;
}
html.js .reveal.in { opacity: 1; transform: none; will-change: auto; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  html.js .reveal { opacity: 1; transform: none; transition: none; }
  .hero__video { display: none; }
  *, *::before, *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
    scroll-behavior: auto !important;
  }
}

/* ==========================================================================
   8. RECONCILIATION
   The admin pages ship their own <style> blocks (fee calculator, transaction
   ledger, deliverables, billing) with hardcoded light hexes, and those blocks
   load AFTER this file. The `html ` prefix below out-specifies them by one
   element selector so the same components follow the theme tokens. Nothing
   here changes the light-theme appearance — the values are the tokens those
   hexes already stood for.
   ========================================================================== */

/* --- Card / panel surfaces ------------------------------------------------ */
html .np-card,
html .tx-kpi,
html .tx-card,
html .cal-card,
html .cal-cell,
html .tx-list,
html .tx-filter,
html .tx-search,
html .bill-card,
html dialog.calcpop,
html .calc-line {
  background: var(--surface);
  border-color: var(--line);
  color: var(--body);
}
html .cal-cell { border-color: var(--line); }
html .cal-cell.dim { background: var(--bg-2); border-color: var(--line); }
html .cal-cell:hover:not(.dim) { background: var(--surface-2); border-color: var(--line-strong); }

/* --- Sunken / secondary surfaces ------------------------------------------ */
html .bd-tabs,
html .cal-nav,
html .cal-detail__sec,
html .exp-form,
html .tx-ledger__note,
html .calcpop__screen,
html .calcpop__side-foot,
html .dv-form .current {
  background: var(--surface-2);
  border-color: var(--line);
}
html .tx-list th,
html .tx-list tfoot td,
html .bill-table th {
  background: var(--surface-2);
  color: var(--ink-600);
  border-color: var(--line);
}
html .tx-list tbody tr:hover { background: var(--surface-2); }
html .tx-list td,
html .tx-list th,
html .bal-head,
html .bill-table td,
html .tx-tabs { border-color: var(--line); }

/* --- Raised controls ------------------------------------------------------ */
html .bd-tab.active,
html .cal-nav button:hover,
html .calcpop__keys button,
html .calcpop__side-btns button,
html .dv-table td.actions a.btn-hist {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line-strong);
}
html .bd-tab.active { box-shadow: var(--shadow-xs); }
html .calcpop__keys button:hover { background: var(--surface-2); }
html .bd-tab, html .cal-nav button, html .tx-tab { color: var(--ink-600); }
html .bd-tab:hover { color: var(--ink); }
html .bd-tab[data-target="income"].active,
html .bd-tab[data-target="status"].active,
html .tx-tab:hover { color: var(--brand-fg); }
html .bd-tab[data-target="expense"].active { color: var(--danger-fg); }
html .bd-tab[data-target="value"].active { color: var(--info-fg); }
html .tx-tab.active { color: var(--brand-fg); border-bottom-color: var(--brand); }
/* Four ledger tabs are wider than a phone — scroll the strip, not the page. */
html .tx-tabs { overflow-x: auto; overflow-y: hidden; flex-wrap: nowrap; scrollbar-width: thin; overscroll-behavior-x: contain; }
html .tx-tab { flex: 0 0 auto; }

/* --- Inputs inside page-level styles -------------------------------------- */
html .np-grid input, html .np-grid select, html .np-grid textarea,
html .exp-form input, html .exp-form select,
html .tx-filter select,
html .calcpop__foot select,
html .calc-floor input, html .calc-row input {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--field-line);
}
html .np-grid input::placeholder,
html .calc-floor input::placeholder,
html .calc-row input::placeholder,
html .tx-search input::placeholder { color: var(--dim); }
html .np-grid input:focus, html .np-grid select:focus, html .np-grid textarea:focus,
html .exp-form input:focus, html .exp-form select:focus,
html .tx-filter select:focus,
html .calc-floor input:focus, html .calc-row input:focus {
  outline: 2px solid var(--focus); outline-offset: -2px;
}
html .tx-search input { color: var(--ink); }
html .np-grid label, html .exp-form label, html .tx-filter label { color: var(--ink-600); }

/* --- Text roles ----------------------------------------------------------- */
html .np-card h2,
html .cal-head h3, html .cal-month, html .cal-cell .d,
html .cal-detail__title, html .cal-detail__list .desc,
html .tx-card .tx-card__sub,
html .bal-head .ttl,
html .dv-head h2, html .dv-cell .val,
html .dv-table .ttl, html .dv-table .fname,
html .tx-list td.num.v--balance, html .tx-list tfoot td,
html .calcpop__result, html .calcpop__side-total .v { color: var(--ink); }

html .cal-summary, html .cal-detail__net, html .tx-ledger__net,
html .dv-note, html .dv-sub, html .dv-table .remark, html .dv-table .last,
html .calcpop__side-total .k, html .calcpop__foot label,
html .tx-actions a, html .tx-actions button,
html .dv-table td.actions a, html .dv-table td.actions button { color: var(--ink-600); }

html .np-hint, html .pl-count, html .tx-kpi__sub, html .tx-kpi__lbl,
html .tx-sub, html .tx-search__count, html .tx-filter__hint,
html .cal-dow, html .cal-detail__empty, html .cal-detail__close,
html .cal-detail__list .sub, html .tx-list .empty td,
html .dv-head .sub, html .dv-cell .lbl, html .dv-cell .val.muted,
html .dv-table .tsub, html .dv-table .fsrc, html .dv-table .count.zero,
html .dv-table .last.never, html .dv-table .via-staff,
html .dv-table .empty-row td, html .calcpop__hint, html .calcpop__expr,
html .calcpop__side-h, html .calcpop__close { color: var(--muted); }

html .dv-table .dim, html .dv-form .or,
html .calcpop__items .del, html .calcpop__side-btns button:disabled { color: var(--dim); }
/* Out-of-month day numbers sit on --bg-2, where --dim lands at 4.07:1. They
   are still text, so they take the secondary-copy token instead. */
html .cal-cell.dim .d { color: var(--muted); }

/* Two page rules out-specify the `html `-prefixed groups above — a two-class
   selector and a descendant h3 — so they kept their hardcoded blue-greys
   (3.04:1 and 2.56:1 on white). Matching their shape reclaims them. */
html .tx-filter .tx-filter__hint { color: var(--muted); }
html .tx-card h3 { color: var(--muted); }

html .tx-actions a:hover, html .dv-table td.actions a:hover,
html .bal-head a, html .dv-table .via-client { color: var(--brand-fg); }
html .tx-actions .danger, html .dv-table td.actions .danger,
html .calcpop__result.is-error { color: var(--danger-fg); }
/* A part-paid figure is money still owed — the one signal, so amber, not the
   off-brand blue the two list pages hardcoded (#0060EF, one inline). */
html .pl-paid-partial,
html .cio-table td.num span[style*="0060EF"] { color: var(--accent-fg) !important; }

/* DENSITY, part two — width, because most of the row height was wrapping.
   At 1440 the title column was 180px and the owner column 115px, so a
   40-character project title became six lines and three stacked names became
   eight. The floor goes on any cell that carries a stacked sub-line, minus the
   numeric and nowrap ones (Project #, Amount, Valid until) that sit at their
   natural width already — those were being widened for nothing.
   15rem/10rem is where the curve flattens: proposals 89 → 77px per row for
   24px more horizontal scroll in a table that already overflowed by 131px,
   project-list 158 → 106px. Pushing to 16/11 buys 6px a row and costs another
   48–73px sideways, which is the wrong trade for a table he reads left to
   right. proposals.php pins .title-cell at 180px in its own <style>, which
   loads after this file, so the `html ` prefix out-specifies it. */
html .cio-table .title-cell { min-inline-size: 15rem; }
html .cio-table tbody td:has(div.muted):not(.num):not(.nowrap) { min-inline-size: 10rem; }

html .tx-kpi--income .tx-kpi__val, html .cal-summary .v--income,
html .tx-list .v--income, html .cal-detail__list .val.in,
html .cal-detail__sec.in h5 .total, html .bal-head .ttl.in i { color: var(--brand-fg); }
html .tx-kpi--expense .tx-kpi__val, html .cal-summary .v--expense,
html .tx-list .v--expense, html .cal-detail__list .val.out,
html .cal-detail__sec.out h5 .total, html .bal-head .ttl.out i { color: var(--danger-fg); }
/* ADMIN NUMERIC COLOUR RULE (see .cio-kpi__value). Net balance is a fact, so
   it is ink when it is positive. transactions.php writes the colour inline —
   #1f6feb when the balance is up, #b3261e when it is down — so the override
   has to be keyed on the value it wrote: the blue becomes ink, and the red
   case is re-pointed at the token so it survives the dark theme instead of
   staying a light-theme hex. */
html .tx-kpi--balance .tx-kpi__val { color: var(--ink); }
html .tx-kpi--balance .tx-kpi__val[style*="1f6feb"] { color: var(--ink) !important; }
html .tx-kpi--balance .tx-kpi__val[style*="b3261e"] { color: var(--danger-fg) !important; }
html .tx-kpi--balance::before { background: var(--ink-600); }

html .tx-cat-pill { background: var(--bg-2); color: var(--ink-600); }
html .tx-type--in  { background: var(--ok-soft);     color: var(--ok-fg); }
html .tx-type--out { background: var(--danger-soft); color: var(--danger-fg); }
html .vtag { background: var(--brand-soft); color: var(--brand-fg); }
html .pill--emp { background: var(--info-soft); color: var(--info-fg); }
html .st-active   { background: var(--ok-soft);     color: var(--ok-fg); }
html .st-disabled { background: var(--danger-soft); color: var(--danger-fg); }
html .dv-table tr.is-editing td { background: var(--warn-soft); }
html .cal-cell.selected { background: var(--ok-soft); border-color: var(--brand-line); }
html .cal-cell.selected.has-out { background: var(--danger-soft); border-color: color-mix(in srgb, var(--danger) 32%, var(--surface)); }
html .cal-cell.today .d { background: var(--brand); color: var(--on-brand); }
/* Seven fixed-width day cells were wider than a phone; shrink the cell, not
   the page. */
@media (max-width: 600px) {
  html .cal-card { padding: var(--sp-4); }
  html .cal-grid { gap: 3px; }
  html .cal-cell { min-block-size: 62px; padding: 5px; border-radius: 8px; }
  html .cal-cell .d { inline-size: 22px; block-size: 22px; font-size: .72rem; }
  html .cal-cell.has-in::before, html .cal-cell.has-out::after { inset-block-start: 6px; inline-size: 5px; block-size: 5px; }
  html .cal-cell.has-in::before, html .cal-cell.has-out::after { inset-inline-end: 6px; }
  html .cal-cell.has-both::after { inset-inline-end: 14px; }
  html .cal-dow { font-size: .58rem; letter-spacing: .04em; padding-block: 4px 6px; }
}
html .cal-detail, html .cal-detail__list li { border-color: var(--line); }
html .cal-detail__list li { border-bottom-color: var(--line); }
html .cal-detail__title .day { color: var(--brand-fg); }
html .cal-detail__sec h5 { color: var(--muted); }
html .cal-detail__sec h5 .total { color: var(--ink); }

/* --- Fee calculator (the signature piece on the proposal form) ------------ */
html .calc-box {
  background: linear-gradient(180deg,
    color-mix(in srgb, var(--brand) 7%, var(--surface)),
    color-mix(in srgb, var(--brand) 3%, var(--surface)));
  border: 1px solid var(--brand-line);
  border-radius: var(--r-3);
}
html .calc-line {
  border-color: color-mix(in srgb, var(--brand) 16%, var(--line));
  border-radius: var(--r-2);
  transition: border-color var(--dur-2) var(--ease), background-color var(--dur-2) var(--ease);
}
/* Progressive enhancement: the "on" look is driven by the checkbox itself,
   so the row is correct even before the page's own JS stamps .calc-line--on */
html .calc-line--toggle:has(input[type=checkbox]:checked) {
  border-color: var(--brand-line);
  background: color-mix(in srgb, var(--brand) 5%, var(--surface));
}
html .calc-line--toggle:has(input[type=checkbox]:checked) .calc-row input,
html .calc-line--toggle:has(input[type=checkbox]:checked) .calc-out { opacity: 1; }
html .calc-line:focus-within { border-color: var(--brand); }
html .calc-line__label { color: var(--brand-fg); font-family: var(--font-body); }
html .calc-line--on .calc-line__label::before { color: var(--brand-fg); }
html .calc-floor label, html .calc-row label { color: var(--brand-fg); }
/* Green-cast control boundary, but anchored on --field-line so it keeps the
   3:1 WCAG 1.4.11 floor in both themes. */
html .calc-floor input, html .calc-row input {
  border-color: color-mix(in srgb, var(--brand) 34%, var(--field-line));
}
html .calc-out {
  background: var(--surface-2);
  border: 1px dashed var(--brand-line);
  color: var(--brand-fg);
  font-family: var(--font-display);
}
html .calc-out--sub {
  background: color-mix(in srgb, var(--brand) 12%, var(--surface));
  border: 1px solid var(--brand-line);
  color: var(--brand-fg);
}
html .calc-grand {
  background: linear-gradient(120deg, var(--brand-700), var(--brand));
  color: #fff; border-radius: var(--r-2);
  box-shadow: var(--shadow-sm);
}
html .calc-grand__label { color: #fff; }
/* The grand total reads white-on-green. A translucent WHITE fill lightened the
   band under it (3.95:1 light / 2.96:1 dark); a translucent BLACK fill deepens
   it instead, so the same chip now clears AA in both themes. */
html .calc-out--final {
  background: rgba(0,0,0,.26); color: #fff;
  border: 1px solid rgba(255,255,255,.55);
}

/* --- Pop-up calculator ---------------------------------------------------- */
html dialog.calcpop { background: var(--surface-3); color: var(--ink); box-shadow: var(--shadow-xl); }
html dialog.calcpop::backdrop { background: rgb(var(--umbra) / .55); backdrop-filter: blur(2px); }
html .calcpop__head, html .calcpop__foot, html .calcpop__side,
html .calcpop__side-h, html .calcpop__side-foot { border-color: var(--line); }
html .calcpop__items td { border-bottom-color: var(--line); }
html .calcpop__items input { color: var(--ink); }
html .calcpop__items input:hover { border-color: var(--line-strong); }
html .calcpop__items input:focus { border-color: var(--brand); background: var(--surface); }
html .calcpop__items input.qty { color: var(--brand-fg); }
html .calcpop__items tr:hover .del { color: var(--muted); }
html .calcpop__items .del:hover { background: var(--danger-soft); color: var(--danger-fg); }
html .calcpop__close:hover { background: var(--bg-2); color: var(--ink); }
html .calcpop__side-btns button:hover:not(:disabled) {
  background: var(--brand-tint); border-color: var(--brand); color: var(--brand-fg);
}
html .calcpop__side-btns .primary,
html .calcpop__side-btns .primary:hover:not(:disabled) { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
html .calcpop__side-btns button:disabled,
html .calcpop__side-btns .primary:disabled {
  background: var(--bg-2); border-color: var(--line); color: var(--dim);
}
html .calcpop__keys .k-op { color: var(--brand-fg); }
html .calcpop__keys .k-fn { color: var(--danger-fg); }
html .calcpop__insert { background: var(--ink); color: var(--bg); }
html .calcpop__insert:hover:not(:disabled) { background: var(--ink-700); }
html .calcpop__insert:disabled { background: var(--line-strong); color: var(--muted); }
html .calcpop-fab {
  background: var(--brand); color: var(--on-brand);
  box-shadow: var(--shadow-lg);
  transition: transform var(--dur-2) var(--ease-out), background-color var(--dur-2) var(--ease);
}
html .calcpop-fab:hover { background: var(--brand-600); transform: translateY(-2px); }
html .calcpop-fab:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }

/* --- Billing (admin view only; the A4 statement never loads this file) ---- */
html .bill-card, html .bill-kpi { background: var(--surface); border-color: var(--line); }
html .bill-card h2 { color: var(--ink); }
html .bill-kpi .k { color: var(--muted); }
html .bill-kpi .v { color: var(--ink); }
html .bill-kpi .v--paid { color: var(--brand-fg); }
html .bill-kpi .v--due  { color: var(--danger-fg); }
html .bill-table th, html .bill-table td { border-bottom-color: var(--line); }
html .bill-table tr:hover { background: var(--surface-2); }
html .bill-table td { color: var(--body); }

/* --- Inline `style="color:#…"` attributes --------------------------------- */
/* A handful of admin rows set a literal text colour in a style attribute.
   Nothing but !important outranks an inline declaration, so these eight
   substitutions are the only ones in the file — each maps a hex the pages
   already use onto the token that stands for the same role, which leaves
   the light theme looking the same and makes the dark theme legible. */
html [style*="color:#8a95a3"], html [style*="color: #8a95a3"],
html [style*="color:#6b7480"], html [style*="color: #6b7480"] { color: var(--muted) !important; }
html [style*="color:#525c66"], html [style*="color: #525c66"] { color: var(--ink-600) !important; }
html [style*="color:#2a3138"], html [style*="color: #2a3138"] { color: var(--ink-700) !important; }
html [style*="color:#0e7c52"], html [style*="color: #0e7c52"] { color: var(--brand-fg) !important; }
html [style*="color:#b3261e"], html [style*="color: #b3261e"] { color: var(--danger-fg) !important; }
html [style*="color:#b9750c"], html [style*="color: #b9750c"] { color: var(--accent-fg) !important; }
html [style*="color:#0060EF"], html [style*="color: #0060EF"] { color: var(--info-fg) !important; }

/* --- Dashboard / users / deliverables odds and ends ----------------------- */
html .act-row, html .msg-row { border-bottom-color: var(--line); }
html .dv-table.stack tr { border-bottom-color: var(--bg-2); }
html .dv-table.stack td { border-bottom-color: var(--line); }
html .dv-table.stack td::before { color: var(--muted); }
html .dv-table td.actions a.btn-hist:hover { border-color: var(--brand); color: var(--brand-fg); background: var(--brand-tint); }
html .form-hint { background: var(--bg-2); color: var(--ink-600); }
html .form-hint i { color: var(--brand-fg); }
html .err-foot { border-color: var(--line); }
html .err-code { color: var(--brand-fg); }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1024px) {
  .dash { grid-template-columns: 1fr; }
  .dash-side {
    position: fixed; inset-inline-start: 0; inset-block: 0; inline-size: var(--side-w);
    z-index: 60; block-size: 100vh;
    transform: translateX(-100%); transition: transform var(--dur-3) var(--ease-out);
  }
  .dash-side.open { transform: translateX(0); box-shadow: var(--shadow-xl); }
  .dash-burger { display: grid; place-items: center; }
  .dash-scrim {
    display: block; position: fixed; inset: 0; background: rgb(var(--umbra) / .55);
    backdrop-filter: blur(2px);
    z-index: 50; opacity: 0; visibility: hidden;
    transition: opacity var(--dur-2) var(--ease), visibility var(--dur-2);
  }
  .dash-scrim.show { opacity: 1; visibility: visible; }
}
@media (max-width: 980px) {
  .hero__inner { grid-template-columns: 1fr; gap: var(--sp-10); padding: var(--sp-16) var(--sp-6) var(--sp-20); }
  .hero__visual { max-inline-size: 520px; }
  .pkg-grid { grid-template-columns: repeat(2, 1fr); }
  .split { grid-template-columns: 1fr; gap: var(--sp-10); }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .dash-grid-2 { grid-template-columns: 1fr; }
  .detail-layout { grid-template-columns: 1fr; }
  .detail-facts { position: static; }
  .site-footer__inner { grid-template-columns: 1fr 1fr; gap: var(--sp-8); }
}
@media (max-width: 620px) {
  .section { padding-block: var(--sp-16); }
  .pkg-grid { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: 1fr; }
  .cta-band { padding: var(--sp-10) var(--sp-7); }
  .hero__badge { inset-inline-start: 12px; }
  .site-footer__inner { grid-template-columns: 1fr; }
  .dash-body { padding: var(--sp-4); }
  .dash-top { padding: var(--sp-3) var(--sp-4); }
  /* Page-supplied topbar buttons used to push the whole panel sideways. */
  .dash-top { flex-wrap: wrap; row-gap: var(--sp-2); }
  .dash-top > * { min-inline-size: 0; }
  .auth__main { padding: var(--sp-8) var(--sp-5); }
}

/* Print — the A4 documents carry their own CSS; just get the chrome out. */
@media print {
  .site-nav, .site-footer, .dash-side, .dash-top, .dash-scrim,
  .theme-toggle, .skip-link, .calcpop-fab { display: none !important; }
  .dash { grid-template-columns: 1fr; }
  .dash-body { padding: 0; }
  body { background: #fff; }
}
