/* Adviso design system — catalog + shared component styles (see /design).
   Served from Adviso.Web wwwroot; used on /design AND shared app-wide
   (btn-*, badge-*, card, form-input, alert/chip/list/toggle/pager/step*/empty/
   skel/progress/drop/tabs/tab/toast/prose/choice/chevron/input-accent etc.
   are consumed by Login, Sign, VerifyOtp, workspaces, admin, client pages —
   not catalogue-only). Uses the same tokens as tokens.css on :root — do not
   add a second :root here. No global * / body reset.

   /design-only layout chrome (.ds-layout, .ds-float-nav*, .ds-layout-body,
   .adviso-ds-catalog, .adviso-ds-main) is appended at the bottom of this
   file and keeps the ds- marker because it only appears on /design. */

  /* NAV (mimics Adviso topbar) */
  .nav {
    position: sticky; top: 0; z-index: 100;
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 28px; height: 54px;
    background: var(--card-bg);
    border-bottom: 1px solid var(--border);
  }
  .nav-left { display: flex; align-items: center; gap: 12px; }
  .nav-brand { display: inline-flex; align-items: center; text-decoration: none; }
  .nav-brand img { display: block; height: 28px; width: auto; }
  .nav-tenant-pipe { height: 18px; width: 1px; background: var(--border-strong); }
  .nav-tenant {
    font-family: var(--font-display); font-weight: 700; font-size: 14px;
    color: var(--text-primary); letter-spacing: 0.2px;
  }
  .nav-links { display: flex; gap: 22px; list-style: none; }
  .nav-links a { font-size: 14px; font-weight: 500; color: var(--text-secondary); text-decoration: none; transition: color 0.15s; }
  .nav-links a:hover { color: var(--teal); }
  .nav-cta {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--teal); color: #ffffff;
    padding: 8px 18px; border-radius: 10px;
    font-size: 14px; font-weight: 600; letter-spacing: 0.2px;
    text-decoration: none; transition: background 0.15s;
  }
  .nav-cta:hover { background: var(--teal-dark); }

  /* HERO */
  .hero {
    padding: 72px 32px 56px; text-align: center;
    background: linear-gradient(180deg, var(--bg) 0%, var(--bg) 60%, var(--card-bg) 100%);
  }
  .hero h1 {
    font-family: var(--font-display); font-size: 52px; font-weight: 900;
    line-height: 1.05; letter-spacing: -0.5px;
    color: var(--text-primary); margin-bottom: 12px;
  }
  .hero .tagline {
    font-family: var(--font-tagline); font-style: italic; font-weight: 500;
    font-size: 18px; color: var(--gold-dark); letter-spacing: 0.3px;
    margin-bottom: 20px;
  }
  .hero p {
    font-size: 17px; color: var(--text-secondary); max-width: 600px;
    margin: 0 auto 28px; line-height: 1.55;
  }
  .hero-buttons { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

  /* BUTTONS */
  .btn-primary {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--teal); color: #ffffff;
    padding: 10px 22px; border-radius: 10px; border: none;
    font-family: var(--font-body); font-size: 14px; font-weight: 600; letter-spacing: 0.2px;
    text-decoration: none; cursor: pointer; transition: background 0.15s;
  }
  .btn-primary:hover { background: var(--teal-dark); }
  .btn-ghost {
    display: inline-flex; align-items: center; gap: 8px;
    background: transparent; color: var(--teal);
    padding: 10px 22px; border-radius: 10px;
    border: 1px solid rgba(26,107,106,0.25);
    font-family: var(--font-body); font-size: 14px; font-weight: 600; letter-spacing: 0.2px;
    text-decoration: none; cursor: pointer; transition: background 0.15s;
  }
  .btn-ghost:hover { background: var(--teal-light); }
  .btn-gold {
    display: inline-flex; align-items: center; gap: 8px;
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: #ffffff;
    padding: 10px 22px; border-radius: 10px; border: none;
    font-family: var(--font-body); font-size: 14px; font-weight: 600; letter-spacing: 0.2px;
    text-decoration: none; cursor: pointer;
    box-shadow: 0 2px 8px rgba(200,164,78,0.25);
  }
  .btn-text {
    display: inline-flex; align-items: center; gap: 6px;
    background: transparent; color: var(--text-secondary);
    padding: 8px 14px; border-radius: 10px; border: none;
    font-family: var(--font-body); font-size: 14px; font-weight: 500;
    cursor: pointer; transition: all 0.15s;
  }
  .btn-text:hover { color: var(--teal); background: var(--cream); }
  .btn-destructive {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--rose); color: #ffffff;
    padding: 10px 22px; border-radius: 10px; border: none;
    font-family: var(--font-body); font-size: 14px; font-weight: 600; letter-spacing: 0.2px;
    cursor: pointer;
  }

  /* SECTIONS */
  .section { padding: 56px 32px; max-width: 1200px; margin: 0 auto; }
  .section-label {
    font-family: var(--font-body); font-size: 12px; font-weight: 600;
    color: var(--text-secondary); text-transform: uppercase;
    letter-spacing: 0.4px; margin-bottom: 10px;
  }
  .section-title {
    font-family: var(--font-display); font-size: 28px; font-weight: 700;
    line-height: 1.15; letter-spacing: -0.2px;
    color: var(--text-primary); margin-bottom: 28px;
  }
  .section-divider { border: none; border-top: 1px solid var(--border-strong); margin: 0; opacity: 0.6; }

  /* COLORS */
  .color-group-label {
    font-family: var(--font-body); font-size: 13px; font-weight: 600;
    color: var(--text-secondary); letter-spacing: 0.4px; text-transform: uppercase;
    margin: 28px 0 12px;
  }
  .color-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
  .color-swatch {
    border-radius: var(--radius); overflow: hidden;
    background: var(--card-bg); box-shadow: var(--shadow);
    transition: box-shadow 0.2s;
  }
  .color-swatch:hover { box-shadow: var(--shadow-hover); }
  .color-swatch-block { height: 80px; width: 100%; }
  .color-swatch-info { padding: 12px 14px; }
  .color-swatch-name {
    font-family: var(--font-body); font-size: 14px; font-weight: 600;
    color: var(--text-primary); margin-bottom: 2px;
  }
  .color-swatch-hex {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 12px; color: var(--text-muted);
  }
  .color-swatch-role {
    font-size: 11px; color: var(--text-muted);
    margin-top: 4px; font-weight: 400; line-height: 1.4;
  }

  /* TYPOGRAPHY */
  .type-sample {
    padding: 22px 0; border-bottom: 1px solid var(--border-strong);
  }
  .type-sample:last-child { border-bottom: none; }
  .type-meta {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 12px; font-weight: 500; color: var(--text-muted);
    margin-top: 8px;
  }
  .t-display-hero { font-family: var(--font-display); font-size: 52px; font-weight: 900; line-height: 1.05; letter-spacing: -0.5px; color: var(--text-primary); }
  .t-display-large { font-family: var(--font-display); font-size: 40px; font-weight: 900; line-height: 1.1; letter-spacing: -0.4px; color: var(--text-primary); }
  .t-section { font-family: var(--font-display); font-size: 28px; font-weight: 700; line-height: 1.15; letter-spacing: -0.2px; color: var(--text-primary); }
  .t-card { font-family: var(--font-display); font-size: 22px; font-weight: 700; line-height: 1.2; color: var(--text-primary); }
  .t-body-large { font-family: var(--font-body); font-size: 17px; font-weight: 400; line-height: 1.55; color: var(--text-primary); }
  .t-body { font-family: var(--font-body); font-size: 15px; font-weight: 400; line-height: 1.5; color: var(--text-primary); }
  .t-label { font-family: var(--font-body); font-size: 13px; font-weight: 500; line-height: 1.4; letter-spacing: 0.1px; color: var(--text-secondary); }
  .t-caption { font-family: var(--font-body); font-size: 13px; font-weight: 400; color: var(--text-muted); }
  .t-tabular { font-family: var(--font-body); font-size: 15px; font-weight: 500; font-variant-numeric: tabular-nums; letter-spacing: 0.3px; color: var(--text-primary); }
  .t-tagline { font-family: var(--font-tagline); font-size: 18px; font-weight: 500; font-style: italic; letter-spacing: 0.3px; color: var(--gold-dark); }

  /* BADGES */
  .badge-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
  .badge {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 3px 10px; border-radius: 999px;
    font-family: var(--font-body); font-size: 12px; font-weight: 500;
  }
  .badge-neutral { background: var(--cream); color: var(--text-secondary); }
  .badge-success { background: var(--sage-light); color: var(--sage); border: 1px solid rgba(106,154,106,0.3); }
  .badge-warning { background: var(--warning-light); color: var(--warning-dark); }
  .badge-danger { background: var(--rose-light); color: var(--rose); }
  .badge-info { background: var(--teal-light); color: var(--teal); }

  /* CARDS */
  .card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
  .card {
    background: var(--card-bg); border-radius: var(--radius); padding: 24px;
    box-shadow: var(--shadow);
    transition: box-shadow 0.25s ease, transform 0.25s ease;
  }
  .card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
  .card .card-eyebrow {
    font-family: var(--font-body); font-size: 12px; font-weight: 600;
    color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.4px;
    margin-bottom: 8px;
  }
  .card h3 {
    font-family: var(--font-display); font-size: 22px; font-weight: 700;
    line-height: 1.2; color: var(--text-primary); margin-bottom: 10px;
  }
  .card p {
    font-size: 14px; color: var(--text-secondary); line-height: 1.55;
  }
  .card-stat {
    font-family: var(--font-display); font-size: 40px; font-weight: 900;
    color: var(--text-primary); font-variant-numeric: tabular-nums;
    line-height: 1.05; letter-spacing: -0.4px; margin: 6px 0;
  }
  .card-delta { display: inline-block; margin-top: 4px; }

  /* FORMS */
  .form-group { margin-bottom: 18px; max-width: 440px; }
  .form-label {
    display: block; font-family: var(--font-body); font-size: 13px;
    font-weight: 500; color: var(--text-secondary); letter-spacing: 0.1px;
    margin-bottom: 6px;
  }
  .form-input {
    width: 100%; background: var(--card-bg); color: var(--text-primary);
    border: 1px solid rgba(0,0,0,0.1); padding: 10px 14px; border-radius: 10px;
    font-family: var(--font-body); font-size: 15px; font-weight: 400;
    outline: none; transition: all 0.15s;
  }
  .form-input::placeholder { color: var(--text-muted); }
  .form-input:focus {
    border-color: var(--teal);
    box-shadow: 0 0 0 3px rgba(26,107,106,0.12);
  }
  .form-hint { font-size: 12px; color: var(--text-muted); margin-top: 6px; }

  /* SIDEBAR PREVIEW */
  .sidebar-preview {
    background: var(--teal-deeper);
    border-radius: var(--radius);
    padding: 20px 16px;
    max-width: 280px;
    position: relative;
    overflow: hidden;
  }
  .sidebar-preview::after {
    content: ''; position: absolute; top: 0; right: 0;
    width: 32px; height: 100%;
    background: linear-gradient(195deg, rgba(200,164,78,0.07) 0%, transparent 40%),
                linear-gradient(to bottom, #0d3d3c 0%, var(--teal-deeper) 50%, #0a2e2e 100%);
    pointer-events: none;
  }
  .sidebar-profile {
    display: flex; align-items: center; gap: 10px;
    padding: 6px 8px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    margin-bottom: 10px;
  }
  .sidebar-avatar {
    width: 36px; height: 36px; border-radius: 50%;
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    border: 2px solid rgba(200,164,78,0.3);
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-family: var(--font-body); font-weight: 600; font-size: 13px;
    flex-shrink: 0;
  }
  .sidebar-profile-name {
    font-family: var(--font-body); font-size: 14px; font-weight: 600;
    color: #ffffff;
  }
  .sidebar-profile-role {
    font-size: 12px; color: rgba(255,255,255,0.5); margin-top: 2px;
  }
  .nav-item {
    position: relative;
    display: flex; align-items: center; gap: 10px;
    padding: 9px 12px; border-radius: 10px;
    font-family: var(--font-body); font-size: 14px; font-weight: 500;
    color: rgba(255,255,255,0.5); cursor: pointer;
    transition: all 0.15s;
  }
  .nav-item:hover { background: rgba(255,255,255,0.06); color: #ffffff; }
  .nav-item.active { background: rgba(255,255,255,0.08); color: #ffffff; font-weight: 600; }
  .nav-item.active::before {
    content: ''; position: absolute; left: -16px; top: 8px; bottom: 8px;
    width: 3px; border-radius: 0 2px 2px 0; background: var(--gold);
  }
  .nav-item-icon {
    width: 18px; height: 18px; border-radius: 4px;
    background: currentColor; opacity: 0.5;
    flex-shrink: 0;
  }

  /* TABLE */
  .table { width: 100%; border-collapse: collapse; background: var(--card-bg); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
  .table th {
    text-align: left; padding: 14px 18px;
    font-family: var(--font-body); font-size: 12px; font-weight: 600;
    color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.4px;
    border-bottom: 1px solid var(--border-strong);
    background: var(--cream);
  }
  .table td {
    padding: 14px 18px; font-family: var(--font-body); font-size: 14px;
    color: var(--text-primary); border-bottom: 1px solid rgba(0,0,0,0.04);
  }
  .table tr:last-child td { border-bottom: none; }
  .table tr:hover td { background: var(--cream); }
  .td-num { font-variant-numeric: tabular-nums; text-align: right; font-weight: 500; }

  /* —— 5. Extended — reusable pieces (tabs, list rows, etc.) */
  .prose a {
    color: var(--teal);
    text-decoration: underline;
    text-underline-offset: 2px;
    font-weight: 500;
  }
  .prose a:hover { color: var(--teal-dark); }
  .prose a:focus {
    outline: 2px solid var(--teal);
    outline-offset: 2px;
    border-radius: 2px;
  }
  .prose a:active { color: var(--teal-deeper); }

  .tabs {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0 8px;
    border-bottom: 1px solid var(--border-strong);
    max-width: 640px;
  }
  .tab {
    background: none;
    border: none;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    padding: 10px 16px 12px;
    margin-bottom: -1px;
    cursor: default;
    border-radius: 10px 10px 0 0;
    transition: color 0.15s, background 0.15s;
  }
  .tab:hover { color: var(--text-primary); background: var(--cream); }
  .tab.is-active {
    color: var(--teal);
    font-weight: 600;
    box-shadow: inset 0 -3px 0 0 var(--teal);
  }
  .tabs-note {
    width: 100%;
    max-width: 640px;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 8px;
    line-height: 1.5;
  }

  .choice {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-family: var(--font-body);
    font-size: 15px;
    color: var(--text-primary);
    margin-bottom: 12px;
  }
  .choice input { margin-top: 3px; flex-shrink: 0; }
  .input-accent { accent-color: var(--teal); }

  .toggle {
    --track: #c8c4bc;
    --track-on: #1a6b6a;
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-body);
    font-size: 15px;
    color: var(--text-primary);
  }
  .toggle input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
  }
  .toggle__ui {
    width: 44px;
    height: 24px;
    background: var(--track);
    border-radius: 999px;
    position: relative;
    flex-shrink: 0;
    transition: background 0.2s;
    cursor: pointer;
  }
  .toggle__ui::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
    transition: transform 0.2s;
  }
  .toggle input:checked + .toggle__ui { background: var(--track-on); }
  .toggle input:checked + .toggle__ui::after { transform: translateX(20px); }
  .toggle input:focus-visible + .toggle__ui { outline: 2px solid var(--teal); outline-offset: 2px; }
  .toggle span:last-child { padding-top: 1px; }

  .chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px 4px 12px;
    border-radius: 999px;
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 500;
    border: 1px solid rgba(26,107,106,0.2);
    background: var(--card-bg);
    color: var(--teal);
  }
  .chip__x {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: none;
    background: var(--cream);
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1;
    cursor: default;
  }

  .alert {
    display: flex;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 10px;
    font-family: var(--font-body);
    font-size: 14px;
    line-height: 1.45;
  }
  .alert__icon { flex-shrink: 0; width: 20px; text-align: center; font-size: 16px; }
  .alert__title { font-weight: 600; color: var(--text-primary); margin-bottom: 2px; }
  .alert--success { background: var(--sage-light); color: #3d5a3d; }
  .alert--error { background: var(--rose-light); color: #5a2d2d; }
  .alert--info { background: var(--teal-light); color: #1a3d3c; }
  .alert--warn { background: var(--warning-light); color: var(--warning-dark); }
  .toast {
    max-width: 360px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: var(--teal-deeper);
    color: #fff;
    border-radius: 10px;
    font-family: var(--font-body);
    font-size: 13px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
  }
  .toast a { color: #b8e0de; }

  .pager { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
  .pager button {
    min-width: 36px; height: 36px; padding: 0 8px;
    font-family: var(--font-body);
    font-size: 14px; font-weight: 500;
    color: var(--text-secondary);
    background: var(--card-bg);
    border: 1px solid var(--border-strong);
    border-radius: 8px;
    cursor: default;
  }
  .pager button:hover { background: var(--cream); color: var(--text-primary); }
  .pager button.is-on {
    background: var(--teal);
    color: #fff;
    border-color: var(--teal);
    font-weight: 600;
  }
  .pager__gap { color: var(--text-muted); padding: 0 4px; font-size: 14px; }

  .list {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid rgba(0,0,0,0.04);
    overflow: hidden;
    max-width: 400px;
  }
  .list-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    font-family: var(--font-body);
    font-size: 15px;
    color: var(--text-primary);
    border-bottom: 1px solid rgba(0,0,0,0.04);
    transition: background 0.12s;
    cursor: default;
  }
  .list-row:last-child { border-bottom: none; }
  .list-row:hover { background: var(--cream); }
  .list-row__meta { font-size: 12px; color: var(--text-muted); }
  .chevron { color: var(--text-muted); font-size: 18px; }

  .empty {
    text-align: center;
    padding: 48px 32px 44px;
    max-width: 400px;
    background: var(--card-bg);
    border-radius: 18px;
    box-shadow: var(--shadow);
    border: 1px dashed rgba(0,0,0,0.08);
  }
  .empty__mark {
    width: 64px; height: 64px; margin: 0 auto 16px; border-radius: 14px;
    background: var(--cream);
    display: flex; align-items: center; justify-content: center;
  }
  .empty h3 { font-family: var(--font-display); font-size: 22px; font-weight: 700; color: var(--text-primary); margin-bottom: 8px; }
  .empty p { color: var(--text-secondary); font-size: 14px; line-height: 1.5; margin-bottom: 20px; }

  .skel {
    display: flex; flex-direction: column; gap: 10px; max-width: 320px;
  }
  .skel-bar {
    height: 10px; border-radius: 5px;
    background: linear-gradient(90deg, var(--cream) 0%, #ebe6dc 50%, var(--cream) 100%);
    background-size: 200% 100%;
    animation: skel 1.2s ease-in-out infinite;
  }
  .skel-bar:nth-child(1) { width: 100%; }
  .skel-bar:nth-child(2) { width: 90%; }
  .skel-bar:nth-child(3) { width: 60%; }
  @keyframes skel { 0% { background-position: 0% 0; } 100% { background-position: -200% 0; } }

  .progress {
    width: 100%;
    max-width: 400px;
    height: 8px;
    border-radius: 4px;
    background: var(--cream);
    overflow: hidden;
  }
  .progress__fill {
    width: 62%;
    height: 100%;
    border-radius: 4px;
    background: var(--teal);
    transition: width 0.3s;
  }
  .progress-label {
    display: flex; justify-content: space-between; font-size: 12px; color: var(--text-muted);
    font-family: var(--font-body); margin-bottom: 6px; max-width: 400px; width: 100%;
  }

  .stepper { display: flex; align-items: center; flex-wrap: wrap; gap: 0; max-width: 520px; }
  .step { display: flex; align-items: center; }
  .step__circle {
    width: 32px; height: 32px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-body);
    font-size: 13px; font-weight: 600;
  }
  .step--done .step__circle { background: var(--teal); color: #fff; }
  .step--current .step__circle { background: var(--gold-light); color: var(--gold-dark); border: 2px solid var(--gold); }
  .step--todo .step__circle { background: var(--cream); color: var(--text-muted); border: 1px solid var(--border-strong); }
  .step__line { width: 40px; height: 2px; background: var(--border-strong); }
  @media (max-width: 480px) { .step__line { width: 24px; } }

  .drop {
    max-width: 400px; padding: 32px 24px; text-align: center; border-radius: 12px;
    border: 2px dashed rgba(26,107,106,0.25);
    background: var(--cream);
  }
  .drop p { color: var(--text-secondary); font-size: 14px; margin: 8px 0 0; }
  .drop .btn-primary { margin-top: 12px; }

  .extend-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 32px; align-items: start; }
  @media (max-width: 900px) { .extend-grid { grid-template-columns: 1fr; } }
  @media (max-width: 640px) { .extend-form-grid { grid-template-columns: 1fr !important; } }

  @media (max-width: 720px) {
    .nav { padding: 0 16px; }
    .nav-links { display: none; }
    .hero { padding: 48px 20px 32px; }
    .hero h1 { font-size: 36px; }
    .section { padding: 40px 20px; }
    .section-title { font-size: 24px; }
  }

  /* ——— Design system page shell (/design) — floating nav + layout grid. ——— */
  .ds-layout {
    /* Catalogue-only headings: geometric sans, not Playfair/DM (signals “meta” docs vs product UI). */
    --font-catalog-heading: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
    position: relative;
    min-height: 100vh;
    box-sizing: border-box;
    background: var(--bg, #f5f2ed);
  }

  .ds-float-nav {
    position: fixed;
    z-index: 10000;
    left: 1rem;
    top: 1rem;
    bottom: 1rem;
    width: 11.5rem;
    max-width: calc(100vw - 2rem);
    display: flex;
    flex-direction: column;
    padding: 1rem 0.75rem;
    box-sizing: border-box;
    border-radius: 14px;
    background: var(--panel-elevated, #fff);
    box-shadow: 0 10px 40px rgba(15, 45, 44, 0.18);
    border: 1px solid var(--border, rgba(26, 107, 106, 0.2));
  }

  .ds-float-nav-head {
    margin-bottom: 0.75rem;
    padding: 0 0.25rem 0.5rem;
    border-bottom: 1px solid var(--border, rgba(26, 107, 106, 0.12));
  }
  .ds-float-nav-title {
    font-family: var(--font-catalog-heading) !important;
  }
  .ds-float-nav-sub {
    color: var(--text-secondary) !important;
  }

  .ds-float-nav-links {
    flex: 1 1 auto;
    overflow: auto;
    min-height: 0;
    padding: 0 0.15rem;
  }

  /* Plain-anchor scrollspy nav inside the float-nav panel. */
  .ds-scrollspy-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
  }
  .ds-scrollspy-list a {
    display: block;
    padding: 0.45rem 0.5rem;
    font-size: 0.85rem;
    border-radius: 8px;
    color: var(--text-secondary, #3d4a4a);
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: background-color 120ms ease, color 120ms ease;
  }
  .ds-scrollspy-list a:hover {
    background: var(--sidebar-hover, rgba(26, 107, 106, 0.08));
    color: var(--text-primary, #1a1a1a);
  }
  .ds-scrollspy-list a.ds-nav-active {
    background: rgba(26, 107, 106, 0.14);
    color: var(--teal, #1a6b6a);
    font-weight: 600;
    border-left-color: var(--teal, #1a6b6a);
  }

  .ds-float-nav-bottom {
    margin-top: auto;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border, rgba(26, 107, 106, 0.12));
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: stretch;
  }

  .ds-float-nav-bottom button[data-theme-toggle] {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    padding: 0.4rem;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--text-secondary, #3d4a4a);
    cursor: pointer;
  }
  .ds-float-nav-bottom button[data-theme-toggle]:hover {
    background: var(--sidebar-hover, rgba(26, 107, 106, 0.08));
  }

  .ds-layout-body {
    padding: 0;
    min-height: 100vh;
  }

  .adviso-ds-main:focus { outline: none; }
  .adviso-ds-main:focus-visible { outline: 2px solid var(--teal, #1a6b6a); outline-offset: 2px; }

  @media (min-width: 900px) {
    .ds-layout-body { padding-left: calc(1rem + 11.5rem + 0.75rem); }
  }

  @media (max-width: 899px) {
    .ds-float-nav {
      z-index: 10000;
      position: fixed;
      left: 0.5rem;
      right: 0.5rem;
      top: auto;
      bottom: 0.5rem;
      width: auto;
      max-height: min(48vh, 22rem);
      flex-direction: column;
      flex-wrap: nowrap;
      overflow-y: auto;
      padding: 0.75rem;
    }
    .ds-float-nav-head { margin-bottom: 0.4rem; padding-bottom: 0.4rem; flex: 0 0 auto; }
    .ds-float-nav-links { flex: 1 1 auto; min-height: 0; }
    .ds-float-nav-bottom {
      flex: 0 0 auto;
      flex-direction: row;
      align-items: center;
      justify-content: space-between;
      gap: 0.5rem;
      margin-top: 0.5rem;
      padding-top: 0.5rem;
      border-top: 1px solid var(--border, rgba(26, 107, 106, 0.12));
    }
    .ds-layout-body { padding-left: 0; padding-bottom: calc(0.5rem + min(48vh, 22rem) + 0.5rem); }
  }

  /* ─────────────────────────────────────────────────────────────────
     Catalogue helpers — consumed only by the /design page (DesignSystem.razor).
     Replaces inline style= attributes so the catalogue stays CSS-driven.
     ───────────────────────────────────────────────────────────────── */

  /* Catalogue headings: Space Grotesk (see .ds-layout --font-catalog-heading). */
  .adviso-ds-catalog .ds-doc-heading {
    font-family: var(--font-catalog-heading) !important;
  }
  /* Explanatory prose: use ink-mix secondary, not Mud Color.Secondary (brand gold). */
  .adviso-ds-catalog .ds-catalog-prose {
    color: var(--text-secondary) !important;
  }
  .adviso-ds-catalog .ds-caption-block {
    display: block;
  }
  .adviso-ds-catalog .ds-catalog-prose b,
  .adviso-ds-catalog .ds-catalog-prose .ds-strong-body {
    color: var(--text-primary) !important;
    font-weight: 600;
  }
  .adviso-ds-catalog .ds-catalog-prose code {
    color: var(--teal);
  }
  .adviso-ds-catalog .ds-muted-label {
    color: var(--text-secondary) !important;
  }
  .adviso-ds-catalog .ds-type-sample-meta {
    color: var(--text-muted) !important;
  }
  .adviso-ds-catalog .ds-eyebrow.mud-typography-subtitle2,
  .adviso-ds-catalog .ds-form-section-label.mud-typography-subtitle2 {
    font-family: var(--font-catalog-heading) !important;
  }

  .adviso-ds-catalog .ds-eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.4px;
  }
  .adviso-ds-catalog .ds-eyebrow--muted {
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--text-secondary);
  }
  .adviso-ds-catalog .ds-tagline-lockup {
    font-family: var(--font-tagline);
    font-style: italic;
    font-size: 18px;
    letter-spacing: 0.3px;
    color: var(--gold-dark);
  }
  .adviso-ds-catalog .ds-mono { font-family: ui-monospace, Menlo, monospace; }
  .adviso-ds-catalog .ds-code-inline {
    font-family: ui-monospace, Menlo, monospace;
    font-size: 14px;
    color: var(--teal);
  }
  .adviso-ds-catalog .ds-strong-body { color: var(--text-primary); }
  .adviso-ds-catalog .ds-tabular-nums { font-variant-numeric: tabular-nums; }

  /* Prose / intro paragraph widths */
  .adviso-ds-catalog .ds-prose-360 { max-width: 360px; }
  .adviso-ds-catalog .ds-prose-520 { max-width: 520px; }
  .adviso-ds-catalog .ds-prose-560 { max-width: 560px; }
  .adviso-ds-catalog .ds-prose-720 { max-width: 720px; }
  .adviso-ds-catalog .ds-prose-820 { max-width: 820px; }
  .adviso-ds-catalog .ds-paper-960 { max-width: 960px; }

  /* Swatch colour block (the coloured top rectangle of each swatch card) */
  .adviso-ds-catalog .ds-swatch-block { height: 96px; }

  /* Typography sample rows */
  .adviso-ds-catalog .ds-type-sample {
    padding: 20px 0;
    border-bottom: 1px solid var(--border-strong);
  }
  .adviso-ds-catalog .ds-type-hero    { font-size: 52px; font-weight: 900; line-height: 1.05; letter-spacing: -0.5px; }
  .adviso-ds-catalog .ds-type-large   { font-size: 40px; font-weight: 900; line-height: 1.1;  letter-spacing: -0.4px; }
  .adviso-ds-catalog .ds-type-section { font-size: 28px; font-weight: 700; line-height: 1.15; letter-spacing: -0.2px; }
  .adviso-ds-catalog .ds-type-card    { font-size: 22px; font-weight: 700; line-height: 1.2;  }
  .adviso-ds-catalog .ds-type-body-l  { font-size: 17px; font-weight: 400; line-height: 1.55; }
  .adviso-ds-catalog .ds-type-body    { font-size: 15px; font-weight: 400; line-height: 1.5;  }
  .adviso-ds-catalog .ds-type-label   { font-size: 13px; font-weight: 600; letter-spacing: 0.1px; }
  .adviso-ds-catalog .ds-type-tabular { font-size: 15px; font-weight: 500; font-variant-numeric: tabular-nums; letter-spacing: 0.3px; }
  .adviso-ds-catalog .ds-type-tagline { font-family: var(--font-tagline); font-style: italic; font-size: 18px; font-weight: 500; letter-spacing: 0.3px; color: var(--gold-dark); }

  /* Sidebar mock (teal-deeper panel + gold right-edge gradient) */
  .adviso-ds-catalog .ds-sidebar-mock {
    position: relative;
    width: 220px;
    background: var(--teal-deeper);
    border-radius: 14px;
    padding: 16px;
    color: #fff;
  }
  .adviso-ds-catalog .ds-sidebar-mock::after {
    content: "";
    position: absolute;
    right: 0; top: 0; bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, transparent, var(--gold), transparent);
    border-radius: 0 14px 14px 0;
  }
  .adviso-ds-catalog .ds-sidebar-mock-name { color: #fff; }
  .adviso-ds-catalog .ds-sidebar-mock-role { color: rgba(255,255,255,0.65); }
  .adviso-ds-catalog .ds-sidebar-mock-item {
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 14px;
    color: rgba(255,255,255,0.75);
  }
  .adviso-ds-catalog .ds-sidebar-mock-item.is-active {
    background: rgba(200, 164, 78, 0.15);
    color: #fff;
    font-weight: 600;
    border-left: 3px solid var(--gold);
    padding-left: 9px;
  }

  /* Table alignment helpers */
  .adviso-ds-catalog .ds-td-strong  { font-weight: 500; }
  .adviso-ds-catalog .ds-td-right   { text-align: right; }
  .adviso-ds-catalog .ds-td-num     { text-align: right; font-variant-numeric: tabular-nums; }
  .adviso-ds-catalog .ds-td-muted   { color: var(--text-muted); }

  /* Empty state + drop zone blocks */
  .adviso-ds-catalog .ds-empty-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .adviso-ds-catalog .ds-drop-block {
    border: 2px dashed var(--teal);
    background: var(--cream);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  /* Stepper circles + connector lines */
  .adviso-ds-catalog .ds-step-circle {
    width: 32px; height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    font-weight: 600;
  }
  .adviso-ds-catalog .ds-step-circle--done    { background: var(--teal); color: #fff; }
  .adviso-ds-catalog .ds-step-circle--current { background: #fff; border: 2px solid var(--gold); color: var(--text-primary); }
  .adviso-ds-catalog .ds-step-circle--todo    { background: var(--cream); color: var(--text-muted); }
  .adviso-ds-catalog .ds-step-line {
    flex: 1;
    height: 2px;
    min-width: 16px;
    background: var(--border-strong);
  }

  /* Sidebar mock caption column */
  .adviso-ds-catalog .ds-sidebar-caption {
    flex: 1;
    min-width: 280px;
    max-width: 520px;
  }

  /* Forms section section-labels (same rule as .ds-eyebrow--muted but kept
     distinct so future form-specific tweaks don't bleed into other eyebrows). */
  .adviso-ds-catalog .ds-form-section-label {
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--text-secondary);
  }

  /* ── Colour explorer (/design#colors): tab rail + samples ── */
  .adviso-ds-catalog .ds-color-explorer {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    margin-top: 0.5rem;
  }
  .adviso-ds-catalog .ds-color-rail {
    flex: 0 0 14rem;
    max-width: 100%;
    position: sticky;
    top: 0.75rem;
    align-self: flex-start;
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
    box-sizing: border-box;
    padding: 0.28rem 0.32rem 0.4rem;
    border-radius: 12px;
    border: 1px solid var(--border-strong);
    background: var(--card);
  }
  .adviso-ds-catalog .ds-color-rail-heading {
    display: block;
    padding: 0.2rem 0.32rem 0.1rem;
    font-family: var(--font-catalog-heading);
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-secondary);
  }
  .adviso-ds-catalog .ds-color-rail-heading--derived {
    margin-top: 0.2rem;
    padding-top: 0.35rem;
    border-top: 1px solid var(--border);
  }
  .adviso-ds-catalog .ds-color-rail-subheading {
    display: block;
    padding: 0.16rem 0.32rem 0.04rem;
    margin-top: 0.06rem;
    font-family: var(--font-catalog-heading);
    font-size: 0.56rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-muted);
  }
  .adviso-ds-catalog .ds-color-rail-subheading:first-of-type {
    margin-top: 0;
  }
  .adviso-ds-catalog .ds-color-rail-btn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    width: 100%;
    text-align: left;
    padding: 0.2rem 0.32rem;
    margin-bottom: 0;
    border: none;
    border-radius: 6px;
    background: transparent;
    cursor: pointer;
    font: inherit;
    color: var(--text-primary);
    transition: background 0.12s;
  }
  .adviso-ds-catalog .ds-color-rail-btn:hover {
    background: var(--cream);
  }
  .adviso-ds-catalog .ds-color-rail-btn.is-active {
    background: var(--teal-light);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--teal) 45%, transparent);
  }
  .adviso-ds-catalog .ds-color-rail-swatch {
    width: 1.2rem;
    height: 1.2rem;
    border-radius: 4px;
    flex-shrink: 0;
    border: 1px solid var(--border-strong);
    box-sizing: border-box;
    background: var(--ds-rail-swatch-fill, var(--teal));
  }

  .adviso-ds-catalog .ds-form-input-demo {
    max-width: 220px;
  }

  .adviso-ds-catalog .ds-demo-chrome-panel {
    border-radius: 12px;
    background: var(--teal-deeper);
    color: #fff;
  }

  .adviso-ds-catalog .ds-demo-gold-gradient-bar {
    height: 8px;
    border-radius: 4px;
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    max-width: 280px;
  }

  .adviso-ds-catalog .ds-demo-gold-wash {
    border-radius: 12px;
    background: var(--gold-light);
    color: var(--gold-dark);
    max-width: 320px;
  }
  .adviso-ds-catalog .ds-color-rail-meta {
    flex: 1;
    min-width: 0;
  }
  .adviso-ds-catalog .ds-color-rail-name {
    display: block;
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.15;
  }
  .adviso-ds-catalog .ds-color-rail-var {
    display: block;
    font-size: 0.6rem;
    font-family: ui-monospace, Menlo, monospace;
    color: var(--text-muted);
    margin-top: 0;
    line-height: 1.2;
  }
  .adviso-ds-catalog .ds-color-panel {
    flex: 1;
    min-width: 0;
  }
  .adviso-ds-catalog .ds-color-sample {
    border: 1px solid var(--border-strong);
    border-radius: 12px;
    padding: 1rem 1.1rem;
    background: var(--card);
    margin-bottom: 1rem;
  }
  .adviso-ds-catalog .ds-color-sample-title {
    font-family: var(--font-catalog-heading);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
  }
  .adviso-ds-catalog .ds-color-audit-note {
    line-height: 1.45;
    color: var(--text-secondary) !important;
  }
  .adviso-ds-catalog .ds-color-audit-note code {
    color: var(--teal);
  }
  .adviso-ds-catalog .ds-demo-canvas {
    border-radius: 12px;
    border: 1px dashed var(--border-strong);
    background: var(--bg);
  }
  .adviso-ds-catalog .ds-demo-neutral-strong {
    border-radius: 10px;
    background: var(--cream);
    border-bottom: 2px solid var(--cream);
  }

  @media (max-width: 720px) {
    .adviso-ds-catalog .ds-color-explorer {
      flex-direction: column;
    }
    .adviso-ds-catalog .ds-color-rail {
      position: relative;
      top: 0;
      flex: 0 0 auto;
      width: 100%;
      max-height: min(40vh, 16rem);
    }
  }

  /* /design — single-column lanes preview (full board is 4 columns on /cases) */
  .adviso-ds-catalog .ds-lanes-preview.lanes-board {
    grid-template-columns: minmax(280px, 1fr);
    max-width: 320px;
    padding: 0;
  }
