/* GrowQR RQ Score — demo styles. Mobile-first, responsive, WCAG-AA aware. */
:root {
    --bg: #f4f6fb;
    --surface: #ffffff;
    --ink: #1a2233;
    --muted: #5b6577;
    --line: #e3e8f0;
    --accent: #2563eb;
    --accent-2: #0ea5e9;
    --good: #16a34a;
    --warn: #d97706;
    --bad: #dc2626;
    --shadow: 0 1px 3px rgba(16, 24, 40, .08), 0 8px 24px rgba(16, 24, 40, .06);
    --radius: 14px;
}
@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0e1420; --surface: #161d2b; --ink: #eef2f8; --muted: #9aa6ba;
        --line: #263141; --shadow: 0 1px 3px rgba(0,0,0,.4);
    }
}

* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: var(--bg);
    color: var(--ink);
    line-height: 1.55;
    font-size: 16px;
}
.wrap { width: 100%; max-width: 960px; margin: 0 auto; padding: 0 16px; }

.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; padding-top: 14px; padding-bottom: 14px; }
.brand { font-weight: 800; font-size: 1.4rem; letter-spacing: -.02em; }
.brand-accent { color: var(--accent); }
.tagline { color: var(--muted); font-size: .95rem; }

main.wrap { padding-top: 28px; padding-bottom: 48px; }
.intro h1 { font-size: 1.8rem; margin: 0 0 6px; letter-spacing: -.02em; }
.intro p { color: var(--muted); margin: 0 0 20px; max-width: 60ch; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; margin-bottom: 20px; }

.scorecard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; margin-bottom: 28px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-weight: 600; margin-bottom: 6px; }
input[type="file"], textarea {
    width: 100%; padding: 12px; font: inherit; color: var(--ink);
    background: var(--bg); border: 1px solid var(--line); border-radius: 10px;
}
textarea { resize: vertical; min-height: 120px; }
.hint { color: var(--muted); font-size: .85rem; margin: 6px 0 0; }
.or { text-align: center; color: var(--muted); font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; margin: 6px 0; }
.btn {
    display: inline-block; min-height: 44px; padding: 12px 22px; font: inherit; font-weight: 700;
    color: #fff; background: var(--accent); border: 0; border-radius: 10px; cursor: pointer;
}
.btn:hover { background: #1d4ed8; }
.btn:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid var(--accent-2); outline-offset: 2px; }

.alert { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; border-radius: 10px; padding: 12px 14px; margin-bottom: 20px; }
.alert.warn { background: #fffbeb; color: #92400e; border-color: #fde68a; }
.alert.ok { background: #ecfdf5; color: #065f46; border-color: #a7f3d0; }
@media (prefers-color-scheme: dark) {
    .alert { background: #2a1416; color: #fca5a5; border-color: #7f1d1d; }
    .alert.warn { background: #2a2110; color: #fcd34d; border-color: #78571a; }
}

/* Overall gauge */
.overall { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.gauge {
    --pct: 0; flex: 0 0 auto; width: 128px; height: 128px; border-radius: 50%;
    background: conic-gradient(var(--accent) calc(var(--pct) * 1%), var(--line) 0);
    display: grid; place-items: center;
}
.gauge-inner { width: 96px; height: 96px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; text-align: center; }
.gauge-num { font-size: 2rem; font-weight: 800; line-height: 1; }
.gauge-scale { display: block; color: var(--muted); font-size: .8rem; }
.overall-meta { flex: 1 1 220px; }
.overall-meta h2 { margin: 0 0 10px; font-size: 1.3rem; }
.meta-list { list-style: none; margin: 0 0 8px; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 16px; }
.meta-list li { display: flex; justify-content: space-between; gap: 8px; border-bottom: 1px dashed var(--line); padding: 3px 0; font-size: .9rem; }
.meta-list span { color: var(--muted); }
.basis { color: var(--muted); font-size: .82rem; margin: 6px 0 0; }

.grade-excellent .gauge { --c: var(--good); }
.grade-excellent .gauge, .grade-strong .gauge { background: conic-gradient(var(--good) calc(var(--pct) * 1%), var(--line) 0); }
.grade-good .gauge { background: conic-gradient(var(--accent) calc(var(--pct) * 1%), var(--line) 0); }
.grade-needs-work .gauge, .grade-weak .gauge { background: conic-gradient(var(--warn) calc(var(--pct) * 1%), var(--line) 0); }
.grade-weak .gauge { background: conic-gradient(var(--bad) calc(var(--pct) * 1%), var(--line) 0); }

/* Section */
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.section-head h3 { margin: 0; font-size: 1.15rem; }
.section-score { font-weight: 800; font-size: 1.15rem; color: var(--accent); }
.bar { height: 8px; background: var(--line); border-radius: 99px; overflow: hidden; margin: 10px 0 16px; }
.bar-fill { height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }

.table-scroll { overflow-x: auto; }
table.params { width: 100%; border-collapse: collapse; font-size: .9rem; min-width: 520px; }
table.params th, table.params td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.params th { color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; }
.score-cell { white-space: nowrap; }
.pill { display: inline-block; min-width: 38px; text-align: center; padding: 2px 8px; border-radius: 99px; font-weight: 700; font-size: .82rem; color: #fff; }
.pill.na { background: #94a3b8; }
.pill.s0, .pill.s1 { background: var(--bad); }
.pill.s2 { background: var(--warn); }
.pill.s3 { background: var(--accent); }
.pill.s4 { background: #059669; }
.pill.s5 { background: var(--good); }
tr.is-na td { color: var(--muted); }

/* Recommendations */
.recs { margin-top: 18px; }
.recs h4 { margin: 0 0 12px; font-size: 1rem; }
.rec-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
.rec { border: 1px solid var(--line); border-radius: 12px; padding: 14px; background: var(--bg); }
.rec-type { display: inline-block; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: 2px 8px; border-radius: 99px; margin-bottom: 6px; }
.rec-career { background: #dbeafe; color: #1e40af; }
.rec-skill { background: #dcfce7; color: #166534; }
.rec-cat { display: inline-block; font-size: .7rem; color: var(--muted); margin-left: 6px; }
.rec h5 { margin: 2px 0 4px; font-size: 1rem; }
.rec h5 a { color: var(--accent); text-decoration: none; }
.rec h5 a:hover { text-decoration: underline; }
.rec p { margin: 0; color: var(--muted); font-size: .88rem; }

.section.muted, .card.muted { opacity: .8; }
.site-footer { border-top: 1px solid var(--line); background: var(--surface); }
.site-footer p { color: var(--muted); font-size: .82rem; padding: 16px 0; margin: 0; }

@media (min-width: 640px) {
    .rec-grid { grid-template-columns: 1fr 1fr; }
    .intro h1 { font-size: 2.1rem; }
}
@media (min-width: 900px) {
    .rec-grid { grid-template-columns: 1fr 1fr 1fr; }
}
