:root {
  --bg: #f5f6f8; --card: #fff; --line: #e5e7eb; --ink: #1f2430; --muted: #6b7280;
  --brand: #03c75a; --brand-ink: #027a39; --warn: #d97706; --crit: #dc2626; --opp: #2563eb;
  --radius: 12px; --shadow: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
}
* { box-sizing: border-box; }
body { margin: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  background: var(--bg); color: var(--ink); font-size: 14px; line-height: 1.5; }
a { color: var(--brand-ink); }
button { font: inherit; cursor: pointer; border: 0; border-radius: 8px; padding: 9px 14px; background: var(--brand); color: #fff; font-weight: 600; }
button.ghost { background: #fff; color: var(--ink); border: 1px solid var(--line); }
button.sm { padding: 6px 10px; font-size: 13px; }
button:disabled { opacity: .5; cursor: default; }
input, select { font: inherit; width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
label { display: block; font-size: 12.5px; color: var(--muted); margin: 10px 0 4px; font-weight: 600; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }

/* auth */
.auth-wrap { max-width: 380px; margin: 8vh auto; padding: 0 16px; }
.brand-title { font-size: 22px; font-weight: 800; text-align: center; margin-bottom: 4px; }
.brand-sub { text-align: center; color: var(--muted); margin-bottom: 24px; font-size: 13px; }
.tabs { display: flex; gap: 6px; margin-bottom: 16px; }
.tabs button { flex: 1; background: #eef0f3; color: var(--muted); }
.tabs button.active { background: var(--brand); color: #fff; }
.err { color: var(--crit); font-size: 13px; margin-top: 10px; min-height: 18px; }
.full { width: 100%; margin-top: 16px; }

/* app */
.topbar { display: flex; align-items: center; gap: 16px; padding: 12px 20px; background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.topbar .logo { font-weight: 800; color: var(--brand-ink); }
.topbar .spacer { flex: 1; }
.topbar select { width: auto; min-width: 160px; }
.nav { display: flex; gap: 4px; padding: 0 20px; background: #fff; border-bottom: 1px solid var(--line); }
.nav button { background: none; color: var(--muted); border-radius: 0; border-bottom: 2px solid transparent; padding: 12px 14px; }
.nav button.active { color: var(--ink); border-bottom-color: var(--brand); }
.container { max-width: 1000px; margin: 20px auto; padding: 0 20px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }

/* kpi */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px,1fr)); gap: 12px; margin-bottom: 18px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.kpi .k { font-size: 12px; color: var(--muted); }
.kpi .v { font-size: 22px; font-weight: 800; margin-top: 4px; }
.kpi .v.neg { color: var(--crit); }

/* findings */
.finding { display: flex; gap: 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 8px; background: #fff; }
.badge { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; height: fit-content; white-space: nowrap; }
.badge.critical { background: #fee2e2; color: var(--crit); }
.badge.warn { background: #fef3c7; color: var(--warn); }
.badge.opportunity { background: #dbeafe; color: var(--opp); }
.badge.info { background: #eef0f3; color: var(--muted); }
.finding .t { font-weight: 700; }
.finding .d { color: var(--muted); font-size: 13px; }

/* strategy */
.strategy { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 12px; background: #fff; }
.strategy h3 { margin: 0 0 6px; font-size: 16px; }
.strategy .meta { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.strategy .hyp { font-size: 13px; margin-bottom: 10px; }
.pill { display: inline-block; font-size: 11px; padding: 2px 8px; border-radius: 999px; background: #eef0f3; margin-right: 6px; }
.check { display: flex; align-items: flex-start; gap: 8px; padding: 6px 0; border-top: 1px dashed var(--line); }
.check input { width: auto; margin-top: 3px; }
.check .done { text-decoration: line-through; color: var(--muted); }
.check .ch { font-size: 11px; color: var(--opp); background: #eff6ff; padding: 1px 6px; border-radius: 6px; }
.muted { color: var(--muted); }
.hint { font-size: 12px; color: var(--muted); margin-top: 6px; }
.ok-msg { color: var(--brand-ink); font-size: 13px; }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: #1f2430; color: #fff; padding: 10px 16px; border-radius: 8px; opacity: 0; transition: .3s; z-index: 20; }
.toast.show { opacity: 1; }
.empty { text-align: center; color: var(--muted); padding: 40px; }
