/* Claude design tokens — see awesome-design-md/design-md/claude/DESIGN.md */
    :root {
      --primary: #cc785c;
      --primary-active: #a9583e;
      --primary-disabled: #e6dfd8;
      --ink: #141413;
      --body: #3d3d3a;
      --body-strong: #252523;
      --muted: #6c6a64;
      --muted-soft: #8e8b82;
      --hairline: #e6dfd8;
      --hairline-soft: #ebe6df;
      --canvas: #faf9f5;
      --surface-soft: #f5f0e8;
      --surface-card: #efe9de;
      --surface-cream-strong: #e8e0d2;
      --surface-dark: #181715;
      --surface-dark-elevated: #252320;
      --surface-dark-soft: #1f1e1b;
      --on-primary: #ffffff;
      --on-dark: #faf9f5;
      --on-dark-soft: #a09d96;
      --accent-teal: #5db8a6;
      --accent-amber: #e8a55a;
      --success: #5db872;
      --warning: #d4a017;
      --error: #c64545;
      --font-display: "Cormorant Garamond", "Tiempos Headline", Georgia, serif;
      --font-body: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
      --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
      --radius-xs: 4px;
      --radius-sm: 6px;
      --radius-md: 8px;
      --radius-lg: 12px;
      --radius-xl: 16px;
      --radius-pill: 9999px;
      --space-xs: 8px;
      --space-sm: 12px;
      --space-md: 16px;
      --space-lg: 24px;
      --space-xl: 32px;
      --nav-rail-w: 76px;
      --header-h: 64px;
      /* legacy aliases for JS inline styles */
      --bg: var(--canvas);
      --panel: var(--surface-card);
      --panel-2: var(--surface-soft);
      --line: var(--hairline);
      --text: var(--ink);
      --accent: var(--primary);
      --accent-2: var(--primary-active);
      --green: var(--success);
      --red: var(--error);
      --yellow: var(--accent-amber);
      --blue: var(--accent-teal);
      --mono: var(--font-mono);
      --ok: var(--success);
      --scrollbar-w: 10px;
      --scrollbar-track: transparent;
      --scrollbar-thumb: var(--surface-cream-strong);
      --scrollbar-thumb-hover: #d4cdc3;
      --scrollbar-thumb-active: var(--primary);
      --scrollbar-thumb-dark: #35322e;
      --scrollbar-thumb-dark-hover: #4a4742;
    }
    *, *::before, *::after { box-sizing: border-box; }
    html {
      scroll-behavior: smooth;
      scrollbar-gutter: stable;
      scrollbar-width: thin;
      scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
    }
    * {
      scrollbar-width: thin;
      scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
    }
    *::-webkit-scrollbar {
      width: var(--scrollbar-w);
      height: var(--scrollbar-w);
    }
    *::-webkit-scrollbar-track {
      background: var(--scrollbar-track);
    }
    *::-webkit-scrollbar-thumb {
      background-color: var(--scrollbar-thumb);
      border: 3px solid transparent;
      border-radius: var(--radius-pill);
      background-clip: padding-box;
    }
    *::-webkit-scrollbar-thumb:hover {
      background-color: var(--scrollbar-thumb-hover);
    }
    *::-webkit-scrollbar-thumb:active {
      background-color: var(--scrollbar-thumb-active);
    }
    *::-webkit-scrollbar-corner {
      background: transparent;
    }
    *::-webkit-scrollbar-button {
      display: none;
      width: 0;
      height: 0;
    }
    html, body {
      margin: 0;
      padding: 0;
      min-height: 100%;
      background: var(--canvas);
      color: var(--body);
      font-family: var(--font-body);
      font-size: 14px;
      line-height: 1.55;
    }
    a { color: var(--primary); text-decoration: none; }
    a:hover { color: var(--primary-active); }
    code {
      font-family: var(--font-mono);
      font-size: 12px;
      background: var(--surface-soft);
      padding: 1px 5px;
      border-radius: var(--radius-xs);
    }

    #app-panel {
      --dashboard-rail-w: 76px;
      --dashboard-shell-max: 1440px;
      display: flex;
      flex-direction: column;
      min-height: 100vh;
      width: min(var(--dashboard-shell-max), 100%);
      max-width: var(--dashboard-shell-max);
      margin: 0 auto;
      box-sizing: border-box;
    }

    #app-panel .app-body {
      flex: 1;
    }

    /* Same 76px | 1fr grid as .app-body — rail edge aligns with sidebar, main with panels */
    .dashboard-chrome {
      display: grid;
      grid-template-columns: var(--dashboard-rail-w) minmax(0, 1fr);
      align-items: center;
      width: 100%;
      margin: 0;
      padding: 0;
      box-sizing: border-box;
    }

    .dashboard-chrome__rail-cell {
      display: flex;
      align-items: center;
      justify-content: center;
      min-height: var(--header-h);
      padding: 0 8px;
      box-sizing: border-box;
    }

    .dashboard-chrome__main-cell {
      min-width: 0;
      padding-left: var(--space-lg);
      padding-right: var(--space-lg);
      box-sizing: border-box;
    }

    .top-nav__main {
      display: flex;
      align-items: center;
      gap: var(--space-md);
      flex-wrap: wrap;
      min-height: var(--header-h);
    }

    .top-nav {
      position: sticky;
      top: 0;
      z-index: 100;
      padding: 0;
      display: block;
      width: 100%;
      background: var(--canvas);
      border-bottom: 1px solid var(--hairline);
    }

    .top-nav .dashboard-chrome {
      width: 100%;
    }

    .top-nav__mark-link {
      display: flex;
      align-items: center;
      justify-content: center;
      color: inherit;
      text-decoration: none !important;
    }

    .top-nav__title {
      margin: 0;
      font-family: var(--font-display);
      font-size: 22px;
      font-weight: 400;
      letter-spacing: -0.3px;
      color: var(--ink);
      white-space: nowrap;
      flex-shrink: 0;
    }
    .top-nav__mark {
      width: 42px;
      height: 42px;
      flex-shrink: 0;
      color: var(--ink);
    }
    .top-nav__meta {
      display: flex;
      align-items: center;
      gap: var(--space-sm);
      flex-wrap: wrap;
    }
    .top-nav .spacer { flex: 1; }
    .top-nav__link {
      font-size: 13px;
      font-weight: 500;
      color: var(--muted);
    }
    .top-nav__link a { color: var(--ink); font-weight: 500; }

    .badge {
      display: inline-flex;
      align-items: center;
      padding: 4px 12px;
      border-radius: var(--radius-pill);
      font-size: 12px;
      font-weight: 500;
      letter-spacing: 0.06em;
      text-transform: uppercase;
      background: var(--surface-card);
      color: var(--ink);
      border: 1px solid transparent;
    }
    .badge--live { background: var(--primary); color: var(--on-primary); }
    .badge--dry { background: var(--accent-amber); color: var(--ink); }
    .badge--sim { background: var(--surface-cream-strong); color: var(--body-strong); }
    .badge--on { background: var(--success); color: var(--on-primary); }
    .badge--off { background: var(--error); color: var(--on-primary); }
    .small { font-size: 12px; color: var(--muted); font-weight: 500; }

    .app-body {
      display: flex;
      min-height: calc(100vh - var(--header-h));
      width: 100%;
      margin: 0;
    }

    .dashboard-footer {
      margin-top: auto;
      width: 100%;
    }

    .dashboard-footer__main {
      display: flex;
      align-items: center;
      justify-content: space-between;
      flex-wrap: wrap;
      gap: 1rem;
      padding-top: 1.5rem;
      padding-bottom: 2rem;
    }

    .dashboard-footer__main nav {
      display: flex;
      flex-wrap: wrap;
      gap: 1rem;
    }

    .app-rail {
      flex: 0 0 76px;
      display: flex;
      flex-direction: column;
      gap: 4px;
      padding: 14px 8px;
      background: var(--surface-soft);
      border-right: 1px solid var(--hairline);
      position: sticky;
      top: var(--header-h);
      height: calc(100vh - var(--header-h));
      overflow-y: auto;
    }
    .app-rail__item {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 4px;
      padding: 8px 4px;
      flex-shrink: 0;
      border-radius: var(--radius-md);
      color: var(--muted);
      font-size: 10px;
      font-weight: 600;
      letter-spacing: 0.06em;
      text-transform: uppercase;
      text-align: center;
      line-height: 1.2;
      transition: background 0.15s, color 0.15s;
    }
    .app-rail__item svg {
      width: 20px;
      height: 20px;
      stroke: currentColor;
      fill: none;
      stroke-width: 1.6;
      stroke-linecap: round;
      stroke-linejoin: round;
    }
    .app-rail__item:hover {
      background: var(--surface-card);
      color: var(--ink);
    }
    .app-rail__item.is-active {
      background: var(--surface-card);
      color: var(--primary-active);
      box-shadow: inset 3px 0 0 var(--primary);
    }
    .app-rail__spacer { display: none; }

    .app-main {
      flex: 1;
      min-width: 0;
      padding: var(--space-lg);
      max-width: none;
      box-sizing: border-box;
    }

    .command-deck {
      margin-bottom: var(--space-lg);
      scroll-margin-top: calc(var(--header-h) + var(--space-md));
      background: var(--surface-card);
      border: 1px solid var(--hairline);
      border-radius: var(--radius-lg);
      padding: 10px var(--space-md);
    }
    .command-deck__toolbar {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 8px 12px;
    }
    .command-deck__toolbar .panel-title {
      margin: 0 4px 0 0;
      flex-shrink: 0;
    }
    .command-deck__toolbar .btns {
      flex-shrink: 0;
      margin: 0;
    }
    .mode-inline {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      flex-shrink: 0;
      padding: 2px 2px 2px 8px;
      background: var(--canvas);
      border: 1px solid var(--hairline);
      border-radius: var(--radius-md);
    }
    .mode-inline__label {
      font-size: 10px;
      font-weight: 600;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      color: var(--muted);
      white-space: nowrap;
    }
    .mode-switch--compact {
      display: inline-flex;
      width: auto;
      padding: 2px;
      background: transparent;
      border: none;
    }
    .mode-switch--compact button {
      height: 32px;
      min-width: 46px;
      padding: 0 10px;
      font-size: 11px;
    }
    .conn-strip {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 4px 10px;
      flex: 1 1 200px;
      min-width: 0;
      padding: 5px 10px;
      background: var(--surface-dark);
      border: 1px solid var(--surface-dark-elevated);
      border-radius: var(--radius-md);
      font-family: var(--font-mono);
      font-size: 11px;
      line-height: 1.25;
    }
    .conn-strip .conn-k {
      color: var(--on-dark-soft);
      font-size: 10px;
      font-weight: 600;
      letter-spacing: 0.06em;
      text-transform: uppercase;
    }
    .conn-strip .conn-v {
      color: var(--on-dark);
      white-space: nowrap;
    }
    .conn-strip .conn-sep {
      color: var(--on-dark-soft);
      opacity: 0.45;
      user-select: none;
    }
    .monitor-grid {
      display: grid;
      grid-template-columns: minmax(0, 1fr) minmax(280px, 320px);
      gap: var(--space-lg);
      align-items: start;
      margin-bottom: var(--space-xl);
    }
    .monitor-grid > .panel--log { scroll-margin-top: calc(var(--header-h) + var(--space-md)); }
    .operator-stack {
      display: flex;
      flex-direction: column;
      gap: var(--space-md);
      position: sticky;
      top: calc(var(--header-h) + var(--space-lg));
      max-height: calc(100vh - var(--header-h) - var(--space-lg) * 2);
      overflow-y: auto;
    }
    .operator-stack:has(.is-nav-flash) {
      overflow: visible;
      z-index: 3;
    }
    .operator-stack .panel { scroll-margin-top: calc(var(--header-h) + var(--space-md)); }

    .configure-zone {
      scroll-margin-top: calc(var(--header-h) + var(--space-md));
    }
    .zone-header {
      margin: 0 0 var(--space-md);
      padding-bottom: var(--space-sm);
      border-bottom: 1px solid var(--hairline);
    }
    .zone-header h2 {
      margin: 0;
      font-family: var(--font-display);
      font-size: 28px;
      font-weight: 400;
      letter-spacing: -0.3px;
      color: var(--ink);
    }
    .zone-header p {
      margin: 6px 0 0;
      font-size: 13px;
      color: var(--muted);
    }

    .settings-deck {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: var(--space-md);
    }

    @keyframes nav-section-flash {
      0%, 32% {
        opacity: 1;
        box-shadow:
          0 0 20px 8px rgba(255, 228, 150, 0.7),
          0 0 40px 16px rgba(240, 200, 90, 0.5),
          0 0 64px 24px rgba(232, 184, 74, 0.32);
      }
      100% {
        opacity: 0;
        box-shadow:
          0 0 0 0 transparent,
          0 0 0 0 transparent,
          0 0 0 0 transparent;
      }
    }

    .panel.is-nav-flash,
    .command-deck.is-nav-flash {
      position: relative;
      z-index: 2;
      isolation: isolate;
    }

    .panel.is-nav-flash::after,
    .command-deck.is-nav-flash::after {
      content: '';
      position: absolute;
      inset: -14px;
      border-radius: calc(var(--radius-lg) + 6px);
      pointer-events: none;
      z-index: -1;
      animation: nav-section-flash 1.8s ease-out;
      box-shadow:
        0 0 18px 6px rgba(240, 200, 90, 0.55),
        0 0 36px 14px rgba(232, 184, 74, 0.38),
        0 0 56px 22px rgba(200, 155, 50, 0.22);
    }

    .panel {
      background: var(--surface-card);
      border: 1px solid var(--hairline);
      border-radius: var(--radius-lg);
      padding: var(--space-md) var(--space-md) var(--space-sm);
    }
    .panel--dark {
      background: var(--surface-dark);
      border-color: var(--surface-dark-elevated);
      color: var(--on-dark);
    }
    .panel--dark .footer-note { color: var(--on-dark-soft); }
    .panel--log { padding: var(--space-md); }
    .panel--span-2 { grid-column: 1 / -1; }

    .sim-fields {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 6px 14px;
      margin-bottom: 8px;
      align-items: center;
    }
    .sim-fields .row {
      flex-direction: row;
      align-items: center;
      margin: 0;
      gap: 8px;
      min-height: 0;
    }
    .sim-fields .row label {
      flex: 0 0 7.25rem;
      font-size: 12px;
      line-height: 1.25;
    }
    .sim-fields .row input[type="number"] {
      flex: 1 1 auto;
      width: auto;
      min-width: 0;
      height: 34px;
      padding: 0 10px;
      font-size: 12px;
    }
    .sim-actions {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 8px 12px;
      padding-top: 6px;
      border-top: 1px solid var(--hairline-soft);
    }
    .sim-actions .footer-note { margin: 0; flex: 1 1 200px; }

    .row {
      display: flex;
      align-items: center;
      gap: var(--space-sm);
      margin: var(--space-xs) 0;
    }
    .row label {
      color: var(--muted);
      flex: 0 0 148px;
      font-size: 13px;
      font-weight: 500;
    }
    .panel--dark .row label { color: var(--on-dark-soft); }
    .row input[type="text"],
    .row input[type="number"],
    .row select {
      flex: 1;
      min-width: 0;
      height: 40px;
      background: var(--canvas);
      color: var(--ink);
      border: 1px solid var(--hairline);
      border-radius: var(--radius-md);
      padding: 0 12px;
      font-family: var(--font-mono);
      font-size: 13px;
    }
    #section-credentials .credentials-form .row input[type="password"],
    #section-credentials .credentials-form .row input[type="text"] {
      flex: 0 0 280px;
      width: 280px;
      max-width: calc(100% - 160px);
      min-width: 0;
      height: 30px;
      background: var(--canvas);
      color: var(--ink);
      border: 1px solid var(--hairline);
      border-radius: var(--radius-md);
      padding: 0 10px;
      font-family: var(--font-mono);
      font-size: 12px;
      line-height: 1.2;
      box-sizing: border-box;
    }
    .row input:focus,
    #section-credentials .credentials-form .row input:focus {
      outline: none;
      border-color: var(--primary);
      box-shadow: 0 0 0 3px rgba(204, 120, 92, 0.15);
    }
    .row-hint {
      flex: 1 1 220px;
      min-width: 0;
      font-size: 12px;
      line-height: 1.4;
      color: var(--muted);
    }
    .row-hint a {
      color: var(--primary);
      font-weight: 600;
      text-decoration: underline;
      text-underline-offset: 2px;
    }
    .row-hint a:hover { color: var(--ink); }
    .row .slider { display: flex; align-items: center; gap: var(--space-xs); width: 100%; }
    .row input[type="range"] {
      flex: 1;
      accent-color: var(--primary);
      height: 40px;
      padding: 0;
      border: none;
      background: transparent;
    }
    .row .slider .val {
      font-family: var(--font-mono);
      color: var(--primary);
      width: 48px;
      text-align: right;
      font-weight: 500;
    }

    .btns { display: flex; gap: var(--space-xs); flex-wrap: wrap; align-items: center; }
    button {
      height: 40px;
      padding: 0 16px;
      background: var(--canvas);
      color: var(--ink);
      border: 1px solid var(--hairline);
      border-radius: var(--radius-md);
      cursor: pointer;
      font-family: var(--font-body);
      font-size: 14px;
      font-weight: 500;
      line-height: 1;
    }
    button:hover:not(:disabled) {
      border-color: var(--primary);
      color: var(--primary-active);
    }
    button.primary {
      background: var(--primary);
      color: var(--on-primary);
      border-color: var(--primary);
    }
    button.primary:hover:not(:disabled) {
      background: var(--primary-active);
      border-color: var(--primary-active);
      color: var(--on-primary);
    }
    button.danger {
      background: transparent;
      color: var(--error);
      border-color: rgba(198, 69, 69, 0.35);
    }
    button.danger:hover:not(:disabled) {
      border-color: var(--error);
      color: var(--error);
      background: rgba(198, 69, 69, 0.06);
    }
    button.ghost {
      background: transparent;
      color: var(--muted);
      border-color: transparent;
    }
    button.ghost:hover:not(:disabled) { background: var(--surface-soft); color: var(--ink); }
    button.active {
      background: var(--primary);
      color: var(--on-primary);
      border-color: var(--primary);
    }
    button:disabled { opacity: 0.45; cursor: not-allowed; }

    .kv {
      display: grid;
      grid-template-columns: auto 1fr;
      gap: 6px 12px;
      font-family: var(--font-mono);
      font-size: 12px;
    }
    .kv .k { color: var(--muted); font-weight: 500; }
    .panel--dark .kv .k { color: var(--on-dark-soft); }
    .kv .v { color: var(--ink); overflow: hidden; text-overflow: ellipsis; }
    .panel--dark .kv .v { color: var(--on-dark); }
    #kv-mint, #kv-dev { white-space: nowrap; max-width: 100%; cursor: default; }

    .priv-stats {
      margin: 0 0 var(--space-sm);
      max-width: 420px;
    }
    .priv-note {
      margin: 0 0 var(--space-sm);
      padding: 10px 12px;
      background: rgba(204, 120, 92, 0.1);
      border: 1px dashed rgba(204, 120, 92, 0.35);
      border-radius: var(--radius-md);
      color: var(--primary-active);
      font-size: 12px;
      line-height: 1.45;
    }

    .wallet-list {
      list-style: none;
      margin: var(--space-xs) 0 0;
      padding: 0;
      max-height: 280px;
      overflow: auto;
    }
    .wallet-list li {
      display: grid;
      grid-template-columns: 16px 1fr auto;
      align-items: center;
      gap: var(--space-xs);
      padding: 6px 8px;
      font-family: var(--font-mono);
      font-size: 11px;
      border-radius: var(--radius-sm);
    }
    .wallet-list li:hover { background: var(--surface-soft); }
    .wallet-list .addr { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .wallet-list .key-dot {
      width: 8px;
      height: 8px;
      border-radius: 50%;
      background: var(--surface-soft);
      border: 1px solid var(--hairline);
    }
    .wallet-list .key-dot.on { background: var(--success); border-color: var(--success); }
    .wallet-list .row-actions { display: flex; gap: 6px; }
    .wallet-list .sell-area {
      grid-column: 1 / -1;
      padding: var(--space-sm);
      margin-top: 6px;
      background: var(--surface-soft);
      border: 1px solid var(--hairline);
      border-radius: var(--radius-md);
      font-family: var(--font-mono);
      font-size: 12px;
    }
    .wallet-list .sell-area .sell-row {
      display: flex;
      align-items: center;
      gap: var(--space-xs);
      margin-bottom: 6px;
    }
    .wallet-list .sell-area .sell-row:last-child { margin-bottom: 0; }
    .wallet-list .sell-area .sell-pct { flex: 1; }
    .wallet-list .sell-area .sell-slip {
      width: 88px;
      height: 36px;
      background: var(--canvas);
      color: var(--ink);
      border: 1px solid var(--hairline);
      border-radius: var(--radius-sm);
      padding: 0 8px;
      font-family: var(--font-mono);
      font-size: 12px;
    }
    .wallet-list .sell-area .sell-bal,
    .wallet-list .sell-area .sell-tok { color: var(--muted); }
    .wallet-list .sell-area .sell-pct-v { min-width: 38px; text-align: right; color: var(--ink); }
    .wallet-list .sell-area .sell-label { color: var(--muted); min-width: 54px; font-weight: 500; }
    .wallet-list .sell-area .sell-spacer { flex: 1; }

    .log {
      --scrollbar-track: var(--surface-dark-soft);
      --scrollbar-thumb: var(--scrollbar-thumb-dark);
      --scrollbar-thumb-hover: var(--scrollbar-thumb-dark-hover);
      --scrollbar-thumb-active: var(--primary);
      scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
      background: var(--surface-dark-soft);
      border: 1px solid var(--surface-dark-elevated);
      border-radius: var(--radius-md);
      padding: var(--space-sm) var(--space-md);
      height: min(52vh, 560px);
      min-height: 320px;
      overflow-x: hidden;
      overflow-y: auto;
      font-family: var(--font-mono);
      font-size: 12px;
      line-height: 1.45;
    }
    .log .line {
      display: flex;
      flex-wrap: wrap;
      align-items: baseline;
      gap: 2px 10px;
      padding: 5px 0;
      border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    }
    .log .line:last-child { border-bottom: none; }
    .log .line .t {
      flex: 0 0 72px;
      color: var(--on-dark-soft);
    }
    .log .line .g {
      flex: 0 0 52px;
      color: var(--primary);
      letter-spacing: 0.06em;
      font-weight: 500;
    }
    .log .line .b {
      flex: 1 1 calc(100% - 150px);
      min-width: 0;
      color: var(--on-dark);
      white-space: normal;
      word-break: break-word;
      overflow-wrap: anywhere;
    }
    .log .line--warn .b { color: #e88a8a; }
    .log .line--dim .b { color: var(--on-dark-soft); }
    .log .line--notice {
      margin: 4px 0;
      padding: 8px 10px;
      border-left: 3px solid var(--accent-amber, #e8b84a);
      background: rgba(232, 184, 74, 0.12);
      border-radius: var(--radius-sm, 4px);
    }
    .log .line--notice .t { color: var(--accent-amber, #e8b84a); font-weight: 600; }
    .log .line--notice .g {
      color: var(--accent-amber, #e8b84a);
      font-weight: 700;
    }
    .log .line--notice .b {
      color: var(--on-dark, #f2ebe0);
      font-weight: 500;
    }
    .log .line .b .tx-ref {
      display: inline;
      font-size: 0.72em;
      line-height: 1.35;
      color: var(--on-dark-soft);
      font-family: var(--font-mono, ui-monospace, monospace);
      letter-spacing: -0.02em;
    }
    .log .line .b .tx-ref .tx-link {
      font-size: inherit;
      color: inherit;
      text-decoration: underline;
      text-underline-offset: 1px;
      word-break: break-all;
    }
    .log .line .b .tx-ref .tx-link:hover {
      color: var(--accent-amber);
    }
    .log .line--warn .b .tx-ref,
    .log .line--warn .b .tx-ref .tx-link { color: #c08080; }
    .log .line--warn .b .tx-ref .tx-link:hover { color: #f0a0a0; }
    .log .line--dim .b .tx-ref,
    .log .line--dim .b .tx-ref .tx-link { color: var(--on-dark-soft); }
    .log .line--notice .b .tx-ref .tx-link:hover {
      color: var(--on-dark);
    }
    .log .line--overlay-mirror .g { color: var(--accent-teal); }
    .log .line--overlay-mirror::before {
      content: "↪";
      flex-shrink: 0;
      color: var(--accent-teal);
      margin-right: -4px;
    }

    .stat-block {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: var(--space-xs);
    }
    .stat-block .stat {
      background: var(--surface-soft);
      border: 1px solid var(--hairline-soft);
      border-radius: var(--radius-md);
      padding: 10px 12px;
    }
    .panel--dark .stat-block .stat {
      background: var(--surface-dark-elevated);
      border-color: var(--surface-dark-soft);
    }
    .stat .label {
      color: var(--muted);
      font-size: 11px;
      font-weight: 500;
      letter-spacing: 0.08em;
      text-transform: uppercase;
    }
    .panel--dark .stat .label { color: var(--on-dark-soft); }
    .stat .value {
      color: var(--ink);
      font-family: var(--font-mono);
      font-size: 17px;
      margin-top: 4px;
      font-weight: 500;
    }
    .panel--dark .stat .value { color: var(--on-dark); }
    .stat .value.accent { color: var(--primary); }
    .stat .value.green { color: var(--success); }

    .footer-note {
      color: var(--muted);
      font-size: 12px;
      margin-top: var(--space-xs);
      line-height: 1.45;
    }

    .mode-row {
      flex-direction: column;
      align-items: stretch;
      gap: var(--space-xs);
      margin-top: var(--space-xs);
    }
    .mode-row label { flex: none; }
    .mode-switch {
      display: flex;
      width: 100%;
      padding: 3px;
      background: var(--canvas);
      border: 1px solid var(--hairline);
      border-radius: var(--radius-md);
      box-sizing: border-box;
    }
    .mode-switch button {
      flex: 1;
      min-width: 0;
      border: none;
      border-radius: var(--radius-sm);
      padding: 0 8px;
      height: 34px;
      background: transparent;
      font-size: 12px;
      font-weight: 600;
      letter-spacing: 0.06em;
    }
    .mode-switch button.active {
      background: var(--primary);
      color: var(--on-primary);
    }

    #tier-table { width: 100%; border-collapse: collapse; font-family: var(--font-mono); font-size: 12px; }
    #tier-table th { padding: 6px 8px; color: var(--muted); text-align: left; font-weight: 500; }
    #tier-table tr { border-top: 1px solid var(--hairline); }
    #tier-table td { padding: 6px 8px; vertical-align: middle; }
    #tier-table td input[type="number"] {
      width: 100%;
      min-width: 72px;
      max-width: 160px;
      height: 40px;
      box-sizing: border-box;
      background: var(--canvas);
      color: var(--ink);
      border: 1px solid var(--hairline);
      border-radius: var(--radius-md);
      padding: 0 12px;
      font-family: var(--font-mono);
      font-size: 13px;
      font-weight: 500;
      -moz-appearance: textfield;
    }
    #tier-table td input[type="number"]::-webkit-outer-spin-button,
    #tier-table td input[type="number"]::-webkit-inner-spin-button {
      -webkit-appearance: none;
      margin: 0;
    }
    #tier-table td input[type="number"]:focus {
      outline: none;
      border-color: var(--primary);
      box-shadow: 0 0 0 3px rgba(204, 120, 92, 0.15);
    }

    .panel-title {
      margin: 0 0 var(--space-sm);
      font-size: 11px;
      font-weight: 600;
      letter-spacing: 1.4px;
      text-transform: uppercase;
      color: var(--muted);
    }
    .panel-title-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: var(--space-sm);
      margin-bottom: var(--space-sm);
    }
    .panel-title-row .panel-title {
      margin: 0;
    }
    .panel-title-row__action {
      flex-shrink: 0;
      font-size: 11px;
      padding: 4px 10px;
      letter-spacing: 0.6px;
      text-transform: uppercase;
    }
    .panel--dark .panel-title { color: var(--on-dark-soft); }

    .share-modal {
      position: fixed;
      inset: 0;
      z-index: 1200;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 24px;
    }
    .share-modal.hidden { display: none; }
    .share-modal__backdrop {
      position: absolute;
      inset: 0;
      background: rgba(20, 16, 12, 0.55);
    }
    .share-modal__panel {
      position: relative;
      z-index: 1;
      width: min(420px, 100%);
      margin: 0;
    }
    .share-modal__hint {
      margin: 0 0 var(--space-md);
      font-size: 11px;
      line-height: 1.55;
      font-weight: 400;
      color: var(--muted-soft);
      opacity: 0.92;
    }
    .share-modal__actions {
      display: flex;
      flex-direction: column;
      gap: 8px;
      margin-bottom: var(--space-sm);
    }
    .share-modal__actions button { width: 100%; }
    .share-modal__close { width: 100%; }

    .share-modal__hint--warn {
      color: var(--warn, #8a5a10);
      font-weight: 500;
    }

    .hold-fund--flash {
      outline: 2px solid var(--accent, #c9a227);
      outline-offset: 4px;
      transition: outline-color 0.3s ease;
    }

    .configure-zone .row label { flex: 0 0 160px; }

    @media (max-width: 1100px) {
      .monitor-grid {
        grid-template-columns: 1fr;
      }
      .operator-stack {
        position: static;
        max-height: none;
      }
      .command-deck__toolbar { flex-direction: column; align-items: stretch; }
      .conn-strip { min-width: 0; }
    }
    @media (max-width: 900px) {
      #app-panel {
        --dashboard-rail-w: 0px;
      }
      .dashboard-chrome {
        grid-template-columns: 1fr;
      }
      .dashboard-chrome__rail-cell {
        display: none;
      }
      .dashboard-chrome__main-cell {
        padding-left: var(--space-md);
        padding-right: var(--space-md);
      }
      .app-body { flex-direction: column; }
      .app-rail {
        position: static;
        width: 100%;
        height: auto;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        border-right: none;
        border-bottom: 1px solid var(--hairline);
        padding: 8px;
      }
      .app-rail__item {
        flex-direction: row;
        font-size: 11px;
        padding: 8px 12px;
      }
      .app-rail__spacer { display: none; }
      .app-main { padding: var(--space-md); max-width: none; }
      .settings-deck { grid-template-columns: 1fr; }
      .panel--span-2 { grid-column: auto; }
      .sim-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    }
    @media (max-width: 520px) {
      .sim-fields { grid-template-columns: 1fr; }
    }