/* Waypoint GUI redesign — design package (docs/redesign/*)
 * Default = Sand (mono-sand) dark · status-dot kanban · sidebar directory
 */

:root {
  color-scheme: dark;

  /* Defaults = Sand (mono-sand) dark; overridden by data-theme */
  --bg: #121311;
  --bg-sidebar: #1c1d1a;
  --bg-elev: #2b2b28;
  --bg-card: #242422;
  --bg-hover: #3d3d38;
  --bg-input: #181917;
  --input: #31322e;
  --input-hover: #43433e;
  --input-border: #686458;
  --ring: rgba(214, 185, 140, 0.28);
  --border: #545248;
  --border-strong: #756f61;
  --border-soft: rgba(166, 139, 91, 0.1);
  --text: #eef2f1;
  --text-soft: #c8d4d0;
  --muted: #8a9692;
  --muted-2: #7d8a85;
  --brand: #d6b98c;
  --brand-2: #a68b5b;
  --accent: #d6b98c;
  --accent-dim: #a68b5b;
  --accent-soft: rgba(214, 185, 140, 0.12);
  --accent-glow: rgba(214, 185, 140, 0.16);
  --cta: #f5e6d3;
  --cta-text: #0a1210;
  --cta-hover: #f9f0e4;
  --focus: #d6b98c;
  --ok-bg: rgba(214, 185, 140, 0.1);
  --ok-border: rgba(214, 185, 140, 0.28);
  --danger-bg: rgba(248, 113, 113, 0.10);
  --warn-bg: rgba(251, 191, 36, 0.10);
  --shadow: 0 10px 30px rgba(0,0,0,0.40);

  /* Semantic text on tinted backgrounds (banners, chips, health pills) */
  --danger-text: #fecaca;
  --danger-border: rgba(248, 113, 113, 0.40);
  --danger-solid: #7f1d1d;
  --danger-solid-text: #fee2e2;
  --danger-solid-border: #991b1b;
  --warn-text: #fcd34d;
  --warn-border: rgba(251, 191, 36, 0.35);

  /* Status (shared across themes) */
  --todo: #38bdf8;
  --in-progress: #fbbf24;
  --blocked: #f87171;
  --review: #c084fc;
  --peer-review: #2dd4bf;
  --deploying: #fbbf24;
  --done: #4ade80;
  --wontfix: #6b7c76;

  /* Priority */
  --p0: #fb923c;
  --p1: #38bdf8;
  --p2: #94a3b8;
  --p3: #64748b;

  --radius: 3px;
  --radius-sm: 3px;
  --radius-pill: 3px;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --sidebar-w: 15.5rem;
  --drawer-w: min(440px, 100vw);
  --header-h: 3.75rem;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

a {
  color: var(--accent);
}

/* ─── App shell ───────────────────────────────────────────── */

.app {
  min-height: 100vh;
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  background:
    radial-gradient(1200px 600px at 10% -10%, var(--accent-soft), transparent 55%),
    var(--bg);
}

.app:focus {
  outline: none;
}

/* Modal open: freeze page/sidebar scroll; only modal panes may scroll. */
html.modal-open,
html.modal-open body {
  overflow: hidden !important;
  overscroll-behavior: none;
  height: 100%;
}

html.modal-open .app {
  overflow: hidden;
  max-height: 100vh;
}

html.modal-open .sidebar {
  overflow: hidden;
}

html.modal-open .shell-main {
  overflow: hidden;
}

/* ─── Sidebar ─────────────────────────────────────────────── */

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 1.1rem 0.85rem 1rem;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  overflow-y: auto;
  z-index: 15;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.25rem 0.55rem 0.65rem;
  min-width: 0;
}

/* Icon beside title stack: Waypoint / Ticket Tracking */
.brand-mark {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
}

.brand-icon {
  width: 28px;
  height: 28px;
  border-radius: 3px;
  flex-shrink: 0;
  display: block;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--border) 70%, transparent);
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.brand h1 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 650;
  letter-spacing: 0.01em;
  color: var(--text);
  line-height: 1.15;
  white-space: nowrap;
}

.brand .sub {
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.01em;
  line-height: 1.2;
  white-space: nowrap;
}

.side-nav {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-soft);
  border-radius: 3px;
  padding: 0.55rem 0.7rem;
  text-align: left;
  transition: background 120ms ease, color 120ms ease, border-color 120ms ease;
}

.nav-item:hover {
  background: var(--bg-hover);
  color: var(--text);
}

.nav-item.active {
  background: var(--accent-soft);
  border-color: color-mix(in srgb, var(--accent) 28%, transparent);
  color: var(--accent);
  font-weight: 600;
}

.nav-item .nav-dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--muted-2);
  flex-shrink: 0;
}

.nav-item.active .nav-dot {
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

/* Health pill in sidebar */
.health-pill {
  margin: 0.35rem 0.15rem 0;
  padding: 0.55rem 0.7rem;
  border-radius: 3px;
  border: 1px solid var(--ok-border);
  background: var(--ok-bg);
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.health-pill.health-healthy {
  border-color: var(--ok-border);
  background: var(--ok-bg);
  color: var(--accent);
}

.health-pill.health-degraded,
.health-pill.health-stale {
  border-color: rgba(251, 191, 36, 0.3);
  background: var(--warn-bg);
  color: var(--warn-text);
}

.health-pill.health-checking {
  border-color: var(--border);
  background: var(--bg-elev);
  color: var(--muted);
}

.health-pill.health-auth-required,
.health-pill.health-unavailable,
.health-pill.health-invalid-response {
  border-color: var(--danger-border);
  background: var(--danger-bg);
  color: var(--danger-text);
}

.health-pill-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.health-pill-detail {
  font-size: 0.72rem;
  color: var(--text-soft);
  opacity: 0.9;
  line-height: 1.3;
}

/* Directory */
.directory {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 0.35rem 0.25rem 0.75rem;
  margin-top: 0.25rem;
}

.directory-label {
  font-size: 0.68rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0 0.45rem;
}

.directory-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.directory-item {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.28rem 0.45rem;
  border-radius: 3px;
  font-size: 0.8rem;
  color: var(--text-soft);
}

.directory-item .presence-dot {
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--muted-2);
}

.directory-item.online .presence-dot {
  background: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-glow);
}

.directory-item.offline {
  color: var(--muted);
}

.directory-item .presence-state {
  margin-left: auto;
  font-size: 0.68rem;
  color: var(--muted-2);
}

.directory-meta {
  font-size: 0.65rem;
  color: var(--muted-2);
  padding: 0.25rem 0.45rem;
  font-family: var(--mono);
  line-height: 1.35;
}

.sidebar-footer {
  border-top: 1px solid var(--border);
  padding-top: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.sidebar-footer .token-row {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.sidebar-footer label {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.68rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.sidebar-footer input {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.5rem;
  font-size: 0.8rem;
  text-transform: none;
  letter-spacing: normal;
  color: var(--text);
}

.sidebar-footer .token-actions {
  display: flex;
  gap: 0.35rem;
}

.sidebar-footer .trust {
  margin: 0;
  font-size: 0.68rem;
  color: var(--muted-2);
  text-transform: none;
  letter-spacing: normal;
  line-height: 1.35;
}

/* ─── Main column ─────────────────────────────────────────── */

.shell-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.main-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem 1rem;
  padding: 0.95rem 1.35rem;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 12;
  min-height: var(--header-h);
}

.page-title h2 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 650;
  letter-spacing: 0.01em;
}

.page-title .page-sub {
  margin: 0.12rem 0 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.header-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

/* ─── Form controls (UniRGB / shadcn-style) ──────────────────
 * Ports the UniRGB HUD field look: elevated card surface, hairline
 * border, appearance-none selects with SVG chevron, focus ring via
 * border+box-shadow (not the default OS outline). Radius stays ≤3px.
 */

input,
select,
textarea {
  font: inherit;
  color: inherit;
}

/* Text inputs, search, password, number */
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]),
textarea,
select {
  display: inline-flex;
  width: auto;
  min-width: 7.5rem;
  max-width: 100%;
  height: 2.25rem; /* h-9 */
  box-sizing: border-box;
  background-color: var(--input);
  color: var(--text);
  border: 1px solid var(--input-border);
  border-radius: 3px;
  padding: 0.375rem 0.75rem;
  font-size: 0.8125rem; /* 13px — UniRGB field size */
  line-height: 1.25rem;
  outline: none;
  transition:
    border-color 120ms ease,
    background-color 120ms ease,
    box-shadow 120ms ease,
    color 120ms ease;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
}

textarea {
  height: auto;
  min-height: 5rem;
  padding: 0.5rem 0.75rem;
  resize: vertical;
  line-height: 1.45;
}

input:not([type="checkbox"]):not([type="radio"]):hover:not(:disabled),
textarea:hover:not(:disabled),
select:hover:not(:disabled) {
  background-color: var(--input-hover);
  border-color: var(--border-strong);
}

input:not([type="checkbox"]):not([type="radio"]):focus,
input:not([type="checkbox"]):not([type="radio"]):focus-visible,
textarea:focus,
textarea:focus-visible,
select:focus,
select:focus-visible {
  border-color: var(--accent-dim);
  background-color: var(--input);
  box-shadow:
    0 0 0 1px var(--accent-dim),
    0 0 0 3px var(--ring);
  outline: none;
}

input::placeholder,
textarea::placeholder {
  color: var(--muted-2);
  opacity: 1;
}

input:disabled,
textarea:disabled,
select:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  background-color: var(--bg-input);
}

/* Selects: drop native chrome (WebKit paints white otherwise) + chevron */
select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  cursor: pointer;
  padding-right: 2rem;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236e827a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='M6 9l6 6 6-6'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.55rem center;
  background-size: 0.85rem;
  background-color: var(--input);
}

select:hover:not(:disabled) {
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d0ddd8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='M6 9l6 6 6-6'/%3e%3c/svg%3e");
}

select:focus,
select:focus-visible {
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d8faf3' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='M6 9l6 6 6-6'/%3e%3c/svg%3e");
}

select option {
  background: var(--bg-elev);
  color: var(--text);
}

/* Full-width fields inside stacked labels / panels */
.write-panel label > input,
.write-panel label > select,
.write-panel label > textarea,
.token-row label > input,
.drawer-body label > input,
.drawer-body label > select,
.drawer-body label > textarea,
.search-bar .search-query input,
.sidebar-footer label > input {
  width: 100%;
  min-width: 0;
}


/* Checkboxes — compact, dark-friendly (must beat text-field min-width) */
input[type="checkbox"],
.view-toolbar input[type="checkbox"],
.search-bar input[type="checkbox"],
label.trust input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  display: inline-block;
  width: 0.95rem;
  min-width: 0.95rem;
  max-width: 0.95rem;
  height: 0.95rem;
  min-height: 0.95rem;
  margin: 0;
  padding: 0;
  flex: 0 0 0.95rem;
  flex-shrink: 0;
  border: 1px solid var(--input-border);
  border-radius: 3px;
  background-color: var(--input);
  background-image: none;
  box-shadow: none;
  cursor: pointer;
  vertical-align: middle;
  transition: border-color 120ms ease, background 120ms ease, box-shadow 120ms ease;
}

/* Inline checkbox rows (History / Include history) */
label.trust {
  flex-direction: row !important;
  align-items: center;
  gap: 0.45rem !important;
  text-transform: none;
  letter-spacing: normal;
  font-weight: 500;
  font-size: 0.8rem;
  color: var(--muted);
  min-height: 2.25rem;
}

input[type="checkbox"]:hover {
  border-color: var(--border-strong);
}

input[type="checkbox"]:checked {
  background-color: var(--cta);
  border-color: var(--cta);
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230a1412' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='M5 12l5 5L20 7'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 0.7rem;
}

input[type="checkbox"]:focus-visible,
.view-toolbar input[type="checkbox"]:focus-visible,
.search-bar input[type="checkbox"]:focus-visible,
label.trust input[type="checkbox"]:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--focus);
}

/* Header search uses fixed width, not full-bleed */
.quick-jump {
  width: 12rem;
  min-width: 10rem;
  max-width: 100%;
}

/* View toolbar (filters under header) */
.view-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 0.75rem;
  align-items: end;
  padding: 0.75rem 1.35rem 0.35rem;
}

.view-toolbar label,
.ops-controls label,
.search-bar label,
.filters label {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  font-size: 0.68rem;
  font-weight: 650;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  min-width: 0;
}

.view-toolbar label > input:not([type="checkbox"]):not([type="radio"]),
.view-toolbar label > select,
.ops-controls label > input:not([type="checkbox"]):not([type="radio"]),
.ops-controls label > select,
.search-bar label > input:not([type="checkbox"]):not([type="radio"]),
.search-bar label > select,
.filters label > input:not([type="checkbox"]):not([type="radio"]),
.filters label > select {
  min-width: 7.5rem;
}

/* Interactive non-field chrome still gets a focus ring */
.card:focus-visible,
.icon-btn:focus-visible,
.drawer-close:focus-visible,
.nav-item:focus-visible,
.btn:focus-visible,
.link-btn:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.link-btn {
  border: none;
  background: transparent;
  color: var(--accent);
  padding: 0.35rem 0.25rem;
  font-size: 0.82rem;
  align-self: end;
}

.link-btn:hover {
  text-decoration: underline;
}

.actor-line {
  margin: 0;
  padding: 0 1.35rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.actor-line .mono {
  color: var(--accent);
}

/* ─── Buttons ─────────────────────────────────────────────── */

.btn {
  border: 1px solid var(--border-strong);
  background: var(--bg-elev);
  border-radius: var(--radius-pill);
  padding: 0.45rem 0.9rem;
  color: var(--text-soft);
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease, box-shadow 120ms ease, filter 120ms ease;
}

.btn:hover:not(:disabled) {
  background: var(--bg-hover);
  color: var(--text);
  border-color: var(--border-strong);
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--cta);
  border-color: transparent;
  color: var(--cta-text);
  font-weight: 650;
}

/* Primary hover: light version of the theme accent/brand. */
.btn-primary:hover:not(:disabled) {
  background: var(--cta-hover);
  color: color-mix(in srgb, var(--cta-text) 88%, black 12%);
  border-color: transparent;
  filter: none;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--brand) 35%, transparent);
}

.btn-primary:active:not(:disabled) {
  filter: brightness(0.97);
}

/* Secondary hover also tips toward a soft accent wash */
.btn:not(.btn-primary):not(.btn-danger):hover:not(:disabled) {
  background: color-mix(in srgb, var(--brand) 12%, var(--bg-hover));
  color: var(--text);
  border-color: color-mix(in srgb, var(--brand) 28%, var(--border-strong));
}

.btn-danger {
  background: var(--danger-solid);
  color: var(--danger-solid-text);
  border-color: var(--danger-solid-border);
}

.btn-danger:disabled {
  opacity: 0.6;
}

/* ─── Banners / states ────────────────────────────────────── */

.banner {
  margin: 0.65rem 1.35rem 0;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-elev);
}

.banner-error {
  border-color: var(--danger-border);
  background: var(--danger-bg);
  color: var(--danger-text);
}

.banner-info {
  color: var(--muted);
}

.center-state {
  display: grid;
  place-items: center;
  min-height: 40vh;
  color: var(--muted);
  gap: 0.5rem;
  text-align: center;
  padding: 2rem 1rem;
}

.spinner {
  width: 1.4rem;
  height: 1.4rem;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ─── Main content ────────────────────────────────────────── */

.main {
  flex: 1;
  padding: 0.75rem 1.15rem 2rem;
  min-width: 0;
}

/* ─── Board ───────────────────────────────────────────────── */

.board {
  display: grid;
  grid-template-columns: repeat(8, minmax(200px, 1fr));
  gap: 0.75rem;
  align-items: start;
  overflow-x: auto;
  padding-bottom: 0.5rem;
}

@media (max-width: 1400px) {
  .board {
    grid-template-columns: repeat(3, minmax(220px, 1fr));
  }
}

@media (max-width: 900px) {
  .board {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
  }
}

@media (max-width: 560px) {
  .board {
    grid-template-columns: 1fr;
  }
}

.column {
  background: transparent;
  border: none;
  border-radius: var(--radius);
  min-height: 10rem;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.column-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.4rem 0.35rem 0.5rem;
  /* Stay in normal flow — sticky status heads were clipping card titles. */
  position: relative;
  background: transparent;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.45rem;
  z-index: 1;
}

.column-title {
  display: flex;
  gap: 0.45rem;
  align-items: center;
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text-soft);
}

.dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--muted);
  flex-shrink: 0;
}

.dot-todo {
  background: var(--todo);
}
.dot-in_progress {
  background: var(--in-progress);
}
.dot-blocked {
  background: var(--blocked);
}
.dot-review {
  background: var(--review);
}
.dot-peer_review {
  background: var(--peer-review);
}
.dot-deploying {
  background: var(--deploying);
}
.dot-done {
  background: var(--done);
}
.dot-unknown {
  background: var(--muted);
}

/* Ready for peer review: the handoff column gets an accent rule. */
.column-peer_review .column-head {
  border-bottom-color: var(--peer-review);
}
/* Deploying: merged and waiting for a deploy run. */
.column-deploying .column-head {
  border-bottom-color: var(--deploying);
}
.dot-wontfix {
  background: var(--wontfix);
}

.count {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  font-size: 0.78rem;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  min-width: 1.4rem;
  text-align: center;
  padding: 0.05rem 0.4rem;
}

.cards {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 0.35rem 0.1rem 0.5rem;
}

/* ─── Cards ───────────────────────────────────────────────── */

.card {
  text-align: left;
  width: 100%;
  border: 1px solid var(--border);
  background: var(--bg-card);
  border-radius: 3px;
  padding: 0.7rem 0.75rem 0.65rem;
  transition: border-color 120ms ease, background 120ms ease, box-shadow 120ms ease;
  box-shadow: var(--shadow);
}

.card:hover {
  border-color: color-mix(in srgb, var(--accent) 30%, var(--border));
  background: var(--bg-hover);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 18%, transparent);
}

.card-id {
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.01em;
}

.card-title {
  margin: 0.28rem 0 0.5rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text);
  font-size: 0.9rem;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  color: var(--muted);
  font-size: 0.72rem;
  align-items: center;
}

.chip {
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 0.08rem 0.42rem;
  background: color-mix(in srgb, var(--bg) 55%, transparent);
  color: var(--text-soft);
  font-size: 0.7rem;
  line-height: 1.35;
}

.chip-assignee {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 25%, transparent);
  background: var(--accent-soft);
  font-family: var(--mono);
  font-size: 0.68rem;
}

.chip-priority {
  font-weight: 650;
  text-transform: lowercase;
}

.chip-p0 {
  color: var(--p0);
  border-color: rgba(251, 146, 60, 0.35);
  background: rgba(251, 146, 60, 0.1);
}

.chip-p1 {
  color: var(--p1);
  border-color: rgba(56, 189, 248, 0.3);
  background: rgba(56, 189, 248, 0.08);
}

.chip-p2,
.chip-p3 {
  color: var(--p2);
}

.chip-status {
  text-transform: lowercase;
}

.chip-status-todo {
  color: var(--todo);
  border-color: rgba(56, 189, 248, 0.3);
}
.chip-status-in_progress {
  color: var(--in-progress);
  border-color: rgba(251, 191, 36, 0.3);
}
.chip-status-blocked {
  color: var(--blocked);
  border-color: rgba(248, 113, 113, 0.3);
}
.chip-status-review {
  color: var(--review);
  border-color: rgba(192, 132, 252, 0.3);
}
.chip-status-peer_review {
  color: var(--peer-review);
  border-color: rgba(45, 212, 191, 0.3);
}
.chip-status-deploying {
  color: var(--deploying);
  border-color: rgba(251, 191, 36, 0.3);
}
.chip-status-done {
  color: var(--done);
  border-color: rgba(74, 222, 128, 0.3);
}

/* PR reference on a peer-review card; long refs truncate on narrow cards. */
.chip-pr {
  color: var(--peer-review);
  border-color: rgba(45, 212, 191, 0.3);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* Work-queue lease: countdown, amber when nearly up, red once expired. */
.chip-lease {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 25%, transparent);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.chip-lease-soon {
  color: var(--warn-text);
  border-color: var(--warn-border);
}
.chip-lease-expired {
  color: var(--danger-text);
  border-color: var(--danger-border);
}

/* Peer reviewer on a peer-review card; truncates like PR refs. */
.chip-reviewer {
  color: var(--peer-review);
  border-color: rgba(45, 212, 191, 0.3);
  font-family: var(--mono);
  font-size: 0.68rem;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chip-status-wontfix {
  color: var(--wontfix);
}

.chip-label {
  color: var(--muted);
  border-style: dashed;
}

/* Stale and SLA flags (computed by the server on each board read). */
.chip-flag {
  white-space: nowrap;
}
.chip-flag-warn {
  color: var(--warn-text);
  border-color: var(--warn-border);
}
.chip-flag-danger {
  color: var(--danger-text);
  border-color: var(--danger-border);
}

.empty-col {
  color: var(--muted-2);
  font-size: 0.8rem;
  padding: 0.5rem 0.35rem;
}

/* ─── Mine ────────────────────────────────────────────────── */

.mine-list {
  max-width: 48rem;
  margin: 0;
  padding: 0.35rem 0.2rem 2rem;
}

.mine-cards {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.mine-cards .card {
  width: 100%;
}

.mine-list .column-head {
  display: none; /* design: no column header; page title covers it */
}

/* ─── Ops ─────────────────────────────────────────────────── */

.ops-panel {
  max-width: 56rem;
  margin: 0;
  padding: 0.35rem 0.15rem 2rem;
}

.ops-panel > .ops-head {
  display: none; /* page header already shows title */
}

.ops-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: end;
  margin: 0 0 0.85rem;
}

.ops-controls label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 11rem;
  font-size: 0.68rem;
  font-weight: 650;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.ops-status {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.75rem;
  align-items: center;
  padding: 0.65rem 0.9rem;
  border-radius: 3px;
  margin-bottom: 0.9rem;
  border: 1px solid var(--ok-border);
  background: var(--ok-bg);
}

.ops-healthy {
  background: var(--ok-bg);
  border-color: var(--ok-border);
  color: var(--accent);
}

.ops-degraded,
.ops-stale {
  background: var(--warn-bg);
  border-color: rgba(251, 191, 36, 0.28);
  color: var(--warn-text);
}

.ops-checking {
  background: var(--bg-elev);
  border-color: var(--border);
  color: var(--muted);
}

.ops-auth-required,
.ops-unavailable,
.ops-invalid-response {
  background: var(--danger-bg);
  border-color: var(--danger-border);
  color: var(--danger-text);
}

.ops-status .health-label {
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-size: 0.72rem;
}

.ops-status .health-detail {
  color: var(--text-soft);
  font-size: 0.85rem;
}

.ops-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
}

@media (max-width: 720px) {
  .ops-grid {
    grid-template-columns: 1fr;
  }
}

.ops-card {
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 0.85rem 1rem;
  background: var(--bg-card);
}

.ops-card h3 {
  margin: 0 0 0.65rem;
  font-size: 0.88rem;
  font-weight: 650;
  color: var(--text-soft);
}

.ops-metric {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin: 0.28rem 0;
  font-size: 0.88rem;
}

.ops-metric .metric-label {
  color: var(--muted);
}

.ops-metric .metric-value {
  font-variant-numeric: tabular-nums;
  font-weight: 650;
  color: var(--text);
}

.sev-warn {
  color: var(--danger-text) !important;
  font-weight: 650;
}

.sev-info {
  color: var(--muted);
}

/* ─── Search ──────────────────────────────────────────────── */

.search-panel {
  max-width: 56rem;
  margin: 0;
  padding: 0.35rem 0.15rem 2rem;
}

.search-panel > .ops-head {
  display: none;
}

.search-controls {
  align-items: end;
}

.search-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: end;
  margin-bottom: 0.75rem;
}

.search-bar label {
  display: flex;
  flex-direction: column;
  gap: 0.22rem;
  font-size: 0.68rem;
  font-weight: 650;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.search-bar .search-query {
  flex: 1 1 14rem;
  min-width: 14rem;
}

.search-bar label:not(.search-query) {
  flex: 0 0 auto;
}

.search-bar label:not(.search-query) > select {
  min-width: 8.5rem;
  width: auto;
}

.search-bar .search-query input {
  width: 100%;
  min-width: 0;
}

.search-results {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-top: 0.75rem;
}

.search-card {
  width: 100%;
  text-align: left;
}

.memory-card {
  cursor: default;
}

.snippet {
  margin: 0.4rem 0;
  color: var(--text-soft);
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 0.88rem;
}

.data-banner {
  margin: 0.75rem 0;
  padding: 0.55rem 0.75rem;
  border-radius: 3px;
  background: var(--warn-bg);
  border: 1px solid var(--warn-border);
  color: var(--warn-text);
  font-weight: 600;
  font-size: 0.82rem;
}

.search-ready {
  color: var(--muted);
  font-size: 0.88rem;
  padding: 0.35rem 0.15rem;
}

/* Legacy health-strip (kept for any residual use) */
.health-strip {
  display: none;
}

.health-label {
  font-weight: 650;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  font-size: 0.75rem;
}

.health-detail {
  color: var(--text-soft);
}

/* ─── Drawer / modal ──────────────────────────────────────── */

.drawer-backdrop {
  position: fixed;
  inset: 0;
  /*
   * Solid scrim first: WebKitGTK (wry desktop) often drops color-mix and
   * backdrop-filter, which made the overlay fully invisible.
   * Engines with real backdrop-filter get a lighter wash via @supports.
   */
  background: rgba(6, 8, 7, 0.55);
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(0.75rem, 3vw, 1.75rem);
  box-sizing: border-box;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  /* Contain wheel/touch overscroll so it never chains to the board. */
  overscroll-behavior: contain;
}

/* Chrome/Firefox: soft wash + light blur (matches redesign intent). */
@supports (background: color-mix(in srgb, black 50%, transparent)) and
  ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .drawer-backdrop {
    background: color-mix(in srgb, black 28%, transparent);
  }
}

/*
 * Desktop (WebKitGTK/wry): backdrop-filter is usually a no-op. Blur board chrome
 * via content filter when .app.is-modal-open is set from RSX.
 */
html.waypoint-desktop .drawer-backdrop {
  background: rgba(6, 8, 7, 0.55);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

html.waypoint-desktop .app.is-modal-open > .sidebar,
html.waypoint-desktop .app.is-modal-open > .shell-main {
  filter: blur(6px);
  will-change: filter;
  transition: filter 140ms ease-out;
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .app.is-modal-open > .sidebar,
  .app.is-modal-open > .shell-main {
    filter: blur(6px);
    transition: filter 140ms ease-out;
  }
}

@media (prefers-reduced-motion: reduce) {
  html.waypoint-desktop .app.is-modal-open > .sidebar,
  html.waypoint-desktop .app.is-modal-open > .shell-main,
  .app.is-modal-open > .sidebar,
  .app.is-modal-open > .shell-main {
    transition: none;
  }
}

.drawer {
  width: var(--drawer-w);
  height: 100%;
  max-height: 100%;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  min-height: 0;
  animation: modal-in 160ms ease-out;
}

/*
 * Ticket detail — Modal1c layout/structure; colors follow active theme tokens
 * (data-theme / data-scheme), not a hard-coded design palette.
 */
.drawer.ticket-modal {
  /* Modal1c base 1120×800, scaled +20% on both axes. */
  width: min(1344px, 100%);
  max-width: 100%;
  height: min(960px, calc(100vh - 48px));
  max-height: min(960px, calc(100vh - 48px));
  border-radius: 10px;
  background: var(--bg-elev);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow);
  font-family: var(--mono);
  overflow: hidden;
  color: var(--text);
}

@keyframes modal-in {
  from {
    transform: translateY(8px) scale(0.98);
    opacity: 0.45;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

.ticket-modal .drawer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 26px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  background: transparent;
}

.ticket-modal .tm-head-text {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.ticket-modal .tm-head-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex-wrap: wrap;
}

.ticket-modal .tm-id-badge {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--muted);
  border: 1px solid var(--border);
  padding: 3px 7px;
  border-radius: 4px;
  flex-shrink: 0;
}

.ticket-modal .tm-title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}

.ticket-modal .tm-head-meta {
  font-size: 11.5px;
  color: var(--muted);
}

.ticket-modal .drawer-close {
  border: none;
  background: none;
  border-radius: 0;
  width: auto;
  height: auto;
  color: var(--muted);
  font-size: 20px;
  line-height: 1;
  padding: 4px;
  cursor: pointer;
  font-family: inherit;
  flex-shrink: 0;
}

.ticket-modal .drawer-close:hover {
  color: var(--accent);
}

/* Body becomes the split container (no padding — main/rail own chrome). */
.ticket-modal .drawer-body {
  overflow: hidden;
  padding: 0;
  display: flex;
  flex-direction: row;
  gap: 0;
  min-height: 0;
  flex: 1 1 auto;
}

.ticket-modal .tm-main {
  flex: 1;
  min-width: 0;
  min-height: 0;
  padding: 18px 26px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  /* Prefer flex children (comments) filling height; scroll whole column only if needed. */
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: var(--border-strong) transparent;
  scrollbar-width: thin;
}

.ticket-modal .tm-rail {
  width: 220px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px;
  background: var(--bg-sidebar);
  border-left: 1px solid var(--border);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: var(--border-strong) transparent;
  scrollbar-width: thin;
}

/* Create-ticket dialog body also contains its own scroll. */
.drawer.create-modal {
  overscroll-behavior: contain;
}

.drawer.create-modal .drawer-body {
  overscroll-behavior: contain;
}

.ticket-modal .tm-sec-label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin: 0 0 10px;
  text-transform: uppercase;
}

.ticket-modal .tm-props-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px 18px;
}

.ticket-modal .tm-prop-k {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.07em;
  color: var(--muted);
  margin-bottom: 5px;
  text-transform: uppercase;
}

.ticket-modal .tm-prop-v {
  font-size: 12.5px;
  color: var(--text-soft);
}

.ticket-modal .tm-prop-v.dim {
  font-size: 11px;
  color: var(--muted-2);
}

.ticket-modal .tm-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  padding: 14px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.ticket-modal .tm-meta-col {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
}

.ticket-modal .tm-meta-col.narrow {
  max-width: 300px;
}

.ticket-modal .tm-chip {
  display: inline-flex;
  padding: 3px 9px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 10.5px;
  color: var(--accent);
  background: var(--accent-soft);
}

/* Stage runs: one row per run, newest first, status chip by outcome. */
.ticket-modal .tm-run-row {
  margin: 6px 0;
}

.ticket-modal .tm-run-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.ticket-modal .tm-run-summary {
  margin: 2px 0 0;
  font-size: 12px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.ticket-modal .run-open {
  color: var(--todo);
  border-color: var(--todo);
  background: transparent;
}

.ticket-modal .run-succeeded,
.ticket-modal .run-advanced,
.ticket-modal .run-closed {
  color: var(--done);
  border-color: var(--done);
  background: transparent;
}

.ticket-modal .run-failed {
  color: var(--blocked);
  border-color: var(--blocked);
  background: var(--danger-bg);
}

.ticket-modal .run-cancelled {
  color: var(--muted);
  background: transparent;
}

.ticket-modal .tm-delivery-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0;
}

/* Delivery state chips: queued (neutral), delivered, acked, failed. */
.ticket-modal .delivery-queued {
  color: var(--muted);
  background: transparent;
}

.ticket-modal .delivery-delivered {
  color: var(--todo);
  border-color: var(--todo);
  background: transparent;
}

.ticket-modal .delivery-acked {
  color: var(--done);
  border-color: var(--done);
  background: transparent;
}

.ticket-modal .delivery-failed {
  color: var(--blocked);
  border-color: var(--blocked);
  background: var(--danger-bg);
}

.ticket-modal .tm-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ticket-modal .tm-linkish {
  color: var(--accent);
  font-weight: 600;
}

.ticket-modal .tm-trust {
  font-size: 10px;
  font-style: italic;
  color: var(--muted);
}

/* Comments: grow into remaining main-column height; thread scrolls; compose pinned. */
.ticket-modal .tm-comments {
  flex: 1 1 auto;
  min-height: 20rem;
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
}

.ticket-modal .tm-comments > .tm-sec-label {
  flex-shrink: 0;
}

.ticket-modal .tm-comments-thread {
  flex: 1 1 auto;
  min-height: 9rem;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 4px;
  margin-bottom: 6px;
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) transparent;
}

.ticket-modal .tm-comments-empty {
  padding: 2rem 0.25rem;
  margin: 0;
}

.ticket-modal .tm-comment {
  display: flex;
  gap: 12px;
  padding: 12px 4px 12px 0;
  border-bottom: 1px solid var(--border);
}

.ticket-modal .tm-comment:last-child {
  border-bottom: none;
}

.ticket-modal .tm-avatar {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
  color: var(--accent);
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  text-transform: uppercase;
  margin-top: 1px;
}

.ticket-modal .tm-comment-body {
  flex: 1 1 auto;
  min-width: 0;
}

.ticket-modal .tm-comment-meta {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 5px;
  width: 100%;
}

.ticket-modal .tm-comment-meta strong {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-soft);
}

.ticket-modal .tm-comment-meta time {
  font-size: 10.5px;
  color: var(--muted-2);
  margin-left: auto;
  flex-shrink: 0;
  font-family: var(--mono);
}

.ticket-modal .tm-comment-text {
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--text-soft);
  max-width: none;
  width: 100%;
  text-wrap: pretty;
  overflow-wrap: anywhere;
}

.ticket-modal .tm-compose {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
  padding-top: 12px;
  margin-top: 4px;
  border-top: 1px solid var(--border);
}

.ticket-modal .tm-comments .tm-compose textarea {
  min-height: 6.5rem;
  resize: vertical;
  width: 100%;
  box-sizing: border-box;
}

.ticket-modal .tm-compose textarea,
.ticket-modal .tm-rail input,
.ticket-modal .tm-rail select,
.ticket-modal .tm-rail textarea {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--input-border);
  color: var(--text);
  font-family: inherit;
  font-size: 12px;
  padding: 10px 12px;
  border-radius: 6px;
  box-sizing: border-box;
}

.ticket-modal .tm-compose textarea:hover,
.ticket-modal .tm-rail input:hover,
.ticket-modal .tm-rail select:hover,
.ticket-modal .tm-rail textarea:hover {
  border-color: color-mix(in srgb, var(--input-border) 70%, var(--accent));
  background: color-mix(in srgb, var(--bg-input) 85%, var(--input-hover));
}

.ticket-modal .tm-compose textarea:focus,
.ticket-modal .tm-rail input:focus,
.ticket-modal .tm-rail select:focus,
.ticket-modal .tm-rail textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--ring);
  outline: none;
}

.ticket-modal .tm-btn-ghost {
  align-self: flex-start;
  background: none;
  border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--border));
  color: var(--accent);
  font-weight: 600;
  font-size: 11.5px;
  padding: 6px 14px;
  border-radius: 5px;
  cursor: pointer;
  font-family: inherit;
}

.ticket-modal .tm-btn-ghost:hover:not(:disabled) {
  background: var(--accent-soft);
}

.ticket-modal .tm-btn-ghost:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.ticket-modal .tm-btn-primary {
  background: var(--cta);
  color: var(--cta-text);
  border: none;
  font-weight: 700;
  font-size: 11px;
  padding: 6px 12px;
  border-radius: 5px;
  cursor: pointer;
  font-family: inherit;
}

.ticket-modal .tm-btn-primary:hover:not(:disabled) {
  background: var(--cta-hover);
}

.ticket-modal .tm-btn-primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.ticket-modal .tm-btn-danger {
  background: none;
  border: 1px solid color-mix(in srgb, var(--blocked) 55%, var(--border));
  color: var(--blocked);
  font-weight: 600;
  font-size: 11.5px;
  padding: 7px 14px;
  border-radius: 5px;
  cursor: pointer;
  font-family: inherit;
}

.ticket-modal .tm-btn-danger:hover:not(:disabled) {
  background: var(--danger-bg);
}

.ticket-modal .tm-btn-danger:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.ticket-modal .tm-closed-banner {
  font-size: 13px;
  color: var(--done);
  font-weight: 600;
}

.ticket-modal .tm-audit-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  cursor: pointer;
  font-family: inherit;
  padding: 9px 12px;
  box-sizing: border-box;
  text-transform: uppercase;
}

.ticket-modal .tm-audit-toggle:hover {
  background: var(--bg-hover);
  border-color: var(--border-strong);
}

.ticket-modal .tm-audit-toggle .chev {
  color: var(--accent);
  font-size: 11px;
}

.ticket-modal .tm-audit-toggle .hint {
  margin-left: auto;
  font-weight: 400;
  letter-spacing: 0;
  font-size: 10px;
  color: var(--muted-2);
  text-transform: none;
}

.ticket-modal .tm-audit-toggle::-webkit-details-marker {
  display: none;
}

.ticket-modal details.tm-audit[open] .tm-audit-toggle .chev {
  display: inline-block;
  transform: rotate(90deg);
}

.ticket-modal .tm-audit-list {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.ticket-modal .tm-audit-delta,
.ticket-modal .tm-audit-detail {
  font-size: 10px;
  color: var(--muted-2);
}

.ticket-modal .tm-close-details {
  border: none;
}

.ticket-modal .tm-btn-close-summary {
  display: inline-flex;
  align-items: center;
  list-style: none;
  cursor: pointer;
  background: none;
  border: 1px solid var(--border-strong);
  color: var(--text-soft);
  font-weight: 600;
  font-size: 0.72rem;
  padding: 0.45rem 0.9rem;
  border-radius: 5px;
  font-family: inherit;
}

.ticket-modal .tm-btn-close-summary::-webkit-details-marker {
  display: none;
}

.ticket-modal .tm-close-form {
  margin-top: 0.75rem;
  max-width: 28rem;
}

.ticket-modal .tm-readonly {
  font-size: 0.75rem;
  color: var(--text-soft);
  padding: 0.45rem 0.55rem;
  border: 1px dashed var(--border);
  border-radius: 5px;
  background: transparent;
  font-family: var(--mono);
}

.ticket-modal .tm-field-hint {
  font-size: 0.62rem;
  color: var(--muted-2);
  margin: 0.2rem 0 0;
  line-height: 1.35;
}

/* Wrapper for Save; a plain stacked block outside phone layouts. */
.ticket-modal .tm-save-bar {
  display: flex;
  flex-direction: column;
}

.ticket-modal .tm-btn-primary.tm-btn-idle:disabled {
  opacity: 0.35;
}

.ticket-modal .tm-audit-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
  font-size: 11.5px;
}

.ticket-modal .tm-audit-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

.ticket-modal .tm-audit-when {
  font-size: 10.5px;
  color: var(--muted-2);
  width: 96px;
  flex-shrink: 0;
}

.ticket-modal .tm-audit-op {
  color: var(--text-soft);
  flex-shrink: 0;
}

.ticket-modal .tm-audit-by {
  font-size: 10.5px;
  color: var(--muted);
}

.ticket-modal .tm-rail-badges {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

/*
 * Rail status/priority pills — fixed box + optical nudge.
 * Uppercase system fonts sit high in the em-box (no descenders), so equal
 * padding still looks bottom-heavy. Lock height; nudge the glyph slightly down.
 */
.ticket-modal .tm-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 1.375rem; /* 22px — fixed, not content-driven */
  min-width: 2.25rem;
  padding: 0 0.7em;
  box-sizing: border-box;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 0.625rem; /* 10px */
  font-weight: 650;
  letter-spacing: 0.06em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
  /* Kill inherited line-height / font padding from parents */
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

/* Optical vertical center for caps (shift glyph down slightly in the box). */
.ticket-modal .tm-pill-label {
  display: block;
  line-height: 1;
  transform: translateY(0.08em);
}

.ticket-modal .tm-pill-status {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 40%, transparent);
}

/* Priority tint follows p0–p3 tokens (was hard-coded to p0 orange). */
.ticket-modal .tm-pill-priority {
  background: color-mix(in srgb, var(--p1) 14%, transparent);
  color: var(--p1);
  border-color: color-mix(in srgb, var(--p1) 35%, transparent);
}

.ticket-modal .tm-pill-priority[data-p="p0"] {
  background: color-mix(in srgb, var(--p0) 16%, transparent);
  color: var(--p0);
  border-color: color-mix(in srgb, var(--p0) 40%, transparent);
}

.ticket-modal .tm-pill-priority[data-p="p1"] {
  background: color-mix(in srgb, var(--p1) 14%, transparent);
  color: var(--p1);
  border-color: color-mix(in srgb, var(--p1) 35%, transparent);
}

.ticket-modal .tm-pill-priority[data-p="p2"],
.ticket-modal .tm-pill-priority[data-p="p3"] {
  background: color-mix(in srgb, var(--p2) 14%, transparent);
  color: var(--p2);
  border-color: color-mix(in srgb, var(--p2) 30%, transparent);
}

.ticket-modal .tm-field-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.07em;
  color: var(--muted);
  margin-bottom: 5px;
  text-transform: uppercase;
}

.ticket-modal .tm-field {
  display: flex;
  flex-direction: column;
}

.ticket-modal .tm-rail-foot {
  font-size: 9px;
  color: var(--muted-2);
}

.ticket-modal .tm-jump {
  border-top: 1px solid var(--border);
  padding-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.ticket-modal .tm-jump a {
  font-size: 11.5px;
  color: var(--muted);
  text-decoration: none;
  padding-left: 10px;
  border-left: 2px solid var(--border);
  line-height: 1.7;
}

.ticket-modal .tm-jump a:hover {
  color: var(--accent);
  border-left-color: var(--accent);
}

.ticket-modal .tm-empty {
  font-size: 12px;
  color: var(--muted-2);
}

.ticket-modal .banner {
  border-radius: 5px;
}

.ticket-modal #c-properties,
.ticket-modal #c-comments,
.ticket-modal #c-audit,
.ticket-modal #c-close {
  scroll-margin-top: 12px;
}

/* Keep audit/close after the growing comments region; don't steal flex space. */
.ticket-modal #c-audit,
.ticket-modal #c-close {
  flex: 0 0 auto;
}

@media (max-width: 860px) {
  .drawer.ticket-modal {
    width: min(100vw - 1rem, 100%);
    height: min(94vh, 100%);
    max-height: min(94vh, 100%);
  }

  .ticket-modal .drawer-body {
    flex-direction: column;
  }

  .ticket-modal .tm-rail {
    width: 100%;
    border-left: none;
    border-top: 1px solid var(--border);
  }

  .ticket-modal .tm-props-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.section h3 {
  margin: 0 0 0.45rem;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.kv {
  display: grid;
  grid-template-columns: 7rem 1fr;
  gap: 0.35rem 0.6rem;
  font-size: 0.9rem;
}

.kv dt {
  color: var(--muted);
}

.kv dd {
  margin: 0;
  word-break: break-word;
}

.mono {
  font-family: var(--mono);
  font-size: 0.82rem;
}

.list {
  margin: 0;
  padding-left: 1.1rem;
}

.list li {
  margin: 0.25rem 0;
}

.plain-list {
  margin: 0;
  padding-left: 0;
  list-style: none;
}

.plain-list li {
  margin: 0.35rem 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.create-modal {
  max-width: 28rem;
  width: min(28rem, 100%);
  height: auto;
  max-height: min(92vh, 100%);
  border-radius: var(--radius);
}

/* ─── Create ticket redesign (WP-69 / docs/redesign/new-ticket) ───
 * Specificity must beat UniRGB global form rules:
 *   input:not([type=checkbox])…  (type + multiple :not)
 * so every control is scoped under .create-modal-v2.
 */

.create-modal.create-modal-v2 {
  width: min(600px, 100%);
  max-width: min(600px, 100%);
  max-height: min(92vh, 100%);
  border-radius: 12px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}

.create-modal-v2 .create-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  background: transparent;
}

.create-modal-v2 .create-head-left {
  display: flex;
  align-items: baseline;
  gap: 0.65rem;
  min-width: 0;
}

.create-modal-v2 .create-head-left h2 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
}

.create-modal-v2 .create-project-slug {
  font-size: 0.66rem;
  color: var(--muted);
  font-family: var(--mono);
}

.create-modal-v2 .create-head-right {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-shrink: 0;
}

.create-modal-v2 .kbd-hint {
  font-family: var(--mono);
  font-size: 0.62rem;
  color: var(--muted-2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.12rem 0.4rem;
}

.create-modal-v2 .create-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  overflow: auto;
  min-height: 0;
  flex: 1 1 auto;
}

/* Reset global form chrome for all create-modal fields */
.create-modal-v2 input:not([type="checkbox"]):not([type="radio"]),
.create-modal-v2 select,
.create-modal-v2 textarea {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  height: auto;
  min-height: 0;
  box-sizing: border-box;
  font: inherit;
  box-shadow: none !important;
  transition: border-color 120ms ease, background-color 120ms ease, color 120ms ease;
}

.create-modal-v2 input:not([type="checkbox"]):not([type="radio"]):hover:not(:disabled),
.create-modal-v2 select:hover:not(:disabled),
.create-modal-v2 textarea:hover:not(:disabled) {
  background-color: var(--bg-input);
  border-color: var(--border-strong);
  box-shadow: none !important;
}

.create-modal-v2 input:not([type="checkbox"]):not([type="radio"]):focus,
.create-modal-v2 input:not([type="checkbox"]):not([type="radio"]):focus-visible,
.create-modal-v2 select:focus,
.create-modal-v2 select:focus-visible,
.create-modal-v2 textarea:focus,
.create-modal-v2 textarea:focus-visible {
  border-color: var(--border-strong);
  background-color: var(--bg-input);
  box-shadow: none !important;
  outline: none;
}

.create-modal-v2 input.create-title-input,
.create-modal-v2 input.create-title-input:hover,
.create-modal-v2 input.create-title-input:focus,
.create-modal-v2 input.create-title-input:focus-visible {
  width: 100%;
  height: auto;
  min-height: 0;
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  border: none !important;
  border-radius: 0;
  outline: none;
  box-shadow: none !important;
  color: var(--text);
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.35;
  padding: 0.2rem 0;
}

.create-modal-v2 input.create-title-input::placeholder {
  color: var(--muted-2);
  opacity: 1;
}

.create-modal-v2 textarea.create-desc-input,
.create-modal-v2 textarea.create-desc-input:hover,
.create-modal-v2 textarea.create-desc-input:focus {
  width: 100%;
  height: auto;
  min-height: 4.5rem;
  background: var(--bg-input) !important;
  background-color: var(--bg-input) !important;
  border: 1px solid var(--border) !important;
  border-radius: 8px;
  color: var(--text-soft);
  font-size: 0.82rem;
  line-height: 1.5;
  padding: 0.65rem 0.75rem;
  outline: none;
  resize: vertical;
  font-family: inherit;
  box-shadow: none !important;
}

.create-modal-v2 textarea.create-desc-input:focus {
  border-color: var(--border-strong) !important;
}

.create-modal-v2 textarea.create-desc-input::placeholder {
  color: var(--muted-2);
  opacity: 1;
}

.create-modal-v2 .create-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-width: 0;
}

.create-modal-v2 .create-field-label {
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--muted);
  text-transform: uppercase;
}

.create-modal-v2 .create-optional {
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: var(--muted-2);
}

.create-modal-v2 .create-control,
.create-modal-v2 select.create-control,
.create-modal-v2 input.create-control {
  width: 100%;
  background: var(--bg-input) !important;
  border: 1px solid var(--border) !important;
  border-radius: 8px;
  color: var(--text);
  font-size: 0.82rem;
  padding: 0.55rem 0.7rem;
  outline: none;
  box-shadow: none !important;
}

.create-modal-v2 .create-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.create-modal-v2 .create-seg {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.create-modal-v2 .create-seg-btn {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.4rem 0.7rem;
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
}

.create-modal-v2 .create-seg-btn:hover:not(:disabled) {
  border-color: var(--border-strong);
  color: var(--text-soft);
}

.create-modal-v2 .create-seg-btn.active {
  background: var(--cta);
  border-color: var(--cta);
  color: var(--cta-text);
}

.create-modal-v2 .create-project-add {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.create-modal-v2 .create-project-add .create-control {
  flex: 1 1 auto;
}

.create-modal-v2 .create-add-btn,
.create-modal-v2 .create-cancel-add {
  flex-shrink: 0;
}

.create-modal-v2 .create-label-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  min-height: 2.4rem;
  padding: 0.4rem 0.55rem;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.create-modal-v2 .create-label-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  border: 1px solid var(--border-strong);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.7rem;
  font-family: var(--mono);
}

.create-modal-v2 .create-label-x {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.85rem;
  line-height: 1;
  padding: 0 0.1rem;
  font-family: inherit;
}

.create-modal-v2 .create-label-x:hover {
  color: var(--text);
}

.create-modal-v2 input.create-label-input,
.create-modal-v2 input.create-label-input:hover,
.create-modal-v2 input.create-label-input:focus {
  flex: 1 1 8rem;
  min-width: 6rem;
  width: auto;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 0.25rem 0.15rem;
  font-size: 0.78rem;
  color: var(--text);
  outline: none;
}

.create-modal-v2 .create-hint {
  font-size: 0.65rem;
  color: var(--muted-2);
}

.create-modal-v2 .create-trust-check {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  font-size: 0.72rem;
  color: var(--muted);
}

.create-modal-v2 .create-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1.25rem;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

.create-modal-v2 .create-foot-note {
  font-size: 0.68rem;
  color: var(--muted-2);
  min-width: 0;
}

.create-modal-v2 .create-foot-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.create-modal-v2 .btn.disabled,
.create-modal-v2 .create-add-btn.disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

@media (max-width: 560px) {
  .create-modal-v2 .create-row-2 {
    grid-template-columns: 1fr;
  }

  .create-modal-v2 .create-foot {
    flex-direction: column;
    align-items: stretch;
  }

  .create-modal-v2 .create-foot-actions {
    justify-content: flex-end;
  }
}

.write-panel label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin: 0.5rem 0;
  font-size: 0.85rem;
}

.write-panel textarea,
.write-panel input,
.write-panel select {
  width: 100%;
}

.write-panel .banner {
  margin: 0.5rem 0;
  padding: 0.5rem 0.75rem;
  border-radius: 3px;
}

.toolbar-actions {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  flex-wrap: wrap;
}

.trust {
  margin-top: 0.35rem;
  font-size: 0.75rem;
  color: var(--muted);
}

/* Filters alias used by older class names in some panels */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: end;
}

/* ─── Responsive ──────────────────────────────────────────── */

@media (max-width: 900px) {
  .app {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: relative;
    height: auto;
    max-height: none;
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.85rem;
  }

  .side-nav {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .nav-item {
    flex: 1 1 auto;
    min-width: 5.5rem;
    justify-content: center;
  }

  .directory {
    display: none;
  }

  .sidebar-footer {
    display: none;
  }

  .main-header {
    padding: 0.75rem 0.85rem;
  }

  .view-toolbar,
  .actor-line {
    padding-left: 0.85rem;
    padding-right: 0.85rem;
  }

  .main {
    padding: 0.65rem 0.75rem 1.5rem;
  }

  .banner {
    margin-left: 0.75rem;
    margin-right: 0.75rem;
  }

  .quick-jump {
    width: 100%;
    min-width: 0;
  }
}

@media (max-width: 640px) {
  .header-actions {
    width: 100%;
  }

  .header-actions .btn,
  .header-actions .quick-jump {
    flex: 1;
  }
}


/* ─── Theme palette catalog ─────────────────────────────────
 * Full dark + light token sets. Neutral chrome; brand on accent/CTA.
 * html[data-theme][data-scheme=dark|light]
 */

[data-theme="forest-mint"][data-scheme="dark"] {
  color-scheme: dark;
  --bg: #0c1515;
  --bg-sidebar: #132120;
  --bg-elev: #1d3130;
  --bg-card: #182929;
  --bg-hover: #284645;
  --bg-input: #101c1c;
  --input: #203938;
  --input-hover: #2b4d4c;
  --input-border: #3e7571;
  --ring: rgba(94, 234, 212, 0.28);
  --border: #33605c;
  --border-strong: #45837e;
  --border-soft: rgba(45, 212, 191, 0.1);
  --text: #eef2f1;
  --text-soft: #c8d4d0;
  --muted: #8a9692;
  --muted-2: #7d8a85;
  --brand: #5eead4;
  --brand-2: #2dd4bf;
  --accent: #5eead4;
  --accent-dim: #2dd4bf;
  --accent-soft: rgba(94, 234, 212, 0.12);
  --accent-glow: rgba(94, 234, 212, 0.16);
  --cta: #99f6e4;
  --cta-text: #0a1210;
  --cta-hover: #c0f9ee;
  --focus: #5eead4;
  --ok-bg: rgba(94, 234, 212, 0.1);
  --ok-border: rgba(94, 234, 212, 0.28);
  --danger-bg: rgba(248, 113, 113, 0.10);
  --warn-bg: rgba(251, 191, 36, 0.10);
  --shadow: 0 10px 30px rgba(0,0,0,0.40);
}

[data-theme="forest-mint"][data-scheme="light"] {
  color-scheme: light;
  --bg: #f7f8f8;
  --bg-sidebar: #eef0f0;
  --bg-elev: #ffffff;
  --bg-card: #ffffff;
  --bg-hover: #e8eaeb;
  --bg-input: #f1f3f3;
  --input: #ffffff;
  --input-hover: #fafafa;
  --input-border: #d1d5d4;
  --ring: rgba(56, 133, 130, 0.22);
  --border: #e2e5e4;
  --border-strong: #c5c9c8;
  --border-soft: rgba(94, 234, 212, 0.06);
  --text: #111827;
  --text-soft: #374151;
  --muted: #6b7280;
  --muted-2: #9ca3af;
  --brand: #5eead4;
  --brand-2: #2dd4bf;
  --accent: #388582;
  --accent-dim: #208580;
  --accent-soft: rgba(56, 133, 130, 0.09);
  --accent-glow: rgba(56, 133, 130, 0.12);
  --cta: #26a59a;
  --cta-text: #ffffff;
  --cta-hover: #67c0b8;
  --focus: #388582;
  --ok-bg: rgba(56, 133, 130, 0.08);
  --ok-border: rgba(56, 133, 130, 0.2);
  --danger-bg: rgba(220, 38, 38, 0.08);
  --warn-bg: rgba(217, 119, 6, 0.10);
  --shadow: 0 1px 2px rgba(15,23,20,0.04), 0 8px 24px rgba(15,23,20,0.05);
}

[data-theme="forest-mint"]:not([data-scheme]) {
  color-scheme: dark;
  --bg: #0c1515;
  --bg-sidebar: #132120;
  --bg-elev: #1d3130;
  --bg-card: #182929;
  --bg-hover: #284645;
  --bg-input: #101c1c;
  --input: #203938;
  --input-hover: #2b4d4c;
  --input-border: #3e7571;
  --ring: rgba(94, 234, 212, 0.28);
  --border: #33605c;
  --border-strong: #45837e;
  --border-soft: rgba(45, 212, 191, 0.1);
  --text: #eef2f1;
  --text-soft: #c8d4d0;
  --muted: #8a9692;
  --muted-2: #7d8a85;
  --brand: #5eead4;
  --brand-2: #2dd4bf;
  --accent: #5eead4;
  --accent-dim: #2dd4bf;
  --accent-soft: rgba(94, 234, 212, 0.12);
  --accent-glow: rgba(94, 234, 212, 0.16);
  --cta: #99f6e4;
  --cta-text: #0a1210;
  --cta-hover: #c0f9ee;
  --focus: #5eead4;
  --ok-bg: rgba(94, 234, 212, 0.1);
  --ok-border: rgba(94, 234, 212, 0.28);
  --danger-bg: rgba(248, 113, 113, 0.10);
  --warn-bg: rgba(251, 191, 36, 0.10);
  --shadow: 0 10px 30px rgba(0,0,0,0.40);
}

[data-theme="mono-mint"][data-scheme="dark"] {
  color-scheme: dark;
  --bg: #0c1515;
  --bg-sidebar: #132120;
  --bg-elev: #1d3130;
  --bg-card: #182929;
  --bg-hover: #284645;
  --bg-input: #101c1c;
  --input: #203938;
  --input-hover: #2b4d4c;
  --input-border: #3e7571;
  --ring: rgba(94, 234, 212, 0.28);
  --border: #33605c;
  --border-strong: #45837e;
  --border-soft: rgba(45, 212, 191, 0.1);
  --text: #eef2f1;
  --text-soft: #c8d4d0;
  --muted: #8a9692;
  --muted-2: #7d8a85;
  --brand: #5eead4;
  --brand-2: #2dd4bf;
  --accent: #5eead4;
  --accent-dim: #2dd4bf;
  --accent-soft: rgba(94, 234, 212, 0.12);
  --accent-glow: rgba(94, 234, 212, 0.16);
  --cta: #99f6e4;
  --cta-text: #0a1210;
  --cta-hover: #c0f9ee;
  --focus: #5eead4;
  --ok-bg: rgba(94, 234, 212, 0.1);
  --ok-border: rgba(94, 234, 212, 0.28);
  --danger-bg: rgba(248, 113, 113, 0.10);
  --warn-bg: rgba(251, 191, 36, 0.10);
  --shadow: 0 10px 30px rgba(0,0,0,0.40);
}

[data-theme="mono-mint"][data-scheme="light"] {
  color-scheme: light;
  --bg: #f7f8f8;
  --bg-sidebar: #eef0f0;
  --bg-elev: #ffffff;
  --bg-card: #ffffff;
  --bg-hover: #e8eaeb;
  --bg-input: #f1f3f3;
  --input: #ffffff;
  --input-hover: #fafafa;
  --input-border: #d1d5d4;
  --ring: rgba(56, 133, 130, 0.22);
  --border: #e2e5e4;
  --border-strong: #c5c9c8;
  --border-soft: rgba(94, 234, 212, 0.06);
  --text: #111827;
  --text-soft: #374151;
  --muted: #6b7280;
  --muted-2: #9ca3af;
  --brand: #5eead4;
  --brand-2: #2dd4bf;
  --accent: #388582;
  --accent-dim: #208580;
  --accent-soft: rgba(56, 133, 130, 0.09);
  --accent-glow: rgba(56, 133, 130, 0.12);
  --cta: #26a59a;
  --cta-text: #ffffff;
  --cta-hover: #67c0b8;
  --focus: #388582;
  --ok-bg: rgba(56, 133, 130, 0.08);
  --ok-border: rgba(56, 133, 130, 0.2);
  --danger-bg: rgba(220, 38, 38, 0.08);
  --warn-bg: rgba(217, 119, 6, 0.10);
  --shadow: 0 1px 2px rgba(15,23,20,0.04), 0 8px 24px rgba(15,23,20,0.05);
}

[data-theme="mono-mint"]:not([data-scheme]) {
  color-scheme: dark;
  --bg: #0c1515;
  --bg-sidebar: #132120;
  --bg-elev: #1d3130;
  --bg-card: #182929;
  --bg-hover: #284645;
  --bg-input: #101c1c;
  --input: #203938;
  --input-hover: #2b4d4c;
  --input-border: #3e7571;
  --ring: rgba(94, 234, 212, 0.28);
  --border: #33605c;
  --border-strong: #45837e;
  --border-soft: rgba(45, 212, 191, 0.1);
  --text: #eef2f1;
  --text-soft: #c8d4d0;
  --muted: #8a9692;
  --muted-2: #7d8a85;
  --brand: #5eead4;
  --brand-2: #2dd4bf;
  --accent: #5eead4;
  --accent-dim: #2dd4bf;
  --accent-soft: rgba(94, 234, 212, 0.12);
  --accent-glow: rgba(94, 234, 212, 0.16);
  --cta: #99f6e4;
  --cta-text: #0a1210;
  --cta-hover: #c0f9ee;
  --focus: #5eead4;
  --ok-bg: rgba(94, 234, 212, 0.1);
  --ok-border: rgba(94, 234, 212, 0.28);
  --danger-bg: rgba(248, 113, 113, 0.10);
  --warn-bg: rgba(251, 191, 36, 0.10);
  --shadow: 0 10px 30px rgba(0,0,0,0.40);
}

[data-theme="mono-slate"][data-scheme="dark"] {
  color-scheme: dark;
  --bg: #0f1214;
  --bg-sidebar: #171b1d;
  --bg-elev: #23292d;
  --bg-card: #1d2226;
  --bg-hover: #323940;
  --bg-input: #14171a;
  --input: #282f34;
  --input-hover: #363f46;
  --input-border: #505c67;
  --ring: rgba(148, 163, 184, 0.28);
  --border: #424c55;
  --border-strong: #5a6672;
  --border-soft: rgba(100, 116, 139, 0.1);
  --text: #eef2f1;
  --text-soft: #c8d4d0;
  --muted: #8a9692;
  --muted-2: #7d8a85;
  --brand: #94a3b8;
  --brand-2: #64748b;
  --accent: #94a3b8;
  --accent-dim: #64748b;
  --accent-soft: rgba(148, 163, 184, 0.12);
  --accent-glow: rgba(148, 163, 184, 0.16);
  --cta: #e2e8f0;
  --cta-text: #0a1210;
  --cta-hover: #edf1f6;
  --focus: #94a3b8;
  --ok-bg: rgba(148, 163, 184, 0.1);
  --ok-border: rgba(148, 163, 184, 0.28);
  --danger-bg: rgba(248, 113, 113, 0.10);
  --warn-bg: rgba(251, 191, 36, 0.10);
  --shadow: 0 10px 30px rgba(0,0,0,0.40);
}

[data-theme="mono-slate"][data-scheme="light"] {
  color-scheme: light;
  --bg: #f7f8f8;
  --bg-sidebar: #eef0f0;
  --bg-elev: #ffffff;
  --bg-card: #ffffff;
  --bg-hover: #e8eaeb;
  --bg-input: #f1f3f3;
  --input: #ffffff;
  --input-hover: #fafafa;
  --input-border: #d1d5d4;
  --ring: rgba(84, 96, 116, 0.22);
  --border: #e2e5e4;
  --border-strong: #c5c9c8;
  --border-soft: rgba(148, 163, 184, 0.06);
  --text: #111827;
  --text-soft: #374151;
  --muted: #6b7280;
  --muted-2: #9ca3af;
  --brand: #94a3b8;
  --brand-2: #64748b;
  --accent: #546074;
  --accent-dim: #404d62;
  --accent-soft: rgba(84, 96, 116, 0.09);
  --accent-glow: rgba(84, 96, 116, 0.12);
  --cta: #64748b;
  --cta-text: #ffffff;
  --cta-hover: #929eae;
  --focus: #546074;
  --ok-bg: rgba(84, 96, 116, 0.08);
  --ok-border: rgba(84, 96, 116, 0.2);
  --danger-bg: rgba(220, 38, 38, 0.08);
  --warn-bg: rgba(217, 119, 6, 0.10);
  --shadow: 0 1px 2px rgba(15,23,20,0.04), 0 8px 24px rgba(15,23,20,0.05);
}

[data-theme="mono-slate"]:not([data-scheme]) {
  color-scheme: dark;
  --bg: #0f1214;
  --bg-sidebar: #171b1d;
  --bg-elev: #23292d;
  --bg-card: #1d2226;
  --bg-hover: #323940;
  --bg-input: #14171a;
  --input: #282f34;
  --input-hover: #363f46;
  --input-border: #505c67;
  --ring: rgba(148, 163, 184, 0.28);
  --border: #424c55;
  --border-strong: #5a6672;
  --border-soft: rgba(100, 116, 139, 0.1);
  --text: #eef2f1;
  --text-soft: #c8d4d0;
  --muted: #8a9692;
  --muted-2: #7d8a85;
  --brand: #94a3b8;
  --brand-2: #64748b;
  --accent: #94a3b8;
  --accent-dim: #64748b;
  --accent-soft: rgba(148, 163, 184, 0.12);
  --accent-glow: rgba(148, 163, 184, 0.16);
  --cta: #e2e8f0;
  --cta-text: #0a1210;
  --cta-hover: #edf1f6;
  --focus: #94a3b8;
  --ok-bg: rgba(148, 163, 184, 0.1);
  --ok-border: rgba(148, 163, 184, 0.28);
  --danger-bg: rgba(248, 113, 113, 0.10);
  --warn-bg: rgba(251, 191, 36, 0.10);
  --shadow: 0 10px 30px rgba(0,0,0,0.40);
}

[data-theme="mono-sand"][data-scheme="dark"] {
  color-scheme: dark;
  --bg: #121311;
  --bg-sidebar: #1c1d1a;
  --bg-elev: #2b2b28;
  --bg-card: #242422;
  --bg-hover: #3d3d38;
  --bg-input: #181917;
  --input: #31322e;
  --input-hover: #43433e;
  --input-border: #686458;
  --ring: rgba(214, 185, 140, 0.28);
  --border: #545248;
  --border-strong: #756f61;
  --border-soft: rgba(166, 139, 91, 0.1);
  --text: #eef2f1;
  --text-soft: #c8d4d0;
  --muted: #8a9692;
  --muted-2: #7d8a85;
  --brand: #d6b98c;
  --brand-2: #a68b5b;
  --accent: #d6b98c;
  --accent-dim: #a68b5b;
  --accent-soft: rgba(214, 185, 140, 0.12);
  --accent-glow: rgba(214, 185, 140, 0.16);
  --cta: #f5e6d3;
  --cta-text: #0a1210;
  --cta-hover: #f9f0e4;
  --focus: #d6b98c;
  --ok-bg: rgba(214, 185, 140, 0.1);
  --ok-border: rgba(214, 185, 140, 0.28);
  --danger-bg: rgba(248, 113, 113, 0.10);
  --warn-bg: rgba(251, 191, 36, 0.10);
  --shadow: 0 10px 30px rgba(0,0,0,0.40);
}

[data-theme="mono-sand"][data-scheme="light"] {
  color-scheme: light;
  --bg: #f7f8f8;
  --bg-sidebar: #eef0f0;
  --bg-elev: #ffffff;
  --bg-card: #ffffff;
  --bg-hover: #e8eaeb;
  --bg-input: #f1f3f3;
  --input: #ffffff;
  --input-hover: #fafafa;
  --input-border: #d1d5d4;
  --ring: rgba(118, 107, 93, 0.22);
  --border: #e2e5e4;
  --border-strong: #c5c9c8;
  --border-soft: rgba(214, 185, 140, 0.06);
  --text: #111827;
  --text-soft: #374151;
  --muted: #6b7280;
  --muted-2: #9ca3af;
  --brand: #d6b98c;
  --brand-2: #a68b5b;
  --accent: #766b5d;
  --accent-dim: #675a46;
  --accent-soft: rgba(118, 107, 93, 0.09);
  --accent-glow: rgba(118, 107, 93, 0.12);
  --cta: #806e4f;
  --cta-text: #ffffff;
  --cta-hover: #a69a84;
  --focus: #766b5d;
  --ok-bg: rgba(118, 107, 93, 0.08);
  --ok-border: rgba(118, 107, 93, 0.2);
  --danger-bg: rgba(220, 38, 38, 0.08);
  --warn-bg: rgba(217, 119, 6, 0.10);
  --shadow: 0 1px 2px rgba(15,23,20,0.04), 0 8px 24px rgba(15,23,20,0.05);
}

[data-theme="mono-sand"]:not([data-scheme]) {
  color-scheme: dark;
  --bg: #121311;
  --bg-sidebar: #1c1d1a;
  --bg-elev: #2b2b28;
  --bg-card: #242422;
  --bg-hover: #3d3d38;
  --bg-input: #181917;
  --input: #31322e;
  --input-hover: #43433e;
  --input-border: #686458;
  --ring: rgba(214, 185, 140, 0.28);
  --border: #545248;
  --border-strong: #756f61;
  --border-soft: rgba(166, 139, 91, 0.1);
  --text: #eef2f1;
  --text-soft: #c8d4d0;
  --muted: #8a9692;
  --muted-2: #7d8a85;
  --brand: #d6b98c;
  --brand-2: #a68b5b;
  --accent: #d6b98c;
  --accent-dim: #a68b5b;
  --accent-soft: rgba(214, 185, 140, 0.12);
  --accent-glow: rgba(214, 185, 140, 0.16);
  --cta: #f5e6d3;
  --cta-text: #0a1210;
  --cta-hover: #f9f0e4;
  --focus: #d6b98c;
  --ok-bg: rgba(214, 185, 140, 0.1);
  --ok-border: rgba(214, 185, 140, 0.28);
  --danger-bg: rgba(248, 113, 113, 0.10);
  --warn-bg: rgba(251, 191, 36, 0.10);
  --shadow: 0 10px 30px rgba(0,0,0,0.40);
}

[data-theme="mono-ink"][data-scheme="dark"] {
  color-scheme: dark;
  --bg: #101213;
  --bg-sidebar: #181b1c;
  --bg-elev: #25282b;
  --bg-card: #1e2225;
  --bg-hover: #34393e;
  --bg-input: #151719;
  --input: #292f32;
  --input-hover: #383f44;
  --input-border: #555b62;
  --ring: rgba(161, 161, 170, 0.28);
  --border: #464b51;
  --border-strong: #60666d;
  --border-soft: rgba(113, 113, 122, 0.1);
  --text: #eef2f1;
  --text-soft: #c8d4d0;
  --muted: #8a9692;
  --muted-2: #7d8a85;
  --brand: #a1a1aa;
  --brand-2: #71717a;
  --accent: #a1a1aa;
  --accent-dim: #71717a;
  --accent-soft: rgba(161, 161, 170, 0.12);
  --accent-glow: rgba(161, 161, 170, 0.16);
  --cta: #e4e4e7;
  --cta-text: #0a1210;
  --cta-hover: #eeeef0;
  --focus: #a1a1aa;
  --ok-bg: rgba(161, 161, 170, 0.1);
  --ok-border: rgba(161, 161, 170, 0.28);
  --danger-bg: rgba(248, 113, 113, 0.10);
  --warn-bg: rgba(251, 191, 36, 0.10);
  --shadow: 0 10px 30px rgba(0,0,0,0.40);
}

[data-theme="mono-ink"][data-scheme="light"] {
  color-scheme: light;
  --bg: #f7f8f8;
  --bg-sidebar: #eef0f0;
  --bg-elev: #ffffff;
  --bg-card: #ffffff;
  --bg-hover: #e8eaeb;
  --bg-input: #f1f3f3;
  --input: #ffffff;
  --input-hover: #fafafa;
  --input-border: #d1d5d4;
  --ring: rgba(91, 95, 109, 0.22);
  --border: #e2e5e4;
  --border-strong: #c5c9c8;
  --border-soft: rgba(161, 161, 170, 0.06);
  --text: #111827;
  --text-soft: #374151;
  --muted: #6b7280;
  --muted-2: #9ca3af;
  --brand: #a1a1aa;
  --brand-2: #71717a;
  --accent: #5b5f6d;
  --accent-dim: #484b58;
  --accent-soft: rgba(91, 95, 109, 0.09);
  --accent-glow: rgba(91, 95, 109, 0.12);
  --cta: #71717a;
  --cta-text: #ffffff;
  --cta-hover: #9c9ca2;
  --focus: #5b5f6d;
  --ok-bg: rgba(91, 95, 109, 0.08);
  --ok-border: rgba(91, 95, 109, 0.2);
  --danger-bg: rgba(220, 38, 38, 0.08);
  --warn-bg: rgba(217, 119, 6, 0.10);
  --shadow: 0 1px 2px rgba(15,23,20,0.04), 0 8px 24px rgba(15,23,20,0.05);
}

[data-theme="mono-ink"]:not([data-scheme]) {
  color-scheme: dark;
  --bg: #101213;
  --bg-sidebar: #181b1c;
  --bg-elev: #25282b;
  --bg-card: #1e2225;
  --bg-hover: #34393e;
  --bg-input: #151719;
  --input: #292f32;
  --input-hover: #383f44;
  --input-border: #555b62;
  --ring: rgba(161, 161, 170, 0.28);
  --border: #464b51;
  --border-strong: #60666d;
  --border-soft: rgba(113, 113, 122, 0.1);
  --text: #eef2f1;
  --text-soft: #c8d4d0;
  --muted: #8a9692;
  --muted-2: #7d8a85;
  --brand: #a1a1aa;
  --brand-2: #71717a;
  --accent: #a1a1aa;
  --accent-dim: #71717a;
  --accent-soft: rgba(161, 161, 170, 0.12);
  --accent-glow: rgba(161, 161, 170, 0.16);
  --cta: #e4e4e7;
  --cta-text: #0a1210;
  --cta-hover: #eeeef0;
  --focus: #a1a1aa;
  --ok-bg: rgba(161, 161, 170, 0.1);
  --ok-border: rgba(161, 161, 170, 0.28);
  --danger-bg: rgba(248, 113, 113, 0.10);
  --warn-bg: rgba(251, 191, 36, 0.10);
  --shadow: 0 10px 30px rgba(0,0,0,0.40);
}

[data-theme="analog-aqua"][data-scheme="dark"] {
  color-scheme: dark;
  --bg: #091416;
  --bg-sidebar: #0e1f22;
  --bg-elev: #162e33;
  --bg-card: #12272c;
  --bg-hover: #1d424a;
  --bg-input: #0c1b1e;
  --input: #18363c;
  --input-hover: #1f4951;
  --input-border: #286d7a;
  --ring: rgba(34, 211, 238, 0.28);
  --border: #225964;
  --border-strong: #2d7a88;
  --border-soft: rgba(6, 182, 212, 0.1);
  --text: #eef2f1;
  --text-soft: #c8d4d0;
  --muted: #8a9692;
  --muted-2: #7d8a85;
  --brand: #22d3ee;
  --brand-2: #06b6d4;
  --accent: #22d3ee;
  --accent-dim: #06b6d4;
  --accent-soft: rgba(34, 211, 238, 0.12);
  --accent-glow: rgba(34, 211, 238, 0.16);
  --cta: #67e8f9;
  --cta-text: #0a1210;
  --cta-hover: #a1f1fb;
  --focus: #22d3ee;
  --ok-bg: rgba(34, 211, 238, 0.1);
  --ok-border: rgba(34, 211, 238, 0.28);
  --danger-bg: rgba(248, 113, 113, 0.10);
  --warn-bg: rgba(251, 191, 36, 0.10);
  --shadow: 0 10px 30px rgba(0,0,0,0.40);
}

[data-theme="analog-aqua"][data-scheme="light"] {
  color-scheme: light;
  --bg: #f7f8f8;
  --bg-sidebar: #eef0f0;
  --bg-elev: #ffffff;
  --bg-card: #ffffff;
  --bg-hover: #e8eaeb;
  --bg-input: #f1f3f3;
  --input: #ffffff;
  --input-hover: #fafafa;
  --input-border: #d1d5d4;
  --ring: rgba(25, 121, 144, 0.22);
  --border: #e2e5e4;
  --border-strong: #c5c9c8;
  --border-soft: rgba(34, 211, 238, 0.06);
  --text: #111827;
  --text-soft: #374151;
  --muted: #6b7280;
  --muted-2: #9ca3af;
  --brand: #22d3ee;
  --brand-2: #06b6d4;
  --accent: #197990;
  --accent-dim: #0a738d;
  --accent-soft: rgba(25, 121, 144, 0.09);
  --accent-glow: rgba(25, 121, 144, 0.12);
  --cta: #088eaa;
  --cta-text: #ffffff;
  --cta-hover: #52b0c4;
  --focus: #197990;
  --ok-bg: rgba(25, 121, 144, 0.08);
  --ok-border: rgba(25, 121, 144, 0.2);
  --danger-bg: rgba(220, 38, 38, 0.08);
  --warn-bg: rgba(217, 119, 6, 0.10);
  --shadow: 0 1px 2px rgba(15,23,20,0.04), 0 8px 24px rgba(15,23,20,0.05);
}

[data-theme="analog-aqua"]:not([data-scheme]) {
  color-scheme: dark;
  --bg: #091416;
  --bg-sidebar: #0e1f22;
  --bg-elev: #162e33;
  --bg-card: #12272c;
  --bg-hover: #1d424a;
  --bg-input: #0c1b1e;
  --input: #18363c;
  --input-hover: #1f4951;
  --input-border: #286d7a;
  --ring: rgba(34, 211, 238, 0.28);
  --border: #225964;
  --border-strong: #2d7a88;
  --border-soft: rgba(6, 182, 212, 0.1);
  --text: #eef2f1;
  --text-soft: #c8d4d0;
  --muted: #8a9692;
  --muted-2: #7d8a85;
  --brand: #22d3ee;
  --brand-2: #06b6d4;
  --accent: #22d3ee;
  --accent-dim: #06b6d4;
  --accent-soft: rgba(34, 211, 238, 0.12);
  --accent-glow: rgba(34, 211, 238, 0.16);
  --cta: #67e8f9;
  --cta-text: #0a1210;
  --cta-hover: #a1f1fb;
  --focus: #22d3ee;
  --ok-bg: rgba(34, 211, 238, 0.1);
  --ok-border: rgba(34, 211, 238, 0.28);
  --danger-bg: rgba(248, 113, 113, 0.10);
  --warn-bg: rgba(251, 191, 36, 0.10);
  --shadow: 0 10px 30px rgba(0,0,0,0.40);
}

[data-theme="analog-lime"][data-scheme="dark"] {
  color-scheme: dark;
  --bg: #10150d;
  --bg-sidebar: #182013;
  --bg-elev: #25311d;
  --bg-card: #1f2919;
  --bg-hover: #344529;
  --bg-input: #151c11;
  --input: #2a3822;
  --input-hover: #394c2c;
  --input-border: #56743a;
  --ring: rgba(163, 230, 53, 0.28);
  --border: #465f30;
  --border-strong: #60813e;
  --border-soft: rgba(132, 204, 22, 0.1);
  --text: #eef2f1;
  --text-soft: #c8d4d0;
  --muted: #8a9692;
  --muted-2: #7d8a85;
  --brand: #a3e635;
  --brand-2: #84cc16;
  --accent: #a3e635;
  --accent-dim: #84cc16;
  --accent-soft: rgba(163, 230, 53, 0.12);
  --accent-glow: rgba(163, 230, 53, 0.16);
  --cta: #bef264;
  --cta-text: #0a1210;
  --cta-hover: #d7f79f;
  --focus: #a3e635;
  --ok-bg: rgba(163, 230, 53, 0.1);
  --ok-border: rgba(163, 230, 53, 0.28);
  --danger-bg: rgba(248, 113, 113, 0.10);
  --warn-bg: rgba(251, 191, 36, 0.10);
  --shadow: 0 10px 30px rgba(0,0,0,0.40);
}

[data-theme="analog-lime"][data-scheme="light"] {
  color-scheme: light;
  --bg: #f7f8f8;
  --bg-sidebar: #eef0f0;
  --bg-elev: #ffffff;
  --bg-card: #ffffff;
  --bg-hover: #e8eaeb;
  --bg-input: #f1f3f3;
  --input: #ffffff;
  --input-hover: #fafafa;
  --input-border: #d1d5d4;
  --ring: rgba(92, 131, 48, 0.22);
  --border: #e2e5e4;
  --border-strong: #c5c9c8;
  --border-soft: rgba(163, 230, 53, 0.06);
  --text: #111827;
  --text-soft: #374151;
  --muted: #6b7280;
  --muted-2: #9ca3af;
  --brand: #a3e635;
  --brand-2: #84cc16;
  --accent: #5c8330;
  --accent-dim: #53801e;
  --accent-soft: rgba(92, 131, 48, 0.09);
  --accent-glow: rgba(92, 131, 48, 0.12);
  --cta: #679f1b;
  --cta-text: #ffffff;
  --cta-hover: #95bc5f;
  --focus: #5c8330;
  --ok-bg: rgba(92, 131, 48, 0.08);
  --ok-border: rgba(92, 131, 48, 0.2);
  --danger-bg: rgba(220, 38, 38, 0.08);
  --warn-bg: rgba(217, 119, 6, 0.10);
  --shadow: 0 1px 2px rgba(15,23,20,0.04), 0 8px 24px rgba(15,23,20,0.05);
}

[data-theme="analog-lime"]:not([data-scheme]) {
  color-scheme: dark;
  --bg: #10150d;
  --bg-sidebar: #182013;
  --bg-elev: #25311d;
  --bg-card: #1f2919;
  --bg-hover: #344529;
  --bg-input: #151c11;
  --input: #2a3822;
  --input-hover: #394c2c;
  --input-border: #56743a;
  --ring: rgba(163, 230, 53, 0.28);
  --border: #465f30;
  --border-strong: #60813e;
  --border-soft: rgba(132, 204, 22, 0.1);
  --text: #eef2f1;
  --text-soft: #c8d4d0;
  --muted: #8a9692;
  --muted-2: #7d8a85;
  --brand: #a3e635;
  --brand-2: #84cc16;
  --accent: #a3e635;
  --accent-dim: #84cc16;
  --accent-soft: rgba(163, 230, 53, 0.12);
  --accent-glow: rgba(163, 230, 53, 0.16);
  --cta: #bef264;
  --cta-text: #0a1210;
  --cta-hover: #d7f79f;
  --focus: #a3e635;
  --ok-bg: rgba(163, 230, 53, 0.1);
  --ok-border: rgba(163, 230, 53, 0.28);
  --danger-bg: rgba(248, 113, 113, 0.10);
  --warn-bg: rgba(251, 191, 36, 0.10);
  --shadow: 0 10px 30px rgba(0,0,0,0.40);
}

[data-theme="analog-azure"][data-scheme="dark"] {
  color-scheme: dark;
  --bg: #0a1317;
  --bg-sidebar: #101d23;
  --bg-elev: #182c35;
  --bg-card: #14252d;
  --bg-hover: #213e4c;
  --bg-input: #0d191e;
  --input: #1b333d;
  --input-hover: #234453;
  --input-border: #30657e;
  --ring: rgba(56, 189, 248, 0.28);
  --border: #285367;
  --border-strong: #36718c;
  --border-soft: rgba(14, 165, 233, 0.1);
  --text: #eef2f1;
  --text-soft: #c8d4d0;
  --muted: #8a9692;
  --muted-2: #7d8a85;
  --brand: #38bdf8;
  --brand-2: #0ea5e9;
  --accent: #38bdf8;
  --accent-dim: #0ea5e9;
  --accent-soft: rgba(56, 189, 248, 0.12);
  --accent-glow: rgba(56, 189, 248, 0.16);
  --cta: #7dd3fc;
  --cta-text: #0a1210;
  --cta-hover: #aee4fd;
  --focus: #38bdf8;
  --ok-bg: rgba(56, 189, 248, 0.1);
  --ok-border: rgba(56, 189, 248, 0.28);
  --danger-bg: rgba(248, 113, 113, 0.10);
  --warn-bg: rgba(251, 191, 36, 0.10);
  --shadow: 0 10px 30px rgba(0,0,0,0.40);
}

[data-theme="analog-azure"][data-scheme="light"] {
  color-scheme: light;
  --bg: #f7f8f8;
  --bg-sidebar: #eef0f0;
  --bg-elev: #ffffff;
  --bg-card: #ffffff;
  --bg-hover: #e8eaeb;
  --bg-input: #f1f3f3;
  --input: #ffffff;
  --input-hover: #fafafa;
  --input-border: #d1d5d4;
  --ring: rgba(36, 109, 149, 0.22);
  --border: #e2e5e4;
  --border-strong: #c5c9c8;
  --border-soft: rgba(56, 189, 248, 0.06);
  --text: #111827;
  --text-soft: #374151;
  --muted: #6b7280;
  --muted-2: #9ca3af;
  --brand: #38bdf8;
  --brand-2: #0ea5e9;
  --accent: #246d95;
  --accent-dim: #0e6999;
  --accent-soft: rgba(36, 109, 149, 0.09);
  --accent-glow: rgba(36, 109, 149, 0.12);
  --cta: #0ea5e9;
  --cta-text: #ffffff;
  --cta-hover: #56c0f0;
  --focus: #246d95;
  --ok-bg: rgba(36, 109, 149, 0.08);
  --ok-border: rgba(36, 109, 149, 0.2);
  --danger-bg: rgba(220, 38, 38, 0.08);
  --warn-bg: rgba(217, 119, 6, 0.10);
  --shadow: 0 1px 2px rgba(15,23,20,0.04), 0 8px 24px rgba(15,23,20,0.05);
}

[data-theme="analog-azure"]:not([data-scheme]) {
  color-scheme: dark;
  --bg: #0a1317;
  --bg-sidebar: #101d23;
  --bg-elev: #182c35;
  --bg-card: #14252d;
  --bg-hover: #213e4c;
  --bg-input: #0d191e;
  --input: #1b333d;
  --input-hover: #234453;
  --input-border: #30657e;
  --ring: rgba(56, 189, 248, 0.28);
  --border: #285367;
  --border-strong: #36718c;
  --border-soft: rgba(14, 165, 233, 0.1);
  --text: #eef2f1;
  --text-soft: #c8d4d0;
  --muted: #8a9692;
  --muted-2: #7d8a85;
  --brand: #38bdf8;
  --brand-2: #0ea5e9;
  --accent: #38bdf8;
  --accent-dim: #0ea5e9;
  --accent-soft: rgba(56, 189, 248, 0.12);
  --accent-glow: rgba(56, 189, 248, 0.16);
  --cta: #7dd3fc;
  --cta-text: #0a1210;
  --cta-hover: #aee4fd;
  --focus: #38bdf8;
  --ok-bg: rgba(56, 189, 248, 0.1);
  --ok-border: rgba(56, 189, 248, 0.28);
  --danger-bg: rgba(248, 113, 113, 0.10);
  --warn-bg: rgba(251, 191, 36, 0.10);
  --shadow: 0 10px 30px rgba(0,0,0,0.40);
}

[data-theme="analog-jade"][data-scheme="dark"] {
  color-scheme: dark;
  --bg: #0a1412;
  --bg-sidebar: #0f1f1b;
  --bg-elev: #182e29;
  --bg-card: #142723;
  --bg-hover: #20423b;
  --bg-input: #0d1b18;
  --input: #1a3630;
  --input-hover: #224940;
  --input-border: #2f6d5d;
  --ring: rgba(52, 211, 153, 0.28);
  --border: #27594c;
  --border-strong: #347a66;
  --border-soft: rgba(16, 185, 129, 0.1);
  --text: #eef2f1;
  --text-soft: #c8d4d0;
  --muted: #8a9692;
  --muted-2: #7d8a85;
  --brand: #34d399;
  --brand-2: #10b981;
  --accent: #34d399;
  --accent-dim: #10b981;
  --accent-soft: rgba(52, 211, 153, 0.12);
  --accent-glow: rgba(52, 211, 153, 0.16);
  --cta: #6ee7b7;
  --cta-text: #0a1210;
  --cta-hover: #a5f0d2;
  --focus: #34d399;
  --ok-bg: rgba(52, 211, 153, 0.1);
  --ok-border: rgba(52, 211, 153, 0.28);
  --danger-bg: rgba(248, 113, 113, 0.10);
  --warn-bg: rgba(251, 191, 36, 0.10);
  --shadow: 0 10px 30px rgba(0,0,0,0.40);
}

[data-theme="analog-jade"][data-scheme="light"] {
  color-scheme: light;
  --bg: #f7f8f8;
  --bg-sidebar: #eef0f0;
  --bg-elev: #ffffff;
  --bg-card: #ffffff;
  --bg-hover: #e8eaeb;
  --bg-input: #f1f3f3;
  --input: #ffffff;
  --input-hover: #fafafa;
  --input-border: #d1d5d4;
  --ring: rgba(34, 121, 100, 0.22);
  --border: #e2e5e4;
  --border-strong: #c5c9c8;
  --border-soft: rgba(52, 211, 153, 0.06);
  --text: #111827;
  --text-soft: #374151;
  --muted: #6b7280;
  --muted-2: #9ca3af;
  --brand: #34d399;
  --brand-2: #10b981;
  --accent: #227964;
  --accent-dim: #10755c;
  --accent-soft: rgba(34, 121, 100, 0.09);
  --accent-glow: rgba(34, 121, 100, 0.12);
  --cta: #10906b;
  --cta-text: #ffffff;
  --cta-hover: #58b197;
  --focus: #227964;
  --ok-bg: rgba(34, 121, 100, 0.08);
  --ok-border: rgba(34, 121, 100, 0.2);
  --danger-bg: rgba(220, 38, 38, 0.08);
  --warn-bg: rgba(217, 119, 6, 0.10);
  --shadow: 0 1px 2px rgba(15,23,20,0.04), 0 8px 24px rgba(15,23,20,0.05);
}

[data-theme="analog-jade"]:not([data-scheme]) {
  color-scheme: dark;
  --bg: #0a1412;
  --bg-sidebar: #0f1f1b;
  --bg-elev: #182e29;
  --bg-card: #142723;
  --bg-hover: #20423b;
  --bg-input: #0d1b18;
  --input: #1a3630;
  --input-hover: #224940;
  --input-border: #2f6d5d;
  --ring: rgba(52, 211, 153, 0.28);
  --border: #27594c;
  --border-strong: #347a66;
  --border-soft: rgba(16, 185, 129, 0.1);
  --text: #eef2f1;
  --text-soft: #c8d4d0;
  --muted: #8a9692;
  --muted-2: #7d8a85;
  --brand: #34d399;
  --brand-2: #10b981;
  --accent: #34d399;
  --accent-dim: #10b981;
  --accent-soft: rgba(52, 211, 153, 0.12);
  --accent-glow: rgba(52, 211, 153, 0.16);
  --cta: #6ee7b7;
  --cta-text: #0a1210;
  --cta-hover: #a5f0d2;
  --focus: #34d399;
  --ok-bg: rgba(52, 211, 153, 0.1);
  --ok-border: rgba(52, 211, 153, 0.28);
  --danger-bg: rgba(248, 113, 113, 0.10);
  --warn-bg: rgba(251, 191, 36, 0.10);
  --shadow: 0 10px 30px rgba(0,0,0,0.40);
}

[data-theme="comp-coral"][data-scheme="dark"] {
  color-scheme: dark;
  --bg: #0a1414;
  --bg-sidebar: #0f1f1e;
  --bg-elev: #172f2e;
  --bg-card: #132727;
  --bg-hover: #1f4242;
  --bg-input: #0c1b1a;
  --input: #193635;
  --input-hover: #214948;
  --input-border: #2c6d6a;
  --ring: rgba(45, 212, 191, 0.28);
  --border: #255a57;
  --border-strong: #317a75;
  --border-soft: rgba(251, 113, 133, 0.1);
  --text: #eef2f1;
  --text-soft: #c8d4d0;
  --muted: #8a9692;
  --muted-2: #7d8a85;
  --brand: #2dd4bf;
  --brand-2: #fb7185;
  --accent: #2dd4bf;
  --accent-dim: #fb7185;
  --accent-soft: rgba(45, 212, 191, 0.12);
  --accent-glow: rgba(45, 212, 191, 0.16);
  --cta: #fb7185;
  --cta-text: #0a1210;
  --cta-hover: #fda7b3;
  --focus: #2dd4bf;
  --ok-bg: rgba(45, 212, 191, 0.1);
  --ok-border: rgba(45, 212, 191, 0.28);
  --danger-bg: rgba(248, 113, 113, 0.10);
  --warn-bg: rgba(251, 191, 36, 0.10);
  --shadow: 0 10px 30px rgba(0,0,0,0.40);
}

[data-theme="comp-coral"][data-scheme="light"] {
  color-scheme: light;
  --bg: #f7f8f8;
  --bg-sidebar: #eef0f0;
  --bg-elev: #ffffff;
  --bg-card: #ffffff;
  --bg-hover: #e8eaeb;
  --bg-input: #f1f3f3;
  --input: #ffffff;
  --input-hover: #fafafa;
  --input-border: #d1d5d4;
  --ring: rgba(31, 121, 119, 0.22);
  --border: #e2e5e4;
  --border-strong: #c5c9c8;
  --border-soft: rgba(45, 212, 191, 0.06);
  --text: #111827;
  --text-soft: #374151;
  --muted: #6b7280;
  --muted-2: #9ca3af;
  --brand: #2dd4bf;
  --brand-2: #fb7185;
  --accent: #1f7977;
  --accent-dim: #984b5f;
  --accent-soft: rgba(31, 121, 119, 0.09);
  --accent-glow: rgba(31, 121, 119, 0.12);
  --cta: #c05a6e;
  --cta-text: #ffffff;
  --cta-hover: #d38c9a;
  --focus: #1f7977;
  --ok-bg: rgba(31, 121, 119, 0.08);
  --ok-border: rgba(31, 121, 119, 0.2);
  --danger-bg: rgba(220, 38, 38, 0.08);
  --warn-bg: rgba(217, 119, 6, 0.10);
  --shadow: 0 1px 2px rgba(15,23,20,0.04), 0 8px 24px rgba(15,23,20,0.05);
}

[data-theme="comp-coral"]:not([data-scheme]) {
  color-scheme: dark;
  --bg: #0a1414;
  --bg-sidebar: #0f1f1e;
  --bg-elev: #172f2e;
  --bg-card: #132727;
  --bg-hover: #1f4242;
  --bg-input: #0c1b1a;
  --input: #193635;
  --input-hover: #214948;
  --input-border: #2c6d6a;
  --ring: rgba(45, 212, 191, 0.28);
  --border: #255a57;
  --border-strong: #317a75;
  --border-soft: rgba(251, 113, 133, 0.1);
  --text: #eef2f1;
  --text-soft: #c8d4d0;
  --muted: #8a9692;
  --muted-2: #7d8a85;
  --brand: #2dd4bf;
  --brand-2: #fb7185;
  --accent: #2dd4bf;
  --accent-dim: #fb7185;
  --accent-soft: rgba(45, 212, 191, 0.12);
  --accent-glow: rgba(45, 212, 191, 0.16);
  --cta: #fb7185;
  --cta-text: #0a1210;
  --cta-hover: #fda7b3;
  --focus: #2dd4bf;
  --ok-bg: rgba(45, 212, 191, 0.1);
  --ok-border: rgba(45, 212, 191, 0.28);
  --danger-bg: rgba(248, 113, 113, 0.10);
  --warn-bg: rgba(251, 191, 36, 0.10);
  --shadow: 0 10px 30px rgba(0,0,0,0.40);
}

[data-theme="comp-amber"][data-scheme="dark"] {
  color-scheme: dark;
  --bg: #091416;
  --bg-sidebar: #0e1f22;
  --bg-elev: #162e33;
  --bg-card: #12272c;
  --bg-hover: #1d424a;
  --bg-input: #0c1b1e;
  --input: #18363c;
  --input-hover: #1f4951;
  --input-border: #286d7a;
  --ring: rgba(34, 211, 238, 0.28);
  --border: #225964;
  --border-strong: #2d7a88;
  --border-soft: rgba(245, 158, 11, 0.1);
  --text: #eef2f1;
  --text-soft: #c8d4d0;
  --muted: #8a9692;
  --muted-2: #7d8a85;
  --brand: #22d3ee;
  --brand-2: #f59e0b;
  --accent: #22d3ee;
  --accent-dim: #f59e0b;
  --accent-soft: rgba(34, 211, 238, 0.12);
  --accent-glow: rgba(34, 211, 238, 0.16);
  --cta: #f59e0b;
  --cta-text: #0a1210;
  --cta-hover: #f9c368;
  --focus: #22d3ee;
  --ok-bg: rgba(34, 211, 238, 0.1);
  --ok-border: rgba(34, 211, 238, 0.28);
  --danger-bg: rgba(248, 113, 113, 0.10);
  --warn-bg: rgba(251, 191, 36, 0.10);
  --shadow: 0 10px 30px rgba(0,0,0,0.40);
}

[data-theme="comp-amber"][data-scheme="light"] {
  color-scheme: light;
  --bg: #f7f8f8;
  --bg-sidebar: #eef0f0;
  --bg-elev: #ffffff;
  --bg-card: #ffffff;
  --bg-hover: #e8eaeb;
  --bg-input: #f1f3f3;
  --input: #ffffff;
  --input-hover: #fafafa;
  --input-border: #d1d5d4;
  --ring: rgba(25, 121, 144, 0.22);
  --border: #e2e5e4;
  --border-strong: #c5c9c8;
  --border-soft: rgba(34, 211, 238, 0.06);
  --text: #111827;
  --text-soft: #374151;
  --muted: #6b7280;
  --muted-2: #9ca3af;
  --brand: #22d3ee;
  --brand-2: #f59e0b;
  --accent: #197990;
  --accent-dim: #946518;
  --accent-soft: rgba(25, 121, 144, 0.09);
  --accent-glow: rgba(25, 121, 144, 0.12);
  --cta: #bc7c13;
  --cta-text: #ffffff;
  --cta-hover: #d0a35a;
  --focus: #197990;
  --ok-bg: rgba(25, 121, 144, 0.08);
  --ok-border: rgba(25, 121, 144, 0.2);
  --danger-bg: rgba(220, 38, 38, 0.08);
  --warn-bg: rgba(217, 119, 6, 0.10);
  --shadow: 0 1px 2px rgba(15,23,20,0.04), 0 8px 24px rgba(15,23,20,0.05);
}

[data-theme="comp-amber"]:not([data-scheme]) {
  color-scheme: dark;
  --bg: #091416;
  --bg-sidebar: #0e1f22;
  --bg-elev: #162e33;
  --bg-card: #12272c;
  --bg-hover: #1d424a;
  --bg-input: #0c1b1e;
  --input: #18363c;
  --input-hover: #1f4951;
  --input-border: #286d7a;
  --ring: rgba(34, 211, 238, 0.28);
  --border: #225964;
  --border-strong: #2d7a88;
  --border-soft: rgba(245, 158, 11, 0.1);
  --text: #eef2f1;
  --text-soft: #c8d4d0;
  --muted: #8a9692;
  --muted-2: #7d8a85;
  --brand: #22d3ee;
  --brand-2: #f59e0b;
  --accent: #22d3ee;
  --accent-dim: #f59e0b;
  --accent-soft: rgba(34, 211, 238, 0.12);
  --accent-glow: rgba(34, 211, 238, 0.16);
  --cta: #f59e0b;
  --cta-text: #0a1210;
  --cta-hover: #f9c368;
  --focus: #22d3ee;
  --ok-bg: rgba(34, 211, 238, 0.1);
  --ok-border: rgba(34, 211, 238, 0.28);
  --danger-bg: rgba(248, 113, 113, 0.10);
  --warn-bg: rgba(251, 191, 36, 0.10);
  --shadow: 0 10px 30px rgba(0,0,0,0.40);
}

[data-theme="comp-rose"][data-scheme="dark"] {
  color-scheme: dark;
  --bg: #091313;
  --bg-sidebar: #0d1d1c;
  --bg-elev: #142b2b;
  --bg-card: #102424;
  --bg-hover: #1b3d3d;
  --bg-input: #0b1919;
  --input: #163232;
  --input-hover: #1c4343;
  --input-border: #246461;
  --ring: rgba(20, 184, 166, 0.28);
  --border: #1e5250;
  --border-strong: #276f6b;
  --border-soft: rgba(236, 72, 153, 0.1);
  --text: #eef2f1;
  --text-soft: #c8d4d0;
  --muted: #8a9692;
  --muted-2: #7d8a85;
  --brand: #14b8a6;
  --brand-2: #ec4899;
  --accent: #14b8a6;
  --accent-dim: #ec4899;
  --accent-soft: rgba(20, 184, 166, 0.12);
  --accent-glow: rgba(20, 184, 166, 0.16);
  --cta: #ec4899;
  --cta-text: #f8fffc;
  --cta-hover: #f38ec0;
  --focus: #14b8a6;
  --ok-bg: rgba(20, 184, 166, 0.1);
  --ok-border: rgba(20, 184, 166, 0.28);
  --danger-bg: rgba(248, 113, 113, 0.10);
  --warn-bg: rgba(251, 191, 36, 0.10);
  --shadow: 0 10px 30px rgba(0,0,0,0.40);
}

[data-theme="comp-rose"][data-scheme="light"] {
  color-scheme: light;
  --bg: #f7f8f8;
  --bg-sidebar: #eef0f0;
  --bg-elev: #ffffff;
  --bg-card: #ffffff;
  --bg-hover: #e8eaeb;
  --bg-input: #f1f3f3;
  --input: #ffffff;
  --input-hover: #fafafa;
  --input-border: #d1d5d4;
  --ring: rgba(18, 107, 106, 0.22);
  --border: #e2e5e4;
  --border-strong: #c5c9c8;
  --border-soft: rgba(20, 184, 166, 0.06);
  --text: #111827;
  --text-soft: #374151;
  --muted: #6b7280;
  --muted-2: #9ca3af;
  --brand: #14b8a6;
  --brand-2: #ec4899;
  --accent: #126b6a;
  --accent-dim: #8f336a;
  --accent-soft: rgba(18, 107, 106, 0.09);
  --accent-glow: rgba(18, 107, 106, 0.12);
  --cta: #ec4899;
  --cta-text: #ffffff;
  --cta-hover: #f27fb8;
  --focus: #126b6a;
  --ok-bg: rgba(18, 107, 106, 0.08);
  --ok-border: rgba(18, 107, 106, 0.2);
  --danger-bg: rgba(220, 38, 38, 0.08);
  --warn-bg: rgba(217, 119, 6, 0.10);
  --shadow: 0 1px 2px rgba(15,23,20,0.04), 0 8px 24px rgba(15,23,20,0.05);
}

[data-theme="comp-rose"]:not([data-scheme]) {
  color-scheme: dark;
  --bg: #091313;
  --bg-sidebar: #0d1d1c;
  --bg-elev: #142b2b;
  --bg-card: #102424;
  --bg-hover: #1b3d3d;
  --bg-input: #0b1919;
  --input: #163232;
  --input-hover: #1c4343;
  --input-border: #246461;
  --ring: rgba(20, 184, 166, 0.28);
  --border: #1e5250;
  --border-strong: #276f6b;
  --border-soft: rgba(236, 72, 153, 0.1);
  --text: #eef2f1;
  --text-soft: #c8d4d0;
  --muted: #8a9692;
  --muted-2: #7d8a85;
  --brand: #14b8a6;
  --brand-2: #ec4899;
  --accent: #14b8a6;
  --accent-dim: #ec4899;
  --accent-soft: rgba(20, 184, 166, 0.12);
  --accent-glow: rgba(20, 184, 166, 0.16);
  --cta: #ec4899;
  --cta-text: #f8fffc;
  --cta-hover: #f38ec0;
  --focus: #14b8a6;
  --ok-bg: rgba(20, 184, 166, 0.1);
  --ok-border: rgba(20, 184, 166, 0.28);
  --danger-bg: rgba(248, 113, 113, 0.10);
  --warn-bg: rgba(251, 191, 36, 0.10);
  --shadow: 0 10px 30px rgba(0,0,0,0.40);
}

[data-theme="split-warm"][data-scheme="dark"] {
  color-scheme: dark;
  --bg: #091313;
  --bg-sidebar: #0d1d1c;
  --bg-elev: #142b2b;
  --bg-card: #102424;
  --bg-hover: #1b3d3d;
  --bg-input: #0b1919;
  --input: #163232;
  --input-hover: #1c4343;
  --input-border: #246461;
  --ring: rgba(20, 184, 166, 0.28);
  --border: #1e5250;
  --border-strong: #276f6b;
  --border-soft: rgba(249, 115, 22, 0.1);
  --text: #eef2f1;
  --text-soft: #c8d4d0;
  --muted: #8a9692;
  --muted-2: #7d8a85;
  --brand: #14b8a6;
  --brand-2: #f97316;
  --accent: #14b8a6;
  --accent-dim: #f97316;
  --accent-soft: rgba(20, 184, 166, 0.12);
  --accent-glow: rgba(20, 184, 166, 0.16);
  --cta: #f97316;
  --cta-text: #f8fffc;
  --cta-hover: #fba86f;
  --focus: #14b8a6;
  --ok-bg: rgba(20, 184, 166, 0.1);
  --ok-border: rgba(20, 184, 166, 0.28);
  --danger-bg: rgba(248, 113, 113, 0.10);
  --warn-bg: rgba(251, 191, 36, 0.10);
  --shadow: 0 10px 30px rgba(0,0,0,0.40);
}

[data-theme="split-warm"][data-scheme="light"] {
  color-scheme: light;
  --bg: #f7f8f8;
  --bg-sidebar: #eef0f0;
  --bg-elev: #ffffff;
  --bg-card: #ffffff;
  --bg-hover: #e8eaeb;
  --bg-input: #f1f3f3;
  --input: #ffffff;
  --input-hover: #fafafa;
  --input-border: #d1d5d4;
  --ring: rgba(18, 107, 106, 0.22);
  --border: #e2e5e4;
  --border-strong: #c5c9c8;
  --border-soft: rgba(20, 184, 166, 0.06);
  --text: #111827;
  --text-soft: #374151;
  --muted: #6b7280;
  --muted-2: #9ca3af;
  --brand: #14b8a6;
  --brand-2: #f97316;
  --accent: #126b6a;
  --accent-dim: #974c1e;
  --accent-soft: rgba(18, 107, 106, 0.09);
  --accent-glow: rgba(18, 107, 106, 0.12);
  --cta: #f97316;
  --cta-text: #ffffff;
  --cta-hover: #fb9d5c;
  --focus: #126b6a;
  --ok-bg: rgba(18, 107, 106, 0.08);
  --ok-border: rgba(18, 107, 106, 0.2);
  --danger-bg: rgba(220, 38, 38, 0.08);
  --warn-bg: rgba(217, 119, 6, 0.10);
  --shadow: 0 1px 2px rgba(15,23,20,0.04), 0 8px 24px rgba(15,23,20,0.05);
}

[data-theme="split-warm"]:not([data-scheme]) {
  color-scheme: dark;
  --bg: #091313;
  --bg-sidebar: #0d1d1c;
  --bg-elev: #142b2b;
  --bg-card: #102424;
  --bg-hover: #1b3d3d;
  --bg-input: #0b1919;
  --input: #163232;
  --input-hover: #1c4343;
  --input-border: #246461;
  --ring: rgba(20, 184, 166, 0.28);
  --border: #1e5250;
  --border-strong: #276f6b;
  --border-soft: rgba(249, 115, 22, 0.1);
  --text: #eef2f1;
  --text-soft: #c8d4d0;
  --muted: #8a9692;
  --muted-2: #7d8a85;
  --brand: #14b8a6;
  --brand-2: #f97316;
  --accent: #14b8a6;
  --accent-dim: #f97316;
  --accent-soft: rgba(20, 184, 166, 0.12);
  --accent-glow: rgba(20, 184, 166, 0.16);
  --cta: #f97316;
  --cta-text: #f8fffc;
  --cta-hover: #fba86f;
  --focus: #14b8a6;
  --ok-bg: rgba(20, 184, 166, 0.1);
  --ok-border: rgba(20, 184, 166, 0.28);
  --danger-bg: rgba(248, 113, 113, 0.10);
  --warn-bg: rgba(251, 191, 36, 0.10);
  --shadow: 0 10px 30px rgba(0,0,0,0.40);
}

[data-theme="split-violet"][data-scheme="dark"] {
  color-scheme: dark;
  --bg: #091313;
  --bg-sidebar: #0d1d1c;
  --bg-elev: #142b2b;
  --bg-card: #102424;
  --bg-hover: #1b3d3d;
  --bg-input: #0b1919;
  --input: #163232;
  --input-hover: #1c4343;
  --input-border: #246461;
  --ring: rgba(20, 184, 166, 0.28);
  --border: #1e5250;
  --border-strong: #276f6b;
  --border-soft: rgba(168, 85, 247, 0.1);
  --text: #eef2f1;
  --text-soft: #c8d4d0;
  --muted: #8a9692;
  --muted-2: #7d8a85;
  --brand: #14b8a6;
  --brand-2: #a855f7;
  --accent: #14b8a6;
  --accent-dim: #a855f7;
  --accent-soft: rgba(20, 184, 166, 0.12);
  --accent-glow: rgba(20, 184, 166, 0.16);
  --cta: #a855f7;
  --cta-text: #f8fffc;
  --cta-hover: #c996fa;
  --focus: #14b8a6;
  --ok-bg: rgba(20, 184, 166, 0.1);
  --ok-border: rgba(20, 184, 166, 0.28);
  --danger-bg: rgba(248, 113, 113, 0.10);
  --warn-bg: rgba(251, 191, 36, 0.10);
  --shadow: 0 10px 30px rgba(0,0,0,0.40);
}

[data-theme="split-violet"][data-scheme="light"] {
  color-scheme: light;
  --bg: #f7f8f8;
  --bg-sidebar: #eef0f0;
  --bg-elev: #ffffff;
  --bg-card: #ffffff;
  --bg-hover: #e8eaeb;
  --bg-input: #f1f3f3;
  --input: #ffffff;
  --input-hover: #fafafa;
  --input-border: #d1d5d4;
  --ring: rgba(18, 107, 106, 0.22);
  --border: #e2e5e4;
  --border-strong: #c5c9c8;
  --border-soft: rgba(20, 184, 166, 0.06);
  --text: #111827;
  --text-soft: #374151;
  --muted: #6b7280;
  --muted-2: #9ca3af;
  --brand: #14b8a6;
  --brand-2: #a855f7;
  --accent: #126b6a;
  --accent-dim: #683ba1;
  --accent-soft: rgba(18, 107, 106, 0.09);
  --accent-glow: rgba(18, 107, 106, 0.12);
  --cta: #a855f7;
  --cta-text: #ffffff;
  --cta-hover: #c288f9;
  --focus: #126b6a;
  --ok-bg: rgba(18, 107, 106, 0.08);
  --ok-border: rgba(18, 107, 106, 0.2);
  --danger-bg: rgba(220, 38, 38, 0.08);
  --warn-bg: rgba(217, 119, 6, 0.10);
  --shadow: 0 1px 2px rgba(15,23,20,0.04), 0 8px 24px rgba(15,23,20,0.05);
}

[data-theme="split-violet"]:not([data-scheme]) {
  color-scheme: dark;
  --bg: #091313;
  --bg-sidebar: #0d1d1c;
  --bg-elev: #142b2b;
  --bg-card: #102424;
  --bg-hover: #1b3d3d;
  --bg-input: #0b1919;
  --input: #163232;
  --input-hover: #1c4343;
  --input-border: #246461;
  --ring: rgba(20, 184, 166, 0.28);
  --border: #1e5250;
  --border-strong: #276f6b;
  --border-soft: rgba(168, 85, 247, 0.1);
  --text: #eef2f1;
  --text-soft: #c8d4d0;
  --muted: #8a9692;
  --muted-2: #7d8a85;
  --brand: #14b8a6;
  --brand-2: #a855f7;
  --accent: #14b8a6;
  --accent-dim: #a855f7;
  --accent-soft: rgba(20, 184, 166, 0.12);
  --accent-glow: rgba(20, 184, 166, 0.16);
  --cta: #a855f7;
  --cta-text: #f8fffc;
  --cta-hover: #c996fa;
  --focus: #14b8a6;
  --ok-bg: rgba(20, 184, 166, 0.1);
  --ok-border: rgba(20, 184, 166, 0.28);
  --danger-bg: rgba(248, 113, 113, 0.10);
  --warn-bg: rgba(251, 191, 36, 0.10);
  --shadow: 0 10px 30px rgba(0,0,0,0.40);
}

[data-theme="triad-gold"][data-scheme="dark"] {
  color-scheme: dark;
  --bg: #091313;
  --bg-sidebar: #0d1d1c;
  --bg-elev: #142b2b;
  --bg-card: #102424;
  --bg-hover: #1b3d3d;
  --bg-input: #0b1919;
  --input: #163232;
  --input-hover: #1c4343;
  --input-border: #246461;
  --ring: rgba(20, 184, 166, 0.28);
  --border: #1e5250;
  --border-strong: #276f6b;
  --border-soft: rgba(217, 70, 239, 0.1);
  --text: #eef2f1;
  --text-soft: #c8d4d0;
  --muted: #8a9692;
  --muted-2: #7d8a85;
  --brand: #14b8a6;
  --brand-2: #d946ef;
  --accent: #14b8a6;
  --accent-dim: #d946ef;
  --accent-soft: rgba(20, 184, 166, 0.12);
  --accent-glow: rgba(20, 184, 166, 0.16);
  --cta: #eab308;
  --cta-text: #0a1210;
  --cta-hover: #f2d066;
  --focus: #14b8a6;
  --ok-bg: rgba(20, 184, 166, 0.1);
  --ok-border: rgba(20, 184, 166, 0.28);
  --danger-bg: rgba(248, 113, 113, 0.10);
  --warn-bg: rgba(251, 191, 36, 0.10);
  --shadow: 0 10px 30px rgba(0,0,0,0.40);
}

[data-theme="triad-gold"][data-scheme="light"] {
  color-scheme: light;
  --bg: #f7f8f8;
  --bg-sidebar: #eef0f0;
  --bg-elev: #ffffff;
  --bg-card: #ffffff;
  --bg-hover: #e8eaeb;
  --bg-input: #f1f3f3;
  --input: #ffffff;
  --input-hover: #fafafa;
  --input-border: #d1d5d4;
  --ring: rgba(18, 107, 106, 0.22);
  --border: #e2e5e4;
  --border-strong: #c5c9c8;
  --border-soft: rgba(20, 184, 166, 0.06);
  --text: #111827;
  --text-soft: #374151;
  --muted: #6b7280;
  --muted-2: #9ca3af;
  --brand: #14b8a6;
  --brand-2: #d946ef;
  --accent: #126b6a;
  --accent-dim: #84329c;
  --accent-soft: rgba(18, 107, 106, 0.09);
  --accent-glow: rgba(18, 107, 106, 0.12);
  --cta: #d946ef;
  --cta-text: #ffffff;
  --cta-hover: #e47ef4;
  --focus: #126b6a;
  --ok-bg: rgba(18, 107, 106, 0.08);
  --ok-border: rgba(18, 107, 106, 0.2);
  --danger-bg: rgba(220, 38, 38, 0.08);
  --warn-bg: rgba(217, 119, 6, 0.10);
  --shadow: 0 1px 2px rgba(15,23,20,0.04), 0 8px 24px rgba(15,23,20,0.05);
}

[data-theme="triad-gold"]:not([data-scheme]) {
  color-scheme: dark;
  --bg: #091313;
  --bg-sidebar: #0d1d1c;
  --bg-elev: #142b2b;
  --bg-card: #102424;
  --bg-hover: #1b3d3d;
  --bg-input: #0b1919;
  --input: #163232;
  --input-hover: #1c4343;
  --input-border: #246461;
  --ring: rgba(20, 184, 166, 0.28);
  --border: #1e5250;
  --border-strong: #276f6b;
  --border-soft: rgba(217, 70, 239, 0.1);
  --text: #eef2f1;
  --text-soft: #c8d4d0;
  --muted: #8a9692;
  --muted-2: #7d8a85;
  --brand: #14b8a6;
  --brand-2: #d946ef;
  --accent: #14b8a6;
  --accent-dim: #d946ef;
  --accent-soft: rgba(20, 184, 166, 0.12);
  --accent-glow: rgba(20, 184, 166, 0.16);
  --cta: #eab308;
  --cta-text: #0a1210;
  --cta-hover: #f2d066;
  --focus: #14b8a6;
  --ok-bg: rgba(20, 184, 166, 0.1);
  --ok-border: rgba(20, 184, 166, 0.28);
  --danger-bg: rgba(248, 113, 113, 0.10);
  --warn-bg: rgba(251, 191, 36, 0.10);
  --shadow: 0 10px 30px rgba(0,0,0,0.40);
}

[data-theme="triad-lime"][data-scheme="dark"] {
  color-scheme: dark;
  --bg: #081315;
  --bg-sidebar: #0c1c20;
  --bg-elev: #122b30;
  --bg-card: #0f2429;
  --bg-hover: #183d45;
  --bg-input: #0a191c;
  --input: #143238;
  --input-hover: #19434c;
  --input-border: #1f6371;
  --ring: rgba(6, 182, 212, 0.28);
  --border: #1a515c;
  --border-strong: #226e7e;
  --border-soft: rgba(244, 63, 94, 0.1);
  --text: #eef2f1;
  --text-soft: #c8d4d0;
  --muted: #8a9692;
  --muted-2: #7d8a85;
  --brand: #06b6d4;
  --brand-2: #f43f5e;
  --accent: #06b6d4;
  --accent-dim: #f43f5e;
  --accent-soft: rgba(6, 182, 212, 0.12);
  --accent-glow: rgba(6, 182, 212, 0.16);
  --cta: #84cc16;
  --cta-text: #0a1210;
  --cta-hover: #b3df6f;
  --focus: #06b6d4;
  --ok-bg: rgba(6, 182, 212, 0.1);
  --ok-border: rgba(6, 182, 212, 0.28);
  --danger-bg: rgba(248, 113, 113, 0.10);
  --warn-bg: rgba(251, 191, 36, 0.10);
  --shadow: 0 10px 30px rgba(0,0,0,0.40);
}

[data-theme="triad-lime"][data-scheme="light"] {
  color-scheme: light;
  --bg: #f7f8f8;
  --bg-sidebar: #eef0f0;
  --bg-elev: #ffffff;
  --bg-card: #ffffff;
  --bg-hover: #e8eaeb;
  --bg-input: #f1f3f3;
  --input: #ffffff;
  --input-hover: #fafafa;
  --input-border: #d1d5d4;
  --ring: rgba(10, 106, 130, 0.22);
  --border: #e2e5e4;
  --border-strong: #c5c9c8;
  --border-soft: rgba(6, 182, 212, 0.06);
  --text: #111827;
  --text-soft: #374151;
  --muted: #6b7280;
  --muted-2: #9ca3af;
  --brand: #06b6d4;
  --brand-2: #f43f5e;
  --accent: #0a6a82;
  --accent-dim: #942e48;
  --accent-soft: rgba(10, 106, 130, 0.09);
  --accent-glow: rgba(10, 106, 130, 0.12);
  --cta: #f43f5e;
  --cta-text: #ffffff;
  --cta-hover: #f7798e;
  --focus: #0a6a82;
  --ok-bg: rgba(10, 106, 130, 0.08);
  --ok-border: rgba(10, 106, 130, 0.2);
  --danger-bg: rgba(220, 38, 38, 0.08);
  --warn-bg: rgba(217, 119, 6, 0.10);
  --shadow: 0 1px 2px rgba(15,23,20,0.04), 0 8px 24px rgba(15,23,20,0.05);
}

[data-theme="triad-lime"]:not([data-scheme]) {
  color-scheme: dark;
  --bg: #081315;
  --bg-sidebar: #0c1c20;
  --bg-elev: #122b30;
  --bg-card: #0f2429;
  --bg-hover: #183d45;
  --bg-input: #0a191c;
  --input: #143238;
  --input-hover: #19434c;
  --input-border: #1f6371;
  --ring: rgba(6, 182, 212, 0.28);
  --border: #1a515c;
  --border-strong: #226e7e;
  --border-soft: rgba(244, 63, 94, 0.1);
  --text: #eef2f1;
  --text-soft: #c8d4d0;
  --muted: #8a9692;
  --muted-2: #7d8a85;
  --brand: #06b6d4;
  --brand-2: #f43f5e;
  --accent: #06b6d4;
  --accent-dim: #f43f5e;
  --accent-soft: rgba(6, 182, 212, 0.12);
  --accent-glow: rgba(6, 182, 212, 0.16);
  --cta: #84cc16;
  --cta-text: #0a1210;
  --cta-hover: #b3df6f;
  --focus: #06b6d4;
  --ok-bg: rgba(6, 182, 212, 0.1);
  --ok-border: rgba(6, 182, 212, 0.28);
  --danger-bg: rgba(248, 113, 113, 0.10);
  --warn-bg: rgba(251, 191, 36, 0.10);
  --shadow: 0 10px 30px rgba(0,0,0,0.40);
}

[data-theme="tetra-aurora"][data-scheme="dark"] {
  color-scheme: dark;
  --bg: #091313;
  --bg-sidebar: #0d1d1c;
  --bg-elev: #142b2b;
  --bg-card: #102424;
  --bg-hover: #1b3d3d;
  --bg-input: #0b1919;
  --input: #163232;
  --input-hover: #1c4343;
  --input-border: #246461;
  --ring: rgba(20, 184, 166, 0.28);
  --border: #1e5250;
  --border-strong: #276f6b;
  --border-soft: rgba(232, 121, 249, 0.1);
  --text: #eef2f1;
  --text-soft: #c8d4d0;
  --muted: #8a9692;
  --muted-2: #7d8a85;
  --brand: #14b8a6;
  --brand-2: #e879f9;
  --accent: #14b8a6;
  --accent-dim: #e879f9;
  --accent-soft: rgba(20, 184, 166, 0.12);
  --accent-glow: rgba(20, 184, 166, 0.16);
  --cta: #e879f9;
  --cta-text: #0a1210;
  --cta-hover: #f1acfb;
  --focus: #14b8a6;
  --ok-bg: rgba(20, 184, 166, 0.1);
  --ok-border: rgba(20, 184, 166, 0.28);
  --danger-bg: rgba(248, 113, 113, 0.10);
  --warn-bg: rgba(251, 191, 36, 0.10);
  --shadow: 0 10px 30px rgba(0,0,0,0.40);
}

[data-theme="tetra-aurora"][data-scheme="light"] {
  color-scheme: light;
  --bg: #f7f8f8;
  --bg-sidebar: #eef0f0;
  --bg-elev: #ffffff;
  --bg-card: #ffffff;
  --bg-hover: #e8eaeb;
  --bg-input: #f1f3f3;
  --input: #ffffff;
  --input-hover: #fafafa;
  --input-border: #d1d5d4;
  --ring: rgba(18, 107, 106, 0.22);
  --border: #e2e5e4;
  --border-strong: #c5c9c8;
  --border-soft: rgba(20, 184, 166, 0.06);
  --text: #111827;
  --text-soft: #374151;
  --muted: #6b7280;
  --muted-2: #9ca3af;
  --brand: #14b8a6;
  --brand-2: #e879f9;
  --accent: #126b6a;
  --accent-dim: #8d50a2;
  --accent-soft: rgba(18, 107, 106, 0.09);
  --accent-glow: rgba(18, 107, 106, 0.12);
  --cta: #b260c5;
  --cta-text: #ffffff;
  --cta-hover: #c990d6;
  --focus: #126b6a;
  --ok-bg: rgba(18, 107, 106, 0.08);
  --ok-border: rgba(18, 107, 106, 0.2);
  --danger-bg: rgba(220, 38, 38, 0.08);
  --warn-bg: rgba(217, 119, 6, 0.10);
  --shadow: 0 1px 2px rgba(15,23,20,0.04), 0 8px 24px rgba(15,23,20,0.05);
}

[data-theme="tetra-aurora"]:not([data-scheme]) {
  color-scheme: dark;
  --bg: #091313;
  --bg-sidebar: #0d1d1c;
  --bg-elev: #142b2b;
  --bg-card: #102424;
  --bg-hover: #1b3d3d;
  --bg-input: #0b1919;
  --input: #163232;
  --input-hover: #1c4343;
  --input-border: #246461;
  --ring: rgba(20, 184, 166, 0.28);
  --border: #1e5250;
  --border-strong: #276f6b;
  --border-soft: rgba(232, 121, 249, 0.1);
  --text: #eef2f1;
  --text-soft: #c8d4d0;
  --muted: #8a9692;
  --muted-2: #7d8a85;
  --brand: #14b8a6;
  --brand-2: #e879f9;
  --accent: #14b8a6;
  --accent-dim: #e879f9;
  --accent-soft: rgba(20, 184, 166, 0.12);
  --accent-glow: rgba(20, 184, 166, 0.16);
  --cta: #e879f9;
  --cta-text: #0a1210;
  --cta-hover: #f1acfb;
  --focus: #14b8a6;
  --ok-bg: rgba(20, 184, 166, 0.1);
  --ok-border: rgba(20, 184, 166, 0.28);
  --danger-bg: rgba(248, 113, 113, 0.10);
  --warn-bg: rgba(251, 191, 36, 0.10);
  --shadow: 0 10px 30px rgba(0,0,0,0.40);
}

[data-theme="tetra-ember"][data-scheme="dark"] {
  color-scheme: dark;
  --bg: #081216;
  --bg-sidebar: #0c1b21;
  --bg-elev: #132933;
  --bg-card: #10222b;
  --bg-hover: #193a49;
  --bg-input: #0a181d;
  --input: #152f3b;
  --input-hover: #1b3f50;
  --input-border: #225d79;
  --ring: rgba(14, 165, 233, 0.28);
  --border: #1c4c62;
  --border-strong: #256786;
  --border-soft: rgba(249, 115, 22, 0.1);
  --text: #eef2f1;
  --text-soft: #c8d4d0;
  --muted: #8a9692;
  --muted-2: #7d8a85;
  --brand: #0ea5e9;
  --brand-2: #f97316;
  --accent: #0ea5e9;
  --accent-dim: #f97316;
  --accent-soft: rgba(14, 165, 233, 0.12);
  --accent-glow: rgba(14, 165, 233, 0.16);
  --cta: #f97316;
  --cta-text: #f8fffc;
  --cta-hover: #fba86f;
  --focus: #0ea5e9;
  --ok-bg: rgba(14, 165, 233, 0.1);
  --ok-border: rgba(14, 165, 233, 0.28);
  --danger-bg: rgba(248, 113, 113, 0.10);
  --warn-bg: rgba(251, 191, 36, 0.10);
  --shadow: 0 10px 30px rgba(0,0,0,0.40);
}

[data-theme="tetra-ember"][data-scheme="light"] {
  color-scheme: light;
  --bg: #f7f8f8;
  --bg-sidebar: #eef0f0;
  --bg-elev: #ffffff;
  --bg-card: #ffffff;
  --bg-hover: #e8eaeb;
  --bg-input: #f1f3f3;
  --input: #ffffff;
  --input-hover: #fafafa;
  --input-border: #d1d5d4;
  --ring: rgba(14, 97, 141, 0.22);
  --border: #e2e5e4;
  --border-strong: #c5c9c8;
  --border-soft: rgba(14, 165, 233, 0.06);
  --text: #111827;
  --text-soft: #374151;
  --muted: #6b7280;
  --muted-2: #9ca3af;
  --brand: #0ea5e9;
  --brand-2: #f97316;
  --accent: #0e618d;
  --accent-dim: #974c1e;
  --accent-soft: rgba(14, 97, 141, 0.09);
  --accent-glow: rgba(14, 97, 141, 0.12);
  --cta: #f97316;
  --cta-text: #ffffff;
  --cta-hover: #fb9d5c;
  --focus: #0e618d;
  --ok-bg: rgba(14, 97, 141, 0.08);
  --ok-border: rgba(14, 97, 141, 0.2);
  --danger-bg: rgba(220, 38, 38, 0.08);
  --warn-bg: rgba(217, 119, 6, 0.10);
  --shadow: 0 1px 2px rgba(15,23,20,0.04), 0 8px 24px rgba(15,23,20,0.05);
}

[data-theme="tetra-ember"]:not([data-scheme]) {
  color-scheme: dark;
  --bg: #081216;
  --bg-sidebar: #0c1b21;
  --bg-elev: #132933;
  --bg-card: #10222b;
  --bg-hover: #193a49;
  --bg-input: #0a181d;
  --input: #152f3b;
  --input-hover: #1b3f50;
  --input-border: #225d79;
  --ring: rgba(14, 165, 233, 0.28);
  --border: #1c4c62;
  --border-strong: #256786;
  --border-soft: rgba(249, 115, 22, 0.1);
  --text: #eef2f1;
  --text-soft: #c8d4d0;
  --muted: #8a9692;
  --muted-2: #7d8a85;
  --brand: #0ea5e9;
  --brand-2: #f97316;
  --accent: #0ea5e9;
  --accent-dim: #f97316;
  --accent-soft: rgba(14, 165, 233, 0.12);
  --accent-glow: rgba(14, 165, 233, 0.16);
  --cta: #f97316;
  --cta-text: #f8fffc;
  --cta-hover: #fba86f;
  --focus: #0ea5e9;
  --ok-bg: rgba(14, 165, 233, 0.1);
  --ok-border: rgba(14, 165, 233, 0.28);
  --danger-bg: rgba(248, 113, 113, 0.10);
  --warn-bg: rgba(251, 191, 36, 0.10);
  --shadow: 0 10px 30px rgba(0,0,0,0.40);
}

[data-theme="midnight-indigo"][data-scheme="dark"] {
  color-scheme: dark;
  --bg: #0e1117;
  --bg-sidebar: #151923;
  --bg-elev: #212635;
  --bg-card: #1b202d;
  --bg-hover: #2e354c;
  --bg-input: #12161e;
  --input: #252c3d;
  --input-hover: #323a53;
  --input-border: #4a547e;
  --ring: rgba(129, 140, 248, 0.28);
  --border: #3d4567;
  --border-strong: #535d8c;
  --border-soft: rgba(167, 139, 250, 0.1);
  --text: #eef2f1;
  --text-soft: #c8d4d0;
  --muted: #8a9692;
  --muted-2: #7d8a85;
  --brand: #818cf8;
  --brand-2: #a78bfa;
  --accent: #818cf8;
  --accent-dim: #a78bfa;
  --accent-soft: rgba(129, 140, 248, 0.12);
  --accent-glow: rgba(129, 140, 248, 0.16);
  --cta: #a5b4fc;
  --cta-text: #0a1210;
  --cta-hover: #c7d0fd;
  --focus: #818cf8;
  --ok-bg: rgba(129, 140, 248, 0.1);
  --ok-border: rgba(129, 140, 248, 0.28);
  --danger-bg: rgba(248, 113, 113, 0.10);
  --warn-bg: rgba(251, 191, 36, 0.10);
  --shadow: 0 10px 30px rgba(0,0,0,0.40);
}

[data-theme="midnight-indigo"][data-scheme="light"] {
  color-scheme: light;
  --bg: #f7f8f8;
  --bg-sidebar: #eef0f0;
  --bg-elev: #ffffff;
  --bg-card: #ffffff;
  --bg-hover: #e8eaeb;
  --bg-input: #f1f3f3;
  --input: #ffffff;
  --input-hover: #fafafa;
  --input-border: #d1d5d4;
  --ring: rgba(74, 84, 149, 0.22);
  --border: #e2e5e4;
  --border-strong: #c5c9c8;
  --border-soft: rgba(129, 140, 248, 0.06);
  --text: #111827;
  --text-soft: #374151;
  --muted: #6b7280;
  --muted-2: #9ca3af;
  --brand: #818cf8;
  --brand-2: #a78bfa;
  --accent: #4a5495;
  --accent-dim: #675aa3;
  --accent-soft: rgba(74, 84, 149, 0.09);
  --accent-glow: rgba(74, 84, 149, 0.12);
  --cta: #816ec6;
  --cta-text: #ffffff;
  --cta-hover: #a79ad7;
  --focus: #4a5495;
  --ok-bg: rgba(74, 84, 149, 0.08);
  --ok-border: rgba(74, 84, 149, 0.2);
  --danger-bg: rgba(220, 38, 38, 0.08);
  --warn-bg: rgba(217, 119, 6, 0.10);
  --shadow: 0 1px 2px rgba(15,23,20,0.04), 0 8px 24px rgba(15,23,20,0.05);
}

[data-theme="midnight-indigo"]:not([data-scheme]) {
  color-scheme: dark;
  --bg: #0e1117;
  --bg-sidebar: #151923;
  --bg-elev: #212635;
  --bg-card: #1b202d;
  --bg-hover: #2e354c;
  --bg-input: #12161e;
  --input: #252c3d;
  --input-hover: #323a53;
  --input-border: #4a547e;
  --ring: rgba(129, 140, 248, 0.28);
  --border: #3d4567;
  --border-strong: #535d8c;
  --border-soft: rgba(167, 139, 250, 0.1);
  --text: #eef2f1;
  --text-soft: #c8d4d0;
  --muted: #8a9692;
  --muted-2: #7d8a85;
  --brand: #818cf8;
  --brand-2: #a78bfa;
  --accent: #818cf8;
  --accent-dim: #a78bfa;
  --accent-soft: rgba(129, 140, 248, 0.12);
  --accent-glow: rgba(129, 140, 248, 0.16);
  --cta: #a5b4fc;
  --cta-text: #0a1210;
  --cta-hover: #c7d0fd;
  --focus: #818cf8;
  --ok-bg: rgba(129, 140, 248, 0.1);
  --ok-border: rgba(129, 140, 248, 0.28);
  --danger-bg: rgba(248, 113, 113, 0.10);
  --warn-bg: rgba(251, 191, 36, 0.10);
  --shadow: 0 10px 30px rgba(0,0,0,0.40);
}

[data-theme="arctic-ice"][data-scheme="dark"] {
  color-scheme: dark;
  --bg: #0a1317;
  --bg-sidebar: #101d23;
  --bg-elev: #182c35;
  --bg-card: #14252d;
  --bg-hover: #213e4c;
  --bg-input: #0d191e;
  --input: #1b333d;
  --input-hover: #234453;
  --input-border: #30657e;
  --ring: rgba(56, 189, 248, 0.28);
  --border: #285367;
  --border-strong: #36718c;
  --border-soft: rgba(14, 165, 233, 0.1);
  --text: #eef2f1;
  --text-soft: #c8d4d0;
  --muted: #8a9692;
  --muted-2: #7d8a85;
  --brand: #38bdf8;
  --brand-2: #0ea5e9;
  --accent: #38bdf8;
  --accent-dim: #0ea5e9;
  --accent-soft: rgba(56, 189, 248, 0.12);
  --accent-glow: rgba(56, 189, 248, 0.16);
  --cta: #7dd3fc;
  --cta-text: #0a1210;
  --cta-hover: #aee4fd;
  --focus: #38bdf8;
  --ok-bg: rgba(56, 189, 248, 0.1);
  --ok-border: rgba(56, 189, 248, 0.28);
  --danger-bg: rgba(248, 113, 113, 0.10);
  --warn-bg: rgba(251, 191, 36, 0.10);
  --shadow: 0 10px 30px rgba(0,0,0,0.40);
}

[data-theme="arctic-ice"][data-scheme="light"] {
  color-scheme: light;
  --bg: #f7f8f8;
  --bg-sidebar: #eef0f0;
  --bg-elev: #ffffff;
  --bg-card: #ffffff;
  --bg-hover: #e8eaeb;
  --bg-input: #f1f3f3;
  --input: #ffffff;
  --input-hover: #fafafa;
  --input-border: #d1d5d4;
  --ring: rgba(36, 109, 149, 0.22);
  --border: #e2e5e4;
  --border-strong: #c5c9c8;
  --border-soft: rgba(56, 189, 248, 0.06);
  --text: #111827;
  --text-soft: #374151;
  --muted: #6b7280;
  --muted-2: #9ca3af;
  --brand: #38bdf8;
  --brand-2: #0ea5e9;
  --accent: #246d95;
  --accent-dim: #0e6999;
  --accent-soft: rgba(36, 109, 149, 0.09);
  --accent-glow: rgba(36, 109, 149, 0.12);
  --cta: #0ea5e9;
  --cta-text: #ffffff;
  --cta-hover: #56c0f0;
  --focus: #246d95;
  --ok-bg: rgba(36, 109, 149, 0.08);
  --ok-border: rgba(36, 109, 149, 0.2);
  --danger-bg: rgba(220, 38, 38, 0.08);
  --warn-bg: rgba(217, 119, 6, 0.10);
  --shadow: 0 1px 2px rgba(15,23,20,0.04), 0 8px 24px rgba(15,23,20,0.05);
}

[data-theme="arctic-ice"]:not([data-scheme]) {
  color-scheme: dark;
  --bg: #0a1317;
  --bg-sidebar: #101d23;
  --bg-elev: #182c35;
  --bg-card: #14252d;
  --bg-hover: #213e4c;
  --bg-input: #0d191e;
  --input: #1b333d;
  --input-hover: #234453;
  --input-border: #30657e;
  --ring: rgba(56, 189, 248, 0.28);
  --border: #285367;
  --border-strong: #36718c;
  --border-soft: rgba(14, 165, 233, 0.1);
  --text: #eef2f1;
  --text-soft: #c8d4d0;
  --muted: #8a9692;
  --muted-2: #7d8a85;
  --brand: #38bdf8;
  --brand-2: #0ea5e9;
  --accent: #38bdf8;
  --accent-dim: #0ea5e9;
  --accent-soft: rgba(56, 189, 248, 0.12);
  --accent-glow: rgba(56, 189, 248, 0.16);
  --cta: #7dd3fc;
  --cta-text: #0a1210;
  --cta-hover: #aee4fd;
  --focus: #38bdf8;
  --ok-bg: rgba(56, 189, 248, 0.1);
  --ok-border: rgba(56, 189, 248, 0.28);
  --danger-bg: rgba(248, 113, 113, 0.10);
  --warn-bg: rgba(251, 191, 36, 0.10);
  --shadow: 0 10px 30px rgba(0,0,0,0.40);
}

/* Brand row + settings cog */
.brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  padding-right: 0.15rem;
}

.brand-row .brand {
  flex: 1;
  min-width: 0;
  padding-right: 0;
}

/* Keep gear aligned with the icon+title line, not the tagline. */
.brand-row .icon-btn {
  align-self: flex-start;
  margin-top: 0.15rem;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem; /* 32px hit target */
  height: 2rem;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 3px;
  background: transparent;
  color: var(--muted);
  flex-shrink: 0;
  line-height: 0;
  transition: color 120ms ease, background 120ms ease, border-color 120ms ease;
}

.icon-btn:hover {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: var(--border);
}

.icon-btn.active {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: color-mix(in srgb, var(--accent) 22%, transparent);
}

.icon-btn svg,
.icon-btn .settings-glyph {
  width: 18px;
  height: 18px;
  display: block;
  flex-shrink: 0;
}

/* Settings / theme panel */
.settings-panel {
  max-width: 52rem;
  margin: 0;
  padding: 0.25rem 0.15rem 2.5rem;
}

.settings-panel h3 {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.settings-panel .settings-lead {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.88rem;
  max-width: 40rem;
}

.theme-family {
  margin: 0 0 1.15rem;
}

.theme-family-label {
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin: 0 0 0.45rem;
}

.theme-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(11.5rem, 1fr));
  gap: 0.55rem;
}

.theme-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.45rem;
  text-align: left;
  padding: 0.65rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: var(--bg-card);
  color: var(--text);
  cursor: pointer;
  transition: border-color 120ms ease, background 120ms ease, box-shadow 120ms ease;
}

.theme-card:hover {
  background: var(--bg-hover);
  border-color: var(--border-strong);
}

.theme-card.active {
  border-color: var(--accent-dim);
  box-shadow: 0 0 0 1px var(--accent-dim);
  background: var(--bg-elev);
}

.theme-swatches {
  display: flex;
  gap: 0.3rem;
  height: 1.35rem;
}

.theme-swatches span {
  flex: 1;
  min-width: 0;
  border-radius: 3px;
  border: 1px solid color-mix(in srgb, var(--text) 12%, transparent);
}

.theme-card-name {
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1.25;
}

.theme-card-family {
  font-size: 0.68rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}


.settings-token {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  max-width: 28rem;
  margin: 0 0 1.5rem;
  padding: 0.85rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: var(--bg-card);
}

.settings-token label {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  font-size: 0.68rem;
  font-weight: 650;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.settings-token .token-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.settings-panel h3 + .settings-lead + .settings-token + h3,
.settings-panel .settings-token + h3 {
  margin-top: 0.35rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border);
}

/* Mode toggle (segmented) */
.scheme-toggle {
  display: inline-flex;
  padding: 0.2rem;
  gap: 0.15rem;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: var(--bg-input);
  margin: 0 0 1.15rem;
}

.scheme-toggle button {
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  border-radius: 3px;
  padding: 0.4rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease, border-color 120ms ease;
}

.scheme-toggle button:hover {
  color: var(--text);
  background: var(--bg-hover);
}

.scheme-toggle button.active {
  background: var(--cta);
  color: var(--cta-text);
  border-color: transparent;
}

.scheme-toggle button.active:hover {
  background: var(--cta-hover);
  color: var(--cta-text);
}


/* ─── Dismissible banner + filters toggle (all widths) ───────── */

.banner-dismissible {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
}

.banner-dismissible .banner-text {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}

.banner-dismiss {
  flex: 0 0 auto;
  width: 1.75rem;
  height: 1.75rem;
  margin: -0.2rem -0.3rem -0.2rem 0;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 3px;
  background: transparent;
  color: inherit;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}

.banner-dismiss:hover {
  background: color-mix(in srgb, currentColor 12%, transparent);
}

.banner-dismiss:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

/* Desktop: filters are always visible; the toggle is phone-only. */
.filters-toggle {
  display: none;
}

/* ─── Phones (< 640px) ───────────────────────────────────────── */

@media (max-width: 639.98px) {
  /* Sidebar becomes a compact sticky top bar: brand row + tab bar. */
  .sidebar {
    position: sticky;
    top: 0;
    height: auto;
    max-height: none;
    overflow: visible;
    gap: 0.4rem;
    padding: 0.45rem 0.6rem 0;
    z-index: 20;
  }

  .brand-row {
    padding-right: 0;
  }

  .brand {
    padding: 0;
  }

  .brand .sub {
    display: none;
  }

  .brand h1 {
    font-size: 1rem;
  }

  .brand-icon {
    width: 24px;
    height: 24px;
  }

  .brand-row .icon-btn {
    align-self: center;
    margin-top: 0;
  }

  .side-nav {
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 0;
    margin: 0 -0.6rem;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .side-nav::-webkit-scrollbar {
    display: none;
  }

  .nav-item {
    flex: 1 1 0;
    min-width: 0;
    width: auto;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.55rem 0.4rem;
    border: none;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    font-size: 0.85rem;
  }

  .nav-item.active {
    background: transparent;
    border-bottom-color: var(--accent);
  }

  .nav-item .nav-dot {
    display: none;
  }

  .directory,
  .sidebar-footer {
    display: none;
  }

  /* Keep problem states (auth required, unavailable) visible; hide routine ones. */
  .health-pill.health-healthy,
  .health-pill.health-checking,
  .health-pill-detail {
    display: none;
  }

  /* Main header scrolls away; only the tab bar stays pinned. */
  .main-header {
    position: static;
    min-height: 0;
    gap: 0.5rem;
    padding: 0.6rem 0.75rem;
  }

  .page-title .page-sub {
    display: none;
  }

  /* One compact row: title left, icon actions right. */
  .main-header {
    position: relative;
    flex-wrap: nowrap;
    align-items: center;
    min-height: 48px;
    padding: 6px 0.75rem;
  }

  .main-header .page-title {
    flex: 1 1 auto;
    min-width: 0;
  }

  .main-header .page-title h2 {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .main-header .header-actions {
    display: flex;
    flex: 0 0 auto;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    width: auto;
  }

  /* Filters collapse behind a toggle. */
  .filters-toggle {
    display: inline-flex;
    align-self: flex-start;
    margin: 0.5rem 0.75rem 0;
  }

  .view-toolbar {
    display: none;
    padding: 0.5rem 0.75rem 0.35rem;
  }

  .view-toolbar.is-open {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }

  .view-toolbar label > select,
  .view-toolbar label > input:not([type="checkbox"]):not([type="radio"]) {
    width: 100%;
    min-width: 0;
  }

  /* Kanban: one swipeable column at a time. */
  .main {
    padding: 0.5rem 0.75rem 1.25rem;
  }

  .board {
    display: flex;
    margin: 0 -0.75rem;
    grid-template-columns: none;
    gap: 0.6rem;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-padding: 0 0.75rem;
    padding: 0 0.75rem 0.5rem;
    -webkit-overflow-scrolling: touch;
  }

  .board > .column {
    flex: 0 0 85vw;
    max-width: 85vw;
    scroll-snap-align: start;
  }

  /* Compact error banner. */
  .banner {
    margin: 0.5rem 0.75rem 0;
    padding: 0.45rem 0.6rem;
    font-size: 0.85rem;
  }
}


/* ── Sign-in splash (hosted, signed out) ─────────────────────────────── */
.login-splash {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 24px;
  background:
    radial-gradient(900px 520px at 50% 40%, rgba(120, 220, 180, 0.08), transparent 70%),
    var(--bg, #121311);
  color: var(--text, #e8e6df);
}
.login-map {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.login-map .map-grid { fill: none; stroke: rgba(179, 240, 214, 0.05); stroke-width: 1; }
.login-map .map-contours path { fill: none; stroke: rgba(179, 240, 214, 0.08); stroke-width: 1.2; }
.login-map .map-compass { fill: none; stroke: rgba(179, 240, 214, 0.18); stroke-width: 1; }
.login-map .map-compass .needle { fill: rgba(179, 240, 214, 0.14); }
.login-map .map-compass text { fill: rgba(179, 240, 214, 0.35); stroke: none; font: 600 14px system-ui, sans-serif; }
.login-map .map-route {
  fill: none;
  stroke: rgba(179, 240, 214, 0.32);
  stroke-width: 2;
  stroke-dasharray: 8 10;
  stroke-linecap: round;
}
.login-map .pin {
  fill: #b3f0d6;
  opacity: 0.55;
  filter: drop-shadow(0 0 6px rgba(179, 240, 214, 0.8));
  transform-box: fill-box;
  transform-origin: center;
}
.login-map .pin.dest { fill: #e6fff4; opacity: 0.85; }
.login-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  max-width: 420px;
  animation: login-fade 700ms ease-out both;
}
.login-logo {
  width: 128px;
  height: 128px;
  border-radius: 28px;
  box-shadow: 0 0 0 1px rgba(179, 240, 214, 0.15), 0 18px 60px rgba(60, 200, 150, 0.25);
  margin-bottom: 8px;
}
.login-title {
  margin: 0;
  font: 800 clamp(3rem, 11vw, 5.5rem) / 1.15 system-ui, -apple-system, "Segoe UI", sans-serif;
  letter-spacing: -0.03em;
  /* background-clip: text only paints inside the box; leave room for descenders. */
  padding: 0 0.04em 0.14em;
  margin-bottom: -0.14em;
  background: linear-gradient(180deg, #f2fff9 0%, #b3f0d6 55%, #5fbf98 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 18px rgba(120, 220, 180, 0.28));
}
.login-tagline {
  margin: 0 0 18px;
  font-size: 0.85rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: rgba(232, 230, 223, 0.6);
}
.login-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  font-size: 1rem;
  min-height: 44px;
}
.login-btn .ms-mark { width: 18px; height: 18px; }
.login-error { margin: 6px 0 0; color: #f0a39a; font-size: 0.9rem; }
@keyframes login-fade { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes login-route { from { stroke-dashoffset: 360; } to { stroke-dashoffset: 0; } }
@keyframes login-pulse { 0%, 100% { transform: scale(1); opacity: 0.55; } 50% { transform: scale(1.5); opacity: 0.9; } }
@media (prefers-reduced-motion: no-preference) {
  .login-map .map-route { animation: login-route 18s linear infinite; }
  .login-map .pin { animation: login-pulse 3.2s ease-in-out infinite; }
  .login-map .pin:nth-child(2) { animation-delay: 0.6s; }
  .login-map .pin:nth-child(3) { animation-delay: 1.2s; }
  .login-map .pin:nth-child(4) { animation-delay: 1.8s; }
  .login-map .pin.dest { animation-delay: 2.4s; }
}
@media (prefers-reduced-motion: reduce) {
  .login-card { animation: none; }
}
@media (max-width: 640px) {
  .login-logo { width: 96px; height: 96px; border-radius: 22px; }
  .login-tagline { letter-spacing: 0.24em; }
  .login-btn { width: 100%; justify-content: center; }
  .login-card { width: 100%; max-width: 340px; }
  .login-map .map-compass { display: none; }
}

/* ── Header rail: search, actions, account chip ──────────────────────── */
.main-header { flex-wrap: nowrap; gap: 1rem; }
.main-header .page-title { min-width: 0; }
.main-header .header-actions {
  flex: 1 1 auto;
  flex-wrap: nowrap;
  justify-content: flex-end;
  gap: 0.5rem;
  min-width: 0;
}
.main-header .header-actions > * { flex: 0 0 auto; }
.quick-jump-wrap {
  position: relative;
  display: flex;
  align-items: center;
  flex: 0 1 22rem !important;
  min-width: 10rem;
  height: 36px;
}
.quick-jump-wrap .qj-icon {
  position: absolute;
  left: 0.7rem;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: var(--muted);
  stroke-width: 1.8;
  stroke-linecap: round;
  pointer-events: none;
}
.main-header .quick-jump-wrap input.quick-jump {
  flex: 1 1 auto;
  width: 100%;
  max-width: none;
  min-width: 0;
  height: 36px;
  padding: 0 2.2rem 0 2.1rem !important;
  border-radius: var(--radius-pill);
}
.main-header .quick-jump:focus { border-color: color-mix(in srgb, var(--accent) 55%, transparent); box-shadow: 0 0 0 3px var(--accent-glow); }
.qj-hint {
  position: absolute;
  right: 0.55rem;
  min-width: 1.25rem;
  padding: 0 0.3rem;
  font: 600 0.72rem/1.25rem ui-monospace, SFMono-Regular, Menlo, monospace;
  text-align: center;
  color: var(--muted);
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  pointer-events: none;
}
.quick-jump:focus + .qj-hint, .quick-jump:not(:placeholder-shown) + .qj-hint { display: none; }
.main-header .btn { height: 36px; padding: 0 0.95rem; display: inline-flex; align-items: center; }
.new-ticket { gap: 0.4rem; white-space: nowrap; }
.btn-icon, .header-icon svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.header-icon { width: 36px; height: 36px; border-radius: var(--radius-pill); border-color: var(--border); }
.qj-toggle { display: none; }

.account { position: relative; }
.account-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  height: 36px;
  max-width: 11rem;
  padding: 0 0.6rem 0 3px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--bg-elev);
  color: var(--text-soft);
  cursor: pointer;
}
.account-chip:hover, .account-chip.open { border-color: var(--border-strong); color: var(--text); }
.avatar {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border-radius: 50%;
  font-size: 0.72rem;
  font-weight: 700;
  color: #0f2a20;
  background: linear-gradient(160deg, #d9fff0, #7fd3ad);
  box-shadow: 0 0 0 2px rgba(179, 240, 214, 0.15);
}
.avatar.lg { width: 36px; height: 36px; flex-basis: 36px; font-size: 0.85rem; }
.account-first { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.85rem; }
.account-chip .chev { width: 12px; height: 12px; flex: 0 0 12px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.account-scrim { position: fixed; inset: 0; z-index: 30; }
.account-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 31;
  min-width: 15rem;
  max-width: calc(100vw - 1.5rem);
  padding: 0.35rem;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: var(--bg-elev);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}
.account-id { display: flex; gap: 0.65rem; align-items: center; padding: 0.6rem 0.6rem 0.7rem; border-bottom: 1px solid var(--border); margin-bottom: 0.3rem; min-width: 0; }
.account-id > div { min-width: 0; }
.account-name { color: var(--text); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-email { color: var(--muted); font-size: 0.8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.5rem 0.6rem;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text-soft);
  cursor: pointer;
}
.account-item:hover { background: var(--bg-hover); color: var(--text); }

@media (max-width: 640px) {
  .main-header .header-actions { width: auto; }
  .main-header .header-actions .btn, .main-header .header-actions .quick-jump { flex: 0 0 auto; }
  .main-header .page-title .page-sub { display: none; }
  .quick-jump-wrap { display: none; }
  .main-header .quick-jump-wrap.open {
    display: flex;
    position: absolute;
    left: 0.75rem;
    right: 0.75rem;
    width: auto;
    background: var(--bg);
    border-radius: var(--radius-pill);
    box-shadow: 0 0 0 6px var(--bg);
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    min-width: 0;
  }
  .main-header .quick-jump-wrap.open input.quick-jump { width: 100%; background: var(--bg) !important; }
  .qj-hint { display: none; }
  .qj-toggle { display: inline-flex; }
  .new-ticket .btn-label { display: none; }
  .main-header .new-ticket { width: 36px; padding: 0; justify-content: center; }
  .account-first, .account-chip .chev { display: none; }
  .account-chip { padding: 0 3px; }
}

/* ── Splash map detail ──────────────────────────────────────────────── */
.login-map .map-land path { fill: rgba(179, 240, 214, 0.025); stroke: none; }
.login-map .map-shore path { fill: none; stroke: url(#login-hatch); stroke-width: 14; opacity: 0.6; }
.login-map .map-hatch { stroke: rgba(179, 240, 214, 0.12); stroke-width: 1; }
.login-map .map-contours path.major { stroke: rgba(179, 240, 214, 0.14); stroke-width: 1.6; }
.login-map .map-river { fill: none; stroke: rgba(120, 190, 230, 0.16); stroke-width: 2.2; stroke-linecap: round; }
.login-map text { font: 500 11px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: 0.08em; }
.login-map .map-elev text { fill: rgba(179, 240, 214, 0.22); font-size: 10px; }
.login-map .map-ticks path { stroke: rgba(179, 240, 214, 0.22); stroke-width: 1; }
.login-map .map-ticklabels text { fill: rgba(179, 240, 214, 0.18); font-size: 10px; }
.login-map .map-route-ticks {
  fill: none;
  stroke: rgba(179, 240, 214, 0.18);
  stroke-width: 9;
  stroke-dasharray: 1.5 40;
}
.login-map .map-labels text { fill: rgba(179, 240, 214, 0.42); }
.login-map .map-here circle { fill: rgba(240, 200, 140, 0.6); }
.login-map .map-here .ring { fill: none; stroke: rgba(240, 200, 140, 0.35); stroke-width: 1.2; transform-box: fill-box; transform-origin: center; }
.login-map .map-here text { fill: rgba(240, 200, 140, 0.45); font-size: 10px; }
.login-map .map-readout text { fill: rgba(179, 240, 214, 0.3); font-size: 11px; }
.login-map .map-scale rect { fill: none; stroke: rgba(179, 240, 214, 0.3); stroke-width: 1; }
.login-map .map-scale rect.fill { fill: rgba(179, 240, 214, 0.22); }
.login-map .map-scale text { fill: rgba(179, 240, 214, 0.3); font-size: 10px; }
.login-map .map-compass .inner { stroke-dasharray: 2 4; }
.login-map .map-compass .ticks { stroke: rgba(179, 240, 214, 0.22); }
.login-map .map-compass .rose-minor { fill: rgba(179, 240, 214, 0.06); stroke: rgba(179, 240, 214, 0.12); }
.login-map .map-compass .rose-dark { fill: rgba(179, 240, 214, 0.08); stroke: rgba(179, 240, 214, 0.2); }
.login-map .map-compass .rose-light { fill: rgba(179, 240, 214, 0.22); stroke: none; }
.login-map .map-compass text { font-size: 12px; }
@keyframes login-here { 0% { transform: scale(0.6); opacity: 0.6; } 100% { transform: scale(2.2); opacity: 0; } }
@media (prefers-reduced-motion: no-preference) {
  .login-map .map-here .ring { animation: login-here 2.8s ease-out infinite; }
}
@media (max-width: 640px) {
  .login-map .detail, .login-map .map-ticklabels, .login-map .map-elev, .login-map .map-scale { display: none; }
  .login-map .map-labels text { font-size: 12px; }
}

/* ── Field sizing: 36px controls that never clip their text ─────────── */
.ticket-modal .tm-rail input:not([type="checkbox"]):not([type="radio"]),
.ticket-modal .tm-rail select,
.view-toolbar input:not([type="checkbox"]):not([type="radio"]),
.view-toolbar select,
.filters input:not([type="checkbox"]):not([type="radio"]),
.filters select {
  height: 36px;
  min-height: 36px;
  padding-top: 0;
  padding-bottom: 0;
  line-height: 34px;
  font-size: 13px;
  vertical-align: middle;
}
.ticket-modal .tm-rail select,
.view-toolbar select,
.filters select {
  appearance: none;
  -webkit-appearance: none;
  padding-left: 12px;
  padding-right: 32px;
  text-overflow: ellipsis;
  white-space: nowrap;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236e827a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='M6 9l6 6 6-6'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 14px;
}
.ticket-modal .tm-rail select:hover:not(:disabled),
.ticket-modal .tm-rail select:focus {
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d0ddd8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='M6 9l6 6 6-6'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 14px;
}

/* Phone rail: account chip is just the avatar circle. */
@media (max-width: 640px) {
  .main-header .account-chip {
    width: 36px;
    padding: 0;
    justify-content: center;
    border-color: transparent;
    background: transparent;
  }
  .main-header .account-chip:hover,
  .main-header .account-chip.open {
    border-color: transparent;
    background: transparent;
  }
  .main-header .account-chip .avatar { width: 32px; height: 32px; flex-basis: 32px; }
  /* Phone order: search, refresh, new ticket, account. */
  .main-header .header-actions .qj-toggle { order: 1; }
  .main-header .header-actions .header-icon:not(.qj-toggle) { order: 2; }
  .main-header .header-actions .new-ticket { order: 3; }
  .main-header .header-actions .account { order: 4; }
  .main-header .header-actions .icon-btn,
  .main-header .header-actions .new-ticket {
    width: 36px;
    height: 36px;
  }
}

/* ── Principal names (friendly id + bot badge) ─────────────────────── */
.who { display: inline-flex; align-items: baseline; gap: 0.35em; min-width: 0; max-width: 100%; }
.who-name { overflow-wrap: anywhere; }
.who-bot {
  flex: 0 0 auto;
  padding: 0 0.4em;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  font-size: 0.72em;
  line-height: 1.5;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ── Stacked ticket detail (tablets and phones) ─────────────────────── */
/* One scroll area so the properties column is never squeezed to a band:
   edit rail first, then properties, comments and audit. */
@media (max-width: 860px) {
  .ticket-modal .drawer-body {
    flex-direction: column;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: env(safe-area-inset-bottom);
  }
  .ticket-modal .tm-main,
  .ticket-modal .tm-rail {
    flex: 0 0 auto;
    overflow: visible;
    min-height: auto;
  }
  .ticket-modal .tm-rail { order: -1; border-top: 0; border-bottom: 1px solid var(--border); }
}

/* ── Ticket detail as a full-screen sheet on phones ────────────────── */
@media (max-width: 640px) {
  .drawer-backdrop:has(.ticket-modal) {
    padding: 0;
    align-items: stretch;
  }
  .drawer.ticket-modal {
    width: 100vw;
    width: 100dvw;
    height: 100vh;
    height: 100dvh;
    max-height: 100vh;
    max-height: 100dvh;
    border: 0;
    border-radius: 0;
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
  }
  .ticket-modal .drawer-head {
    flex: 0 0 auto;
    position: sticky;
    top: 0;
    z-index: 2;
    gap: 8px;
    align-items: flex-start;
    padding: calc(10px + env(safe-area-inset-top)) 8px 10px 14px;
    background: var(--bg-elev);
    border-bottom: 1px solid var(--border);
  }
  .ticket-modal .tm-head-text { min-width: 0; flex: 1 1 auto; }
  .ticket-modal .tm-head-title-row { flex-wrap: wrap; gap: 6px 8px; }
  .ticket-modal .tm-title { overflow-wrap: anywhere; font-size: 15px; }
  .ticket-modal .tm-head-meta { overflow-wrap: anywhere; line-height: 1.5; }
  .ticket-modal .drawer-close {
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    font-size: 22px;
  }
  .ticket-modal .tm-main { padding: 14px; gap: 16px; }
  .ticket-modal .tm-rail {
    order: -1;
    width: 100%;
    padding: 14px;
    border-left: 0;
    border-top: 0;
    border-bottom: 1px solid var(--border);
  }
  /* Save lives in a footer pinned to the bottom of the sheet, so it stays
     reachable from properties, comments and the audit trail. */
  .ticket-modal .tm-save-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 3;
    padding: 10px calc(14px + env(safe-area-inset-right))
      calc(10px + env(safe-area-inset-bottom)) calc(14px + env(safe-area-inset-left));
    background: var(--bg-elev);
    border-top: 1px solid var(--border);
    box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.35);
  }
  .ticket-modal .tm-save-bar .tm-btn-primary {
    width: 100%;
    min-height: 44px;
  }
  .ticket-modal .drawer-body {
    padding-bottom: calc(76px + env(safe-area-inset-bottom));
  }
  .ticket-modal .tm-jump { display: none; }
  .ticket-modal .tm-props-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 14px;
  }
  .ticket-modal .tm-props-grid > div { min-width: 0; }
  .ticket-modal .tm-prop-v { overflow-wrap: anywhere; line-height: 1.4; }
  .ticket-modal .tm-meta-row { flex-direction: column; gap: 14px; }
}

/* ── Reviewer picker on phones ─────────────────────────────────────── */
/* Full-width, touch-sized select; the hint wraps under it. */
@media (max-width: 640px) {
  .ticket-modal .tm-field-reviewer select {
    width: 100%;
    min-height: 44px;
    font-size: 16px; /* no iOS zoom on focus */
  }
  .ticket-modal .tm-field-reviewer .tm-field-hint { overflow-wrap: anywhere; }
  .card-meta .chip-reviewer { max-width: 60vw; }
  /* Lease chip: keep the countdown readable on narrow cards and in the
     two-column property grid. */
  .card-meta .chip-lease { flex: 0 0 auto; }
  .ticket-modal .tm-prop-v .chip-lease { display: inline-block; margin-bottom: 2px; }
}

/* Triage: chip on board cards, drawer banner, and the queue view. */
.chip-triage {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-soft);
}

.banner-triage {
  margin: 0 0 8px;
}

.triage-toolbar {
  display: flex;
  gap: 6px;
  margin: 0 0 12px;
}

.triage-toolbar .seg {
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.triage-toolbar .seg.active {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

.triage-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.triage-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
}

.triage-open {
  display: flex;
  gap: 8px;
  align-items: baseline;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.triage-meta {
  margin: 6px 0;
  font-size: 12px;
  color: var(--muted);
}

.triage-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.triage-field {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
}

.triage-input {
  min-width: 0;
  flex: 1 1 160px;
  padding: 6px 8px;
}

.triage-input.narrow {
  flex: 0 1 90px;
}

/* Phones: one control per row, full-width touch targets. */
@media (max-width: 640px) {
  .triage-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .triage-actions .btn,
  .triage-input,
  .triage-input.narrow,
  .triage-field select {
    flex: 1 1 auto;
    width: 100%;
    min-height: 40px;
  }
}

/* Agent metrics: toolbar, sortable table, detail panel. */
.agents-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
}

.agents-table-wrap {
  overflow-x: auto;
}

.agents-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.agents-table th,
.agents-table td {
  padding: 6px 8px;
  border-bottom: 1px solid var(--border);
  text-align: right;
  white-space: nowrap;
}

.agents-table th:first-child,
.agents-table td:first-child {
  text-align: left;
}

.agents-table tbody tr {
  cursor: pointer;
}

.agents-table tbody tr:hover,
.agents-table tbody tr.selected {
  background: var(--accent-soft);
}

.th-sort {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  cursor: pointer;
}

.th-sort.active {
  color: var(--accent);
}

.agent-kind {
  margin-left: 6px;
}

.agent-detail {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  margin: 0 0 12px;
}

.agent-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.agent-detail-head h3 {
  margin: 0;
  font-size: 14px;
}

.agent-detail-body {
  margin: 6px 0;
  white-space: pre-wrap;
  font-size: 12px;
}

.agents-runtimes h3 {
  font-size: 13px;
  margin: 16px 0 6px;
}

.agents-runtimes ul {
  margin: 0;
  padding-left: 18px;
  font-size: 12px;
}

/* Phones: fewer columns (the detail panel has the rest), larger targets. */
@media (max-width: 640px) {
  .agents-table .col-opt {
    display: none;
  }

  .agents-table td,
  .agents-table th {
    padding: 10px 6px;
  }

  .agents-toolbar > * {
    flex: 1 1 100%;
  }

  .agents-toolbar select {
    width: 100%;
    min-height: 40px;
  }
}

/* Demo mode (demo.waypointtracking.app) */
.demo-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  background: var(--warn-bg);
  border-bottom: 1px solid var(--border);
}

.demo-banner-text {
  margin: 0;
  font-size: 14px;
  color: var(--text);
}

.demo-banner-cta {
  min-height: 44px;
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--cta);
  color: var(--cta-text);
  font-weight: 600;
  text-decoration: none;
}

.demo-mode .new-ticket[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}

@media (prefers-reduced-motion: reduce) {
  .app.reduced-motion .ticket-card {
    transition: none !important;
  }
}

@media (max-width: 640px) {
  .demo-banner {
    flex-direction: column;
    align-items: stretch;
  }

  .demo-banner-cta {
    text-align: center;
  }
}

/* ── Hosted identity: provider buttons, workspace gate, invite, members ── */
.login-providers {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  max-width: 300px;
}
.login-providers .login-btn { justify-content: center; }
.gate {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background: var(--bg);
}
.gate-card {
  width: 100%;
  max-width: 460px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-elev);
  box-shadow: var(--shadow);
}
.gate-title { margin: 0; font-size: 1.35rem; color: var(--text); }
.gate-text { margin: 0; color: var(--text-soft); line-height: 1.5; }
.gate-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.gate-item {
  width: 100%;
  min-height: 44px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-card);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}
.gate-item:hover:not(:disabled) { background: var(--bg-hover); }
.gate-item:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.gate-name { font-weight: 600; }
.gate-meta { color: var(--muted); font-size: 0.85rem; }
.gate-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.account-workspace {
  padding: 0.4rem 0.6rem;
  color: var(--muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--border-soft);
}
.members-modal {
  width: min(640px, 100%);
  height: auto;
  max-height: 90vh;
  overflow-y: auto;
  padding: 18px 20px;
  gap: 12px;
  border-radius: 12px;
}
.members-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.members-head h2 { margin: 0; font-size: 1.2rem; }
.members-invite h3 { margin: 8px 0; font-size: 1rem; }
.members-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.members-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: var(--bg-card);
}
.members-who { flex: 1 1 200px; min-width: 0; display: flex; flex-direction: column; }
.members-email { overflow-wrap: anywhere; color: var(--text); }
.members-since, .members-role { color: var(--muted); font-size: 0.85rem; }
.members-notice { margin: 0; color: var(--brand); }
.members-invite-form { display: grid; grid-template-columns: auto 1fr; gap: 8px 10px; align-items: center; }
.members-invite-form button { grid-column: 1 / -1; justify-self: start; }
.members-link { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; }
.members-link p { flex-basis: 100%; margin: 0; color: var(--text-soft); }
.members-link input { flex: 1 1 260px; min-width: 0; }
@media (max-width: 560px) {
  .members-modal { max-height: 100vh; border-radius: 0; padding: 14px 16px; }
  .members-invite-form { grid-template-columns: 1fr; }
}

/* ─── Workspace lifecycle (settings) ───────────────────────── */

.settings-panel.lifecycle {
  padding-top: 0;
}

.settings-panel.lifecycle h3 {
  margin-top: 1.1rem;
}

.lifecycle-form {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.45rem;
  margin: 0 0 1rem;
  max-width: 32rem;
}

.lifecycle-form label {
  font-size: 0.68rem;
  font-weight: 650;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.lifecycle-form input {
  width: 100%;
  box-sizing: border-box;
  min-height: 2.75rem;
}

.lifecycle-form .btn,
.lifecycle-banner .btn {
  min-height: 2.75rem;
}

.lifecycle-form .settings-lead {
  margin: 0;
}

.lifecycle-form code {
  overflow-wrap: anywhere;
}

.lifecycle-banner {
  align-items: center;
}

.lifecycle-error {
  margin: 0 0 0.75rem;
}

.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;
}

/* Backlog tree (UI flag "Backlog tree"; docs/FLAGS.md "UI flags"). */
.backlog {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  color: var(--text);
  font-family: var(--font);
}
.backlog details {
  border: 1px solid var(--border, currentColor);
  border-radius: 6px;
  padding: 6px 10px;
}
.backlog summary {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-weight: 600;
}
.backlog details details {
  margin-top: 6px;
  margin-left: 16px;
  font-weight: normal;
}
.backlog-story {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 4px 0 4px 16px;
  font-size: 0.9em;
}
.backlog-id {
  font-variant-numeric: tabular-nums;
  opacity: 0.7;
}
.backlog-title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.backlog-status {
  opacity: 0.7;
  font-size: 0.85em;
}
.backlog-progress {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85em;
}
.backlog-bar {
  display: inline-block;
  width: 96px;
  height: 8px;
  border-radius: 4px;
  background: var(--border, rgba(127, 127, 127, 0.25));
  overflow: hidden;
}
.backlog-fill {
  display: block;
  height: 100%;
  background: var(--accent);
}
.settings-flag {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Roadmap and PI board (UI flag "Roadmap and PI board"; docs/FLAGS.md "UI flags"). */
.roadmap,
.pi-board {
  padding: 16px;
  color: var(--text);
  font-family: var(--font);
  overflow-x: auto;
}
.roadmap-grid,
.pi-grid {
  border-collapse: collapse;
  min-width: 100%;
}
.roadmap-grid th,
.roadmap-grid td,
.pi-grid th,
.pi-grid td {
  border: 1px solid var(--border, rgba(127, 127, 127, 0.3));
  padding: 6px;
  vertical-align: top;
  text-align: left;
}
.roadmap-epic {
  width: 220px;
  font-weight: 600;
}
.roadmap-cell,
.pi-cell {
  min-width: 160px;
  min-height: 48px;
}
.pi-layout {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.pi-rail {
  width: 240px;
  flex-shrink: 0;
}
.pi-rail-drop {
  min-height: 80px;
  border: 1px dashed var(--border, rgba(127, 127, 127, 0.4));
  border-radius: 6px;
  padding: 6px;
}
.pi-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 4px 0;
  padding: 6px;
  border: 1px solid var(--border, rgba(127, 127, 127, 0.3));
  border-radius: 6px;
  cursor: grab;
  font-size: 0.9em;
}
.pi-card .backlog-title {
  flex: 1 1 120px;
}
.pi-deps {
  font-size: 0.85em;
  opacity: 0.8;
}
.pi-late {
  display: inline-block;
  margin-top: 2px;
  padding: 1px 6px;
  border-radius: 4px;
  background: #c62828;
  color: #fff;
  font-size: 0.8em;
}
.pi-stories {
  display: block;
  margin-top: 4px;
  font-size: 0.8em;
  opacity: 0.7;
}
.pi-picker {
  margin-bottom: 12px;
}
/* ─── Readability: light and medium schemes ─────────────────────────────
 * Status and semantic colors above are tuned for dark surfaces. Light and
 * medium need darker ink to reach WCAG AA (4.5:1) on their own surfaces.
 * `html[...]` outranks the per-theme blocks, which set the same tokens.
 */
html[data-theme][data-scheme="light"] {
  --muted-2: #6b7280;
  --danger-text: #b91c1c;
  --danger-border: rgba(185, 28, 28, 0.35);
  --danger-bg: rgba(220, 38, 38, 0.07);
  --danger-solid: #b91c1c;
  --danger-solid-text: #ffffff;
  --danger-solid-border: #991b1b;
  --warn-text: #92400e;
  --warn-border: rgba(180, 83, 9, 0.35);
  --todo: #0369a1;
  --in-progress: #a16207;
  --blocked: #b91c1c;
  --review: #7e22ce;
  --peer-review: #0f766e;
  --deploying: #a16207;
  --done: #15803d;
  --wontfix: #57534e;
  --p0: #c2410c;
  --p1: #0369a1;
  --p2: #475569;
  --p3: #5b6472;
}

/* Medium: warm-gray surfaces, muted ink, softer borders; no bright white. */
html[data-theme][data-scheme="light"][data-tone="medium"] {
  --bg: #dcd9d3;
  --bg-sidebar: #d4d1ca;
  --bg-elev: #e6e4df;
  --bg-card: #e8e6e1;
  --bg-hover: #cfccc5;
  --bg-input: #e1dfd9;
  --input: #e8e6e1;
  --input-hover: #ecebe7;
  --input-border: #a8a398;
  --border: #c4bfb6;
  --border-strong: #aaa59b;
  --border-soft: rgba(47, 51, 56, 0.06);
  --text: #2f3338;
  --text-soft: #3e434a;
  --muted: #545a61;
  --muted-2: #51565d;
  --danger-text: #991b1b;
  --danger-border: rgba(153, 27, 27, 0.32);
  --danger-bg: rgba(185, 28, 28, 0.08);
  --danger-solid: #a51d1d;
  --danger-solid-text: #fbefec;
  --danger-solid-border: #8a1a1a;
  --warn-text: #7c3a0a;
  --warn-border: rgba(146, 64, 14, 0.32);
  --warn-bg: rgba(180, 83, 9, 0.09);
  --shadow: 0 1px 2px rgba(40, 36, 30, 0.06), 0 8px 20px rgba(40, 36, 30, 0.07);
  --todo: #035988;
  --in-progress: #7a4a05;
  --blocked: #a71919;
  --review: #7921c5;
  --peer-review: #0c5f59;
  --deploying: #7a4a05;
  --done: #10612e;
  --wontfix: #57534e;
  --p0: #9c340a;
  --p1: #035988;
  --p2: #475569;
  --p3: #4d5561;
}
/* Light: accents and buttons darkened where they fell short of AA. */
[data-theme="forest-mint"][data-scheme="light"]:not([data-tone]) { --accent: #337a77; --focus: #337a77; --cta: #1e847b; --cta-hover: #1a736c; }
[data-theme="mono-mint"][data-scheme="light"]:not([data-tone]) { --accent: #337a77; --focus: #337a77; --cta: #1e847b; --cta-hover: #1a736c; }
[data-theme="analog-aqua"][data-scheme="light"]:not([data-tone]) { --cta: #077e97; --cta-hover: #067288; }
[data-theme="analog-lime"][data-scheme="light"]:not([data-tone]) { --accent: #577c2d; --focus: #577c2d; --cta: #538016; --cta-hover: #4b7314; }
[data-theme="analog-azure"][data-scheme="light"]:not([data-tone]) { --cta: #0b7caf; --cta-hover: #0a6e9c; }
[data-theme="analog-jade"][data-scheme="light"]:not([data-tone]) { --cta: #0e8261; --cta-hover: #0d7457; }
[data-theme="comp-coral"][data-scheme="light"]:not([data-tone]) { --cta: #bd5368; --cta-hover: #ae4358; }
[data-theme="comp-amber"][data-scheme="light"]:not([data-tone]) { --cta: #a06a10; --cta-hover: #8d5e0e; }
[data-theme="comp-rose"][data-scheme="light"]:not([data-tone]) { --cta: #e0177a; --cta-hover: #c9156d; }
[data-theme="split-warm"][data-scheme="light"]:not([data-tone]) { --cta: #c35305; --cta-hover: #aa4804; }
[data-theme="split-violet"][data-scheme="light"]:not([data-tone]) { --cta: #9e42f6; --cta-hover: #8f25f5; }
[data-theme="triad-gold"][data-scheme="light"]:not([data-tone]) { --cta: #c513df; --cta-hover: #b011c8; }
[data-theme="triad-lime"][data-scheme="light"]:not([data-tone]) { --cta: #e80d33; --cta-hover: #d00c2e; }
[data-theme="tetra-aurora"][data-scheme="light"]:not([data-tone]) { --cta: #a94dbe; --cta-hover: #9c41b1; }
[data-theme="tetra-ember"][data-scheme="light"]:not([data-tone]) { --cta: #c35305; --cta-hover: #aa4804; }
[data-theme="midnight-indigo"][data-scheme="light"]:not([data-tone]) { --cta: #7b67c3; --cta-hover: #6e58bd; }
[data-theme="arctic-ice"][data-scheme="light"]:not([data-tone]) { --cta: #0b7caf; --cta-hover: #0a6e9c; }

/* Medium: per-theme accents tuned for the warm-gray surfaces. */
[data-theme="forest-mint"][data-scheme="light"][data-tone="medium"] { --accent: #275e5b; --focus: #275e5b; --cta: #1d8077; --cta-hover: #1a746b; --cta-text: #fbfaf7; --accent-soft: color-mix(in srgb, #275e5b 10%, transparent); }
[data-theme="mono-mint"][data-scheme="light"][data-tone="medium"] { --accent: #275e5b; --focus: #275e5b; --cta: #1d8077; --cta-hover: #1a746b; --cta-text: #fbfaf7; --accent-soft: color-mix(in srgb, #275e5b 10%, transparent); }
[data-theme="mono-slate"][data-scheme="light"][data-tone="medium"] { --accent: #4b5668; --focus: #4b5668; --cta: #64748b; --cta-hover: #5b6a7f; --cta-text: #fbfaf7; --accent-soft: color-mix(in srgb, #4b5668 10%, transparent); }
[data-theme="mono-sand"][data-scheme="light"][data-tone="medium"] { --accent: #5c5449; --focus: #5c5449; --cta: #806e4f; --cta-hover: #776649; --cta-text: #fbfaf7; --accent-soft: color-mix(in srgb, #5c5449 10%, transparent); }
[data-theme="mono-ink"][data-scheme="light"][data-tone="medium"] { --accent: #525562; --focus: #525562; --cta: #71717a; --cta-hover: #67676f; --cta-text: #fbfaf7; --accent-soft: color-mix(in srgb, #525562 10%, transparent); }
[data-theme="analog-aqua"][data-scheme="light"][data-tone="medium"] { --accent: #145f72; --focus: #145f72; --cta: #077e97; --cta-hover: #067288; --cta-text: #fbfaf7; --accent-soft: color-mix(in srgb, #145f72 10%, transparent); }
[data-theme="analog-lime"][data-scheme="light"][data-tone="medium"] { --accent: #425e22; --focus: #425e22; --cta: #538016; --cta-hover: #4b7314; --cta-text: #fbfaf7; --accent-soft: color-mix(in srgb, #425e22 10%, transparent); }
[data-theme="analog-azure"][data-scheme="light"][data-tone="medium"] { --accent: #1e5b7c; --focus: #1e5b7c; --cta: #0a79aa; --cta-hover: #096f9c; --cta-text: #fbfaf7; --accent-soft: color-mix(in srgb, #1e5b7c 10%, transparent); }
[data-theme="analog-jade"][data-scheme="light"][data-tone="medium"] { --accent: #1b6150; --focus: #1b6150; --cta: #0e8261; --cta-hover: #0d7457; --cta-text: #fbfaf7; --accent-soft: color-mix(in srgb, #1b6150 10%, transparent); }
[data-theme="comp-coral"][data-scheme="light"][data-tone="medium"] { --accent: #185d5b; --focus: #185d5b; --cta: #bc4f64; --cta-hover: #af4357; --cta-text: #fbfaf7; --accent-soft: color-mix(in srgb, #185d5b 10%, transparent); }
[data-theme="comp-amber"][data-scheme="light"][data-tone="medium"] { --accent: #145f72; --focus: #145f72; --cta: #9c6710; --cta-hover: #8e5e0f; --cta-text: #fbfaf7; --accent-soft: color-mix(in srgb, #145f72 10%, transparent); }
[data-theme="comp-rose"][data-scheme="light"][data-tone="medium"] { --accent: #105e5d; --focus: #105e5d; --cta: #db1778; --cta-hover: #c9156e; --cta-text: #fbfaf7; --accent-soft: color-mix(in srgb, #105e5d 10%, transparent); }
[data-theme="split-warm"][data-scheme="light"][data-tone="medium"] { --accent: #105e5d; --focus: #105e5d; --cta: #be5105; --cta-hover: #aa4904; --cta-text: #fbfaf7; --accent-soft: color-mix(in srgb, #105e5d 10%, transparent); }
[data-theme="split-violet"][data-scheme="light"][data-tone="medium"] { --accent: #105e5d; --focus: #105e5d; --cta: #9c3df6; --cta-hover: #9025f5; --cta-text: #fbfaf7; --accent-soft: color-mix(in srgb, #105e5d 10%, transparent); }
[data-theme="triad-gold"][data-scheme="light"][data-tone="medium"] { --accent: #105e5d; --focus: #105e5d; --cta: #c113db; --cta-hover: #b011c8; --cta-text: #fbfaf7; --accent-soft: color-mix(in srgb, #105e5d 10%, transparent); }
[data-theme="triad-lime"][data-scheme="light"][data-tone="medium"] { --accent: #095e74; --focus: #095e74; --cta: #e40d32; --cta-hover: #d10c2e; --cta-text: #fbfaf7; --accent-soft: color-mix(in srgb, #095e74 10%, transparent); }
[data-theme="tetra-aurora"][data-scheme="light"][data-tone="medium"] { --accent: #105e5d; --focus: #105e5d; --cta: #a74abd; --cta-hover: #9c41b2; --cta-text: #fbfaf7; --accent-soft: color-mix(in srgb, #105e5d 10%, transparent); }
[data-theme="tetra-ember"][data-scheme="light"][data-tone="medium"] { --accent: #0d5b84; --focus: #0d5b84; --cta: #be5105; --cta-hover: #aa4904; --cta-text: #fbfaf7; --accent-soft: color-mix(in srgb, #0d5b84 10%, transparent); }
[data-theme="midnight-indigo"][data-scheme="light"][data-tone="medium"] { --accent: #485292; --focus: #485292; --cta: #7763c2; --cta-hover: #6d58be; --cta-text: #fbfaf7; --accent-soft: color-mix(in srgb, #485292 10%, transparent); }
[data-theme="arctic-ice"][data-scheme="light"][data-tone="medium"] { --accent: #1e5b7c; --focus: #1e5b7c; --cta: #0a79aa; --cta-hover: #096f9c; --cta-text: #fbfaf7; --accent-soft: color-mix(in srgb, #1e5b7c 10%, transparent); }

/* Dark: bright primary buttons take dark ink (white on them fell short of AA). */
[data-theme="comp-rose"]:not([data-scheme="light"]),
[data-theme="split-violet"]:not([data-scheme="light"]),
[data-theme="split-warm"]:not([data-scheme="light"]),
[data-theme="tetra-ember"]:not([data-scheme="light"]) { --cta-text: #0a1210; }

/* ─── AA floor ──────────────────────────────────────────────────────────
 * Per-theme token nudges so every text token reaches 5.2:1 (the WCAG AA floor
 * is 4.5:1; the extra room covers dialog surfaces and tinted states), the focus
 * and input-border tokens 3:1, and CTA ink 4.5:1 on its fill (hover ink included),
 * on every surface token in dark, light and medium. Enforced by
 * tests/browser/contrast.spec.ts. Only failing tokens are listed; hue and
 * saturation are kept, lightness moves just far enough.
 */
html:root[data-theme="forest-mint"][data-scheme="dark"] { --muted: #b3bbb8; --muted-2: #b3bbb8; --todo: #4fc5f9; --blocked: #faa2a2; --review: #d2a7fd; --wontfix: #b1bcb8; --p0: #fca55e; --p1: #4fc5f9; --p2: #afbaca; --p3: #b1bac7; --input-border: #519893; }
html:root[data-theme="mono-mint"][data-scheme="dark"] { --muted: #b3bbb8; --muted-2: #b3bbb8; --todo: #4fc5f9; --blocked: #faa2a2; --review: #d2a7fd; --wontfix: #b1bcb8; --p0: #fca55e; --p1: #4fc5f9; --p2: #afbaca; --p3: #b1bac7; --input-border: #519893; }
html:root[data-theme="mono-slate"][data-scheme="dark"] { --muted: #a6afac; --muted-2: #a6afab; --blocked: #f98f8f; --review: #ca97fc; --wontfix: #a3b0ac; --p0: #fb933d; --p2: #a1aec1; --p3: #a3aebd; --accent: #a1aec1; --accent-dim: #a3aebd; --input-border: #758594; }
html:root[data-theme="mono-sand"][data-scheme="dark"] { --muted: #acb5b2; --muted-2: #adb5b2; --todo: #3dbff8; --blocked: #fa9898; --review: #ce9ffd; --wontfix: #aab6b2; --p0: #fb9d50; --p1: #3dbff8; --p2: #a9b5c6; --p3: #aab4c2; --accent-dim: #c3b191; --input-border: #8d8878; }
html:root[data-theme="mono-ink"][data-scheme="dark"] { --muted: #a7b0ad; --muted-2: #a7afac; --blocked: #fa9191; --review: #ca98fc; --wontfix: #a4b1ac; --p0: #fb9440; --p2: #a2afc1; --p3: #a4afbe; --accent: #adadb5; --accent-dim: #adadb3; --input-border: #7c848d; }
html:root[data-theme="analog-aqua"][data-scheme="dark"] { --muted: #aeb6b3; --muted-2: #aeb6b3; --todo: #41c0f8; --blocked: #fa9999; --review: #cfa1fd; --wontfix: #aab6b2; --p0: #fb9d50; --p1: #41c0f8; --p2: #a9b5c6; --p3: #abb4c2; --accent-dim: #06c5e5; --input-border: #3694a5; }
html:root[data-theme="analog-lime"][data-scheme="dark"] { --muted: #b2bab7; --muted-2: #b2bab7; --todo: #4cc4f9; --blocked: #faa0a0; --review: #d1a6fd; --wontfix: #b0bbb7; --p0: #fca45c; --p1: #4cc4f9; --p2: #adb9c9; --p3: #b0b9c6; --input-border: #70974b; }
html:root[data-theme="analog-azure"][data-scheme="dark"] { --muted: #a9b2af; --muted-2: #a9b2af; --blocked: #fa9494; --review: #cc9cfd; --wontfix: #a7b3af; --p0: #fb9846; --p2: #a5b1c3; --p3: #a6b1bf; --accent-dim: #3fbcf3; --input-border: #438db0; }
html:root[data-theme="analog-jade"][data-scheme="dark"] { --muted: #acb4b1; --muted-2: #acb4b1; --todo: #3abef8; --blocked: #fa9797; --review: #cd9efd; --wontfix: #a9b5b1; --p0: #fb9c4d; --p1: #3abef8; --p2: #a8b4c5; --p3: #a9b3c1; --accent-dim: #12cb8d; --input-border: #40957f; }
html:root[data-theme="comp-coral"][data-scheme="dark"] { --muted: #acb5b2; --muted-2: #adb5b2; --todo: #3dbff8; --blocked: #fa9898; --review: #ce9ffd; --wontfix: #aab6b2; --p0: #fb9c4d; --p1: #3dbff8; --p2: #a8b4c5; --p3: #aab4c2; --accent-dim: #fc95a4; --input-border: #3c9591; }
html:root[data-theme="comp-amber"][data-scheme="dark"] { --muted: #aeb6b3; --muted-2: #aeb6b3; --todo: #41c0f8; --blocked: #fa9999; --review: #cfa1fd; --wontfix: #aab6b2; --p0: #fb9d50; --p1: #41c0f8; --p2: #a9b5c6; --p3: #abb4c2; --accent-dim: #f5a215; --input-border: #3694a5; }
html:root[data-theme="comp-rose"][data-scheme="dark"] { --muted: #a6afac; --muted-2: #a6afab; --blocked: #f98e8e; --review: #ca97fc; --wontfix: #a3afab; --p2: #a0aec0; --p3: #a3adbd; --accent: #15c1ae; --accent-dim: #f38cbf; --input-border: #348f8b; }
html:root[data-theme="split-warm"][data-scheme="dark"] { --muted: #a6afac; --muted-2: #a6afab; --blocked: #f98e8e; --review: #ca97fc; --wontfix: #a3afab; --p2: #a0aec0; --p3: #a3adbd; --accent: #15c1ae; --accent-dim: #fa9249; --input-border: #348f8b; }
html:root[data-theme="split-violet"][data-scheme="dark"] { --muted: #a6afac; --muted-2: #a6afab; --blocked: #f98e8e; --review: #ca97fc; --wontfix: #a3afab; --p2: #a0aec0; --p3: #a3adbd; --accent: #15c1ae; --accent-dim: #ca97fa; --input-border: #348f8b; }
html:root[data-theme="triad-gold"][data-scheme="dark"] { --muted: #a6afac; --muted-2: #a6afab; --blocked: #f98e8e; --review: #ca97fc; --wontfix: #a3afab; --p2: #a0aec0; --p3: #a3adbd; --accent: #15c1ae; --accent-dim: #e789f5; --input-border: #348f8b; }
html:root[data-theme="triad-lime"][data-scheme="dark"] { --muted: #a6afac; --muted-2: #a6afab; --blocked: #f98f8f; --review: #ca97fc; --wontfix: #a3b0ac; --p0: #fb933d; --p2: #a1aec1; --p3: #a3aebd; --accent: #06bddd; --accent-dim: #f98fa1; --input-border: #2c8ea2; }
html:root[data-theme="tetra-aurora"][data-scheme="dark"] { --muted: #a6afac; --muted-2: #a6afab; --blocked: #f98e8e; --review: #ca97fc; --wontfix: #a3afab; --p2: #a0aec0; --p3: #a3adbd; --accent: #15c1ae; --accent-dim: #ea86fa; --input-border: #348f8b; }
html:root[data-theme="tetra-ember"][data-scheme="dark"] { --muted: #a4adaa; --muted-2: #a4adaa; --blocked: #f98b8b; --review: #c894fc; --wontfix: #a1aea9; --p2: #9eacbf; --p3: #a1acbb; --accent: #2fb6f2; --accent-dim: #fa8f44; --input-border: #3289b2; }
html:root[data-theme="midnight-indigo"][data-scheme="dark"] { --muted: #a2aca9; --muted-2: #a3aca8; --blocked: #f98b8b; --review: #c893fc; --wontfix: #a0ada8; --p2: #9dabbe; --p3: #a0abba; --accent: #9ca4f9; --accent-dim: #b39bfb; --input-border: #737ead; }
html:root[data-theme="arctic-ice"][data-scheme="dark"] { --muted: #a9b2af; --muted-2: #a9b2af; --blocked: #fa9494; --review: #cc9cfd; --wontfix: #a7b3af; --p0: #fb9846; --p2: #a5b1c3; --p3: #a6b1bf; --accent-dim: #3fbcf3; --input-border: #438db0; }
html:root[data-theme="forest-mint"][data-scheme="light"] { --muted: #525762; --muted-2: #525762; --danger-text: #ac1a1a; --warn-text: #913f0e; --todo: #035c8d; --in-progress: #7e4c05; --blocked: #ac1a1a; --review: #7b21ca; --peer-review: #0c625b; --deploying: #7e4c05; --done: #116530; --p0: #9c340a; --p1: #035c8d; --p3: #505865; --accent: #28605e; --accent-dim: #17615d; --input-border: #737e7b; --cta: #1e837a; --cta-hover: #196e67; }
html:root[data-theme="mono-mint"][data-scheme="light"] { --muted: #525762; --muted-2: #525762; --danger-text: #ac1a1a; --warn-text: #913f0e; --todo: #035c8d; --in-progress: #7e4c05; --blocked: #ac1a1a; --review: #7b21ca; --peer-review: #0c625b; --deploying: #7e4c05; --done: #116530; --p0: #9c340a; --p1: #035c8d; --p3: #505865; --accent: #28605e; --accent-dim: #17615d; --input-border: #737e7b; --cta: #1e837a; --cta-hover: #196e67; }
html:root[data-theme="mono-slate"][data-scheme="light"] { --muted: #525762; --muted-2: #525762; --danger-text: #ac1a1a; --warn-text: #913f0e; --todo: #035c8d; --in-progress: #7e4c05; --blocked: #ac1a1a; --review: #7b21ca; --peer-review: #0c625b; --deploying: #7e4c05; --done: #116530; --p0: #9c340a; --p1: #035c8d; --p3: #505865; --accent: #4d586a; --input-border: #737e7b; --cta-hover: #586476; }
html:root[data-theme="mono-sand"][data-scheme="light"] { --muted: #525762; --muted-2: #525762; --danger-text: #ac1a1a; --warn-text: #913f0e; --todo: #035c8d; --in-progress: #7e4c05; --blocked: #ac1a1a; --review: #7b21ca; --peer-review: #0c625b; --deploying: #7e4c05; --done: #116530; --p0: #9c340a; --p1: #035c8d; --p3: #505865; --accent: #5f564b; --accent-dim: #625643; --input-border: #737e7b; --cta-hover: #6c614e; }
html:root[data-theme="mono-ink"][data-scheme="light"] { --muted: #525762; --muted-2: #525762; --danger-text: #ac1a1a; --warn-text: #913f0e; --todo: #035c8d; --in-progress: #7e4c05; --blocked: #ac1a1a; --review: #7b21ca; --peer-review: #0c625b; --deploying: #7e4c05; --done: #116530; --p0: #9c340a; --p1: #035c8d; --p3: #505865; --accent: #535764; --input-border: #737e7b; --cta-hover: #626269; }
html:root[data-theme="analog-aqua"][data-scheme="light"] { --muted: #525762; --muted-2: #525762; --danger-text: #ac1a1a; --warn-text: #913f0e; --todo: #035c8d; --in-progress: #7e4c05; --blocked: #ac1a1a; --review: #7b21ca; --peer-review: #0c625b; --deploying: #7e4c05; --done: #116530; --p0: #9c340a; --p1: #035c8d; --p3: #505865; --accent: #145f72; --accent-dim: #085f74; --input-border: #737e7b; --cta-hover: #066c81; }
html:root[data-theme="analog-lime"][data-scheme="light"] { --muted: #525762; --muted-2: #525762; --danger-text: #ac1a1a; --warn-text: #913f0e; --todo: #035c8d; --in-progress: #7e4c05; --blocked: #ac1a1a; --review: #7b21ca; --peer-review: #0c625b; --deploying: #7e4c05; --done: #116530; --p0: #9c340a; --p1: #035c8d; --p3: #505865; --accent: #435f22; --accent-dim: #3f6117; --input-border: #737e7b; --cta-hover: #476e13; }
html:root[data-theme="analog-azure"][data-scheme="light"] { --muted: #525762; --muted-2: #525762; --danger-text: #ac1a1a; --warn-text: #913f0e; --todo: #035c8d; --in-progress: #7e4c05; --blocked: #ac1a1a; --review: #7b21ca; --peer-review: #0c625b; --deploying: #7e4c05; --done: #116530; --p0: #9c340a; --p1: #035c8d; --p3: #505865; --accent: #1f5d7f; --accent-dim: #0c5d87; --input-border: #737e7b; --cta-hover: #0a6995; }
html:root[data-theme="analog-jade"][data-scheme="light"] { --muted: #525762; --muted-2: #525762; --danger-text: #ac1a1a; --warn-text: #913f0e; --todo: #035c8d; --in-progress: #7e4c05; --blocked: #ac1a1a; --review: #7b21ca; --peer-review: #0c625b; --deploying: #7e4c05; --done: #116530; --p0: #9c340a; --p1: #035c8d; --p3: #505865; --accent: #1c6251; --accent-dim: #0e634e; --input-border: #737e7b; --cta-hover: #0d7154; }
html:root[data-theme="comp-coral"][data-scheme="light"] { --muted: #525762; --muted-2: #525762; --danger-text: #ac1a1a; --warn-text: #913f0e; --todo: #035c8d; --in-progress: #7e4c05; --blocked: #ac1a1a; --review: #7b21ca; --peer-review: #0c625b; --deploying: #7e4c05; --done: #116530; --p0: #9c340a; --p1: #035c8d; --p3: #505865; --accent: #19615f; --accent-dim: #864254; --input-border: #737e7b; --cta-hover: #a74054; }
html:root[data-theme="comp-amber"][data-scheme="light"] { --muted: #525762; --muted-2: #525762; --danger-text: #ac1a1a; --warn-text: #913f0e; --todo: #035c8d; --in-progress: #7e4c05; --blocked: #ac1a1a; --review: #7b21ca; --peer-review: #0c625b; --deploying: #7e4c05; --done: #116530; --p0: #9c340a; --p1: #035c8d; --p3: #505865; --accent: #145f72; --accent-dim: #755013; --input-border: #737e7b; --cta-hover: #875a0d; }
html:root[data-theme="comp-rose"][data-scheme="light"] { --muted: #525762; --muted-2: #525762; --danger-text: #ac1a1a; --warn-text: #913f0e; --todo: #035c8d; --in-progress: #7e4c05; --blocked: #ac1a1a; --review: #7b21ca; --peer-review: #0c625b; --deploying: #7e4c05; --done: #116530; --p0: #9c340a; --p1: #035c8d; --p3: #505865; --accent: #106160; --input-border: #737e7b; --cta-hover: #bd1467; }
html:root[data-theme="split-warm"][data-scheme="light"] { --muted: #525762; --muted-2: #525762; --danger-text: #ac1a1a; --warn-text: #913f0e; --todo: #035c8d; --in-progress: #7e4c05; --blocked: #ac1a1a; --review: #7b21ca; --peer-review: #0c625b; --deploying: #7e4c05; --done: #116530; --p0: #9c340a; --p1: #035c8d; --p3: #505865; --accent: #106160; --accent-dim: #89451b; --input-border: #737e7b; --cta-hover: #a64604; }
html:root[data-theme="split-violet"][data-scheme="light"] { --muted: #525762; --muted-2: #525762; --danger-text: #ac1a1a; --warn-text: #913f0e; --todo: #035c8d; --in-progress: #7e4c05; --blocked: #ac1a1a; --review: #7b21ca; --peer-review: #0c625b; --deploying: #7e4c05; --done: #116530; --p0: #9c340a; --p1: #035c8d; --p3: #505865; --accent: #106160; --input-border: #737e7b; --cta-hover: #8919f4; }
html:root[data-theme="triad-gold"][data-scheme="light"] { --muted: #525762; --muted-2: #525762; --danger-text: #ac1a1a; --warn-text: #913f0e; --todo: #035c8d; --in-progress: #7e4c05; --blocked: #ac1a1a; --review: #7b21ca; --peer-review: #0c625b; --deploying: #7e4c05; --done: #116530; --p0: #9c340a; --p1: #035c8d; --p3: #505865; --accent: #106160; --input-border: #737e7b; --cta-hover: #a810bf; }
html:root[data-theme="triad-lime"][data-scheme="light"] { --muted: #525762; --muted-2: #525762; --danger-text: #ac1a1a; --warn-text: #913f0e; --todo: #035c8d; --in-progress: #7e4c05; --blocked: #ac1a1a; --review: #7b21ca; --peer-review: #0c625b; --deploying: #7e4c05; --done: #116530; --p0: #9c340a; --p1: #035c8d; --p3: #505865; --accent: #095f75; --input-border: #737e7b; --cta-hover: #c60b2c; }
html:root[data-theme="tetra-aurora"][data-scheme="light"] { --muted: #525762; --muted-2: #525762; --danger-text: #ac1a1a; --warn-text: #913f0e; --todo: #035c8d; --in-progress: #7e4c05; --blocked: #ac1a1a; --review: #7b21ca; --peer-review: #0c625b; --deploying: #7e4c05; --done: #116530; --p0: #9c340a; --p1: #035c8d; --p3: #505865; --accent: #106160; --accent-dim: #764388; --input-border: #737e7b; --cta-hover: #933da7; }
html:root[data-theme="tetra-ember"][data-scheme="light"] { --muted: #525762; --muted-2: #525762; --danger-text: #ac1a1a; --warn-text: #913f0e; --todo: #035c8d; --in-progress: #7e4c05; --blocked: #ac1a1a; --review: #7b21ca; --peer-review: #0c625b; --deploying: #7e4c05; --done: #116530; --p0: #9c340a; --p1: #035c8d; --p3: #505865; --accent: #0d5d87; --accent-dim: #89451b; --input-border: #737e7b; --cta-hover: #a64604; }
html:root[data-theme="midnight-indigo"][data-scheme="light"] { --muted: #525762; --muted-2: #525762; --danger-text: #ac1a1a; --warn-text: #913f0e; --todo: #035c8d; --in-progress: #7e4c05; --blocked: #ac1a1a; --review: #7b21ca; --peer-review: #0c625b; --deploying: #7e4c05; --done: #116530; --p0: #9c340a; --p1: #035c8d; --p3: #505865; --accent: #485292; --accent-dim: #5a4e8e; --input-border: #737e7b; --cta-hover: #6852ba; }
html:root[data-theme="arctic-ice"][data-scheme="light"] { --muted: #525762; --muted-2: #525762; --danger-text: #ac1a1a; --warn-text: #913f0e; --todo: #035c8d; --in-progress: #7e4c05; --blocked: #ac1a1a; --review: #7b21ca; --peer-review: #0c625b; --deploying: #7e4c05; --done: #116530; --p0: #9c340a; --p1: #035c8d; --p3: #505865; --accent: #1f5d7f; --accent-dim: #0c5d87; --input-border: #737e7b; --cta-hover: #0a6995; }
html:root[data-theme="forest-mint"][data-scheme="light"][data-tone="medium"] { --muted: #42464f; --muted-2: #42464f; --danger-text: #8b1515; --warn-text: #74320b; --todo: #024970; --in-progress: #653d04; --blocked: #8b1515; --review: #631ba3; --peer-review: #094e48; --deploying: #653d04; --done: #0e5026; --wontfix: #484541; --p0: #7e2a08; --p1: #024970; --p2: #3b4657; --p3: #404650; --accent: #204c4b; --accent-dim: #134e4b; --input-border: #616a67; --cta-text: #ffffff; }
html:root[data-theme="mono-mint"][data-scheme="light"][data-tone="medium"] { --muted: #42464f; --muted-2: #42464f; --danger-text: #8b1515; --warn-text: #74320b; --todo: #024970; --in-progress: #653d04; --blocked: #8b1515; --review: #631ba3; --peer-review: #094e48; --deploying: #653d04; --done: #0e5026; --wontfix: #484541; --p0: #7e2a08; --p1: #024970; --p2: #3b4657; --p3: #404650; --accent: #204c4b; --accent-dim: #134e4b; --input-border: #616a67; --cta-text: #ffffff; }
html:root[data-theme="mono-slate"][data-scheme="light"][data-tone="medium"] { --muted: #42464f; --muted-2: #42464f; --danger-text: #8b1515; --warn-text: #74320b; --todo: #024970; --in-progress: #653d04; --blocked: #8b1515; --review: #631ba3; --peer-review: #094e48; --deploying: #653d04; --done: #0e5026; --wontfix: #484541; --p0: #7e2a08; --p1: #024970; --p2: #3b4657; --p3: #404650; --accent: #3d4655; --accent-dim: #3a465a; --input-border: #616a67; --cta-text: #ffffff; }
html:root[data-theme="mono-sand"][data-scheme="light"][data-tone="medium"] { --muted: #42464f; --muted-2: #42464f; --danger-text: #8b1515; --warn-text: #74320b; --todo: #024970; --in-progress: #653d04; --blocked: #8b1515; --review: #631ba3; --peer-review: #094e48; --deploying: #653d04; --done: #0e5026; --wontfix: #484541; --p0: #7e2a08; --p1: #024970; --p2: #3b4657; --p3: #404650; --accent: #4b443b; --accent-dim: #4e4435; --input-border: #616a67; --cta-text: #fefefd; }
html:root[data-theme="mono-ink"][data-scheme="light"][data-tone="medium"] { --muted: #42464f; --muted-2: #42464f; --danger-text: #8b1515; --warn-text: #74320b; --todo: #024970; --in-progress: #653d04; --blocked: #8b1515; --review: #631ba3; --peer-review: #094e48; --deploying: #653d04; --done: #0e5026; --wontfix: #484541; --p0: #7e2a08; --p1: #024970; --p2: #3b4657; --p3: #404650; --accent: #424550; --accent-dim: #424551; --input-border: #616a67; --cta-text: #fefefd; }
html:root[data-theme="analog-aqua"][data-scheme="light"][data-tone="medium"] { --muted: #42464f; --muted-2: #42464f; --danger-text: #8b1515; --warn-text: #74320b; --todo: #024970; --in-progress: #653d04; --blocked: #8b1515; --review: #631ba3; --peer-review: #094e48; --deploying: #653d04; --done: #0e5026; --wontfix: #484541; --p0: #7e2a08; --p1: #024970; --p2: #3b4657; --p3: #404650; --accent: #104c5b; --accent-dim: #064c5d; --input-border: #616a67; --cta-text: #fefefd; }
html:root[data-theme="analog-lime"][data-scheme="light"][data-tone="medium"] { --muted: #42464f; --muted-2: #42464f; --danger-text: #8b1515; --warn-text: #74320b; --todo: #024970; --in-progress: #653d04; --blocked: #8b1515; --review: #631ba3; --peer-review: #094e48; --deploying: #653d04; --done: #0e5026; --wontfix: #484541; --p0: #7e2a08; --p1: #024970; --p2: #3b4657; --p3: #404650; --accent: #364c1b; --accent-dim: #324d12; --input-border: #616a67; --cta-text: #ffffff; }
html:root[data-theme="analog-azure"][data-scheme="light"][data-tone="medium"] { --muted: #42464f; --muted-2: #42464f; --danger-text: #8b1515; --warn-text: #74320b; --todo: #024970; --in-progress: #653d04; --blocked: #8b1515; --review: #631ba3; --peer-review: #094e48; --deploying: #653d04; --done: #0e5026; --wontfix: #484541; --p0: #7e2a08; --p1: #024970; --p2: #3b4657; --p3: #404650; --accent: #194a65; --accent-dim: #0a4a6c; --input-border: #616a67; --cta-text: #fefefd; }
html:root[data-theme="analog-jade"][data-scheme="light"][data-tone="medium"] { --muted: #42464f; --muted-2: #42464f; --danger-text: #8b1515; --warn-text: #74320b; --todo: #024970; --in-progress: #653d04; --blocked: #8b1515; --review: #631ba3; --peer-review: #094e48; --deploying: #653d04; --done: #0e5026; --wontfix: #484541; --p0: #7e2a08; --p1: #024970; --p2: #3b4657; --p3: #404650; --accent: #164e41; --accent-dim: #0b4f3e; --input-border: #616a67; --cta-text: #ffffff; }
html:root[data-theme="comp-coral"][data-scheme="light"][data-tone="medium"] { --muted: #42464f; --muted-2: #42464f; --danger-text: #8b1515; --warn-text: #74320b; --todo: #024970; --in-progress: #653d04; --blocked: #8b1515; --review: #631ba3; --peer-review: #094e48; --deploying: #653d04; --done: #0e5026; --wontfix: #484541; --p0: #7e2a08; --p1: #024970; --p2: #3b4657; --p3: #404650; --accent: #144d4b; --accent-dim: #6b3543; --input-border: #616a67; --cta-text: #ffffff; }
html:root[data-theme="comp-amber"][data-scheme="light"][data-tone="medium"] { --muted: #42464f; --muted-2: #42464f; --danger-text: #8b1515; --warn-text: #74320b; --todo: #024970; --in-progress: #653d04; --blocked: #8b1515; --review: #631ba3; --peer-review: #094e48; --deploying: #653d04; --done: #0e5026; --wontfix: #484541; --p0: #7e2a08; --p1: #024970; --p2: #3b4657; --p3: #404650; --accent: #104c5b; --accent-dim: #5e400f; --input-border: #616a67; --cta-text: #ffffff; }
html:root[data-theme="comp-rose"][data-scheme="light"][data-tone="medium"] { --muted: #42464f; --muted-2: #42464f; --danger-text: #8b1515; --warn-text: #74320b; --todo: #024970; --in-progress: #653d04; --blocked: #8b1515; --review: #631ba3; --peer-review: #094e48; --deploying: #653d04; --done: #0e5026; --wontfix: #484541; --p0: #7e2a08; --p1: #024970; --p2: #3b4657; --p3: #404650; --accent: #0d4e4e; --accent-dim: #752a56; --input-border: #616a67; --cta-text: #fefefd; }
html:root[data-theme="split-warm"][data-scheme="light"][data-tone="medium"] { --muted: #42464f; --muted-2: #42464f; --danger-text: #8b1515; --warn-text: #74320b; --todo: #024970; --in-progress: #653d04; --blocked: #8b1515; --review: #631ba3; --peer-review: #094e48; --deploying: #653d04; --done: #0e5026; --wontfix: #484541; --p0: #7e2a08; --p1: #024970; --p2: #3b4657; --p3: #404650; --accent: #0d4e4e; --accent-dim: #6d3716; --input-border: #616a67; --cta-text: #ffffff; }
html:root[data-theme="split-violet"][data-scheme="light"][data-tone="medium"] { --muted: #42464f; --muted-2: #42464f; --danger-text: #8b1515; --warn-text: #74320b; --todo: #024970; --in-progress: #653d04; --blocked: #8b1515; --review: #631ba3; --peer-review: #094e48; --deploying: #653d04; --done: #0e5026; --wontfix: #484541; --p0: #7e2a08; --p1: #024970; --p2: #3b4657; --p3: #404650; --accent: #0d4e4e; --accent-dim: #573187; --input-border: #616a67; --cta-text: #ffffff; }
html:root[data-theme="triad-gold"][data-scheme="light"][data-tone="medium"] { --muted: #42464f; --muted-2: #42464f; --danger-text: #8b1515; --warn-text: #74320b; --todo: #024970; --in-progress: #653d04; --blocked: #8b1515; --review: #631ba3; --peer-review: #094e48; --deploying: #653d04; --done: #0e5026; --wontfix: #484541; --p0: #7e2a08; --p1: #024970; --p2: #3b4657; --p3: #404650; --accent: #0d4e4e; --accent-dim: #6a287d; --input-border: #616a67; --cta-text: #ffffff; }
html:root[data-theme="triad-lime"][data-scheme="light"][data-tone="medium"] { --muted: #42464f; --muted-2: #42464f; --danger-text: #8b1515; --warn-text: #74320b; --todo: #024970; --in-progress: #653d04; --blocked: #8b1515; --review: #631ba3; --peer-review: #094e48; --deploying: #653d04; --done: #0e5026; --wontfix: #484541; --p0: #7e2a08; --p1: #024970; --p2: #3b4657; --p3: #404650; --accent: #074c5d; --accent-dim: #7c263c; --input-border: #616a67; --cta-text: #ffffff; }
html:root[data-theme="tetra-aurora"][data-scheme="light"][data-tone="medium"] { --muted: #42464f; --muted-2: #42464f; --danger-text: #8b1515; --warn-text: #74320b; --todo: #024970; --in-progress: #653d04; --blocked: #8b1515; --review: #631ba3; --peer-review: #094e48; --deploying: #653d04; --done: #0e5026; --wontfix: #484541; --p0: #7e2a08; --p1: #024970; --p2: #3b4657; --p3: #404650; --accent: #0d4e4e; --accent-dim: #5e356c; --input-border: #616a67; --cta-text: #fefefd; }
html:root[data-theme="tetra-ember"][data-scheme="light"][data-tone="medium"] { --muted: #42464f; --muted-2: #42464f; --danger-text: #8b1515; --warn-text: #74320b; --todo: #024970; --in-progress: #653d04; --blocked: #8b1515; --review: #631ba3; --peer-review: #094e48; --deploying: #653d04; --done: #0e5026; --wontfix: #484541; --p0: #7e2a08; --p1: #024970; --p2: #3b4657; --p3: #404650; --accent: #0a4a6b; --accent-dim: #6d3716; --input-border: #616a67; --cta-text: #ffffff; }
html:root[data-theme="midnight-indigo"][data-scheme="light"][data-tone="medium"] { --muted: #42464f; --muted-2: #42464f; --danger-text: #8b1515; --warn-text: #74320b; --todo: #024970; --in-progress: #653d04; --blocked: #8b1515; --review: #631ba3; --peer-review: #094e48; --deploying: #653d04; --done: #0e5026; --wontfix: #484541; --p0: #7e2a08; --p1: #024970; --p2: #3b4657; --p3: #404650; --accent: #3a4276; --accent-dim: #483e71; --input-border: #616a67; --cta-text: #ffffff; }
html:root[data-theme="arctic-ice"][data-scheme="light"][data-tone="medium"] { --muted: #42464f; --muted-2: #42464f; --danger-text: #8b1515; --warn-text: #74320b; --todo: #024970; --in-progress: #653d04; --blocked: #8b1515; --review: #631ba3; --peer-review: #094e48; --deploying: #653d04; --done: #0e5026; --wontfix: #484541; --p0: #7e2a08; --p1: #024970; --p2: #3b4657; --p3: #404650; --accent: #194a65; --accent-dim: #0a4a6c; --input-border: #616a67; --cta-text: #fefefd; }
