/* =========================================================================
   Gennie — The Life Decoder :: styles.css
   Modern-premium minimal: off-white canvas, charcoal ink, one bold accent,
   Inter for UI + Fraunces for display moments. Mobile-first.
   ========================================================================= */

:root {
  color-scheme: light;
  --bg: #F3F1EC;
  --surface: #FFFFFF;
  --surface-2: #FBFAF7;
  --ink: #1A1917;
  --muted: #6B6760;
  --faint: #9C988F;
  --line: #E8E4DC;
  --line-strong: #D9D4C9;
  --accent: #5A47D6;
  --accent-strong: #4636B6;
  --accent-soft: #EFEDFB;
  --accent-ink: #2E2570;
  --gold: #C99A3B;
  --good: #3F7A59;
  --r: 16px;
  --r-sm: 11px;
  --r-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(26,25,23,.05);
  --shadow: 0 10px 30px -12px rgba(26,25,23,.16), 0 2px 6px rgba(26,25,23,.04);
  --shadow-lg: 0 28px 60px -22px rgba(46,37,112,.30);
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-serif: "Fraunces", Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background:
    radial-gradient(1200px 600px at 50% -200px, #FBF9F4 0%, rgba(251,249,244,0) 60%),
    var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
.wrap { max-width: 660px; margin: 0 auto; padding: 28px 20px 96px; }

/* ---------- hero ---------- */
.hero { text-align: center; padding: 40px 8px 26px; }
.hero .mark { width: 60px; height: 60px; margin: 0 auto 18px; display: block; }
.hero .wordmark {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 19px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}
.hero .tagline {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(34px, 7vw, 50px);
  line-height: 1.04;
  letter-spacing: -0.02em;
  margin: 0 0 14px;
  color: var(--ink);
}
.hero .lede {
  max-width: 30rem;
  margin: 0 auto;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
}
.hero .lede em { color: var(--ink); font-style: italic; }

/* ---------- card ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 26px 26px 24px;
  margin-bottom: 22px;
  box-shadow: var(--shadow);
}

/* ---------- form ---------- */
.row { margin-bottom: 18px; }
label { display: block; font-weight: 600; font-size: 13.5px; margin: 0 0 7px; color: var(--ink); }
.hint { font-weight: 400; color: var(--faint); font-size: 12px; }

input[type=date], input[type=text], select {
  width: 100%;
  padding: 12px 13px;
  font-size: 15px;
  font-family: inherit;
  color: var(--ink);
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
input[type=date]:hover, input[type=text]:hover, select:hover { border-color: #C7C1B4; }
input[type=date]:focus, input[type=text]:focus, select:focus {
  outline: none;
  background: var(--surface);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
input::placeholder { color: #B6B1A6; }

select {
  appearance: none; -webkit-appearance: none;
  padding-right: 38px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%236B6760' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
}

.ev-row, .kid-row { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.ev-row .ev-label { flex: 1.7; }
.ev-row input[type=date], .kid-row input[type=date] { flex: 1; min-width: 0; }
.kid-row select { width: auto; min-width: 100px; flex: 0 0 auto; }

.mini-btn {
  border: 1px solid var(--line-strong);
  background: var(--surface);
  border-radius: var(--r-sm);
  padding: 9px 13px;
  cursor: pointer;
  font-size: 13px;
  font-family: inherit;
  font-weight: 500;
  color: var(--accent);
  transition: background .15s ease, border-color .15s ease, transform .05s ease;
}
.mini-btn:hover { background: var(--accent-soft); border-color: #C9C2EF; }
.mini-btn:active { transform: translateY(1px); }

/* sliders */
input[type=range] { width: 100%; accent-color: var(--accent); margin: 8px 0 0; cursor: pointer; }
input[type=range]:disabled, input[type=range].muted { opacity: .4; }
.pol-scale { display: flex; justify-content: space-between; align-items: center; font-size: 11.5px; color: var(--faint); margin-top: 7px; }
.pol-label { font-weight: 700; color: var(--accent); font-size: 13px; }

/* skip + save toggles */
.skip, .save, .deep { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--muted); }
.skip { margin-top: 9px; }
.save { margin-top: 18px; font-weight: 500; }
.skip input, .save input, .deep input { width: auto; accent-color: var(--accent); }

/* expander */
.more { margin: 6px 0 8px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.more > summary {
  cursor: pointer; list-style: none;
  font-weight: 600; font-size: 14px; color: var(--accent);
  padding: 14px 2px; display: flex; align-items: center; gap: 9px;
}
.more > summary::-webkit-details-marker { display: none; }
.more > summary::before {
  content: "+"; display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 15px; line-height: 1;
}
.more[open] > summary::before { content: "\2013"; }
.more[open] > summary { margin-bottom: 8px; }

/* primary button */
.go {
  width: 100%;
  padding: 15px;
  font-size: 16px;
  font-weight: 600;
  font-family: inherit;
  letter-spacing: .01em;
  color: #fff;
  background: var(--accent);
  border: none;
  border-radius: var(--r-sm);
  cursor: pointer;
  margin-top: 14px;
  box-shadow: 0 8px 20px -8px rgba(90,71,214,.6);
  transition: background .15s ease, transform .06s ease, box-shadow .15s ease;
}
.go:hover { background: var(--accent-strong); box-shadow: 0 10px 24px -8px rgba(90,71,214,.7); }
.go:active { transform: translateY(1px); }
.go:disabled { opacity: .6; cursor: default; box-shadow: none; }
/* While decoding, the Decode button itself IS the loading bar: a shimmer sweeps across it. */
.go.loading { opacity: 1; cursor: progress; position: relative; overflow: hidden; box-shadow: 0 8px 20px -8px rgba(90,71,214,.6); }
.go.loading::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,.32), transparent); transform: translateX(-100%); animation: gShimmer 1.1s ease-in-out infinite; pointer-events: none; }
@keyframes gShimmer { 0% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }
.cf-turnstile { margin: 2px 0 14px; min-height: 0; }
.build-tag { text-align: center; color: var(--faint); font-size: 11px; letter-spacing: .03em; margin: 20px 0 4px; }
.copyright { text-align: center; color: var(--faint); font-size: 11.5px; margin: 10px 0 0; }
.legal-copy { color: var(--faint) !important; font-size: 12px !important; margin: 14px 0 0 !important; }
/* Clean footer: tiny links that open the privacy/terms modal, keeping the small print off the page. */
.site-foot { text-align: center; margin-top: 30px; padding-top: 16px; border-top: 1px solid var(--line); }
.link-btn { background: none; border: 0; padding: 0; font: inherit; font-size: 12.5px; color: var(--muted); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.link-btn:hover { color: var(--ink); }
.site-foot .dot { color: var(--faint); margin: 0 8px; font-size: 12px; }
.modal[hidden] { display: none; }
.modal { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal-overlay { position: absolute; inset: 0; background: rgba(26,25,23,.45); }
.modal-card { position: relative; background: var(--surface); width: 100%; max-width: 540px; max-height: 82vh; overflow: auto; border-radius: var(--r); padding: 30px 30px 26px; box-shadow: var(--shadow-lg); }
.modal-title { font-family: var(--font-serif); font-weight: 600; font-size: 22px; margin: 0 0 4px; color: var(--ink); }
.modal-card h3 { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 20px 0 6px; }
.modal-card p { font-size: 14px; line-height: 1.6; color: var(--ink); margin: 0; }
.modal-close { position: absolute; top: 10px; right: 14px; background: none; border: 0; font-size: 26px; line-height: 1; color: var(--muted); cursor: pointer; padding: 4px; }
.modal-close:hover { color: var(--ink); }
/* "paste into your AI" popup */
.ai-lede { color: var(--muted) !important; margin: 6px 0 16px !important; }
.ai-tools { display: grid; gap: 10px; }
.ai-tool { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 12px 14px; display: flex; flex-direction: column; gap: 7px; align-items: flex-start; }
.ai-tool h3 { font-family: var(--font-serif); font-weight: 600; font-size: 16px; text-transform: none; letter-spacing: 0; color: var(--accent); margin: 0 !important; }
.ai-tool p { font-size: 13px !important; color: var(--muted) !important; }
.ai-tool .mini-btn { padding: 6px 11px; font-size: 12px; }
.ai-fallback { font-size: 13px !important; color: var(--faint) !important; margin: 14px 0 10px !important; }
.ai-block { width: 100%; font-family: var(--font-sans); font-size: 11.5px; line-height: 1.45; color: var(--muted); background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px; resize: vertical; margin-bottom: 10px; }
/* ---------- coach (prototype) ---------- */
.coach-cta { margin-top: 22px; padding: 20px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r); text-align: center; }
.coach-cta h3 { font-family: var(--font-serif); font-weight: 600; font-size: 18px; margin: 0 0 4px; color: var(--ink); }
.coach-cta p { color: var(--muted); font-size: 14px; line-height: 1.5; margin: 0 0 14px; }
.coach-open { max-width: 280px; margin: 0 auto; }
.coach { margin-top: 22px; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--surface); }
.coach-log { max-height: 440px; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.c-msg { max-width: 85%; padding: 11px 14px; border-radius: 14px; font-size: 14.5px; line-height: 1.5; white-space: pre-wrap; word-wrap: break-word; }
.c-coach { align-self: flex-start; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink); border-bottom-left-radius: 4px; }
.c-user { align-self: flex-end; background: var(--accent); color: #fff; border-bottom-right-radius: 4px; }
.c-msg.typing { color: var(--faint); }
.coach-input { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); background: var(--surface-2); }
.coach-input input { flex: 1; min-width: 0; padding: 11px 13px; font: inherit; font-size: 15px; border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: #fff; color: var(--ink); }
.coach-input input:focus { outline: none; border-color: var(--accent); }
.coach-input input:disabled { opacity: .6; }
.coach-note { text-align: center; color: var(--faint); font-size: 12px; margin: 10px 0 14px; }
.sharpen-badge { display: inline-block; font-size: 12px; font-weight: 600; letter-spacing: .02em; color: var(--accent-ink); background: var(--accent-soft); border-radius: var(--r-pill); padding: 5px 12px; margin: 0 0 14px; }
/* Per-section sharpening: the original prose stays; these bullets sit beneath it in accent colour. */
.refinement { background: var(--accent-soft); border-left: 3px solid var(--accent); border-radius: 0 8px 8px 0; padding: 11px 14px 12px; margin: 10px 0 6px; }
.refinement-tag { display: inline-block; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: #fff; background: var(--accent); border-radius: var(--r-pill); padding: 3px 9px; margin: 0 0 9px; }
.refinement ul { margin: 0; padding-left: 18px; list-style: disc; }
.refinement li { color: var(--accent-strong); font-size: 15px; line-height: 1.5; margin: 5px 0; padding-left: 2px; }
.refinement li::marker { color: var(--accent); }
/* The road ahead: each year is its own block, set off by a year heading. */
.out h3.yr { font-family: var(--font-serif); font-weight: 600; font-size: 17px; letter-spacing: -0.01em; color: var(--accent-ink); margin: 20px 0 7px; padding-top: 16px; border-top: 1px solid var(--line); }
/* TEMP dev affordance: one-click sharpen button (remove with the #devSharpenBtn block in app.js). */
#devSharpenBtn { position: fixed; right: 12px; bottom: 12px; z-index: 9999; font-size: 12px; font-weight: 600; color: #fff; background: var(--accent); border: none; border-radius: var(--r-pill); padding: 8px 13px; opacity: .5; cursor: pointer; box-shadow: 0 4px 12px rgba(0,0,0,.18); transition: opacity .15s; }
#devSharpenBtn:hover { opacity: 1; }
.card.err { text-align: center; }
.card.err h3 { font-family: var(--font-serif); font-weight: 600; font-size: 20px; margin: 4px 0 8px; color: var(--ink); }
.card.err p { color: var(--muted); font-size: 14.5px; line-height: 1.55; margin: 0 0 18px; }
.card.err .go { max-width: 220px; margin: 0 auto; }

.forget { margin-top: 12px; color: #A24436; border-color: #ECD9D4; }
.forget:hover { background: #FBF0EE; border-color: #E6CBC4; }
.honesty { color: var(--faint); font-size: 12px; margin-top: 14px; line-height: 1.5; }

/* ---------- Life Path archetype = personality type ---------- */
.lp-type {
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: linear-gradient(180deg, var(--accent-soft), #FFFFFF 70%);
  padding: 20px 20px 6px;
  margin-bottom: 22px;
}
.lp-top { display: flex; align-items: center; gap: 16px; }
.lp-badge {
  flex: 0 0 auto;
  width: 58px; height: 58px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: linear-gradient(155deg, #6D5BE2, var(--accent));
  color: #fff; font-family: var(--font-serif); font-weight: 600; font-size: 28px;
  box-shadow: 0 8px 18px -8px rgba(90,71,214,.7), inset 0 1px 1px rgba(255,255,255,.35);
}
.lp-kicker { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 600; margin-bottom: 3px; }
.lp-name { font-family: var(--font-serif); font-weight: 600; font-size: 24px; line-height: 1.1; color: var(--ink); letter-spacing: -0.01em; }
.lp-ess { font-size: 14px; color: var(--muted); margin-top: 4px; }
.lp-more { margin-top: 14px; border-top: 1px solid var(--line); }
.lp-more > summary { cursor: pointer; list-style: none; padding: 12px 2px; font-size: 13.5px; font-weight: 600; color: var(--accent); display: flex; align-items: center; gap: 8px; }
.lp-more > summary::-webkit-details-marker { display: none; }
.lp-more > summary::before { content: "+"; display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 1px solid #C9C2EF; color: var(--accent); font-weight: 700; font-size: 13px; line-height: 1; }
.lp-more[open] > summary::before { content: "\2013"; }
.lp-traits { padding: 2px 2px 12px; }
.lp-traits p { margin: 0 0 10px; font-size: 14.5px; color: #2B2926; line-height: 1.55; }
.lp-traits strong { color: var(--accent-ink); font-weight: 600; }

/* ---------- life chapter (current Pinnacle) ---------- */
.chapters { margin-bottom: 22px; }
.chapters h3 { font-family: var(--font-serif); font-weight: 600; font-size: 20px; margin: 0 0 10px; color: var(--ink); }
.ch-now-card { border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: var(--r-sm); background: linear-gradient(180deg, var(--accent-soft), #FFFFFF 80%); padding: 16px 18px; }
.ch-now-age { font-size: 11px; text-transform: uppercase; letter-spacing: .09em; font-weight: 600; color: var(--accent); margin-bottom: 4px; }
.ch-now-title { font-family: var(--font-serif); font-weight: 600; font-size: 22px; line-height: 1.1; color: var(--ink); letter-spacing: -0.01em; }
.ch-now-theme { font-size: 14px; color: var(--muted); line-height: 1.55; margin-top: 6px; }

/* ---------- result: "under the hood" seam ---------- */
.seam {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 16px 18px;
  margin-bottom: 22px;
}
.seam h3 { margin: 0 0 12px; font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: var(--faint); font-weight: 600; }
.seam .grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; }
.seam .lab { color: var(--muted); font-size: 13px; }
.seam .val { font-weight: 600; font-size: 13.5px; margin-top: 1px; }
.seam .note { grid-column: 1 / -1; margin-top: 6px; color: var(--faint); font-size: 12px; }

.tag { display: inline-block; font-size: 10px; padding: 2px 8px; border-radius: var(--r-pill); margin-left: 6px; vertical-align: middle; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; }
.tag.feel { background: var(--accent-soft); color: var(--accent-ink); }
.tag.fact { background: #E4F0E9; color: var(--good); }

/* ---------- the written read ---------- */
.out { font-size: 16px; color: #2B2926; }
.out h2 {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 23px;
  letter-spacing: -0.01em;
  margin: 30px 0 10px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  color: var(--ink);
}
.out h2:first-of-type { margin-top: 6px; padding-top: 0; border-top: none; }
.out .basis { font-size: 11px; color: var(--faint); margin: 0 0 12px; text-transform: uppercase; letter-spacing: .08em; }
.out p { margin: 0 0 13px; }
.out ul { margin: 0 0 14px; padding-left: 20px; }
.out li { margin-bottom: 7px; }
.out strong { color: var(--accent-ink); font-weight: 600; }
.out a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px; }
.out a:hover { color: var(--accent-strong); }

/* decoding state */
.status { color: var(--muted); font-size: 14px; font-style: italic; }
.status-note { color: var(--muted); font-size: 13px; margin: 10px 0 0; opacity: .8; }
.out.reading { min-height: 60px; }
.status.writing { animation: gPulse 1.4s ease-in-out infinite; }
@keyframes gPulse { 0%,100% { opacity: .55; } 50% { opacity: 1; } }
.bar { height: 8px; background: var(--line); border-radius: var(--r-pill); overflow: hidden; margin-top: 16px; }
.bar-fill { height: 100%; width: 0%; background: linear-gradient(90deg, var(--accent), #7C6BE6); border-radius: var(--r-pill); transition: width .35s ease; }
/* Indeterminate "working" bar: a slice slides across, implying activity not a fixed duration. */
.bar.indeterminate .bar-fill { width: 35%; transition: none; animation: gSlide 1.15s ease-in-out infinite; }
@keyframes gSlide { 0% { margin-left: -35%; } 100% { margin-left: 100%; } }

/* ---------- lucky numbers ---------- */
.lotto { margin-top: 30px; padding-top: 22px; border-top: 1px solid var(--line); }
.lotto h2 { font-family: var(--font-serif); font-weight: 600; font-size: 23px; margin: 0 0 5px; color: var(--ink); }
.lotto-note { font-size: 12.5px; color: var(--faint); margin: 0 0 16px; }
.balls { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.ball {
  display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; border-radius: 50%;
  background: linear-gradient(155deg, #6D5BE2, var(--accent));
  color: #fff; font-weight: 700; font-size: 16px;
  box-shadow: 0 6px 14px -6px rgba(90,71,214,.7), inset 0 1px 1px rgba(255,255,255,.35);
}
.lotto-check { font-size: 13.5px; color: var(--accent-ink); background: var(--accent-soft); border-radius: var(--r-sm); padding: 12px 14px; margin: 16px 0 0; line-height: 1.5; }
.lotto-check strong { color: var(--accent-strong); }
.lotto-why { font-size: 12.5px; color: var(--muted); margin: 12px 0 0; line-height: 1.55; }
.lotto-why strong { color: var(--accent-ink); }

/* ---------- fortune ---------- */
.fortune-cta { margin-top: 26px; text-align: center; }
.fortune-btn { font-size: 14px; padding: 11px 20px; border-radius: var(--r-pill); }
.fortune {
  margin-top: 18px; padding: 24px 24px;
  border-radius: var(--r);
  background: radial-gradient(120% 140% at 0% 0%, #3B2E86 0%, #241C57 55%, #1B1542 100%);
  color: #EDEAFB;
  box-shadow: var(--shadow-lg);
}
.fortune h2 { font-family: var(--font-serif); font-weight: 600; font-size: 23px; margin: 0 0 12px; color: #fff; }
.fortune .f-open { font-style: italic; color: #C9C1F0; margin: 0 0 16px; }
.fortune .f-item, .fortune p { margin: 0 0 11px; line-height: 1.55; }
.fortune p strong, .fortune .f-item strong { color: var(--gold); color: #F0CE7E; }
.fortune .status { color: #C9C1F0; font-style: italic; margin: 0; }
.fortune .f-lucky { margin-top: 16px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.16); font-size: 13.5px; color: #C9C1F0; }
.fortune .f-lucky b { color: #F0CE7E; }
.fortune .f-note { font-size: 11.5px; color: #948CC4; margin: 12px 0 0; }

/* ---------- share + disclaimer ---------- */
.share-bar { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.error { color: #A24436; font-size: 13px; margin-top: 8px; }
.disclaimer { color: var(--faint); font-size: 12px; margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--line); line-height: 1.55; }
.disclaimer .privacy { display: block; margin-bottom: 8px; color: var(--muted); }

@media (max-width: 480px) {
  .card { padding: 20px 18px; }
  .seam .grid { grid-template-columns: 1fr; }
  .hero { padding-top: 28px; }
}

/* ===================== Print / Save-as-PDF =====================
   A designed print layout: brand masthead, the full report (read, life chapter,
   lucky numbers, sharpen, fortune), clean section breaks, no app chrome.
   The browser print dialog saves this as a crisp, selectable PDF. */
.print-only { display: none; }

@media print {
  @page { margin: 15mm 14mm 16mm; }
  *, *::before, *::after { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }
  html, body { background: #fff !important; margin: 0; padding: 0; font-size: 10.8pt; line-height: 1.5; color: #1A1917; }
  .wrap { max-width: none !important; margin: 0 !important; padding: 0 !important; }

  /* hide everything interactive / off-report */
  .hero .lede, .wrap > .card, .site-foot, .modal, .cf-turnstile,
  #devSharpenBtn, .share-bar, .fortune-cta, .coach-cta, #coachPanel, #sharpenPanel,
  .coach, .status, .status-note, .out.reading { display: none !important; }

  /* slim masthead from the existing hero */
  .hero { padding: 0 0 5mm !important; margin: 0 0 6mm !important; border-bottom: 1px solid var(--line); display: block; text-align: left; }
  .hero .mark { width: 30px; height: 30px; margin: 0; }
  .hero .wordmark { font-size: 20px; }
  .hero .tagline { font-size: 13px; margin: 2px 0 0; }

  /* report card: flat on the page, no shadow/frame/rounding */
  #result .card { box-shadow: none !important; border: none !important; border-radius: 0 !important; padding: 0 !important; margin: 0 !important; background: #fff !important; }

  /* print-only meta + footer */
  .print-only { display: block !important; }
  .print-head { margin: 0 0 6mm; }
  .print-head .ph-brand { font-family: var(--font-serif); font-weight: 600; color: var(--accent); font-size: 15px; }
  .print-head .ph-meta { color: var(--muted); font-size: 10.5px; margin-top: 2px; }
  .print-foot { margin-top: 9mm; padding-top: 4mm; border-top: 1px solid var(--line); color: var(--muted); font-size: 9.5px; text-align: center; }

  /* typography + page-break control */
  .lp-type, .chapters, .seam { break-inside: avoid; page-break-inside: avoid; }
  .out h2 { font-size: 15.5pt; margin: 16px 0 7px; break-after: avoid; page-break-after: avoid; }
  .out h2:first-of-type { margin-top: 4px; }
  .out h3.yr { break-after: avoid; page-break-after: avoid; }
  .out p, .out ul, .out li, .refinement, .lotto, .fortune, .f-lucky { break-inside: avoid; page-break-inside: avoid; }
  .out h2 + p, .out h3.yr + p { break-before: avoid; page-break-before: avoid; }
  .sharpen-badge { border: 1px solid var(--accent); }
  a { color: var(--accent-strong) !important; text-decoration: none; }
}
