      :root {
        --bg: #ffffff;
        --bg-subtle: #fafbfc;
        --bg-elevated: #f5f6f8;
        --surface: #ffffff;
        --surface-2: #fafbfc;
        --border: #e5e7eb;
        --border-strong: #d1d5db;
        --text: #0f172a;
        --text-secondary: #475569;
        --text-muted: #6b7280;
        --text-dim: #9ca3af;
        --accent: #6d28d9;
        --accent-hover: #5b21b6;
        --accent-soft: rgba(109, 40, 217, 0.08);
        --green: #059669;
        --green-soft: rgba(5, 150, 105, 0.1);
        --red: #dc2626;
        --red-soft: rgba(220, 38, 38, 0.1);
        --blue: #2563eb;
        --blue-soft: rgba(37, 99, 235, 0.1);
        --orange: #ea580c;
        --orange-soft: rgba(234, 88, 12, 0.1);
        --yellow: #d97706;
        --yellow-soft: rgba(217, 119, 6, 0.1);
        --code-bg: #f8f9fc;
        --radius: 16px;
        --radius-sm: 10px;
        --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
        --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.06);
        --shadow-lg: 0 16px 48px rgba(15, 23, 42, 0.08);
      }

      [data-theme="dark"] {
        --bg: #0a0b0f;
        --bg-subtle: #0e1018;
        --bg-elevated: #14171f;
        --surface: #161922;
        --surface-2: #1a1e28;
        --border: #232735;
        --border-strong: #2d3243;
        --text: #f5f6f8;
        --text-secondary: #b4b8c8;
        --text-muted: #8b8fa3;
        --text-dim: #6b7085;
        --accent: #a78bfa;
        --accent-hover: #c4b5fd;
        --accent-soft: rgba(167, 139, 250, 0.14);
        --green: #10b981;
        --green-soft: rgba(16, 185, 129, 0.14);
        --red: #f43f5e;
        --red-soft: rgba(244, 63, 94, 0.14);
        --blue: #60a5fa;
        --blue-soft: rgba(96, 165, 250, 0.14);
        --orange: #fb923c;
        --orange-soft: rgba(251, 146, 60, 0.14);
        --yellow: #f59e0b;
        --yellow-soft: rgba(245, 158, 11, 0.14);
        --code-bg: #0c0e15;
        --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
        --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
        --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.5);
      }

      [data-theme="dark"] header { background: rgba(10, 11, 15, 0.85); }
      /* Logo theme swap - compound selectors win over `.logo-mark img { display: block }`. */
      .logo-mark .logo-light, .footer-brand .logo-light { display: block; }
      .logo-mark .logo-dark, .footer-brand .logo-dark { display: none; }
      [data-theme="dark"] .logo-mark .logo-light,
      [data-theme="dark"] .footer-brand .logo-light { display: none; }
      [data-theme="dark"] .logo-mark .logo-dark,
      [data-theme="dark"] .footer-brand .logo-dark { display: block; }

      * { margin: 0; padding: 0; box-sizing: border-box; }
      /* Make the HTML `hidden` attribute always win over class display rules. */
      [hidden] { display: none !important; }
      html { scroll-behavior: smooth; }
      body {
        font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
        background: var(--bg);
        color: var(--text);
        line-height: 1.55;
        -webkit-font-smoothing: antialiased;
        font-feature-settings: "cv02", "cv03", "cv04", "cv11";
        min-height: 100vh;
        display: flex;
        flex-direction: column;
      }

      /* ─── header (verbatim from playground index.html) ─── */
      header {
        position: sticky; top: 0; z-index: 50;
        background: rgba(255, 255, 255, 0.8);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-bottom: 1px solid var(--border);
      }
      .header-inner {
        max-width: 1400px; margin: 0 auto;
        padding: 16px 32px;
        display: flex; align-items: center; justify-content: space-between;
        gap: 16px;
      }
      .logo {
        display: flex; align-items: center; gap: 12px;
        text-decoration: none; color: var(--text);
      }
      .logo-mark { height: 28px; display: flex; align-items: center; flex-shrink: 0; }
      .logo-mark img { height: 100%; width: auto; display: block; }
      .logo-divider { width: 1px; height: 18px; background: var(--border-strong); }
      .logo-tag {
        font-weight: 500; color: var(--text-muted);
        font-size: 14px; letter-spacing: -0.005em;
      }
      .header-nav { display: flex; align-items: center; gap: 8px; }
      .nav-btn {
        display: inline-flex; align-items: center; justify-content: center;
        height: 36px; padding: 0 14px;
        border-radius: 8px;
        font-size: 13.5px; font-weight: 500;
        text-decoration: none; transition: all 0.15s ease;
        font-family: inherit; border: none; cursor: pointer;
      }
      .nav-btn.ghost { color: var(--text); border: 1px solid var(--border-strong); background: var(--surface); }
      .nav-btn.ghost:hover { background: var(--bg-elevated); border-color: var(--text-muted); }
      .nav-btn.primary { background: #004eeb; color: white; box-shadow: 0 1px 2px rgba(0, 78, 235, 0.2); }
      .nav-btn.primary:hover { background: #003bc4; box-shadow: 0 4px 12px rgba(0, 78, 235, 0.25); }
      .theme-toggle {
        display: inline-flex; align-items: center; justify-content: center;
        width: 36px; height: 36px; border-radius: 8px;
        background: var(--surface); color: var(--text-secondary);
        border: 1px solid var(--border-strong);
        cursor: pointer; transition: all 0.15s ease;
        font-family: inherit; padding: 0;
      }
      .theme-toggle:hover { background: var(--bg-elevated); color: var(--text); }
      .theme-toggle svg { width: 16px; height: 16px; }
      .theme-toggle .icon-moon { display: block; }
      .theme-toggle .icon-sun { display: none; }
      [data-theme="dark"] .theme-toggle .icon-moon { display: none; }
      [data-theme="dark"] .theme-toggle .icon-sun { display: block; }

      .who-chip {
        display: inline-flex; align-items: center; gap: 8px;
        height: 36px; padding: 0 12px;
        border-radius: 8px;
        border: 1px solid var(--border);
        background: var(--surface-2);
        color: var(--text-secondary);
        font-size: 12.5px; font-weight: 500;
      }
      .who-chip .email { color: var(--text); font-weight: 600; }
      .who-chip .who-dot {
        width: 6px; height: 6px; border-radius: 50%;
        background: var(--green);
      }
      .who-chip .btn { margin-left: 4px; }
      .who-chip .scope-badge {
        font-size: 10px; font-weight: 700;
        text-transform: uppercase; letter-spacing: 0.05em;
        padding: 2px 6px;
        border-radius: 4px;
        background: var(--orange-soft);
        color: var(--orange);
      }

      /* ─── page wrap ─── */
      .page-wrap {
        flex: 1;
        max-width: 1400px; width: 100%;
        margin: 0 auto;
        padding: 0 32px 56px;
      }
      .hero {
        position: relative;
        padding: 56px 0 36px;
        margin-bottom: 8px;
        overflow: hidden;
      }
      .hero-bg {
        position: absolute;
        inset: -10% -32px auto -32px;
        height: 100%;
        background: radial-gradient(
          ellipse 70% 70% at 30% 10%,
          var(--accent-soft) 0%,
          transparent 65%
        );
        z-index: -1;
        pointer-events: none;
      }
      .eyebrow {
        display: inline-flex;
        align-items: center;
        background: var(--accent-soft);
        color: var(--accent);
        font-size: 11px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.08em;
        padding: 5px 10px;
        border-radius: 999px;
        margin-bottom: 14px;
      }
      .page-title {
        font-size: 40px; font-weight: 800;
        letter-spacing: -0.02em; line-height: 1.1;
        margin-bottom: 12px;
      }
      .page-sub {
        color: var(--text-secondary);
        font-size: 16px; line-height: 1.55;
        max-width: 680px;
        margin-bottom: 22px;
      }
      .btn {
        font-family: inherit; font-size: 14px; font-weight: 600;
        padding: 8px 14px; border-radius: var(--radius-sm);
        border: 1px solid var(--border-strong); background: var(--surface);
        color: var(--text); cursor: pointer;
        transition: background 120ms ease, border-color 120ms ease;
      }
      .btn:hover { background: var(--bg-elevated); border-color: var(--text-muted); }
      .btn:disabled { opacity: 0.55; cursor: not-allowed; }
      .btn.primary {
        background: var(--accent); border-color: var(--accent); color: #ffffff;
        box-shadow: 0 2px 8px rgba(109, 40, 217, 0.2);
      }
      .btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
      .btn.danger { color: var(--red); border-color: var(--red-soft); }
      .btn.danger:hover { background: var(--red-soft); border-color: var(--red); }
      .btn.ghost {
        border: none; background: transparent; color: var(--text-muted);
        padding: 6px 10px;
      }
      .btn.ghost:hover { color: var(--text); background: var(--bg-elevated); }
      .btn-sm { font-size: 13px; padding: 6px 10px; }
      .btn-xs { font-size: 12px; padding: 4px 8px; }

      /* ─── locked / sign-in screen ─── */
      .auth-screen {
        flex: 1;
        display: flex; align-items: center; justify-content: center;
        padding: 48px 24px;
        position: relative;
        overflow: hidden;
      }
      .auth-orb {
        position: absolute;
        top: -200px; left: 50%;
        width: 720px; height: 720px;
        transform: translateX(-50%);
        background: radial-gradient(
          ellipse 60% 60% at 50% 50%,
          var(--accent-soft) 0%,
          transparent 60%
        );
        z-index: 0;
        pointer-events: none;
      }
      [data-theme="dark"] .auth-orb {
        background: radial-gradient(
          ellipse 60% 60% at 50% 50%,
          rgba(167, 139, 250, 0.18) 0%,
          transparent 60%
        );
      }

      .auth-card {
        position: relative; z-index: 1;
        width: 100%; max-width: 400px;
        background: var(--surface);
        border-radius: 20px;
        box-shadow:
          0 1px 2px rgba(15, 23, 42, 0.04),
          0 8px 32px rgba(15, 23, 42, 0.08);
        padding: 36px 32px 28px;
        text-align: center;
      }
      [data-theme="dark"] .auth-card {
        box-shadow:
          0 1px 2px rgba(0, 0, 0, 0.3),
          0 12px 40px rgba(0, 0, 0, 0.5);
      }

      .auth-mark {
        width: 52px; height: 52px;
        border-radius: 14px;
        margin: 0 auto 20px;
        display: flex; align-items: center; justify-content: center;
        color: #fff;
        background: linear-gradient(135deg, var(--accent) 0%, #ec4899 100%);
        box-shadow: 0 8px 24px rgba(109, 40, 217, 0.32);
      }
      [data-theme="dark"] .auth-mark {
        background: linear-gradient(135deg, #a78bfa 0%, #f472b6 100%);
        box-shadow: 0 8px 24px rgba(167, 139, 250, 0.28);
      }
      .auth-mark svg { width: 22px; height: 22px; }

      .auth-title {
        font-size: 26px; font-weight: 700;
        letter-spacing: -0.02em;
        margin-bottom: 6px;
      }
      .auth-sub {
        font-size: 14px; color: var(--text-secondary);
        margin-bottom: 26px;
      }
      .auth-sub strong { color: var(--text); font-weight: 600; }

      /* Primary Google button */
      .auth-google-btn {
        width: 100%;
        height: 48px;
        display: inline-flex; align-items: center; justify-content: center;
        gap: 10px;
        background: var(--text); color: var(--bg);
        border: 1px solid var(--text);
        border-radius: 12px;
        font-family: inherit; font-weight: 600; font-size: 15px;
        cursor: pointer;
        transition: opacity 120ms ease, transform 120ms ease, box-shadow 120ms ease;
        box-shadow: 0 1px 2px rgba(15, 23, 42, 0.1);
      }
      .auth-google-btn:hover:not(:disabled) {
        opacity: 0.92;
        box-shadow: 0 4px 12px rgba(15, 23, 42, 0.18);
      }
      .auth-google-btn:active:not(:disabled) { transform: translateY(1px); }
      .auth-google-btn:disabled {
        cursor: not-allowed;
        background: var(--bg-elevated); color: var(--text-muted);
        border-color: var(--border);
        box-shadow: none;
      }
      .auth-google-help {
        font-size: 12px; color: var(--text-muted);
        margin-top: 10px;
      }

      /* Divider */
      .auth-divider {
        display: flex; align-items: center;
        margin: 22px 0;
        gap: 12px;
        font-size: 11px; font-weight: 600;
        text-transform: uppercase; letter-spacing: 0.1em;
        color: var(--text-dim);
      }
      .auth-divider::before,
      .auth-divider::after {
        content: ""; flex: 1; height: 1px; background: var(--border);
      }

      /* Joined input + arrow button - secondary auth path */
      .auth-key-row {
        display: flex;
        height: 44px;
        border: 1px solid var(--border-strong);
        border-radius: 12px;
        background: var(--surface-2);
        overflow: hidden;
        transition: border-color 120ms ease, box-shadow 120ms ease;
      }
      .auth-key-row:focus-within {
        border-color: var(--accent);
        box-shadow: 0 0 0 3px var(--accent-soft);
        background: var(--surface);
      }
      .auth-key-input {
        flex: 1;
        border: none; outline: none; background: transparent;
        padding: 0 14px;
        font-family: "JetBrains Mono", ui-monospace, monospace;
        font-size: 12.5px;
        color: var(--text);
        min-width: 0;
      }
      .auth-key-input::placeholder {
        color: var(--text-dim);
        font-family: "JetBrains Mono", ui-monospace, monospace;
      }
      .auth-key-btn {
        width: 44px;
        display: inline-flex; align-items: center; justify-content: center;
        background: transparent; color: var(--text-muted);
        border: none; border-left: 1px solid var(--border);
        cursor: pointer;
        transition: background 120ms ease, color 120ms ease;
      }
      .auth-key-btn:hover {
        background: var(--bg-elevated);
        color: var(--text);
      }
      .auth-key-btn:active { background: var(--border); }

      .auth-error {
        color: var(--red);
        background: var(--red-soft);
        border-radius: 10px;
        padding: 10px 12px;
        font-size: 13px;
        margin-top: 14px;
        text-align: left;
      }
      .auth-footer {
        margin-top: 22px;
        font-size: 12px;
        color: var(--text-muted);
        line-height: 1.5;
      }
      .auth-footer code {
        font-family: "JetBrains Mono", ui-monospace, monospace;
        font-size: 11px;
        background: var(--code-bg);
        padding: 1px 5px;
        border-radius: 4px;
      }

      /* Inputs (for non-auth places: modal forms etc.) */
      .input, .select, .textarea {
        font-family: inherit; font-size: 14px;
        width: 100%; padding: 11px 12px;
        border-radius: var(--radius-sm); border: 1px solid var(--border-strong);
        background: var(--surface); color: var(--text);
        transition: border-color 120ms ease, box-shadow 120ms ease;
      }
      .input:focus, .select:focus, .textarea:focus {
        outline: none; border-color: var(--accent);
        box-shadow: 0 0 0 3px var(--accent-soft);
      }
      .input.mono { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 12.5px; }
      .textarea { resize: vertical; min-height: 80px; }
      .help { font-size: 12px; color: var(--text-muted); margin-top: 6px; line-height: 1.5; }
      .error {
        color: var(--red); background: var(--red-soft);
        border-radius: var(--radius-sm); padding: 10px 12px;
        font-size: 13px; margin-top: 14px;
      }

      /* ─── app layout ─── */
      .app { display: grid; grid-template-columns: 280px 1fr; gap: 24px; }
      @media (max-width: 900px) { .app { grid-template-columns: 1fr; } }

      aside.sidebar {
        background: var(--surface);
        border-radius: var(--radius);
        padding: 16px;
        position: sticky; top: 80px; align-self: start;
        height: fit-content; max-height: calc(100vh - 100px); overflow-y: auto;
        box-shadow: var(--shadow-md);
      }
      .sidebar h2 {
        font-size: 11px; font-weight: 700;
        text-transform: uppercase; letter-spacing: 0.08em;
        color: var(--text-muted); margin: 4px 4px 12px;
      }
      .provider-list { list-style: none; display: flex; flex-direction: column; gap: 4px; }
      .provider-row {
        position: relative;
        padding: 12px 14px;
        border-radius: var(--radius-sm);
        cursor: pointer;
        display: flex; flex-direction: column; gap: 6px;
        transition: background 120ms ease, transform 120ms ease;
      }
      .provider-row[data-provider="aws"] { --row-accent: var(--orange); }
      .provider-row[data-provider="azure"] { --row-accent: var(--blue); }
      .provider-row[data-provider="onepassword"] { --row-accent: var(--accent); }
      .provider-row[data-provider="vault"] { --row-accent: var(--green); }
      .provider-row:hover { background: var(--bg-elevated); }
      .provider-row.active { background: var(--accent-soft); }
      .provider-row.disabled { cursor: not-allowed; }
      .provider-row.disabled .name { color: var(--text-muted); }
      .provider-row.disabled .meta { opacity: 0.85; }
      .provider-row.disabled:hover { background: transparent; }
      .provider-row .name { font-weight: 600; font-size: 14px; line-height: 1.3; }
      .provider-row .meta {
        font-size: 11px; color: var(--text-muted);
        display: flex; gap: 6px; align-items: center;
        flex-wrap: wrap;
      }
      .pill {
        display: inline-block; font-size: 10px; font-weight: 700;
        text-transform: uppercase; letter-spacing: 0.04em;
        padding: 2px 6px; border-radius: 4px;
        white-space: nowrap;
      }
      .pill.aws { background: var(--orange-soft); color: var(--orange); }
      .pill.azure { background: var(--blue-soft); color: var(--blue); }
      .pill.onepassword { background: var(--accent-soft); color: var(--accent); }
      .pill.vault { background: var(--green-soft); color: var(--green); }
      .pill.status-on { background: var(--green-soft); color: var(--green); }
      .pill.status-off {
        background: var(--bg-elevated);
        color: var(--text-secondary);
        border: 1px solid var(--border-strong);
      }

      main.workspace {
        position: relative;
        background: var(--surface);
        border-radius: var(--radius);
        padding: 28px; min-height: 400px;
        box-shadow: var(--shadow-md);
        overflow: hidden;
      }
      main.workspace[data-provider="aws"] { --ws-accent: var(--orange); }
      main.workspace[data-provider="azure"] { --ws-accent: var(--blue); }
      main.workspace[data-provider="onepassword"] { --ws-accent: var(--accent); }
      main.workspace[data-provider="vault"] { --ws-accent: var(--green); }
      .empty { text-align: center; padding: 80px 24px; color: var(--text-muted); }
      .empty h3 { font-size: 18px; color: var(--text); margin-bottom: 8px; }
      .ws-header {
        display: flex; justify-content: space-between; align-items: flex-start;
        margin-bottom: 24px; flex-wrap: wrap; gap: 12px;
      }
      .ws-header h2 {
        font-size: 22px; font-weight: 700;
        display: flex; align-items: center; gap: 10px;
      }
      .ws-header .sub { font-size: 13px; color: var(--text-muted); margin-top: 4px; max-width: 540px; }

      .section {
        margin-bottom: 28px;
      }
      .section:last-child { margin-bottom: 0; }
      .section-header {
        padding: 0 0 12px;
        display: flex; justify-content: space-between; align-items: center;
        gap: 12px;
      }
      .section-header h3 {
        font-size: 12px; font-weight: 700;
        text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted);
        display: flex; align-items: center; gap: 8px;
      }
      .section-header h3::before {
        content: ""; width: 6px; height: 6px;
        border-radius: 50%;
        background: var(--ws-accent, var(--accent));
      }
      .section-body { padding: 0; }

      .config-row {
        display: grid; grid-template-columns: 180px 1fr auto;
        gap: 12px; align-items: center;
        padding: 10px 0; border-bottom: 1px solid var(--border);
      }
      .config-row:last-child { border-bottom: none; }
      .config-row .label { font-size: 13px; font-weight: 600; color: var(--text-secondary); }
      .config-row .label .req { color: var(--red); margin-left: 2px; }
      .config-row .value {
        font-family: "JetBrains Mono", ui-monospace, monospace;
        font-size: 13px; color: var(--text);
        background: var(--code-bg); padding: 8px 10px;
        border-radius: var(--radius-sm); border: 1px solid var(--border);
        word-break: break-all; min-height: 34px;
        display: flex; align-items: center;
      }
      .config-row .value.muted { color: var(--text-muted); font-style: italic; }
      .config-row .actions { display: flex; gap: 4px; justify-content: flex-end; }
      .icon-btn {
        border: 1px solid var(--border); background: var(--surface);
        color: var(--text-muted); cursor: pointer;
        width: 30px; height: 30px; padding: 0;
        border-radius: var(--radius-sm);
        display: inline-flex; align-items: center; justify-content: center;
        transition: background 120ms ease, color 120ms ease;
      }
      .icon-btn:hover { background: var(--bg-elevated); color: var(--text); border-color: var(--text-muted); }
      .icon-btn.copied { color: var(--green); border-color: var(--green); }
      .icon-btn svg { width: 14px; height: 14px; }

      .secrets-table { width: 100%; border-collapse: collapse; }
      .secrets-table th, .secrets-table td {
        text-align: left; padding: 12px 14px; font-size: 14px;
        border-bottom: 1px solid var(--border);
      }
      .secrets-table th {
        font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em;
        color: var(--text-muted); font-weight: 600; background: var(--surface-2);
      }
      .secrets-table tr:hover td { background: var(--bg-elevated); }
      .secrets-table .name { font-weight: 600; }
      .secrets-table .actions { display: flex; gap: 6px; justify-content: flex-end; }

      .ref-inline {
        display: inline-flex; align-items: center; gap: 6px;
        max-width: 100%;
      }
      .ref-inline-value {
        font-family: "JetBrains Mono", ui-monospace, monospace;
        font-size: 12px;
        color: var(--text-secondary);
        background: var(--code-bg);
        border: 1px solid var(--border);
        padding: 3px 8px;
        border-radius: 6px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 320px;
        display: inline-block;
      }
      .ref-empty { color: var(--text-dim); font-size: 13px; }
      .icon-btn.icon-btn-sm {
        width: 26px; height: 26px;
      }
      .icon-btn.icon-btn-sm svg { width: 12px; height: 12px; }

      .loading {
        display: inline-block; width: 12px; height: 12px;
        border: 2px solid var(--text-muted); border-top-color: transparent;
        border-radius: 50%; animation: spin 0.8s linear infinite;
        vertical-align: -2px; margin-right: 6px;
      }
      @keyframes spin { to { transform: rotate(360deg); } }

      /* ─── modal ─── */
      .modal-backdrop {
        position: fixed; inset: 0; background: rgba(15, 23, 42, 0.4);
        backdrop-filter: blur(6px);
        display: flex; align-items: center; justify-content: center;
        z-index: 100; padding: 24px;
      }
      .modal {
        background: var(--surface); border-radius: var(--radius);
        box-shadow: var(--shadow-lg); max-width: 560px; width: 100%;
        max-height: 90vh; overflow-y: auto; padding: 28px;
      }
      .modal h3 { font-size: 18px; font-weight: 700; margin-bottom: 4px; }
      .modal p.sub { font-size: 13px; color: var(--text-muted); margin-bottom: 20px; }
      .field { margin-bottom: 14px; }
      .field label { display: block; font-size: 13px; font-weight: 600; color: var(--text-secondary); margin-bottom: 6px; }
      .modal-actions {
        display: flex; justify-content: flex-end; gap: 8px;
        margin-top: 20px; border-top: 1px solid var(--border); padding-top: 16px;
      }
      .value-display {
        font-family: "JetBrains Mono", ui-monospace, monospace;
        font-size: 13px; background: var(--code-bg); border: 1px solid var(--border);
        padding: 10px 12px; border-radius: var(--radius-sm);
        word-break: break-all; white-space: pre-wrap;
        max-height: 240px; overflow-y: auto;
      }
      .value-toggle {
        display: flex; justify-content: space-between; align-items: center;
        margin-bottom: 6px;
      }
      .meta-row {
        display: flex; gap: 16px; flex-wrap: wrap;
        font-size: 12px; color: var(--text-muted); margin-top: 12px;
      }
      .meta-row span strong { color: var(--text-secondary); }

      .ref-row {
        display: flex; align-items: center; gap: 8px;
        background: var(--code-bg);
        border: 1px solid var(--border);
        border-radius: var(--radius-sm);
        padding: 8px 10px;
      }
      .ref-value {
        flex: 1;
        font-family: "JetBrains Mono", ui-monospace, monospace;
        font-size: 12.5px;
        color: var(--text);
        word-break: break-all;
      }

      /* ─── View modal (redesigned) ─── */
      .view-modal {
        padding: 0;
        max-width: 540px;
      }
      .view-header {
        display: flex; align-items: flex-start; gap: 12px;
        padding: 24px 24px 18px;
        border-bottom: 1px solid var(--border);
      }
      .view-header-main { flex: 1; min-width: 0; }
      .view-header-main .pill { margin-bottom: 8px; }
      .view-title {
        font-size: 19px; font-weight: 700;
        letter-spacing: -0.01em;
        margin-bottom: 4px;
        word-break: break-all;
      }
      .view-sub {
        font-size: 13px; color: var(--text-muted);
      }
      .view-sub strong { color: var(--text-secondary); font-weight: 600; }
      .view-close {
        flex-shrink: 0;
        margin-top: 2px;
      }

      .view-body { padding: 18px 24px 4px; }
      .view-field { margin-bottom: 20px; }
      .view-field:last-child { margin-bottom: 0; }
      .view-field-head {
        display: flex; align-items: center; justify-content: space-between;
        margin-bottom: 8px;
      }
      .view-field-label {
        font-size: 11px; font-weight: 700;
        text-transform: uppercase; letter-spacing: 0.08em;
        color: var(--text-muted);
      }
      .view-field-actions {
        display: flex; gap: 4px;
      }
      .view-value-box {
        display: block;
        background: var(--code-bg);
        border: 1px solid var(--border);
        border-radius: var(--radius-sm);
        padding: 12px 14px;
        font-family: "JetBrains Mono", ui-monospace, monospace;
        font-size: 13px;
        color: var(--text);
        word-break: break-all;
        white-space: pre-wrap;
        max-height: 200px;
        overflow-y: auto;
        min-height: 42px;
      }
      .view-value-box.masked {
        color: var(--text-muted);
        letter-spacing: 0.05em;
      }
      .view-value-box.mono { white-space: nowrap; overflow-x: auto; }
      .view-field-help {
        font-size: 12px;
        color: var(--text-muted);
        margin-top: 6px;
        line-height: 1.5;
      }
      .view-field-help code {
        font-family: "JetBrains Mono", ui-monospace, monospace;
        font-size: 11px;
        background: var(--code-bg);
        padding: 1px 4px;
        border-radius: 3px;
      }

      .view-meta {
        background: var(--surface-2);
        border-radius: var(--radius-sm);
        padding: 14px 16px;
        margin-top: 4px;
      }
      .view-meta .view-field-label { display: block; margin-bottom: 10px; }
      .meta-grid {
        display: grid;
        grid-template-columns: 80px 1fr auto;
        gap: 8px 12px;
        align-items: center;
      }
      .meta-item {
        display: contents;
      }
      .meta-label {
        font-size: 12px; font-weight: 600;
        color: var(--text-muted);
      }
      .meta-value {
        font-size: 12.5px;
        color: var(--text-secondary);
        word-break: break-all;
        min-width: 0;
      }
      .meta-value.mono {
        font-family: "JetBrains Mono", ui-monospace, monospace;
        font-size: 11.5px;
        color: var(--text);
      }

      .view-actions {
        display: flex; justify-content: flex-end; gap: 8px;
        padding: 16px 24px 20px;
        border-top: 1px solid var(--border);
        margin-top: 18px;
      }

      .toast {
        position: fixed; bottom: 24px; right: 24px;
        background: var(--text); color: var(--bg);
        padding: 12px 16px; border-radius: var(--radius-sm);
        font-size: 14px; box-shadow: var(--shadow-lg); z-index: 200;
        opacity: 0; transform: translateY(10px);
        transition: opacity 200ms ease, transform 200ms ease;
        max-width: 360px;
      }
      .toast.show { opacity: 1; transform: translateY(0); }
      .toast.error { background: var(--red); color: white; }
      .toast.success { background: var(--green); color: white; }

      /* ─── footer (verbatim from playground index.html) ─── */
      footer {
        border-top: 1px solid var(--border);
        background: var(--bg-subtle);
        padding: 64px 32px 0;
      }
      .footer-inner { max-width: 1400px; margin: 0 auto; }
      .footer-grid {
        display: grid;
        grid-template-columns: 1.4fr 1fr 1fr 1fr 1fr;
        gap: 48px;
        padding-bottom: 48px;
      }
      .footer-brand img { height: 26px; width: auto; display: block; margin-bottom: 14px; }
      .footer-brand p {
        color: var(--text-muted); font-size: 13.5px; line-height: 1.6;
        max-width: 280px;
      }
      .footer-socials { display: flex; gap: 8px; margin-top: 18px; }
      .footer-social {
        width: 32px; height: 32px; border-radius: 8px;
        border: 1px solid var(--border);
        background: var(--surface);
        color: var(--text-muted);
        display: inline-flex; align-items: center; justify-content: center;
        transition: all 0.15s ease; text-decoration: none;
      }
      .footer-social:hover {
        color: var(--text); background: var(--bg-elevated);
        border-color: var(--border-strong); transform: translateY(-1px);
      }
      .footer-social svg { width: 15px; height: 15px; }
      .footer-col h4 {
        font-size: 11px; font-weight: 700;
        letter-spacing: 0.08em; text-transform: uppercase;
        color: var(--text-muted); margin-bottom: 14px;
      }
      .footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
      .footer-col a {
        color: var(--text-secondary); text-decoration: none;
        font-size: 13.5px; font-weight: 500;
        transition: color 0.15s ease;
        display: inline-flex; align-items: center; gap: 6px;
      }
      .footer-col a:hover { color: var(--accent); }
      .footer-bottom {
        border-top: 1px solid var(--border);
        padding: 20px 0 28px;
        display: flex; justify-content: space-between; align-items: center;
        flex-wrap: wrap; gap: 16px;
        font-size: 12.5px; color: var(--text-muted);
      }
      .footer-built-by { display: inline-flex; align-items: center; gap: 6px; }
      .footer-built-by a {
        color: var(--text-secondary); font-weight: 500; text-decoration: none;
      }
      .footer-built-by a:hover { color: var(--accent); }


      @media (max-width: 1024px) {
        .footer-grid { grid-template-columns: repeat(3, 1fr); gap: 32px; }
        .footer-brand { grid-column: 1 / -1; }
      }
      @media (max-width: 640px) {
        .footer-grid { grid-template-columns: 1fr; gap: 24px; }
        .header-inner { padding: 14px 16px; }
        .page-wrap { padding: 24px 16px 48px; }
        .nav-btn { padding: 0 10px; font-size: 12px; }
        .who-chip { display: none; }
      }
