/* WAM Clinic — clean, calm, trustworthy. Light theme, low-saturation accents. */
:root {
  --bg: #f7f5f0;          /* warm off-white */
  --card: #ffffff;
  --ink: #2b2b33;         /* soft near-black */
  --ink-soft: #6b6b76;
  --line: #e6e2d8;
  --accent: #3a7d6b;      /* muted teal-green (health) */
  --accent-soft: #e6f0ec;
  --warn: #c98a2b;        /* amber */
  --warn-soft: #faf0de;
  --bad: #b5544d;         /* muted red */
  --bad-soft: #f8e9e7;
  --ok: #4f8a5b;
  --ok-soft: #e8f1e9;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(43,43,51,.06), 0 4px 14px rgba(43,43,51,.05);
}

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

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

/* ---------- top bar ---------- */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 32px;
  background: var(--card);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
}
.brand { display: flex; align-items: center; gap: 14px; }
.logo { font-size: 30px; }
.brand h1 { font-size: 20px; font-weight: 700; letter-spacing: .2px; }
.tagline { font-size: 12.5px; color: var(--ink-soft); margin-top: 1px; }
.privacy-badge {
  font-size: 12.5px;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid #cfe3db;
  padding: 6px 12px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  gap: 7px;
}
.privacy-badge .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
  animation: pulse 2.4s infinite;
}
@keyframes pulse { 0%,100% {opacity:1} 50% {opacity:.35} }

/* ---------- main ---------- */
main { flex: 1; max-width: 980px; margin: 0 auto; width: 100%; padding: 28px 24px 40px; }

.hero { text-align: center; padding: 26px 10px 10px; }
.hero h2 { font-size: 27px; font-weight: 700; }
.hero p { max-width: 640px; margin: 10px auto 14px; color: var(--ink-soft); font-size: 15px; }
.hero code, .hint code { background: #efece3; border-radius: 4px; padding: 1px 6px; font-size: .9em; }
.demo-btn-wrap { margin-top: 6px; }

/* ---------- inputs ---------- */
.inputs { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 22px; }
@media (max-width: 760px) { .inputs { grid-template-columns: 1fr; } }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 20px 20px;
}
.card-head h3 { font-size: 15.5px; margin-bottom: 4px; }
.hint { font-size: 12px; color: var(--ink-soft); margin-bottom: 12px; }

textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  font-family: Consolas, "Cascadia Mono", monospace;
  font-size: 13px;
  color: var(--ink);
  background: #fcfbf8;
  resize: vertical;
  min-height: 150px;
}
textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent; }

.file-drop {
  margin-top: 10px;
  border: 1.5px dashed var(--line);
  border-radius: 8px;
  padding: 10px;
  text-align: center;
  font-size: 12.5px;
  color: var(--ink-soft);
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.file-drop:hover, .file-drop.dragover { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }

/* ---------- actions ---------- */
.actions { display: flex; gap: 12px; justify-content: center; margin: 24px 0 8px; }
.btn {
  border: none;
  border-radius: 10px;
  padding: 11px 26px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: transform .06s, box-shadow .15s, background .15s;
}
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); color: #fff; box-shadow: 0 2px 8px rgba(58,125,107,.3); }
.btn.primary:hover { background: #2f6a5a; }
.btn.sample {
  background: linear-gradient(135deg, #3a7d6b, #4f8a5b);
  color: #fff;
  box-shadow: 0 2px 10px rgba(58,125,107,.35);
  padding: 12px 30px;
  font-size: 15.5px;
}
.btn.sample:hover { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(58,125,107,.4); }
.btn.sample:active { transform: translateY(0); }
.demo-hint { font-size: 12.5px; color: var(--ink-soft); margin-bottom: 8px; }
.btn.ghost { background: transparent; color: var(--ink-soft); border: 1px solid var(--line); }
.btn.ghost:hover { background: #f1eee6; }

/* ---------- report ---------- */
.report { margin-top: 26px; }
.report.hidden { display: none; }

.scorecard {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px 24px;
  display: flex;
  align-items: center;
  gap: 22px;
  margin-bottom: 18px;
}
.grade {
  width: 84px; height: 84px; border-radius: 50%;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  color: #fff; font-weight: 700; flex-shrink: 0;
}
.grade .g { font-size: 30px; line-height: 1; }
.grade .gsub { font-size: 10px; opacity: .9; margin-top: 2px; text-transform: uppercase; letter-spacing: 1px; }
.grade.A { background: var(--ok); }
.grade.B { background: #7a9e4f; }
.grade.C { background: var(--warn); }
.grade.D { background: var(--bad); }
.scorecard .summary h3 { font-size: 18px; margin-bottom: 4px; }
.scorecard .summary p { color: var(--ink-soft); font-size: 14px; }
.score-stats { margin-left: auto; display: flex; gap: 20px; text-align: center; }
.stat b { display: block; font-size: 20px; }
.stat span { font-size: 11.5px; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .5px; }
.stat.err b { color: var(--bad); } .stat.warn b { color: var(--warn); } .stat.ok b { color: var(--ok); }

.issue {
  background: var(--card);
  border: 1px solid var(--line);
  border-left-width: 4px;
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 14px 18px;
  margin-bottom: 12px;
}
.issue.level-error { border-left-color: var(--bad); }
.issue.level-warning { border-left-color: var(--warn); }
.issue.level-info { border-left-color: var(--accent); }
.issue .ihead { display: flex; align-items: center; gap: 10px; }
.issue .itag {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .5px; padding: 2px 9px; border-radius: 999px; flex-shrink: 0;
}
.issue.level-error .itag { background: var(--bad-soft); color: var(--bad); }
.issue.level-warning .itag { background: var(--warn-soft); color: var(--warn); }
.issue.level-info .itag { background: var(--accent-soft); color: var(--accent); }
.issue .ititle { font-weight: 600; font-size: 14.5px; }
.issue .idetail { margin: 8px 0 4px; color: var(--ink); font-size: 13.5px; }
.issue .idetail pre {
  background: #f6f4ee; border-radius: 6px; padding: 10px;
  font-size: 12px; overflow-x: auto; white-space: pre-wrap; word-break: break-word;
  max-height: 180px; overflow-y: auto;
}
.issue .isugg {
  margin-top: 8px; font-size: 13px;
  background: var(--accent-soft); border-radius: 8px; padding: 8px 12px;
  color: #2f5f52;
}
.issue .isugg b { color: var(--accent); }

.section-title { font-size: 16px; font-weight: 700; margin: 26px 0 12px; display: flex; align-items: center; gap: 8px; }

.empty-note {
  text-align: center; color: var(--ink-soft); font-size: 14px;
  background: var(--card); border: 1px dashed var(--line); border-radius: var(--radius);
  padding: 28px;
}

footer {
  text-align: center;
  padding: 18px;
  font-size: 12px;
  color: var(--ink-soft);
  border-top: 1px solid var(--line);
  background: var(--card);
}
