/* Bostra Fix console — dark warm-orange palette */
:root {
  --bg: #0c0806;
  --bg2: #14100c;
  --bg3: #1e1810;
  --border: rgba(255,140,66,.12);
  --text: #e9e0d6;
  --sub: #9e8e7e;
  --faint: #4a3e34;
  --accent: #ff8c42;
  --accent2: #ffb454;
  --ok: #5acc8a;
  --minor: #ffb454;
  --major: #ff8c42;
  --critical: #ff5a3c;
  --blocker: #cc2222;
  --radius: 10px;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; }
body { background: var(--bg); color: var(--text); font-family: 'Space Grotesk', system-ui, sans-serif; line-height: 1.55; min-height: 100vh; }

/* TOPBAR */
.topbar { position: sticky; top: 0; z-index: 100; display: flex; align-items: center; justify-content: space-between; padding: 0 24px; height: 56px; background: rgba(12,8,6,.85); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-size: 1rem; }
.logo { width: 28px; height: 28px; color: var(--accent); }
.sl { color: var(--sub); }
.sub { color: var(--accent); }
.top-right { display: flex; align-items: center; gap: 8px; }
.demo-pill { font-size: .7rem; font-weight: 700; letter-spacing: .06em; background: var(--accent); color: #0c0806; padding: 2px 7px; border-radius: 4px; }

/* LAYOUT */
.wrap { max-width: 960px; margin: 0 auto; padding: 32px 20px 80px; }
.center { display: flex; align-items: center; justify-content: center; min-height: 60vh; flex-direction: column; gap: 16px; }

/* BUTTONS */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 9px 18px; border-radius: var(--radius); border: none; cursor: pointer; font: 600 .9rem 'Space Grotesk', sans-serif; transition: opacity .15s, transform .1s; background: var(--accent); color: #0c0806; }
.btn:hover { opacity: .88; }
.btn:active { transform: scale(.97); }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn.ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn.sm { padding: 5px 12px; font-size: .8rem; }
.btn.lg { padding: 12px 22px; font-size: 1rem; }
.btn.full { width: 100%; justify-content: center; }
.btn:disabled { opacity: .4; cursor: not-allowed; }

/* CLAIM GATE (structure mirrors the sec/conform siblings) */
.claim { width: min(440px, 92vw); text-align: center; background: linear-gradient(180deg, var(--bg3), var(--bg2)); border: 1px solid var(--border); border-radius: 18px; padding: clamp(28px, 5vw, 44px); box-shadow: 0 30px 80px rgba(0,0,0,.5); }
.claim .eyebrow { display: inline-block; font-family: 'JetBrains Mono', monospace; font-size: .78rem; color: var(--accent); padding: 5px 12px; border: 1px solid rgba(255,140,66,.35); border-radius: 100px; background: rgba(255,140,66,.06); }
.claim h1 { font-size: 1.7rem; letter-spacing: -.02em; margin: 18px 0 10px; }
.claim .sub { color: var(--sub); font-size: .94rem; margin-bottom: 24px; }
.code-in { width: 100%; text-align: center; font-family: 'JetBrains Mono', monospace; font-size: 1.6rem; letter-spacing: .32em; text-transform: uppercase; padding: 16px; background: var(--bg); border: 1.5px solid var(--border); border-radius: 12px; color: var(--text); margin-bottom: 14px; transition: border-color .2s; }
.code-in:focus { outline: none; border-color: var(--accent); }
.code-in.shake { animation: shake .35s; }
@keyframes shake { 0%,100% { transform: translateX(0); } 20%,60% { transform: translateX(-7px); } 40%,80% { transform: translateX(7px); } }
.claim-msg { min-height: 18px; font-size: .85rem; margin: 10px 0 2px; }
.claim-msg.err { color: var(--critical); }
.claim-msg.ok { color: var(--ok); }
.tries { font-size: .78rem; color: var(--sub); margin-bottom: 18px; }
.tries .blocked { color: var(--critical); }
.divider { display: flex; align-items: center; gap: 12px; color: var(--faint); font-size: .75rem; margin: 18px 0; }
.divider::before, .divider::after { content: ''; height: 1px; background: var(--border); flex: 1; }

/* BANNERS */
.banner { padding: 10px 16px; border-radius: var(--radius); font-size: .88rem; margin-bottom: 28px; }
.banner.demo { background: rgba(255,140,66,.12); border: 1px solid rgba(255,140,66,.3); color: var(--accent); }
.banner.trial { background: rgba(255,180,84,.08); border: 1px solid rgba(255,180,84,.2); color: var(--accent2); }

/* DASH HEAD */
.dash-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 28px; flex-wrap: wrap; }
.dash-head h1 { font-size: 1.5rem; font-weight: 700; }
.dash-head .sub { color: var(--sub); font-size: .9rem; margin-top: 4px; }
.kpis { display: flex; gap: 20px; flex-wrap: wrap; }
.kpi { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 80px; text-align: center; }
.kpi b { font-size: 1.5rem; font-weight: 700; color: var(--text); }
.kpi span { font-size: .75rem; color: var(--sub); text-transform: uppercase; letter-spacing: .05em; }
.kpi.score { gap: 8px; }

/* HEALTH RING */
.ring { position: relative; width: 60px; height: 60px; border-radius: 50%; background: conic-gradient(var(--rc) calc(var(--p) * 1%), var(--bg3) 0); display: flex; align-items: center; justify-content: center; }
.ring::before { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: var(--bg); }
.ring-v { position: relative; font-size: .75rem; font-weight: 700; z-index: 1; }
.ring.lg { width: 72px; height: 72px; }
.ring.lg::before { inset: 9px; }
.ring.lg .ring-v { font-size: .9rem; }
.ring.sm { width: 44px; height: 44px; }
.ring.sm::before { inset: 5px; }
.ring.sm .ring-v { font-size: .68rem; }

/* TYPE PICKER */
.typepick { display: flex; flex-direction: column; gap: 8px; margin-bottom: 28px; }
.tp { display: flex; align-items: center; gap: 14px; background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; cursor: pointer; text-align: left; transition: border-color .15s, background .15s; width: 100%; }
.tp:hover { border-color: var(--a, var(--accent)); background: var(--bg3); }
.tp-ico { font-size: 1.4rem; flex-shrink: 0; }
.tp-b { flex: 1; }
.tp-b b { display: block; font-size: .95rem; font-weight: 600; color: var(--a, var(--accent)); }
.tp-b span { font-size: .82rem; color: var(--sub); }
.tp-plus { font-size: 1.2rem; color: var(--a, var(--accent)); opacity: .6; flex-shrink: 0; }

/* RATE HINTS */
.rate-warn, .rate-info { font-size: .82rem; padding: 8px 14px; border-radius: var(--radius); margin-bottom: 16px; }
.rate-warn { background: rgba(255,90,60,.1); border: 1px solid rgba(255,90,60,.3); color: var(--critical); }
.rate-info { background: rgba(255,140,66,.08); border: 1px solid rgba(255,140,66,.2); color: var(--sub); }

/* CARDS */
.cards { display: flex; flex-direction: column; gap: 14px; }
.empty { color: var(--sub); text-align: center; padding: 48px 0; font-size: .95rem; }
.card { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; opacity: 0; transform: translateY(8px); transition: border-color .2s; }
.card.in { animation: fadeUp .3s ease forwards; }
@keyframes fadeUp { to { opacity: 1; transform: translateY(0); } }
.card:hover { border-color: rgba(255,140,66,.25); }

.card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; gap: 12px; }
.card-meta { display: flex; align-items: center; gap: 10px; min-width: 0; }
.type-badge { font-size: .72rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--ta, var(--accent)); border: 1px solid; border-color: var(--ta, var(--accent)); padding: 2px 7px; border-radius: 4px; flex-shrink: 0; opacity: .85; }
.label { font-size: .95rem; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-family: 'JetBrains Mono', monospace; }

/* CHECKS ROW */
.checks-row { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 4px; }
.chk-chip { display: flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 20px; border: 1px solid var(--border); background: var(--bg3); cursor: pointer; font: .8rem 'Space Grotesk', sans-serif; color: var(--sub); transition: border-color .15s, color .15s; }
.chk-chip:hover { border-color: var(--accent); color: var(--accent); }
.chk-chip.done { border-color: var(--ca, var(--border)); color: var(--text); }
.chk-chip.done:hover { opacity: .8; }
.chk-chip.busy { opacity: .6; cursor: not-allowed; }
.chk-chip.pro { border-color: rgba(255,180,84,.35); border-style: dashed; }
.chk-chip.pro:hover { border-color: var(--accent2); color: var(--accent2); }
.chk-chip.pro.done { border-style: solid; }
.pro-badge { font-size: .65rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--accent2); background: rgba(255,180,84,.12); border: 1px solid rgba(255,180,84,.3); padding: 0 5px; border-radius: 3px; }
.chk-label { font-weight: 500; }
.chk-count { font-weight: 700; font-size: .78rem; }
.chk-plus { font-size: .8rem; opacity: .6; }

/* CARD FOOTER */
.card-foot { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); }
.sev-row { display: flex; flex-wrap: wrap; gap: 8px; }
.sev-pill { font-size: .78rem; font-weight: 600; }
.price-est { font-size: .82rem; color: var(--sub); }

/* SPINNER */
.spinner { width: 36px; height: 36px; border: 3px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin .7s linear infinite; }
.mini-spin { width: 12px; height: 12px; border: 2px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin .7s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* MODAL */
.modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,.65); display: flex; align-items: center; justify-content: center; z-index: 200; padding: 20px; opacity: 0; transition: opacity .18s; }
.modal-bg.show { opacity: 1; }
.modal-bg.out { opacity: 0; }
.modal { background: var(--bg2); border: 1px solid var(--border); border-radius: 14px; padding: 28px; width: 100%; max-width: 480px; max-height: 90vh; overflow-y: auto; }
.modal.modal-wide { max-width: 680px; }
.modal-h { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; font-size: 1.05rem; font-weight: 700; }
.modal-err { color: var(--critical); font-size: .85rem; margin: 8px 0; min-height: 20px; }
.modal-foot { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; }

/* FORM */
.tform { display: flex; flex-direction: column; gap: 14px; }
.tform-row { display: flex; flex-direction: column; gap: 6px; }
.tform-row label { font-size: .82rem; font-weight: 600; color: var(--sub); text-transform: uppercase; letter-spacing: .05em; }
.tform-row input, .tform-row select { background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px; color: var(--text); font: .92rem 'Space Grotesk', sans-serif; transition: border-color .15s; }
.tform-row input:focus, .tform-row select:focus { outline: none; border-color: var(--accent); }
.tform-row select option { background: var(--bg2); }
.file-wrap { display: flex; align-items: center; gap: 10px; }
.file-name { font-size: .82rem; color: var(--sub); font-family: 'JetBrains Mono', monospace; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 200px; }

/* ISSUE LIST */
.issue-list { display: flex; flex-direction: column; gap: 20px; margin-bottom: 20px; }
.clean-msg { color: var(--ok); text-align: center; padding: 24px 0; font-size: .95rem; }
.issue-item { background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.issue-top { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.sev-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.issue-title { font-weight: 700; font-size: .95rem; flex: 1; }
.sev-label { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.issue-detail { color: var(--sub); font-size: .88rem; line-height: 1.6; margin-bottom: 12px; }
.issue-fix { background: rgba(255,140,66,.06); border: 1px solid rgba(255,140,66,.2); border-radius: 8px; padding: 12px; margin-bottom: 12px; }
.fix-label { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--accent); display: block; margin-bottom: 6px; }
.issue-fix p { font-size: .87rem; color: var(--sub); line-height: 1.55; }
.ctx-badge { font-size: .68rem; font-weight: 600; color: var(--sub); background: var(--bg3); border: 1px solid var(--border); border-radius: 4px; padding: 1px 7px; margin-left: auto; flex-shrink: 0; white-space: nowrap; }
.fix-type-badge { font-size: .68rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; padding: 1px 6px; border-radius: 3px; border: 1px solid currentColor; opacity: .85; flex-shrink: 0; }
.issue-scores { display: flex; flex-direction: column; gap: 7px; margin-bottom: 12px; }
.score-bar-row { display: flex; align-items: center; gap: 10px; }
.score-bar-label { font-size: .72rem; font-weight: 600; color: var(--sub); text-transform: uppercase; letter-spacing: .04em; width: 115px; flex-shrink: 0; }
.score-bar-track { flex: 1; height: 5px; background: var(--bg3); border-radius: 3px; overflow: hidden; }
.score-bar-fill { height: 100%; background: var(--accent); border-radius: 3px; transition: width .4s ease; }
.score-bar-val { font-size: .72rem; font-weight: 700; color: var(--sub); font-family: 'JetBrains Mono', monospace; width: 34px; text-align: right; flex-shrink: 0; }
.issue-poc { background: #0d0b08; border: 1px solid rgba(255,140,66,.18); border-radius: 8px; padding: 14px; margin-bottom: 12px; overflow: hidden; }
.poc-label { font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent2); display: block; margin-bottom: 8px; }
.poc-code { font-family: 'JetBrains Mono', monospace; font-size: .78rem; line-height: 1.65; color: #b8cfb0; white-space: pre-wrap; word-break: break-all; margin: 0; }
.issue-actions { display: flex; justify-content: flex-end; }

/* TOAST */
.toast { position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%) translateY(12px); background: var(--bg3); border: 1px solid var(--border); border-radius: 8px; padding: 10px 18px; font-size: .88rem; opacity: 0; transition: all .22s; pointer-events: none; z-index: 300; white-space: nowrap; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.ok { border-color: var(--ok); color: var(--ok); }
.toast.err { border-color: var(--critical); color: var(--critical); }

/* GRID BG */
.grid-bg { position: fixed; inset: 0; pointer-events: none; z-index: 0; background-image: linear-gradient(rgba(255,140,66,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,140,66,.04) 1px, transparent 1px); background-size: 40px 40px; }
#root { position: relative; z-index: 1; }

/* READ-ONLY DEMO (anon = demo showcase; real audits start with an email) */
.banner.demo { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.banner-cta { color: var(--accent); font-weight: 700; text-decoration: none; white-space: nowrap; border-bottom: 1px solid rgba(255,140,66,.4); padding-bottom: 1px; transition: border-color .15s; }
.banner-cta:hover { border-color: var(--accent); }
.tp.locked { cursor: pointer; opacity: .82; }
.tp.locked:hover { border-color: var(--border); background: var(--bg2); opacity: 1; }
.tp.locked .tp-plus { font-size: .95rem; opacity: .8; }
.lock-modal { text-align: center; max-width: 440px; }
.lock-ico { font-size: 2rem; color: var(--accent); margin-bottom: 12px; }
.lock-title { font-size: 1.15rem; font-weight: 700; margin-bottom: 10px; }
.lock-body { font-size: .9rem; color: var(--sub); line-height: 1.65; margin-bottom: 4px; }
.lock-modal .modal-foot { justify-content: center; }
