/* meowda theme — house style tokens, extracted from dash.meowda.xyz,
 * print.meowda.xyz and admin.print.meowda.xyz. Made by xyoda. */

@font-face {
  font-family: "Outfit Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(fonts/outfit.woff2) format("woff2-variations");
}
@font-face {
  font-family: "Manrope Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url(fonts/manrope.woff2) format("woff2-variations");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(fonts/plex400.woff2) format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url(fonts/plex500.woff2) format("woff2");
}

:root {
  --void: #0b0d11;
  --surface: #12151c;
  --surface-2: #171b24;
  --line: #242a36;
  --line-2: #323a4a;
  --grid: #1c212b;
  --ink: #e9ecef;
  --muted: #8b94a3;
  --faint: #5b6473;
  --accent: #e8b04b;
  --accent-dim: rgba(232, 176, 75, .14);
  --accent-hover: #f0c068;
  --ok: #5ddba0;
  --ok-dim: rgba(93, 219, 160, .12);
  --ok-hover: #7de6b6;
  --no: #ff7a7a;
  --no-dim: rgba(255, 122, 122, .12);
  --mem: #8fb8ff;
  --gpu: #b8a4ff;
  --gpu2: #ff9bce;

  --display: "Outfit Variable", "Segoe UI", system-ui, -apple-system, sans-serif;
  --sans: "Manrope Variable", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "IBM Plex Mono", "Cascadia Mono", Consolas, ui-monospace, monospace;
  --ease-out: cubic-bezier(.22, 1, .36, 1);

  --gutter: max(16px, env(safe-area-inset-left), env(safe-area-inset-right));
  --sat: max(env(safe-area-inset-top, 0px), var(--sat-fallback, 0px));
  --mast-h: 64px;

  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html {
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  background: var(--void);
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background:
    radial-gradient(700px 420px at 50% -140px, rgba(232, 176, 75, .08), transparent 70%) no-repeat,
    var(--void);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}
@media (min-width: 760px) {
  body { background-attachment: fixed; }
}

::selection { background: var(--accent); color: var(--void); }

* { scrollbar-width: none; }
::-webkit-scrollbar { display: none; width: 0; height: 0; }

a { color: inherit; }
img { max-width: 100%; }
img, svg, video, .brand, .avatar, .swatch {
  -webkit-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
}
[hidden] { display: none !important; }
button { font: inherit; color: inherit; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- utilities ---------- */

.wrap { max-width: 600px; margin: 0 auto; padding-bottom: calc(40px + env(safe-area-inset-bottom)); }
.wrap.wide { max-width: 1120px; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 13px; }
.mono { font-family: var(--mono); letter-spacing: .02em; }
.center { text-align: center; }
.grow { flex: 1; min-width: 0; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.row.nowrap { flex-wrap: nowrap; }
.row.end { justify-content: flex-end; }
.stack > * + * { margin-top: 12px; }
.stack > :empty { margin-top: 0; }
.sp { flex: 1; }
.hidden { display: none !important; }

/* meowda components — ported from the CoE Print apps (print.meowda.xyz,
 * admin.print.meowda.xyz) and the tyrone dashboard (dash.meowda.xyz),
 * plus a few house-style additions. Made by xyoda. */

@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

/* ---------- header: the masthead lockup ---------- */

.mast {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(11, 13, 17, .86);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.mast-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: var(--mast-h);
  max-width: 1120px;
  margin: 0 auto;
  padding-inline: var(--gutter);
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; min-width: 0; }
.brand-mark { flex: none; width: 38px; height: 38px; display: block; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.brand-name {
  font-family: var(--display);
  font-weight: 400;
  font-size: 13px;
  letter-spacing: .2em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.brand-sub {
  margin-top: 2px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--accent);
  white-space: nowrap;
}

/* ---------- dropdown menu ---------- */

.menu { position: relative; flex: none; }
.menu-toggle {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  border-radius: 50%;
  color: var(--muted);
}
.menu-toggle:focus-visible { outline: 1px solid var(--accent); outline-offset: 2px; }
.menu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: min(280px, calc(100vw - 32px));
  padding: 16px;
  display: grid;
  gap: 12px;
  background: var(--surface-2);
  border: 1px solid var(--line-2);
  box-shadow: 0 24px 48px -20px #000;
  animation: rise .25s var(--ease-out) both;
}
.menu-panel[hidden] { display: none; }
.menu-who { display: flex; gap: 12px; align-items: center; min-width: 0; }
.menu-who strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- avatar ---------- */

.avatar {
  width: 32px;
  height: 32px;
  flex: none;
  object-fit: cover;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--line-2);
  display: inline-grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--ink);
}
.avatar.lg { width: 44px; height: 44px; font-size: 14px; }

/* ---------- tabs ---------- */

.tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--line-2);
  background: none;
  text-decoration: none;
  font: 500 11px/1 var(--mono);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
  cursor: pointer;
}
.tab:hover { color: var(--ink); border-color: var(--muted); }
.tab-count { color: var(--ink); }
.tab.hot { border-color: var(--accent); color: var(--accent); }
.tab.hot .tab-count { background: var(--accent); color: var(--void); padding: 3px 6px; margin-right: -6px; }

/* ---------- type ---------- */

.eyebrow {
  margin: 0 0 10px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--muted);
}
h1, h2, h3, .title { margin: 0; font-family: var(--display); color: var(--ink); }
h1, .title {
  font-weight: 300;
  font-size: clamp(26px, 7.4vw, 40px);
  line-height: 1.12;
  letter-spacing: .1em;
  text-transform: uppercase;
}
h2 {
  font-weight: 400;
  font-size: 14px;
  letter-spacing: .22em;
  text-transform: uppercase;
}
h3 { font-weight: 500; font-size: 17px; letter-spacing: .01em; line-height: 1.3; overflow-wrap: anywhere; }
p { margin: 0; }
.lede { margin-top: 12px; color: var(--muted); font-size: 15px; }

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 36px 0 14px;
}
.count {
  font-family: var(--mono);
  font-size: 11px;
  min-width: 26px;
  padding: 2px 8px;
  text-align: center;
  border: 1px solid var(--line-2);
  color: var(--muted);
}
.count.hot { background: var(--accent); border-color: var(--accent); color: var(--void); }

.divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 22px 0 14px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--faint);
}
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.rule { height: 1px; margin: 20px 0; background: var(--line); border: 0; }

.big-state {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(28px, 8.4vw, 46px);
  line-height: 1.08;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.tone-ok { color: var(--ok); }
.tone-no { color: var(--no); }
.tone-dim { color: var(--muted); }
.tone-wait { color: var(--accent); }

/* ---------- panels & cards ---------- */

.panel, .ticket {
  position: relative;
  background: linear-gradient(180deg, var(--surface-2), var(--surface) 120px);
  border: 1px solid var(--line);
  padding: 20px 18px;
  animation: rise .5s var(--ease-out) both;
  animation-delay: calc(var(--i, 0) * 60ms);
}
@media (min-width: 560px) { .panel, .ticket { padding: 28px; } }
.ticket + .ticket, .ticket + section { margin-top: 16px; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 12px 14px;
}
.card h2 { margin: 0; font: 500 10px/1.4 var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: .22em; }

.stub {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--faint);
}

.tile {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 10px 14px;
}
.tile h2 { margin: 0; font: 500 10px/1.4 var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: .22em; }
.big { font-family: var(--display); font-size: 28px; font-weight: 300; line-height: 1.25; margin-top: 2px; }
.big small { font-size: 12px; font-weight: 400; color: var(--muted); }
.sub { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tiles { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-top: 1px solid var(--line); }
.list li:first-child { border-top: 0; padding-top: 0; }
.list li:last-child { padding-bottom: 0; }

.cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.cards > li { min-width: 0; animation: rise .45s var(--ease-out) both; animation-delay: calc(var(--i, 0) * 40ms); }
.cards.wide { grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); }
.card-link {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  text-decoration: none;
  height: 100%;
}
a.card-link:active { background: var(--surface-2); }
@media (hover: hover) { a.card-link:hover { border-color: var(--line-2); } a.card-link:hover h3 { color: var(--accent); } }
.card-link h3 { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-link p { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); }
.grid > * { min-width: 0; }

dl.facts { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; }
dl.facts dt { font-family: var(--mono); font-size: 10px; letter-spacing: .2em; text-transform: uppercase; padding-top: 3px; color: var(--muted); }
dl.facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }

.stats {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.stats > div { flex: 1 1 40%; background: var(--surface); padding: 10px 12px; min-width: 0; }
@media (min-width: 480px) { .stats > div { flex-basis: 28%; } }
.stats dt { font: 500 10px/1.4 var(--mono); letter-spacing: .2em; text-transform: uppercase; color: var(--faint); }
.stats dd { margin: 2px 0 0; font: 500 15px/1.3 var(--display); overflow-wrap: anywhere; }

/* ---------- buttons ---------- */

.btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 20px;
  border: 1px solid var(--line-2);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font: 500 12px/1 var(--mono);
  letter-spacing: .2em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
  transition: border-color .2s var(--ease-out), background-color .2s var(--ease-out), color .2s var(--ease-out), transform .1s;
}
.btn:active:not([disabled]) { transform: scale(.98); }
@media (hover: hover) { .btn:hover { border-color: var(--ink); } }
.btn:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, .menu-toggle:focus-visible, .card-link:focus-visible, .tab:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 3px;
}
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--void); }
@media (hover: hover) { .btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); } }
.btn.ok { background: var(--ok); border-color: var(--ok); color: var(--void); }
@media (hover: hover) { .btn.ok:hover { background: var(--ok-hover); border-color: var(--ok-hover); } }
.btn.danger { color: var(--no); border-color: rgba(255, 122, 122, .4); }
@media (hover: hover) { .btn.danger:hover { border-color: var(--no); } }
.btn.block { width: 100%; }
.btn.lg { min-height: 56px; font-size: 13px; }
.btn.sm { min-height: 40px; padding: 0 14px; font-size: 11px; letter-spacing: .16em; }
.btn.ghost { border-color: transparent; padding-inline: 6px; color: var(--muted); }

.icon-btn {
  flex: none;
  width: 40px;
  height: 40px;
  border: 0;
  background: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 14px;
}

.btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.btn-row > .btn { flex: 1 1 auto; }
.btn-row.end { justify-content: flex-end; }
@media (min-width: 560px) { .btn-row > .btn { flex: 0 0 auto; } }

.scan-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px;
  text-align: left;
  background: var(--accent);
  color: var(--void);
  border: 0;
  cursor: pointer;
  touch-action: manipulation;
}
.scan-btn:active { transform: scale(.99); }
.scan-btn strong { display: block; font: 600 17px/1.2 var(--display); letter-spacing: .04em; }
.scan-btn .small { display: block; color: rgba(11, 13, 17, .72); margin-top: 3px; }
.scan-icon {
  flex: none;
  width: 44px;
  height: 44px;
  position: relative;
  background:
    linear-gradient(var(--void), var(--void)) 0 0 / 14px 3px no-repeat,
    linear-gradient(var(--void), var(--void)) 0 0 / 3px 14px no-repeat,
    linear-gradient(var(--void), var(--void)) 100% 0 / 14px 3px no-repeat,
    linear-gradient(var(--void), var(--void)) 100% 0 / 3px 14px no-repeat,
    linear-gradient(var(--void), var(--void)) 0 100% / 14px 3px no-repeat,
    linear-gradient(var(--void), var(--void)) 0 100% / 3px 14px no-repeat,
    linear-gradient(var(--void), var(--void)) 100% 100% / 14px 3px no-repeat,
    linear-gradient(var(--void), var(--void)) 100% 100% / 3px 14px no-repeat;
}
.scan-icon::after { content: ""; position: absolute; left: 8px; right: 8px; top: 20px; height: 3px; background: var(--void); }

/* ---------- forms ---------- */

label.field { display: block; min-width: 0; }
label.field > span {
  display: block;
  margin-bottom: 8px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--muted);
}
input[type=text], input[type=number], input[type=email], input[type=password], textarea, select {
  width: 100%;
  min-height: 48px;
  font: 16px/1.4 var(--sans);
  color: var(--ink);
  background: var(--void);
  border: 1px solid var(--line-2);
  border-radius: 0;
  padding: 12px 14px;
  transition: border-color .2s var(--ease-out);
}
select {
  appearance: none;
  background: var(--void) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%238b94a3' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 14px center;
  padding-right: 36px;
}
input:focus, textarea:focus, select:focus { border-color: var(--accent); outline: none; }
input::placeholder, textarea::placeholder { color: var(--faint); }
textarea { resize: vertical; min-height: 84px; font-family: var(--mono); font-size: 16px; }
.check { display: flex; gap: 12px; align-items: center; min-height: 44px; color: var(--muted); }
.check input { width: 22px; height: 22px; accent-color: var(--accent); }
.two { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 420px) { .two { grid-template-columns: 3fr 2fr; } }

.pin-input {
  font-family: var(--mono) !important;
  font-weight: 500;
  font-size: clamp(26px, 9vw, 34px) !important;
  letter-spacing: .45em;
  text-align: center;
  padding: 16px 0 16px .45em !important;
  min-height: 68px !important;
}
.pin-input::placeholder { color: var(--line-2); }

.code-plate {
  margin: 18px 0 0;
  padding: 18px 0;
  border: 1px solid var(--line);
  background: var(--surface-2);
  text-align: center;
  font-size: clamp(26px, 8vw, 34px);
  font-weight: 500;
  font-family: var(--mono);
  letter-spacing: .28em;
  text-indent: .28em;
}

/* ---------- badges, stamps & dots ---------- */

.stamp {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: none;
  font: 500 10px/1 var(--mono);
  letter-spacing: .2em;
  text-transform: uppercase;
  padding: 6px 8px;
  border: 1px solid currentColor;
  white-space: nowrap;
}
.stamp.ok { color: var(--ok); background: var(--ok-dim); }
.stamp.no { color: var(--no); background: var(--no-dim); }
.stamp.wait { color: var(--accent); background: var(--accent-dim); }
.stamp.dim { color: var(--muted); border-color: var(--line-2); }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 3px 11px;
  border-radius: 0;
  font: 500 11px/1.4 var(--mono);
  letter-spacing: .12em;
  text-transform: uppercase;
  border: 1px solid var(--line);
  background: var(--surface);
}
.pill i { width: 8px; height: 8px; border-radius: 0; background: var(--muted); }
.pill.ok i { background: var(--ok); }
.pill.warn i { background: var(--accent); }
.pill.bad i { background: var(--no); }

.chip {
  display: inline-block;
  margin: 0 6px 4px 0;
  padding: 2px 8px;
  border: 1px solid var(--line-2);
  font-family: var(--mono);
  font-size: 12px;
}

.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--faint); vertical-align: middle; }
.dot.live { background: var(--ok); animation: ping 2s infinite; }
@keyframes ping {
  0% { box-shadow: 0 0 0 0 rgba(93, 219, 160, .55); }
  80%, 100% { box-shadow: 0 0 0 8px transparent; }
}

.spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid var(--line-2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }

.hazard {
  position: relative;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent) 45%, var(--accent) 55%, transparent) -60% 0 / 60% 100% no-repeat, var(--accent-dim);
  animation: sweep 2.4s var(--ease-out) infinite;
}
@keyframes sweep { to { background-position: 160% 0, 0 0; } }

/* ---------- alerts & notices ---------- */

.notice { padding: 12px 14px; border: 1px solid currentColor; font-size: 14px; }
.notice.no { color: var(--no); background: var(--no-dim); }
.notice.ok { color: var(--ok); background: var(--ok-dim); }
.notice.info { color: var(--muted); background: var(--surface-2); border-color: var(--line-2); }

/* ---------- meters, bars & charts ---------- */

.meter { height: 4px; background: var(--surface-2); border-radius: 0; margin-top: 8px; overflow: hidden; display: block; }
.meter i { display: block; height: 100%; background: var(--accent); width: 0; }

.bars { display: flex; gap: 1px; height: 22px; }
.bars i { flex: 1; min-width: 1px; background: var(--ok); border-radius: 0; }
.bars i.p { background: #8ac36a; }
.bars i.w { background: var(--accent); }
.bars i.b { background: var(--no); }
.bars i.n { background: var(--line); }
@media (hover: hover) { .bars i:hover { outline: 1px solid var(--ink); } }

.svc { display: grid; grid-template-columns: 10px minmax(0, 130px) minmax(0, 1fr) 56px; gap: 10px; align-items: center; padding: 7px 0; border-top: 1px solid var(--grid); }
.svc:first-child { border-top: 0; }
.svc .d { width: 8px; height: 8px; border-radius: 0; background: var(--ok); }
.svc .d.bad { background: var(--no); }
.svc .n { font-weight: 600; line-height: 1.2; }
.svc .n small { display: block; font-weight: 400; color: var(--muted); font-size: 11px; overflow: hidden; text-overflow: ellipsis; }
.svc .p { text-align: right; font-weight: 600; }

.plot { display: flex; gap: 8px; margin-top: 8px; height: clamp(110px, 19vh, 210px); }
.yax { display: flex; flex-direction: column; justify-content: space-between; text-align: right; font-size: 10px; color: var(--muted); min-width: 46px; line-height: 1; }
.plot svg { flex: 1; width: 0; min-width: 0; height: 100%; display: block; overflow: hidden; }
.xax { display: flex; justify-content: space-between; font-size: 10px; color: var(--muted); margin: 3px 0 0 54px; }
.legend { font-family: var(--mono); font-size: 11px; display: flex; gap: 14px; flex-wrap: wrap; }
.legend b { font-weight: 600; }
.legend i { display: inline-block; width: 10px; height: 3px; border-radius: 0; margin-right: 6px; vertical-align: middle; }
.ch-top { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.axis { display: flex; justify-content: space-between; font-size: 10px; color: var(--muted); margin-top: 6px; }
.note { font-size: 11px; color: var(--muted); margin-top: 8px; }

/* ---------- swatches ---------- */

.filaments { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
.filaments li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  font-size: 14px;
}
.swatch {
  flex: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--swatch, var(--faint));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18);
}
.swatch.unknown { background: repeating-linear-gradient(45deg, var(--line-2) 0 3px, var(--surface) 3px 6px); }
.fil-type { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fil-amount { font-family: var(--mono); font-size: 12px; color: var(--muted); white-space: nowrap; }

/* ---------- steps ---------- */

.steps {
  list-style: none;
  counter-reset: step;
  margin: 20px 0 22px;
  padding: 0;
  display: grid;
  gap: 10px;
}
.steps li {
  counter-increment: step;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 15px;
}
.steps li::before {
  content: counter(step);
  flex: none;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--accent);
  color: var(--accent);
  font: 500 12px/1 var(--mono);
}
.steps strong { color: var(--ink); font-weight: 600; }

/* ---------- empty state ---------- */

.empty {
  padding: 24px 18px;
  text-align: center;
  color: var(--faint);
  border: 1px dashed var(--line-2);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .04em;
}

/* ---------- skeleton ---------- */

.skeleton {
  background: linear-gradient(90deg, var(--surface) 25%, var(--surface-2) 50%, var(--surface) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s var(--ease-out) infinite;
  border: 1px solid var(--line);
}
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- dialog (bottom sheet on phones) ---------- */

dialog {
  width: min(560px, calc(100vw - 32px));
  max-height: calc(100dvh - 48px);
  padding: 0;
  border: 1px solid var(--line-2);
  border-radius: 0;
  background: var(--surface);
  color: var(--ink);
  overscroll-behavior: contain;
}
dialog::backdrop { background: rgba(5, 6, 9, .72); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
.sheet { padding: 22px 18px calc(20px + env(safe-area-inset-bottom)); }
.grabber { display: none; }
@media (max-width: 559px) {
  dialog {
    width: 100vw;
    max-width: 100vw;
    margin: auto 0 0;
    max-height: 92dvh;
    border-width: 1px 0 0;
    border-radius: 16px 16px 0 0;
    animation: sheet .3s var(--ease-out) both;
  }
  .grabber { display: block; width: 40px; height: 4px; margin: -10px auto 16px; border-radius: 2px; background: var(--line-2); }
  .sheet .btn-row.end > .btn { flex: 1 1 0; }
}
@keyframes sheet { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- toast ---------- */

.toast {
  position: fixed;
  left: max(16px, env(safe-area-inset-left));
  right: max(16px, env(safe-area-inset-right));
  bottom: calc(20px + env(safe-area-inset-bottom));
  width: fit-content;
  max-width: 560px;
  margin-inline: auto;
  overflow-wrap: anywhere;
  padding: 13px 18px;
  background: var(--surface-2);
  border: 1px solid var(--line-2);
  border-left: 2px solid var(--accent);
  color: var(--ink);
  font-size: 14px;
  box-shadow: 0 18px 40px -18px #000;
  animation: rise .3s var(--ease-out) both;
  z-index: 40;
}
.toast[hidden] { display: none; }

/* ---------- action bar ---------- */

.action-bar {
  position: sticky;
  bottom: 0;
  z-index: 5;
  padding: 12px 18px calc(12px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgba(18, 21, 28, 0), var(--surface) 30%);
}

/* ---------- footer ---------- */

footer.credit {
  margin-top: 48px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 8px 12px;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--faint);
}
