/* ── Design tokens ─────────────────────────────────────────────────────────── */
:root {
    --bg:           #fafaf7;
    --bg-elev:      #ffffff;
    --bg-sunk:      #f3f2ed;
    --border:       #e6e4dd;
    --border-strong:#d4d1c8;
    --text:         #18181b;
    --text-2:       #4b4b52;
    --text-3:       #8a8a93;
    --accent:       oklch(0.58 0.14 148);
    --accent-2:     oklch(0.62 0.14 148);
    --accent-soft:  oklch(0.94 0.04 148);
    --accent-ink:   oklch(0.30 0.08 148);
    --danger:       oklch(0.62 0.18 28);
    --red:          oklch(0.62 0.18 28);
    --shadow-sm:    0 1px 0 rgba(20,20,24,.04), 0 1px 2px rgba(20,20,24,.06);
    --shadow-md:    0 1px 0 rgba(20,20,24,.04), 0 8px 24px -8px rgba(20,20,24,.12);
    --shadow-lg:    0 1px 0 rgba(20,20,24,.04), 0 24px 48px -16px rgba(20,20,24,.18);
    --radius-sm:    6px;
    --radius:       10px;
    --radius-lg:    14px;
    --font-sans:    "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
    --font-mono:    "Geist Mono", ui-monospace, "SF Mono", Menlo, Monaco, Consolas, monospace;
    /* GitHub render palette (adapts to theme) */
    --gh-bg:        var(--bg-elev);
    --gh-bg2:       var(--bg-sunk);
    --gh-border:    var(--border);
    --gh-text:      var(--text);
    --gh-muted:     var(--text-3);
    --gh-link:      oklch(0.50 0.18 250);
    --gh-code-bg:   color-mix(in oklch, var(--text) 8%, transparent);
    --gh-hr:        var(--border);
    color-scheme: light;
}
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg:           #0b0b0e;
        --bg-elev:      #131318;
        --bg-sunk:      #08080b;
        --border:       #25252c;
        --border-strong:#34343c;
        --text:         #f4f4f5;
        --text-2:       #b7b7be;
        --text-3:       #6f6f78;
        --accent:       oklch(0.78 0.16 148);
        --accent-2:     oklch(0.74 0.16 148);
        --accent-soft:  oklch(0.22 0.06 148);
        --accent-ink:   oklch(0.92 0.06 148);
        --shadow-sm:    0 1px 0 rgba(0,0,0,.4), 0 1px 2px rgba(0,0,0,.5);
        --shadow-md:    0 1px 0 rgba(0,0,0,.4), 0 8px 24px -8px rgba(0,0,0,.6);
        --shadow-lg:    0 1px 0 rgba(0,0,0,.4), 0 24px 48px -16px rgba(0,0,0,.7);
        --gh-link:      #58a6ff;
        color-scheme: dark;
    }
}
:root[data-theme="dark"] {
    --bg:           #0b0b0e;
    --bg-elev:      #131318;
    --bg-sunk:      #08080b;
    --border:       #25252c;
    --border-strong:#34343c;
    --text:         #f4f4f5;
    --text-2:       #b7b7be;
    --text-3:       #6f6f78;
    --accent:       oklch(0.78 0.16 148);
    --accent-2:     oklch(0.74 0.16 148);
    --accent-soft:  oklch(0.22 0.06 148);
    --accent-ink:   oklch(0.92 0.06 148);
    --shadow-sm:    0 1px 0 rgba(0,0,0,.4), 0 1px 2px rgba(0,0,0,.5);
    --shadow-md:    0 1px 0 rgba(0,0,0,.4), 0 8px 24px -8px rgba(0,0,0,.6);
    --shadow-lg:    0 1px 0 rgba(0,0,0,.4), 0 24px 48px -16px rgba(0,0,0,.7);
    --gh-link:      #58a6ff;
    color-scheme: dark;
}

/* ── Base ──────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: var(--font-sans);
    font-size: 15px;
    line-height: 1.55;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    font-feature-settings: "cv11","ss01","ss03";
    letter-spacing: -0.005em;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

/* Subtle dotted grid */
body::before {
    content: "";
    position: fixed; inset: 0;
    pointer-events: none;
    background-image: radial-gradient(circle at 1px 1px, color-mix(in oklch, var(--text) 7%, transparent) 1px, transparent 0);
    background-size: 24px 24px;
    mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, black, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, black, transparent 75%);
    opacity: 0.6; z-index: 0;
}
nav, main, footer, .preview-wrap, #apply-section, #settings-section { position: relative; z-index: 1; }

/* ── Layout ────────────────────────────────────────────────────────────────── */
.container { max-width: 1100px; margin: 0 auto; padding: 0 32px; }
@media (max-width: 720px) { .container { padding: 0 20px; } body { font-size: 14px; } }

/* ── Nav ───────────────────────────────────────────────────────────────────── */
nav {
    position: sticky; top: 0; z-index: 50;
    backdrop-filter: saturate(180%) blur(12px);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    background: color-mix(in oklch, var(--bg) 75%, transparent);
    border-bottom: 1px solid color-mix(in oklch, var(--border) 50%, transparent);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; letter-spacing: -0.01em; }
.brand-mark {
    width: 26px; height: 26px; border-radius: 7px;
    background: var(--text); color: var(--bg);
    display: grid; place-items: center;
    font-family: var(--font-mono); font-size: 13px; font-weight: 600;
}
.brand-name { font-family: var(--font-mono); font-size: 13px; }
.brand-slash { color: var(--text-3); }
.brand-name strong { color: var(--text); font-weight: 600; }
.nav-actions { display: flex; align-items: center; gap: 8px; }
.nav-link { font-size: 13.5px; color: var(--text-2); padding: 8px 10px; border-radius: 8px; transition: color .15s; }
.nav-link:hover { color: var(--text); }
@media (max-width: 720px) { .hide-sm { display: none; } }
.nav-user { display: flex; align-items: center; gap: 8px; }
.nav-user img { width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--border); }
.nav-user span { font-family: var(--font-mono); font-size: 12px; color: var(--text-3); }

/* Theme toggle */
.theme-toggle {
    position: relative;
    width: 34px; height: 34px; border-radius: 8px;
    border: 1px solid var(--border); background: var(--bg-elev);
    display: grid; place-items: center;
    color: var(--text-2); transition: all .15s;
}
.theme-toggle:hover { color: var(--text); border-color: var(--border-strong); }
.theme-toggle svg { width: 16px; height: 16px; }
.theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun  { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .theme-toggle .icon-sun  { display: block; }
    :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: none; }
}
.theme-toggle[data-mode="system"]::after {
    content: ""; position: absolute; bottom: 4px; right: 4px;
    width: 5px; height: 5px; background: var(--accent); border-radius: 50%;
}

/* ── Buttons ───────────────────────────────────────────────────────────────── */
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    height: 38px; padding: 0 16px; border-radius: 8px;
    font-weight: 500; font-size: 14px;
    border: 1px solid transparent; transition: all .15s;
    white-space: nowrap; cursor: pointer; font-family: var(--font-sans);
}
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn svg { width: 15px; height: 15px; flex-shrink: 0; }
.btn-primary { background: var(--text); color: var(--bg); border-color: var(--text); }
.btn-primary:hover:not(:disabled) { background: color-mix(in oklch, var(--text) 88%, var(--accent)); }
.btn-ghost, .btn-secondary { background: var(--bg-elev); color: var(--text); border-color: var(--border); }
.btn-ghost:hover:not(:disabled), .btn-secondary:hover:not(:disabled) { border-color: var(--border-strong); }
.btn-lg { height: 44px; padding: 0 18px; font-size: 14.5px; border-radius: 10px; }
.btn-sm {
    background: none; border: 1px solid var(--border); color: var(--text-3);
    padding: 6px 14px; border-radius: 6px; font-size: 13px;
    display: inline-flex; align-items: center; gap: 6px;
    transition: border-color .2s, color .2s; font-family: var(--font-sans);
}
.btn-sm:hover:not(:disabled) { border-color: var(--text); color: var(--text); }
.btn-sm:disabled { opacity: .4; cursor: not-allowed; }

/* ── Hero ──────────────────────────────────────────────────────────────────── */
.hero { padding: 72px 0 48px; }
@media (max-width: 720px) { .hero { padding: 48px 0 32px; } }
.hero-inner { display: flex; flex-direction: column; align-items: center; text-align: center; }
.hero-eyebrow {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 5px 11px 5px 8px; border-radius: 999px;
    background: var(--bg-elev); border: 1px solid var(--border);
    font-family: var(--font-mono); font-size: 11.5px; color: var(--text-2);
    margin-bottom: 22px; box-shadow: var(--shadow-sm);
}
.hero-eyebrow .dot {
    width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
    box-shadow: 0 0 0 3px color-mix(in oklch, var(--accent) 25%, transparent);
}
.hero h1 {
    margin: 0 0 18px;
    font-size: clamp(34px, 5.8vw, 60px); line-height: 1.05;
    letter-spacing: -0.035em; font-weight: 600; max-width: 22ch;
}
.hero h1 .accent { color: var(--accent); }
.hero-sub {
    margin: 0 0 28px; font-size: clamp(15px, 1.4vw, 17px);
    color: var(--text-2); max-width: 56ch; line-height: 1.55;
}
.hero-actions {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    justify-content: center; margin-bottom: 20px;
}
.hero-meta {
    display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
    justify-content: center; font-family: var(--font-mono); font-size: 12px; color: var(--text-3);
}
.meta-item { display: inline-flex; align-items: center; gap: 6px; }
.meta-item svg { width: 13px; height: 13px; }

/* Feature selector cards */
.feature-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
    gap: 10px; margin: 28px 0; width: 100%; max-width: 880px; text-align: left;
}
.feature-card {
    background: var(--bg-elev); border: 1.5px solid var(--border);
    border-radius: var(--radius); padding: 16px;
    transition: border-color .15s, background .15s; position: relative;
}
.feature-grid.interactive .feature-card { cursor: pointer; }
.feature-grid.interactive .feature-card:hover { border-color: color-mix(in oklch, var(--accent) 45%, var(--border)); }
.feature-grid.interactive .feature-card.selected {
    border-color: var(--accent);
    background: color-mix(in oklch, var(--accent) 8%, var(--bg-elev));
}
.feature-check {
    width: 18px; height: 18px; border-radius: 4px; border: 1.5px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 10px; font-size: 11px; color: transparent; transition: all .15s;
}
.feature-grid.interactive .feature-card.selected .feature-check { border-color: var(--accent); background: var(--accent); color: var(--bg); }
.feature-title { font-size: 13px; font-weight: 600; margin-bottom: 4px; color: var(--text); }
.feature-desc { font-size: 12px; color: var(--text-3); line-height: 1.5; }

/* Repo scope selector */
.repo-scope { display:none; flex-direction:column; align-items:center; gap:12px; width:100%; max-width:880px; margin-top:4px; }
.scope-toggle { display:inline-flex; background:var(--bg-sunk); border:1px solid var(--border); border-radius:8px; padding:3px; gap:2px; }
.scope-btn { padding:5px 16px; border-radius:6px; border:none; background:transparent; color:var(--text-2); font-size:13px; cursor:pointer; transition:all .15s; }
.scope-btn.active { background:var(--bg-elev); color:var(--text); box-shadow:var(--shadow-sm); }
.repo-chips { display:flex; flex-wrap:wrap; gap:6px; justify-content:center; max-width:600px; }
.repo-chip { padding:4px 11px; border-radius:6px; border:1px solid var(--border); background:var(--bg-elev); color:var(--text-2); font-family:var(--font-mono); font-size:12px; cursor:pointer; transition:all .15s; user-select:none; }
.repo-chip:hover { border-color:var(--border-strong); color:var(--text); }
.repo-chip.selected { border-color:var(--accent); background:var(--accent-soft); color:var(--accent-ink); }

/* ── Section ───────────────────────────────────────────────────────────────── */
.section { padding: 72px 0; }
@media (max-width: 720px) { .section { padding: 48px 0; } }
.section-head {
    display: flex; align-items: flex-end; justify-content: space-between;
    gap: 24px; margin-bottom: 36px;
}
.section-head h2 {
    margin: 0; font-size: clamp(24px, 3vw, 34px);
    letter-spacing: -0.025em; font-weight: 600;
}
.kicker {
    font-family: var(--font-mono); font-size: 11.5px; color: var(--text-3);
    text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 10px;
}
.section-label {
    font-family: var(--font-mono); font-size: 11px; color: var(--text-3);
    text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 16px;
}
@media (max-width: 720px) { .section-head { flex-direction: column; align-items: flex-start; } }

/* ── Steps ─────────────────────────────────────────────────────────────────── */
.steps {
    display: grid; grid-template-columns: repeat(3, 1fr);
    gap: 1px; background: var(--border);
    border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden;
}
@media (max-width: 720px) { .steps { grid-template-columns: 1fr; } }
.step { background: var(--bg-elev); padding: 24px 22px; }
.step .step-num {
    display: inline-block; font-family: var(--font-mono); font-size: 11px;
    color: var(--text-3); margin-bottom: 14px; letter-spacing: 0.08em;
}
.step h4 { margin: 0 0 8px; font-size: 16px; letter-spacing: -0.01em; font-weight: 600; }
.step p  { margin: 0; font-size: 13.5px; color: var(--text-2); }
.step code {
    background: color-mix(in oklch, var(--accent) 12%, transparent);
    border-radius: 4px; padding: 1px 6px; font-size: 12px;
    color: var(--accent-ink); font-family: var(--font-mono);
}

/* ── GitHub browser chrome ─────────────────────────────────────────────────── */
.preview-wrap { padding: 0 0 72px; }
.gh-browser {
    background: var(--gh-bg2); border: 1px solid var(--gh-border);
    border-radius: 10px 10px 0 0; padding: 10px 14px;
    display: flex; align-items: center; gap: 10px; position: relative;
}
.gh-dots { display: flex; gap: 6px; flex-shrink: 0; }
.gh-dot  { width: 11px; height: 11px; border-radius: 50%; }
.gh-dot:nth-child(1) { background: #ff5f57; }
.gh-dot:nth-child(2) { background: #febc2e; }
.gh-dot:nth-child(3) { background: #28c840; }
.gh-url-wrapper { flex: 1; min-width: 0; position: relative; }
.gh-url {
    background: var(--gh-bg); border: 1px solid var(--gh-border);
    border-radius: 4px; padding: 3px 28px 3px 10px; font-size: 12px;
    color: var(--gh-muted); font-family: var(--font-mono);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    cursor: default; user-select: none;
}
.gh-url.clickable { cursor: pointer; transition: border-color .15s; }
.gh-url.clickable:hover { border-color: var(--accent); color: var(--gh-text); }
.gh-url-caret {
    position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
    color: var(--gh-muted); font-size: 10px; pointer-events: none;
}
.url-dropdown {
    position: absolute; top: calc(100% + 4px); left: 0; right: 0;
    background: var(--bg-elev); border: 1px solid var(--border);
    border-radius: 8px; z-index: 200; max-height: 260px; overflow-y: auto;
    box-shadow: var(--shadow-lg);
}
.url-item {
    padding: 8px 14px; cursor: pointer; font-size: 13px;
    border-bottom: 1px solid var(--border); transition: background .1s;
}
.url-item:last-child { border-bottom: none; }
.url-item:hover { background: color-mix(in oklch, var(--accent) 8%, transparent); }
.url-item-name { color: var(--text); font-weight: 500; font-family: var(--font-mono); font-size: 12px; }
.url-item-profile .url-item-name { color: var(--accent-ink); }
.url-item-desc { display: block; color: var(--text-3); font-size: 11px; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.url-item-badge { font-size: 10px; background: color-mix(in oklch, var(--accent) 15%, transparent); color: var(--accent-ink); border-radius: 3px; padding: 1px 5px; margin-left: 6px; vertical-align: middle; }

/* ── Preview window ────────────────────────────────────────────────────────── */
.gh-window { border: 1px solid var(--gh-border); border-top: none; border-radius: 0 0 10px 10px; overflow: hidden; }
.preview-tab-bar { display: flex; background: var(--gh-bg2); border-bottom: 1px solid var(--gh-border); padding: 0 16px; }
.preview-tab {
    background: none; border: none; border-bottom: 2px solid transparent;
    color: var(--text-3); padding: 10px 16px; font-size: 13px; font-weight: 500;
    cursor: pointer; transition: color .15s, border-color .15s; margin-bottom: -1px;
}
.preview-tab:hover { color: var(--text); }
.preview-tab.active { color: var(--text); border-bottom-color: var(--accent); }
.preview-tab-content { display: none; }
.preview-tab-content.active { display: block; }

/* ── GitHub-rendered markdown ──────────────────────────────────────────────── */
.gh-render {
    background: var(--gh-bg); color: var(--gh-text);
    font-family: var(--font-sans); font-size: 15px; line-height: 1.6; padding: 32px 40px;
}
.gh-render h1 { font-size: 2em; font-weight: 600; border-bottom: 1px solid var(--gh-hr); padding-bottom: .3em; margin: 0 0 16px; }
.gh-render h2 { font-size: 1.5em; font-weight: 600; border-bottom: 1px solid var(--gh-hr); padding-bottom: .3em; margin: 24px 0 16px; }
.gh-render h3 { font-size: 1.25em; font-weight: 600; margin: 24px 0 16px; }
.gh-render h4 { font-size: 1em; font-weight: 600; margin: 16px 0 8px; }
.gh-render p  { margin: 0 0 16px; }
.gh-render em { font-style: italic; }
.gh-render strong { font-weight: 600; }
.gh-render a  { color: var(--gh-link); }
.gh-render a:hover { text-decoration: underline; }
.gh-render img { max-width: 100%; border-radius: 4px; display: block; margin: 0 0 16px; }
.gh-render code { background: var(--gh-code-bg); border-radius: 6px; font-size: 85%; padding: .2em .4em; font-family: var(--font-mono); }
.gh-render pre { background: var(--gh-bg2); border: 1px solid var(--gh-border); border-radius: 6px; padding: 16px; overflow-x: auto; margin: 0 0 16px; }
.gh-render pre code { background: none; padding: 0; font-size: 100%; }
.gh-render table { border-spacing: 0; border-collapse: collapse; width: 100%; margin: 0 0 16px; font-size: 14px; }
.gh-render th, .gh-render td { padding: 6px 13px; border: 1px solid var(--gh-border); }
.gh-render th { background: var(--gh-bg2); font-weight: 600; }
.gh-render tr:nth-child(even) { background: color-mix(in oklch, var(--text) 3%, transparent); }
.gh-render blockquote { border-left: 3px solid var(--border-strong); padding: 0 1em; color: var(--gh-muted); margin: 0 0 16px; }
.gh-render ul, .gh-render ol { padding-left: 2em; margin: 0 0 16px; }
.gh-render li + li { margin-top: 4px; }
.gh-render hr { height: 0; border: 0; border-top: 1px solid var(--gh-hr); margin: 24px 0; }
.gh-render .profile-badges { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.gh-render .profile-badges img { margin: 0; display: inline; }

/* ── Loading states ────────────────────────────────────────────────────────── */
.insights-gate { padding: 48px 40px; text-align: center; background: var(--gh-bg); }
.insights-gate p { font-size: 13px; color: var(--gh-muted); margin-bottom: 16px; line-height: 1.6; }
.insights-loading { background: var(--gh-bg); padding: 48px 40px; text-align: center; display: none; }
.loading-dots { font-size: 14px; color: var(--gh-muted); }
.loading-dots span { animation: blink 1.4s infinite; display: inline-block; }
.loading-dots span:nth-child(2) { animation-delay: .2s; }
.loading-dots span:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%,80%,100%{opacity:0} 40%{opacity:1} }
.img-loading {
    background: color-mix(in oklch, var(--text) 4%, transparent);
    border: 1px solid var(--gh-border); border-radius: 6px; height: 140px;
    display: flex; align-items: center; justify-content: center;
    color: var(--gh-muted); font-size: 13px; margin-bottom: 16px;
}

/* ── Code quality grades ───────────────────────────────────────────────────── */
.grade-hero { display: flex; align-items: center; gap: 20px; margin-bottom: 24px; padding-bottom: 24px; border-bottom: 1px solid var(--gh-hr); }
.grade-badge { width: 64px; height: 64px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 26px; font-weight: 800; flex-shrink: 0; letter-spacing: -1px; }
.grade-A\+, .grade-A { background: rgba(63,185,80,.15); color: #3fb950; border: 2px solid rgba(63,185,80,.4); }
.grade-B { background: rgba(88,166,255,.12); color: #58a6ff; border: 2px solid rgba(88,166,255,.3); }
.grade-C { background: rgba(210,153,34,.12); color: #d2a22a; border: 2px solid rgba(210,153,34,.3); }
.grade-D { background: rgba(248,81,73,.12); color: #f85149; border: 2px solid rgba(248,81,73,.3); }
.grade-F { background: rgba(248,81,73,.18); color: #f85149; border: 2px solid rgba(248,81,73,.4); }
.grade-hero-info h2 { font-size: 1.15em; font-weight: 600; margin-bottom: 2px; }
.grade-hero-info p  { color: var(--gh-muted); font-size: 13px; margin: 0 0 6px; }
.grade-overall { font-size: 22px; font-weight: 700; }
.quality-dims { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; margin-bottom: 24px; }
.quality-dim { background: var(--gh-bg2); border: 1px solid var(--gh-border); border-radius: 8px; padding: 14px 16px; }
.dim-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; font-size: 13px; font-weight: 500; }
.dim-grade { font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 4px; }
.dim-grade-A\+, .dim-grade-A { background: rgba(63,185,80,.15); color: #3fb950; }
.dim-grade-B { background: rgba(88,166,255,.15); color: #58a6ff; }
.dim-grade-C { background: rgba(210,153,34,.15); color: #d2a22a; }
.dim-grade-D, .dim-grade-F { background: rgba(248,81,73,.15); color: #f85149; }
.score-bar-bg { background: color-mix(in oklch, var(--text) 6%, transparent); border-radius: 4px; height: 6px; margin-bottom: 6px; overflow: hidden; }
.score-bar-fill { height: 100%; border-radius: 4px; transition: width .6s ease; }
.dim-score { font-size: 11px; color: var(--gh-muted); }
.dim-notes { font-size: 12px; color: var(--gh-muted); margin-top: 6px; line-height: 1.5; }
.tech-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 20px; }
.tech-tag { background: var(--gh-bg2); border: 1px solid var(--gh-border); border-radius: 4px; padding: 3px 10px; font-size: 12px; color: var(--gh-muted); font-family: var(--font-mono); }
.suggestions-list { list-style: none; padding: 0; }
.suggestions-list li { padding: 8px 0; border-bottom: 1px solid var(--gh-hr); font-size: 14px; color: var(--gh-text); }
.suggestions-list li:last-child { border-bottom: none; }
.suggestions-list li::before { content: '→ '; color: var(--accent-ink); font-weight: 600; }

/* ── Apply section ─────────────────────────────────────────────────────────── */
#apply-section { padding: 0 0 64px; }
.apply-section { text-align: center; }
.apply-log {
    margin: 16px auto 0; max-width: 600px;
    background: color-mix(in oklch, var(--text) 3%, transparent);
    border: 1px solid var(--border); border-radius: 8px; padding: 12px 16px;
    font-family: var(--font-mono); font-size: 12px; line-height: 1.9;
    text-align: left; max-height: 200px; overflow-y: auto; display: none;
}
.apply-log .ok   { color: #3fb950; }
.apply-log .err  { color: var(--danger); }
.apply-log .done { color: var(--accent-ink); font-weight: 600; }
.apply-msg { font-size: 13px; margin-top: 12px; color: var(--text-3); display: none; }
.apply-msg.success { color: #3fb950; }
.apply-msg.error   { color: var(--danger); }

/* Progress bar */
.progress-wrap { display:none; margin: 14px auto 0; max-width: 600px; text-align:left; }
.progress-track { height: 2px; background: var(--border); border-radius: 2px; overflow: hidden; }
.progress-fill { height: 100%; width: 0%; background: var(--accent); border-radius: 2px; transition: width .4s ease; }
.progress-status { font-family: var(--font-mono); font-size: 11.5px; color: var(--text-3); margin-top: 7px; min-height: 1.4em; }
.apply-log .skip { color: var(--text-3); }

/* ── Settings ──────────────────────────────────────────────────────────────── */
#settings-section { padding: 0 0 64px; }
.cards-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.card { background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.card-title { font-size: 11px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; color: var(--text-3); margin-bottom: 4px; display: flex; align-items: center; justify-content: space-between; font-family: var(--font-mono); }
.card-desc { font-size: 13px; color: var(--text-3); margin-bottom: 14px; }
.mt-field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; }
.mt-field label { font-size: 12px; color: var(--text-3); }
.mt-field input { background: var(--bg); border: 1px solid var(--border); border-radius: 6px; color: var(--text); padding: 7px 10px; font-size: 13px; width: 100%; font-family: var(--font-sans); }
.mt-field input:focus { outline: none; border-color: var(--accent); }
.mt-status { font-size: 12px; color: #3fb950; }
.inline-error { font-size: 12px; color: var(--danger); margin-top: 6px; display: none; }
.card .apply-log { margin: 10px 0 0; max-height: 220px; }
.card .apply-msg { margin-top: 8px; }

/* ── Component canvas ──────────────────────────────────────────────────────── */
.c-wrap { position: relative; margin-bottom: 16px; border: 1px solid transparent; border-radius: 8px; transition: border-color .15s, opacity .2s; }
.c-wrap:hover { border-color: color-mix(in oklch, var(--border-strong) 60%, transparent); }
.c-wrap.dragging { opacity: .3; }
.c-wrap.drag-over { border-color: var(--accent) !important; border-style: dashed; }
.c-header { display: flex; align-items: center; gap: 8px; padding: 4px 6px 2px; opacity: 0; transition: opacity .15s; pointer-events: none; }
.c-wrap:hover .c-header { opacity: 1; pointer-events: auto; }
.c-handle { cursor: grab; color: var(--text-3); font-size: 18px; user-select: none; line-height: 1; padding: 2px; }
.c-handle:active { cursor: grabbing; }
.c-label { flex: 1; font-size: 10px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; color: var(--text-3); font-family: var(--font-mono); }
.c-delete { background: none; border: none; cursor: pointer; color: var(--text-3); font-size: 18px; padding: 0 3px; line-height: 1; transition: color .15s; }
.c-delete:hover { color: var(--danger); }
.c-add-row { text-align: center; padding: 4px 0 8px; position: relative; }
.c-add-btn { background: none; border: 1px dashed var(--border); color: var(--text-3); font-size: 12px; padding: 8px 20px; border-radius: 6px; cursor: pointer; width: 100%; transition: border-color .15s, color .15s; font-family: var(--font-sans); }
.c-add-btn:hover { border-color: var(--accent); color: var(--accent-ink); }
.c-add-panel { position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); background: var(--bg-elev); border: 1px solid var(--border); border-radius: 8px; padding: 6px; min-width: 200px; z-index: 50; box-shadow: var(--shadow-lg); display: none; }
.c-add-item { padding: 8px 14px; font-size: 13px; border-radius: 5px; cursor: pointer; white-space: nowrap; color: var(--text); }
.c-add-item:hover { background: color-mix(in oklch, var(--accent) 10%, transparent); color: var(--accent-ink); }

/* ── Footer ────────────────────────────────────────────────────────────────── */
footer { border-top: 1px solid var(--border); padding: 40px 0; margin-top: 40px; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.footer-small { font-family: var(--font-mono); font-size: 11.5px; color: var(--text-3); }
.footer-small a { color: var(--text-2); }
.footer-small a:hover { color: var(--text); }
.footer-links { display: flex; gap: 20px; font-family: var(--font-mono); font-size: 12px; color: var(--text-2); }
.footer-links a:hover { color: var(--text); }
