/* Armada Congestion Exchange prototype: layout and components. Tokens live in tokens.css. */

*,
*::before,
*::after {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  height: 100%;
}
body {
  background: var(--bg);
  color: var(--text);
  font: 400 14px/1.45 var(--font-ui);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
a {
  color: var(--accent);
}
.ic {
  width: 18px;
  height: 18px;
  flex: none;
  vertical-align: middle;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ic.sm {
  width: 15px;
  height: 15px;
}
.ic.lg {
  width: 22px;
  height: 22px;
}
.mono,
.num {
  font-family: var(--font-data);
  font-weight: 400;
  font-variant-numeric: tabular-nums;
}
.read {
  font-family: var(--font-read);
}
.muted {
  color: var(--muted);
}
.up {
  color: var(--up);
}
.down {
  color: var(--down);
}
.warn {
  color: var(--warn);
}
.right {
  text-align: right;
}
.nowrap {
  white-space: nowrap;
}
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-radius: 4px;
}
::selection {
  background: var(--accent-fill);
  color: var(--accent-ink);
}

/* ------------------------------------------------------------ Buttons and inputs ------------------------------------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: var(--surface);
  cursor: pointer;
  font-weight: 500;
  font-size: 13px;
  white-space: nowrap;
  transition:
    background 0.15s,
    border-color 0.15s,
    transform 0.1s;
}
.btn:hover {
  background: var(--surface-3);
}
.btn:active {
  transform: translateY(1px);
}
.btn.primary {
  background: var(--accent-fill);
  border-color: var(--accent-fill);
  color: var(--accent-ink);
}
.btn.primary:hover {
  filter: brightness(1.06);
}
.btn.ghost {
  background: transparent;
  border-color: transparent;
}
.btn.ghost:hover {
  background: var(--surface-3);
}
.btn.danger {
  border-color: var(--down);
  color: var(--down);
  background: transparent;
}
.btn.sm {
  height: 26px;
  padding: 0 9px;
  font-size: 12px;
  gap: 5px;
}
.btn.icon {
  width: 32px;
  padding: 0;
  justify-content: center;
}
.btn.icon.sm {
  width: 26px;
}
.btn[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}

.field {
  display: grid;
  gap: 5px;
}
.field > span {
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
}
.input,
select.input,
textarea.input {
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: var(--surface-2);
  width: 100%;
  min-width: 0;
}
textarea.input {
  height: auto;
  padding: 8px 10px;
  resize: vertical;
}
.input:focus {
  outline: none;
  border-color: var(--focus);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 22%, transparent);
}
.input.mono {
  font-family: var(--font-data);
}

.seg {
  display: inline-flex;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  overflow: hidden;
}
.seg button {
  border: 0;
  background: transparent;
  padding: 0 10px;
  height: 28px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-2);
}
.seg button + button {
  border-left: 1px solid var(--line-strong);
}
.seg button.on {
  background: var(--accent-fill);
  color: var(--accent-ink);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
  border: 1px solid var(--line-strong);
  color: var(--text-2);
  white-space: nowrap;
}
.chip.accent {
  border-color: transparent;
  background: color-mix(in srgb, var(--accent-fill) 18%, transparent);
  color: var(--accent);
}
.chip.up {
  border-color: transparent;
  background: var(--up-bg);
  color: var(--up);
}
.chip.down {
  border-color: transparent;
  background: var(--down-bg);
  color: var(--down);
}
.chip.warn {
  border-color: transparent;
  background: var(--warn-bg);
  color: var(--warn);
}
.chip .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.eyebrow {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 500;
}
.label {
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
}
.h1 {
  font-size: 30px;
  line-height: 1.12;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin: 0;
}
.h2 {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0;
}
.h3 {
  font-size: 14px;
  font-weight: 600;
  margin: 0;
}

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

.tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}
.tbl th {
  text-align: left;
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
  padding: 6px 8px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: var(--surface);
  z-index: 1;
}
.tbl td {
  padding: 6px 8px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.tbl tr:last-child td {
  border-bottom: 0;
}
.tbl td.num,
.tbl th.num {
  text-align: right;
}
.tbl tr.sel td {
  background: color-mix(in srgb, var(--accent-fill) 10%, transparent);
}
.tbl tr.click {
  cursor: pointer;
}
.tbl tr.click:hover td {
  background: var(--surface-3);
}

/* ------------------------------------------------------------------- Shell ------------------------------------------------------------------ */

/* clip, not hidden: a clipped box cannot be scrolled sideways by scrollIntoView or focus (hidden can, and then the whole app shifts). */
/* One column that may shrink: without minmax(0, 1fr) the top bar's widest content would widen the whole app. */
.app {
  display: grid;
  grid-template-rows: auto 1fr;
  grid-template-columns: minmax(0, 1fr);
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  overflow: clip;
}
.topbar {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 52px;
  padding: 0 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: relative;
  z-index: 30;
}
/* Brand lockup (ui/brand.js): the mark is the one Cherenkov accent; the words take the text color. */
.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;
}
.bm,
.bm svg {
  display: block;
}
.bm svg {
  height: 100%;
  width: auto;
  fill: currentColor;
}
.lockup {
  display: inline-flex;
  align-items: flex-end;
  color: var(--text);
  line-height: 1;
}
.lockup .mark {
  color: var(--accent-large);
}
.lockup .lk-name {
  display: inline-flex;
  align-items: flex-start;
}
.lockup .tm {
  font: 600 9px/1 var(--font-ui);
  margin-left: 2px;
  color: var(--text-2);
}
.lockup .lk-by {
  display: inline-flex;
  align-items: flex-end;
  gap: 6px;
  color: var(--text-2);
}
.lockup .lk-by .by {
  font: 500 11px/1 var(--font-ui);
  letter-spacing: 0.04em;
}
.lockup-bar {
  gap: 9px;
}
.lockup-bar .mark {
  height: 22px;
}
.lockup-bar .word {
  height: 13.6px;
}
.lockup-bar .lk-by {
  margin-left: 10px;
  padding-left: 12px;
  border-left: 1px solid var(--line-strong);
  height: 22px;
  align-items: center;
}
.lockup-bar .lk-by .armada {
  height: 9px;
}
.lockup-hero {
  gap: 16px;
  color: #222222;
}
.lockup-hero .mark {
  height: 46px;
  color: #0888a8;
}
.lockup-hero .word {
  height: 28.5px;
}
.lockup-hero .tm {
  font-size: 13px;
  color: #4a4a4a;
}
.lockup-hero .lk-by {
  margin-left: 18px;
  padding-left: 18px;
  border-left: 1px solid #d6d6d6;
  height: 46px;
  align-items: center;
  color: #4a4a4a;
}
.lockup-hero .lk-by .armada {
  height: 13px;
}
.lockup-side {
  gap: 8px;
}
.lockup-side .mark {
  height: 18px;
}
.lockup-side .word {
  height: 11px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  border-radius: var(--r-sm);
}
.nav {
  display: flex;
  gap: 2px;
}
.nav a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 32px;
  padding: 0 11px;
  border-radius: var(--r-sm);
  text-decoration: none;
  color: var(--text-2);
  font-weight: 500;
  font-size: 13px;
}
.nav a:hover {
  background: var(--surface-3);
}
.nav a.on {
  background: var(--surface-3);
  color: var(--text);
}
.spacer {
  flex: 1;
}
.env {
  font-family: var(--font-data);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  color: var(--warn);
  border: 1px solid currentColor;
  border-radius: 4px;
  padding: 2px 6px;
  white-space: nowrap;
}
.venue-chip {
  font: 500 11px/1 var(--font-ui);
  letter-spacing: 0.03em;
  color: var(--accent);
  border: 1px solid currentColor;
  border-radius: 999px;
  padding: 5px 9px;
  white-space: nowrap;
  text-decoration: none;
}
.venue-chip.bad {
  color: var(--down);
}
.venue-chip[hidden] {
  display: none;
}
.clockbox {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 10px;
  height: 34px;
  flex: none;
  white-space: nowrap;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface-2);
}
.clockbox .t {
  font-family: var(--font-data);
  font-size: 12.5px;
}
.clockbox .post {
  font-family: var(--font-data);
  font-size: 12.5px;
  color: var(--accent);
}
.acct {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 10px 0 6px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  font-size: 12.5px;
  white-space: nowrap;
}
.avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent-fill);
  color: var(--accent-ink);
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
}
.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--up);
  box-shadow: 0 0 0 3px var(--up-bg);
}

.main {
  overflow: auto;
  position: relative;
}
.toast-wrap {
  position: fixed;
  right: 16px;
  bottom: 16px;
  display: grid;
  gap: 8px;
  z-index: 80;
}
.toast {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-left: 3px solid var(--accent-fill);
  border-radius: var(--r-md);
  padding: 10px 14px;
  box-shadow: var(--shadow-lift);
  max-width: 380px;
  font-size: 13px;
  animation: rise 0.25s var(--ease);
}
.toast.bad {
  border-left-color: var(--down);
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ------------------------------------------------------------------ Sign-in ----------------------------------------------------------------- */

.auth {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(380px, 0.85fr);
  background: var(--bg);
}
.auth-art {
  background: #ffffff;
  color: #222222;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: 40px 48px;
  border-right: 1px solid var(--line);
}
.auth-art img.hero {
  width: 100%;
  max-width: 760px;
  align-self: center;
  justify-self: center;
}
.auth-art .cap {
  font-family: var(--font-read);
  color: #4a4a4a;
  max-width: 560px;
  font-size: 15px;
}
.auth-panel {
  display: grid;
  place-items: center;
  padding: 40px 24px;
}
.auth-card {
  width: 100%;
  max-width: 400px;
  display: grid;
  gap: 18px;
}
.auth-card .h1 {
  font-size: 26px;
}
.auth-card p {
  margin: 0;
  color: var(--text-2);
}
.mock-note {
  font-size: 12px;
  color: var(--warn);
  border: 1px dashed currentColor;
  border-radius: var(--r-md);
  padding: 10px 12px;
  line-height: 1.5;
}
.mfa-box {
  border: 1px solid var(--line-strong);
  border-radius: var(--r-lg);
  padding: 18px;
  display: grid;
  gap: 14px;
  background: var(--surface);
}
.mfa-number {
  font-family: var(--font-data);
  font-size: 44px;
  text-align: center;
  letter-spacing: 0.08em;
  color: var(--accent-large);
}
.code-input {
  font-family: var(--font-data);
  font-size: 20px;
  letter-spacing: 0.3em;
  text-align: center;
  height: 48px;
}
.steps {
  display: flex;
  gap: 8px;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.steps b {
  color: var(--accent);
  font-weight: 600;
}
.err {
  color: var(--down);
  font-size: 12.5px;
  min-height: 18px;
}

/* ----------------------------------------------------------------- Launchpad ---------------------------------------------------------------- */

.lp {
  max-width: 1440px;
  margin: 0 auto;
  padding: 28px 28px 60px;
  display: grid;
  gap: 28px;
}
.lp-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: end;
}
.lp-hero .read {
  font-size: 16px;
  color: var(--text-2);
  max-width: 760px;
  margin: 8px 0 0;
}
.lp-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.lp-strip > div {
  background: var(--surface);
  padding: 14px 16px;
  display: grid;
  gap: 4px;
  cursor: default;
}
.lp-strip > div.click {
  cursor: pointer;
}
.lp-strip > div.click:hover {
  background: var(--surface-2);
}
.lp-strip .v {
  font-family: var(--font-data);
  font-size: 20px;
}
.lp-section {
  display: grid;
  gap: 14px;
}
.lp-section > header {
  display: flex;
  align-items: baseline;
  gap: 12px;
}
.lp-section > header .read {
  color: var(--muted);
  font-size: 14px;
}
.desks {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}
.desk-card {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: 14px;
  display: grid;
  gap: 10px;
  cursor: pointer;
  text-align: left;
  transition:
    border-color 0.15s,
    transform 0.15s,
    box-shadow 0.15s;
}
.desk-card:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}
.desk-card.current {
  border-color: var(--accent);
}
.mini {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: 7px;
  grid-auto-flow: row dense;
  gap: 2px;
  height: 74px;
  overflow: hidden;
}
.mini i {
  background: color-mix(in srgb, var(--accent-fill) 22%, var(--surface-3));
  border-radius: 2px;
}
.mini i:nth-child(3n) {
  background: var(--surface-3);
}
.desk-card .meta {
  font-size: 12px;
  color: var(--muted);
}
.wgroups {
  display: grid;
  gap: 22px;
}
.wgroup h4 {
  margin: 0 0 10px;
}
.wcards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(268px, 1fr));
  gap: 14px;
}
.wcard {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  overflow: hidden;
  display: grid;
  grid-template-rows: 140px auto;
  transition:
    border-color 0.15s,
    box-shadow 0.15s,
    transform 0.15s;
}
.wcard:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}
/* The card's screen illustration: a window onto the screen, painted with the theme's tokens (see Screen illustrations). */
.wcard .thumb {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  overflow: hidden;
  position: relative;
  cursor: pointer;
}
.wcard .thumb .sart-box {
  position: absolute;
  inset: 0;
}
.wcard .thumb .noimg {
  height: 100%;
  display: grid;
  place-items: center;
  color: var(--muted);
}
.wcard:hover .thumb .sart {
  transform: scale(1.015);
}
.wcard .body {
  padding: 12px 14px 14px;
  display: grid;
  gap: 8px;
}
.wcard .title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}
.wcard .blurb {
  font-family: var(--font-read);
  font-size: 13.5px;
  color: var(--text-2);
  min-height: 40px;
}
.wcard .row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.wcard .parts {
  font-family: var(--font-data);
  font-size: 11px;
  color: var(--muted);
}
.lp-side {
  display: grid;
  gap: 12px;
  align-content: start;
}
.lp-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 28px;
  align-items: start;
}
.attn {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
}
.attn > header {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 8px;
}
.attn ul {
  list-style: none;
  margin: 0;
  padding: 4px 0;
}
.attn li {
  padding: 9px 14px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: start;
  cursor: pointer;
  font-size: 13px;
}
.attn li:hover {
  background: var(--surface-2);
}

/* ------------------------------------------------------------------- Desk ------------------------------------------------------------------- */

.deskbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  position: sticky;
  top: 0;
  z-index: 10;
  flex-wrap: wrap;
}
.deskbar .name {
  font-weight: 600;
}
.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-auto-rows: var(--row);
  grid-auto-flow: row dense;
  gap: var(--gap);
  padding: 14px 16px 40px;
}
.tile {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  display: grid;
  grid-template-rows: 38px 1fr;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow);
  transition:
    box-shadow 0.15s,
    opacity 0.15s,
    outline-color 0.15s;
}
.tile.dragging {
  opacity: 0.55;
  outline: 2px dashed var(--accent);
}
.tile.drop {
  outline: 2px solid var(--accent);
}
.tile > header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 6px 0 10px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  cursor: grab;
  user-select: none;
}
.tile > header:active {
  cursor: grabbing;
}
.tile > header .t {
  font-weight: 600;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tile > header .parts {
  font-family: var(--font-data);
  font-size: 10.5px;
  color: var(--muted);
  white-space: nowrap;
}
.tile > header .tools {
  margin-left: auto;
  display: flex;
  gap: 2px;
}
.tile > .wb {
  overflow: auto;
  min-height: 0;
  position: relative;
  container-type: inline-size;
}
.tile .resize {
  position: absolute;
  right: 2px;
  bottom: 2px;
  width: 18px;
  height: 18px;
  cursor: nwse-resize;
  color: var(--muted);
  display: grid;
  place-items: center;
  z-index: 3;
}
.tile.max {
  position: fixed;
  inset: 60px 14px 14px;
  z-index: 40;
  box-shadow: var(--shadow-lift);
}
.tile .linkdot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-fill);
  flex: none;
}
.tile .linkdot.off {
  background: transparent;
  border: 1px solid var(--muted);
}
.powered {
  font: 500 11px/1.2 var(--font-ui);
  letter-spacing: 0.04em;
  color: var(--text-2);
  white-space: nowrap;
}
.empty {
  display: grid;
  place-items: center;
  text-align: center;
  padding: 60px 20px;
  gap: 14px;
  color: var(--muted);
}
.empty img {
  max-width: 560px;
  width: 100%;
  opacity: 0.9;
  background: #ffffff;
  border-radius: var(--r-md);
}
.full {
  padding: 16px;
  height: 100%;
  display: grid;
  grid-template-rows: minmax(0, 1fr);
}
.full > .tile {
  position: static;
  height: 100%;
}

/* Widget body layout helpers */
.wpad {
  padding: 12px;
}
.wgrid {
  display: grid;
  gap: 12px;
  padding: 12px;
}
.cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
/*
 * A widget in a narrow tile stacks its panels: the tile body is a size container, so this follows the tile, not the
 * window. 900 px covers a widget full screen on iPad in portrait (834 points), where three columns cannot fit.
 */
@container (max-width: 900px) {
  .wgrid,
  .wgrid.cols-2,
  .wgrid.cols-3 {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}
@container (max-width: 560px) {
  .tbl {
    font-size: 11.5px;
  }
  .tbl td,
  .tbl th {
    padding: 5px 5px;
  }
}
.checkrow {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px;
  align-items: baseline;
  padding: 3px 0;
  font-size: 13px;
  cursor: pointer;
}
.checkrow input {
  margin: 0;
  translate: 0 2px;
}
.panel {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.panel > header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  min-height: 38px;
}
.panel > header .h3 {
  white-space: nowrap;
}
.panel > header .part {
  font-family: var(--font-data);
  font-size: 10.5px;
  color: var(--muted);
}
.panel > header .tools {
  margin-left: auto;
  display: flex;
  gap: 6px;
  align-items: center;
}
.panel > .pb {
  padding: 10px;
  min-width: 0;
}
.panel > .pb.flush {
  padding: 0;
  overflow: auto;
}
.kv {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 14px;
  font-size: 13px;
}
.kv > :nth-child(odd) {
  color: var(--muted);
}
.kv > :nth-child(even) {
  font-family: var(--font-data);
  text-align: right;
}
.stat {
  display: grid;
  gap: 2px;
}
.stat .v {
  font-family: var(--font-data);
  font-size: 18px;
}
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
}
.note {
  font-family: var(--font-read);
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.55;
}
.small {
  font-size: 11.5px;
}
.bar {
  height: 8px;
  border-radius: 4px;
  background: var(--surface-3);
  position: relative;
  overflow: visible;
}
.bar > i {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  border-radius: 4px;
  background: var(--accent-fill);
}
.bar > b {
  position: absolute;
  top: -4px;
  width: 2px;
  height: 16px;
  background: var(--text);
}
.row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.stack {
  display: grid;
  gap: 8px;
  align-content: start;
}
.sep {
  height: 1px;
  background: var(--line);
  margin: 4px 0;
}
.list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.list li {
  padding: 7px 10px;
  border-bottom: 1px solid var(--line);
  font-size: 12.5px;
}
.list li:last-child {
  border-bottom: 0;
}
.badge-status {
  font-family: var(--font-data);
  font-size: 10px;
  letter-spacing: 0.04em;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid currentColor;
}
.placeholder-banner {
  margin: 10px 12px 0;
  padding: 8px 10px;
  border: 1px dashed var(--warn);
  color: var(--warn);
  border-radius: var(--r-sm);
  font-size: 12px;
}
.paper-surface {
  background: #ffffff;
  color: #222222;
}
.paper-surface .muted {
  color: #6e6e6e;
}
mark {
  background: color-mix(in srgb, var(--accent-fill) 35%, transparent);
  color: inherit;
  border-radius: 2px;
  padding: 0 1px;
}

/* Charts */
svg.chart {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}
svg.chart .grid line {
  stroke: var(--line);
}
svg.chart .axis text {
  fill: var(--muted);
  font-family: var(--font-data);
  font-size: 10px;
}
svg.chart .zero {
  stroke: var(--text);
  stroke-width: 1;
  stroke-dasharray: 3 3;
  opacity: 0.55;
}
svg.chart .s0 {
  stroke: var(--accent-large);
  fill: none;
  stroke-width: 1.6;
}
svg.chart .s1 {
  stroke: var(--text);
  fill: none;
  stroke-width: 1.4;
  stroke-dasharray: 5 3;
}
svg.chart .s2 {
  stroke: var(--muted);
  fill: none;
  stroke-width: 1.2;
}
svg.chart .area {
  fill: color-mix(in srgb, var(--accent-fill) 14%, transparent);
  stroke: none;
}
svg.chart .barfill {
  fill: var(--accent-large);
}
svg.chart .barfill.neg {
  fill: var(--down);
}
svg.chart .lbl {
  fill: var(--text-2);
  font-family: var(--font-ui);
  font-size: 11px;
}
svg.spark {
  width: 90px;
  height: 24px;
  display: block;
}
svg.spark path {
  fill: none;
  stroke: var(--accent-large);
  stroke-width: 1.3;
}

/* Order book ladder */
.ladder {
  font-family: var(--font-data);
  font-size: 12px;
  width: 100%;
  border-collapse: collapse;
}
.ladder td {
  padding: 2px 8px;
  position: relative;
}
.ladder td.depth {
  width: 45%;
}
.ladder .depthbar {
  position: absolute;
  top: 2px;
  bottom: 2px;
  border-radius: 2px;
  opacity: 0.22;
}
.ladder .ask .depthbar {
  background: var(--down);
  left: 0;
}
.ladder .bid .depthbar {
  background: var(--up);
  right: 0;
}
.ladder tr.markrow td {
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
  color: var(--accent);
}

/* Chat */
.chat {
  display: grid;
  grid-template-rows: auto 1fr auto;
  height: 100%;
  min-height: 0;
}
.chat .msgs {
  overflow: auto;
  padding: 12px;
  display: grid;
  gap: 12px;
  align-content: start;
}
.msg {
  display: grid;
  gap: 6px;
  max-width: 100%;
}
.msg .who {
  font-size: 11px;
  color: var(--muted);
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}
.msg .bubble {
  padding: 10px 12px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: var(--surface-2);
  font-family: var(--font-read);
  font-size: 14px;
  line-height: 1.55;
  white-space: pre-wrap;
}
.msg.me .bubble {
  background: color-mix(in srgb, var(--accent-fill) 12%, var(--surface));
  border-color: transparent;
  font-family: var(--font-ui);
}
.msg sup {
  font-family: var(--font-data);
  color: var(--accent);
  font-size: 10px;
}
.chat form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 10px;
  border-top: 1px solid var(--line);
}
.modelbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.srcs {
  display: grid;
  gap: 6px;
}
.src {
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 6px 8px;
  font-size: 12px;
  display: grid;
  gap: 2px;
  background: var(--surface);
}
.src .n {
  font-family: var(--font-data);
  color: var(--accent);
}
.dock {
  position: fixed;
  right: 0;
  top: 52px;
  bottom: 0;
  width: min(440px, 100vw);
  background: var(--surface);
  border-left: 1px solid var(--line);
  box-shadow: var(--shadow-lift);
  z-index: 45;
  transform: translateX(100%);
  transition: transform 0.25s var(--ease);
  display: grid;
  grid-template-rows: 44px 1fr;
}
.dock.open {
  transform: none;
}
.dock > header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 8px 0 14px;
  border-bottom: 1px solid var(--line);
}

/* Command palette and modal */
.scrim {
  position: fixed;
  inset: 0;
  background: rgba(20, 20, 20, 0.45);
  z-index: 60;
  display: grid;
  place-items: start center;
  padding-top: 12vh;
}
.palette {
  width: min(640px, calc(100vw - 32px));
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lift);
  overflow: hidden;
}
.palette input {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  padding: 16px 18px;
  font-size: 16px;
  outline: none;
}
.palette ul {
  list-style: none;
  margin: 0;
  padding: 6px;
  max-height: 50vh;
  overflow: auto;
}
.palette li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--r-sm);
  cursor: pointer;
}
.palette li.on,
.palette li:hover {
  background: var(--surface-3);
}
.palette li .k {
  margin-left: auto;
  font-family: var(--font-data);
  font-size: 11px;
  color: var(--muted);
}
.modal {
  width: min(720px, calc(100vw - 32px));
  max-height: 76vh;
  overflow: auto;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lift);
}
.modal > header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: var(--surface);
}
.modal > .mb {
  padding: 14px;
}
pre.code {
  font-family: var(--font-data);
  font-size: 11.5px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 10px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-all;
  margin: 0;
}

/* Phone frame (mobile widget) */
.phones {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  padding: 14px;
}
.phone {
  border: 1.5px solid var(--line-strong);
  border-radius: 30px;
  padding: 14px 12px;
  background: var(--surface-2);
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 10px;
  aspect-ratio: 9 / 18;
  min-height: 360px;
  position: relative;
}
.phone::before {
  content: "";
  width: 60px;
  height: 5px;
  border-radius: 3px;
  background: var(--line-strong);
  justify-self: center;
}
.phone .scr {
  background: var(--surface);
  border-radius: 16px;
  padding: 12px;
  display: grid;
  gap: 10px;
  align-content: start;
  font-size: 12.5px;
  overflow: hidden;
}

/* Studio canvas */
.canvas {
  display: grid;
  gap: 6px;
}
.block {
  display: grid;
  grid-template-columns: 92px 1fr auto;
  gap: 8px;
  align-items: center;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  padding: 7px 8px;
  background: var(--surface-2);
  font-size: 12.5px;
}
.block .k {
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
}
.block.gate {
  border-color: var(--accent);
}
.palette-blocks {
  display: grid;
  gap: 8px;
}
.palette-blocks .grp {
  display: grid;
  gap: 4px;
}
.palette-blocks button {
  text-align: left;
}

/* Fleet squares */
.fleet {
  display: grid;
  gap: 8px;
}
.fleet .fn {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 8px;
  align-items: center;
  font-size: 11.5px;
}
.fleet .sq {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5px;
}
.fleet .sq i {
  width: 5px;
  height: 5px;
  border: 1px solid var(--line-strong);
}
.fleet .sq i.on {
  background: var(--warn);
  border-color: var(--warn);
}
.fleet .sq i.mine {
  background: var(--accent-fill);
  border-color: var(--accent-fill);
}

/* Octet node map */
.nodes {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.node {
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  padding: 8px;
  display: grid;
  gap: 4px;
  font-size: 11.5px;
  background: var(--surface-2);
}
.node.down {
  border-color: var(--down);
  background: var(--down-bg);
}
.node.loading {
  border-color: var(--warn);
  background: var(--warn-bg);
}
.node .nm {
  font-weight: 600;
  display: flex;
  justify-content: space-between;
}

/* The top bar keeps one line: the product name, then the environment chip, give way first on narrower screens. */
@media (max-width: 1700px) {
  .lockup-bar .lk-by {
    display: none;
  }
}
@media (max-width: 1180px) {
  .lockup-bar .lk-name {
    display: none;
  }
}
@media (max-width: 1800px) {
  .topbar.has-venue .env {
    display: none;
  }
}
@media (max-width: 980px) {
  .venue-chip {
    display: none;
  }
}
/* iPad in portrait (834 points): the clock keeps the countdown and drops the time, and the nav keeps its icons. */
@media (max-width: 1000px) {
  .clockbox .t {
    display: none;
  }
  .topbar {
    gap: 8px;
    padding: 0 12px;
  }
  .topbar .nav .nl {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
}
@media (max-width: 1440px) {
  .env {
    display: none;
  }
  .topbar {
    gap: 10px;
  }
}
@media (max-width: 1100px) {
  .lp-grid {
    grid-template-columns: 1fr;
  }
  .lp-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
  .cols-3 {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 760px) {
  .auth {
    grid-template-columns: 1fr;
  }
  .auth-art {
    display: none;
  }
  .topbar {
    gap: 8px;
    padding: 0 10px;
    overflow-x: auto;
  }
  .lockup-bar .lk-name,
  .clockbox .t,
  .env {
    display: none;
  }
  .lp {
    padding: 18px 16px 40px;
  }
  .lp-hero {
    grid-template-columns: 1fr;
  }
  .lp-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .grid {
    grid-template-columns: 1fr;
    padding: 10px 16px 30px;
  }
  .tile {
    grid-column: 1 / -1 !important;
  }
  .cols-2 {
    grid-template-columns: 1fr;
  }
  .nodes {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ------------------------------------------------ iPhone, iPad and Mac (installed web app) ------------------------------------------------ */
/* Safe areas: the notch, the home indicator and rounded corners when installed with viewport-fit=cover. */
.topbar {
  padding-left: max(16px, env(safe-area-inset-left));
  padding-right: max(16px, env(safe-area-inset-right));
}
@supports (padding-top: env(safe-area-inset-top)) {
  @media (display-mode: standalone) {
    .topbar {
      padding-top: env(safe-area-inset-top);
      height: calc(52px + env(safe-area-inset-top));
    }
  }
}
.main {
  padding-bottom: env(safe-area-inset-bottom);
}
.toast-wrap {
  bottom: max(16px, env(safe-area-inset-bottom));
  right: max(16px, env(safe-area-inset-right));
}
/* Dragging a tile or its corner must not scroll the page on touch screens. */
.tile > header,
.tile .resize {
  touch-action: none;
}
/* Touch screens: controls grow to Apple's 44 point minimum hit target; text inputs stay at 16px so iOS does not zoom. */
@media (pointer: coarse) {
  .btn,
  .seg button,
  .nav a,
  select.input {
    min-height: 44px;
  }
  .btn.icon {
    min-width: 44px;
  }
  .tile .resize {
    width: 32px;
    height: 32px;
  }
  input.input,
  textarea.input,
  select.input {
    font-size: 16px;
  }
}

/* ---------------------------------------------- iPhone snapshot (read only, approvals by push) ---------------------------------------------- */
body.on-phone .nav,
body.on-phone .env,
body.on-phone .topbar .row,
body.on-phone .clockbox,
body.on-phone .topbar .btn.icon[title^="Command"],
body.on-phone .topbar .btn.icon[title="Ask the AI"],
body.on-phone .acct > span:not(.avatar) {
  display: none;
}
body.on-phone .topbar {
  overflow: hidden;
}
.snap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px 16px 40px;
  display: grid;
  gap: 18px;
  container-type: inline-size;
}
.snap-panes {
  display: grid;
  gap: 18px;
}
.snap-pane {
  display: grid;
  gap: 18px;
  align-content: start;
  min-width: 0;
}
/* iPhone Duo unfolded (or any wide phone view): the day on the left, one path on the right. */
@container (min-width: 460px) {
  .snap-panes {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
}
.snap-book {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.snap-list.paths li {
  cursor: pointer;
}
.snap-list.paths li.on {
  background: color-mix(in srgb, var(--accent-fill) 12%, var(--surface));
}
.snap-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}
.snap-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.snap-card {
  background: var(--surface);
  padding: 12px 14px;
  display: grid;
  gap: 3px;
}
.snap-card .v {
  font-family: var(--font-data);
  font-size: 19px;
}
.snap-sec {
  display: grid;
  gap: 8px;
}
.snap-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
}
.snap-list li {
  background: var(--surface);
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
}
.snap-list.paths li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 90px 64px;
}
.snap-list.paths .mono {
  text-align: right;
}
.snap-cov {
  display: grid;
  gap: 10px;
}
.snap-cov .bar {
  position: relative;
  height: 8px;
  border-radius: 4px;
  background: var(--surface-3);
  margin-top: 4px;
}
.snap-cov .bar i {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: 4px;
  background: var(--accent-fill);
}
.snap-cov .bar b {
  position: absolute;
  top: -3px;
  width: 2px;
  height: 14px;
  background: var(--text);
}
.snap-note {
  background: color-mix(in srgb, var(--surface) 88%, var(--accent-fill));
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px 14px;
  display: grid;
  gap: 6px;
  box-shadow: var(--shadow);
}
.snap-foot {
  display: grid;
  gap: 6px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

/*
 * iPhone Duo, open, in landscape: the fold is horizontal across the middle of the inner display, so the snapshot
 * splits there. The day fills the top half and the path the bottom half; each half scrolls, and each lays its
 * sections out side by side to use the width. The fold itself carries no content.
 */
/* The app's top bar (--topbar-h) sits in the top half, so the halves are sized to put the 2 px fold line at the screen's center. */
.snap.across {
  --topbar-h: 52px;
  max-width: none;
  height: calc(100vh - var(--topbar-h));
  height: calc(100dvh - var(--topbar-h));
  padding: 0;
  gap: 0;
  grid-template-rows: calc(50vh - var(--topbar-h) - 1px) 2px minmax(0, 1fr);
  grid-template-rows: calc(50dvh - var(--topbar-h) - 1px) 2px minmax(0, 1fr);
}
.snap.across .snap-half {
  overflow: auto;
  overscroll-behavior: contain;
  padding: 12px max(16px, env(safe-area-inset-left)) 12px max(16px, env(safe-area-inset-right));
  display: grid;
  gap: 14px;
  align-content: start;
}
.snap.across .snap-half > .snap-pane {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  align-items: start;
}
.snap.across .snap-fold {
  background: var(--line-strong);
}
.faceid {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  margin: 4px auto;
  border-radius: 20px;
  border: 2px solid var(--accent-fill);
  color: var(--accent);
}

/* ------------------------------------------------------------ Accessibility (v0.2 UX pass) ------------------------------------------------------------ */
/* WCAG 2.2: 2.4.1 bypass blocks (skip link), 2.3.3 and the brand's motion rule (reduced motion), 2.4.7 focus visible. */
.skip {
  position: absolute;
  left: 12px;
  top: -48px;
  z-index: 1000;
  background: var(--accent-fill);
  color: var(--accent-ink);
  padding: 8px 12px;
  border-radius: var(--r-sm);
  font-weight: 600;
  text-decoration: none;
}
.skip:focus {
  top: 8px;
}
.palette input:focus-visible,
.cw-box textarea:focus-visible {
  box-shadow: inset 0 -2px 0 var(--focus);
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
    scroll-behavior: auto !important;
  }
}
.main:focus,
.auth-panel:focus {
  outline: none;
}

/* ---------------------------------------------------------------- Model loading ---------------------------------------------------------------- */

/* The load chip in the chat's model bar: a small spinner and the current stage while a model loads. */
.chip.load {
  gap: 6px;
  color: var(--text-2);
}

.spin {
  width: 12px;
  height: 12px;
  flex: none;
  border: 2px solid var(--line-strong);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

@media (prefers-reduced-motion: reduce) {
  .spin {
    animation-duration: 2.4s;
  }
}

/* ------------------------------------------------------------ Monte Carlo charts ------------------------------------------------------------ */

/* The fan's bands use the accent at two strengths, so the 25th to 75th band reads darker than the 5th to 95th. */
svg.chart .fan-outer {
  fill: color-mix(in srgb, var(--accent-fill) 14%, transparent);
  stroke: none;
}
svg.chart .fan-inner {
  fill: color-mix(in srgb, var(--accent-fill) 30%, transparent);
  stroke: none;
}

/* Reference lines (maintenance, VaR): dashed, in the down color. */
svg.chart .ref {
  stroke: var(--down);
  stroke-width: 1.2;
  stroke-dasharray: 4 3;
}

/* The run's progress bar on the Monte Carlo screen. */
.mc-progress {
  height: 6px;
  border-radius: 999px;
  background: var(--surface-3);
  overflow: hidden;
}
.mc-progress > i {
  display: block;
  height: 100%;
  width: 0;
  background: var(--accent-fill);
  transition: width 0.15s linear;
}

/* Odds tiles: a large probability with a short caption under it. */
.mc-odds {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}
.mc-odds .stat .v {
  font-variant-numeric: tabular-nums;
}

/* ------------------------------------------------------------ Screen illustrations ------------------------------------------------------------ */

/*
 * The drawings in img/screens carry class names, and these rules paint them with the theme's tokens, so every
 * illustration follows Paper or Carbon with the platform's setting (tools/build_screen_art.py draws them).
 */
.sart-box {
  width: 100%;
  height: 100%;
  overflow: hidden;
}
.sart {
  display: block;
  width: 100%;
  height: 100%;
  transition: transform 0.25s var(--ease);
}
.sart * {
  stroke-linecap: round;
  stroke-linejoin: round;
}
.sart .sa-bg {
  fill: var(--bg);
}
.sart .sa-surface {
  fill: var(--surface);
  stroke: var(--line);
  stroke-width: 1;
}
.sart .sa-surface2 {
  fill: var(--surface-2);
}
.sart .sa-surface3 {
  fill: var(--surface-3);
}
.sart .sa-line {
  fill: none;
  stroke: var(--line);
  stroke-width: 1;
}
.sart .sa-strong {
  fill: none;
  stroke: var(--line-strong);
  stroke-width: 1;
}
.sart .sa-text {
  fill: var(--text);
}
.sart .sa-text2 {
  fill: var(--text-2);
}
.sart .sa-muted {
  fill: var(--muted);
}
.sart .sa-accent {
  fill: var(--accent-fill);
}
.sart .sa-accent2 {
  fill: var(--accent);
}
.sart .sa-up {
  fill: var(--up);
}
.sart .sa-down {
  fill: var(--down);
}
.sart .sa-warn {
  fill: var(--warn);
}
.sart .sa-upbg {
  fill: var(--up-bg);
}
.sart .sa-downbg {
  fill: var(--down-bg);
}
.sart .sa-warnbg {
  fill: var(--warn-bg);
}
.sart .sa-chart {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.6;
}
.sart .sa-chart2 {
  fill: none;
  stroke: var(--muted);
  stroke-width: 1.6;
}
.sart .sa-chart-down {
  fill: none;
  stroke: var(--down);
  stroke-width: 1.6;
}
.sart .sa-link {
  fill: none;
  stroke: var(--line-strong);
  stroke-width: 1;
}
.sart .sa-ring {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.6;
}
.sart .sa-dash {
  fill: none;
  stroke: var(--line-strong);
  stroke-width: 1;
  stroke-dasharray: 3 3;
}
/* The Blueprints plates are white paper in both themes, as the drawings are. */
.sart .sa-plate {
  fill: #ffffff;
  stroke: var(--line);
  stroke-width: 1;
}
.sart .sa-ink {
  fill: none;
  stroke: #222222;
  stroke-width: 1;
}

/* The desk's empty state: the desk illustration in a framed window. */
.empty-art {
  width: min(420px, 100%);
  aspect-ratio: 2 / 1;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}

/* The palette: results on the left, the selected screen's preview on the right (from 900 px wide). */
.palette {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}
.palette-preview {
  display: none;
}
@media (min-width: 900px) {
  .palette {
    width: min(900px, calc(100vw - 32px));
    grid-template-columns: minmax(0, 1fr) 280px;
  }
  .palette-preview {
    display: grid;
    align-content: start;
    gap: 10px;
    padding: 14px;
    border-left: 1px solid var(--line);
    background: var(--surface-2);
  }
  .palette-preview .sart-box {
    aspect-ratio: 2 / 1;
    height: auto;
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
  }
  .palette-preview .noimg {
    aspect-ratio: 2 / 1;
    display: grid;
    place-items: center;
    color: var(--muted);
    border: 1px dashed var(--line-strong);
    border-radius: var(--r-sm);
  }
  .palette-preview .cap {
    display: grid;
    gap: 4px;
    font-size: 13px;
    line-height: 1.45;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sart {
    transition: none;
  }
  .wcard:hover .thumb .sart {
    transform: none;
  }
}
