/* readiness — Hope Town AI Readiness Check
   Same visual language as grantintake: orange #F09018, grey #6C6C6C. */

:root {
  --orange: #f09018;
  --orange-dark: #d67d0b;
  --orange-tint: #fdf2e4;
  --grey: #6c6c6c;
  --ink: #2c3137;
  --muted: #7e848b;
  --line: #e6e3df;
  --bg: #faf7f3;
  --card: #ffffff;
  --error: #b3261e;
  --error-bg: #fbeae8;
  --green: #2e7d32;
  --green-bg: #e8f3e8;
  --green-bar: #57a05d;
  --yellow: #9a7b00;
  --yellow-bg: #fdf6e0;
  --yellow-bar: #e6b93f;
  --red: #b3261e;
  --red-bg: #fbeae8;
  --red-bar: #d75752;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.6 -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: 680px;
  margin: 0 auto;
  padding: 36px 18px 64px;
}

/* ── Header ─────────────────────────────────────────────── */

.masthead { text-align: center; margin-bottom: 24px; }

.logo { width: 210px; max-width: 62%; height: auto; }

.masthead h1 {
  margin: 16px 0 6px;
  font-size: 1.66rem;
  line-height: 1.2;
  letter-spacing: -0.015em;
  color: var(--ink);
}

.lede {
  margin: 0 auto;
  max-width: 32rem;
  color: var(--grey);
  font-size: 1.02rem;
}

.orgpill {
  display: inline-block;
  margin-top: 12px;
  background: var(--orange-tint);
  color: var(--orange-dark);
  font-weight: 700;
  font-size: 0.9rem;
  border-radius: 999px;
  padding: 4px 14px;
}

/* ── Progress (survey) ──────────────────────────────────── */

.progress {
  position: sticky;
  top: 0;
  z-index: 5;
  height: 6px;
  margin: 0 -18px 18px;
  background: var(--line);
}

.progress i {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--orange);
  transition: width 0.25s ease;
}

/* ── Card ───────────────────────────────────────────────── */

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 26px 26px 30px;
  box-shadow: 0 6px 24px rgba(44, 49, 55, 0.06);
  margin-bottom: 18px;
}

@media (max-width: 520px) {
  .card { padding: 20px 16px 24px; border-radius: 14px; }
  .wrap { padding-top: 24px; }
}

.eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--orange);
  margin: 0 0 6px;
}

.qtitle { margin: 0 0 4px; font-size: 1.12rem; line-height: 1.35; }

.qnote { margin: 0 0 16px; color: var(--muted); font-size: 0.9rem; }

/* ── Inputs shared with landing form ────────────────────── */

.field { margin-bottom: 18px; }
.field:last-child { margin-bottom: 0; }

label.flabel {
  display: block;
  font-weight: 600;
  font-size: 0.96rem;
  margin-bottom: 6px;
}

.hint { font-weight: 400; color: var(--muted); font-size: 0.85rem; }

input[type="text"], input[type="email"], textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
  font: inherit;
  color: var(--ink);
  background: #fff;
  transition: border-color 0.12s, box-shadow 0.12s;
}

input::placeholder, textarea::placeholder { color: #b3b8bd; }

input[type="text"]:focus, input[type="email"]:focus, textarea:focus {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(240, 144, 24, 0.18);
}

textarea { resize: vertical; min-height: 52px; }

/* Visually hidden but focusable (radio inputs inside tap targets) */
.vh {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
  pointer-events: none;
}

/* ── Archetype choice cards ─────────────────────────────── */

.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 560px) { .choices { grid-template-columns: 1fr; } }

.choice {
  position: relative;
  display: block;
  border: 1.5px solid var(--line);
  border-radius: 13px;
  padding: 14px 15px;
  cursor: pointer;
  transition: border-color 0.12s, background 0.12s, box-shadow 0.12s;
}

.choice .cc-title { display: block; font-weight: 700; font-size: 0.98rem; margin-bottom: 3px; }
.choice .cc-desc { display: block; color: var(--grey); font-size: 0.88rem; line-height: 1.45; }

.choice:has(input:checked) {
  border-color: var(--orange);
  background: var(--orange-tint);
  box-shadow: 0 0 0 3px rgba(240, 144, 24, 0.16);
}

.choice:has(input:focus-visible) { outline: 2px solid var(--orange-dark); outline-offset: 2px; }

/* ── Pillar yes/no rows ─────────────────────────────────── */

.pillar { margin-top: 22px; }
.pillar:first-of-type { margin-top: 4px; }

.pillar h3 {
  margin: 0 0 2px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--grey);
}

.yn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.yn:last-child { border-bottom: 0; padding-bottom: 2px; }

.yn-q { flex: 1; font-size: 0.95rem; line-height: 1.45; }

.seg { display: flex; gap: 7px; flex-shrink: 0; }

.seg label { position: relative; display: block; cursor: pointer; }

.seg label span {
  display: block;
  min-width: 52px;
  text-align: center;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  padding: 7px 14px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--grey);
  transition: all 0.12s;
}

.seg label:has(input:checked) span {
  border-color: var(--orange);
  background: var(--orange);
  color: #fff;
}

.seg label:has(input:focus-visible) span { outline: 2px solid var(--orange-dark); outline-offset: 2px; }

@media (max-width: 480px) {
  .yn { flex-wrap: wrap; gap: 8px; }
  .yn-q { flex: 1 1 100%; }
}

/* ── 1-to-5 scales ──────────────────────────────────────── */

.scaleq { padding: 14px 0; border-bottom: 1px solid var(--line); }
.scaleq:last-child { border-bottom: 0; }

.scaleq .sq { font-size: 0.98rem; font-weight: 600; margin-bottom: 10px; }

.scale { display: flex; align-items: center; gap: 10px; }

.scale .end {
  color: var(--muted);
  font-size: 0.78rem;
  flex-shrink: 0;
  width: 52px;
}
.scale .end.right { text-align: right; }

.dots { display: flex; gap: 9px; flex: 1; justify-content: center; }

.dots label { position: relative; display: block; cursor: pointer; }

.dots label span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1.5px solid var(--line);
  border-radius: 50%;
  font-weight: 700;
  color: var(--grey);
  transition: all 0.12s;
}

.dots label:has(input:checked) span {
  border-color: var(--orange);
  background: var(--orange);
  color: #fff;
}

.dots label:has(input:focus-visible) span { outline: 2px solid var(--orange-dark); outline-offset: 2px; }

@media (max-width: 420px) {
  .dots label span { width: 40px; height: 40px; }
  .scale .end { width: 44px; }
}

/* ── Error / actions ────────────────────────────────────── */

.error-banner {
  background: var(--error-bg);
  border: 1px solid #eebbb6;
  color: var(--error);
  border-radius: 11px;
  padding: 11px 15px;
  margin-bottom: 18px;
  font-size: 0.94rem;
  font-weight: 500;
}

.actions { margin-top: 24px; text-align: center; }

button[type="submit"], .btn {
  display: inline-block;
  background: var(--orange);
  color: #fff;
  border: 0;
  border-radius: 12px;
  padding: 14px 38px;
  font: inherit;
  font-weight: 700;
  font-size: 1.06rem;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(240, 144, 24, 0.32);
  transition: background 0.12s, transform 0.05s;
}

button[type="submit"]:hover, .btn:hover { background: var(--orange-dark); }
button[type="submit"]:active, .btn:active { transform: translateY(1px); }

.btn.secondary {
  background: #fff;
  color: var(--orange-dark);
  border: 1.5px solid var(--orange);
  box-shadow: none;
}

.reassure { color: var(--muted); font-size: 0.9rem; margin: 13px auto 0; max-width: 30rem; }

/* ── Chips + result page ────────────────────────────────── */

.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border-radius: 999px;
  padding: 4px 13px;
  font-weight: 700;
  font-size: 0.88rem;
}

.chip::before { content: ""; width: 9px; height: 9px; border-radius: 50%; }
.chip.G { background: var(--green-bg); color: var(--green); }
.chip.G::before { background: var(--green-bar); }
.chip.Y { background: var(--yellow-bg); color: var(--yellow); }
.chip.Y::before { background: var(--yellow-bar); }
.chip.R { background: var(--red-bg); color: var(--red); }
.chip.R::before { background: var(--red-bar); }

.prow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}
.prow:last-child { border-bottom: 0; }
.prow .pname { font-weight: 600; font-size: 0.97rem; }
.prow .pdetail { color: var(--muted); font-size: 0.84rem; margin-left: 8px; }

.echo { color: var(--muted); font-size: 0.92rem; margin: 14px 0 0; }

/* ── Report bars ────────────────────────────────────────── */

.bar {
  display: flex;
  height: 13px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--line);
  margin-top: 7px;
}
.bar i { display: block; height: 100%; }
.bar i.G { background: var(--green-bar); }
.bar i.Y { background: var(--yellow-bar); }
.bar i.R { background: var(--red-bar); }
.bar i.solid { background: var(--orange); }

.legend { display: flex; gap: 16px; margin-top: 10px; color: var(--muted); font-size: 0.82rem; }
.legend b { font-weight: 700; color: var(--ink); }

.arow { padding: 9px 0; }
.arow .aname { display: flex; justify-content: space-between; font-size: 0.93rem; }
.arow .aname b { font-weight: 600; }

.stats { display: flex; gap: 14px; margin-top: 6px; flex-wrap: wrap; }
.stat {
  flex: 1;
  min-width: 130px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 13px 16px;
  text-align: center;
}
.stat .big { font-size: 1.7rem; font-weight: 800; line-height: 1.1; }
.stat .cap { color: var(--muted); font-size: 0.8rem; margin-top: 2px; }

/* ── Copy box + QR (created page, admin) ────────────────── */

.copybox { display: flex; gap: 8px; margin: 8px 0 4px; }
.copybox input { flex: 1; font-size: 0.95rem; background: var(--bg); }
.copybox button {
  background: var(--orange);
  border: 0;
  color: #fff;
  border-radius: 10px;
  padding: 0 18px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.copybox button.copied { background: var(--green-bar); }

.qr { text-align: center; margin: 16px 0 4px; }
.qr img { border: 1px solid var(--line); border-radius: 12px; padding: 8px; background: #fff; }

/* ── Steps (created/landing) ────────────────────────────── */

.steps { list-style: none; counter-reset: step; padding: 0; margin: 18px 0 4px; }
.steps li {
  counter-increment: step;
  position: relative;
  padding: 0 0 15px 44px;
}
.steps li::before {
  content: counter(step);
  position: absolute; left: 0; top: -2px;
  width: 28px; height: 28px;
  background: var(--orange-tint); color: var(--orange-dark);
  border-radius: 50%; font-weight: 700; font-size: 0.9rem;
  display: flex; align-items: center; justify-content: center;
}
.steps li:not(:last-child)::after {
  content: ""; position: absolute; left: 13px; top: 30px; bottom: 3px;
  width: 2px; background: var(--line);
}

/* ── Admin ──────────────────────────────────────────────── */

.table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.table th {
  text-align: left;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  padding: 8px 10px;
  border-bottom: 2px solid var(--line);
}
.table td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tr:hover td { background: var(--bg); }
.table a { color: var(--orange-dark); font-weight: 600; text-decoration: none; }
.table a:hover { text-decoration: underline; }

.badge {
  display: inline-block;
  background: var(--error-bg);
  color: var(--error);
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 2px 9px;
}

.quote {
  background: var(--bg);
  border-left: 3px solid var(--orange);
  border-radius: 0 10px 10px 0;
  padding: 10px 14px;
  margin: 0 0 10px;
  font-size: 0.94rem;
}
.quote .when { color: var(--muted); font-size: 0.78rem; display: block; margin-top: 3px; }

/* ── Footer ─────────────────────────────────────────────── */

.foot { margin-top: 26px; text-align: center; color: var(--muted); font-size: 0.85rem; }
.foot a { color: var(--orange-dark); }

/* ── v2 instrument: fluency ladder, pick chips, big stage ─ */

/* Fear-to-fluency reads as a vertical ladder */
.choices.col { grid-template-columns: 1fr; gap: 10px; }

/* "Tap one or two" pill groups (hopes, concerns, team) */
.pickgroup { display: flex; flex-wrap: wrap; gap: 9px; }
.pickgroup.nudge { animation: nudge 0.35s ease; }
@keyframes nudge { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-3px); } 75% { transform: translateX(3px); } }

.pick { position: relative; display: block; cursor: pointer; }
.pick span {
  display: block;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  padding: 9px 16px;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--grey);
  transition: all 0.12s;
}
.pick:has(input:checked) span {
  border-color: var(--orange);
  background: var(--orange);
  color: #fff;
}
.pick:has(input:focus-visible) span { outline: 2px solid var(--orange-dark); outline-offset: 2px; }

/* Big stage chip on the personal result page */
.bigstage {
  font-size: 1.5rem;
  padding: 10px 26px;
  margin-top: 4px;
  gap: 11px;
}
.bigstage::before { width: 14px; height: 14px; }

/* Concern bars read in red, hopes/fluency in orange */
.bar i.warn { background: var(--red-bar); }

@media print {
  .progress, .actions, .copybox button, .foot, .noprint { display: none !important; }
  body { background: #fff; }
  .card { box-shadow: none; }
}

/* ── grantinterest: header lockup + mascot ─────────────────── */

.logolockup {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-bottom: 4px;
}
.logo-ai { width: 260px; max-width: 76%; height: auto; }
.logolockup .logo { width: 154px; max-width: 48%; }
.logolockup .eco-tag {
  width: 128px;
  border: 0;
  border-top: 1px solid var(--line);
  margin: 0;
}

.mascot { text-align: center; margin: 34px 0 6px; }
.mascot img { width: 156px; max-width: 44%; height: auto; }

@media (max-width: 520px) {
  .logo-ai { width: 214px; }
  .logolockup .logo { width: 140px; }
  .mascot img { width: 132px; }
}
