/* Pen detective. Same look as the GLP-1 funnel (glp1.html): dark card UI,
   Playfair Display + DM Sans, mint / gold accents. External file on purpose:
   the page's Content-Security-Policy forbids inline styles. */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --blue: #1B5E8A; --green: #1A7A5E; --deep: #1C2B24; --gold: #F7C97A; --mint: #5DCAA5;
  --concern: #F0A878;            /* lighter than the site's terracotta so it passes contrast on --deep */
  --calm: #9BB8D6;               /* serious, quiet blue for the Pause screen */
  --text: #FFFFFF;
  --text-2: #D3DCD6;             /* body copy */
  --text-3: #B4C0B8;             /* hints, small print (>= 7:1 on --deep) */
  --card: rgba(255,255,255,0.06); --line: rgba(255,255,255,0.22);
  --focus: #F7C97A;
}
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { font-family: 'DM Sans', system-ui, sans-serif; background: var(--deep); color: var(--text); min-height: 100vh; overflow-x: hidden; line-height: 1.5; }
.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; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
[hidden] { display: none !important; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
h1:focus, h2:focus { outline: none; }          /* focus is moved here programmatically; it isn't a control */

.page { max-width: 520px; margin: 0 auto; padding: 0 20px 40px; min-height: 100vh; display: flex; flex-direction: column; }
.site-header { padding: 24px 0 18px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.logo { display: flex; align-items: center; justify-content: center; gap: 10px; text-decoration: none; color: inherit; min-height: 44px; min-width: 44px; }
.logo img { border-radius: 8px; display: block; }
.logo-name { font-family: 'Playfair Display', serif; font-size: 22px; font-weight: 900; letter-spacing: -0.5px; }
.logo-name .y { color: var(--gold); }
@media (max-width: 400px) { .logo-name { display: none; } }
.badge { display: flex; align-items: center; gap: 6px; background: rgba(26,122,94,0.22); border: 1px solid rgba(93,202,165,0.45); color: var(--mint); padding: 6px 12px; border-radius: 50px; font-size: 11px; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; }

main { flex: 1; display: flex; flex-direction: column; }
#screen { display: flex; flex-direction: column; flex: 1; }
.view { display: flex; flex-direction: column; flex: 1; animation: fade 0.25s ease both; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.draft { background: rgba(247,201,122,0.12); border: 1px solid rgba(247,201,122,0.5); color: var(--gold); border-radius: 14px; padding: 12px 16px; font-size: 13px; line-height: 1.6; margin-bottom: 18px; }

/* progress */
.progress { margin-bottom: 22px; }
.progress-top { display: flex; justify-content: space-between; margin-bottom: 8px; }
.progress-label { font-size: 13px; color: var(--mint); font-weight: 600; }
.progress-track { height: 6px; background: rgba(255,255,255,0.14); border-radius: 3px; overflow: hidden; }
.progress-fill { height: 100%; width: 0; border-radius: 3px; background: linear-gradient(90deg, var(--green), var(--mint)); transition: width 0.35s cubic-bezier(.4,0,.2,1); }

/* type */
.step-title { font-family: 'Playfair Display', serif; font-size: 27px; font-weight: 900; line-height: 1.18; letter-spacing: -0.5px; margin-bottom: 10px; }
.step-title .g { color: var(--mint); font-style: italic; }
.step-sub { font-size: 15px; color: var(--text-2); line-height: 1.6; margin-bottom: 24px; }
.hint { font-size: 14px; color: var(--text-3); line-height: 1.55; margin-bottom: 22px; }
.hint::before { content: "\1F50D\00a0"; }

/* intro */
.hero { display: flex; flex-direction: column; align-items: center; text-align: center; margin: 6px 0 4px; }
.mascot { width: 132px; height: 132px; margin-bottom: 8px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 18px 20px; margin-bottom: 14px; }
.card-title { font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--mint); margin-bottom: 10px; }
.card .privacy-main { font-family: 'Playfair Display', serif; font-size: 20px; font-weight: 900; line-height: 1.25; margin-bottom: 8px; }
.card p { font-size: 14px; color: var(--text-2); line-height: 1.6; }
.card p + p { margin-top: 6px; }
.btn-primary + .options { margin-top: 16px; }
.time { font-size: 13px; color: var(--text-3); text-align: center; margin-top: 10px; }

/* answer buttons */
.options { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.option { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 58px; text-align: left; background: var(--card); border: 1.5px solid var(--line); border-radius: 16px; padding: 14px 16px; color: var(--text); font: inherit; font-size: 15px; font-weight: 600; line-height: 1.35; cursor: pointer; transition: background 0.15s, border-color 0.15s; -webkit-tap-highlight-color: transparent; }
.option:hover { background: rgba(255,255,255,0.11); }
.option[aria-pressed="true"] { background: rgba(26,122,94,0.3); border-color: var(--mint); }
.option-text { flex: 1; }
.option-check { width: 24px; height: 24px; border-radius: 50%; border: 2px solid rgba(255,255,255,0.4); flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 13px; color: var(--deep); }
.option[aria-pressed="true"] .option-check { background: var(--mint); border-color: var(--mint); }
.option[aria-pressed="true"] .option-check::after { content: "\2713"; font-weight: 800; }
.option.notsure { background: transparent; border-style: dashed; color: var(--text-2); font-weight: 500; }
.option.notsure[aria-pressed="true"] { background: rgba(255,255,255,0.12); border-color: var(--text-2); border-style: solid; }

/* name question */
.field { margin-bottom: 18px; }
.field-label { display: block; font-size: 13px; font-weight: 700; color: var(--text-2); margin-bottom: 8px; }
.field-hint { font-size: 13px; color: var(--text-3); margin-top: 6px; }
.field-input { width: 100%; min-height: 52px; background: rgba(255,255,255,0.08); border: 1.5px solid var(--line); border-radius: 14px; padding: 12px 16px; font: inherit; font-size: 16px; color: var(--text); -webkit-appearance: none; appearance: none; }
select.field-input { background-image: linear-gradient(45deg, transparent 50%, #D3DCD6 50%), linear-gradient(135deg, #D3DCD6 50%, transparent 50%); background-position: calc(100% - 22px) 50%, calc(100% - 16px) 50%; background-size: 6px 6px, 6px 6px; background-repeat: no-repeat; padding-right: 40px; }
select.field-input option { color: #111; background: #fff; }
.field-input::placeholder { color: var(--text-3); }
.note { background: rgba(247,201,122,0.1); border: 1px solid rgba(247,201,122,0.4); color: var(--gold); border-radius: 12px; padding: 10px 14px; font-size: 13px; line-height: 1.55; margin-bottom: 16px; }

/* buttons */
.btn-primary { width: 100%; min-height: 54px; padding: 15px; background: var(--green); color: #fff; border: 0; border-radius: 16px; font: inherit; font-size: 16px; font-weight: 700; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 8px; transition: background 0.15s; text-decoration: none; }
.btn-primary:hover { background: #1e8c6a; }
.btn-primary:disabled { background: rgba(255,255,255,0.12); color: var(--text-3); cursor: not-allowed; }
.btn-secondary { width: 100%; min-height: 50px; padding: 12px; background: transparent; color: var(--text); border: 1.5px solid var(--line); border-radius: 14px; font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; margin-top: 10px; text-decoration: none; display: flex; align-items: center; justify-content: center; }
.btn-secondary:hover { background: rgba(255,255,255,0.08); }
.btn-back { width: 100%; min-height: 48px; padding: 12px; background: transparent; border: 0; color: var(--text-2); font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; margin-top: 8px; text-decoration: underline; text-underline-offset: 3px; }
.nav { margin-top: auto; padding-top: 10px; }

/* analysing */
.analysing { align-items: center; text-align: center; padding-top: 48px; }
.analysing .mascot { width: 120px; height: 120px; }
.analysing-track { width: 70%; height: 6px; background: rgba(255,255,255,0.14); border-radius: 3px; overflow: hidden; margin: 18px auto 0; }
.analysing-fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--green), var(--mint)); border-radius: 3px; transition: width 1.3s ease-out; }

/* results */
.result-top { display: flex; flex-direction: column; align-items: flex-start; margin-bottom: 4px; }
.result-icon { width: 76px; height: 76px; margin-bottom: 10px; }
.sparkles { color: var(--gold); font-size: 20px; letter-spacing: 6px; margin-bottom: 6px; }
.lead { font-size: 17px; color: var(--text); line-height: 1.5; margin-bottom: 20px; }
.result-card { border-radius: 18px; padding: 18px 20px; margin-bottom: 14px; background: var(--card); border: 1px solid var(--line); }
.result-card h2 { font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 12px; color: var(--mint); }
.result-strong .result-card h2 { color: var(--mint); }
.result-mixed .result-card h2 { color: var(--gold); }
.result-weak .result-card h2 { color: var(--concern); }
.result-pause .result-card h2 { color: var(--calm); }
.list { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.list li { position: relative; padding-left: 20px; font-size: 15px; color: var(--text-2); line-height: 1.55; }
.list li::before { content: ""; position: absolute; left: 2px; top: 0.6em; width: 7px; height: 7px; border-radius: 50%; background: var(--mint); }
.list li.concern::before { background: var(--concern); }
ol.list { counter-reset: s; }
ol.list li { padding-left: 30px; }
ol.list li::before { counter-increment: s; content: counter(s); width: 22px; height: 22px; border-radius: 50%; top: 0.1em; left: 0; background: rgba(255,255,255,0.14); color: var(--text); font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.hints-line { border-left: 4px solid var(--gold); background: rgba(247,201,122,0.1); border-radius: 0 12px 12px 0; padding: 12px 16px; font-size: 14px; font-weight: 600; color: var(--text); line-height: 1.55; margin: 6px 0 14px; }
.cant-confirm { margin: 0 0 14px; }
.result-card + .btn-primary { margin-bottom: 14px; }
.warn { background: rgba(240,168,120,0.12); border: 1px solid rgba(240,168,120,0.5); color: var(--text); border-radius: 12px; padding: 12px 16px; font-size: 14px; line-height: 1.55; margin-bottom: 14px; }
.soft-line { display: flex; flex-wrap: wrap; align-items: center; column-gap: 6px; font-size: 14px; color: var(--text-3); margin: 0 0 8px; }
.soft-line a { display: inline-flex; align-items: center; min-height: 44px; color: var(--mint); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.share-card { display: flex; align-items: center; gap: 12px; background: rgba(255,255,255,0.06); border: 1px dashed var(--line); border-radius: 16px; padding: 12px 16px; margin-bottom: 4px; }
.share-card svg { width: 44px; height: 44px; flex-shrink: 0; }
.share-card strong { display: block; font-size: 15px; }
.share-card span { font-size: 13px; color: var(--text-3); word-break: break-all; }

/* doctor suggestions: three small cards in a row */
.doctors-slot:empty { display: none; }
.doctors .doctors-title { font-family: 'Playfair Display', serif; font-size: 18px; font-weight: 900; letter-spacing: -0.2px; text-transform: none; color: var(--text); margin-bottom: 6px; }
.doctors-text { font-size: 14px; color: var(--text-2); line-height: 1.55; }
.doctor-cards { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 14px 0 10px; }
.doctor-card { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; height: 100%; padding: 8px 6px; text-align: left; background: rgba(255,255,255,0.06); border: 1px solid var(--line); border-radius: 12px; color: var(--text); font: inherit; cursor: pointer; }
.doctor-card:hover { background: rgba(255,255,255,0.11); }
.doctor-card[aria-busy="true"] { opacity: 0.6; cursor: progress; }
.doc-top { display: flex; align-items: center; gap: 6px; width: 100%; min-width: 0; margin-bottom: 4px; }
.doc-avatar { width: 26px; height: 26px; border-radius: 50%; overflow: hidden; filter: blur(2.5px); flex-shrink: 0; }
.doc-avatar svg { width: 100%; height: 100%; display: block; }
.doc-mask { flex: 1; min-width: 0; font-size: 11px; line-height: 1.3; color: var(--text-2); filter: blur(4px); user-select: none; -webkit-user-select: none; overflow: hidden; white-space: nowrap; }
.doc-spec { font-size: 10.5px; letter-spacing: -0.1px; font-weight: 700; line-height: 1.25; overflow-wrap: break-word; hyphens: auto; max-width: 100%; }
.doc-cadre { font-size: 11px; color: var(--mint); line-height: 1.25; overflow-wrap: break-word; hyphens: auto; max-width: 100%; }
.doc-where { font-size: 11px; color: var(--text-3); line-height: 1.3; margin-top: auto; padding-top: 6px; overflow-wrap: break-word; max-width: 100%; }
.doctors-hint { font-size: 12.5px; color: var(--text-3); line-height: 1.5; }
.doctors-status { font-size: 13px; color: var(--text); margin-top: 8px; }
.doctors-status a { color: var(--mint); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 340px) { .doctor-cards { gap: 4px; } .doctor-card { padding: 6px 4px; } }

.go::after { content: "\00a0\2192"; }

/* Pause: calm and serious. No animation, no jokes, no mascot. */
.result-pause, .result-pause * { animation: none !important; transition: none !important; }
.result-pause .step-title { color: var(--text); }

.site-footer { margin-top: 28px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,0.14); }
.site-footer p { font-size: 12px; color: var(--text-3); line-height: 1.6; text-align: center; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media (prefers-contrast: more) { :root { --line: rgba(255,255,255,0.6); --text-2: #fff; --text-3: #fff; } }
@media (min-width: 480px) { .step-title { font-size: 30px; } }
