/* ==========================================================
   Map My ADHD Profile — styles for the question and results pages.
   Loaded after ../mkc-pages.css, which supplies colours and type.
   Designed for a phone first; widens on larger screens.
   ========================================================== */
.profile-wrap { max-width: 720px; margin: 0 auto; padding: 110px 20px 70px; }
.profile-wrap h1 { font-size: 2.1rem; margin-bottom: 0.4em; }
.profile-intro { color: var(--ink-muted); margin-bottom: 1.6rem; }
.plain-note { background: var(--white); border-left: 4px solid var(--warm-gold); border-radius: 0 10px 10px 0; padding: 18px 22px; margin: 1.4rem 0; font-size: 0.96rem; }
.plain-note p:last-child { margin-bottom: 0; }

/* ---------- Age confirmation and start buttons ---------- */
.age-check { display: flex; gap: 12px; align-items: flex-start; background: var(--white); border: 1.5px solid var(--pebble); border-radius: 10px; padding: 18px 20px; margin: 1.6rem 0 1.2rem; cursor: pointer; font-weight: 500; }
.age-check input { width: 22px; height: 22px; margin-top: 2px; accent-color: var(--wine-dark); flex-shrink: 0; }
.start-choices { display: grid; gap: 12px; }
.start-choices .btn { justify-content: center; text-align: center; padding: 16px 20px; }
.start-choices .btn small { display: block; font-weight: 400; opacity: 0.85; font-size: 0.82rem; }
.btn[aria-disabled="true"] { opacity: 0.45; cursor: not-allowed; }
.start-hint { font-size: 0.88rem; color: var(--ink-muted); min-height: 1.5em; margin-top: 10px; }

/* ---------- Progress ---------- */
.progress { margin-bottom: 1.6rem; }
.progress-text { display: flex; justify-content: space-between; font-size: 0.82rem; color: var(--ink-muted); margin-bottom: 8px; }
.progress-track { height: 6px; background: var(--pebble); border-radius: 100px; overflow: hidden; }
.progress-fill { height: 100%; width: 0; background: var(--warm-gold); border-radius: 100px; transition: width 0.4s ease; }

/* ---------- One statement ---------- */
.q { border: 0; padding: 0; margin: 0 0 14px; background: var(--white); border-radius: 12px; border: 1px solid var(--pebble); padding: 20px 18px 16px; min-width: 0; }
.q legend { float: left; width: 100%; font-family: var(--font-heading); font-size: 1.25rem; line-height: 1.4; color: var(--anthracite); margin-bottom: 14px; padding: 0; }
.q-options { clear: both; display: grid; gap: 8px; }
.q-option { position: relative; }
.q-option input { position: absolute; opacity: 0; width: 100%; height: 100%; inset: 0; margin: 0; cursor: pointer; }
.q-option span {
  display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 10px 14px;
  border: 1.5px solid var(--pebble); border-radius: 8px; font-size: 0.95rem; color: var(--body-text);
  background: var(--warm-white); transition: border-color 0.2s ease, background 0.2s ease;
}
.q-option span::before { content: ''; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--slate-blue); flex-shrink: 0; background: var(--white); }
.q-option input:checked + span { border-color: var(--wine-dark); background: #EEF0F3; font-weight: 500; }
.q-option input:checked + span::before { border-color: var(--wine-dark); background: var(--wine-dark); box-shadow: inset 0 0 0 3px var(--white); }
.q-option input:focus-visible + span { outline: 2px solid var(--warm-gold); outline-offset: 2px; }
.q-option.is-na span { background: transparent; border-style: dashed; color: var(--ink-muted); }

/* context questions reuse the same option look, with checkboxes for "tick any" */
.q-option.is-check span::before { border-radius: 4px; }

/* ---------- Back / Next ---------- */
.q-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 24px; }
.q-nav .btn { flex: 1; justify-content: center; }
.q-nav .btn-back { flex: 0 0 auto; }
.q-skip-note { font-size: 0.86rem; color: var(--ink-muted); margin-top: 14px; text-align: center; }
.q-privacy { font-size: 0.82rem; color: var(--ink-muted); text-align: center; margin-top: 28px; }

@media (min-width: 700px) {
  .profile-wrap { padding-top: 130px; }
  .profile-wrap h1 { font-size: 2.5rem; }
  .start-choices { grid-template-columns: 1fr 1fr; }
  .q { padding: 26px 26px 22px; }
  .q-options.is-scale { grid-template-columns: repeat(5, 1fr); }
  .q-options.is-scale .q-option span { flex-direction: column; text-align: center; justify-content: center; gap: 8px; min-height: 84px; font-size: 0.86rem; padding: 12px 6px; }
  .q-options.is-scale .q-option.is-na { grid-column: 1 / -1; }
  .q-options.is-scale .q-option.is-na span { flex-direction: row; min-height: 44px; }
  .q-options.is-two-col { grid-template-columns: 1fr 1fr; }
}

/* ==========================================================
   Results page
   ========================================================== */
.r-not-diagnosis { font-size: 0.9rem; color: var(--ink-muted); border-bottom: 1px solid var(--pebble); padding-bottom: 1.2rem; }
.r-section { margin-top: 2.6rem; }
.r-section h2 { font-size: 1.7rem; }
.r-strength { font-family: var(--font-heading); font-size: 1.3rem; line-height: 1.5; color: var(--anthracite); background: var(--white); border-left: 4px solid var(--warm-gold); border-radius: 0 10px 10px 0; padding: 16px 20px; margin-bottom: 12px; }

.r-bars { list-style: none; margin: 1.2rem 0 0; }
.r-bar { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "name band" "track track"; gap: 4px 12px; margin: 0 0 14px; align-items: baseline; }
.r-bar-name { grid-area: name; font-weight: 500; font-size: 0.95rem; }
.r-bar-band { grid-area: band; font-size: 0.76rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-muted); }
.r-bar-track { grid-area: track; display: block; height: 12px; background: var(--pebble); border-radius: 100px; overflow: hidden; }
.r-bar-fill { display: block; height: 100%; border-radius: 100px; background: var(--slate-blue); }
.r-present .r-bar-fill { background: var(--warm-gold); }
.r-strong .r-bar-fill { background: var(--wine-dark); }
.r-strong .r-bar-band { color: var(--anthracite); }
.r-none .r-bar-band { text-transform: none; letter-spacing: 0; font-weight: 400; }

.r-fingerprint { font-family: var(--font-heading); font-size: 1.45rem; line-height: 1.45; color: var(--anthracite); }
.r-panel, .r-pattern, .r-route { background: var(--white); border: 1px solid var(--pebble); border-radius: 12px; padding: 22px 22px 18px; margin-bottom: 14px; }
.r-panel-label { display: block; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold-text); margin-bottom: 6px; }
.r-panel h3, .r-pattern h3 { font-size: 1.35rem; }
.r-panel ul, .r-points { margin-bottom: 0; }
.r-panel p, .r-pattern p, .r-route p, .r-panel li, .r-points li { font-size: 0.96rem; }
.r-start { margin-bottom: 0.5em; }
.r-more { margin-bottom: 0; font-size: 0.9rem; }
.r-invite { font-family: var(--font-heading); font-style: italic; font-size: 1.2rem; color: var(--wine-dark); margin-top: 1rem; }
.r-note { background: var(--white); border-left: 4px solid var(--slate-blue); border-radius: 0 10px 10px 0; padding: 16px 20px; margin-bottom: 12px; }
.r-note p { margin: 0; font-size: 0.96rem; }
.r-route h3 { font-size: 1.25rem; }
.r-route p:last-child { margin-bottom: 0; }
.r-support { margin-top: 2.2rem; border: 1px solid rgba(92,101,118,0.35); background: var(--white); border-radius: 12px; padding: 20px 22px; }
.r-support h3 { font-size: 1.2rem; }
.r-support p { margin: 0; font-size: 0.96rem; }
.r-support.is-high { margin-top: 1rem; }
.r-actions { display: grid; gap: 10px; margin-top: 2.2rem; }
.r-actions .btn { justify-content: center; }
.r-print-footer { display: none; }

@media (min-width: 700px) {
  .r-bar { grid-template-columns: 210px 1fr 150px; grid-template-areas: "name track band"; align-items: center; }
  .r-bar-band { text-align: right; }
  .r-actions { grid-template-columns: repeat(3, 1fr); }
  .r-panel, .r-pattern, .r-route { padding: 26px 28px 22px; }
}

@media print {
  .no-print, .skip-link, .progress, .q-privacy { display: none !important; }
  body { background: #fff; font-size: 10pt; line-height: 1.4; }
  .profile-wrap { padding: 0; max-width: none; }
  .profile-wrap h1 { font-size: 17pt; margin-bottom: 2pt; }
  .r-section { margin-top: 9pt; }
  .r-section h2 { font-size: 13pt; margin-bottom: 3pt; }
  .r-strength, .r-fingerprint { font-size: 12pt; padding: 6pt 10pt; margin-bottom: 4pt; }
  .r-fingerprint { padding-left: 0; }
  .r-bar { grid-template-columns: 150pt 1fr 90pt; grid-template-areas: "name track band"; margin-bottom: 4pt; align-items: center; }
  .r-bar-track { height: 7pt; }
  .r-bar-fill, .r-bar-track { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .r-panel, .r-pattern, .r-route, .r-note, .r-support { padding: 7pt 10pt; margin-bottom: 5pt; break-inside: avoid; }
  .r-panel h3, .r-pattern h3, .r-route h3, .r-support h3 { font-size: 11.5pt; margin-bottom: 2pt; }
  .r-panel p, .r-pattern p, .r-route p, .r-panel li, .r-points li, .r-note p, .r-support p { font-size: 9.5pt; margin-bottom: 3pt; }
  .r-panel ul, .r-points { margin-bottom: 0; } .r-panel li, .r-points li { margin-bottom: 1pt; }
  .r-more { display: none; }
  /* cards sit two abreast on paper so a typical result fits two pages */
  #fingerprint, #pattern, #next { display: grid; grid-template-columns: 1fr 1fr; column-gap: 6pt; }
  #fingerprint > *, #pattern > *, #next > * { grid-column: 1 / -1; }
  #fingerprint > .r-panel, #pattern > .r-pattern { grid-column: auto; }
  #next { grid-template-columns: 1fr 1fr 1fr; }
  #next > .r-route { grid-column: auto; }
  .r-support.is-high ~ .r-support { display: none; }   /* the support line prints once */
  .section-label { margin-bottom: 2pt; }
  .r-not-diagnosis { padding-bottom: 5pt; margin-bottom: 0; font-size: 9pt; }
  .r-bars { margin-top: 4pt; }
  .r-invite { font-size: 11pt; margin: 3pt 0; }
  .r-support, .r-support.is-high { margin-top: 5pt; }
  p { margin-bottom: 4pt; }
  .r-print-footer { display: block; margin-top: 12pt; padding-top: 6pt; border-top: 1px solid #999; font-size: 8pt; color: #444; text-align: center; }
  @page { margin: 12mm; }
}
