:root {
  color-scheme: light;
  --font-sans: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", sans-serif;
  --font-mono: "JetBrains Mono", "Cascadia Mono", Consolas, ui-monospace, monospace;
  --bg-canvas: #f7f6f2;
  --bg-surface: #ffffff;
  --bg-subtle: #f1efe9;
  --bg-hover: #ebe8e0;
  --sidebar-bg: #171719;
  --sidebar-surface: #222226;
  --sidebar-border: #2c2c31;
  --sidebar-text: #e7e5e0;
  --sidebar-muted: #9a9890;
  --accent: #c96442;
  --accent-hover: #b35332;
  --accent-soft: #fbf1ec;
  --accent-border: #ebcbbd;
  --text-main: #18181b;
  --text-secondary: #52525b;
  --text-muted: #71717a;
  --border: #e5e2da;
  --border-strong: #d1cdc2;
  --ok-bg: #e9f7ef;
  --ok-text: #146c43;
  --warn-bg: #fef4e2;
  --warn-text: #995c00;
  --err-bg: #fdebec;
  --err-text: #b02a37;
  --info-bg: #edf2ff;
  --info-text: #364fc7;
  --focus: #c96442;
  --radius-sm: 0.42rem;
  --radius-md: 0.65rem;
  --radius-lg: 0.9rem;
  --shadow-sm: 0 1px 2px rgba(24, 24, 27, 0.04), 0 4px 12px rgba(24, 24, 27, 0.025);
  --shadow-lg: 0 20px 50px rgba(24, 24, 27, 0.16);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  min-width: 20rem;
  font-family: var(--font-sans);
  color: var(--text-main);
  background: var(--bg-canvas);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, p, ul, dl { margin: 0; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: 0.56; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

.monospace { font-family: var(--font-mono); font-size: 0.85em; }
.numeric { font-variant-numeric: tabular-nums; }
.muted { color: var(--text-muted); }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* Brand */
.brand {
  display: inline-flex; align-items: center; gap: 0.68rem;
  font-weight: 700; font-size: 1.04rem; letter-spacing: -0.01em; color: #fff;
}
.brand-mark {
  display: inline-grid; place-items: center;
  width: 1.9rem; height: 1.9rem; border-radius: 0.5rem;
  background: linear-gradient(135deg, #d97757, #b8502e);
  color: #fff; font-family: var(--font-mono); font-weight: 700; font-size: 0.9rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.brand-sub {
  font-size: 0.72rem; font-weight: 500; color: var(--sidebar-muted);
  display: block; line-height: 1.1; margin-top: 0.1rem;
}

/* Auth Layout */
.auth-layout {
  display: grid; grid-template-columns: 1.05fr 0.95fr; min-height: 100svh;
}
.auth-hero {
  display: flex; flex-direction: column; justify-content: space-between;
  padding: clamp(2rem, 5vw, 4.5rem);
  background: radial-gradient(circle at 85% 20%, rgba(201, 100, 66, 0.24), transparent 52%),
              linear-gradient(160deg, #161618 0%, #201e1d 100%);
  color: #f4f3ef; position: relative; overflow: hidden;
}
.auth-hero-body { max-width: 32rem; margin-block: auto; }
.auth-badge {
  display: inline-flex; align-items: center; gap: 0.45rem;
  padding: 0.28rem 0.68rem; border-radius: 999px;
  background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.78rem; color: #e6cbbd; margin-bottom: 1.2rem;
}
.auth-hero h1 {
  font-size: clamp(2.1rem, 4.2vw, 3.4rem); line-height: 1.12;
  font-weight: 720; letter-spacing: -0.035em;
}
.auth-hero p {
  margin-top: 1.1rem; font-size: 1rem; color: #b6b3ab; line-height: 1.7;
}
.auth-endpoints {
  display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.8rem;
}
.auth-endpoints code {
  padding: 0.34rem 0.6rem; border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.11);
  font-family: var(--font-mono); font-size: 0.8rem; color: #eceae4;
}
.auth-hero-footer {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  flex-wrap: wrap; font-size: 0.84rem; color: #9c9990;
}
.auth-hero-footer a { color: #f0b8a2; font-weight: 600; }

.auth-panel {
  display: grid; place-items: center; padding: 2rem; background: var(--bg-canvas);
}
.auth-card {
  width: min(100%, 26.5rem); padding: clamp(1.6rem, 4vw, 2.3rem);
  background: var(--bg-surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-sm);
}
.auth-card h2 { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.02em; }
.auth-card > p { margin-top: 0.38rem; color: var(--text-secondary); font-size: 0.9rem; }
.segmented {
  display: inline-flex; flex-wrap: wrap; gap: 0.22rem; padding: 0.22rem;
  background: var(--bg-subtle); border: 1px solid var(--border); border-radius: 0.52rem;
}
.segmented-full { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; margin-top: 1.15rem; }
.segmented button {
  border: 0; border-radius: 0.38rem; padding: 0.42rem 0.72rem;
  background: transparent; color: var(--text-secondary); font-size: 0.83rem; font-weight: 600;
  transition: background 0.14s ease, color 0.14s ease;
}
.segmented button[aria-pressed="true"], .segmented button.is-active {
  background: var(--bg-surface); color: var(--text-main);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}
.auth-form { display: grid; gap: 0.92rem; margin-top: 1.2rem; }
.auth-links {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 1.1rem; padding-top: 0.95rem; border-top: 1px solid var(--border);
  font-size: 0.83rem; color: var(--text-secondary);
}

/* Workspace Shell */
.workspace {
  min-height: 100svh; display: grid; grid-template-columns: 15.8rem minmax(0, 1fr);
}
.sidebar {
  height: 100svh; position: sticky; top: 0; overflow-y: auto;
  display: flex; flex-direction: column; gap: 0.9rem;
  padding: 1.05rem 0.8rem 0.85rem;
  background: var(--sidebar-bg); color: var(--sidebar-text);
  border-right: 1px solid var(--sidebar-border); z-index: 10;
  scrollbar-width: thin; scrollbar-color: #3a3a40 var(--sidebar-bg);
}
.sidebar-header {
  display: flex; align-items: center; justify-content: space-between; padding: 0 0.45rem;
}
.perspective-switch {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0.22rem;
  padding: 0.22rem; background: var(--sidebar-surface);
  border: 1px solid var(--sidebar-border); border-radius: 0.5rem;
}
.perspective-switch button {
  border: 0; border-radius: 0.36rem; padding: 0.38rem 0.5rem;
  background: transparent; color: var(--sidebar-muted);
  font-size: 0.8rem; font-weight: 600;
}
.perspective-switch button.is-active {
  background: var(--accent); color: #fff;
}

.nav-scroll { display: flex; flex-direction: column; gap: 0.75rem; flex: 1; }
.nav-section-title {
  padding: 0.35rem 0.6rem 0.18rem; font-size: 0.7rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em; color: var(--sidebar-muted);
}
.nav-list { display: flex; flex-direction: column; gap: 0.12rem; }
.nav-item {
  display: flex; align-items: center; justify-content: space-between; gap: 0.55rem;
  width: 100%; padding: 0.44rem 0.62rem; border: 1px solid transparent;
  border-radius: 0.44rem; background: transparent; color: #d4d2cc;
  font-size: 0.86rem; font-weight: 500; text-align: left;
  transition: background 0.12s ease, color 0.12s ease;
}
.nav-item:hover { background: var(--sidebar-surface); color: #fff; }
.nav-item[aria-current="page"] {
  background: rgba(201, 100, 66, 0.16); border-color: rgba(201, 100, 66, 0.38);
  color: #fff; font-weight: 650;
}
.nav-item-label { display: inline-flex; align-items: center; gap: 0.52rem; min-width: 0; }
.nav-dot {
  width: 0.38rem; height: 0.38rem; border-radius: 50%;
  background: currentColor; opacity: 0.45; flex: none;
}
.nav-item[aria-current="page"] .nav-dot { background: #f08c69; opacity: 1; }

.sidebar-footer {
  display: grid; gap: 0.55rem; padding-top: 0.75rem;
  border-top: 1px solid var(--sidebar-border); font-size: 0.8rem;
}
.sidebar-user {
  display: flex; align-items: center; justify-content: space-between; gap: 0.4rem;
  padding: 0 0.35rem; color: var(--sidebar-muted);
}
.sidebar-user strong { color: #f3f2ee; font-size: 0.82rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-footer-actions { display: flex; gap: 0.4rem; }

/* Main Workspace Area */
.workspace-body { min-width: 0; display: flex; flex-direction: column; min-height: 100svh; }
.topbar {
  position: sticky; top: 0; z-index: 5; min-height: 3.6rem;
  display: flex; align-items: center; justify-content: space-between; gap: 0.8rem;
  padding: 0.55rem clamp(1rem, 2.6vw, 2.2rem);
  background: rgba(247, 246, 242, 0.9); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.topbar-left, .topbar-right { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.breadcrumb { display: inline-flex; align-items: center; gap: 0.45rem; font-size: 0.86rem; color: var(--text-muted); }
.breadcrumb strong { color: var(--text-main); font-weight: 650; }
.mobile-menu-btn { display: none; }

.main-container {
  width: min(100%, 90rem); margin-inline: auto;
  padding: 1.5rem clamp(1rem, 2.6vw, 2.2rem) 3rem; flex: 1;
}

/* Page Headers & Cards */
.page-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap; margin-bottom: 1.2rem;
}
.page-head h2 { font-size: 1.52rem; font-weight: 720; letter-spacing: -0.025em; }
.page-head p { margin-top: 0.25rem; font-size: 0.88rem; color: var(--text-secondary); }
.page-actions { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }

.kpi-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(12.5rem, 1fr));
  gap: 0.8rem; margin-bottom: 1.1rem;
}
.kpi-card {
  padding: 0.95rem 1.1rem; background: var(--bg-surface);
  border: 1px solid var(--border); border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm); position: relative; overflow: hidden;
}
.kpi-card::before {
  content: ""; position: absolute; left: 0; top: 0; right: 0; height: 3px;
  background: var(--border-strong);
}
.kpi-card.kpi-accent::before { background: var(--accent); }
.kpi-card.kpi-ok::before { background: #198754; }
.kpi-card.kpi-warn::before { background: #d97706; }
.kpi-label { font-size: 0.8rem; font-weight: 600; color: var(--text-secondary); }
.kpi-value {
  margin-top: 0.35rem; font-size: 1.58rem; font-weight: 740;
  font-variant-numeric: tabular-nums; letter-spacing: -0.02em;
}
.kpi-sub { margin-top: 0.25rem; font-size: 0.77rem; color: var(--text-muted); }

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.95rem; margin-bottom: 1rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.85rem; margin-bottom: 1rem; }

.panel {
  background: var(--bg-surface); border: 1px solid var(--border);
  border-radius: var(--radius-md); box-shadow: var(--shadow-sm); margin-bottom: 1rem;
  min-width: 0;
}
.panel-head {
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
  flex-wrap: wrap; padding: 0.85rem 1.05rem; border-bottom: 1px solid var(--border);
}
.panel-head h3 { font-size: 0.98rem; font-weight: 680; }
.panel-body { padding: 1.05rem; }

/* Filter Bar */
.filter-bar {
  display: flex; align-items: flex-end; gap: 0.65rem; flex-wrap: wrap;
  padding: 0.82rem 1.05rem; border-bottom: 1px solid var(--border);
  background: #faf9f6;
}
.filter-bar .field { min-width: 9.5rem; flex: 1 1 9.5rem; max-width: 16rem; }

/* Account Pool Card Grid */
.pool-cards {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(18.5rem, 1fr));
  gap: 0.85rem; padding: 1rem;
}
.pool-card {
  padding: 0.95rem; border: 1px solid var(--border); border-radius: var(--radius-md);
  background: #fcfbf9; display: grid; gap: 0.6rem;
}
.pool-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.5rem; }
.pool-card-title { font-weight: 680; font-size: 0.95rem; word-break: break-all; }
.pool-card-meta { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.38rem; font-size: 0.8rem; color: var(--text-secondary); }
.pool-card-actions { display: flex; flex-wrap: wrap; gap: 0.35rem; padding-top: 0.45rem; border-top: 1px solid var(--border); }

/* Tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.85rem; white-space: nowrap; }
thead { background: #faf9f5; color: var(--text-secondary); border-bottom: 1px solid var(--border); }
th, td { text-align: left; padding: 0.65rem 0.9rem; vertical-align: middle; }
th { font-size: 0.76rem; font-weight: 680; letter-spacing: 0.02em; }
th.sortable { cursor: pointer; user-select: none; }
th.sortable:hover { color: var(--accent); }
tbody tr + tr { border-top: 1px solid #f0ede6; }
tbody tr:hover { background: #fbfaf7; }
tr.expanded-detail-row { background: #f8f6f1; white-space: normal; }

.cell-primary { font-weight: 640; color: var(--text-main); display: block; max-width: 18rem; overflow: hidden; text-overflow: ellipsis; }
.cell-sub { font-size: 0.77rem; color: var(--text-muted); display: block; margin-top: 0.12rem; max-width: 20rem; overflow: hidden; text-overflow: ellipsis; }
.row-actions { display: inline-flex; align-items: center; gap: 0.28rem; flex-wrap: wrap; }

.empty-state {
  padding: 2.6rem 1.2rem; text-align: center; color: var(--text-muted);
  font-size: 0.88rem; white-space: normal;
}

/* Badges & Health Dots */
.badge {
  display: inline-flex; align-items: center; gap: 0.3rem;
  padding: 0.16rem 0.5rem; border-radius: 999px;
  font-size: 0.74rem; font-weight: 640; background: var(--bg-subtle); color: var(--text-secondary);
}
.badge-ok { background: var(--ok-bg); color: var(--ok-text); }
.badge-warn { background: var(--warn-bg); color: var(--warn-text); }
.badge-err { background: var(--err-bg); color: var(--err-text); }
.badge-info { background: var(--info-bg); color: var(--info-text); }

.health-pill {
  display: inline-flex; align-items: center; gap: 0.42rem;
  font-size: 0.79rem; color: var(--text-secondary);
}
.health-pill::before {
  content: ""; width: 0.46rem; height: 0.46rem; border-radius: 50%; background: #9ca3af;
}
.health-pill[data-state="ready"]::before { background: #16a34a; }
.health-pill[data-state="error"]::before { background: #dc2626; }
.sidebar .health-pill { color: var(--sidebar-muted); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.35rem;
  min-height: 2.12rem; padding: 0.4rem 0.78rem; border: 1px solid transparent;
  border-radius: var(--radius-sm); font-size: 0.83rem; font-weight: 620;
  white-space: nowrap; transition: background 0.14s ease, border-color 0.14s ease;
}
.btn-sm { min-height: 1.78rem; padding: 0.24rem 0.54rem; font-size: 0.77rem; }
.btn-block { width: 100%; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--accent-hover); }
.btn-secondary { background: var(--bg-surface); color: var(--text-main); border-color: var(--border-strong); }
.btn-secondary:hover:not(:disabled) { background: var(--bg-subtle); }
.btn-ghost { background: transparent; color: var(--text-secondary); }
.btn-ghost:hover:not(:disabled) { background: var(--bg-subtle); color: var(--text-main); }
.btn-danger { background: #b91c1c; color: #fff; }
.btn-danger:hover:not(:disabled) { background: #991b1b; }
.btn-danger-ghost { background: transparent; color: #b91c1c; }
.btn-danger-ghost:hover:not(:disabled) { background: var(--err-bg); }
.btn-sidebar {
  flex: 1; min-height: 1.9rem; padding: 0.28rem 0.5rem;
  background: var(--sidebar-surface); color: var(--sidebar-text);
  border: 1px solid var(--sidebar-border); border-radius: var(--radius-sm); font-size: 0.76rem;
}
.btn-sidebar:hover { background: #2d2d33; }

/* Forms */
.field { display: grid; gap: 0.28rem; min-width: 0; font-size: 0.82rem; font-weight: 600; color: var(--text-secondary); }
.field input, .field select, .field textarea {
  width: 100%; min-width: 0; min-height: 2.24rem; padding: 0.42rem 0.58rem;
  background: var(--bg-surface); border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm); color: var(--text-main); font-weight: 450; font-size: 0.86rem;
}
.field textarea { min-height: 4.8rem; resize: vertical; font-family: var(--font-mono); font-size: 0.82rem; }
.field small { font-weight: 400; font-size: 0.75rem; color: var(--text-muted); }
.form-row-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.65rem; }
.form-row-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.65rem; }
.checkbox { display: inline-flex; align-items: center; gap: 0.45rem; font-size: 0.85rem; font-weight: 500; cursor: pointer; }
.checkbox input { width: 1rem; height: 1rem; accent-color: var(--accent); margin: 0; }

/* Notices */
.notice {
  padding: 0.65rem 0.85rem; border-radius: var(--radius-sm);
  font-size: 0.85rem; margin-bottom: 0.9rem; border: 1px solid transparent;
}
.notice-error { background: var(--err-bg); color: var(--err-text); border-color: #f5c2c7; }
.notice-success { background: var(--ok-bg); color: var(--ok-text); border-color: #badbcc; }
.notice-info { background: var(--accent-soft); color: #7c3a21; border-color: var(--accent-border); }

/* Wizard Stepper & Progress Bars */
.stepper {
  display: flex; gap: 0.35rem; flex-wrap: wrap; margin-bottom: 0.9rem;
  padding-bottom: 0.75rem; border-bottom: 1px solid var(--border);
}
.step-pill {
  padding: 0.24rem 0.58rem; border-radius: 999px; font-size: 0.76rem; font-weight: 620;
  background: var(--bg-subtle); color: var(--text-muted);
}
.step-pill.is-active { background: var(--accent); color: #fff; }
.step-pill.is-done { background: var(--ok-bg); color: var(--ok-text); }

.meter {
  height: 0.55rem; width: 100%; border-radius: 999px;
  background: var(--bg-subtle); overflow: hidden; margin-top: 0.4rem;
}
.meter > span { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.w-0 { width: 0%; } .w-10 { width: 10%; } .w-25 { width: 25%; } .w-50 { width: 50%; }
.w-75 { width: 75%; } .w-90 { width: 90%; } .w-100 { width: 100%; }

.kv-list { display: grid; gap: 0.48rem; }
.kv-row {
  display: flex; align-items: baseline; justify-content: space-between; gap: 0.8rem;
  padding: 0.48rem 0; border-bottom: 1px solid #f0ede6; font-size: 0.86rem;
}
.kv-row:last-child { border-bottom: 0; }
.kv-row dt { color: var(--text-secondary); }
.kv-row dd { margin: 0; font-weight: 600; text-align: right; word-break: break-all; }

.plan-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(16.5rem, 1fr)); gap: 0.9rem; }
.plan-card {
  padding: 1.15rem; background: var(--bg-surface); border: 1px solid var(--border);
  border-radius: var(--radius-md); display: flex; flex-direction: column; gap: 0.7rem;
}
.plan-card.is-recommended { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.plan-price { font-size: 1.65rem; font-weight: 750; font-variant-numeric: tabular-nums; }
.plan-price small { font-size: 0.82rem; font-weight: 500; color: var(--text-muted); }

/* Dialogs */
dialog {
  width: min(100% - 1.8rem, 36rem); max-height: 90dvh; margin: auto; padding: 0;
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: var(--bg-surface); color: var(--text-main); box-shadow: var(--shadow-lg);
}
dialog.dialog-wide { width: min(100% - 1.8rem, 46rem); }
dialog::backdrop { background: rgba(20, 20, 22, 0.52); backdrop-filter: blur(2px); }
.dialog-box { display: grid; gap: 0.85rem; padding: 1.25rem; }
.dialog-head {
  display: flex; align-items: center; justify-content: space-between; gap: 0.6rem;
  padding-bottom: 0.65rem; border-bottom: 1px solid var(--border);
}
.dialog-head h3 { font-size: 1.12rem; font-weight: 700; }
.dialog-foot {
  display: flex; justify-content: flex-end; gap: 0.5rem;
  padding-top: 0.75rem; border-top: 1px solid var(--border);
}

.member-box {
  max-height: 9.5rem; overflow-y: auto; padding: 0.55rem;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  display: grid; gap: 0.38rem; background: #faf9f6;
}

/* Public Key Usage Standalone Layout */
.public-shell {
  max-width: 68rem; margin: 0 auto; padding: 2rem clamp(1rem, 3vw, 2rem) 3.5rem;
}
.public-header {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  flex-wrap: wrap; margin-bottom: 1.6rem; padding-bottom: 1rem; border-bottom: 1px solid var(--border);
}
.public-brand { color: var(--text-main); }

.nav-backdrop { display: none; }

@media (max-width: 64rem) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .workspace { grid-template-columns: 14rem minmax(0, 1fr); }
}

@media (max-width: 52rem) {
  .auth-layout { grid-template-columns: 1fr; }
  .auth-hero { padding: 1.8rem 1.4rem; }
  .workspace { display: block; }
  .sidebar {
    display: none; position: fixed; left: 0; top: 0; bottom: 0;
    width: min(17rem, 84vw); z-index: 30;
  }
  .workspace.nav-open .sidebar { display: flex; }
  .workspace.nav-open .nav-backdrop {
    display: block; position: fixed; inset: 0; z-index: 20;
    border: 0; background: rgba(15, 15, 18, 0.48);
  }
  .mobile-menu-btn { display: inline-flex; }
  .form-row-2, .form-row-3 { grid-template-columns: 1fr; }
}
