/* Hope Town AI Groundwork. Reuses Grant's dashboard brand palette.
   Bright orange is a fill with near-black text; dark orange is for text on white. */
* { box-sizing: border-box; margin: 0; }
:root {
  --navy: #09090D; --teal: #B45309; --ink: #16283C; --mute: #526477;
  --brand: #F59623; --brand-bright: #FFA83D;
  --line: #DCE6F0; --panel: #F7FAFD; --bad: #8C2F1F;
}
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--ink); background: #fff; line-height: 1.45;
}
.wrap { max-width: 680px; margin: 0 auto; padding: 20px 16px 60px; }
.brand-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 16px; padding: 4px 0 20px; margin-bottom: 28px; border-bottom: 4px solid var(--brand); }
.brand-logo { display: block; width: 260px; max-width: 100%; height: auto; }
.brand-product { color: var(--navy); font-size: 16px; font-weight: 700; }
.brand-product span { display: block; color: var(--mute); font-size: 12px; font-weight: 400; }
a { color: var(--teal); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }
.kicker { color: var(--teal); font-weight: 600; font-size: 13px; letter-spacing: .02em; }
h1 { color: var(--navy); font-size: 26px; margin: 4px 0 10px; line-height: 1.2; }
h2 { color: var(--navy); font-size: 17px; margin: 0 0 6px; }
h3 { color: var(--navy); font-size: 14px; margin: 14px 0 4px; }
.hero { margin: 8px 0 18px; }
.hero.compact { margin-bottom: 10px; }
.lede { font-size: 15px; margin-bottom: 8px; }
.lede.small, .gloss { font-size: 13px; color: var(--mute); }
.gloss { margin: 2px 0 8px; }

.cards { display: grid; gap: 10px; }
.card { display: block; border: 1px solid var(--line); border-radius: 10px;
  padding: 14px 16px; text-decoration: none; color: var(--ink); background: #fff; }
.card:active, .card:hover { border-color: var(--teal); background: var(--panel); }
.card-title { display: block; font-weight: 600; color: var(--navy); font-size: 16px; }
.card-sub { display: block; font-size: 13px; color: var(--mute); margin-top: 2px; }

.progress { position: sticky; top: 0; background: #fff; padding: 8px 0;
  display: flex; align-items: center; gap: 10px; z-index: 5;
  border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.bar { flex: 1; height: 6px; background: var(--panel); border-radius: 3px; overflow: hidden; }
.bar span { display: block; height: 100%; width: 0; background: var(--teal); transition: width .3s; }
#progress-label { font-size: 12px; color: var(--mute); white-space: nowrap; }

.q { padding: 16px 0 12px; border-bottom: 1px solid var(--line); }
.q h2 { font-size: 16px; }
.in-text, select { width: 100%; font: inherit; padding: 10px 12px; margin-top: 6px;
  border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: #fff; }
.in-text:focus, select:focus { outline: 2px solid var(--teal); border-color: var(--teal); }
textarea.in-text { resize: vertical; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.chip { font: inherit; font-size: 14px; padding: 10px 14px; min-height: 44px;
  border: 1px solid var(--line); border-radius: 22px; background: #fff; color: var(--ink);
  cursor: pointer; position: relative; }
.chip-sm { font-size: 13px; padding: 7px 11px; min-height: 36px; }
.chip.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.chip .ord { position: absolute; top: -7px; right: -4px; background: var(--teal); color: #fff;
  font-size: 11px; width: 18px; height: 18px; border-radius: 50%; line-height: 18px; text-align: center; }

.prefill { background: var(--panel); border-radius: 8px; padding: 10px 12px; margin-top: 8px; }
.prefill p { font-size: 14px; color: var(--ink); white-space: pre-line; }
.prefill-tag, .probe-tag { display: inline-block; font-size: 11px; font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase; color: var(--teal); margin-bottom: 4px; }
.in-fix { margin-top: 8px; }
.extras { margin-top: 8px; }
.extra { margin-top: 10px; }
.extra label { font-size: 13px; font-weight: 600; color: var(--ink); }

.rows .row { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 10px;
  border: 1px solid var(--line); border-radius: 8px; margin-top: 8px; position: relative; }
.rows .row input, .rows .row select { width: 100%; font: inherit; font-size: 13px;
  padding: 8px 9px; border: 1px solid var(--line); border-radius: 6px; }
.row-del { position: absolute; top: -8px; right: -6px; width: 22px; height: 22px;
  border-radius: 50%; border: 1px solid var(--line); background: #fff; color: var(--mute); cursor: pointer; }

.q-foot { display: flex; gap: 10px; align-items: center; margin-top: 10px; }
.mini, .btn-ghost { font: inherit; font-size: 13px; color: var(--mute); background: none;
  border: 1px solid var(--line); border-radius: 8px; padding: 6px 12px; cursor: pointer;
  text-decoration: none; display: inline-block; }
.mini.on { color: #fff; background: var(--mute); border-color: var(--mute); }
.saved { font-size: 12px; color: var(--teal); }
.who { margin-top: 8px; }
.who label { font-size: 13px; color: var(--mute); }

.probe { background: var(--panel); border-left: 3px solid var(--teal); border-radius: 0 8px 8px 0;
  padding: 10px 12px; margin-top: 8px; }
.probe-q { font-size: 14px; }
.in-probe { width: 100%; font: inherit; padding: 8px 10px; margin-top: 6px;
  border: 1px solid var(--line); border-radius: 8px; }

.submit-block { padding: 22px 0; text-align: center; }
.btn-main { font: inherit; font-size: 16px; font-weight: 600; color: var(--navy); background: var(--brand);
  border: none; border-radius: 10px; padding: 13px 26px; min-height: 48px; cursor: pointer; }
.btn-main:hover, .btn-main:active { background: var(--brand-bright); }
.btn-main:disabled { background: var(--line); color: var(--mute); cursor: wait; }

.echo { background: var(--panel); border-radius: 10px; padding: 12px 14px; margin: 12px 0; }
.recap { margin-top: 14px; }
.recap-item { padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.rq { display: block; color: var(--mute); font-size: 12px; }
.ra { display: block; }

.panel { border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; margin: 14px 0; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 6px; }
.tbl td { padding: 7px 8px 7px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl code { font-size: 12px; word-break: break-all; }
.muted { color: var(--mute); }
.hint { display: block; font-size: 12px; color: var(--teal); }

footer { margin-top: 40px; border-top: 2px solid var(--brand); padding-top: 16px; }
footer p { font-size: 12px; color: var(--mute); text-align: center; margin-top: 4px; }
footer .brand-credit { color: var(--navy); font-size: 14px; font-weight: 700; }
@media (max-width: 480px) { .rows .row { grid-template-columns: 1fr; } h1 { font-size: 22px; } }

/* Client page (/p/<token>): live scorecard, tallies, authored notes. */
.axes { margin-top: 8px; }
.axis { display: grid; grid-template-columns: 1fr 120px 92px; gap: 10px; align-items: center;
  padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.axis .track { height: 8px; background: var(--panel); border-radius: 4px; overflow: hidden; display: block; }
.axis .fill { display: block; height: 100%; background: var(--teal); }
.axis .val { text-align: right; font-weight: 600; color: var(--navy); font-size: 13px; }
.axis .cov { display: block; font-size: 11px; color: var(--mute); font-weight: 400; }
.axis.empty .val { color: var(--mute); font-weight: 400; }
.counts { font-size: 13px; color: var(--mute); margin-top: 10px; }
.tally { list-style: none; padding: 0; margin: 6px 0 0; }
.tally li { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.tally .n { color: var(--mute); font-size: 12px; }
.verbatim { font-size: 14px; padding: 6px 0 6px 12px; border-left: 3px solid var(--line); margin: 6px 0; }
.note h2 { margin-bottom: 8px; }
.note p, .note li { font-size: 14px; margin: 6px 0; }
.note ul, .note ol { padding-left: 20px; }
.note h3 { font-size: 15px; }
.note h4 { font-size: 14px; }
.note blockquote { border-left: 3px solid var(--teal); padding-left: 10px; color: var(--mute); margin: 8px 0; }
.stamp { font-size: 11px; color: var(--mute); font-weight: 400; }
@media (max-width: 480px) { .axis { grid-template-columns: 1fr 80px 84px; } }
@media print {
  .wrap { max-width: none; padding: 0; }
  .brand-header, footer { break-inside: avoid; }
  .brand-logo { width: 240px; }
  .panel, .q { break-inside: avoid; }
  .progress { position: static; }
}
