/* =========================================================================
   Epigonion admin — redesign mockup system
   World: «Ателье» — linen paper, ink, one woad dye, one madder warning.
   Nothing here ships as-is: this is a set of screens to approve a direction.
   ========================================================================= */

@font-face {
  font-family: "Golos Text";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("./fonts/golos-text-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Golos Text";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("./fonts/golos-text-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Golos Text";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("./fonts/golos-text-currency.woff2") format("woff2");
  unicode-range: U+20BD;
}
@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("./fonts/cormorant-garamond-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("./fonts/cormorant-garamond-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: light;

  /* Linen and ink ------------------------------------------------------- */
  --paper: #eff1ec;
  --paper-deep: #e6e9e2;
  --surface: #ffffff;
  --surface-2: #f7f8f5;
  --ink: #14181a;
  --ink-2: #4a5350;
  --ink-3: #626b66;
  --line: #d9dcd4;
  --line-soft: #e7e9e2;

  /* Dyes. Woad carries structure; madder only ever warns. ---------------- */
  --woad: #2c4a5e;
  --woad-soft: #e3ebf0;
  --woad-line: #b9cbd6;
  --madder: #a13a26;
  --madder-soft: #f7e8e3;
  --moss: #35634a;
  --moss-soft: #e5efe7;
  --amber: #8a5a12;
  --amber-soft: #f6eddc;
  --amber-line: #e4d3b2;

  --focus: #2c4a5e;
  --shadow-1: 0 1px 0 rgba(20, 24, 26, 0.04);
  --shadow-2: 0 18px 40px -24px rgba(20, 24, 26, 0.35);

  --font-ui: "Golos Text", system-ui, -apple-system, "Segoe UI", Roboto, Arial,
    sans-serif;
  --font-display: "Cormorant Garamond", "Times New Roman", Georgia, serif;

  --rail: 236px;
  --topbar: 58px;
  --r-1: 8px;
  --r-2: 12px;
  --ease: cubic-bezier(0.2, 0, 0, 1);
}

[data-theme="dark"] {
  color-scheme: dark;
  --paper: #0f1213;
  --paper-deep: #0b0e0f;
  --surface: #171b1d;
  --surface-2: #1e2325;
  --ink: #e9ebe4;
  --ink-2: #aab2ac;
  --ink-3: #7e8781;
  --line: #2b3133;
  --line-soft: #232829;
  --woad: #9dc0d4;
  --woad-soft: #1e2a31;
  --woad-line: #33474f;
  --madder: #e59482;
  --madder-soft: #33211d;
  --moss: #8fc0a2;
  --moss-soft: #1b2a22;
  --amber: #ddb377;
  --amber-soft: #2b2418;
  --amber-line: #4a3d26;
  --focus: #9dc0d4;
  --shadow-1: 0 1px 0 rgba(0, 0, 0, 0.4);
  --shadow-2: 0 18px 40px -24px rgba(0, 0, 0, 0.8);
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 14px;
  line-height: 1.45;
  font-feature-settings: "ss01" on;
  -webkit-font-smoothing: antialiased;
  touch-action: manipulation;
}

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

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

a {
  color: inherit;
  text-decoration: none;
}

::selection {
  background: var(--woad);
  color: #fff;
}

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

[hidden] {
  display: none !important;
}

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

.skip {
  position: fixed;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 10px 14px;
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--r-1);
  transition: top 0.15s var(--ease);
}
.skip:focus {
  top: 12px;
}

.num {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" on;
}

/* =========================================================================
   Shell
   ========================================================================= */

.app {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: var(--rail) minmax(0, 1fr);
}

.rail {
  position: sticky;
  top: 0;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line);
  background: var(--paper);
  padding: 14px 12px 10px;
  z-index: 20;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 8px 14px;
}

.brand-mark {
  width: 26px;
  height: 26px;
  color: var(--ink);
  flex: none;
}

.brand-name {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.brand-sub {
  display: block;
  font-size: 11.5px;
  font-weight: 400;
  color: var(--ink-3);
  letter-spacing: 0;
}

.rail-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
  padding-right: 2px;
}

.rail-group {
  margin: 0 0 14px;
}

.rail-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px 6px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-3);
}

.rail-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 34px;
  padding: 0 10px;
  border-radius: var(--r-1);
  color: var(--ink-2);
  font-size: 13.5px;
  font-weight: 500;
  transition: background-color 0.14s var(--ease), color 0.14s var(--ease);
}

.rail-link svg {
  width: 16px;
  height: 16px;
  flex: none;
  color: var(--ink-3);
  transition: color 0.14s var(--ease);
}

.rail-link:hover {
  background: var(--surface);
  color: var(--ink);
}

.rail-link[aria-current="page"] {
  background: var(--surface);
  color: var(--ink);
  font-weight: 600;
  box-shadow: var(--shadow-1);
}


.rail-link[aria-current="page"] svg {
  color: var(--woad);
}

.rail-count {
  margin-left: auto;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  display: grid;
  place-items: center;
  border-radius: 5px;
  background: var(--madder);
  color: #fff;
  font-size: 11.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.rail-count--quiet {
  background: var(--paper-deep);
  color: var(--ink-2);
}

.rail-foot {
  border-top: 1px solid var(--line);
  padding-top: 10px;
  margin-top: 6px;
}

.who {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 6px 8px;
  border: 0;
  border-radius: var(--r-1);
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.who:hover {
  background: var(--surface);
}

.avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: var(--paper);
  font-size: 11.5px;
  font-weight: 600;
  flex: none;
}

.who-name {
  font-size: 12.5px;
  font-weight: 600;
  display: block;
  line-height: 1.25;
}

.who-role {
  font-size: 11.5px;
  color: var(--ink-3);
}

/* Top bar ---------------------------------------------------------------- */

.main {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 15;
  height: var(--topbar);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 24px;
  background: color-mix(in oklab, var(--paper) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.crumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--ink-3);
  min-width: 0;
}

.crumbs strong {
  color: var(--ink);
  font-weight: 600;
}

.crumbs svg {
  width: 13px;
  height: 13px;
}

.topbar-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.search {
  position: relative;
  width: 268px;
}

.search svg {
  position: absolute;
  left: 10px;
  top: 50%;
  translate: 0 -50%;
  width: 15px;
  height: 15px;
  color: var(--ink-3);
  pointer-events: none;
}

.search input {
  width: 100%;
  height: 34px;
  padding: 0 58px 0 32px;
  border: 1px solid var(--line);
  border-radius: var(--r-1);
  background: var(--surface);
  font-size: 13px;
}

.search input::placeholder {
  color: var(--ink-3);
}

.kbd {
  position: absolute;
  right: 7px;
  top: 50%;
  translate: 0 -50%;
  display: flex;
  gap: 2px;
  color: var(--ink-3);
  font-size: 11.5px;
  pointer-events: none;
}

.kbd span {
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1px 4px;
  background: var(--surface-2);
}

.icon-btn {
  position: relative;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-1);
  background: var(--surface);
  color: var(--ink-2);
  cursor: pointer;
  transition: border-color 0.14s var(--ease), color 0.14s var(--ease);
}

.icon-btn:hover {
  color: var(--ink);
  border-color: var(--woad-line);
}

.icon-btn svg {
  width: 16px;
  height: 16px;
}

.icon-btn .dot {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--madder);
  box-shadow: 0 0 0 2px var(--surface);
}

/* =========================================================================
   Content
   ========================================================================= */

.page {
  width: min(100%, 1560px);
  padding: 26px 32px 56px;
}

.page--flush {
  padding: 0;
  width: 100%;
  max-width: none;
}

.head {
  display: flex;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 22px;
}

.head-main {
  min-width: 0;
}

.display {
  margin: 0;
  font-variant-numeric: lining-nums;
  font-feature-settings: "lnum" 1;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 34px;
  line-height: 1.08;
  letter-spacing: 0.002em;
  text-wrap: balance;
}

.display--sm {
  font-size: 27px;
}

.lede {
  margin: 6px 0 0;
  max-width: 68ch;
  font-size: 13.5px;
  color: var(--ink-2);
  text-wrap: pretty;
}

.head-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 13px;
  border: 1px solid transparent;
  border-radius: var(--r-1);
  background: transparent;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.14s var(--ease), border-color 0.14s var(--ease),
    color 0.14s var(--ease);
}

.btn svg {
  width: 15px;
  height: 15px;
}

.btn--primary {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
.btn--primary:hover {
  background: color-mix(in oklab, var(--ink) 86%, var(--woad));
}

.btn--line {
  background: var(--surface);
  border-color: var(--line);
  color: var(--ink);
}
.btn--line:hover {
  border-color: var(--woad-line);
}

.btn--quiet {
  color: var(--ink-2);
}
.btn--quiet:hover {
  background: var(--surface);
  color: var(--ink);
}

.btn--danger {
  background: var(--surface);
  border-color: color-mix(in oklab, var(--madder) 40%, var(--line));
  color: var(--madder);
}
.btn--danger:hover {
  background: var(--madder-soft);
}

.btn--sm {
  height: 28px;
  padding: 0 9px;
  font-size: 12px;
  border-radius: 6px;
}

.btn[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}

/* Metrics ledger (no card grid) ----------------------------------------- */

.metrics {
  display: flex;
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-bottom: 24px;
}

.metric {
  flex: 1 1 150px;
  min-width: 150px;
  padding: 14px 20px 15px;
  border-left: 1px solid var(--line-soft);
}
.metric:first-child {
  border-left: 0;
  padding-left: 0;
}

.metric-label {
  display: block;
  font-size: 12px;
  color: var(--ink-3);
  margin-bottom: 3px;
}

.metric-value {
  font-size: 25px;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.1;
}

.metric-foot {
  margin-top: 3px;
  font-size: 12px;
  color: var(--ink-3);
  display: flex;
  gap: 6px;
  align-items: center;
}

.delta {
  font-weight: 600;
}
.delta--up {
  color: var(--moss);
}
.delta--down {
  color: var(--madder);
}

/* Panels ----------------------------------------------------------------- */

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  box-shadow: var(--shadow-1);
}

.panel-head {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  padding: 8px 14px;
  border-bottom: 1px solid var(--line-soft);
}

.panel-title {
  margin: 0;
  font-size: 13.5px;
  font-weight: 600;
}

.panel-sub {
  font-size: 12px;
  color: var(--ink-3);
}

.panel-head .btn {
  margin-left: auto;
}

.panel-body {
  padding: 14px;
}

.panel-body--flush {
  padding: 0;
}

.block-title {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 600;
}

.hairline {
  height: 1px;
  background: var(--line-soft);
  border: 0;
  margin: 16px 0;
}

/* Dashboard grid --------------------------------------------------------- */

.dash {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.85fr);
  gap: 18px;
  align-items: start;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* Queue ------------------------------------------------------------------ */

.queue-group + .queue-group {
  border-top: 1px solid var(--line-soft);
}

.queue-group-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 11px 14px 7px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-2);
}

.queue-group-head .count {
  color: var(--ink-3);
  font-weight: 500;
}

.q {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 11px;
  padding: 9px 14px;
  transition: background-color 0.14s var(--ease);
}

.q + .q {
  border-top: 1px solid var(--line-soft);
}

.q:hover {
  background: var(--surface-2);
}

.q-flag {
  display: none;
}

.q--now .q-icon {
  background: var(--madder-soft);
  color: var(--madder);
}

.q--soon .q-icon {
  background: var(--amber-soft);
  color: var(--amber);
}

.q-icon {
  width: 30px;
  height: 30px;
  border-radius: var(--r-1);
  display: grid;
  place-items: center;
  background: var(--surface-2);
  color: var(--ink-2);
}

.q-icon svg {
  width: 15px;
  height: 15px;
}

.q-main {
  min-width: 0;
}

.q-title {
  display: block;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.q-meta {
  display: block;
  font-size: 12px;
  color: var(--ink-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.q-amount {
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.q-time {
  margin-left: -4px;
  font-size: 12px;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
  width: 46px;
  text-align: right;
}

/* Pipeline --------------------------------------------------------------- */

.pipeline {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  border-top: 1px solid var(--line-soft);
}

.stage {
  padding: 12px 14px 14px;
  border-left: 1px solid var(--line-soft);
  position: relative;
}
.stage:first-child {
  border-left: 0;
}

.stage-label {
  font-size: 12px;
  color: var(--ink-3);
}

.stage-value {
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-top: 2px;
}

.stage-bar {
  height: 2px;
  margin-top: 9px;
  background: var(--line-soft);
  border-radius: 2px;
  overflow: hidden;
}

.stage-bar span {
  display: block;
  height: 100%;
  background: var(--woad);
  opacity: 0.55;
}

.stage--alert .stage-value {
  color: var(--madder);
}
.stage--alert .stage-bar span {
  background: var(--madder);
  opacity: 0.7;
}

/* Sparkline -------------------------------------------------------------- */

.spark {
  display: block;
  width: 100%;
  height: 62px;
  overflow: visible;
}

.spark path.line {
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.5;
}

.spark path.area {
  fill: var(--woad);
  opacity: 0.13;
  stroke: none;
}

/* =========================================================================
   Master-detail (orders, products, customers)
   ========================================================================= */

.workspace {
  display: grid;
  grid-template-columns: minmax(380px, 430px) minmax(0, 1fr);
  min-height: calc(100dvh - var(--topbar));
  border-top: 0;
}

.pane {
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.workspace--fixed {
  height: calc(100dvh - var(--topbar));
  overflow: hidden;
}

.pane--list {
  border-right: 1px solid var(--line);
  background: var(--surface);
}

.pane--detail {
  overflow: hidden;
  background: var(--paper);
}

.ordid {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-3);
  letter-spacing: 0.01em;
}

.pane-head {
  padding: 14px 16px 12px;
  border-bottom: 1px solid var(--line-soft);
  position: sticky;
  top: 0;
  background: var(--surface);
  z-index: 5;
}

.pane-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 10px;
}

.pane-title .display {
  font-size: 24px;
}

.pane-title .count {
  font-size: 12px;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}

.pane-title .btn {
  margin-left: auto;
}

.pane-tools {
  display: flex;
  gap: 6px;
  align-items: center;
}

.pane-tools .search {
  flex: 1;
  width: auto;
}

.list {
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  scrollbar-width: thin;
}

.list-row {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  padding: 11px 14px;
  border: 0;
  border-bottom: 1px solid var(--line-soft);
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.12s var(--ease);
}

.list-row:hover {
  background: var(--surface-2);
}

.list-row[aria-current="true"] {
  background: var(--woad-soft);
  box-shadow: inset 3px 0 0 var(--woad);
}

.list-row .swatch {
  width: 44px;
  height: 44px;
}

.row-title {
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.row-title span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.row-sub {
  margin-top: 2px;
  font-size: 12px;
  color: var(--ink-3);
  display: flex;
  gap: 6px;
  align-items: center;
  min-width: 0;
}

.row-sub span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.row-side {
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
}

.row-sum {
  font-size: 12.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.row-time {
  font-size: 11.5px;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}

/* Detail ----------------------------------------------------------------- */

.detail {
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  scrollbar-width: thin;
}

.detail-head {
  position: sticky;
  top: 0;
  z-index: 6;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  padding: 16px 24px 0;
}

.detail-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.detail-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 600;
  letter-spacing: 0.002em;
}

.detail-meta {
  font-size: 12px;
  color: var(--ink-3);
  margin-left: 2px;
}

.detail-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.detail-body {
  padding: 20px 24px 40px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
  gap: 22px;
  align-items: start;
}

.detail-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.detail-side {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* Status rail ------------------------------------------------------------ */

.rail-track {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  margin: 14px 0 0;
  padding: 0 0 14px;
  list-style: none;
}

.step {
  position: relative;
  padding-top: 16px;
  font-size: 12px;
  color: var(--ink-3);
  min-width: 0;
}

.step::before {
  content: "";
  position: absolute;
  top: 4px;
  left: 0;
  right: 0;
  height: 1.5px;
  background: color-mix(in oklab, var(--ink-3) 62%, var(--paper));
}

.step:first-child::before {
  left: 6px;
}

.step:last-child::before {
  right: calc(100% - 6px);
}

.step-dot {
  position: absolute;
  top: -1px;
  left: 0;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--surface);
  border: 1.5px solid var(--line);
}

.step--done .step-dot {
  background: var(--ink);
  border-color: var(--ink);
}

.step--now .step-dot {
  background: var(--surface);
  border: 3px solid var(--woad);
}

.step--done,
.step--now {
  color: var(--ink);
}

.step-name {
  display: block;
  font-weight: 600;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.step-time {
  display: block;
  font-variant-numeric: tabular-nums;
}

.step--now .step-name {
  color: var(--woad);
}

/* Blocks inside detail --------------------------------------------------- */

.block {
  background: transparent;
  border: 0;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.block-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.block-head h3 {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
}

.block-head .btn {
  margin-left: auto;
}

.defs {
  display: grid;
  gap: 9px;
}

.defs div {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 12px;
  font-size: 12.5px;
}

.defs dt,
.defs .dt {
  color: var(--ink-3);
}

.defs dd,
.defs .dd {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}

.lines {
  display: flex;
  flex-direction: column;
}

.line {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  gap: 11px;
  align-items: center;
  padding: 9px 0;
  border-top: 1px solid var(--line-soft);
  font-size: 12.5px;
}
.line:first-child {
  border-top: 0;
  padding-top: 0;
}

.line-name {
  display: block;
  font-weight: 500;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.line-sub {
  display: block;
  font-size: 12px;
  color: var(--ink-3);
}

.line-sum {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.total-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-top: 10px;
  margin-top: 4px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  font-weight: 600;
}

/* Swatches (stand-ins for product photos) -------------------------------- */

.swatch {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 6px;
  border: 1px solid var(--line-soft);
  background-color: #dfe2da;
  background-image: linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.55),
      rgba(255, 255, 255, 0) 58%
    ),
    linear-gradient(315deg, rgba(20, 24, 26, 0.07), rgba(20, 24, 26, 0) 62%);
}

.swatch--b {
  background-color: #c9d3d9;
}
.swatch--c {
  background-color: #d9cfc2;
}
.swatch--d {
  background-color: #cdd5c7;
}
.swatch--e {
  background-color: #d5ccd6;
}

.swatch--lg {
  aspect-ratio: 4 / 5;
  border-radius: var(--r-1);
}

.swatch-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

/* =========================================================================
   Status chips
   ========================================================================= */

.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 20px;
  padding: 0 7px;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  background: var(--surface-2);
  color: var(--ink-2);
}

.chip::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.75;
}

.chip--ok {
  background: var(--moss-soft);
  color: var(--moss);
}
.chip--wait {
  background: var(--amber-soft);
  color: var(--amber);
}
.chip--bad {
  background: var(--madder-soft);
  color: var(--madder);
}
.chip--info {
  background: var(--woad-soft);
  color: var(--woad);
}
.chip--plain::before {
  display: none;
}

/* =========================================================================
   Forms
   ========================================================================= */

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

.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.field--wide {
  grid-column: 1 / -1;
}

.label {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-2);
}

.hint {
  font-size: 12px;
  color: var(--ink-3);
}

.input,
.select,
.textarea {
  width: 100%;
  min-height: 36px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-1);
  background: var(--surface);
  font-size: 13px;
}

.input:hover,
.select:hover,
.textarea:hover {
  border-color: var(--woad-line);
}

.textarea {
  min-height: 84px;
  resize: vertical;
}

.input[readonly] {
  background: var(--surface-2);
  color: var(--ink-2);
}

.field-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.switch {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  font-size: 13px;
}

.switch input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.switch .track {
  position: relative;
  width: 34px;
  height: 20px;
  border-radius: 999px;
  background: var(--line);
  transition: background-color 0.16s var(--ease);
  flex: none;
}

.switch .track::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
  transition: transform 0.16s var(--ease);
}

.switch input:checked + .track {
  background: var(--woad);
}

.switch input:checked + .track::after {
  transform: translateX(14px);
}

.switch input:focus-visible + .track {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.segmented {
  display: inline-flex;
  padding: 3px;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: var(--r-1);
  background: var(--surface-2);
}

.segmented button {
  height: 26px;
  padding: 0 10px;
  line-height: 1;
  border: 0;
  border-radius: 6px;
  background: transparent;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-3);
  cursor: pointer;
}

.segmented button[aria-pressed="true"] {
  background: var(--surface);
  color: var(--ink);
  font-weight: 600;
  box-shadow: var(--shadow-1);
}

/* =========================================================================
   Tables (ledger)
   ========================================================================= */

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

table.ledger {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}

.ledger thead th {
  text-align: left;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-3);
  background: var(--surface-2);
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.ledger tbody td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: middle;
}

.ledger tbody tr:last-child td {
  border-bottom: 0;
}

.ledger tbody tr:hover {
  background: var(--surface-2);
}

.ledger .r {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.ledger .strong {
  font-weight: 600;
}

/* =========================================================================
   Tabs
   ========================================================================= */

.tabs {
  display: flex;
  gap: 2px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 16px;
  overflow-x: auto;
  scrollbar-width: none;
}

.tabs button,
.tabs a {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 11px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink-3);
  white-space: nowrap;
  cursor: pointer;
}

.tabs button:hover,
.tabs a:hover {
  color: var(--ink);
}

.tabs button[aria-selected="true"],
.tabs a[aria-selected="true"] {
  color: var(--ink);
  font-weight: 600;
  border-bottom-color: var(--woad);
}

/* =========================================================================
   Content workspace
   ========================================================================= */

.editor-mobile-bar {
  display: none;
}

.inspect-grab {
  display: none;
}

.inspect-close {
  display: none;
  margin-left: auto;
  flex: none;
}

@media (max-width: 1080px) {
  .inspect-grab {
    display: block;
    width: 38px;
    height: 4px;
    margin: 8px auto 0;
    border-radius: 999px;
    background: var(--line);
    flex: none;
  }
  .inspect-close {
    display: inline-flex;
  }
  .inspector-head {
    display: flex;
    align-items: flex-start;
    gap: 10px;
  }
}

.editor {
  display: grid;
  grid-template-columns: 268px minmax(360px, 1fr) 340px;
  height: calc(100dvh - var(--topbar));
  overflow: hidden;
}

.col {
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.col--list {
  border-right: 1px solid var(--line);
  background: var(--surface);
}

.col--inspect {
  border-left: 1px solid var(--line);
  background: var(--surface);
}

.col-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line-soft);
  position: sticky;
  top: 0;
  background: inherit;
  z-index: 4;
}

.col-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-2);
}

.col-head .btn {
  margin-left: auto;
}

.col-body {
  overflow-y: auto;
  padding: 12px;
  scrollbar-width: thin;
  flex: 1;
  min-height: 0;
}

.blocklist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.blockitem {
  display: grid;
  grid-template-columns: 12px 26px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  padding: 8px 8px 8px 4px;
  border-radius: var(--r-1);
  border: 1px solid transparent;
  cursor: pointer;
  background: transparent;
  width: 100%;
  text-align: left;
}

.blockitem:hover {
  background: var(--surface-2);
}

.blockitem[aria-current="true"] {
  background: var(--woad-soft);
  border-color: var(--woad-line);
}

.grip {
  color: var(--ink-3);
  padding-top: 2px;
}

.grip svg {
  width: 12px;
  height: 12px;
}

.blockitem .idx {
  width: 22px;
  height: 22px;
  border-radius: 5px;
  background: var(--surface);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}

.blockitem-name {
  font-size: 12.5px;
  font-weight: 600;
  display: block;
}

.blockitem-meta {
  font-size: 11.5px;
  color: var(--ink-3);
}

.pv {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: none;
}

.preview-stage {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: grid;
  place-items: start center;
  padding: 22px 16px 40px;
  background: var(--paper-deep);
  scrollbar-width: thin;
}

.phone-frame {
  width: 366px;
  height: 772px;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: var(--surface);
  box-shadow: var(--shadow-2);
  overflow: hidden;
}

.phone-notch {
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.phone-notch span {
  width: 62px;
  height: 5px;
  border-radius: 999px;
  background: var(--paper-deep);
}

.pv {
  padding: 0 0 22px;
}

.pv-block {
  position: relative;
  padding: 10px 0;
  border-radius: 8px;
}

.pv-block:hover {
  outline: 1px dashed var(--woad-line);
  outline-offset: -1px;
}

.pv-tag {
  position: absolute;
  top: -2px;
  right: 8px;
  font-size: 9px;
  font-weight: 600;
  color: var(--woad);
  background: var(--woad-soft);
  border-radius: 4px;
  padding: 1px 5px;
  opacity: 0.65;
}

.pv-hero {
  padding: 14px 16px 10px;
}

.pv-eyebrow {
  font-size: 10px;
  font-weight: 600;
  color: var(--ink-3);
}

.pv-title {
  font-family: var(--font-display);
  font-size: 25px;
  font-weight: 600;
  line-height: 1.05;
  margin: 2px 0 8px;
}

.pv-cover {
  height: 150px;
  border-radius: 10px;
  margin: 0 0 10px;
  position: relative;
  overflow: hidden;
  background-color: #cfd7dc;
  background-image: radial-gradient(
      120% 90% at 18% 8%,
      rgba(255, 255, 255, 0.62),
      rgba(255, 255, 255, 0) 62%
    ),
    linear-gradient(160deg, rgba(44, 74, 94, 0.16), rgba(44, 74, 94, 0) 70%);
}

.pv-cover-label {
  position: absolute;
  left: 10px;
  bottom: 10px;
  background: rgba(255, 255, 255, 0.92);
  color: #14181a;
  border-radius: 5px;
  padding: 3px 7px;
  font-size: 10.5px;
  font-weight: 600;
}

.pv-row {
  display: flex;
  gap: 8px;
  padding: 0 16px;
}

.pv-card {
  flex: 1;
  min-width: 0;
}

.pv-card .swatch {
  width: 100%;
  height: 152px;
  aspect-ratio: auto;
}

.pv-card b {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
  margin-top: 5px;
}

.pv-card i {
  display: block;
  font-size: 11px;
  font-style: normal;
  color: var(--ink-3);
}

.pv-note {
  margin: 10px 16px 0;
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 11px;
  color: var(--ink-3);
}

.inspector {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.inspector-head {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line-soft);
}

.inspector-title {
  font-size: 13px;
  font-weight: 600;
  margin: 0;
}

.inspector-sub {
  font-size: 12px;
  color: var(--ink-3);
  margin-top: 2px;
}

.inspector-body {
  padding: 12px 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
}

.channel-row {
  display: flex;
  gap: 6px;
}

.chip-toggle {
  height: 26px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-2);
  cursor: pointer;
}

.chip-toggle[aria-pressed="true"] {
  border-color: var(--woad-line);
  background: var(--woad-soft);
  color: var(--woad);
  font-weight: 600;
}

/* Settings --------------------------------------------------------------- */

.settings {
  display: grid;
  min-width: 0;
  grid-template-columns: 210px minmax(0, 780px);
  gap: 32px;
  align-items: start;
}

.settings > * {
  min-width: 0;
}

.subnav {
  position: sticky;
  top: calc(var(--topbar) + 20px);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.subnav a {
  padding: 7px 10px;
  border-radius: var(--r-1);
  font-size: 12.5px;
  color: var(--ink-2);
}

.subnav a:hover {
  background: var(--surface);
  color: var(--ink);
}

.subnav a {
  position: relative;
}

.subnav a[aria-current="true"] {
  background: var(--surface);
  color: var(--woad);
  font-weight: 600;
}


.subnav .danger {
  color: var(--madder);
}

.settings-section + .settings-section {
  margin-top: 26px;
  border-top: 1px solid var(--line);
  padding-top: 22px;
}

.settings-section h2 {
  margin: 0 0 3px;
  font-size: 15px;
  font-weight: 600;
}

.settings-section > p {
  margin: 0 0 14px;
  font-size: 12.5px;
  color: var(--ink-3);
  max-width: 62ch;
}

.row-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 340px);
  gap: 20px;
  align-items: start;
  padding: 12px 0;
  border-top: 1px solid var(--line-soft);
}

.row-field:first-of-type {
  border-top: 0;
}

.row-field .label {
  font-size: 13px;
}

.aside-note {
  border-left: 2px solid var(--woad-line);
  padding: 0 0 0 12px;
  font-size: 12px;
  color: var(--ink-2);
}

.aside-note b {
  display: block;
  font-size: 12px;
  margin-bottom: 4px;
}

/* Callouts --------------------------------------------------------------- */

.callout {
  display: flex;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--r-1);
  background: var(--amber-soft);
  border: 1px solid var(--amber-line);
  font-size: 12.5px;
  color: var(--ink-2);
}

.callout svg {
  width: 16px;
  height: 16px;
  color: var(--amber);
  flex: none;
  margin-top: 1px;
}

.empty {
  padding: 32px 16px;
  text-align: center;
  color: var(--ink-3);
  font-size: 12.5px;
}

.empty b {
  display: block;
  color: var(--ink);
  font-size: 13.5px;
  margin-bottom: 3px;
}

/* =========================================================================
   Mobile mockups
   ========================================================================= */

.mobile-board {
  display: flex;
  gap: 34px;
  flex-wrap: wrap;
  padding: 8px 0 40px;
}

.phone {
  width: min(390px, 100%);
  height: 844px;
  border-radius: 44px;
  border: 9px solid #16191a;
  box-shadow: var(--shadow-2);
  background: var(--surface);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
}

.phone-status {
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px 0;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink);
  flex: none;
}

.phone-status span:last-child {
  letter-spacing: 0.04em;
}

.m-top {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 2px 16px 8px;
  flex: none;
}

.m-title {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
  margin: 0;
  min-width: 0;
}

.m-top .icon-btn {
  margin-left: auto;
  flex: none;
}

.m-search {
  margin: 0 16px 10px;
  position: relative;
  flex: none;
}

.m-chips {
  display: flex;
  gap: 6px;
  padding: 0 16px 10px;
  overflow-x: auto;
  scrollbar-width: none;
  flex: none;
}

.m-chip {
  height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 12px;
  color: var(--ink-2);
  white-space: nowrap;
}

.m-chip[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
  font-weight: 600;
}

.m-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: none;
}

.m-body::-webkit-scrollbar {
  display: none;
}

.m-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 11px;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line-soft);
  width: 100%;
  background: transparent;
  border-left: 0;
  border-right: 0;
  border-top: 0;
  text-align: left;
  cursor: pointer;
}

.m-row:hover {
  background: var(--surface-2);
}

.m-row .swatch {
  width: 42px;
  height: 42px;
}

.m-row-title {
  display: block;
  font-size: 13px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.m-row-sub {
  display: block;
  font-size: 12px;
  color: var(--ink-3);
  display: flex;
  gap: 6px;
  overflow: hidden;
  white-space: nowrap;
}

.m-sum {
  font-size: 12.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.tabbar {
  flex: none;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  border-top: 1px solid var(--line);
  padding: 6px 0 14px;
  background: var(--surface);
}

.tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  color: var(--ink-3);
  padding: 4px 0;
  border: 0;
  background: transparent;
  position: relative;
}

.tab svg {
  width: 20px;
  height: 20px;
}

.tab[aria-current="page"] {
  color: var(--ink);
  font-weight: 600;
}

.tab .tab-dot {
  position: absolute;
  top: 2px;
  right: 50%;
  translate: 18px 0;
  min-width: 15px;
  height: 15px;
  border-radius: 5px;
  background: var(--madder);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  display: grid;
  place-items: center;
  padding: 0 3px;
}

.m-detail-head {
  padding: 0 16px 12px;
  flex: none;
}

.m-back {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12.5px;
  color: var(--ink-2);
  background: none;
  border: 0;
  padding: 6px 0;
}

.m-detail-title {
  font-family: var(--font-display);
  font-size: 27px;
  font-weight: 600;
  margin: 2px 0 4px;
}

.m-detail-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--ink-3);
}

.m-vrail {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 4px 16px 12px;
}

.m-vstep {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr);
  gap: 9px;
  position: relative;
  padding-bottom: 14px;
}

.m-vstep::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 12px;
  bottom: 0;
  width: 1px;
  background: var(--line);
}

.m-vstep:last-child::before {
  display: none;
}

.m-vstep i {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  background: var(--surface);
  margin-top: 1px;
}

.m-vstep--done i {
  background: var(--ink);
  border-color: var(--ink);
}

.m-vstep--now i {
  border: 3px solid var(--woad);
}

.m-vstep b {
  font-size: 12.5px;
  font-weight: 600;
  display: block;
}

.m-vstep span {
  font-size: 12px;
  color: var(--ink-3);
}

.m-sticky {
  flex: none;
  padding: 10px 16px 16px;
  border-top: 1px solid var(--line);
  background: var(--surface);
  display: flex;
  gap: 8px;
}

.m-sticky .btn {
  height: 44px;
  flex: 1;
  justify-content: center;
  font-size: 14px;
}

.m-section {
  padding: 12px 16px;
  border-top: 8px solid var(--paper);
}

.m-section h3 {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-2);
}

.m-kpis {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 10px;
}

.m-kpis > div {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.m-kpis b {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.15;
}

/* =========================================================================
   Cover page
   ========================================================================= */

.cover-hero {
  padding: 56px 0 30px;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 48px;
  align-items: end;
}

.cover-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(40px, 6vw, 76px);
  font-weight: 600;
  line-height: 0.98;
  letter-spacing: -0.01em;
  margin: 0 0 14px;
  text-wrap: balance;
}

.cover-hero p {
  margin: 0;
  max-width: 60ch;
  font-size: 14px;
  color: var(--ink-2);
}

.cover-hero .mark {
  width: 100%;
  color: var(--ink);
  opacity: 0.9;
}

.cover-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
  padding: 28px 0 60px;
}

.screen-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  background: var(--surface);
  transition: border-color 0.16s var(--ease), transform 0.16s var(--ease);
}

.screen-card:hover {
  border-color: var(--woad-line);
  transform: translateY(-1px);
}

.screen-card b {
  font-size: 14px;
}

.screen-card p {
  margin: 0;
  font-size: 12.5px;
  color: var(--ink-2);
}

.screen-card .thumb {
  height: 104px;
  border-radius: 8px;
  border: 1px solid var(--line-soft);
  background: var(--surface-2);
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 6px;
  padding: 8px;
  overflow: hidden;
}

.mini-rail {
  border-radius: 4px;
  background: var(--line-soft);
  border-right: 1px solid var(--line);
}

.mini-body {
  display: grid;
  gap: 5px;
  align-content: start;
}

.mini-line {
  height: 6px;
  border-radius: 2px;
  background: var(--line);
}
.mini-line.w60 {
  width: 60%;
}
.mini-line.w40 {
  width: 40%;
}
.mini-line.w80 {
  width: 80%;
}
.mini-line.dark {
  background: var(--ink-3);
  height: 9px;
}

.swatches {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.swatch-token {
  width: 68px;
}

.swatches {
  gap: 6px;
}

.swatch-token i {
  display: block;
  height: 44px;
  border-radius: 8px;
  border: 1px solid var(--line);
  margin-bottom: 4px;
}

.swatch-token span {
  font-size: 11px;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}

.specimen {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  background: var(--surface);
}

.specimen .d {
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 600;
  line-height: 1;
}

.specimen .u {
  font-size: 13px;
  color: var(--ink-2);
  max-width: 46ch;
}

.specimen .n {
  font-size: 26px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* =========================================================================
   Overlay / sheet
   ========================================================================= */

.scrim {
  position: fixed;
  inset: 0;
  background: rgba(14, 18, 19, 0.42);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s var(--ease);
  z-index: 40;
}

.scrim[data-open="true"] {
  opacity: 1;
  pointer-events: auto;
}

.sheet {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(520px, 100vw);
  background: var(--surface);
  border-left: 1px solid var(--line);
  z-index: 41;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.22s var(--ease);
  overscroll-behavior: contain;
}

.sheet[data-open="true"] {
  transform: translateX(0);
}

.sheet-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line-soft);
}

.sheet-head h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
}

.sheet-head p {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--ink-3);
}

.sheet-head .icon-btn {
  margin-left: auto;
  flex: none;
}

.sheet-body {
  padding: 16px 18px;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.sheet-foot {
  padding: 12px 18px;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

/* Command palette */
.palette {
  position: fixed;
  z-index: 50;
  inset: 0;
  display: grid;
  place-items: start center;
  padding-top: 12vh;
  background: rgba(14, 18, 19, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.16s var(--ease);
}

.palette[data-open="true"] {
  opacity: 1;
  pointer-events: auto;
}

.palette-box {
  width: min(620px, calc(100vw - 32px));
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  box-shadow: var(--shadow-2);
  overflow: hidden;
}

.palette-input {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line-soft);
}

.palette-input input {
  border: 0;
  background: transparent;
  font-size: 14px;
  flex: 1;
  min-width: 0;
}

.palette-list {
  list-style: none;
  margin: 0;
  padding: 6px;
  max-height: 340px;
  overflow-y: auto;
}

.palette-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
}

.palette-list li[aria-selected="true"],
.palette-list li:hover {
  background: var(--surface-2);
}

.palette-list small {
  margin-left: auto;
  color: var(--ink-3);
  font-size: 11.5px;
}

/* Toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  translate: -50% 0;
  background: var(--ink);
  color: var(--paper);
  padding: 9px 14px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 500;
  box-shadow: var(--shadow-2);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.16s var(--ease), translate 0.16s var(--ease);
  z-index: 60;
}

.toast[data-open="true"] {
  opacity: 1;
  translate: -50% -4px;
}

/* =========================================================================
   Responsive
   ========================================================================= */

@media (max-width: 1280px) {
  .detail-body {
    grid-template-columns: minmax(0, 1fr);
  }
  .settings {
    grid-template-columns: 190px minmax(0, 1fr);
  }
}

@media (max-width: 1080px) {
  :root {
    --rail: 64px;
  }
  .rail {
    padding: 12px 8px;
    align-items: center;
  }
  .brand-name,
  .brand-sub,
  .rail-label,
  .rail-link span,
  .who-name,
  .who-role {
    display: none;
  }
  .rail-link {
    justify-content: center;
    padding: 0;
    width: 44px;
  }
  .rail-count {
    position: absolute;
    top: 3px;
    right: 4px;
    margin: 0;
    min-width: 15px;
    height: 15px;
    padding: 0 4px;
    font-size: 10.5px;
    border-radius: 4px;
  }
  .rail-group {
    margin-bottom: 4px;
    padding-bottom: 4px;
    width: 100%;
  }
  .rail-group + .rail-group {
    border-top: 1px solid var(--line-soft);
    padding-top: 6px;
  }
  .rail-foot {
    width: 100%;
  }
  .editor {
    grid-template-columns: 220px minmax(0, 1fr);
  }
  .col--inspect {
    position: fixed;
    top: var(--topbar);
    right: 0;
    bottom: 0;
    width: min(390px, 94vw);
    z-index: 42;
    border-left: 1px solid var(--line);
    transform: translateX(101%);
    transition: transform 0.22s var(--ease);
    box-shadow: var(--shadow-2);
  }
  .col--inspect.is-open {
    transform: none;
  }
  .workspace {
    grid-template-columns: minmax(330px, 370px) minmax(0, 1fr);
  }
}

@media (max-width: 820px) {
  .cover-hero {
    grid-template-columns: 1fr;
    gap: 20px;
    padding-top: 34px;
  }
  .cover-hero .mark {
    width: 96px;
    order: -1;
  }
  .cover-grid {
    grid-template-columns: 1fr;
  }
  .app {
    grid-template-columns: 1fr;
  }
  .rail {
    display: none;
  }
  .topbar {
    display: none;
  }
  .workspace--fixed {
    height: 100dvh;
  }
  .editor {
    height: calc(100dvh - 52px);
  }
  .page {
    padding: 18px 16px 88px;
  }
  .head {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .head-actions {
    margin-left: 0;
    width: 100%;
    overflow-x: auto;
  }
  .display {
    font-size: 27px;
  }
  .dash {
    grid-template-columns: 1fr;
  }
  .metrics {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }
  .metric {
    padding: 10px 12px;
  }
  .metric:nth-child(odd) {
    border-left: 0;
    padding-left: 0;
  }
  .workspace {
    grid-template-columns: 1fr;
  }
  .pane--list {
    border-right: 0;
  }
  .pane--detail {
    display: none;
  }
  .editor {
    display: flex;
    flex-direction: column;
    height: 100dvh;
  }
  .editor-mobile-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: calc(8px + env(safe-area-inset-top)) 12px 8px;
    border-bottom: 1px solid var(--line);
    background: var(--surface);
    flex: none;
  }
  .editor-mobile-bar .select {
    height: 36px;
    font-size: 13px;
    max-width: 152px;
  }
  .editor-mobile-bar .segmented {
    margin-left: auto;
  }
  .col--list {
    display: none;
    border-right: 0;
    flex: 1;
    min-height: 0;
  }
  .editor[data-mobile-tab="blocks"] .col--list {
    display: flex;
  }
  .editor[data-mobile-tab="blocks"] .col:not(.col--list):not(.col--inspect) {
    display: none;
  }
  .editor[data-mobile-tab="preview"] .col--list {
    display: none;
  }
  .col--inspect {
    position: fixed;
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    width: auto;
    max-height: 88dvh;
    border-radius: 18px 18px 0 0;
    border-left: 0;
    border-top: 1px solid var(--line);
    transform: translateY(101%);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .col--inspect.is-open {
    transform: none;
  }
  .preview-stage {
    padding: 12px 8px 84px;
  }
  .editor .col:not(.col--list):not(.col--inspect) .col-head {
    display: none;
  }
  .phone-frame {
    width: 100%;
    max-width: 366px;
    height: auto;
    max-height: calc(100dvh - 150px);
  }
  .col--list .col-head {
    display: none;
  }
  .topbar .search {
    display: none;
  }
  .topbar {
    padding: 0 12px;
    gap: 8px;
  }
  .settings {
    grid-template-columns: 1fr;
  }
  .subnav {
    position: static;
    flex-direction: row;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 6px;
  }
  .subnav a {
    white-space: nowrap;
  }
  .row-field {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .row-field:has(.switch) {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .defs div {
    grid-template-columns: 112px minmax(0, 1fr);
  }
  .detail-head {
    padding: 12px 16px 0;
  }
  .detail-body {
    padding: 16px;
  }
  .stage {
    padding: 9px 10px 11px;
  }
  .stage-value {
    font-size: 17px;
  }
  .mobile-board {
    justify-content: center;
  }
}

@media (max-width: 430px) {
  .q {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .q-icon {
    display: none;
  }
  .panel-head {
    gap: 8px;
  }
}

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

/* Bottom navigation for the desktop pages when the rail is gone */
.mobile-nav {
  display: none;
}

@media (max-width: 820px) {
  .panel-sub {
    display: none;
  }
  .q {
    grid-template-columns: 30px minmax(0, 1fr) auto;
  }
  .subnav {
    mask-image: linear-gradient(90deg, #000 88%, transparent 100%);
  }
  .q-time {
    display: none;
  }
  .metric-value {
    font-size: 22px;
  }
  .page {
    padding-bottom: 96px;
  }
  .mobile-nav {
    display: grid;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 30;
    grid-template-columns: repeat(5, 1fr);
    background: var(--surface);
    border-top: 1px solid var(--line);
    padding: 5px 0 10px;
  }
  .mobile-nav a,
  .mobile-nav button {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 4px 0;
    border: 0;
    background: transparent;
    font-size: 11px;
    color: var(--ink-3);
    position: relative;
  }
  .mobile-nav svg {
    width: 20px;
    height: 20px;
  }
  .mobile-nav [aria-current="page"] {
    color: var(--ink);
    font-weight: 600;
  }
  .mobile-nav .tab-dot {
    position: absolute;
    top: 1px;
    left: 50%;
    translate: 11px 0;
    min-width: 15px;
    height: 15px;
    padding: 0 3px;
    border-radius: 5px;
    background: var(--madder);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    display: grid;
    place-items: center;
  }
}

/* =========================================================================
   Compact list header, filters overlay (dialog on desktop, sheet on phone)
   ========================================================================= */

.only-mobile {
  display: none !important;
}

.pane-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
}

.pane-actions .btn {
  margin-left: 0;
}

.icon-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  display: grid;
  place-items: center;
  border-radius: 5px;
  background: var(--woad);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.active-filters {
  display: none;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.active-filters.is-on {
  display: flex;
}

.fchip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 28px;
  padding: 0 6px 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-size: 12px;
  color: var(--ink);
  white-space: nowrap;
}

.fchip button {
  width: 18px;
  height: 18px;
  border: 0;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--ink-3);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.fchip button:hover {
  background: var(--madder-soft);
  color: var(--madder);
}

.filters-reset {
  border: 0;
  background: none;
  color: var(--ink-3);
  font-size: 12px;
  padding: 0 4px;
  white-space: nowrap;
  cursor: pointer;
}

.filters-reset:hover {
  color: var(--ink);
}

.filters {
  position: fixed;
  z-index: 52;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-2);
  display: flex;
  flex-direction: column;
  overscroll-behavior: contain;
  visibility: hidden;
}

.filters[data-open="true"] {
  visibility: visible;
}

@media (min-width: 821px) {
  .filters {
    left: 50%;
    top: 50%;
    translate: -50% -50%;
    width: min(620px, calc(100vw - 40px));
    max-height: min(720px, calc(100dvh - 80px));
    border-radius: 14px;
    opacity: 0;
    scale: 0.98;
    pointer-events: none;
    transition: opacity 0.16s var(--ease), scale 0.16s var(--ease),
      visibility 0s linear 0.16s;
  }
  .filters[data-open="true"] {
    transition: opacity 0.16s var(--ease), scale 0.16s var(--ease),
      visibility 0s;
  }
  .filters[data-open="true"] {
    opacity: 1;
    scale: 1;
    pointer-events: auto;
  }
}

@media (max-width: 820px) {
  .filters {
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 18px 18px 0 0;
    max-height: 88dvh;
    transform: translateY(101%);
    transition: transform 0.24s var(--ease), visibility 0s linear 0.24s;
    padding-bottom: env(safe-area-inset-bottom);
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
  }
  .filters[data-open="true"] {
    transform: none;
    transition: transform 0.24s var(--ease), visibility 0s;
  }
}

.filters-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--line-soft);
}

.filters-head h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
}

.filters-head p {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--ink-3);
}

.filters-head .icon-btn {
  margin-left: auto;
}

.filters-grab {
  display: none;
}

@media (max-width: 820px) {
  .filters-grab {
    display: block;
    width: 38px;
    height: 4px;
    margin: 8px auto 2px;
    border-radius: 999px;
    background: var(--line);
    flex: none;
  }
  .filters-head {
    padding-top: 8px;
  }
}

.filters-body {
  padding: 12px 16px 16px;
  overflow-y: auto;
  display: grid;
  gap: 16px;
}

.fgroup h3 {
  margin: 0 0 7px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-2);
}

.foptions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.opt {
  height: 32px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-size: 12.5px;
  color: var(--ink-2);
  cursor: pointer;
}

.opt:hover {
  border-color: var(--woad-line);
}

.opt[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
  font-weight: 600;
}

.filters-foot {
  display: flex;
  gap: 8px;
  padding: 10px 16px 14px;
  border-top: 1px solid var(--line);
  align-items: center;
}

.filters-foot .btn--primary {
  flex: 1;
  justify-content: center;
}

.filters-foot .btn--quiet {
  flex: none;
}

/* Mobile list header: two rows only, no persistent filter stack */
@media (max-width: 820px) {
  .pane-head {
    padding: calc(6px + env(safe-area-inset-top)) 12px 9px;
  }
  .pane-actions .icon-btn {
    width: 40px;
    height: 40px;
  }
  .pane-title {
    margin: 0;
    gap: 8px;
  }
  .pane-title .display {
    font-size: 23px;
  }
  .pane-title .btn {
    margin-left: 0;
  }
  .pane-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 6px;
  }
  .pane-tools {
    display: none;
    margin-top: 8px;
  }
  .pane-head.is-search-open .pane-tools {
    display: flex;
  }
  .pane-tools .search input {
    height: 40px;
  }
  .pane-tools .btn {
    height: 40px;
  }
  .only-desktop,
  .segmented.only-desktop {
    display: none !important;
  }
  .btn.only-mobile {
    display: inline-flex !important;
  }
  .icon-btn.only-mobile {
    display: grid !important;
  }
  .only-mobile {
    display: inline-flex !important;
  }
  .pane--detail.is-open {
    display: flex;
    position: fixed;
    inset: 0;
    z-index: 36;
    background: var(--paper);
  }
  .detail-back {
    display: flex;
    align-items: center;
    padding: 6px 12px 0;
    background: var(--paper);
    position: sticky;
    top: 0;
    z-index: 7;
  }
  .detail-back button {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 40px;
    border: 0;
    background: none;
    font-size: 13px;
    color: var(--ink-2);
  }
  .detail-actions {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 38;
    margin: 0;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    background: var(--surface);
    border-top: 1px solid var(--line);
    gap: 8px;
  }
  .detail-actions .btn {
    height: 46px;
  }
  .detail-actions .btn--primary {
    flex: 1;
    justify-content: center;
  }
  .detail-actions .icon-btn {
    width: 46px;
    height: 46px;
    flex: none;
  }
  .detail-body {
    padding-bottom: 96px;
  }
  .detail-title {
    font-size: 26px;
  }
}

@media (min-width: 821px) {
  .detail-back {
    display: none;
  }
}

.btn--square {
  width: 40px;
  padding: 0;
  justify-content: center;
}

@media (max-width: 820px) {
  .btn--square {
    height: 40px;
    min-height: 40px;
  }
}

/* Component gallery bits */
.check-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  cursor: pointer;
}

.check-row input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--woad);
  flex: none;
}

.skeleton-line {
  display: inline-block;
  border-radius: 4px;
  background: linear-gradient(
    90deg,
    var(--surface-2),
    var(--paper-deep),
    var(--surface-2)
  );
  background-size: 200% 100%;
  animation: shimmer 1.6s linear infinite;
}

@keyframes shimmer {
  to {
    background-position: -200% 0;
  }
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--surface-2);
  border: 1px solid var(--line-soft);
}

/* Brand lockup on the cover */
.brand-lockup {
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  background: var(--surface);
  padding: 20px;
  align-self: end;
}

.lockup-main {
  display: flex;
  align-items: center;
  gap: 14px;
}

.lockup-main .mark {
  width: 64px;
  height: 64px;
  color: var(--ink);
  flex: none;
}

.lockup-main b {
  display: block;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.lockup-main span {
  display: block;
  font-size: 12.5px;
  color: var(--ink-3);
}

.lockup-sizes {
  display: flex;
  gap: 16px;
  align-items: flex-end;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
  color: var(--ink-3);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.lockup-sizes span {
  display: flex;
  align-items: flex-end;
  gap: 6px;
}

.lockup-sizes svg {
  color: var(--ink);
}

.brand-lockup p {
  margin: 12px 0 0;
  font-size: 12px;
  color: var(--ink-2);
}

@media (max-width: 820px) {
  .brand-lockup {
    max-width: 420px;
  }
}

/* Filter sheet inside the phone mockup */
.m-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
}

.m-sheet-wrap {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: rgba(14, 18, 19, 0.42);
}

.m-sheet {
  background: var(--surface);
  border-radius: 18px 18px 0 0;
  padding: 8px 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 88%;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.m-sheet .grab {
  width: 38px;
  height: 4px;
  border-radius: 999px;
  background: var(--line);
  margin: 0 auto 2px;
}

/* Button spec rows */
.btn-spec {
  display: flex;
  flex-direction: column;
}

.btn-spec-row {
  display: grid;
  grid-template-columns: 190px minmax(180px, 300px) minmax(0, 1fr);
  gap: 24px;
  align-items: center;
  padding: 15px 16px;
  border-top: 1px solid var(--line-soft);
}

.btn-spec-row:first-child {
  border-top: 0;
}

.btn-spec-role {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
}

.btn-spec-demo {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-spec-note {
  margin: 0;
  font-size: 12px;
  color: var(--ink-3);
  max-width: 46ch;
}

@media (max-width: 820px) {
  .btn-spec-row {
    grid-template-columns: 1fr;
    gap: 7px;
    padding: 13px 14px;
  }
  .btn-spec-note {
    font-size: 12px;
  }
  .btn-spec-row .btn {
    min-height: 44px;
  }
  .btn-spec-row .icon-btn {
    width: 40px;
    height: 40px;
  }
}

/* Multi-select filter checkboxes */
.check-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2px 14px;
}

.check-grid .check-row {
  min-height: 36px;
  padding: 0 4px;
  border-radius: 6px;
}

.check-grid .check-row:hover {
  background: var(--surface-2);
}

@media (max-width: 820px) {
  .check-grid .check-row {
    min-height: 44px;
  }
}
