/* === Reset & Base === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* === Accessibility === */
.skip-link {
    position: absolute; top: -100px; left: 16px;
    background: var(--accent); color: #fff; padding: 8px 16px;
    border-radius: 4px; font-size: 0.85rem; font-weight: 600;
    z-index: 999; text-decoration: none;
}
.skip-link:focus { top: 8px; }
*:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }

:root {
    --bg: #1a1a2e; --surface: #16213e; --surface2: #0f3460;
    --accent: #e94560; --accent2: #533483; --text: #eee; --text-dim: #8892b0;
    --green: #64ffda; --yellow: #ffd369; --radius: 8px;
    --mono: "SF Mono", "Fira Code", "Cascadia Code", Menlo, monospace;
}

/* === Light Theme === */
[data-theme="light"] {
    --bg: #f5f5f7; --surface: #ffffff; --surface2: #e5e5ea;
    --accent: #0071e3; --accent2: #7c3aed; --text: #1d1d1f; --text-dim: #6e6e73;
    --green: #059669; --yellow: #b45309;
}
[data-theme="light"] .radio-pill:checked + label { background: rgba(0,113,227,0.1); color: #0071e3; }
@media (prefers-color-scheme: light) {
    :root:not([data-theme="dark"]) {
        --bg: #f5f5f7; --surface: #ffffff; --surface2: #e5e5ea;
        --accent: #0071e3; --accent2: #7c3aed; --text: #1d1d1f; --text-dim: #6e6e73;
        --green: #059669; --yellow: #b45309;
    }
    :root:not([data-theme="dark"]) .radio-pill:checked + label { background: rgba(0,113,227,0.1); color: #0071e3; }
}

.theme-toggle {
    margin-left: auto; background: none; border: 1px solid transparent;
    border-radius: 6px; color: var(--text-dim); font-size: 1.1rem;
    cursor: pointer; padding: 4px 8px; line-height: 1;
    transition: color 0.15s, background 0.15s;
}
.theme-toggle:hover { color: var(--yellow); background: rgba(128,128,128,0.1); }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: var(--bg); color: var(--text);
    min-height: 100vh; display: flex; justify-content: center;
}
.app {
    width: 100%; max-width: 900px; padding: 60px 20px 200px;
    display: flex; flex-direction: column; gap: 24px;
}

/* === Site Nav === */
.site-nav {
    position: fixed; top: 0; left: 0; right: 0; height: 44px;
    background: var(--surface); border-bottom: 1px solid var(--surface2);
    display: flex; align-items: center; justify-content: center; z-index: 200;
}
.site-nav-inner {
    width: 100%; max-width: 900px; padding: 0 20px;
    display: flex; align-items: center; gap: 24px;
}
.nav-brand {
    font-size: 0.85rem; font-weight: 700; color: var(--text);
    text-decoration: none; letter-spacing: -0.02em; flex-shrink: 0;
    padding: 4px 10px; border-radius: 6px;
    transition: background 0.15s, color 0.15s;
}
.nav-brand:hover { color: var(--green); background: rgba(100,255,218,0.08); }
.nav-links { display: flex; gap: 6px; list-style: none; flex-wrap: wrap; }
.nav-links a {
    font-size: 0.75rem; font-weight: 500; color: var(--text-dim);
    text-decoration: none; padding: 4px 10px; border-radius: 6px;
    transition: color 0.15s, background 0.15s;
}
.nav-links a:hover { color: var(--text); background: var(--surface2); }
.nav-links a.active { color: var(--green); background: rgba(100,255,218,0.08); }

/* === Hamburger Menu === */
.nav-hamburger {
    display: none;
    background: none;
    border: none;
    color: var(--text);
    font-size: 1.3rem;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    line-height: 1;
    transition: background 0.15s;
}
.nav-hamburger:hover {
    background: var(--surface2);
}

@media (max-width: 768px) {
    .nav-hamburger {
        display: block;
    }
    .nav-links {
        display: none;
        position: absolute;
        top: 44px;
        left: 0;
        right: 0;
        background: var(--surface);
        border-bottom: 1px solid var(--surface2);
        flex-direction: column;
        padding: 8px 20px 12px;
        gap: 2px;
        z-index: 199;
    }
    .nav-links.open {
        display: flex;
    }
    .nav-links a {
        display: block;
        padding: 8px 10px;
        font-size: 0.82rem;
    }
}

/* === Header === */
.header { text-align: center; padding: 20px 0 8px; }
.header h1 { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.02em; }
.version { font-size: 0.8rem; color: var(--text-dim); font-family: var(--mono); }
.beta-badge {
    font-size: 0.55rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.08em; background: var(--yellow); color: var(--bg);
    padding: 2px 8px; border-radius: 10px; vertical-align: middle;
    position: relative; top: -2px;
}
.alpha-badge {
    font-size: 0.55rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.08em; background: var(--accent); color: #fff;
    padding: 2px 8px; border-radius: 10px; vertical-align: middle;
    position: relative; top: -2px;
}
.badge {
    font-size: 0.55rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 2px 8px;
    border-radius: 10px;
    vertical-align: middle;
    position: relative;
    top: -2px;
}
.badge-beta {
    background: var(--yellow);
    color: var(--bg);
}
.badge-alpha {
    background: var(--accent);
    color: #fff;
}
.header-sub { font-size: 0.85rem; color: var(--text-dim); margin-top: 6px; }

/* === Workspace === */
.workspace {
    background: var(--surface); border-radius: var(--radius);
    padding: 24px; min-height: 200px;
}

/* === Form Elements === */
.form-section { margin-bottom: 16px; }
.form-section:last-child { margin-bottom: 0; }
.form-label {
    display: block; font-size: 0.78rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.05em;
    color: var(--text-dim); margin-bottom: 6px;
}
.radio-group { display: flex; flex-wrap: wrap; gap: 6px; }
.radio-pill { display: none; }
.radio-pill + label {
    background: var(--bg); border: 1px solid transparent;
    border-radius: 20px; padding: 5px 12px; font-size: 0.82rem;
    cursor: pointer; transition: border-color 0.15s, background 0.15s;
    white-space: nowrap;
}
.radio-pill + label:hover { border-color: var(--accent); }
.radio-pill:checked + label {
    border-color: var(--accent); background: rgba(233,69,96,0.15); color: #fff;
}
.text-input, select.text-input {
    width: 100%; background: var(--bg); border: 1px solid var(--surface2);
    border-radius: var(--radius); padding: 8px 12px; color: var(--text);
    font-size: 0.85rem; font-family: var(--mono); outline: none;
    transition: border-color 0.15s;
}
select.text-input { cursor: pointer; appearance: auto; }
.text-input:focus, select.text-input:focus { border-color: var(--accent); }
.text-input:focus-visible, select.text-input:focus-visible { outline: none; }
.text-input::placeholder { color: var(--text-dim); opacity: 0.6; }
.checkbox-row {
    display: flex; align-items: center; gap: 8px; margin-top: 0;
}
.checkbox-row input[type="checkbox"] {
    accent-color: var(--accent); width: 14px; height: 14px;
}
.checkbox-row label { font-size: 0.78rem; cursor: pointer; }
.hint { font-size: 0.75rem; color: var(--text-dim); margin-top: 4px; }
.warning { font-size: 0.75rem; color: var(--accent); margin-top: 4px; font-weight: 500; }
.form-divider { border: none; border-top: 1px solid var(--surface2); margin: 16px 0; }

/* === Method Badges === */
.method-badge {
    display: inline-block; font-size: 0.65rem; font-weight: 700;
    font-family: var(--mono); padding: 1px 6px; border-radius: 4px;
    text-transform: uppercase; letter-spacing: 0.03em;
    vertical-align: middle; margin-right: 6px; min-width: 42px;
    text-align: center;
}
.method-badge.get { background: rgba(100,255,218,0.15); color: var(--green); }
.method-badge.post { background: rgba(83,52,131,0.3); color: #a78bfa; }
.method-badge.put { background: rgba(255,211,105,0.15); color: var(--yellow); }
.method-badge.delete { background: rgba(233,69,96,0.15); color: var(--accent); }

[data-theme="light"] .method-badge.get { background: rgba(5,150,105,0.12); color: #059669; }
[data-theme="light"] .method-badge.post { background: rgba(124,58,237,0.1); color: #7c3aed; }
[data-theme="light"] .method-badge.put { background: rgba(180,83,9,0.1); color: #b45309; }
[data-theme="light"] .method-badge.delete { background: rgba(0,113,227,0.1); color: #0071e3; }

@media (prefers-color-scheme: light) {
    :root:not([data-theme="dark"]) .method-badge.get { background: rgba(5,150,105,0.12); color: #059669; }
    :root:not([data-theme="dark"]) .method-badge.post { background: rgba(124,58,237,0.1); color: #7c3aed; }
    :root:not([data-theme="dark"]) .method-badge.put { background: rgba(180,83,9,0.1); color: #b45309; }
    :root:not([data-theme="dark"]) .method-badge.delete { background: rgba(0,113,227,0.1); color: #0071e3; }
}

/* === Warning & Info Cards === */
.warning-card {
    background: var(--bg); border-radius: var(--radius);
    padding: 12px 14px; margin-top: 10px;
    border-left: 3px solid var(--accent);
    font-size: 0.78rem; line-height: 1.5; color: var(--text);
}
.warning-card.critical {
    border-left-color: #ef4444; background: rgba(239,68,68,0.08);
}
.info-card {
    background: var(--bg); border-radius: var(--radius);
    padding: 12px 14px; margin-top: 10px;
    border-left: 3px solid var(--accent2);
    font-size: 0.78rem; line-height: 1.5; color: var(--text-dim);
}
/* === Payload Editor === */
.payload-editor { margin-top: 14px; }
.payload-editor-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 8px;
}
.payload-editor-title {
    font-size: 0.78rem; font-weight: 600; text-transform: uppercase;
    letter-spacing: 0.05em; color: var(--text-dim);
}
.payload-format-badge {
    font-size: 0.65rem; font-weight: 700; font-family: var(--mono);
    padding: 1px 8px; border-radius: 4px; text-transform: uppercase;
}
.payload-format-badge.xml { background: rgba(255,211,105,0.15); color: var(--yellow, #ffd369); }
.payload-format-badge.json { background: rgba(100,255,218,0.15); color: var(--green); }
.payload-textarea {
    width: 100%; min-height: 100px; max-height: 400px;
    background: var(--bg); border: 1px solid var(--surface2);
    border-radius: var(--radius); padding: 10px 12px;
    color: var(--text); font-family: var(--mono); font-size: 0.78rem;
    line-height: 1.5; resize: vertical; outline: none;
}
.payload-textarea:focus { border-color: var(--accent); }
.payload-fields-table {
    width: 100%; border-collapse: collapse; font-size: 0.75rem;
}
.payload-fields-table th {
    text-align: left; padding: 6px 8px; font-weight: 600;
    color: var(--text-dim); text-transform: uppercase;
    letter-spacing: 0.04em; font-size: 0.68rem;
    border-bottom: 1px solid var(--surface2);
}
.payload-fields-table td {
    padding: 5px 8px; border-bottom: 1px solid var(--surface2); color: var(--text);
}
.payload-field-name { font-family: var(--mono); color: var(--green); font-weight: 500; }
.payload-field-required { font-size: 0.65rem; font-weight: 700; color: var(--accent); text-transform: uppercase; }
.payload-field-optional { font-size: 0.65rem; color: var(--text-dim); }

/* === Payload Form (interactive) === */
.payload-form { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.payload-field-row { display: flex; flex-direction: column; gap: 2px; }
.payload-field-label {
    font-size: 0.75rem; font-weight: 500; color: var(--text);
    display: flex; align-items: center;
}
.payload-field-desc {
    font-size: 0.68rem; color: var(--text-dim); line-height: 1.3;
}
.payload-field-row .text-input,
.payload-field-row select {
    font-size: 0.78rem;
}

/* === CSV Import === */
.csv-import { margin-top: 14px; border-top: 1px solid var(--surface2); padding-top: 12px; }
.csv-upload-btn {
    background: var(--bg); border: 2px dashed var(--surface2);
    border-radius: var(--radius); padding: 18px;
    text-align: center; cursor: pointer; transition: border-color 0.15s;
    font-size: 0.78rem; color: var(--text-dim); margin-top: 8px;
}
.csv-upload-btn:hover { border-color: var(--green); color: var(--text); }
.csv-preview-table {
    width: 100%; border-collapse: collapse; margin-top: 4px;
    font-size: 0.72rem; font-family: var(--mono);
}
.csv-preview-table th {
    background: var(--surface2); padding: 4px 8px; text-align: left;
    font-weight: 600; color: var(--text-dim); font-size: 0.68rem;
}
.csv-preview-table td {
    padding: 4px 8px; border-bottom: 1px solid var(--surface2); color: var(--text);
}
.csv-mapping { margin-top: 8px; }
.csv-summary {
    font-size: 0.78rem; color: var(--green); margin-top: 8px; font-weight: 500;
}

/* === Workflow Cards === */
.workflow-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 8px; margin-top: 6px;
}
.workflow-card {
    background: var(--bg); border: 1px solid var(--surface2);
    border-radius: var(--radius); padding: 10px 12px; cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}
.workflow-card:hover { border-color: var(--green); background: rgba(100,255,218,0.03); }
.workflow-card-label {
    font-size: 0.8rem; font-weight: 600; color: var(--text); margin-bottom: 3px;
}
.workflow-card-desc {
    font-size: 0.7rem; color: var(--text-dim); line-height: 1.4;
}

.deprecation-hint {
    background: rgba(255,211,105,0.08); border-radius: var(--radius);
    padding: 10px 14px; margin-top: 10px;
    border-left: 3px solid var(--yellow);
    font-size: 0.75rem; line-height: 1.5; color: var(--yellow);
}

/* === Chain Builder === */
.chain-steps {
    display: flex; flex-direction: column; gap: 0;
    margin: 12px 0;
}
.chain-step {
    background: var(--bg); border-radius: var(--radius);
    padding: 14px; border: 1px solid var(--surface2);
    position: relative;
}
.chain-step-header {
    display: flex; align-items: center; gap: 10px; margin-bottom: 10px;
}
.chain-step-number {
    width: 24px; height: 24px; border-radius: 50%;
    background: var(--accent); color: #fff; font-size: 0.72rem;
    font-weight: 700; display: flex; align-items: center;
    justify-content: center; flex-shrink: 0;
}
.chain-step-title {
    font-size: 0.82rem; font-weight: 600; color: var(--text);
    flex: 1;
}
.chain-step-controls {
    display: flex; gap: 2px; flex-shrink: 0;
}
.chain-step-body {
    display: flex; flex-direction: column; gap: 8px;
}
.chain-step-body select, .chain-step-body input {
    max-width: 100%;
}
.chain-connector {
    display: flex; align-items: center; justify-content: center;
    height: 28px; position: relative;
}
.chain-connector::before {
    content: ""; position: absolute; left: 50%; top: 0;
    width: 2px; height: 100%; background: var(--surface2);
    transform: translateX(-50%);
}
.chain-connector::after {
    content: "\25BC"; color: var(--text-dim); font-size: 0.6rem;
    background: var(--surface); padding: 2px 4px; position: relative;
    z-index: 1;
}

/* === Preset Buttons === */
.chain-presets {
    display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px;
}
.preset-btn {
    background: var(--bg); border: 1px solid var(--surface2);
    border-radius: 20px; padding: 5px 12px; font-size: 0.75rem;
    color: var(--text-dim); cursor: pointer;
    transition: border-color 0.15s, color 0.15s;
}
.preset-btn:hover { border-color: var(--green); color: var(--green); }

/* === Add Step Button === */
.btn-add {
    background: var(--surface2); border: 1px solid var(--accent);
    border-radius: var(--radius); color: var(--text);
    padding: 8px 16px; cursor: pointer; font-size: 0.82rem;
    white-space: nowrap; transition: background 0.15s; margin-top: 8px;
}
.btn-add:hover { background: rgba(233,69,96,0.2); }

.btn-icon {
    background: none; border: none; color: var(--text-dim);
    cursor: pointer; font-size: 0.85rem; padding: 2px 6px;
    border-radius: 4px; transition: color 0.15s, background 0.15s;
}
.btn-icon:hover { color: var(--accent); background: rgba(233,69,96,0.1); }

/* === Output Bar === */
.output-bar {
    position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
    width: 100%; max-width: 900px; background: var(--surface);
    border-top: 2px solid var(--accent); padding: 10px 20px 14px; z-index: 100;
}
.output-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 6px; gap: 10px;
}
.output-label {
    font-size: 0.7rem; font-weight: 600; text-transform: uppercase;
    letter-spacing: 0.06em; color: var(--green);
}
.output-toggle { display: flex; gap: 4px; }
.toggle-btn {
    background: var(--bg); border: 1px solid transparent;
    border-radius: 14px; padding: 3px 12px; font-size: 0.72rem;
    font-weight: 600; color: var(--text-dim); cursor: pointer;
    transition: border-color 0.15s, color 0.15s;
}
.toggle-btn:hover { border-color: var(--accent); }
.toggle-btn.active {
    border-color: var(--accent); color: #fff;
    background: rgba(233,69,96,0.15);
}
[data-theme="light"] .toggle-btn.active { color: var(--accent); }
.output-row { display: flex; gap: 10px; align-items: center; }
.output-cmd {
    flex: 1; background: var(--bg); border-radius: var(--radius);
    padding: 8px 12px; font-family: var(--mono); font-size: 0.78rem;
    color: var(--yellow); overflow-x: auto; white-space: pre;
    line-height: 1.5; max-height: 180px; overflow-y: auto;
}
.output-cmd.empty-state {
    color: var(--text-dim); font-style: italic; font-family: var(--sans, system-ui, sans-serif);
}
.copy-btn {
    background: var(--accent); border: none; border-radius: var(--radius);
    color: #fff; padding: 6px 16px; cursor: pointer; font-weight: 600;
    font-size: 0.78rem; transition: opacity 0.15s; flex-shrink: 0;
}
.copy-btn:hover { opacity: 0.85; }
.copy-toast {
    position: absolute; top: -30px; right: 20px;
    background: var(--green); color: var(--bg); font-size: 0.78rem;
    font-weight: 700; padding: 4px 12px; border-radius: 4px;
    opacity: 0; transition: opacity 0.2s; pointer-events: none;
}
.copy-toast.show { opacity: 1; }

/* === Breadcrumb === */
.breadcrumb {
    font-size: 0.78rem;
    color: var(--text-dim);
    padding: 8px 0 0;
}
.breadcrumb a {
    color: var(--green);
    text-decoration: none;
}
.breadcrumb a:hover {
    text-decoration: underline;
}

/* === Related Tools === */
.related-tools {
    font-size: 0.82rem;
    color: var(--text-dim);
    text-align: center;
    padding: 16px;
    margin-top: 8px;
}
.related-tools a {
    color: var(--green);
    text-decoration: none;
}
.related-tools a:hover {
    text-decoration: underline;
}

/* === Footer === */
.site-footer {
    text-align: center; padding: 24px 16px; font-size: 0.78rem;
    color: var(--text-dim); line-height: 1.7;
    border-top: 1px solid var(--surface2); margin-top: 8px;
}
.footer-copy { margin-top: 8px; font-size: 0.72rem; color: var(--text-dim); opacity: 0.7; }

/* === Changelog === */
.changelog {
    background: var(--surface);
    border-radius: var(--radius);
    border: 1px solid var(--surface2);
    margin-top: 8px;
}
.changelog summary {
    padding: 12px 16px;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-dim);
    cursor: pointer;
    list-style: none;
}
.changelog summary::-webkit-details-marker { display: none; }
.changelog summary::before {
    content: "\25B6";
    display: inline-block;
    margin-right: 8px;
    font-size: 0.6rem;
    transition: transform 0.15s;
}
.changelog[open] summary::before { transform: rotate(90deg); }
.changelog-content {
    padding: 0 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.changelog-entry h3 {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--green);
    font-family: var(--mono);
    margin-bottom: 4px;
}
.changelog-entry ul {
    list-style: disc;
    padding-left: 20px;
    font-size: 0.78rem;
    color: var(--text-dim);
    line-height: 1.7;
}

/* === Analysis Panel === */
:root {
    --analysis-critical: #ef4444;
    --analysis-warning: #f59e0b;
    --analysis-info: #3b82f6;
    --analysis-pass: #22c55e;
}
.analysis-panel {
    background: var(--surface); border-radius: var(--radius);
    padding: 16px; margin-top: 12px;
    border: 1px solid var(--surface2);
}
.analysis-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 12px;
}
.analysis-title {
    font-size: 0.85rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.05em; color: var(--text);
}
.analysis-close {
    background: none; border: none; color: var(--text-dim);
    font-size: 1.2rem; cursor: pointer; padding: 2px 8px;
    border-radius: 4px; transition: color 0.15s, background 0.15s;
}
.analysis-close:hover { color: var(--accent); background: rgba(233,69,96,0.1); }
.analysis-summary {
    display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px;
}
.analysis-count {
    font-size: 0.72rem; font-weight: 700; padding: 3px 10px;
    border-radius: 14px; text-transform: uppercase; letter-spacing: 0.03em;
}
.analysis-count.critical { background: rgba(239,68,68,0.15); color: var(--analysis-critical); }
.analysis-count.warning { background: rgba(245,158,11,0.15); color: var(--analysis-warning); }
.analysis-count.info { background: rgba(59,130,246,0.15); color: var(--analysis-info); }
.analysis-count.pass { background: rgba(34,197,94,0.15); color: var(--analysis-pass); }
.analysis-cards {
    display: flex; flex-direction: column; gap: 8px;
}
.analysis-card {
    background: var(--bg); border-radius: var(--radius);
    padding: 10px 14px; border-left: 3px solid var(--surface2);
}
.analysis-card.critical { border-left-color: var(--analysis-critical); }
.analysis-card.warning { border-left-color: var(--analysis-warning); }
.analysis-card.info { border-left-color: var(--analysis-info); }
.analysis-card.pass { border-left-color: var(--analysis-pass); }
.analysis-card-header {
    font-size: 0.78rem; font-weight: 600; color: var(--text);
    margin-bottom: 4px;
}
.analysis-card-body {
    font-size: 0.75rem; color: var(--text-dim); line-height: 1.5;
}
.analyze-btn {
    background: var(--accent2); border: none; border-radius: var(--radius);
    color: #fff; padding: 6px 16px; cursor: pointer; font-weight: 600;
    font-size: 0.78rem; transition: opacity 0.15s; flex-shrink: 0;
}
.analyze-btn:hover { opacity: 0.85; }

/* === Variable Reference Dropdown === */
.var-ref-dropdown {
    background: var(--surface); border: 1px solid var(--surface2);
    border-radius: var(--radius); box-shadow: 0 4px 16px rgba(0,0,0,0.3);
    min-width: 280px; max-height: 260px; overflow-y: auto;
    padding: 6px 0; margin-top: 4px;
}
.var-ref-step-label {
    font-size: 0.68rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.05em; color: var(--text-dim); padding: 6px 12px 2px;
}
.var-ref-option {
    display: block; width: 100%; text-align: left;
    background: none; border: none; color: var(--text);
    font-size: 0.75rem; font-family: var(--mono);
    padding: 5px 12px; cursor: pointer;
    transition: background 0.1s;
}
.var-ref-option:hover { background: rgba(100,255,218,0.08); color: var(--green); }
.var-ref-empty {
    font-size: 0.75rem; color: var(--text-dim);
    padding: 10px 12px; font-style: italic;
}

/* === Responsive === */
@media (max-width: 600px) {
    .app { padding: 56px 10px 210px; }
    .nav-links { gap: 3px; }
    .nav-links a { font-size: 0.65rem; padding: 4px 6px; }
    .chain-step { padding: 10px; }
    .output-header { flex-wrap: wrap; }
}

/* === Shareable Link Box === */
.share-link-box {
    margin: 16px auto 12px;
    max-width: 760px;
    padding: 12px 16px;
    background: var(--surface);
    border: 1px solid var(--surface2);
    border-radius: 10px;
}
.share-link-label {
    display: block;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
    margin-bottom: 6px;
}
.share-link-row {
    display: flex;
    gap: 8px;
    align-items: center;
}
.share-link-input {
    flex: 1;
    background: var(--bg);
    border: 1px solid var(--surface2);
    border-radius: 6px;
    color: var(--text);
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 0.78rem;
    padding: 6px 10px;
    outline: none;
    overflow: hidden;
    text-overflow: ellipsis;
}
.share-link-input:focus {
    border-color: var(--accent);
}
.share-link-copy {
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 6px 14px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: opacity 0.15s;
}
.share-link-copy:hover {
    opacity: 0.85;
}
