/* The Hub — the whole design system, from the DAYDA brand system (Codex v.01),
 * handed off as "Hub by DAYDA.dc.html".
 *
 * Three rules carry most of the look and all three are load-bearing, so they
 * are stated once here rather than repeated per screen:
 *
 *   THERE IS NO ACCENT COLOUR. Ink is the action — every button, every active
 *   state, every emphasis is #00000F on warm off-white. Lapis belongs to
 *   CENTRELINE and nothing else; the three status tints belong to sync state
 *   and nothing else. The moment a fourth thing is blue, blue stops meaning
 *   CENTRELINE.
 *
 *   EVERY CORNER IS 3px. Not 4, not 8, and never a pill. The brand is drawn
 *   with hairlines and right angles; a soft corner reads as a different family.
 *
 *   SURFACES ARE GLASS — a white gradient over the page wash, a white hairline,
 *   a shallow shadow. They sit ON the page; they are not boxes drawn over it.
 *   Tables are not surfaces at all: they are rules on the page itself.
 *
 * Two conventions that keep this file the only place colour lives:
 *
 *   Inline `style=` may carry a computed geometry value — a bar's width or
 *   height percentage — and nothing else. Never a colour, never a font. It is
 *   checkable in one line: `grep -rn 'style="[^"]*#' hub/` must come back empty.
 *
 *   Inline SVG uses `stroke="currentColor"`, so its colour comes from CSS and
 *   can never drift from the token.
 *
 * No build step, no CSS framework, no CDN. The typefaces are committed under
 * hub/fonts/ and declared below: the deployed CSP is `font-src 'self' data:`
 * with no third-party origin, so a Google Fonts <link> does not work — and
 * fails quietly, falling back to the system stack with one console line. See
 * hub/fonts/LICENSES.md before touching the @font-face block.
 */

/* ── typefaces ───────────────────────────────────────────────────────────── */
/* Space Grotesk and Archivo are VARIABLE: one file per subset, declared with a
 * weight range. The display type needs a real 300 and a fixed-weight face would
 * make the browser synthesize it. DM Mono has no variable build, hence two. */

@font-face {
  font-family: 'Space Grotesk'; font-style: normal; font-weight: 300 700; font-display: swap;
  src: url('../fonts/space-grotesk-var-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Space Grotesk'; font-style: normal; font-weight: 300 700; font-display: swap;
  src: url('../fonts/space-grotesk-var-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Archivo'; font-style: normal; font-weight: 300 600; font-stretch: 100%; font-display: swap;
  src: url('../fonts/archivo-var-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Archivo'; font-style: normal; font-weight: 300 600; font-stretch: 100%; font-display: swap;
  src: url('../fonts/archivo-var-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'DM Mono'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('../fonts/dm-mono-400-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'DM Mono'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('../fonts/dm-mono-400-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'DM Mono'; font-style: normal; font-weight: 500; font-display: swap;
  src: url('../fonts/dm-mono-500-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'DM Mono'; font-style: normal; font-weight: 500; font-display: swap;
  src: url('../fonts/dm-mono-500-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ── tokens ──────────────────────────────────────────────────────────────── */

:root {
  /* palette — Basalt Core ink on Grano White, with a warm grey ramp */
  --ink: #00000F;          /* Basalt Core — text, fills, every action */
  --ink-lift: #20202C;     /* the only hover shift; #00000F is not #000 */
  --ink-2: #4A4842;        /* long-form copy */
  --ink-3: #6E6B66;        /* secondary copy, descriptions */
  --muted: #9B978F;        /* micro-labels, sub-lines */
  --muted-2: #B4B0A8;      /* timestamps, axis */
  --faint: #C9C6C0;        /* chevrons, dashed edges */
  --ash: #A49C90;          /* Sediment Ash */
  --slate: #7E8599;        /* Slate Echo */
  --paper: #F1F0ED;        /* Grano White */
  --white: #FFFFFF;
  --danger: #A03232;
  --danger-ink: #7E2A2A;

  /* structure — four line weights, each meaning something different */
  --rule: #E2E1DD;         /* divider, column-head underline, card foot */
  --rule-soft: #EAE9E5;    /* row separator */
  --rule-strong: #00000F;  /* the 1px ink rule that opens every table */
  --track: #E9E8E4;        /* meter and chart ground */
  --line-nav: rgba(1, 1, 1, 0.08);
  --line-field: rgba(1, 1, 1, 0.10);

  /* identity and state — the only colours in the system */
  --centreline: #486AB5;   /* Lapis Signal — CENTRELINE identity, never decoration */
  --sand-deep: #77705C;    /* CENTRELINE's own tile colour (maintainer's design
                              system: the tool runs on Warm Sand, Pack Zero keeps
                              Lapis). The CL mark is a SPEC, not an asset — tile +
                              white "CL" + radius at 25% of the tile, reproduced
                              here with the Hub's display face. */
  --ok: #B9D2B5;           /* synced */
  --warn: #FFCB39;         /* local changes not yet pushed */
  --idle: #E2E1DD;         /* manual backup / disabled — no state to report */

  /* type */
  --font-display: 'Space Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-body: Archivo, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'DM Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace;

  /* surface — one recipe, used everywhere something floats */
  --glass: linear-gradient(180deg, rgba(255, 255, 255, 0.94) 0%, rgba(255, 255, 255, 0.74) 100%);
  --glass-edge: 1px solid rgba(255, 255, 255, 0.92);
  --glass-blur: blur(20px) saturate(140%);
  --shadow-low: 0 10px 30px rgba(28, 38, 42, 0.06);
  --shadow-mid: 0 18px 44px rgba(28, 38, 42, 0.10);

  /* geometry */
  --r: 3px;
  --r-sm: 2px;
  --pad-x: 48px;
  --nav-h: 66px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body { margin: 0; padding: 0; }

body {
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(58% 48% at 12% 6%, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0) 100%),
    radial-gradient(52% 46% at 90% 96%, rgba(17, 17, 17, 0.055) 0%, rgba(17, 17, 17, 0) 100%),
    var(--paper);
  background-attachment: fixed;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input { font: inherit; }
img { display: block; }

.warn-list {
  margin: 12px 0 0;
  padding-left: 18px;
  font: 400 13px/1.6 var(--font-body);
  color: var(--ink-3);
}

/* The nav is full-bleed so its hairline reaches both edges; the content sits
 * inside its own gutter. That is why the header is a sibling of .shell, not a
 * child of it. */
.shell { max-width: 1440px; margin: 0 auto; padding: 52px var(--pad-x) 56px; }

/* ── navigation: one 66px line, no sidebar, no rail ──────────────────────── */

/* The hairline is full-bleed, but the items on it have to line up with the
 * shell's centred 1440 column. The max() padding does both without a wrapper
 * element — which matters because renderNav() injects straight into .nav. */
.nav {
  height: var(--nav-h); gap: 44px;
  padding: 0 max(var(--pad-x), calc((100% - 1440px) / 2 + var(--pad-x)));
  display: flex; align-items: center;
  border-bottom: 1px solid var(--line-nav);
}

/* The mark: the DAYDA rune, a hairline, then the product name. The rune is the
 * studio; `hub` is the product. They are separated, never merged. */
.wordmark { display: flex; align-items: center; gap: 11px; }
.wordmark img { width: 22px; height: 22px; }
.wordmark .bar { width: 1px; height: 15px; background: var(--rule); flex: none; }
.wordmark .hub { font: 500 19px/1 var(--font-display); letter-spacing: -0.045em; color: var(--ink); }

.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a {
  font: 400 10.5px/1 var(--font-mono); letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--muted); padding-bottom: 5px;
  border-bottom: 1.5px solid transparent;
}
.nav-links a:hover { color: var(--ink-3); }
.nav-links a[aria-current='page'] { font-weight: 500; color: var(--ink); border-bottom-color: var(--ink); }

.nav-right { display: flex; align-items: center; gap: 18px; margin-left: auto; }
.nav-clock {
  font: 400 10px/1 var(--font-mono); letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--muted-2);
}

.avatar {
  width: 30px; height: 30px; border-radius: var(--r); background: var(--ink);
  display: flex; align-items: center; justify-content: center;
  font: 400 10px/1 var(--font-mono); color: var(--white);
}
.account { position: relative; }
.account-menu {
  position: absolute; right: 0; top: 40px; min-width: 200px; padding: 6px; z-index: 40;
  background: var(--glass); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
  border: var(--glass-edge); border-radius: var(--r); box-shadow: var(--shadow-mid);
}
.account-menu[hidden] { display: none; }
.account-menu .who { padding: 10px 12px 12px; border-bottom: 1px solid var(--rule); }
.account-menu .who b { display: block; font: 400 14px/1.3 var(--font-body); color: var(--ink); }
.account-menu .who span { display: block; margin-top: 5px; font: 400 12px/1 var(--font-body); color: var(--muted); }
.account-menu button {
  display: flex; align-items: center; gap: 9px; width: 100%; text-align: left;
  padding: 10px 12px; border-radius: var(--r);
  font: 400 13px/1 var(--font-body); color: var(--ink-3);
}
.account-menu button:hover { background: rgba(1, 1, 1, 0.04); color: var(--ink); }

/* ── type ───────────────────────────────────────────────────────────────── */

.greeting { margin: 0; font: 300 46px/1.06 var(--font-display); letter-spacing: -0.04em; color: var(--ink); }
.greeting b { font-weight: 500; }
.page-title { margin: 0; font: 300 40px/1.06 var(--font-display); letter-spacing: -0.04em; color: var(--ink); }

/* Three micro-label sizes, each with its own tracking. Every uppercase label in
 * the system is one of these three, so the tracking values live in one place. */
.eyebrow {
  font: 400 10px/1 var(--font-mono); letter-spacing: 0.20em;
  text-transform: uppercase; color: var(--muted);
}
.col-head {
  font: 400 9.5px/1 var(--font-mono); letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--muted);
}
/* .micro carries no colour on purpose — it is used for both ink values and
 * faint timestamps, and the caller decides which. */
.micro { font: 400 10px/1 var(--font-mono); letter-spacing: 0.14em; text-transform: uppercase; }

/* The one interactive micro-label: nav items, "OPEN", "ALL PROJECTS". */
.navlink {
  display: inline-flex; align-items: center; gap: 7px;
  font: 500 10.5px/1 var(--font-mono); letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--ink);
}
.meta { font: 400 13px/1 var(--font-body); color: var(--ink-3); }

/* ── surfaces ───────────────────────────────────────────────────────────── */

/* One recipe. The previous brand had a second, dimmer `.surface-quiet` for
 * panels; DAYDA squares everything off and there is nothing left for it to say. */
.surface {
  background: var(--glass); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
  border: var(--glass-edge); border-radius: var(--r); box-shadow: var(--shadow-low);
}

/* ── controls ───────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 18px; border-radius: var(--r);
  font: 500 12.5px/1 var(--font-display); white-space: nowrap;
}
.btn-primary { background: var(--ink); color: var(--white); }
.btn-primary:hover { background: var(--ink-lift); }
.btn-secondary { background: transparent; color: var(--ink); border: 1px solid var(--ink); }
.btn-secondary:hover { background: rgba(0, 0, 15, 0.05); }
.btn-danger { background: var(--danger); color: var(--white); }
.btn-danger:hover { background: #8C2B2B; }
.btn-sm { height: 34px; padding: 0 14px; font-size: 12px; }
.btn:disabled { opacity: 0.45; cursor: default; }
.btn .icon { width: 17px; height: 17px; }

.icon {
  width: 18px; height: 18px; display: inline-block; vertical-align: middle;
  fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round;
}
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: var(--r); color: var(--faint);
}
.icon-btn:hover { color: var(--ink); background: rgba(1, 1, 1, 0.04); }

.field { position: relative; display: flex; flex-direction: column; gap: 8px; }
.field label {
  font: 400 10px/1 var(--font-mono); letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--muted);
}
.field input {
  height: 48px; padding: 0 14px; border-radius: var(--r);
  background: rgba(255, 255, 255, 0.86); border: 1px solid var(--line-field);
  font: 400 14px/1 var(--font-body); color: var(--ink);
}
.field input:focus { outline: none; border: 1.5px solid var(--ink); background: rgba(255, 255, 255, 0.96); }

/* The password reveal sits inside the field, so the input reserves room for it. */
.field-reveal input { padding-right: 44px; }
.field-reveal .reveal {
  position: absolute; right: 0; bottom: 0; width: 44px; height: 48px;
  display: flex; align-items: center; justify-content: center; color: var(--muted);
}
.field-reveal .reveal:hover { color: var(--ink); }

.search {
  display: flex; align-items: center; gap: 10px; width: 280px; height: 42px; padding: 0 14px;
  border-radius: var(--r); background: var(--glass);
  backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
  border: var(--glass-edge); box-shadow: var(--shadow-low);
}
.search .icon { color: var(--muted); flex: none; }
.search input { flex: 1; min-width: 0; border: 0; background: none; font: 400 13px/1 var(--font-body); }
.search input:focus { outline: none; }
.search input::placeholder { color: var(--muted); }

/* Filter and period selectors. DAYDA draws these as separate outlined tags, not
 * as one grouped track — so there is no container chrome, only a gap. */
.chips { display: flex; align-items: center; gap: 8px; }
.chips button {
  height: 30px; padding: 0 14px; border-radius: var(--r);
  background: transparent; border: 1px solid var(--rule);
  font: 400 10px/1 var(--font-mono); letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--ink-3);
}
.chips button:hover { border-color: var(--faint); color: var(--ink); }
.chips button[aria-pressed='true'] {
  background: var(--ink); border-color: var(--ink); color: var(--white);
}
.chips-lg button { height: 34px; }

/* ── status vocabulary: dot + one word, nothing else ────────────────────── */

.status { display: inline-flex; align-items: center; gap: 9px; font: 400 13px/1 var(--font-body); color: var(--ink-3); }
.status .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--idle); flex: none; }
.status[data-state='synced'] .dot { background: var(--ok); }
.status[data-state='pending'] .dot { background: var(--ok); }
.status[data-state='local'] .dot { background: var(--warn); }
.status[data-state='conflict'] .dot { background: var(--warn); }
/* --idle is the hairline colour, so this dot needs an edge or it vanishes on a
 * light row. It also carries "Disabled" on the Users screen. */
.status[data-state='manual'] .dot { background: var(--idle); box-shadow: inset 0 0 0 1px var(--faint); }

/* ── app marks: the only place Lapis appears ────────────────────────────── */

.chip {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 14px; height: 14px; border-radius: var(--r);
  font: 500 6.5px/1 var(--font-display); color: var(--white); background: var(--ink);
}
/* The CL tile follows the maintainer's mark spec (round 5): Sand Deep fill,
   white bold "CL", corner radius = 25% of the tile (his 28px tile uses r7). */
.chip[data-app='centreline'] {
  background: var(--sand-deep); color: var(--white);
  border: none; border-radius: 25%; font-size: 6px; font-weight: 700; letter-spacing: -0.03em;
}
.chip-lg { width: 48px; height: 48px; font: 500 15px/1 var(--font-display); letter-spacing: -0.02em; }
.chip-lg[data-app='centreline'] { font-size: 13.5px; }
.chip-xl { width: 64px; height: 64px; font: 500 19px/1 var(--font-display); letter-spacing: -0.03em; }
.chip-xl[data-app='centreline'] { font-size: 18px; }

/* Stage badge — one quiet word on its own line, under the tool name (the
   mock's placement): outlined chip, mono, never competing with the title.
   The WORD is per tool and has moved twice (Beta → Alpha, then Pack Zero to
   Dev mode); the drawing deliberately has not, which is why the class names a
   slot rather than a stage. CENTRELINE's own ALPHA badge is turquoise inside
   the tool, and that is the tool's voice, not the Hub's. */
.badge-stage {
  display: inline-block; align-self: flex-start; width: fit-content;
  margin: 6px 0 2px; padding: 4px 8px;
  border: 1px solid var(--rule-strong); border-radius: var(--r);
  font: 500 9.5px/1 var(--font-mono); letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-3);
}

/* ── tables: rules on the page, not a panel ─────────────────────────────── */

.table { margin-top: 28px; border-top: 1px solid var(--rule-strong); }
.table .row {
  display: grid; align-items: center; gap: 20px;
  padding: 20px 2px; border-bottom: 1px solid var(--rule-soft);
}
.table .row.head { padding: 12px 2px; border-bottom: 1px solid var(--rule); }
.table .row:last-child { border-bottom: 0; }
.row-name { font: 400 16px/1.2 var(--font-body); color: var(--ink); }
.row-sub { display: flex; align-items: center; gap: 7px; margin-top: 7px; font: 400 12.5px/1 var(--font-body); color: var(--muted); }
.row-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.row-go { color: var(--faint); justify-self: end; }

/* The row itself is the open affordance — the design has no per-row button, and
 * a whole row is a larger target than one. The kebab stops propagation. Since
 * the row carries no visible control, the hover has to say it is one: a wash and
 * an underline, which is as much as this brand will allow. */
.row[data-uid] { cursor: pointer; }
.row[data-uid]:hover { background: rgba(255, 255, 255, 0.55); }
.row[data-uid]:hover .row-name, a.row:hover .row-name { text-decoration: underline; text-underline-offset: 3px; }

/* Projects rows. Lives here rather than page-local because .table sets the
 * shared geometry and only the column ratio is page-specific. */
.p-row { grid-template-columns: 1fr 150px 140px 150px 40px; }

/* Every screen puts its error notice directly inside the shell, under the head. */
.shell > .notice { margin-top: 16px; }

/* ── menus ──────────────────────────────────────────────────────────────── */

.menu {
  position: absolute; right: 0; top: 34px; min-width: 210px; padding: 6px; z-index: 30;
  background: var(--glass); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
  border: var(--glass-edge); border-radius: var(--r); box-shadow: var(--shadow-mid);
}
.menu[hidden] { display: none; }
.menu button {
  display: block; width: 100%; text-align: left; padding: 10px 12px; border-radius: var(--r);
  font: 400 13px/1 var(--font-body); color: var(--ink-3);
}
.menu button:hover { background: rgba(1, 1, 1, 0.04); color: var(--ink); }
.menu button.danger { color: var(--danger); }
.menu-anchor { position: relative; }

/* ── feedback ───────────────────────────────────────────────────────────── */

.empty { padding: 60px 24px; text-align: center; }
.empty h3 { margin: 0; font: 500 20px/1.3 var(--font-display); letter-spacing: -0.02em; color: var(--ink); }
.empty p { margin: 12px auto 0; max-width: 460px; font: 400 14px/1.6 var(--font-body); color: var(--ink-3); }
.empty .btn { margin-top: 24px; }

.notice {
  display: flex; align-items: center; gap: 10px; padding: 13px 16px; border-radius: var(--r);
  font: 400 13.5px/1.5 var(--font-body);
}
.notice-error { background: rgba(160, 50, 50, 0.08); color: var(--danger-ink); }
.notice-info { background: rgba(1, 1, 1, 0.04); color: var(--ink-3); }
.notice[hidden] { display: none; }

/* CENTRELINE return-sync card (round 4) — a .notice that stacks its parts. */
.cl-sync-card { flex-direction: column; align-items: flex-start; gap: 8px; margin-bottom: 20px; }
.cl-sync-card b { font: 600 13px/1 var(--font-display); color: var(--ink); }
.cl-sync-body { margin: 0; }
.cl-sync-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.cl-sync-err { margin: 0; color: var(--danger-ink); }
.cl-sync-err[hidden] { display: none; }

.skeleton { color: var(--muted-2); font: 400 13.5px/1.4 var(--font-body); padding: 28px 2px; }

/* ── login (3a) ─────────────────────────────────────────────────────────── */

/* DAYDA's sign-in is bare: the studio lockup in the corner, one card in the
 * middle. The previous brand blurred the product behind glass; this one does
 * not show a signed-out visitor anything at all. */
.login-wrap { position: relative; min-height: 100vh; display: flex; align-items: center; justify-content: center; }
.login-mark { position: absolute; left: var(--pad-x); top: 34px; width: 74px; }
.login-card {
  position: relative; width: 440px; padding: 48px 48px 40px; border-radius: var(--r);
  background: var(--glass); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
  border: var(--glass-edge); box-shadow: var(--shadow-low);
}
.login-card .wordmark { gap: 16px; }
.login-card .wordmark img { width: 38px; height: 38px; }
.login-card .wordmark .bar { height: 26px; }
.login-card .wordmark .hub { font-size: 30px; }
.login-card .sub { margin: 14px 0 0; font: 400 14px/1.5 var(--font-body); color: var(--ink-3); }
.login-card .notice { margin-top: 20px; }
.login-card .fields { display: flex; flex-direction: column; gap: 16px; margin-top: 36px; }
.login-card .btn { width: 100%; height: 48px; margin-top: 30px; font-size: 13px; }
.login-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--rule);
}
.login-foot .micro { color: var(--muted); }
.login-foot a { font: 400 12px/1 var(--font-body); color: var(--ink); border-bottom: 1px solid var(--rule); padding-bottom: 2px; }
.login-foot a:hover { border-bottom-color: var(--ink); }

/* ── home (3b) ──────────────────────────────────────────────────────────── */

.home-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 60px; }

/* "Continue" — the one thing the operator is most likely to want, given the
 * weight of a full ink rule and nothing else. */
.continue { width: 330px; padding-top: 14px; border-top: 1px solid var(--ink); }
.continue[hidden] { display: none; }
.continue .line { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 11px; }
.continue .name { display: block; font: 400 15px/1.2 var(--font-body); color: var(--ink); }
.continue .meta { display: block; margin-top: 6px; font: 400 12.5px/1 var(--font-body); color: var(--muted); }
.continue .icon { color: var(--ink); flex: none; }
.continue:hover .name { text-decoration: underline; text-underline-offset: 3px; }

.tools { display: flex; gap: 20px; margin-top: 46px; }
.tool { flex: 1; min-height: 236px; padding: 30px 32px 26px; display: flex; flex-direction: column; }
.tool-name { margin: 30px 0 0; font: 500 28px/1.1 var(--font-display); letter-spacing: -0.035em; color: var(--ink); }
.tool[data-app='centreline'] .tool-name { letter-spacing: -0.01em; }
.tool-what { margin: 9px 0 0; max-width: 330px; font: 400 13.5px/1.5 var(--font-body); color: var(--ink-3); }
.tool-fill { flex: 1; min-height: 30px; }
.tool-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding-top: 18px; border-top: 1px solid var(--rule);
}
.tool-mode { font: 400 12.5px/1 var(--font-body); color: var(--muted); }

.recent-head { display: flex; align-items: baseline; justify-content: space-between; margin-top: 52px; }
.recent-head a { border-bottom: 1px solid var(--faint); padding-bottom: 3px; }
.recent { display: flex; flex-direction: column; margin-top: 14px; border-top: 1px solid var(--rule-strong); }
.recent .row {
  display: grid; grid-template-columns: 1fr 140px 110px 152px 24px; align-items: center; gap: 24px;
  padding: 17px 2px; border-bottom: 1px solid var(--rule-soft);
}
.recent .row:last-child { border-bottom: 0; }
.recent .row .name { font: 400 16px/1.2 var(--font-body); color: var(--ink); }
.recent .row:hover .name { text-decoration: underline; text-underline-offset: 3px; }
.recent .row .when { color: var(--muted-2); }

/* ── tools (3d) ─────────────────────────────────────────────────────────── */

/* The previous brand sold these with drawn previews. DAYDA sells them with a
 * spec sheet: what build, how it saves, who can open it. */
.tool-cards { display: flex; gap: 22px; margin-top: 48px; align-items: stretch; }
.tool-card { flex: 1; padding: 40px 40px 32px; display: flex; flex-direction: column; }
.tool-card .tool-name { margin-top: 32px; font-size: 34px; line-height: 1.06; letter-spacing: -0.04em; }
.tool-card[data-app='centreline'] .tool-name { letter-spacing: -0.015em; }
.tool-card .tool-what { margin-top: 12px; max-width: 400px; font-size: 15px; }
.tool-card .btn { margin-top: 34px; width: 100%; height: 50px; font-size: 13px; }

/* margin-bottom:auto absorbs the free space in the card, so the two CTAs line up
 * with each other even when one description wraps to more lines than the other. */
.spec { margin-top: 40px; margin-bottom: auto; border-top: 1px solid var(--rule); }
.spec div { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 13px 0; border-bottom: 1px solid var(--rule-soft); }
.spec div:last-child { border-bottom: 0; }
.spec dt {
  font: 400 10px/1 var(--font-mono); letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--muted);
}
.spec dd {
  margin: 0; font: 400 10px/1 var(--font-mono); letter-spacing: 0.10em;
  text-transform: uppercase; color: var(--ink); text-align: right;
}

/* ── admin (3e) ─────────────────────────────────────────────────────────── */

/* The mock shows one "Admin" nav item and two admin screens, so Usage would be
 * unreachable without this. Same idiom as the nav line, one level down. */
.subnav { display: flex; align-items: center; gap: 24px; margin-bottom: 26px; }
.subnav a {
  font: 400 10.5px/1 var(--font-mono); letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--muted);
  padding-bottom: 5px; border-bottom: 1.5px solid transparent;
}
.subnav a:hover { color: var(--ink-3); }
.subnav a[aria-current='page'] { font-weight: 500; color: var(--ink); border-bottom-color: var(--ink); }

.head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.head-actions { display: flex; align-items: center; gap: 10px; }
.toolbar { display: flex; align-items: center; gap: 12px; margin-top: 36px; }
.toolbar .count { margin-left: auto; font: 400 13px/1 var(--font-body); color: var(--muted); }
/* The tool a project belongs to, as a word rather than a badge. Named .row-tool,
 * not .tool: the latter is the Home tool card and carries a min-height. */
.row-tool { color: var(--ink-3); }

.stats { display: flex; gap: 22px; margin-top: 40px; }
.stat { flex: 1; padding: 22px 24px; }
.stat .n {
  margin-top: 14px; font: 500 34px/1 var(--font-display);
  letter-spacing: -0.04em; color: var(--ink); font-feature-settings: 'tnum' 1;
}
.row.is-disabled { opacity: 0.62; }

/* Tool availability (migration 004). An unavailable tool is DIMMED, never
 * removed: a card that vanishes makes somebody hunt for the tool, while a dim
 * one with an honest Access line answers the question on the spot. Same 0.62 as
 * a disabled member row, because it means the same thing. */
.tool.is-unavailable, .tool-card.is-unavailable { opacity: 0.62; }
.btn.is-disabled, .navlink.is-disabled {
  pointer-events: none; opacity: 0.45; cursor: default;
}

/* The WHOLE card opens the tool, not just the control in the corner. A tester
 * on it: "the panel reads as a button and when I clicked it I thought it was
 * broken or frozen." The card was already making the promise; this is the
 * promise being kept, in the styling as well as the handler.
 *
 * `.is-openable` is written by applyToolCard and means available — so a tool
 * switched off in the admin panel keeps the default cursor and gets no lift,
 * and the dimmed card is not quietly inviting a click it will refuse. (It
 * still ANSWERS one, with the same notice the dead button gives.) */
.tool.is-openable, .tool-card.is-openable { cursor: pointer; }
.tool.is-openable:hover, .tool-card.is-openable:hover {
  box-shadow: var(--shadow-mid); border-color: rgba(255, 255, 255, 1);
}
/* Hovering anywhere on the card lights its CTA, so the eye is told what the
 * click is going to do before it happens. */
.tool-card.is-openable:hover .btn-primary { background: var(--ink-lift); }
.tool-card.is-openable:hover .btn-secondary { background: rgba(0, 0, 15, 0.05); }
.tool.is-openable:hover .navlink { text-decoration: underline; text-underline-offset: 3px; }

/* The admin's own words, where the person who is refused can actually read them
 * — the tooltip they used to live in is invisible on a touch device. Held at
 * full ink against the dimmed card, because it is the one line on it that still
 * has something to say. */
.tool-note {
  margin: 10px 0 0; padding-left: 11px;
  border-left: 2px solid var(--rule-strong);
  font-size: 13px; line-height: 1.45; color: var(--ink-2);
}

/* The two availability switches on Admin · Users. A compact row each, so the
 * panel reads at a glance and does not push the member list off the fold. */
/* Tool availability — its own admin screen since it stopped being a block
 * appended to Users. One block per tool, identical structure, separated by the
 * same hairline the tables use: two tools that read as one settings system. */
.avail-tools { margin-top: 34px; border-top: 1px solid var(--rule-strong); }
.avail-tool { padding: 26px 2px; border-bottom: 1px solid var(--rule-soft); }
.avail-head { display: flex; align-items: center; gap: 12px; }
.avail-name { margin: 0; font: 400 17px/1.2 var(--font-display); color: var(--ink); }
/* Controls on one line at desk width, stacking before they crowd. */
.avail-controls {
  margin-top: 14px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
}
.avail-controls input { flex: 1 1 320px; min-width: 240px; }
.avail-tool input {
  width: 100%; padding: 9px 12px; border: 1px solid var(--line-field);
  border-radius: var(--r-sm); background: var(--white);
  font: 400 13px/1.3 var(--font-body); color: var(--ink);
}
.avail-tool input:focus { outline: none; border-color: var(--ink); }
.avail-tool input:disabled { color: var(--muted); background: var(--paper); }

/* The preview, directly under the switch that causes it, and only when there is
 * something to preview.
 *
 * A REFERENCE, not a reproduction. It was a full-size Home card, which on a
 * settings screen read as the page's main subject and left a field of empty
 * space around it. What an admin needs to check is the state — subdued, dead
 * action, and their own words — so the shell is one row and the state is
 * rendered by the same applyToolCard the real pages use. */
.avail-preview { margin-top: 18px; }
.avail-preview .eyebrow { margin-bottom: 8px; }
.tool-preview {
  display: grid; grid-template-columns: auto 1fr auto auto;
  align-items: center; gap: 12px;
  max-width: 460px; padding: 12px 14px;
  border: 1px solid var(--rule); border-radius: var(--r);
  background: var(--white);
  pointer-events: none;                 /* a specimen, never a control */
}
.tool-preview.is-unavailable { opacity: 0.62; }
.tp-name { font: 400 14px/1.2 var(--font-body); color: var(--ink); }
.tp-access {
  font: 400 10px/1 var(--font-mono); letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--muted);
}
.tool-preview .tp-open { padding: 5px 12px; font-size: 12px; }
/* The note is appended by setToolNote with no .tool-what to follow, so it lands
 * last — spanning the row, which is where a sentence belongs. */
.tool-preview .tool-note {
  grid-column: 1 / -1; margin-top: 2px; font-size: 12px;
}

/* ── usage (3f) ─────────────────────────────────────────────────────────── */

.range { margin: 14px 0 0; color: var(--muted); }

.tiles { display: flex; gap: 22px; margin-top: 40px; }
.tile { flex: 1; padding: 24px 26px; }
.tile .n {
  margin-top: 16px; font: 500 40px/1 var(--font-display);
  letter-spacing: -0.04em; color: var(--ink); font-feature-settings: 'tnum' 1;
}
.tile .n .unit { font-size: 20px; letter-spacing: 0; color: var(--muted); }
.tile .note { margin-top: 12px; font: 400 12.5px/1 var(--font-body); color: var(--ink-3); }

/* One meter, three tones. The tone says which thing is being measured; the
 * width is the only value inline style may carry. */
.meter { height: 5px; margin-top: 16px; background: var(--track); border-radius: var(--r-sm); overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--ink); }
.meter i[data-app='centreline'] { background: var(--centreline); }
.meter i[data-tone='ash'] { background: var(--ash); }

.panels { display: flex; gap: 22px; margin-top: 36px; align-items: stretch; }
.panel { flex: 1; padding: 26px 28px 22px; display: flex; flex-direction: column; }
.panel-wide { flex: 1.4; }
.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.panel-head .micro { color: var(--muted-2); }

.chart { display: flex; align-items: flex-end; gap: 11px; height: 200px; margin-top: 26px; }
.chart .bar { flex: 1; background: var(--rule); min-height: 2px; }
.chart .bar[data-recent='true'] { background: var(--slate); }
.chart .bar:last-child { background: var(--ink); }
.chart-axis {
  display: flex; justify-content: space-between; margin-top: 14px; padding-top: 12px;
  border-top: 1px solid var(--rule); color: var(--muted-2);
}

.split { display: flex; align-items: center; gap: 22px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--rule); }
.split > div { flex: 1; }
.split-line { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.split-name { font: 400 12.5px/1 var(--font-body); color: var(--ink-3); }
.split-pct { font: 400 12px/1 var(--font-mono); color: var(--ink); }

.bar-line { height: 5px; margin-top: 9px; background: var(--track); overflow: hidden; }
.bar-line i { display: block; height: 100%; background: var(--ink); }
.bar-line i[data-app='centreline'] { background: var(--centreline); }
/* Calls that named no tool. Deliberately the quietest bar on the panel: it is
   a gap in the data, not a third product. */
.bar-line i[data-app='unattributed'] { background: var(--ash); }
/* The per-member ranking ramp. Four steps, in CSS rather than a JS array, so
 * the palette cannot drift from the tokens. */
.bar-line i[data-tier='0'] { background: var(--ink); }
.bar-line i[data-tier='1'] { background: var(--slate); }
.bar-line i[data-tier='2'] { background: var(--ash); }
.bar-line i[data-tier='3'] { background: var(--faint); }

.rank { display: flex; flex-direction: column; margin-top: 20px; }
.rank .r { padding: 13px 0; border-bottom: 1px solid var(--rule-soft); }
.rank .r:last-child { border-bottom: 0; }
.rank .line { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.rank .who { font: 400 14px/1 var(--font-body); color: var(--ink); }
.rank .n { font: 400 12px/1 var(--font-mono); color: var(--ink); }
.rank .track { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.rank .track .bar-line { flex: 1; height: 4px; margin: 0; }
.rank .track span { width: 60px; text-align: right; color: var(--muted); }

/* ── dialogs ────────────────────────────────────────────────────────────── */

dialog {
  padding: 0; border: 0; border-radius: var(--r); max-width: 460px; width: calc(100% - 48px);
  background: var(--glass); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
  border: var(--glass-edge); box-shadow: var(--shadow-mid); color: var(--ink);
}
dialog::backdrop { background: rgba(241, 240, 237, 0.72); backdrop-filter: blur(3px); }
dialog .dlg { padding: 30px 32px 26px; }
dialog h2 { margin: 0 0 12px; font: 500 22px/1.15 var(--font-display); letter-spacing: -0.03em; }
dialog p { margin: 0; font: 400 14px/1.6 var(--font-body); color: var(--ink-3); }
dialog .fields { display: flex; flex-direction: column; gap: 16px; margin-top: 22px; }
dialog .notice { margin-top: 16px; }
dialog .dlg-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 26px; }

/* ── narrow viewports ───────────────────────────────────────────────────── */

/* The design is a fixed 1440 frame, so it cannot answer this. Two things have
 * to give: the 48px gutter, and the multi-column rows — which are tighter here
 * than in the previous brand and would otherwise overflow. */
@media (max-width: 1100px) {
  :root { --pad-x: 24px; }
  .shell { padding: 36px var(--pad-x) 48px; }
  .nav { gap: 24px; }
  .tools, .tool-cards, .tiles, .panels, .stats { flex-direction: column; }
  .home-head { flex-direction: column; align-items: stretch; gap: 30px; }
  .continue { width: auto; }
  .head-row, .toolbar { flex-wrap: wrap; }
  .toolbar .count { margin-left: 0; }
}

@media (max-width: 860px) {
  .nav { height: auto; padding: 14px var(--pad-x); flex-wrap: wrap; row-gap: 12px; }
  .nav-right { width: 100%; }
  /* Stacked cells beat a horizontal scrollbar: every column keeps its label
     order, nothing is hidden, and no row can overflow. */
  .table .row, .recent .row { grid-template-columns: 1fr; gap: 9px; justify-items: start; }
  .table .row.head { display: none; }
  .row-actions, .recent .row .status { justify-content: flex-start; }
  .row-go { display: none; }
  .search { width: 100%; }
}
