:root {
  --bg: #0a0a0b;
  --surface: #131316;
  --surface-2: #1a1a1f;
  --line: #26262b;
  --ink: #f4f4f5;
  --muted: #a1a1aa;
  --faint: #71717a;
  --amber: #fbbf24;
  --amber-dim: #b45309;
  --red: #f87171;
  --green: #34d399;
  --radius: 14px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

/* Never let a display rule override the hidden attribute. */
[hidden] { display: none !important; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", system-ui, sans-serif;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3 { font-family: "Bricolage Grotesque", sans-serif; line-height: 1.2; }
h2 { font-size: 1.9rem; margin-bottom: 0.4rem; }
a { color: var(--amber); }

.wrap { width: min(960px, 92vw); margin: 0 auto; }
main.wrap { flex: 1; padding: 3rem 0 4rem; }

.muted { color: var(--muted); }
.small { font-size: 0.85rem; }

/* ---------- top bar ---------- */
.topbar { border-bottom: 1px solid var(--line); position: sticky; top: 0; background: rgba(10,10,11,0.9); backdrop-filter: blur(8px); z-index: 10; }
.topbar-inner { display: flex; justify-content: space-between; align-items: center; padding: 0.9rem 0; }
.brand { display: flex; align-items: center; gap: 0.5rem; color: var(--ink); text-decoration: none; font-family: "Bricolage Grotesque"; font-weight: 700; font-size: 1.15rem; }
.brand svg { color: var(--amber); width: 22px; height: 22px; }
.brand-logo { width: 30px; height: 30px; border-radius: 8px; }
.topnav { display: flex; gap: 1.4rem; }
.topnav a { color: var(--muted); text-decoration: none; font-size: 0.9rem; }
.topnav a:hover { color: var(--ink); }

/* ---------- hero ---------- */
.hero { text-align: center; padding: 1.6rem 0 3rem; }
.hero-badges { display: flex; gap: 0.6rem; justify-content: center; flex-wrap: wrap; margin-bottom: 1.4rem; }
.hero-badge { display: inline-flex; align-items: center; gap: 0.4rem; border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 0.3rem 0.9rem; font-size: 0.8rem; color: var(--muted); }
.hero-badge[hidden] { display: none; }
.hero-badge svg { width: 14px; height: 14px; color: var(--amber); }
.hero-badge-link { text-decoration: none; }
.hero-badge-link:hover { border-color: var(--amber-dim); color: var(--ink); }
.hero h1 { font-size: clamp(2.2rem, 5.5vw, 3.6rem); font-weight: 800; letter-spacing: -0.02em; }
.hero h1 .hl { color: var(--amber); }
.lede { color: var(--muted); font-size: 1.1rem; max-width: 620px; margin: 1.2rem auto 0; }

.username-form { margin-top: 2rem; }
.form-options { display: flex; gap: 1.4rem; margin-top: 0.9rem; flex-wrap: wrap; justify-content: center; }
.input-row { display: flex; gap: 0.6rem; max-width: 560px; margin: 0 auto; position: relative; }
.input-icon { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--faint); pointer-events: none; }
.input-row input, .picker-search input {
  flex: 1; background: var(--surface); border: 1px solid var(--line); color: var(--ink);
  border-radius: var(--radius); padding: 0.85rem 1rem 0.85rem 2.8rem; font-size: 1rem; outline: none;
}
.input-row input:focus, .picker-search input:focus { border-color: var(--amber-dim); }
.form-error { color: var(--red); font-size: 0.9rem; margin-top: 0.6rem; }

.btn { display: inline-flex; align-items: center; gap: 0.45rem; border-radius: var(--radius); font-weight: 600; font-size: 0.95rem; cursor: pointer; border: 1px solid transparent; padding: 0.85rem 1.3rem; font-family: "Inter"; }
.btn svg { width: 17px; height: 17px; }
.btn-primary { background: var(--amber); color: #1a1005; }
.btn-primary:hover { background: #f59e0b; }
.btn-primary:disabled { background: var(--surface-2); color: var(--faint); cursor: not-allowed; }
.btn-ghost { background: transparent; color: var(--muted); border-color: var(--line); padding: 0.6rem 1rem; font-size: 0.88rem; }
.btn-ghost:hover { color: var(--ink); border-color: var(--faint); }
.btn-big { font-size: 1.05rem; padding: 1rem 1.8rem; }
.back { margin-bottom: 1.2rem; }

.trust { text-align: center; color: var(--faint); font-size: 0.88rem; margin-top: 1.4rem; max-width: 560px; margin-left: auto; margin-right: auto; }

/* ---------- token box ---------- */
.token-box { max-width: 560px; margin: 1.8rem auto 0; text-align: center; }
.token-toggle { display: inline-flex; align-items: center; gap: 0.55rem; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 999px; padding: 0.65rem 1.35rem; font-size: 0.92rem; font-weight: 600; cursor: pointer; font-family: "Inter"; }
.token-toggle svg { width: 16px; height: 16px; color: var(--amber); }
.token-toggle:hover { border-color: var(--amber-dim); }
.token-form { margin-top: 1.1rem; text-align: left; border: 1px dashed var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem; }
.token-explainer { color: var(--ink); font-size: 0.88rem; margin-bottom: 0.9rem; }
.scope-chip { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; background: rgba(251,191,36,0.14); border: 1px solid var(--amber-dim); color: var(--amber); border-radius: 6px; padding: 0.1rem 0.45rem; font-size: 0.85em; white-space: nowrap; }
.token-row { display: flex; justify-content: space-between; align-items: center; margin-top: 0.7rem; }
.btn-mini { padding: 0.35rem 0.7rem; font-size: 0.78rem; }
.token-active { margin-top: 0.8rem; display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius); padding: 0.9rem 1.1rem; text-align: left; }
.token-active-info { display: flex; flex-direction: column; gap: 0.2rem; min-width: 0; }
.token-active-line { display: flex; align-items: center; gap: 0.55rem; font-size: 0.95rem; font-weight: 600; }
.token-active-line svg { width: 17px; height: 17px; color: var(--green); flex-shrink: 0; }
.token-active-line strong { color: var(--amber); white-space: nowrap; }
.token-active-info .muted { margin: 0; padding-left: 1.7rem; }
.token-note { color: var(--amber); font-size: 0.85rem; margin-top: 0.7rem; }

/* ---------- steps ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin: 3.5rem 0; }
.step { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; }
.step-num { width: 34px; height: 34px; border-radius: 10px; background: var(--amber); color: #1a1005; font-family: "Bricolage Grotesque"; font-weight: 800; display: flex; align-items: center; justify-content: center; margin-bottom: 0.9rem; }
.step h3 { font-size: 1.1rem; margin-bottom: 0.4rem; }
.step p { color: var(--muted); font-size: 0.92rem; }

/* ---------- standard ---------- */
.standard { margin: 3.5rem 0; }
.standard h2 { margin-bottom: 0.3rem; }
.standard-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin: 1.4rem 0 1rem; }
.standard-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem; }
.standard-card h3 { display: flex; align-items: center; gap: 0.5rem; font-size: 1.05rem; margin-bottom: 0.7rem; }
.standard-card h3 svg { width: 18px; height: 18px; color: var(--amber); }
.standard-card ul { list-style: none; }
.standard-card li { color: var(--muted); font-size: 0.9rem; padding: 0.25rem 0 0.25rem 1.2rem; position: relative; }
.standard-card li::before { content: ""; position: absolute; left: 0; top: 0.75em; width: 7px; height: 7px; border-radius: 2px; background: var(--amber); }

/* ---------- picker ---------- */
.picker-toolbar { display: flex; justify-content: space-between; align-items: center; margin: 1.4rem 0 0.8rem; flex-wrap: wrap; gap: 0.8rem; }
.counter { font-family: "Bricolage Grotesque"; font-weight: 700; font-size: 1.1rem; }
.counter.full { color: var(--amber); }
.picker-actions { display: flex; align-items: center; gap: 0.6rem; }
.check { position: relative; display: inline-flex; align-items: center; gap: 0.55rem; color: var(--muted); font-size: 0.88rem; cursor: pointer; }
.check input[type="checkbox"] { position: absolute; opacity: 0; pointer-events: none; width: 0; }
.check .custom-check { width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid var(--faint); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; background: transparent; transition: background 0.15s, border-color 0.15s; }
.check .custom-check svg { width: 13px; height: 13px; color: #1a1005; opacity: 0; transform: scale(0.4); transition: opacity 0.15s, transform 0.15s; }
.check:hover .custom-check { border-color: var(--amber); }
.check input:checked + .custom-check { background: var(--amber); border-color: var(--amber); }
.check input:checked + .custom-check svg { opacity: 1; transform: scale(1); }
.check input:focus-visible + .custom-check { outline: 2px solid var(--amber-dim); outline-offset: 2px; }
.picker-search { position: relative; margin-bottom: 1rem; }
.picker-search input { width: 100%; }
.cap-note { display: flex; align-items: center; gap: 0.5rem; color: var(--amber); font-size: 0.88rem; margin-bottom: 1rem; }
.cap-note svg { width: 16px; height: 16px; }

.repo-list { display: flex; flex-direction: column; gap: 0.6rem; margin-bottom: 1.5rem; }
.repo-row { display: flex; align-items: center; gap: 0.9rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 0.85rem 1.1rem; cursor: pointer; transition: border-color 0.15s; }
.repo-row:hover { border-color: var(--faint); }
.repo-row.selected { border-color: var(--amber-dim); background: #171307; }
.repo-row.capped { opacity: 0.45; cursor: not-allowed; }
.repo-row input[type="checkbox"] { position: absolute; opacity: 0; pointer-events: none; width: 0; }
.custom-check { width: 22px; height: 22px; border-radius: 7px; border: 1.5px solid var(--faint); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; transition: background 0.15s, border-color 0.15s; background: transparent; }
.custom-check svg { width: 14px; height: 14px; color: #1a1005; opacity: 0; transform: scale(0.4); transition: opacity 0.15s, transform 0.15s; }
.repo-row.selected .custom-check { background: var(--amber); border-color: var(--amber); }
.repo-row.selected .custom-check svg { opacity: 1; transform: scale(1); }
.repo-row.capped .custom-check { opacity: 0.35; }
.repo-info { flex: 1; min-width: 0; }
.repo-name { font-weight: 600; display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.repo-desc { color: var(--muted); font-size: 0.87rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.repo-meta { display: flex; align-items: center; gap: 0.9rem; color: var(--faint); font-size: 0.8rem; flex-shrink: 0; }
.repo-meta span { display: inline-flex; align-items: center; gap: 0.3rem; }
.repo-meta svg { width: 14px; height: 14px; }
.badge-fork { font-size: 0.7rem; border: 1px solid var(--line); border-radius: 999px; padding: 0.1rem 0.55rem; color: var(--faint); }
.badge-private { font-size: 0.7rem; border: 1px solid var(--amber-dim); border-radius: 999px; padding: 0.1rem 0.55rem; color: var(--amber); }
.picker-empty { text-align: center; color: var(--faint); padding: 3rem 0; }
.picker-empty svg { width: 40px; height: 40px; margin-bottom: 0.8rem; }
.picker-footer { position: sticky; bottom: 1rem; display: flex; justify-content: center; }

.error-card { display: flex; gap: 1rem; background: #1f1214; border: 1px solid #5b2326; border-radius: var(--radius); padding: 1.4rem; margin: 1.5rem 0; }
.error-card > svg { width: 24px; height: 24px; color: var(--red); flex-shrink: 0; margin-top: 0.2rem; }
.error-card h3 { font-size: 1.05rem; margin-bottom: 0.3rem; }
.error-card p { color: var(--muted); font-size: 0.9rem; margin-bottom: 0.8rem; }

/* ---------- audit progress ---------- */
.progress-track { height: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; overflow: hidden; margin: 1.4rem 0 0.6rem; }
.progress-fill { height: 100%; width: 0%; background: var(--amber); border-radius: 999px; transition: width 0.3s; }
.audit-log { margin-top: 1.5rem; display: flex; flex-direction: column; gap: 0.35rem; font-size: 0.88rem; }
.log-line { display: flex; align-items: center; gap: 0.6rem; color: var(--muted); }
.log-line svg { width: 15px; height: 15px; flex-shrink: 0; }
.log-line.ok svg { color: var(--green); }
.log-line.bad svg { color: var(--red); }
.log-line.warn svg { color: var(--amber); }

/* ---------- results ---------- */
.results-head { display: flex; justify-content: space-between; align-items: center; gap: 2rem; margin-bottom: 1.6rem; flex-wrap: wrap; }
.score-wrap { position: relative; width: 120px; height: 120px; flex-shrink: 0; }
.score-ring { width: 120px; height: 120px; transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: var(--line); stroke-width: 10; }
.ring-fg { fill: none; stroke: var(--amber); stroke-width: 10; stroke-linecap: round; stroke-dasharray: 326.7; stroke-dashoffset: 326.7; transition: stroke-dashoffset 1s ease; }
.mini-ring { position: relative; width: 34px; height: 34px; flex-shrink: 0; align-self: center; }
.mini-ring svg { width: 34px; height: 34px; transform: rotate(-90deg); display: block; }
.mini-ring .ring-bg.mini, .mini-ring .ring-fg.mini { stroke-width: 3.5; }
.mini-ring .ring-fg.mini { transition: none; }
.mini-num { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 0.62rem; font-weight: 700; color: var(--ink); }
.score-num { position: absolute; inset: 0; display: flex; align-items: baseline; justify-content: center; padding-top: 2.1rem; font-family: "Bricolage Grotesque"; font-weight: 800; font-size: 1.7rem; }
.score-num small { font-size: 0.85rem; color: var(--faint); font-weight: 400; }

.results-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1.2rem; flex-wrap: wrap; }
.results-toolbar .picker-search { margin-bottom: 0; flex: 1; min-width: 200px; }
.results-actions { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }

.results-list { display: flex; flex-direction: column; gap: 0.7rem; }
.result-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.result-head { display: flex; align-items: center; gap: 0.9rem; padding: 0.95rem 1.2rem; cursor: pointer; width: 100%; background: none; border: none; color: var(--ink); text-align: left; font-family: "Inter"; }
.result-head:hover { background: var(--surface-2); }
.result-score { font-family: "Bricolage Grotesque"; font-weight: 800; font-size: 1.15rem; width: 52px; flex-shrink: 0; }
.result-score.good { color: var(--green); }
.result-score.mid { color: var(--amber); }
.result-score.bad { color: var(--red); }
.result-name { flex: 1; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.result-counts { display: flex; gap: 0.5rem; font-size: 0.78rem; flex-shrink: 0; }
.pill { border-radius: 999px; padding: 0.15rem 0.6rem; font-weight: 600; }
.pill.miss { background: #2a1416; color: var(--red); }
.pill.warnp { background: #241a08; color: var(--amber); }
.pill.cleanp { background: #0d211a; color: var(--green); }
.result-head > svg { width: 18px; height: 18px; color: var(--faint); flex-shrink: 0; transition: transform 0.2s; }
.result-card.open .result-head > svg { transform: rotate(180deg); }
.result-body { display: none; border-top: 1px solid var(--line); padding: 1rem 1.2rem 1.2rem; }
.result-card.open .result-body { display: block; }
.issue-list { list-style: none; margin-bottom: 0.6rem; }
.issue-list li { display: flex; gap: 0.6rem; align-items: flex-start; font-size: 0.9rem; padding: 0.35rem 0; color: var(--muted); }
.issue-list li svg { width: 15px; height: 15px; flex-shrink: 0; margin-top: 0.25rem; }
.issue-list li.missing svg { color: var(--red); }
.issue-list li.warning svg { color: var(--amber); }
.issue-list li.missing { color: var(--ink); }
.issue-list li.priority svg { color: var(--amber); }
.priority-tag { font-style: normal; font-size: 0.66rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: #14100a; background: var(--amber); border-radius: 999px; padding: 0.12rem 0.5rem; margin-left: 0.5rem; vertical-align: 1px; }
.result-link { font-size: 0.85rem; display: inline-flex; align-items: center; gap: 0.35rem; }
.result-link svg { width: 14px; height: 14px; }

/* ---------- connections ---------- */
.connections { max-width: 720px; margin: 1rem auto 0; }
.connections-title { text-align: center; font-size: 0.85rem; color: var(--faint); font-weight: 600; margin-bottom: 0.45rem; }
.connections-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.7rem; }
.conn-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 0.7rem 0.85rem; display: flex; flex-direction: column; }
.conn-box.conn-groq { border-color: var(--amber-dim); background: linear-gradient(180deg, rgba(251,191,36,0.07), rgba(251,191,36,0.015)); }
.conn-box h4 { display: flex; align-items: center; gap: 0.45rem; font-size: 0.9rem; margin-bottom: 0.2rem; }
.conn-box h4 svg { width: 15px; height: 15px; color: var(--amber); }
.conn-desc { font-size: 0.8rem; margin-bottom: 0.45rem; }
.conn-form { margin-top: auto; }
.conn-input { max-width: none; margin: 0; gap: 0.5rem; }
.connections .input-row input { flex: 1; min-width: 0; padding: 0.55rem 0.8rem; font-size: 0.88rem; background: var(--bg); }
.connections .input-row input::placeholder { color: var(--faint); }
.conn-input .btn { padding: 0.55rem 0.9rem; font-size: 0.85rem; white-space: nowrap; }
.conn-box .token-row { margin-top: 0.5rem; }
.conn-box .check { font-size: 0.8rem; }
.conn-box .token-active { padding: 0.7rem 0.85rem; margin-top: auto; }
.conn-box .token-active-info .muted { padding-left: 0; }
.conn-note { text-align: center; margin-top: 0.5rem; font-size: 0.78rem; }

/* ---------- AI fixes ---------- */
.keys-hint { display: flex; align-items: center; gap: 0.8rem; background: #1c1608; border: 1px solid var(--amber-dim); border-radius: var(--radius); padding: 0.9rem 1.1rem; margin-bottom: 1.2rem; }
.keys-hint > svg { width: 20px; height: 20px; color: var(--amber); flex-shrink: 0; }
.keys-hint p { flex: 1; font-size: 0.88rem; color: var(--muted); margin: 0; }
.keys-hint strong { color: var(--ink); }

.fix-panel { margin-top: 1.1rem; border-top: 1px solid var(--line); padding-top: 1rem; }
.fix-title { display: flex; align-items: center; gap: 0.5rem; font-weight: 700; font-size: 0.95rem; margin-bottom: 0.5rem; }
.fix-title svg { width: 16px; height: 16px; color: var(--amber); }
.fix-lede { font-size: 0.87rem; margin-bottom: 0.8rem; }
.fix-work { margin-top: 0.8rem; }
.fix-result { margin-top: 0.9rem; }
.spin { width: 17px; height: 17px; border: 2.5px solid var(--line); border-top-color: var(--amber); border-radius: 50%; animation: spin 0.8s linear infinite; display: inline-block; vertical-align: -3px; margin-right: 0.5rem; }
@keyframes spin { to { transform: rotate(360deg); } }

.md-preview { background: #0c0c0e; border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.2rem; max-height: 340px; overflow-y: auto; font-size: 0.88rem; margin: 0.8rem 0; }
.md-preview h1 { font-size: 1.3rem; margin: 0.5rem 0 0.4rem; }
.md-preview h2 { font-size: 1.08rem; margin: 0.9rem 0 0.35rem; }
.md-preview h3 { font-size: 0.98rem; margin: 0.7rem 0 0.3rem; }
.md-preview p { margin: 0.4rem 0; color: var(--muted); }
.md-preview ul { margin: 0.4rem 0 0.4rem 1.2rem; color: var(--muted); }
.md-preview li { margin: 0.15rem 0; }
.md-preview pre { background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 0.7rem 0.9rem; overflow-x: auto; margin: 0.6rem 0; }
.md-preview code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.82em; }
.md-preview pre code { color: var(--ink); }
.md-preview p code, .md-preview li code { background: var(--surface-2); padding: 0.1rem 0.35rem; border-radius: 5px; color: var(--amber); }
.md-preview hr { border: none; border-top: 1px solid var(--line); margin: 1rem 0; }
.md-preview a { color: var(--amber); }

.fix-fields { display: grid; gap: 0.7rem; margin: 0.9rem 0; }
.fix-fields label { display: grid; gap: 0.3rem; font-size: 0.8rem; color: var(--faint); }
.fix-fields input { background: var(--surface-2); border: 1px solid var(--line); color: var(--ink); border-radius: 10px; padding: 0.6rem 0.8rem; font-size: 0.9rem; outline: none; font-family: "Inter", system-ui, sans-serif; width: 100%; }
.fix-fields input:focus { border-color: var(--amber-dim); }

.fix-toggles { display: flex; gap: 1.2rem; flex-wrap: wrap; margin: 0.9rem 0; }
.fix-actions { display: flex; gap: 0.7rem; align-items: center; flex-wrap: wrap; margin-top: 0.5rem; }

.pr-card { display: flex; gap: 1rem; background: #0d211a; border: 1px solid #1d4d38; border-radius: var(--radius); padding: 1.1rem 1.2rem; margin-top: 0.9rem; align-items: flex-start; }
.pr-card > svg { width: 22px; height: 22px; color: var(--green); flex-shrink: 0; margin-top: 0.15rem; }
.pr-card h4 { font-size: 0.95rem; margin-bottom: 0.25rem; }
.pr-card p { font-size: 0.85rem; color: var(--muted); margin-bottom: 0.7rem; }
.fix-error { color: var(--red); font-size: 0.88rem; margin-top: 0.7rem; }
.fix-note { font-size: 0.85rem; margin-top: 0.7rem; }
.fix-sections { margin-top: 0.9rem; border-top: 1px solid var(--line); padding-top: 0.9rem; display: grid; gap: 0.55rem; }
.fix-sections .fix-title { margin-bottom: 0; }
.fix-sec-note { margin: 0; }
.fix-sec { display: grid; gap: 0.3rem; font-size: 0.82rem; color: var(--faint); }
.fix-sec-head { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; }
.fix-sec input { background: var(--surface-2); border: 1px solid var(--line); color: var(--ink); border-radius: 10px; padding: 0.55rem 0.75rem; font-size: 0.88rem; outline: none; font-family: "Inter", system-ui, sans-serif; width: 100%; }
.fix-sec input:focus { border-color: var(--amber-dim); }
.fix-sec input[type="file"] { padding: 0.4rem 0.5rem; font-size: 0.8rem; }
.fix-sec input[type="file"]::file-selector-button { background: var(--surface); border: 1px solid var(--line); color: var(--ink); border-radius: 8px; padding: 0.35rem 0.7rem; margin-right: 0.6rem; font-size: 0.8rem; cursor: pointer; }
.shot-choice { display: flex; gap: 0.6rem; align-items: center; flex-wrap: wrap; }
.shot-upload { cursor: pointer; margin: 0; }
.link-btn { background: none; border: none; color: var(--amber); font-size: 0.82rem; cursor: pointer; font-family: "Inter", sans-serif; padding: 0; text-decoration: underline; }
.shot-staged { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.shot-staged:empty { display: none; }
.shot-thumb { position: relative; width: 64px; height: 64px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); flex-shrink: 0; background: var(--surface-2); }
.shot-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.shot-thumb button { position: absolute; top: 2px; right: 2px; width: 22px; height: 22px; border-radius: 50%; background: rgba(0,0,0,0.72); color: #fff; border: none; font-size: 14px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0; }
.shot-staged-note { width: 100%; margin: 0; }

/* ---------- footer ---------- */
footer { border-top: 1px solid var(--line); padding: 1.8rem 0; }
.footer-inner { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: 0.85rem; color: var(--muted); }

@media (max-width: 640px) {
  .steps, .standard-grid { grid-template-columns: 1fr; }
  .connections-grid { grid-template-columns: 1fr; }
  .input-row { flex-direction: column; }
  .input-icon { top: 1.35rem; }
  .repo-meta { display: none; }
  .results-head { flex-direction: column-reverse; align-items: flex-start; }
  /* phone layout */
  main.wrap { padding: 1.8rem 0 2.5rem; }
  .hero { padding: 1rem 0 2rem; }
  .topnav { display: none; }
  .steps, .standard { margin: 2.2rem 0; }
  .results-toolbar .picker-search { min-width: 0; flex-basis: 100%; }
  .result-head { flex-wrap: wrap; gap: 0.6rem; padding: 0.85rem 1rem; }
  .result-counts { flex-wrap: wrap; }
  .result-body { padding: 0.9rem 1rem 1rem; }
  .keys-hint { flex-direction: column; align-items: stretch; }
  .token-row { flex-wrap: wrap; gap: 0.5rem; }
  .fix-actions .btn { flex: 1; justify-content: center; }
  .pr-card { padding: 1rem; }
  .md-preview { padding: 0.85rem 0.9rem; }
  .error-card { padding: 1.1rem; }
  .shot-choice .btn { flex: 1; justify-content: center; }
}
