html,
body {
  background: var(--ground);
  color: var(--navy);
}

.phone {
  max-width: 480px;
  min-height: 100dvh;
  margin: 0 auto;
  padding: max(24px, env(safe-area-inset-top)) 22px max(28px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.loading {
  color: var(--ink-muted);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: 0.02em;
}

.pill {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-muted);
  padding: 4px 10px;
  border: 1px solid #C9D4E5;
  border-radius: 999px;
}

.domain-tag {
  font-size: 14px;
  font-weight: 700;
  color: var(--blue);
  letter-spacing: 0.04em;
}

.status-text {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-muted);
}

.progress {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 4px;
}

.progress span {
  height: 6px;
  border-radius: 3px;
  background: #C9D4E5;
}

.progress span.done {
  background: var(--blue);
}

.hero {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 20px;
}

.eyebrow {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue);
}

h1 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 32px;
  line-height: 1.15;
}

h1.question {
  font-weight: 600;
  font-size: 23px;
  line-height: 1.3;
}

h2 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 17px;
}

.lede {
  margin: 0;
  font-size: 17px;
  color: var(--ink-muted);
}

.muted {
  color: var(--ink-muted);
  font-size: 15px;
}

.small {
  font-size: 14px;
}

.center {
  text-align: center;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
}

label.field {
  font-size: 15px;
  font-weight: 600;
}

input[type='text'],
input[type='email'],
textarea {
  width: 100%;
  padding: 12px 14px;
  font-size: 16px;
  color: var(--navy);
  background: var(--paper);
  border: 1.5px solid var(--line-strong);
  border-radius: 10px;
}

textarea {
  resize: none;
  line-height: 1.4;
}

input.code {
  height: 56px;
  font-family: var(--font-mono);
  font-size: 20px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

::placeholder {
  color: #6B7A94;
}

.btn {
  min-height: 52px;
  padding: 0 18px;
  border: none;
  border-radius: 12px;
  background: var(--blue);
  color: #FFFFFF;
  font-size: 18px;
  font-weight: 700;
}

.btn:hover:not(:disabled) {
  background: var(--blue-dark);
}

.btn.small-btn {
  min-height: 44px;
  font-size: 16px;
  border-radius: 10px;
}

.btn.secondary {
  background: var(--paper);
  color: var(--blue);
  border: 1.5px solid var(--blue);
}

.btn.secondary:hover:not(:disabled) {
  background: var(--blue-soft);
}

.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.option {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  width: 100%;
  min-height: 72px;
  padding: 14px 16px;
  text-align: left;
  color: var(--navy);
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: 12px;
}

.option[aria-checked='true'] {
  background: var(--blue-soft);
  border: 2px solid var(--blue);
}

.option .dot {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-top: 2px;
  border-radius: 50%;
  border: 2px solid var(--line-strong);
  background: var(--paper);
}

.option[aria-checked='true'] .dot {
  border: 6px solid var(--blue);
}

.option .level {
  display: block;
  font-size: 16px;
  font-weight: 700;
}

.option .desc {
  display: block;
  font-size: 15px;
  line-height: 1.35;
  color: var(--ink-muted);
  /* Option captions may carry a deliberate blank line. */
  white-space: pre-line;
}

.push-bottom {
  margin-top: auto;
}

.notice {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border-radius: 14px;
}

.notice.ok {
  background: var(--ok-bg);
  border: 1px solid var(--ok-line);
  color: var(--ok-ink);
}

.notice .icon {
  width: 28px;
  height: 28px;
}

.notice strong {
  display: block;
  font-size: 17px;
}

.label-warn {
  align-self: flex-start;
  font-size: 13px;
  font-weight: 700;
  color: var(--warn-ink);
  background: var(--warn-bg);
  border: 1px solid var(--warn-line);
  border-radius: 999px;
  padding: 3px 10px;
}

.error {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--danger);
}

.privacy-head {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: var(--navy);
}

.privacy-head .icon {
  color: var(--blue);
}

.levels {
  padding: 0;
  overflow: hidden;
  gap: 0;
}

.levels .level-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 14px;
  border-bottom: 1px solid #EEF2F7;
}

.levels .level-row:last-child {
  border-bottom: none;
}

.chip {
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
}

.lvl-level-1 { background: var(--lvl-level-1); color: #06264D; }
.lvl-level-2 { background: var(--lvl-level-2); color: #06264D; }
.lvl-level-3 { background: var(--lvl-level-3); color: #FFFFFF; }
.lvl-level-4 { background: var(--lvl-level-4); color: #FFFFFF; }
.lvl-none { background: transparent; color: var(--ink-muted); border: 1px dashed var(--line-strong); }

.report-domain {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.report-domain:last-child {
  border-bottom: none;
}

.report-domain h3 {
  margin: 0;
  font-size: 16px;
}

.report-domain p {
  margin: 0;
  font-size: 15px;
}

.checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: var(--ink-muted);
}

.checkbox input {
  width: 20px;
  height: 20px;
  margin: 2px 0 0;
  flex-shrink: 0;
}

/* ---------- question for the room ---------- */
.room-card {
  border: 2px solid var(--blue);
  box-shadow: 0 6px 18px rgba(10, 95, 184, 0.12);
}

.room-kicker {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blue);
}

.room-question {
  font-size: 20px;
  line-height: 1.3;
  color: var(--navy);
}

.poll-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

/* ---------- waiting: signs of life between questions ---------- */
.breathing-mark {
  margin-top: 8px;
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-align: center;
  color: var(--blue);
  animation: breathe 3.6s ease-in-out infinite;
}

@keyframes breathe {
  0%, 100% { opacity: 0.35; transform: scale(0.97); }
  50% { opacity: 1; transform: scale(1); }
}

.live-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 14px;
  color: var(--ink-muted);
}

.live-dot {
  width: 9px;
  height: 9px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #1F9D63;
  animation: live-pulse 2s ease-out infinite;
}

.live-status.offline .live-dot {
  background: #C0821B;
  animation: none;
}

@keyframes live-pulse {
  0% { box-shadow: 0 0 0 0 rgba(31, 157, 99, 0.45); }
  70% { box-shadow: 0 0 0 9px rgba(31, 157, 99, 0); }
  100% { box-shadow: 0 0 0 0 rgba(31, 157, 99, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .breathing-mark { animation: none; opacity: 1; }
  .live-dot { animation: none; }
}

/* ---------- report: a document in the style of the full CGR report ---------- */
.report {
  display: flex;
  flex-direction: column;
  gap: 22px;
  color: #101828;
}

.brand-mark {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: var(--blue);
}

.report-mast {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--navy);
}

.report-mast h1 {
  margin: 0;
  font-size: 26px;
  line-height: 1.15;
  color: var(--navy);
}

.report-meta,
.maturity {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.report-meta th,
.report-meta td,
.maturity th,
.maturity td {
  padding: 7px 6px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

.report-meta th {
  width: 40%;
  font-weight: 500;
  color: var(--ink-muted);
}

.maturity th {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.maturity td.num,
.report-meta td.num {
  font-family: var(--font-mono);
  color: var(--ink-muted);
}

.report-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.report-section h2 {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
  font-size: 19px;
  color: var(--navy);
}

.report-section h2 .num {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--blue);
}

.report-section p {
  margin: 0;
  line-height: 1.5;
}

.overall {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 14px;
  background: #F6F9FC;
  border: 1px solid var(--line);
  border-radius: 8px;
}

/* Level chips use the report's Lumify blue ordinal ramp (see --lvl-level-* in base.css).
   Levels 1-2 take dark ink, 3-4 white; every pair clears 4.5:1. */
.lvl-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  min-width: 26px;
  height: 26px;
  padding: 0 6px;
  border-radius: 5px;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  color: #FFFFFF;
}

.lvl-chip.level-1 { background: var(--lvl-level-1); color: #06264D; }
.lvl-chip.level-2 { background: var(--lvl-level-2); color: #06264D; }
.lvl-chip.level-3 { background: var(--lvl-level-3); }
.lvl-chip.level-4 { background: var(--lvl-level-4); }
.lvl-chip.none { background: transparent; color: var(--ink-muted); border: 1px dashed var(--line-strong); }

.report .report-domain {
  gap: 10px;
}

.report .report-domain h3 {
  font-size: 17px;
  color: var(--navy);
}

.step {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 2px 0 2px 12px;
  border-left: 3px solid var(--blue);
}

.evidence-intro {
  font-size: 14px;
  font-weight: 600;
  color: var(--navy);
}

.checklist {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
}

.checklist label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.checklist input {
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  flex-shrink: 0;
}

.report-section.cta {
  padding: 14px;
  background: var(--navy);
  color: #FFFFFF;
  border-radius: 8px;
}

.report-foot {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.report-foot h3 {
  margin: 0;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.report-foot ul {
  margin: 0;
  padding-left: 18px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--ink-muted);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.report-foot p {
  margin: 0;
  font-size: 12px;
  color: var(--ink-muted);
}

/* printable set of reports (presenter) */
.print-set {
  max-width: 820px;
  margin: 0 auto;
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.print-page + .print-page {
  padding-top: 32px;
  border-top: 2px dashed var(--line-strong);
}

@media print {
  @page { margin: 16mm 14mm; }
  /* Chrome propagates the html background to the page canvas, so white on body alone
     leaves the page colour showing below the last line of content. */
  html, body { background: #FFFFFF; }
  .print-set { max-width: none; padding: 0; gap: 0; }
  .print-page { break-before: page; }
  .print-page:first-of-type { break-before: auto; }
  .print-page + .print-page { padding-top: 0; border-top: none; }
  .no-print { display: none !important; }
  .phone { max-width: none; min-height: 0; padding: 0; }
  .card { border: none; padding: 0; }
  .report { gap: 16px; font-size: 10.5pt; }

  /* A domain may span a page, but nothing inside it is cut in half: the heading stays with
     its finding, the uplift box and each evidence line stay whole, and no paragraph leaves
     a single line stranded. */
  .report-domain { break-inside: auto; }
  .report-domain > .row { break-inside: avoid; break-after: avoid; }
  .report-domain .step,
  .report-domain .evidence-intro,
  .report-meta tr,
  .overall { break-inside: avoid; }
  .report-domain .evidence-intro { break-after: avoid; }
  .checklist li { break-inside: avoid; }
  .report-section h2 { break-after: avoid; }
  /* The maturity table gets a page to itself. */
  .maturity-page { break-before: page; break-after: page; break-inside: avoid; }
  ul.limits li { break-inside: avoid; }
  .report-section.cta { background: #FFFFFF; color: var(--navy); border: 1px solid var(--navy); break-inside: avoid; }
  .report-foot { break-inside: avoid; }
  p, li { orphans: 2; widows: 2; }
  .lvl-chip, .overall { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* Method and limits, above the result. */
.limits-head {
  margin: 4px 0 0;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

ul.limits {
  margin: 0;
  padding-left: 18px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--ink-muted);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Session feedback */
.fb-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.fb-q {
  font-weight: 600;
  font-size: 15px;
}

.fb-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.fb-opt {
  appearance: none;
  padding: 10px 14px;
  min-height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--paper);
  color: var(--navy);
  font: inherit;
  font-size: 15px;
  cursor: pointer;
}

.fb-opt.on {
  background: var(--blue);
  border-color: var(--blue);
  color: #FFFFFF;
  font-weight: 600;
}
