/* Rylo Accounting Checkup — mobile-first styles.
   Colors and fonts follow the Rylo Branding Guidelines v1.0:
   Primary PMS 7476 #165558 · Secondary #F5F5F5, #7CA8AD, #FAAD64, #D6F4F8, #E4E5D1
   Headline font Libre Franklin · Body font Inter */
:root {
  --teal-900: #0F3E41;   /* darker shade of the primary, for hover/text */
  --teal-800: #165558;   /* PMS 7476 — primary */
  --teal-600: #2A6D71;   /* readable mid-teal for small text on white */
  --sage:     #7CA8AD;   /* PMS 5493 */
  --teal-100: #D6F4F8;   /* PMS 7457 */
  --teal-50:  #EEFAFC;
  --sand:     #E4E5D1;   /* PMS 7527 */
  --accent:   #FAAD64;   /* PMS 2017 */
  --font-head: "Libre Franklin", "Segoe UI", Arial, sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --ink:      #16262A;
  --muted:    #5B6D71;
  --line:     #D6E2E4;
  --bg:       #F5F5F5;   /* PMS Cool Gray 1 */
  --card:     #FFFFFF;
  /* Rating badges: text is always written out; colours meet 4.5:1 contrast. */
  --band-strong: #2B7A5F;
  --band-watch: #F3D98B;
  --band-meaningful: #A9500F;
  --band-priority: #A3302A;
  --radius: 14px;
  --tap: 56px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  min-height: 100vh;
}
.wrap { max-width: 560px; margin: 0 auto; padding: 0 16px; }

/* Top bar */
.topbar { background: var(--teal-800); color: #fff; position: sticky; top: 0; z-index: 5; }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; height: 56px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-logo { height: 28px; width: auto; display: block; }
.brand-note { font-family: var(--font-head); font-weight: 500; font-size: 15px; opacity: .9; }
.back {
  background: transparent; border: 0; color: #fff; font: inherit; font-size: 16px;
  padding: 10px 4px; cursor: pointer; min-height: 44px;
}
.progress { height: 4px; background: var(--teal-900); }
h1, h2, h3, .eyebrow, .btn { font-family: var(--font-head); }
.progress-bar { height: 100%; width: 0; background: var(--accent); transition: width .25s ease; }

main.wrap { padding-top: 28px; padding-bottom: 48px; }
main:focus { outline: none; }

/* Type */
.eyebrow { color: var(--teal-600); font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; margin: 0 0 8px; }
h1 { font-size: 28px; line-height: 1.2; font-weight: 600; letter-spacing: -.2px; margin: 0 0 12px; color: var(--teal-900); }
h2 { font-size: 22px; line-height: 1.3; font-weight: 600; margin: 0 0 16px; color: var(--teal-900); }
h3 { font-size: 17px; font-weight: 600; margin: 0 0 8px; color: var(--teal-900); }
p { margin: 0 0 16px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
h1:focus, h2:focus { outline: none; }

/* Landing */
.hero { background: var(--teal-800); color: #fff; border-radius: var(--radius); padding: 28px 22px; margin-bottom: 20px; }
.hero h1 { color: #fff; font-size: 30px; }
.hero .eyebrow { color: var(--accent); }
.hero p { color: #E6F2F2; }
.checklist { list-style: none; padding: 0; margin: 0 0 24px; }
.checklist li { padding: 10px 0 10px 34px; position: relative; border-bottom: 1px solid var(--line); }
.checklist li:last-child { border-bottom: 0; }
.checklist li::before {
  content: "✓"; position: absolute; left: 0; top: 10px; width: 24px; height: 24px; border-radius: 50%;
  background: var(--teal-100); color: var(--teal-800); font-weight: 800; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
}

/* Buttons */
.btn {
  display: flex; align-items: center; justify-content: center; width: 100%; min-height: var(--tap);
  border: 0; border-radius: 12px; font-weight: 600; font-size: 18px; cursor: pointer;
  background: var(--teal-800); color: #fff; padding: 14px 20px; text-decoration: none;
}
.btn:hover { background: var(--teal-900); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-accent { background: var(--accent); color: var(--teal-900); }
.btn-accent:hover { background: #F49B4A; }
.btn-ghost { background: transparent; color: var(--teal-800); border: 2px solid var(--teal-800); }
.btn-ghost:hover { background: var(--teal-50); }
.link { background: none; border: 0; color: var(--teal-600); font: inherit; text-decoration: underline; cursor: pointer; padding: 8px 0; }

/* Question screens */
.qmeta { font-size: 14px; color: var(--muted); font-weight: 600; margin-bottom: 8px; }
.options { display: grid; gap: 10px; margin-bottom: 20px; }
.options.grid { grid-template-columns: 1fr 1fr; }
.option {
  display: flex; align-items: flex-start; gap: 12px; width: 100%; min-height: var(--tap); text-align: left;
  background: var(--card); border: 2px solid var(--line); border-radius: 12px; padding: 14px 16px;
  font: inherit; font-size: 16px; color: var(--ink); cursor: pointer; transition: border-color .12s, background .12s;
}
.options.grid .option { align-items: center; justify-content: center; text-align: center; font-weight: 600; }
.option:hover { border-color: var(--teal-600); }
.option[aria-pressed="true"], .option[aria-checked="true"] { border-color: var(--teal-800); background: var(--teal-50); }
.option .key {
  flex: 0 0 28px; height: 28px; border-radius: 50%; background: var(--teal-100); color: var(--teal-800);
  font-weight: 800; font-size: 14px; display: flex; align-items: center; justify-content: center; margin-top: 1px;
}
.option[aria-pressed="true"] .key, .option[aria-checked="true"] .key { background: var(--teal-800); color: #fff; }
.option .box {
  flex: 0 0 24px; height: 24px; border-radius: 6px; border: 2px solid var(--teal-600); margin-top: 1px;
  display: flex; align-items: center; justify-content: center; color: #fff; font-size: 15px; font-weight: 800;
}
.option[aria-checked="true"] .box { background: var(--teal-800); border-color: var(--teal-800); }
.option[aria-checked="true"] .box::after { content: "✓"; }

/* Result */
.result-hero { background: var(--teal-800); color: #fff; border-radius: var(--radius); padding: 24px 22px; margin-bottom: 20px; }
.result-hero .eyebrow { color: var(--accent); }
.result-hero h1 { color: #fff; }
.result-hero p { color: #E6F2F2; margin: 0; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 16px; }
.bullets { margin: 0; padding-left: 20px; }
.bullets li { margin-bottom: 8px; }
.bullets li:last-child { margin-bottom: 0; }
.told li { color: var(--ink); }
.secondary { border-left: 5px solid var(--accent); }
.snapshot { list-style: none; margin: 0; padding: 0; }
.snapshot li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.snapshot li:last-child { border-bottom: 0; }
.pill { font-size: 13px; font-weight: 700; padding: 4px 10px; border-radius: 999px; white-space: nowrap; color: #fff; }
.pill.strong { background: var(--band-strong); }
.pill.watch { background: var(--band-watch); color: #2b2205; }
.pill.meaningful { background: var(--band-meaningful); }
.pill.priority { background: var(--band-priority); }
.pill.unconfirmed { background: #fff; color: var(--teal-900); border: 2px dashed var(--teal-600); padding: 2px 8px; }
.pill { display: inline-block; vertical-align: middle; }

/* Version 3 result: what's working, next idea, talk + booth */
.result-hero .hero-sub { color: var(--accent); font-size: 15px; text-transform: uppercase; letter-spacing: .6px; margin: 14px 0 6px; }
.result-hero ul.working { list-style: none; padding: 0; margin: 6px 0 0; }
.result-hero ul.working li { position: relative; padding: 6px 0 6px 30px; color: #fff; }
.result-hero ul.working li::before {
  content: "✓"; position: absolute; left: 0; top: 7px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--accent); color: var(--teal-900); font-weight: 800; font-size: 13px;
  display: flex; align-items: center; justify-content: center;
}
.result-hero p:last-child { margin-bottom: 0; }
.next-card { border-left: 5px solid var(--teal-600); }
.next-card h2 { font-size: 20px; margin: 0 0 10px; }
.talk-card { background: var(--teal-50); border: 2px solid var(--teal-100); }
.talk-card .btn { margin-top: 4px; }
.booth { font-weight: 700; color: var(--teal-800); text-align: center; margin: 14px 0 0; }

/* "Something else" note on the optional checklist */
.other-wrap { margin: -2px 0 2px; }
.other-wrap textarea {
  width: 100%; min-height: 64px; border: 2px solid var(--teal-800); border-radius: 12px; padding: 12px 14px;
  font: inherit; font-size: 16px; color: var(--ink); background: #fff; resize: vertical;
}
.other-wrap textarea:focus { outline: none; box-shadow: 0 0 0 3px var(--teal-100); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Question help + restart notice */
.qhelp { color: var(--muted); font-size: 15px; margin: -6px 0 16px; }
.notice { background: var(--teal-100); border-radius: 10px; padding: 12px 14px; font-size: 15px; }

/* Result report */
.rating-line { margin: 0 0 8px; }
.rating-label { font-weight: 600; color: #fff; }
.result-hero .rating-def { font-size: 15px; margin: 0 0 12px; opacity: .95; }
.result-hero p + p { margin-top: 0; }
.notice-card { border-left: 5px solid var(--teal-600); }
.step-card { border-left: 5px solid var(--accent); }
.rating-key { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 10px 12px; align-items: start; font-size: 15px; }
.rating-key dt { margin: 0; }
.rating-key dd { margin: 0; }
.areas-heading { margin: 28px 0 12px; }
.area h3 { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.area h4 { font-family: var(--font-head); font-size: 15px; color: var(--teal-800); margin: 14px 0 6px; }
.area p { margin-bottom: 8px; }
.review-desc { display: block; color: var(--muted); font-size: 14px; margin-top: 4px; }

/* CTA / form */
.cta { background: var(--teal-50); border: 2px solid var(--teal-100); }
.field { margin-bottom: 14px; }
.name-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.test-banner { background: var(--sand); color: var(--teal-900); font-size: 14px; text-align: center; padding: 8px 16px; }
.test-banner a { color: var(--teal-800); font-weight: 600; }
.field label, .field legend { display: block; font-weight: 600; font-size: 15px; margin-bottom: 6px; }
.field input[type=text], .field input[type=email] {
  width: 100%; min-height: 50px; border: 2px solid var(--line); border-radius: 10px; padding: 10px 12px;
  font: inherit; font-size: 17px; background: #fff; color: var(--ink);
}
.field input:focus { outline: none; border-color: var(--teal-600); }
fieldset { border: 0; padding: 0; margin: 0 0 16px; }
.radio { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 8px 12px; border: 2px solid var(--line); border-radius: 10px; margin-bottom: 8px; background: #fff; cursor: pointer; font-size: 16px; }
.radio input { width: 20px; height: 20px; accent-color: var(--teal-800); margin: 0; }
.radio:has(input:checked) { border-color: var(--teal-800); background: #fff; }
.radio.check { align-items: flex-start; font-size: 15px; margin: 4px 0 16px; }
.radio.check input { flex: 0 0 20px; margin-top: 2px; }
.error { color: var(--band-priority); font-size: 14px; margin: -6px 0 12px; }
.actions { display: grid; gap: 10px; margin-top: 8px; }
.footer-note { font-size: 13px; color: var(--muted); text-align: center; margin-top: 20px; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

@media (min-width: 600px) {
  h1 { font-size: 32px; }
  .hero h1 { font-size: 36px; }
  main.wrap { padding-top: 40px; }
}

@media print {
  .topbar, .cta, .actions, .no-print, .test-banner { display: none !important; }
  .card, .area, .result-hero, .rating-key { break-inside: avoid; page-break-inside: avoid; }
  .result-hero .rating-label { color: var(--ink); }
  .areas-start { break-inside: avoid; page-break-inside: avoid; }
  /* Use the full page width and a compact size so each area fits on a page. */
  @page { margin: 14mm; }
  main.wrap { max-width: none; padding: 0; }
  body { font-size: 12.5px; }
  h1 { font-size: 22px; } h2 { font-size: 18px; } h3 { font-size: 14px; }
  .card { padding: 12px 14px; margin-bottom: 10px; }
  .bullets li { margin-bottom: 3px; }
  .area h4 { margin: 8px 0 3px; font-size: 12.5px; }
  .pill { border: 1px solid #333; }
  body { background: #fff; }
  .result-hero { background: #fff; color: var(--ink); border: 2px solid var(--teal-800); }
  .result-hero h1, .result-hero p { color: var(--ink); }
}
