/* Helix Hub, the dark-glass edition. Follows Helix Brand Guidelines v1.0:
   Ink #101C28 fields, Paper #F5F5F0 text, Deep teal #006B73 behind white
   action labels, Deep #06384A, Slate #52616B. The five logo colours are for
   the logo and product accents only, never for action fills.

   Every screen floats over the Helix particle field (fx/helix-field.js),
   and each part of the hub has its own formation: the products orbit on the
   dashboard, a layered stack for tenants, the helix for people, a vortex for
   apps and a flowing ribbon for activity. Panels are frosted glass. */

@font-face {
  font-family: Inter;
  src: url("fonts/InterVariable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

@property --angle { syntax: "<angle>"; initial-value: 0deg; inherits: false; }

:root {
  color-scheme: dark;

  /* Brand */
  --ink: #101c28;
  --ink-2: #0a131c;
  --deep: #06384a;
  --paper: #f5f5f0;
  --white: #ffffff;
  --slate: #52616b;
  --teal: #0096a1;
  --orange: #e78222;
  --magenta: #b03a8d;
  --lime: #a1c633;
  --yellow: #ffcc03;
  --action: #006b73;
  --action-hi: #00838c;
  --spectrum: linear-gradient(90deg, var(--teal), var(--magenta) 30%, var(--orange) 55%, var(--yellow) 75%, var(--lime) 90%, var(--teal));

  /* Surfaces on Ink */
  --text: #f5f5f0;
  --text-2: #c9d3d8;
  --muted: #9fb0b8;
  --link: #5cc6ce;
  --line: rgba(245, 245, 240, 0.14);
  --line-soft: rgba(245, 245, 240, 0.08);
  --glass: rgba(13, 23, 33, 0.7);
  --glass-hi: rgba(245, 245, 240, 0.06);
  --field-bg: rgba(6, 13, 20, 0.55);
  --blur: blur(18px) saturate(150%);

  /* Status, tuned for dark surfaces */
  --success: #6fd39a;
  --success-soft: rgba(52, 199, 120, 0.14);
  --warning: #f5b25c;
  --warning-soft: rgba(231, 130, 34, 0.16);
  --danger: #ff8f85;
  --danger-soft: rgba(239, 68, 68, 0.15);
  --info: #7fd3da;
  --info-soft: rgba(0, 150, 161, 0.16);

  --font: Inter, Arial, sans-serif;
  --mono-font: ui-monospace, SFMono-Regular, Menlo, monospace;
  --radius: 10px;
  --radius-lg: 18px;
  --shadow: 0 30px 60px -36px rgba(0, 0, 0, 0.9);
  --motion: 180ms;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

*, *::before, *::after { box-sizing: border-box; }

/* The body's background (not html's) so it propagates to the page and paints beneath the fixed field. */
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font: 400 16px/1.55 var(--font);
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(60% 50% at 72% 18%, rgba(6, 56, 74, 0.9), transparent 70%),
    radial-gradient(40% 40% at 10% 90%, rgba(0, 150, 161, 0.12), transparent 70%),
    var(--ink);
  background-attachment: fixed;
}

img, svg { display: block; max-width: 100%; }

a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 3px; transition: color var(--motion) ease; }
a:hover { color: var(--paper); }

h1, h2, h3 { margin: 0; line-height: 1.15; letter-spacing: -0.02em; }
h1 { font-size: clamp(30px, 3.6vw, 44px); font-weight: 700; letter-spacing: -0.035em; }
h2 { font-size: 19px; font-weight: 600; }
h3 { font-size: 16px; font-weight: 600; }
p { margin: 0; }
strong { color: var(--paper); }

::selection { background: var(--teal); color: var(--paper); }
:focus-visible { outline: 3px solid var(--paper); outline-offset: 3px; border-radius: 6px; }

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

.muted { color: var(--muted); }
.small { font-size: 14px; }
.tiny { font-size: 12.5px; }
.mono { font-family: var(--mono-font); font-size: 13px; }
.stack > * + * { margin-top: 16px; }
.stack-sm > * + * { margin-top: 8px; }
.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.grow { flex: 1 1 auto; }
.nowrap { white-space: nowrap; }

/* ---------- The particle field ---------- */

.hub-field {
  position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none;
  opacity: 0; transition: opacity 1.2s ease;
}
.has-field .hub-field { opacity: 1; }

/* On slow devices the field steps down and the glass goes solid. */
.fx-lite .card, .fx-lite .topbar, .fx-lite .stat, .fx-lite .auth-card {
  -webkit-backdrop-filter: none !important; backdrop-filter: none !important;
  background-color: rgba(13, 23, 33, 0.94) !important;
}

/* Pages cross-fade, and an opened card carries into the launch screen. */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 320ms; }
::view-transition-group(launch) { animation-duration: 520ms; animation-timing-function: var(--ease-out); }

/* ---------- Header ---------- */

.topbar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(16, 28, 40, 0.55);
  border-bottom: 1px solid rgba(245, 245, 240, 0.08);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
}
.topbar::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; opacity: 0.5;
  background: linear-gradient(90deg, transparent, rgba(0, 150, 161, 0.6), rgba(176, 58, 141, 0.5), rgba(231, 130, 34, 0.5), transparent);
}
.topbar-inner {
  max-width: 1160px; margin: 0 auto; padding: 0 24px;
  height: 64px; display: flex; align-items: center; gap: 28px;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--paper); }
.brand img { height: 30px; width: auto; }
.brand-label {
  font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted); padding-left: 12px; border-left: 1px solid rgba(245, 245, 240, 0.18);
}
.nav { display: flex; gap: 4px; flex: 1; }
.nav a {
  position: relative; color: var(--muted); text-decoration: none; font-weight: 500; font-size: 15px;
  padding: 8px 12px; border-radius: 8px; transition: color var(--motion) ease, background var(--motion) ease;
}
.nav a:hover { color: var(--paper); background: rgba(245, 245, 240, 0.06); }
.nav a[aria-current="page"] { color: var(--paper); background: rgba(245, 245, 240, 0.08); }
.nav a[aria-current="page"]::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: -13px; height: 2px; border-radius: 2px;
  background: var(--spectrum); background-size: 200% 100%; animation: shimmer 6s linear infinite;
}
.account { display: flex; align-items: center; gap: 12px; font-size: 14px; }
.account form { margin: 0; }
.account > a { color: var(--text-2); }
.account > a:hover { color: var(--paper); }
.avatar {
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: var(--action); color: var(--white); font-size: 13px; font-weight: 600;
  box-shadow: 0 0 0 2px rgba(0, 150, 161, 0.4);
}
.nav-toggle { display: none; }

/* ---------- Page ---------- */

.page { max-width: 1160px; margin: 0 auto; padding: 36px 24px 72px; }

/* Everything on a page rises in, one block after another. */
.page > * { animation: rise 640ms var(--ease-out) both; animation-delay: calc(var(--i, 0) * 70ms); }
@keyframes rise { from { opacity: 0; translate: 0 18px; } }
@keyframes shimmer { to { background-position: 300% 0; } }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 28px; }
.page-head p { margin-top: 10px; color: var(--text-2); max-width: 680px; }
.page-head h1 { text-shadow: 0 4px 40px rgba(16, 28, 40, 0.8); }

.eyebrow, .crumbs {
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 12px;
  font-size: 12.5px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted);
}
.eyebrow::before, .crumbs::before { content: ""; width: 28px; height: 2px; border-radius: 2px; background: var(--spectrum); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--paper); }

.section { margin-top: 36px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }

/* ---------- Glass cards ---------- */

.card {
  position: relative;
  background: linear-gradient(180deg, rgba(245, 245, 240, 0.06), rgba(245, 245, 240, 0.015) 50%), var(--glass);
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  box-shadow: var(--shadow);
}
.card::before {
  content: ""; position: absolute; top: -1px; left: 24px; right: 24px; height: 1px; pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(245, 245, 240, 0.35), transparent);
}
/* A soft light that follows the pointer across the card (set by hub.js). */
.card::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), rgba(0, 150, 161, 0.09), transparent 60%);
  opacity: 0; transition: opacity 400ms ease;
}
.card:hover::after { opacity: 1; }
.card > * { position: relative; z-index: 1; }
.card-body { padding: 26px; }
.card-head { padding: 18px 26px; border-bottom: 1px solid var(--line-soft); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card-head .small, .card-head .muted { color: var(--muted); }
.card + .card { margin-top: 18px; }
:is(.grid-2, .grid-3) > .card + .card { margin-top: 0; }

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }

/* ---------- Stat tiles ---------- */

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 28px; }
.stat {
  --c: var(--teal);
  position: relative; padding: 20px 22px 18px; border-radius: 16px; overflow: hidden;
  background: linear-gradient(180deg, rgba(245, 245, 240, 0.06), rgba(245, 245, 240, 0.01)), var(--glass);
  border: 1px solid var(--line);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  transform: perspective(800px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: border-color 300ms ease, box-shadow 300ms ease;
}
.stat::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(80% 100% at 100% 0%, color-mix(in srgb, var(--c) 26%, transparent), transparent 65%);
}
.stat:nth-child(4n + 2) { --c: var(--orange); }
.stat:nth-child(4n + 3) { --c: var(--magenta); }
.stat:nth-child(4n + 4) { --c: var(--lime); }
.stat:hover { border-color: color-mix(in srgb, var(--c) 50%, transparent); box-shadow: 0 24px 50px -30px var(--c); }
.stat > * { position: relative; }
.stat-label { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.stat-label::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--c); box-shadow: 0 0 10px var(--c); }
.stat b {
  display: block; margin: 10px 0 4px; font-size: clamp(32px, 3.4vw, 44px); font-weight: 700; line-height: 1; letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(180deg, #fff 30%, rgba(245, 245, 240, 0.55)); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stat-sub { font-size: 13.5px; color: var(--text-2); }

/* Activity over the last fortnight */
.chart { display: flex; align-items: flex-end; gap: 6px; height: 120px; padding: 6px 0 0; }
.chart-bar { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; height: 100%; justify-content: flex-end; }
.chart-bar i {
  display: block; width: 100%; min-height: 3px; border-radius: 6px 6px 3px 3px;
  height: var(--h);
  background: linear-gradient(180deg, var(--teal), rgba(0, 150, 161, 0.25));
  box-shadow: 0 0 18px -6px var(--teal);
  transform-origin: bottom; animation: grow-up 900ms var(--ease-out) both; animation-delay: calc(var(--i, 0) * 40ms + 200ms);
}
.chart-bar.is-today i { background: linear-gradient(180deg, var(--orange), rgba(231, 130, 34, 0.3)); box-shadow: 0 0 18px -6px var(--orange); }
.chart-bar span { font-size: 11px; color: var(--muted); }
@keyframes grow-up { from { transform: scaleY(0); } }

/* ---------- Buttons ---------- */

.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 9px 18px; border-radius: var(--radius);
  font: 600 15px/1.2 var(--font); text-decoration: none; cursor: pointer;
  border: 1px solid transparent; white-space: nowrap; isolation: isolate; overflow: hidden;
  transition: background-color var(--motion) ease, border-color var(--motion) ease, color var(--motion) ease, box-shadow 300ms ease, scale 200ms ease;
}
.btn:active { scale: 0.98; }
.btn svg { width: 16px; height: 16px; transition: transform 300ms var(--ease-out); }
.btn:hover svg { transform: translateX(2px); }
.btn-primary {
  background: var(--action); color: var(--white);
  box-shadow: 0 0 0 1px rgba(0, 150, 161, 0.5) inset, 0 12px 32px -16px rgba(0, 150, 161, 0.9);
}
/* A band of light sweeps across on hover. */
.btn-primary::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.26) 50%, transparent 70%);
  transform: translateX(-120%); transition: transform 0.9s var(--ease-out);
}
.btn-primary:hover { background: var(--action-hi); color: var(--white); box-shadow: 0 0 0 1px rgba(0, 150, 161, 0.85) inset, 0 16px 40px -14px rgba(0, 150, 161, 1); }
.btn-primary:hover::before { transform: translateX(120%); }
.btn-secondary, .btn-glass {
  background: rgba(245, 245, 240, 0.06); color: var(--paper); border-color: rgba(245, 245, 240, 0.18);
}
.btn-secondary:hover, .btn-glass:hover { background: rgba(245, 245, 240, 0.12); border-color: rgba(245, 245, 240, 0.4); color: var(--paper); }
.btn-glass { -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.btn-danger { background: rgba(239, 68, 68, 0.08); color: var(--danger); border-color: rgba(255, 143, 133, 0.4); }
.btn-danger:hover { background: rgba(239, 68, 68, 0.18); border-color: var(--danger); color: #ffb3ab; }
.btn-link { background: none; border: 0; padding: 0; min-height: 0; color: var(--link); font-weight: 600; overflow: visible; }
.btn-link:hover { color: var(--paper); text-decoration: underline; }
.btn-sm { min-height: 34px; padding: 6px 13px; font-size: 14px; border-radius: 8px; }
.btn-lg { min-height: 50px; padding: 13px 22px; font-size: 16px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }
form.inline { display: inline; margin: 0; }

/* ---------- Forms ---------- */

.field { display: grid; gap: 7px; }
.field + .field { margin-top: 18px; }
label, .label { font-weight: 600; font-size: 14.5px; color: var(--paper); }
.hint { font-size: 13.5px; color: var(--muted); font-weight: 400; }
.input, select.input, textarea.input {
  width: 100%; min-height: 44px; padding: 10px 13px; border-radius: var(--radius);
  border: 1px solid rgba(245, 245, 240, 0.2); background: var(--field-bg); color: var(--paper);
  font: 400 15px/1.4 var(--font);
  transition: border-color var(--motion) ease, box-shadow 250ms ease, background var(--motion) ease;
}
.input::placeholder { color: rgba(159, 176, 184, 0.8); }
.input:hover { border-color: rgba(245, 245, 240, 0.34); }
.input:focus, .input:focus-visible {
  outline: none; border-color: var(--teal); background: rgba(6, 13, 20, 0.75);
  box-shadow: 0 0 0 4px rgba(0, 150, 161, 0.22), 0 0 30px -10px rgba(0, 150, 161, 0.8);
}
select.input {
  appearance: none; -webkit-appearance: none; padding-right: 38px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239fb0b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 16px;
}
select.input option { background: #142230; color: var(--paper); }
textarea.input { min-height: 96px; resize: vertical; }
.input[readonly] { background: rgba(245, 245, 240, 0.03); border-color: var(--line-soft); color: var(--text-2); }
.input.is-invalid { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.18); }
.error { color: var(--danger); font-size: 14px; }
.check { display: flex; align-items: flex-start; gap: 10px; font-weight: 500; }
.check input, .radio-card input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--teal); flex: none; }
.radio-card {
  position: relative; display: flex; align-items: flex-start; gap: 14px; padding: 15px 16px; border-radius: 14px; cursor: pointer;
  border: 1px solid var(--line); background: rgba(245, 245, 240, 0.03);
  transition: border-color 250ms ease, background 250ms ease, box-shadow 300ms ease, translate 300ms var(--spring);
}
.radio-card + .radio-card { margin-top: 10px; }
.radio-card:hover { border-color: rgba(245, 245, 240, 0.3); background: rgba(245, 245, 240, 0.05); translate: 3px 0; }
.radio-card:has(input:checked) {
  border-color: var(--teal); background: rgba(0, 150, 161, 0.1);
  box-shadow: 0 0 0 1px rgba(0, 150, 161, 0.5) inset, 0 16px 40px -24px var(--teal);
}
.radio-card:has(input:disabled) { opacity: 0.55; cursor: not-allowed; translate: 0 0; }
.radio-card .product-glyph { width: 38px; height: 38px; border-radius: 10px; }
.radio-card .product-glyph svg { width: 20px; height: 20px; }
.form-actions { display: flex; gap: 12px; align-items: center; margin-top: 26px; flex-wrap: wrap; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { font-weight: 600; font-size: 15px; padding: 0; margin-bottom: 12px; color: var(--paper); }
details > summary { color: var(--link); }

.access-table { width: 100%; border-collapse: collapse; }
.access-table td { padding: 14px 0; border-top: 1px solid var(--line-soft); vertical-align: middle; }
.access-table td:first-child { padding-right: 16px; }
.access-table tr:first-child td { border-top: 0; }
.access-table td:last-child { width: 50%; }

/* ---------- Tables ---------- */

.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.table th {
  text-align: left; font-weight: 600; font-size: 11.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted);
  padding: 14px 18px; border-bottom: 1px solid var(--line); white-space: nowrap; background: rgba(245, 245, 240, 0.025);
}
.table th:first-child { border-top-left-radius: var(--radius-lg); }
.table th:last-child { border-top-right-radius: var(--radius-lg); }
.table td { padding: 15px 18px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; color: var(--text-2); }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { position: relative; transition: background 200ms ease; animation: row-in 500ms var(--ease-out) both; animation-delay: calc(var(--r, 0) * 35ms + 120ms); }
.table tbody tr:hover { background: rgba(245, 245, 240, 0.035); }
.table tbody tr:hover td:first-child { box-shadow: inset 3px 0 0 var(--teal); }
@keyframes row-in { from { opacity: 0; translate: -10px 0; } }
.table td.actions { text-align: right; white-space: nowrap; }
.table td.actions .btn + .btn, .table td.actions .btn + form, .table td.actions form + form, .table td.actions form + .btn { margin-left: 6px; }
.table .primary-cell { font-weight: 600; color: var(--paper); }
.table a.primary-cell, .table .primary-cell a { color: var(--paper); text-decoration: none; }
.table a.primary-cell:hover, .table .primary-cell a:hover { color: var(--link); text-decoration: underline; }

/* A monogram for each tenant and person. */
.who-cell { display: flex; align-items: center; gap: 12px; }
.mono-tile {
  --c: var(--teal);
  width: 36px; height: 36px; flex: none; border-radius: 11px; display: grid; place-items: center;
  font-size: 13px; font-weight: 700; letter-spacing: 0.02em; color: #fff;
  background: linear-gradient(135deg, color-mix(in srgb, var(--c) 70%, #fff 0%), color-mix(in srgb, var(--c) 35%, var(--ink)));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--c) 50%, transparent), 0 10px 20px -12px var(--c);
}
.mono-tile.round { border-radius: 50%; }

/* ---------- Badges and chips ---------- */

.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px;
  font-size: 12.5px; font-weight: 600; line-height: 1.65; white-space: nowrap; text-decoration: none;
  background: rgba(245, 245, 240, 0.07); color: var(--text-2); border: 1px solid rgba(245, 245, 240, 0.14);
}
a.badge:hover { color: var(--paper); border-color: rgba(245, 245, 240, 0.35); }
.badge-success { background: var(--success-soft); color: var(--success); border-color: rgba(111, 211, 154, 0.25); }
.badge-success::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 0 currentColor; animation: live 2.4s infinite; }
.badge-warning { background: var(--warning-soft); color: var(--warning); border-color: rgba(245, 178, 92, 0.25); }
.badge-danger { background: var(--danger-soft); color: var(--danger); border-color: rgba(255, 143, 133, 0.3); }
.badge-info { background: var(--info-soft); color: var(--info); border-color: rgba(127, 211, 218, 0.25); }
.badge-ink {
  color: var(--paper); border-color: rgba(0, 150, 161, 0.5);
  background: linear-gradient(90deg, rgba(0, 150, 161, 0.35), rgba(176, 58, 141, 0.3));
}
@keyframes live { 70% { box-shadow: 0 0 0 6px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }

.chip {
  --accent: var(--teal);
  display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px 2px 8px;
  border-radius: 999px; border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  font-size: 12.5px; font-weight: 600; white-space: nowrap; color: var(--paper);
}
.chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent); }
.chip .muted { color: var(--text-2); }
.chip.is-error { border-color: rgba(255, 143, 133, 0.5); color: var(--danger); background: var(--danger-soft); }
.chip.is-pending { border-style: dashed; color: var(--muted); background: transparent; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }

/* Activity actions, coloured by area */
.action {
  --c: var(--teal);
  display: inline-flex; align-items: center; gap: 8px; padding: 3px 10px; border-radius: 8px;
  font: 500 12.5px/1.5 var(--mono-font); color: var(--paper);
  background: color-mix(in srgb, var(--c) 12%, transparent); border: 1px solid color-mix(in srgb, var(--c) 30%, transparent);
}
.action::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--c); box-shadow: 0 0 8px var(--c); }

/* ---------- Alerts ---------- */

.alert {
  --c: var(--teal);
  position: relative; display: flex; gap: 12px; align-items: flex-start; padding: 14px 18px 14px 20px; border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--c) 35%, transparent); font-size: 15px; margin-bottom: 22px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--c) 16%, transparent), rgba(13, 23, 33, 0.7) 70%);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  color: var(--paper); overflow: hidden;
}
.alert::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--c); box-shadow: 0 0 16px var(--c); }
.alert svg { width: 20px; height: 20px; flex: none; margin-top: 1px; color: var(--c); }
.alert-success { --c: #34c778; }
.alert-warning { --c: var(--orange); }
.alert-danger { --c: #ef4444; }
.alert-info { --c: var(--teal); }
.alert .mono { color: var(--text-2); }

/* ---------- Product rows and tiles ---------- */

.product-glyph {
  --accent: var(--teal);
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; flex: none; color: #fff;
  background: color-mix(in srgb, var(--accent) 26%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 55%, transparent);
  box-shadow: 0 0 26px -8px var(--accent);
  transition: transform 420ms var(--spring), box-shadow 420ms ease, background var(--motion) ease;
}
.product-glyph svg { width: 22px; height: 22px; }

.product-row { display: flex; align-items: center; gap: 16px; padding: 18px 26px; border-top: 1px solid var(--line-soft); transition: background 200ms ease; }
.product-row:first-of-type { border-top: 0; }
.product-row:hover { background: rgba(245, 245, 240, 0.03); }
.product-row .product-glyph { width: 40px; height: 40px; }
.product-row .product-glyph svg { width: 20px; height: 20px; }
.product-row .info { flex: 1; min-width: 0; }
.product-row .info .name { font-weight: 600; color: var(--paper); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.product-row .info .meta { font-size: 13.5px; color: var(--muted); overflow-wrap: anywhere; margin-top: 2px; }

/* Apps screen: one 3D card per product */
.app-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.app-card {
  --accent: var(--teal);
  position: relative; display: flex; flex-direction: column; border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(245, 245, 240, 0.07), rgba(245, 245, 240, 0.015) 55%), var(--glass);
  border: 1px solid var(--line); box-shadow: var(--shadow);
  transform: perspective(1000px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transform-style: preserve-3d;
  transition: border-color 300ms ease, box-shadow 300ms ease;
}
.app-card::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(340px circle at var(--mx, 50%) var(--my, 0%), color-mix(in srgb, var(--accent) 18%, transparent), transparent 70%);
  opacity: 0; transition: opacity 300ms ease;
}
.app-card:hover { border-color: color-mix(in srgb, var(--accent) 50%, transparent); box-shadow: 0 40px 80px -40px color-mix(in srgb, var(--accent) 70%, #000); }
.app-card:hover::after { opacity: 1; }
.app-card .card-scene { height: 130px; }
.app-card .app-body { padding: 18px 22px 8px; display: grid; gap: 10px; transform: translateZ(10px); }
.app-card .app-title { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.app-card .app-title h2 { font-size: 20px; }
.app-card .meta { font-size: 13.5px; color: var(--muted); overflow-wrap: anywhere; }
.app-card .meta.error { color: var(--danger); }
.app-card .app-actions { display: flex; gap: 8px; flex-wrap: wrap; padding: 12px 22px 20px; margin-top: auto; transform: translateZ(14px); }

/* Tenant page: the products as tiles */
.product-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line-soft); border-radius: 0 0 var(--radius-lg) var(--radius-lg); overflow: hidden; }
.product-tile {
  --accent: var(--teal);
  position: relative; display: flex; flex-direction: column; gap: 12px; padding: 22px 24px; background: rgba(13, 23, 33, 0.82);
  transition: background 300ms ease;
}
.product-tile::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0.6;
  background: radial-gradient(70% 90% at 100% 0%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%);
}
.product-tile:hover { background: rgba(18, 31, 44, 0.9); }
.product-tile > * { position: relative; }
.product-tile .tile-head { display: flex; align-items: center; gap: 12px; }
.product-tile .name { font-weight: 600; color: var(--paper); font-size: 17px; }
.product-tile .meta { font-size: 13.5px; color: var(--muted); overflow-wrap: anywhere; }
.product-tile .row { margin-top: auto; }
.status-dot { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; }
.status-dot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.status-dot.is-on { color: var(--success); }
.status-dot.is-on::before { box-shadow: 0 0 0 0 currentColor; animation: live 2.4s infinite; }
.status-dot.is-off { color: var(--muted); }
.status-dot.is-error { color: var(--danger); }

/* ---------- Definition list, code, QR ---------- */

dl.meta { display: grid; grid-template-columns: 160px 1fr; gap: 12px 16px; margin: 0; font-size: 14.5px; }
dl.meta dt { color: var(--muted); }
dl.meta dd { margin: 0; overflow-wrap: anywhere; color: var(--paper); }

pre.code {
  margin: 0; padding: 18px 20px; border-radius: 14px; color: #dfe9ec;
  background: rgba(3, 8, 13, 0.7); border: 1px solid var(--line-soft);
  box-shadow: inset 0 0 40px -20px rgba(0, 150, 161, 0.6);
  font: 13.5px/1.7 var(--mono-font); overflow-x: auto; white-space: pre;
}

.qr { background: var(--white); padding: 12px; border-radius: 14px; width: max-content; box-shadow: 0 0 40px -10px rgba(0, 150, 161, 0.8); }
.qr svg { width: 192px; height: 192px; }
.codes { display: grid; grid-template-columns: repeat(2, max-content); gap: 6px 24px; font: 15px var(--mono-font); color: var(--paper); }

/* ---------- Empty states, pagination, search ---------- */

.empty {
  padding: 56px 24px; text-align: center; color: var(--text-2); border-radius: var(--radius-lg);
  background: rgba(13, 23, 33, 0.6); border: 1px dashed rgba(245, 245, 240, 0.2);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
}
.empty h2 { color: var(--paper); margin-bottom: 8px; }

.pagination { display: flex; gap: 6px; margin-top: 18px; flex-wrap: wrap; }
.pagination a, .pagination span {
  min-width: 38px; height: 38px; padding: 0 12px; display: inline-grid; place-items: center; border-radius: 10px;
  border: 1px solid var(--line); background: rgba(13, 23, 33, 0.6); text-decoration: none; color: var(--paper); font-size: 14px;
  transition: border-color var(--motion) ease, background var(--motion) ease;
}
.pagination a:hover { border-color: var(--teal); background: rgba(0, 150, 161, 0.15); }
.pagination .current { background: var(--action); border-color: rgba(0, 150, 161, 0.7); }
.pagination .disabled { color: rgba(245, 245, 240, 0.25); }

.search { display: flex; gap: 8px; max-width: 460px; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 18px; }
.toolbar .input { max-width: 320px; }
.toolbar select.input { max-width: 210px; }
.search-input { position: relative; flex: 1; min-width: 220px; max-width: 360px; }
.search-input svg { position: absolute; left: 13px; top: 50%; translate: 0 -50%; width: 17px; height: 17px; color: var(--muted); pointer-events: none; }
.search-input .input { padding-left: 40px; max-width: none; }

/* ==========================================================================
   Dashboard: the product launchpad
   ========================================================================== */

.welcome {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  padding: 20px 0 36px;
}
.welcome-date {
  display: flex; align-items: center; gap: 12px; margin-bottom: 16px;
  font-size: 12.5px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted);
}
.welcome-date::before { content: ""; width: 30px; height: 2px; border-radius: 2px; background: var(--spectrum); }
.welcome h1 { font-size: clamp(38px, 5.4vw, 66px); line-height: 1; letter-spacing: -0.04em; text-shadow: 0 4px 40px rgba(16, 28, 40, 0.8); }
.welcome h1 .name, .page-head h1 .name {
  background: var(--spectrum); background-size: 300% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: shimmer 9s linear infinite;
}
.welcome-lede { margin-top: 14px; font-size: 17px; color: var(--text-2); }

.tenant-group + .tenant-group { margin-top: 48px; }
.tenant-group h2 { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; font-size: 18px; color: var(--paper); }
.tenant-group h2 .badge { font-size: 12px; }
.tenant-group h2 .count { font-size: 13px; font-weight: 500; color: var(--muted); }

.products { display: grid; grid-template-columns: repeat(auto-fill, minmax(258px, 1fr)); gap: 20px; }

.product-card {
  --accent: var(--teal);
  position: relative; display: flex; flex-direction: column; border-radius: var(--radius-lg);
  text-decoration: none; color: var(--paper);
  background: linear-gradient(180deg, rgba(245, 245, 240, 0.08), rgba(245, 245, 240, 0.015) 55%), rgba(13, 23, 33, 0.72);
  border: 1px solid var(--line); box-shadow: var(--shadow);
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transform-style: preserve-3d;
  transition: box-shadow 300ms ease, border-color 300ms ease, opacity 450ms ease, scale 600ms var(--spring);
  animation: rise 640ms var(--ease-out) both; animation-delay: calc(var(--i, 0) * 80ms + 120ms);
}
.product-card::before {
  content: ""; position: absolute; top: -1px; left: 18px; right: 18px; height: 1px; opacity: 0.9;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
}
.product-card::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(300px circle at var(--mx, 50%) var(--my, 0%), color-mix(in srgb, var(--accent) 22%, transparent), transparent 70%);
  opacity: 0; transition: opacity var(--motion) ease;
}
a.product-card:is(:hover, :focus-visible) {
  color: var(--paper);
  border-color: color-mix(in srgb, var(--accent) 55%, transparent);
  box-shadow: 0 40px 80px -36px color-mix(in srgb, var(--accent) 70%, #000), 0 0 0 1px color-mix(in srgb, var(--accent) 30%, transparent);
}
a.product-card:is(:hover, :focus-visible)::after { opacity: 1; }
a.product-card:hover .product-glyph { transform: translateZ(34px) rotate(-6deg); background: color-mix(in srgb, var(--accent) 40%, transparent); }
a.product-card:hover h3 { transform: translateZ(18px); }
.product-card h3 { font-size: 19px; letter-spacing: -0.015em; transition: transform 420ms var(--spring); }
.product-card .tagline { font-size: 14.5px; line-height: 1.45; color: var(--text-2); }
.product-card .open {
  display: flex; align-items: center; justify-content: space-between; margin: auto 14px 14px; padding: 12px 14px; border-radius: 12px;
  font-weight: 600; font-size: 14.5px; color: var(--paper);
  background: rgba(245, 245, 240, 0.05); border: 1px solid rgba(245, 245, 240, 0.08);
  transform: translateZ(14px); transition: background 200ms ease, border-color 200ms ease;
}
.product-card .open svg { width: 18px; height: 18px; transition: transform var(--motion) ease; }
a.product-card:is(:hover, :focus-visible) .open { background: var(--action); border-color: rgba(0, 150, 161, 0.7); }
a.product-card:hover .open svg { transform: translateX(3px); }
.product-card.is-disabled { animation-name: rise-dim; opacity: 0.55; }
.product-card.is-disabled .card-scene { filter: grayscale(0.7); }
@keyframes rise-dim { from { opacity: 0; translate: 0 18px; } to { opacity: 0.55; } }

/* A light that runs around the edge of a card under the pointer. */
.card-glow {
  position: absolute; inset: -1px; z-index: 2; border-radius: inherit; padding: 1px; pointer-events: none;
  background: conic-gradient(from var(--angle), transparent 0deg, var(--accent) 60deg, transparent 140deg, transparent 220deg, color-mix(in srgb, var(--accent) 50%, #fff) 260deg, transparent 320deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  opacity: 0; transition: opacity 300ms ease;
  animation: edge-run 4.5s linear infinite;
}
:is(a.product-card, .app-card):is(:hover, :focus-visible, :focus-within) .card-glow { opacity: 1; }
@keyframes edge-run { to { --angle: 360deg; } }

.card-scene {
  position: relative; display: block; height: 118px; margin: 14px 14px 0; border-radius: 12px; overflow: hidden;
  background:
    radial-gradient(90% 100% at 75% 0%, color-mix(in srgb, var(--accent) 28%, transparent), transparent 70%),
    rgba(6, 13, 20, 0.6);
  border: 1px solid rgba(245, 245, 240, 0.06);
  transform: translateZ(16px);
  transition: transform 500ms var(--spring);
}
:is(a.product-card, .app-card):is(:hover, :focus-visible, :focus-within) .card-scene { transform: translateZ(34px); }
.card-scene svg { display: block; width: 100%; height: 100%; }

.pc-body { display: flex; flex-direction: column; gap: 10px; padding: 18px 20px 14px; transform: translateZ(10px); }
.pc-title { display: flex; align-items: center; gap: 12px; }
.product-card .product-glyph { width: 40px; height: 40px; }
.product-card .product-glyph svg { width: 21px; height: 21px; }
.pc-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.pc-meta span {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px;
  font-size: 12.5px; color: var(--text-2); background: rgba(245, 245, 240, 0.05); border: 1px solid rgba(245, 245, 240, 0.09);
}
.pc-meta .role::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent); }

/* Opening a product: the chosen card swells, the rest step back. */
.is-launching .product-card:not(.is-launching) { opacity: 0.25; scale: 0.96; }
.product-card.is-launching {
  scale: 1.05; border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 40px 120px -20px var(--accent);
}

/* The product scenes: resting frames */
.scene .sc-col { fill: rgba(245, 245, 240, 0.035); stroke: rgba(245, 245, 240, 0.08); }
.scene .sc-dim { fill: rgba(245, 245, 240, 0.3); }
.scene .sc-soft { fill: rgba(245, 245, 240, 0.14); }
.scene .sc-card { fill: rgba(245, 245, 240, 0.09); }
.scene .sc-a { fill: var(--accent); }
.scene .sc-ink { fill: rgba(16, 28, 40, 0.55); }
.scene .sc-track { fill: rgba(245, 245, 240, 0.08); }
.scene .sc-line { stroke: rgba(245, 245, 240, 0.35); stroke-width: 1.2; }
.scene .sc-paper { fill: rgba(245, 245, 240, 0.85); }
.scene .sc-ok { fill: #3ddc84; }
.scene .sc-tick { fill: none; stroke: #fff; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.scene .sign { fill: none; stroke: var(--accent); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 220; }
.scene .sc-amount { font: 700 21px/1 var(--font); letter-spacing: -0.02em; fill: var(--paper); }
.scene .sc-stamp { fill: none; stroke: var(--accent); stroke-width: 2; }
.scene .sc-stamp-text { font: 800 11px/1 var(--font); letter-spacing: 0.16em; fill: var(--accent); }
.scene .bar { transform-box: fill-box; transform-origin: left center; }
.scene-bill .bar { transform-origin: center bottom; }
.scene-flow .mv { transform: translate(88px, -24px); }
.scene-bill .stamp, .scene-docs .seal { transform-box: fill-box; transform-origin: center; }
.scene-bill .stamp { transform: rotate(-10deg); }

/* …and what plays while the card is hovered or focused */
:is(a.product-card, .app-card):is(:hover, :focus-visible, :focus-within) .scene-flow .mv { animation: sc-flow 3.6s var(--ease-out) infinite; }
:is(a.product-card, .app-card):is(:hover, :focus-visible, :focus-within) .scene-flow .bar { animation: sc-progress 3.6s var(--ease-out) infinite; }
:is(a.product-card, .app-card):is(:hover, :focus-visible, :focus-within) .scene-pulse .bar { animation: sc-bar 3.2s var(--ease-out) infinite both; }
:is(a.product-card, .app-card):is(:hover, :focus-visible, :focus-within) .scene-pulse .now { animation: sc-now 3.2s linear infinite; }
:is(a.product-card, .app-card):is(:hover, :focus-visible, :focus-within) .scene-docs .sign { animation: sc-sign 3.4s ease-in-out infinite; }
:is(a.product-card, .app-card):is(:hover, :focus-visible, :focus-within) .scene-docs .seal { animation: sc-seal 3.4s var(--spring) infinite; }
:is(a.product-card, .app-card):is(:hover, :focus-visible, :focus-within) .scene-docs .chip-l { animation: sc-bob 3.4s ease-in-out infinite; }
:is(a.product-card, .app-card):is(:hover, :focus-visible, :focus-within) .scene-docs .chip-r { animation: sc-bob 3.4s ease-in-out -1.7s infinite; }
:is(a.product-card, .app-card):is(:hover, :focus-visible, :focus-within) .scene-bill .bar { animation: sc-rise 3.4s var(--ease-out) infinite both; }
:is(a.product-card, .app-card):is(:hover, :focus-visible, :focus-within) .scene-bill .stamp { animation: sc-stamp 3.4s var(--ease-out) infinite; }
.scene-pulse .b2, .scene-bill .c2 { animation-delay: 0.08s !important; }
.scene-pulse .b3, .scene-bill .c3 { animation-delay: 0.16s !important; }
.scene-pulse .b4, .scene-bill .c4 { animation-delay: 0.24s !important; }
.scene-pulse .b5, .scene-bill .c5 { animation-delay: 0.32s !important; }
.scene-pulse .b6 { animation-delay: 0.4s !important; }
.scene-pulse .b7 { animation-delay: 0.48s !important; }

@keyframes sc-flow {
  0% { transform: translate(0, 0); opacity: 0; }
  8% { opacity: 1; }
  30%, 45% { transform: translate(88px, -24px); }
  70%, 88% { transform: translate(178px, 0); opacity: 1; }
  100% { transform: translate(178px, 0); opacity: 0; }
}
@keyframes sc-progress { 0% { transform: scaleX(0.15); } 40% { transform: scaleX(0.55); } 75%, 100% { transform: scaleX(1.37); } }
@keyframes sc-bar { 0% { transform: scaleX(0); } 35%, 100% { transform: scaleX(1); } }
@keyframes sc-now { from { transform: translateX(-172px); } to { transform: translateX(60px); } }
@keyframes sc-sign { 0%, 8% { stroke-dashoffset: 220; } 55%, 100% { stroke-dashoffset: 0; } }
@keyframes sc-seal { 0%, 52% { transform: scale(0); } 64% { transform: scale(1.2); } 72%, 100% { transform: scale(1); } }
@keyframes sc-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes sc-rise { 0% { transform: scaleY(0); } 40%, 100% { transform: scaleY(1); } }
@keyframes sc-stamp {
  0%, 42% { transform: rotate(-10deg) scale(1.8); opacity: 0; }
  56% { transform: rotate(-10deg) scale(0.92); opacity: 1; }
  64%, 100% { transform: rotate(-10deg) scale(1); opacity: 1; }
}

/* ==========================================================================
   Launch and sign-out screens
   ========================================================================== */

.launching {
  min-height: 100vh; display: grid; place-items: center; padding: 24px; text-align: center; color: var(--paper);
  background: radial-gradient(45% 45% at 50% 45%, color-mix(in srgb, var(--accent, var(--teal)) 24%, transparent), transparent 70%);
}
.launch-stage {
  view-transition-name: launch;
  padding: 44px 56px 36px; border-radius: 24px;
  background: rgba(245, 245, 240, 0.04); border: 1px solid rgba(245, 245, 240, 0.1);
  box-shadow: 0 0 120px -30px var(--accent, var(--teal));
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
}
.launching h1 { font-size: 26px; letter-spacing: -0.02em; }
.launching p { margin-top: 8px; color: var(--text-2); }

.error-stage { max-width: 520px; }
.launching .error-code { color: transparent; margin-top: 0; }
.error-code {
  font-size: clamp(72px, 12vw, 120px); font-weight: 800; line-height: 1; letter-spacing: -0.06em; margin-bottom: 12px;
  background: var(--spectrum); background-size: 300% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: shimmer 9s linear infinite;
}

/* A small 3D double helix in the product's colour. */
.helix-loader { position: relative; width: 64px; height: 96px; margin: 0 auto 24px; perspective: 320px; }
.helix-loader i {
  position: absolute; left: 10px; right: 10px; top: calc(var(--i) * 8.5px + 4px); height: 2px;
  background: linear-gradient(90deg, var(--accent, var(--teal)), rgba(245, 245, 240, 0.6)); border-radius: 2px; opacity: 0.85;
  transform-style: preserve-3d; animation: helix-turn 1.8s linear infinite; animation-delay: calc(var(--i) * -0.15s);
}
.helix-loader i::before, .helix-loader i::after { content: ""; position: absolute; top: -4px; width: 10px; height: 10px; border-radius: 50%; }
.helix-loader i::before { left: -5px; background: var(--accent, var(--teal)); box-shadow: 0 0 10px var(--accent, var(--teal)); }
.helix-loader i::after { right: -5px; background: rgba(245, 245, 240, 0.7); }
@keyframes helix-turn { to { transform: rotateY(360deg); } }

/* ==========================================================================
   Sign-in pages: the copy floats over the field, the form is a glass card
   ========================================================================== */

.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
.auth-aside {
  position: relative; padding: 48px; color: var(--paper);
  display: flex; flex-direction: column; justify-content: space-between; overflow: hidden;
}
.auth-aside .flow { position: absolute; inset: auto -20% -10% -20%; opacity: 0.9; pointer-events: none; }
.has-field .auth-aside .flow { display: none; }
.auth-aside > :not(.flow) { position: relative; z-index: 1; }
.auth-aside .brand img { height: 36px; }
.auth-aside h1 { font-size: clamp(34px, 3.4vw, 46px); line-height: 1.05; max-width: 460px; text-shadow: 0 2px 30px rgba(16, 28, 40, 0.9); animation: rise 700ms var(--ease-out) both; }
.auth-aside h1 .name { background: var(--spectrum); background-size: 300% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shimmer 9s linear infinite; }
.auth-aside p { color: var(--text-2); max-width: 420px; margin-top: 16px; text-shadow: 0 0 2px rgba(16, 28, 40, 0.9), 0 1px 14px rgba(16, 28, 40, 0.95); animation: rise 700ms var(--ease-out) 120ms both; }
.auth-aside .foot { text-shadow: 0 0 2px rgba(16, 28, 40, 0.9), 0 1px 10px rgba(16, 28, 40, 0.95); }
.auth-aside .product-dots { display: flex; gap: 10px; margin-top: 28px; flex-wrap: wrap; animation: rise 700ms var(--ease-out) 220ms both; }
.auth-aside .product-dots span {
  display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; color: #e6ecef;
  padding: 5px 12px; border: 1px solid rgba(255, 255, 255, 0.18); border-radius: 999px;
  background: rgba(16, 28, 40, 0.6); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.auth-aside .product-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); box-shadow: 0 0 10px var(--c); }
.auth-aside .foot { font-size: 13px; color: var(--muted); }
.auth-main { display: grid; place-items: center; padding: 48px 24px; }
.auth-card {
  position: relative; width: 100%; max-width: 440px; padding: 36px 34px 30px; border-radius: 24px;
  background: linear-gradient(180deg, rgba(245, 245, 240, 0.08), rgba(245, 245, 240, 0.02) 45%), rgba(13, 23, 33, 0.72);
  border: 1px solid var(--line); box-shadow: 0 40px 90px -40px rgba(0, 0, 0, 0.95), 0 0 80px -40px rgba(0, 150, 161, 0.6);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  animation: rise 700ms var(--ease-out) 100ms both;
}
.auth-card::before {
  content: ""; position: absolute; top: -1px; left: 30px; right: 30px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0, 150, 161, 0.9), rgba(176, 58, 141, 0.7), transparent);
}
.auth-card h2 { font-size: 28px; font-weight: 700; letter-spacing: -0.03em; margin-bottom: 8px; }
.auth-card .lede { color: var(--text-2); margin-bottom: 28px; }
.auth-card .below { margin-top: 22px; font-size: 14.5px; color: var(--muted); }
.auth-mobile-brand { display: none; margin-bottom: 28px; }
.auth-mobile-brand img { height: 30px; }

/* ---------- Responsive ---------- */

@media (max-width: 1000px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .app-grid, .product-tiles { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .auth { grid-template-columns: 1fr; }
  .auth-aside { display: none; }
  .auth-mobile-brand { display: block; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  dl.meta { grid-template-columns: 1fr; gap: 2px 0; }
  dl.meta dd { margin-bottom: 10px; }
}

@media (max-width: 760px) {
  .topbar-inner { height: auto; min-height: 60px; flex-wrap: wrap; padding: 10px 16px; gap: 12px; }
  .brand-label { display: none; }
  .nav { order: 3; flex-basis: 100%; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; scrollbar-color: rgba(245, 245, 240, 0.2) transparent; }
  .nav a[aria-current="page"]::after { bottom: -4px; }
  .account .who { display: none; }
  .page { padding: 24px 16px 56px; }
  .card-body { padding: 20px; }
  .card-head, .product-row { padding-left: 20px; padding-right: 20px; }
  .auth-card { padding: 28px 22px 24px; }
  .welcome { padding: 8px 0 28px; }
  .launch-stage { padding: 36px 28px 28px; }
  .stat { padding: 16px 16px 14px; }
  .access-table td { display: block; width: 100% !important; padding: 6px 0; border-top: 0; }
  .access-table tr { display: block; padding: 10px 0; border-top: 1px solid var(--line-soft); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  @view-transition { navigation: none; }
}
