/* ===========================================================================
   Employment Services Platform — interface system

   The shell uses a layout familiar from enterprise software:
   persistent top bar with global search, a left navigation rail, a tile
   home, object pages with a summary rail and tabs, dense sortable grids, and
   a related-actions menu on every object.

   Where it goes further: a command palette on Cmd/Ctrl-K, slide-over detail
   panels instead of full page loads, saved views, a density control, dark
   mode, and keyboard navigation throughout. All of it degrades — every action
   is a real link or form and works with JavaScript switched off.
   ======================================================================== */

:root {
  --font-display: "Inter Tight", "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-body: "Inter", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --font-data: ui-monospace, "SF Mono", "Cascadia Mono", "Roboto Mono", Menlo, monospace;

  /* Light theme ---------------------------------------------------------- */
  --canvas: #eaeef4;
  --surface: #ffffff;
  --surface-2: #f5f8fc;
  --surface-3: #eaeff7;
  --rail: #10192b;
  --rail-ink: #aab6cc;
  --rail-ink-active: #ffffff;
  --rail-active: #1d3050;

  --ink: #101a2b;
  --ink-2: #4b5a72;
  --ink-3: #7b8aa3;
  --line: #dae1ec;
  --line-2: #c3cddd;

  --brand: #0b4ecc;
  --brand-hover: #0940a8;
  --brand-soft: #e4edfd;
  --brand-ink: #073a99;

  /* Related actions keep the warm accent enterprise users associate with a
     contextual object menu. It is the only warm colour in the system, which
     is what makes it findable. */
  --accent: #c2410c;
  --accent-soft: #fdece2;

  --ok: #0a7048;
  --ok-soft: #dff3e9;
  --warn: #8a5a00;
  --warn-soft: #fcf0d9;
  --stop: #b3261e;
  --stop-soft: #fce8e6;

  --focus: #ffc400;
  --shadow-1: 0 1px 2px rgba(16, 26, 43, 0.07);
  --shadow-2: 0 2px 4px rgba(16, 26, 43, 0.06), 0 8px 24px rgba(16, 26, 43, 0.08);
  --shadow-3: 0 12px 48px rgba(16, 26, 43, 0.22);

  --radius: 8px;
  --radius-lg: 14px;
  --topbar-h: 56px;
  --rail-w: 236px;
  --rail-w-collapsed: 60px;

  /* Density control. The compact setting is what a manager reviewing 300 rows
     wants; comfortable is what an adviser reading one record wants. */
  --row-y: 0.7rem;
  --gap: 1.15rem;
  --card-p: 1.25rem;
}

[data-theme="dark"] {
  --canvas: #0b111c;
  --surface: #141d2c;
  --surface-2: #1a2536;
  --surface-3: #212e43;
  --rail: #0a0f19;
  --rail-ink: #93a2bb;
  --rail-active: #1c2b45;

  --ink: #e9eef7;
  --ink-2: #a8b6cc;
  --ink-3: #7e8da6;
  --line: #253046;
  --line-2: #33415c;

  --brand: #5c95ff;
  --brand-hover: #7dabff;
  --brand-soft: #16294a;
  --brand-ink: #a9c8ff;

  --accent: #f97b4f;
  --accent-soft: #3a1f13;

  --ok: #3fc48b;
  --ok-soft: #10301f;
  --warn: #e0aa4a;
  --warn-soft: #33260f;
  --stop: #f2685f;
  --stop-soft: #3a1614;

  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-2: 0 2px 6px rgba(0, 0, 0, 0.4), 0 10px 30px rgba(0, 0, 0, 0.35);
  --shadow-3: 0 16px 60px rgba(0, 0, 0, 0.6);
}

[data-density="compact"] {
  --row-y: 0.4rem;
  --gap: 0.85rem;
  --card-p: 0.95rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-family: var(--font-display); letter-spacing: -0.018em; margin: 0 0 0.4em; }
h1 { font-size: 1.55rem; font-weight: 700; }
h2 { font-size: 1.05rem; font-weight: 650; }
h3 { font-size: 0.9rem; font-weight: 650; }
p { margin: 0 0 0.7em; }
a { color: var(--brand); text-underline-offset: 3px; }
a:hover { color: var(--brand-hover); }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 3px;
}

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--focus); color: #111; padding: 0.8rem 1.2rem; font-weight: 650;
}
.skip-link:focus { left: 0; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

svg.icon { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
svg.icon--sm { width: 15px; height: 15px; }
svg.icon--lg { width: 22px; height: 22px; }

/* ===== top bar ========================================================== */

.topbar {
  position: fixed; inset: 0 0 auto 0; height: var(--topbar-h); z-index: 60;
  background: var(--rail); color: #fff;
  display: flex; align-items: center; gap: 0.6rem; padding: 0 0.85rem;
  box-shadow: var(--shadow-1);
}
.topbar-button {
  display: grid; place-items: center; width: 38px; height: 38px;
  background: transparent; border: 0; border-radius: var(--radius);
  color: var(--rail-ink); cursor: pointer; position: relative;
}
.topbar-button:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }

.brand {
  display: flex; align-items: center; gap: 0.55rem;
  color: #fff; text-decoration: none; font-family: var(--font-display);
  font-weight: 700; font-size: 0.95rem; letter-spacing: -0.02em; white-space: nowrap;
}
.brand-mark {
  width: 28px; height: 28px; border-radius: 7px; display: grid; place-items: center;
  background: linear-gradient(140deg, var(--brand) 0%, #1e88e5 100%); color: #fff;
  font-size: 0.8rem; font-weight: 800;
}
.brand span { color: var(--rail-ink); font-weight: 500; }

/* Global search opens the command palette. Kept as a real button so it is
   reachable by keyboard and announced properly. */
.omnisearch {
  flex: 1; max-width: 620px; margin: 0 auto;
  display: flex; align-items: center; gap: 0.55rem;
  height: 36px; padding: 0 0.75rem;
  background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px; color: var(--rail-ink);
  font: inherit; font-size: 0.86rem; cursor: pointer; text-align: left;
}
.omnisearch:hover { background: rgba(255, 255, 255, 0.16); color: #fff; }
.omnisearch kbd {
  margin-left: auto; font-family: var(--font-data); font-size: 0.7rem;
  background: rgba(255, 255, 255, 0.14); padding: 0.12rem 0.4rem; border-radius: 4px;
}

.topbar-right { display: flex; align-items: center; gap: 0.25rem; margin-left: auto; }
.badge-count {
  position: absolute; top: 3px; right: 3px; min-width: 17px; height: 17px;
  padding: 0 4px; border-radius: 9px; background: var(--accent); color: #fff;
  font-size: 0.65rem; font-weight: 700; display: grid; place-items: center;
  font-family: var(--font-data);
}
.avatar {
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  background: var(--brand); color: #fff; font-weight: 700; font-size: 0.78rem;
  border: 0; cursor: pointer; font-family: var(--font-display);
}
.avatar--lg { width: 56px; height: 56px; font-size: 1.25rem; }

/* ===== left rail ======================================================== */

.rail {
  position: fixed; top: var(--topbar-h); bottom: 0; left: 0; width: var(--rail-w);
  background: var(--rail); color: var(--rail-ink); z-index: 55;
  padding: 0.75rem 0.5rem; overflow-y: auto;
  display: flex; flex-direction: column; gap: 0.15rem;
  transition: width 0.16s ease;
}
body[data-rail="collapsed"] .rail { width: var(--rail-w-collapsed); }
body[data-rail="collapsed"] .rail-label,
body[data-rail="collapsed"] .rail-group-title,
body[data-rail="collapsed"] .rail-env { display: none; }
body[data-rail="collapsed"] .rail-item { justify-content: center; }

.rail-group-title {
  font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.1em;
  color: #64748b; padding: 0.9rem 0.7rem 0.35rem; font-weight: 650;
}
.rail-item {
  display: flex; align-items: center; gap: 0.7rem;
  padding: 0.55rem 0.7rem; border-radius: var(--radius);
  color: var(--rail-ink); text-decoration: none; font-size: 0.87rem; font-weight: 500;
  white-space: nowrap;
}
.rail-item:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.rail-item[aria-current="page"] {
  background: var(--rail-active); color: var(--rail-ink-active); font-weight: 620;
  box-shadow: inset 3px 0 0 var(--brand);
}
.rail-item .badge-inline {
  margin-left: auto; background: var(--accent); color: #fff;
  font-size: 0.68rem; font-weight: 700; padding: 0.05rem 0.4rem; border-radius: 9px;
  font-family: var(--font-data);
}
.rail-foot { margin-top: auto; padding-top: 0.75rem; border-top: 1px solid rgba(255,255,255,0.08); }
.rail-env {
  font-family: var(--font-data); font-size: 0.66rem; color: #64748b;
  padding: 0.4rem 0.7rem; line-height: 1.7;
}
.rail-env b { color: var(--rail-ink); font-weight: 600; }

/* ===== content shell ==================================================== */

.shell {
  margin-left: var(--rail-w); padding-top: var(--topbar-h);
  min-height: 100vh; transition: margin-left 0.16s ease;
}
body[data-rail="collapsed"] .shell { margin-left: var(--rail-w-collapsed); }
.shell-inner { max-width: 1500px; margin: 0 auto; padding: 1.4rem 1.6rem 4rem; }

@media (max-width: 900px) {
  .rail { transform: translateX(-100%); width: var(--rail-w); }
  body[data-rail="open"] .rail { transform: none; box-shadow: var(--shadow-3); }
  .shell, body[data-rail="collapsed"] .shell { margin-left: 0; }
  .omnisearch kbd { display: none; }
  .shell-inner { padding: 1rem; }
}

.breadcrumbs {
  display: flex; gap: 0.4rem; align-items: center; flex-wrap: wrap;
  font-size: 0.8rem; color: var(--ink-3); margin-bottom: 0.5rem;
}
.breadcrumbs a { color: var(--ink-2); text-decoration: none; }
.breadcrumbs a:hover { color: var(--brand); text-decoration: underline; }

.page-head {
  display: flex; align-items: flex-start; gap: 1rem; flex-wrap: wrap;
  margin-bottom: var(--gap);
}
.page-head p { color: var(--ink-2); margin: 0.2rem 0 0; max-width: 68ch; font-size: 0.9rem; }
.page-head .actions { margin-left: auto; display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }

/* ===== surfaces ========================================================= */

.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-1);
  padding: var(--card-p); margin-bottom: var(--gap);
}
.card--flush { padding: 0; overflow: visible; }
.card-head {
  display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap;
  padding: var(--card-p) var(--card-p) 0;
}
.card--flush .card-head { padding-bottom: 0.85rem; border-bottom: 1px solid var(--line); }
.card-head h2 { margin: 0; }
.card-head .spacer { margin-left: auto; }
.card > h2:first-child, .card > h3:first-child { margin-top: 0; }

.grid { display: grid; gap: var(--gap); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.object-layout { display: grid; gap: var(--gap); grid-template-columns: minmax(0, 320px) minmax(0, 1fr); align-items: start; }
@media (max-width: 1080px) { .object-layout { grid-template-columns: 1fr; } }

/* ===== tiles (home tiles) ============================================ */

.tiles { display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fill, minmax(184px, 1fr)); }
.tile {
  position: relative; display: flex; flex-direction: column; gap: 0.55rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 1.1rem; text-decoration: none; color: var(--ink);
  box-shadow: var(--shadow-1); min-height: 132px;
  transition: transform 0.14s ease, box-shadow 0.14s ease, border-color 0.14s ease;
}
.tile:hover {
  transform: translateY(-2px); box-shadow: var(--shadow-2);
  border-color: var(--line-2); color: var(--ink);
}
@media (prefers-reduced-motion: reduce) { .tile:hover { transform: none; } }
.tile-icon {
  width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center;
  background: var(--brand-soft); color: var(--brand-ink);
}
.tile-icon--ok { background: var(--ok-soft); color: var(--ok); }
.tile-icon--warn { background: var(--warn-soft); color: var(--warn); }
.tile-icon--accent { background: var(--accent-soft); color: var(--accent); }
.tile-name { font-family: var(--font-display); font-weight: 650; font-size: 0.95rem; }
.tile-meta { font-size: 0.8rem; color: var(--ink-2); margin-top: auto; }
.tile-flag {
  position: absolute; top: 0.9rem; right: 0.9rem;
  background: var(--accent); color: #fff; font-size: 0.7rem; font-weight: 700;
  padding: 0.1rem 0.45rem; border-radius: 9px; font-family: var(--font-data);
}

/* ===== stats ============================================================ */

.stat {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 1rem 1.15rem; box-shadow: var(--shadow-1);
}
.stat-label { font-size: 0.75rem; color: var(--ink-2); text-transform: uppercase; letter-spacing: 0.07em; font-weight: 650; }
.stat-value {
  font-family: var(--font-display); font-size: 1.95rem; font-weight: 700;
  line-height: 1.15; font-variant-numeric: tabular-nums; margin-top: 0.15rem;
}
.stat-note { font-size: 0.8rem; color: var(--ink-3); margin-top: 0.2rem; }

/* ===== toolbar, filters, saved views ==================================== */

.toolbar {
  display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap;
  padding: 0.7rem var(--card-p); border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}
.chip {
  display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.28rem 0.7rem; border-radius: 999px; font-size: 0.8rem; font-weight: 600;
  background: var(--surface); border: 1px solid var(--line-2); color: var(--ink-2);
  text-decoration: none; cursor: pointer;
}
.chip:hover { border-color: var(--brand); color: var(--brand); }
.chip[aria-pressed="true"], .chip.is-active {
  background: var(--brand); border-color: var(--brand); color: #fff;
}
.chip-count { font-family: var(--font-data); font-size: 0.72rem; opacity: 0.85; }

.filter-input {
  height: 34px; padding: 0 0.7rem; border-radius: var(--radius);
  border: 1px solid var(--line-2); background: var(--surface); color: var(--ink);
  font: inherit; font-size: 0.85rem;
  flex: 0 1 260px; width: 260px; min-width: 180px; margin-left: auto;
}
.toolbar > .filter-input + .small { flex: none; }

/* ===== tables =========================================================== */

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
thead th {
  background: var(--surface-2); text-align: left;
  padding: 0.55rem 0.75rem; border-bottom: 1px solid var(--line-2);
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--ink-2); font-weight: 700; white-space: nowrap;
}
thead th button {
  all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 0.3rem;
  font: inherit; color: inherit;
}
thead th button:hover { color: var(--brand); }
th[aria-sort] button { color: var(--brand); }
td { padding: var(--row-y) 0.75rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
tbody tr:hover { background: var(--surface-2); }
tbody tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; font-family: var(--font-data); }
.cell-primary { font-weight: 620; }
.cell-sub { font-size: 0.78rem; color: var(--ink-3); font-family: var(--font-data); }

/* Related actions — the contextual object menu enterprise users expect on
   every row. Keyboard reachable, closes on Escape. */
.ra { position: relative; }
.ra-trigger {
  width: 28px; height: 28px; display: grid; place-items: center;
  border-radius: 6px; border: 1px solid transparent; background: transparent;
  color: var(--accent); cursor: pointer; padding: 0;
}
/* The same control rendered as a labelled button in a page header. */
.ra-trigger.button {
  width: auto; height: auto; display: inline-flex; gap: 0.4rem;
  padding: 0.5rem 0.95rem; border-color: var(--line-2);
  background: var(--surface); color: var(--ink-2);
}
.ra-trigger.button:hover { background: var(--surface-2); color: var(--ink); border-color: var(--ink-3); }
.ra-trigger.button .icon { color: var(--accent); }
tbody tr:hover .ra-trigger, .ra-trigger:focus-visible { border-color: var(--line-2); background: var(--surface); }
.ra-menu {
  position: absolute; right: 0; top: calc(100% + 4px); z-index: 40; min-width: 230px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-2); padding: 0.35rem;
}
.ra-menu[hidden] { display: none; }
.ra-menu-title {
  font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.07em;
  color: var(--ink-3); padding: 0.4rem 0.6rem 0.25rem; font-weight: 700;
}
.ra-menu a, .ra-menu button {
  display: flex; align-items: center; gap: 0.55rem; width: 100%;
  padding: 0.45rem 0.6rem; border-radius: 6px; border: 0; background: none;
  color: var(--ink); text-decoration: none; font: inherit; font-size: 0.85rem;
  cursor: pointer; text-align: left;
}
.ra-menu a:hover, .ra-menu button:hover { background: var(--brand-soft); color: var(--brand-ink); }

/* ===== tags ============================================================= */

.tag {
  display: inline-flex; align-items: center; gap: 0.3rem;
  font-size: 0.74rem; font-weight: 650; letter-spacing: 0.01em;
  padding: 0.15rem 0.5rem; border-radius: 5px;
  background: var(--brand-soft); color: var(--brand-ink); white-space: nowrap;
}
.tag--ok { background: var(--ok-soft); color: var(--ok); }
.tag--warn { background: var(--warn-soft); color: var(--warn); }
.tag--stop { background: var(--stop-soft); color: var(--stop); }
.tag--quiet { background: var(--surface-3); color: var(--ink-2); }
.tag--dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.taglist { display: flex; gap: 0.3rem; flex-wrap: wrap; }

/* ===== business process pipeline (signature) ============================ */
/* Most case systems show process history as a list of past events. This shows the live
   pipeline: stages come from the programme YAML, and the current stage carries
   the exact rules holding it open. It is the configuration made visible. */

.pipeline {
  display: flex; gap: 0; list-style: none; margin: 0; padding: 0;
  overflow-x: auto; background: var(--surface-2);
  border: 1px solid var(--line); border-radius: var(--radius-lg);
}
.pipeline-step {
  flex: 1 1 0; min-width: 152px; position: relative;
  padding: 0.85rem 0.9rem 0.85rem 1.5rem;
  border-right: 1px solid var(--line);
}
.pipeline-step:last-child { border-right: 0; }
.pipeline-step::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: var(--line-2);
}
.pipeline-step[data-state="complete"]::before { background: var(--ok); }
.pipeline-step[data-state="current"]::before { background: var(--brand); }
.pipeline-step[data-state="current"] { background: var(--surface); }
.pipeline-index {
  font-family: var(--font-data); font-size: 0.68rem; font-weight: 700;
  color: var(--ink-3); letter-spacing: 0.06em;
}
.pipeline-name { font-family: var(--font-display); font-weight: 650; font-size: 0.88rem; margin-top: 0.1rem; }
.pipeline-step[data-state="upcoming"] .pipeline-name { color: var(--ink-3); }
.pipeline-meta { font-size: 0.75rem; color: var(--ink-2); font-variant-numeric: tabular-nums; margin-top: 0.2rem; }
.pipeline-bar { height: 4px; border-radius: 2px; background: var(--surface-3); margin-top: 0.45rem; overflow: hidden; }
.pipeline-bar > span { display: block; height: 100%; background: var(--brand); }
.pipeline-step[data-state="complete"] .pipeline-bar > span { background: var(--ok); }

.gate {
  margin-top: 0.9rem; border: 1px solid var(--warn); background: var(--warn-soft);
  border-radius: var(--radius); padding: 0.8rem 0.95rem;
}
.gate h3 { margin: 0 0 0.3rem; color: var(--warn); font-size: 0.85rem; }
.gate ul { margin: 0; padding-left: 1.1rem; font-size: 0.85rem; }
.gate--clear { border-color: var(--ok); background: var(--ok-soft); }
.gate--clear h3 { color: var(--ok); }

/* ===== tabs ============================================================= */

.tabs {
  display: flex; gap: 0.15rem; overflow-x: auto;
  border-bottom: 1px solid var(--line); margin-bottom: var(--gap);
}
.tab {
  padding: 0.6rem 0.95rem; border: 0; background: none; cursor: pointer;
  font: inherit; font-size: 0.87rem; font-weight: 600; color: var(--ink-2);
  border-bottom: 3px solid transparent; text-decoration: none; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 0.4rem; border-radius: 0;
}
.tab:hover { color: var(--brand); background: none; border-color: transparent; border-bottom-color: transparent; }
.tab[aria-selected="true"] { color: var(--brand); border-bottom-color: var(--brand); }
.tab-count {
  font-family: var(--font-data); font-size: 0.7rem; background: var(--surface-3);
  color: var(--ink-2); padding: 0.05rem 0.35rem; border-radius: 8px;
}
.tabpanel[hidden] { display: none; }

/* ===== object summary rail ============================================== */

.summary-top { display: flex; gap: 0.9rem; align-items: center; margin-bottom: 0.9rem; }
.summary-name { font-family: var(--font-display); font-size: 1.15rem; font-weight: 700; line-height: 1.2; }
.summary-sub { font-size: 0.8rem; color: var(--ink-2); font-family: var(--font-data); }

.definition { display: grid; grid-template-columns: minmax(96px, auto) 1fr; gap: 0.45rem 0.9rem; font-size: 0.85rem; margin: 0; }
.definition dt { color: var(--ink-3); }
.definition dd { margin: 0; font-weight: 550; }

/* ===== forms ============================================================ */

label { display: block; font-weight: 620; font-size: 0.86rem; margin-bottom: 0.25rem; }
.hint { font-weight: 400; font-size: 0.82rem; color: var(--ink-2); margin: 0 0 0.35rem; }
input[type="text"], input[type="number"], input[type="date"], input[type="email"],
input[type="password"], input[type="tel"], input[type="url"], input[type="time"],
input[type="datetime-local"], input[type="month"], input:not([type]),
input[type="search"], select, textarea {
  width: 100%; padding: 0.5rem 0.65rem; border: 1px solid var(--line-2);
  border-radius: var(--radius); font: inherit; font-size: 0.9rem;
  background: var(--surface); color: var(--ink);
}
input:focus, select:focus, textarea:focus { border-color: var(--brand); }
textarea { min-height: 6rem; resize: vertical; }
.field { margin-bottom: 1rem; }
.field-row { display: grid; gap: 0.9rem; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
fieldset { border: 0; padding: 0; margin: 0; }
legend { font-weight: 620; font-size: 0.86rem; padding: 0; }

.checks { display: grid; gap: 0.3rem; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.check { display: flex; gap: 0.55rem; align-items: flex-start; font-weight: 400; padding: 0.3rem 0; font-size: 0.88rem; }
.check input { width: 1.05rem; height: 1.05rem; margin-top: 0.15rem; flex: none; accent-color: var(--brand); }

button, .button {
  font: inherit; font-weight: 620; font-size: 0.87rem; cursor: pointer;
  padding: 0.5rem 0.95rem; border-radius: var(--radius);
  border: 1px solid var(--brand); background: var(--brand); color: #fff;
  text-decoration: none; display: inline-flex; align-items: center; gap: 0.4rem;
}
button:hover, .button:hover { background: var(--brand-hover); border-color: var(--brand-hover); color: #fff; }
.button--secondary { background: var(--surface); color: var(--brand); }
.button--secondary:hover { background: var(--brand-soft); color: var(--brand-ink); border-color: var(--brand); }
.button--quiet { background: var(--surface); color: var(--ink-2); border-color: var(--line-2); }
.button--quiet:hover { background: var(--surface-2); color: var(--ink); border-color: var(--ink-3); }
.button--sm { padding: 0.3rem 0.6rem; font-size: 0.8rem; }
button[disabled], .button[disabled] { opacity: 0.45; cursor: not-allowed; }
.inline-form { display: inline-flex; }

/* ===== task rows ======================================================== */

.tasklist { list-style: none; margin: 0; padding: 0; }
.taskrow {
  display: flex; gap: 0.85rem; align-items: flex-start;
  padding: var(--row-y) 0; border-bottom: 1px solid var(--line);
}
.taskrow:last-child { border-bottom: 0; }
.taskrow-body { flex: 1; min-width: 0; }
.taskrow-title { font-weight: 620; font-size: 0.9rem; }
.taskrow--done .taskrow-title { color: var(--ink-3); text-decoration: line-through; }
.taskrow-meta { font-size: 0.79rem; color: var(--ink-2); display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }
.taskrow-meta.is-overdue { color: var(--stop); font-weight: 620; }
.taskrow-actions { display: flex; gap: 0.35rem; align-items: center; }

/* ===== notices ========================================================== */

.notice {
  display: flex; gap: 0.75rem; align-items: flex-start;
  border: 1px solid var(--brand); background: var(--brand-soft);
  border-left-width: 4px; padding: 0.85rem 1rem;
  border-radius: var(--radius); margin-bottom: var(--gap);
}
.notice--ok { border-color: var(--ok); background: var(--ok-soft); }
.notice--warn { border-color: var(--warn); background: var(--warn-soft); }
.notice--stop { border-color: var(--stop); background: var(--stop-soft); }
.notice h3 { margin: 0 0 0.2rem; font-size: 0.9rem; }
.notice p:last-child { margin-bottom: 0; }
.notice .icon { margin-top: 2px; }

/* ===== command palette ================================================== */

.palette-backdrop {
  position: fixed; inset: 0; z-index: 120; background: rgba(10, 16, 28, 0.55);
  display: grid; place-items: start center; padding-top: 12vh;
}
.palette-backdrop[hidden] { display: none; }
.palette {
  width: min(660px, 92vw); background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-3); overflow: hidden;
}
.palette-input-wrap { display: flex; align-items: center; gap: 0.6rem; padding: 0.85rem 1rem; border-bottom: 1px solid var(--line); }
.palette-input { border: 0; padding: 0; font-size: 1rem; background: none; }
.palette-input:focus { outline: none; border: 0; }
.palette-results { max-height: 56vh; overflow-y: auto; padding: 0.4rem; }
.palette-group-title {
  font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--ink-3); font-weight: 700; padding: 0.6rem 0.7rem 0.3rem;
}
.palette-item {
  display: flex; align-items: center; gap: 0.7rem; padding: 0.55rem 0.7rem;
  border-radius: var(--radius); color: var(--ink); text-decoration: none; font-size: 0.9rem;
}
.palette-item[aria-selected="true"], .palette-item:hover { background: var(--brand-soft); color: var(--brand-ink); }
.palette-item .meta { margin-left: auto; font-size: 0.76rem; color: var(--ink-3); font-family: var(--font-data); }
.palette-foot {
  display: flex; gap: 1rem; padding: 0.5rem 1rem; border-top: 1px solid var(--line);
  background: var(--surface-2); font-size: 0.74rem; color: var(--ink-3);
}
.palette-foot kbd {
  font-family: var(--font-data); background: var(--surface-3); border: 1px solid var(--line-2);
  padding: 0.05rem 0.3rem; border-radius: 4px; font-size: 0.72rem;
}
.palette-empty { padding: 1.5rem 1rem; text-align: center; color: var(--ink-3); font-size: 0.9rem; }

/* ===== slide-over drawer ================================================ */

.drawer-backdrop { position: fixed; inset: 0; z-index: 110; background: rgba(10, 16, 28, 0.45); }
.drawer-backdrop[hidden] { display: none; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 94vw); z-index: 111;
  background: var(--surface); border-left: 1px solid var(--line);
  box-shadow: var(--shadow-3); display: flex; flex-direction: column;
}
.drawer[hidden] { display: none; }
.drawer-head {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 1rem 1.15rem; border-bottom: 1px solid var(--line);
}
.drawer-head h2 { margin: 0; }
.drawer-body { padding: 1.15rem; overflow-y: auto; flex: 1; }
@media (prefers-reduced-motion: no-preference) {
  .drawer { animation: slide-in 0.18s ease; }
  @keyframes slide-in { from { transform: translateX(18px); opacity: 0; } }
}

/* ===== toasts =========================================================== */

.toasts { position: fixed; bottom: 1.2rem; right: 1.2rem; z-index: 130; display: grid; gap: 0.5rem; }
.toast {
  background: var(--rail); color: #fff; padding: 0.7rem 1rem; border-radius: var(--radius);
  box-shadow: var(--shadow-2); font-size: 0.87rem; display: flex; gap: 0.5rem; align-items: center;
}

/* ===== assistant ======================================================== */

.assistant-card { border-color: var(--line-2); background: var(--surface-2); }
.provenance {
  display: flex; gap: 0.9rem; flex-wrap: wrap; font-family: var(--font-data);
  font-size: 0.72rem; color: var(--ink-3);
  padding-top: 0.6rem; margin-top: 0.75rem; border-top: 1px dashed var(--line-2);
}
.assistant-decision { display: flex; gap: 0.45rem; flex-wrap: wrap; margin-top: 0.7rem; }

/* ===== misc ============================================================= */

.bar { background: var(--surface-3); border-radius: 3px; height: 8px; overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--brand); }
.bar--ok > span { background: var(--ok); }

.muted { color: var(--ink-2); }
.small { font-size: 0.83rem; }
.mono { font-family: var(--font-data); font-size: 0.86em; }
.right { text-align: right; }
.stack > * + * { margin-top: 0.7rem; }
.row { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }
.empty { padding: 2.5rem 1rem; text-align: center; color: var(--ink-3); }
.mt { margin-top: var(--gap); }
.mb0 { margin-bottom: 0; }
.w-bar { max-width: 220px; }

@media print {
  .topbar, .rail, .toolbar, .tabs, button, .ra { display: none !important; }
  .shell { margin-left: 0; padding-top: 0; }
  body { background: #fff; }
  .tabpanel[hidden] { display: block !important; }
}

/* ===========================================================================
   Public landing page. Shares the tokens above so the marketing site and the
   product cannot drift apart visually — a change to --brand moves both.
   ======================================================================== */

.site-nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
}
.site-nav-inner {
  max-width: 1180px; margin: 0 auto; padding: 0.8rem 1.5rem;
  display: flex; align-items: center; gap: 1.5rem;
}
.site-nav .brand { color: var(--ink); }
.site-nav .brand span { color: var(--ink-3); }
.site-nav-links { display: flex; gap: 0.4rem; margin-left: auto; align-items: center; }
.site-nav-links a {
  padding: 0.45rem 0.8rem; border-radius: var(--radius);
  color: var(--ink-2); text-decoration: none; font-size: 0.89rem; font-weight: 550;
}
.site-nav-links a:hover { background: var(--surface-2); color: var(--ink); }
.site-nav-links a.is-cta {
  background: var(--brand); color: #fff; font-weight: 620;
}
.site-nav-links a.is-cta:hover { background: var(--brand-hover); color: #fff; }
@media (max-width: 780px) {
  .site-nav-links a:not(.is-cta) { display: none; }
}

.section { max-width: 1180px; margin: 0 auto; padding: 4.5rem 1.5rem; }
.section--tight { padding: 2.5rem 1.5rem; }
.section--band { background: var(--surface); border-block: 1px solid var(--line); max-width: none; }
.section--band > * { max-width: 1180px; margin-inline: auto; }
.section-eyebrow {
  font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em;
  font-weight: 700; color: var(--brand); margin-bottom: 0.5rem;
}
.section-lead { font-size: 1.05rem; color: var(--ink-2); max-width: 62ch; }

.hero { max-width: 1180px; margin: 0 auto; padding: 5rem 1.5rem 3.5rem; }
.hero h1 {
  font-size: clamp(2.1rem, 5vw, 3.4rem); line-height: 1.08;
  letter-spacing: -0.03em; max-width: 22ch; margin-bottom: 1rem;
}
.hero p { font-size: 1.15rem; color: var(--ink-2); max-width: 58ch; }
.hero-actions { display: flex; gap: 0.7rem; flex-wrap: wrap; margin-top: 1.75rem; }
.button--lg { padding: 0.7rem 1.4rem; font-size: 0.98rem; }

.trust {
  display: grid; gap: 1px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  background: var(--line); border: 1px solid var(--line);
  border-radius: var(--radius-lg); overflow: hidden; margin-top: 3rem;
}
.trust > div { background: var(--surface); padding: 1.1rem 1.25rem; }
.trust dt { font-size: 0.78rem; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.07em; font-weight: 650; }
.trust dd { margin: 0.2rem 0 0; font-family: var(--font-display); font-weight: 620; font-size: 0.98rem; }

.feature-grid { display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); margin-top: 2rem; }
.feature {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 1.4rem;
}
.feature .tile-icon { margin-bottom: 0.85rem; }
.feature h3 { font-size: 1rem; margin-bottom: 0.35rem; }
.feature p { color: var(--ink-2); font-size: 0.9rem; margin: 0; }

/* Two-column "does / will never do" panel. The refusals are the selling
   point in a public-sector bid, so they get equal visual weight. */
.ledger { display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); margin-top: 2rem; }
.ledger-col { border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.4rem; background: var(--surface); }
.ledger-col--yes { border-left: 4px solid var(--ok); }
.ledger-col--no { border-left: 4px solid var(--stop); }
.ledger-col h3 { display: flex; align-items: center; gap: 0.5rem; }
.ledger-col ul { list-style: none; margin: 0.9rem 0 0; padding: 0; }
.ledger-col li {
  display: flex; gap: 0.6rem; align-items: flex-start;
  padding: 0.5rem 0; border-top: 1px solid var(--line); font-size: 0.9rem;
}
.ledger-col li:first-child { border-top: 0; }
.ledger-col--yes .icon { color: var(--ok); margin-top: 3px; }
.ledger-col--no .icon { color: var(--stop); margin-top: 3px; }

.demo-panel {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 1.6rem; margin-top: 2rem;
  display: grid; gap: 1.5rem; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
}
@media (max-width: 820px) { .demo-panel { grid-template-columns: 1fr; } }
.demo-accounts { display: grid; gap: 0.5rem; }
.demo-account {
  display: flex; gap: 0.75rem; align-items: center;
  padding: 0.7rem 0.85rem; border: 1px solid var(--line);
  border-radius: var(--radius); background: var(--surface-2);
}
.demo-account .avatar { flex: none; }
.demo-account-role { font-size: 0.8rem; color: var(--ink-2); }
.keys { display: flex; gap: 0.35rem; flex-wrap: wrap; align-items: center; font-size: 0.85rem; color: var(--ink-2); }
.keys kbd {
  font-family: var(--font-data); font-size: 0.78rem;
  background: var(--surface-3); border: 1px solid var(--line-2);
  padding: 0.1rem 0.4rem; border-radius: 4px; color: var(--ink);
}

.site-footer {
  border-top: 1px solid var(--line); background: var(--surface);
  padding: 2.5rem 1.5rem; margin-top: 3rem;
}
.site-footer-inner {
  max-width: 1180px; margin: 0 auto;
  display: flex; gap: 1.5rem; flex-wrap: wrap; align-items: flex-start;
  font-size: 0.87rem; color: var(--ink-2);
}
.site-footer-inner p { max-width: 46ch; }


/* Product footer. Deliberately quiet — it carries the operating company's
   details, which UK company law requires on a business website, without
   competing with the working area above it. */
.app-footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
  padding: 0.9rem 1.6rem;
  font-size: 0.78rem;
  color: var(--ink-3);
}
.app-footer-inner {
  max-width: 1500px; margin: 0 auto;
  display: flex; gap: 1rem; flex-wrap: wrap; align-items: center;
}
.app-footer .spacer { margin-left: auto; }

/* ===========================================================================
   Hero AI panel. The counts and the lists come from the capability registry,
   so this cannot claim a capability the code does not have — or keep claiming
   one after it is withdrawn.
   ======================================================================== */

.ai-panel {
  margin-top: 2.5rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-1);
}
.ai-panel-head {
  display: flex; align-items: flex-start; gap: 1rem; flex-wrap: wrap;
  padding-bottom: 1.1rem; margin-bottom: 1.1rem;
  border-bottom: 1px solid var(--line);
}
.ai-panel-head h2 { font-size: 1.3rem; letter-spacing: -0.02em; margin-top: 0.2rem; }
.ai-panel-head a { margin-left: auto; }

.ai-stages {
  display: grid; gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}
.ai-stage h3 {
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.09em;
  color: var(--ink-3); font-weight: 700; margin-bottom: 0.5rem;
}
.ai-stage ul { list-style: none; margin: 0; padding: 0; }
.ai-stage li {
  display: flex; gap: 0.55rem; align-items: flex-start;
  font-size: 0.86rem; line-height: 1.45; padding: 0.3rem 0;
  color: var(--ink-2);
}

/* Colour carries the authority tier, but never alone — the legend names each
   one, and every item is readable without distinguishing the dots. */
.ai-dot {
  width: 7px; height: 7px; border-radius: 50%; flex: none; margin-top: 0.5rem;
}
.ai-dot--drafts { background: var(--brand); }
.ai-dot--advisory { background: var(--warn); }

.ai-legend {
  display: flex; gap: 1.5rem; flex-wrap: wrap;
  margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--line);
  font-size: 0.8rem; color: var(--ink-3);
}
.ai-legend > span { display: flex; gap: 0.45rem; align-items: baseline; }

.ai-refusals {
  margin-top: 1.25rem; padding: 1.1rem;
  background: var(--stop-soft); border-radius: var(--radius);
  border-left: 4px solid var(--stop);
}
.ai-refusals h3 { font-size: 0.9rem; margin-bottom: 0.6rem; color: var(--stop); }


/* The refusal list. Given equal weight to the capability list because in a
   public-sector bid it is the more persuasive half — anyone can claim AI
   features; refusing to automate an eligibility decision is the differentiator. */
/* `.hero p` (0,1,1) caps body copy at 58ch and outranks a bare class, so this
   selector is deliberately more specific rather than relying on order. The
   strip is a data list, not prose, and should run the full panel width. */
.hero p.ai-never,
.ai-never {
  max-width: none;
  display: flex; flex-wrap: wrap; gap: 0.15rem 0.5rem; align-items: baseline;
  margin: 0 0 1rem; padding: 0.7rem 0.9rem;
  border-left: 3px solid var(--stop); background: var(--stop-soft);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 0.83rem; color: var(--ink-2);
}
.ai-never strong { color: var(--stop); }
.ai-never-item { color: var(--ink); }
.ai-never-item:not(:last-child)::after { content: " ·"; color: var(--ink-3); }

/* ===== bid pipeline board ================================================ */

.pipeline-board {
  display: grid; gap: 0.75rem;
  grid-template-columns: repeat(6, minmax(180px, 1fr));
  overflow-x: auto;
}
@media (max-width: 1100px) {
  .pipeline-board { grid-template-columns: repeat(3, minmax(180px, 1fr)); }
}
@media (max-width: 700px) {
  .pipeline-board { grid-template-columns: 1fr; }
}
.pipeline-col {
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 0.7rem; min-height: 120px;
}
.pipeline-col-head {
  display: flex; gap: 0.4rem; align-items: center; flex-wrap: wrap;
  padding-bottom: 0.6rem; margin-bottom: 0.6rem;
  border-bottom: 1px solid var(--line); font-size: 0.85rem;
}
.pipeline-card {
  display: block; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 0.7rem; margin-bottom: 0.5rem;
  text-decoration: none; color: var(--ink); box-shadow: var(--shadow-1);
}
.pipeline-card:hover { border-color: var(--brand); color: var(--ink); }


/* Validation messages sit with the field they belong to, not in a summary at
   the top. A list of errors above a long form makes the reader hunt. */
.field-error {
  margin: 0.3rem 0 0;
  font-size: 0.8rem;
  color: var(--stop);
}
.field-error::before { content: "⚠ "; }


/* ===========================================================================
   Public site: home, pricing and demo.

   A dark first screen with a drawing of the product beside the pitch, then
   light sections. Prefixed mk- so nothing here can leak into the workspace.
   ======================================================================== */

.mk-hero {
  background:
    radial-gradient(900px 420px at 85% -10%, rgba(64, 132, 255, 0.35), transparent 60%),
    radial-gradient(700px 380px at 5% 110%, rgba(20, 184, 166, 0.22), transparent 60%),
    #0c1424;
  color: #e8eefb;
  padding: 4.5rem 1.5rem 0;
}
.mk-hero-inner {
  max-width: 1180px; margin: 0 auto;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 3rem; align-items: center; padding-bottom: 3.5rem;
}
.mk-hero .section-eyebrow { color: #7fb0ff; }
.mk-hero h1 {
  font-family: var(--font-display); font-size: clamp(2.2rem, 4.4vw, 3.5rem);
  line-height: 1.05; letter-spacing: -0.03em; margin: 0.5rem 0 1.1rem; color: #fff;
}
.mk-hero-copy > p { font-size: 1.12rem; color: #b9c6dd; max-width: 52ch; }
.mk-hero .button--secondary {
  background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.35);
}
.mk-hero .button--secondary:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }
.mk-hero-copy > p.mk-hero-note { font-size: 0.88rem; color: #93a3bf; margin-top: 1rem; }
.mk-hero-copy > p.mk-hero-signed { font-size: 0.95rem; }
.mk-hero a:not(.button) { color: #9cc2ff; }

.mk-shot {
  background: #f3f6fb; color: #101a2b; border-radius: 14px; overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.08);
  font-size: 0.72rem; transform: perspective(1600px) rotateY(-4deg) rotateX(2deg);
}
.mk-shot-bar {
  background: #10192b; padding: 0.55rem 0.8rem; display: flex; gap: 0.35rem; align-items: center;
}
.mk-shot-bar > span { width: 8px; height: 8px; border-radius: 50%; background: #3a4a66; }
.mk-shot-search {
  margin-left: 0.9rem; flex: 1; background: #1d2a44; color: #8ea0bd;
  border-radius: 999px; padding: 0.28rem 0.8rem;
}
.mk-shot-body { display: grid; grid-template-columns: 112px 1fr; }
.mk-shot-rail { background: #10192b; padding: 0.6rem 0.45rem 1rem; display: grid; gap: 0.15rem; align-content: start; }
.mk-shot-rail i { font-style: normal; color: #aab6cc; padding: 0.32rem 0.55rem; border-radius: 6px; }
.mk-shot-rail i.is-on { background: #1d3050; color: #fff; }
.mk-shot-main { padding: 0.9rem; display: grid; gap: 0.7rem; }
.mk-shot-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.6rem; }
.mk-shot-kpis > div, .mk-shot-card {
  background: #fff; border: 1px solid #dae1ec; border-radius: 9px; padding: 0.65rem 0.75rem;
}
.mk-shot-kpis b { display: block; font-family: var(--font-display); font-size: 1.15rem; letter-spacing: -0.02em; }
.mk-shot-kpis span { color: #4b5a72; }
.mk-shot-cols { display: grid; grid-template-columns: 1.25fr 1fr; gap: 0.6rem; }
.mk-shot-card h4 { margin: 0 0 0.45rem; font-size: 0.78rem; }
.mk-shot-card p {
  margin: 0; padding: 0.34rem 0; border-top: 1px solid #edf1f7;
  display: flex; align-items: center; gap: 0.45rem; color: #101a2b;
}
.mk-shot-card p small { margin-left: auto; color: #7b8aa3; font-size: inherit; white-space: nowrap; }
.mk-shot .dot { width: 7px; height: 7px; border-radius: 50%; background: #0b4ecc; flex: none; }
.mk-shot .dot--warn { background: #c2410c; }
.mk-shot .dot--ok { background: #0a7048; }
.mk-bar { position: relative; height: 1.35rem; background: #edf1f7; border-radius: 5px; margin-top: 0.38rem; overflow: hidden; }
.mk-bar span { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, #0b4ecc, #4f8bff); border-radius: 5px; }
.mk-bar label { position: relative; padding-left: 0.5rem; line-height: 1.35rem; color: #fff; font-weight: 600; }

.mk-hero .trust {
  max-width: 1180px; margin: 0 auto; border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 1.4rem 0 1.6rem;
}
.mk-hero .trust dt { color: #8ea0bd; }
.mk-hero .trust dd { color: #e8eefb; }

.mk-modules { display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); margin-top: 2rem; }
.mk-module {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 1.25rem; display: flex; flex-direction: column; gap: 0.5rem; box-shadow: var(--shadow-1);
}
.mk-module h3 { font-size: 1.02rem; margin: 0; }
.mk-module p { color: var(--ink-2); font-size: 0.9rem; margin: 0; flex: 1; }
.mk-module .tag { align-self: flex-start; }

.mk-plans { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); max-width: 900px; margin: 2rem auto 0; }
.mk-plan {
  position: relative; background: var(--surface); border: 1px solid var(--line);
  border-radius: 18px; padding: 2rem 1.75rem; box-shadow: var(--shadow-2);
  display: flex; flex-direction: column; gap: 0.6rem;
}
.mk-plan--featured { border: 2px solid var(--brand); }
.mk-plan-flag {
  position: absolute; top: -0.8rem; left: 1.5rem; background: var(--brand); color: #fff;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 0.25rem 0.7rem; border-radius: 999px;
}
.mk-plan h3 { font-family: var(--font-display); font-size: 1.4rem; margin: 0; }
.mk-plan-tag { color: var(--ink-2); margin: 0; min-height: 2.8em; }
.mk-price { margin: 0.4rem 0 0.6rem; display: flex; align-items: baseline; gap: 0.6rem; flex-wrap: wrap; }
.mk-price-amount { font-family: var(--font-display); font-size: 2.9rem; font-weight: 700; letter-spacing: -0.03em; line-height: 1; }
.mk-price-unit { color: var(--ink-2); font-size: 0.88rem; }
.mk-plan .button { text-align: center; justify-content: center; }
.mk-ticks { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: 0.55rem; }
.mk-ticks li { display: flex; gap: 0.55rem; align-items: flex-start; font-size: 0.93rem; }
.mk-ticks .icon { color: var(--ok); margin-top: 0.2rem; flex: none; }
.mk-plans-note { text-align: center; margin-top: 1.4rem; }

.mk-pagehead { max-width: 1180px; margin: 0 auto; padding: 4rem 1.5rem 0.5rem; text-align: center; }
.mk-pagehead h1 { font-family: var(--font-display); font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -0.03em; margin: 0.4rem 0 0.8rem; }
.mk-pagehead .section-lead { margin-inline: auto; }

.mk-addons { display: grid; gap: 0.8rem; margin-top: 1.75rem; }
.mk-addon {
  display: flex; gap: 1.5rem; align-items: center; justify-content: space-between;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.1rem 1.3rem;
}
.mk-addon h3 { margin: 0 0 0.2rem; font-size: 1rem; }
.mk-addon p { margin: 0; color: var(--ink-2); font-size: 0.9rem; max-width: 70ch; }
.mk-addon-price { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; white-space: nowrap; }
.mk-addon-price span, .mk-addon-price a { font-family: var(--font-body); font-size: 0.85rem; font-weight: 500; color: var(--ink-2); }
.mk-addon-price a { color: var(--brand); }
.mk-soon-head { margin-top: 2.25rem; }

.mk-demo-grid { display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.mk-demo-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 1.4rem; box-shadow: var(--shadow-1); display: flex; flex-direction: column; gap: 0.6rem;
}
.mk-demo-card h2 { font-size: 1.05rem; margin: 0; }
.mk-demo-card p { margin: 0; color: var(--ink-2); font-size: 0.92rem; }
.mk-demo-card > p:first-of-type { flex: 1; }
.mk-demo-card .button { justify-content: center; text-align: center; }
.mk-demo-pass { max-width: 560px; margin: 1.75rem auto 0; }

.mk-cta {
  background: #0c1424; color: #e8eefb; text-align: center; padding: 4rem 1.5rem;
}
.mk-cta h2 { color: #fff; font-family: var(--font-display); font-size: clamp(1.6rem, 3vw, 2.2rem); margin: 0 0 0.5rem; }
.mk-cta p { color: #b9c6dd; margin: 0 auto; max-width: 56ch; }
.mk-cta .hero-actions { justify-content: center; }
.mk-cta .button--secondary { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.35); }
.mk-cta .button--secondary:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }

.site-footer { margin-top: 0; }
.mk-footer {
  max-width: 1180px; margin: 0 auto; display: grid; gap: 2rem;
  grid-template-columns: 1.6fr repeat(3, 1fr); font-size: 0.9rem; color: var(--ink-2);
}
.mk-footer h3 { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.07em; color: var(--ink-3); margin: 0 0 0.7rem; }
.mk-footer a { display: block; color: var(--ink-2); text-decoration: none; padding: 0.2rem 0; }
.mk-footer a:hover { color: var(--brand); }
.mk-footer-brand p { margin-top: 0.7rem; max-width: 34ch; }
.mk-footer-legal {
  max-width: 1180px; margin: 2rem auto 0; padding-top: 1.2rem; border-top: 1px solid var(--line);
  display: flex; gap: 1rem; justify-content: space-between; flex-wrap: wrap;
  font-size: 0.8rem; color: var(--ink-3);
}

@media (max-width: 900px) {
  .mk-hero-inner { grid-template-columns: 1fr; gap: 2rem; }
  .mk-shot { transform: none; }
  .mk-footer { grid-template-columns: 1fr 1fr; }
  .mk-addon { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
}
@media (max-width: 520px) {
  .mk-hero { padding-top: 3rem; }
  .mk-shot-body { grid-template-columns: 1fr; }
  .mk-shot-rail { display: none; }
  .mk-shot-cols { grid-template-columns: 1fr; }
  .mk-footer { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: no-preference) {
  .mk-shot { transition: transform 0.5s ease; }
  .mk-shot:hover { transform: perspective(1600px) rotateY(0) rotateX(0); }
}
.site-nav .brand .brand-mark { color: #fff; }
.mk-hero .trust, .mk-hero .trust > div { background: transparent; border-color: rgba(255, 255, 255, 0.12); box-shadow: none; }
.mk-hero .trust { border-radius: 0; border-width: 1px 0 0; }
ol.pipeline { max-width: 100%; overflow-x: auto; }
.taglist .tag { white-space: normal; max-width: 100%; }

/* Signed out there is no navigation rail, so nothing should make room for
   one: the content and footer sit centred and the menu button is hidden. */
body.is-signed-out .shell { margin-left: 0; }
body.is-signed-out [data-action="toggle-rail"] { display: none; }
.brand .brand-mark { color: #fff; }
