/* My Spiky Profile: questionnaire and results. Builds on the site tokens in main.css. */
:root {
  --sp-line: #8e2c86;          /* signature profile line (magenta) */
  --sp-bar: rgba(141, 118, 210, .32);
  --sp-bar-edge: rgba(111, 88, 186, .55);
  --sp-band: rgba(15, 17, 21, .05);
  --sp-terra: #b5562f;
  --sp-max: 44rem;
}
body.sp { background: var(--paper); }
.sp-header { border-bottom: 1px solid var(--rule); background: var(--paper); }
.sp-header__in { max-width: 72rem; margin: 0 auto; padding: .9rem 1.25rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.sp-brand { display: flex; align-items: center; gap: .55rem; font-family: var(--font-serif); font-size: 1.25rem; color: var(--ink); text-decoration: none; }
.sp-brand img { width: 22px; height: 22px; }
.sp-tag { font-size: .8125rem; color: var(--ink-3); letter-spacing: .02em; }
.sp-main { max-width: var(--sp-max); margin: 0 auto; padding: clamp(1.5rem, 5vw, 3.5rem) 1.25rem 4rem; min-height: 70vh; }
.sp-main--wide { max-width: 64rem; }
.sp-eyebrow { font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 .9rem; }
.sp-h1 { font-family: var(--font-serif); font-weight: 400; font-size: clamp(2.3rem, 7vw, 3.6rem); line-height: 1.04; letter-spacing: -.01em; margin: 0 0 1rem; text-wrap: balance; }
.sp-h2 { font-family: var(--font-serif); font-weight: 400; font-size: clamp(1.7rem, 4.6vw, 2.4rem); line-height: 1.1; margin: 0 0 .75rem; text-wrap: balance; }
.sp-h3 { font-family: var(--font-serif); font-weight: 400; font-size: 1.35rem; line-height: 1.2; margin: 0 0 .5rem; }
.sp-lead { font-size: 1.125rem; line-height: 1.6; color: var(--ink-2); margin: 0 0 1.25rem; }
.sp-p { line-height: 1.65; color: var(--ink-2); margin: 0 0 1rem; }
.sp-small { font-size: .875rem; line-height: 1.55; color: var(--ink-3); }
.sp-meta { font-size: .875rem; color: var(--ink-3); margin: 0 0 1.5rem; }
.sp-note { border-left: 2px solid var(--rule); padding: .25rem 0 .25rem 1rem; margin: 1.25rem 0; }
.sp-hide { display: none !important; }

/* Buttons and fields */
.sp-btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 48px; padding: .75rem 1.4rem; border-radius: 999px; border: 1px solid var(--ink); background: var(--ink); color: var(--paper); font: 500 1rem/1.2 var(--font-sans); cursor: pointer; text-decoration: none; }
.sp-btn:hover { background: #262a31; }
.sp-btn[disabled] { opacity: .35; cursor: not-allowed; }
.sp-btn--ghost { background: transparent; color: var(--ink); }
.sp-btn--ghost:hover { background: rgba(15, 17, 21, .05); }
.sp-btn:focus-visible, .sp-opt:focus-within, .sp-link:focus-visible, .sp-field input:focus-visible, .sp-field textarea:focus-visible { outline: 2px solid var(--sp-line); outline-offset: 3px; }
.sp-link { color: var(--ink); text-underline-offset: 3px; background: none; border: 0; padding: 0; font: inherit; cursor: pointer; text-decoration: underline; }
.sp-actions { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; margin-top: 1.75rem; }
.sp-actions--split { justify-content: space-between; }
.sp-field { display: grid; gap: .4rem; margin: 0 0 1rem; }
.sp-field label { font-size: .875rem; font-weight: 500; }
.sp-field input, .sp-field textarea { font: 1rem/1.5 var(--font-sans); padding: .75rem .9rem; border: 1px solid var(--rule); border-radius: 12px; background: #fff; color: var(--ink); width: 100%; box-sizing: border-box; }
.sp-field textarea { min-height: 6rem; resize: vertical; }
.sp-code { font-size: 1.25rem !important; letter-spacing: .08em; text-transform: uppercase; }
.sp-error { color: var(--accent-ink); font-size: .9375rem; margin: .5rem 0 0; min-height: 1.4em; }

/* Progress */
.sp-progress { height: 3px; background: var(--rule); border-radius: 3px; overflow: hidden; margin: 0 0 1.75rem; }
.sp-progress span { display: block; height: 100%; background: var(--ink); transition: width .25s ease; }
.sp-step { font-size: .8125rem; color: var(--ink-3); margin: 0 0 .75rem; letter-spacing: .02em; }

/* Options */
.sp-q { font-family: var(--font-serif); font-weight: 400; font-size: clamp(1.6rem, 5vw, 2.15rem); line-height: 1.15; margin: 0 0 1.4rem; text-wrap: balance; }
.sp-help { margin: -.6rem 0 1.25rem; color: var(--ink-3); font-size: .9375rem; line-height: 1.5; }
.sp-opts { display: grid; gap: .5rem; margin: 0; padding: 0; border: 0; }
.sp-opts--grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); }
.sp-opt { position: relative; display: flex; align-items: center; gap: .85rem; min-height: 52px; padding: .7rem 1rem; border: 1px solid var(--rule); border-radius: 14px; background: #fff; cursor: pointer; line-height: 1.35; }
.sp-opt input { position: absolute; opacity: 0; pointer-events: none; }
.sp-opt__n { flex: 0 0 auto; width: 1.9rem; height: 1.9rem; border-radius: 50%; border: 1px solid var(--rule); display: grid; place-items: center; font-size: .875rem; color: var(--ink-3); }
.sp-opt__box { flex: 0 0 auto; width: 1.15rem; height: 1.15rem; border: 1.5px solid var(--ink-3); border-radius: 4px; }
.sp-opt--radio .sp-opt__box { border-radius: 50%; }
.sp-opt:has(input:checked) { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); background: #fbfaf7; }
.sp-opt:has(input:checked) .sp-opt__n { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.sp-opt:has(input:checked) .sp-opt__box { background: var(--ink); border-color: var(--ink); box-shadow: inset 0 0 0 3px #fff; }
.sp-opt:has(input:disabled) { opacity: .45; cursor: not-allowed; }
.sp-opt--ns { margin-top: .5rem; border-style: dashed; }
.sp-count { font-size: .875rem; color: var(--ink-3); margin: .75rem 0 0; }

/* Results */
.sp-section { padding: 2.5rem 0; border-top: 1px solid var(--rule); }
.sp-section:first-of-type { border-top: 0; }
.sp-chart { width: 100%; height: auto; display: block; }
.sp-chart text { font-family: var(--font-sans); }
.sp-legend { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; font-size: .8125rem; color: var(--ink-3); margin: .75rem 0 0; }
.sp-legend i { display: inline-block; width: 14px; height: 10px; vertical-align: middle; margin-right: .4rem; border-radius: 2px; }
.sp-cols { display: grid; gap: 1.5rem 2.5rem; }
@media (min-width: 760px) { .sp-cols { grid-template-columns: 1fr 1fr; } }
.sp-list { margin: 0; padding-left: 1.1rem; line-height: 1.6; color: var(--ink-2); }
.sp-list li { margin: 0 0 .35rem; }
.sp-chips { display: flex; flex-wrap: wrap; gap: .4rem; margin: .25rem 0 0; padding: 0; list-style: none; }
.sp-chips li { font-size: .875rem; padding: .3rem .7rem; border-radius: 999px; border: 1px solid var(--rule); background: #fff; }
.sp-pattern { padding: 1rem 0; border-top: 1px solid var(--rule); }
.sp-pattern:first-child { border-top: 0; }
.sp-manual .sp-field textarea { min-height: 4.5rem; background: #fffdf9; }
.sp-journey { display: flex; flex-wrap: wrap; gap: .4rem; list-style: none; padding: 0; margin: 1rem 0; font-size: .875rem; }
.sp-journey li { padding: .35rem .75rem; border-radius: 999px; border: 1px solid var(--rule); color: var(--ink-3); }
.sp-journey li:first-child { border-color: var(--ink); color: var(--ink); }
.sp-panel { background: #fbfaf7; border: 1px solid var(--rule); border-radius: 18px; padding: clamp(1.25rem, 4vw, 2rem); }
.sp-author { display: flex; gap: 1rem; align-items: center; margin: 1.25rem 0; }
.sp-author img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; }
.sp-table { width: 100%; border-collapse: collapse; font-size: .875rem; margin-top: .75rem; }
.sp-table th, .sp-table td { text-align: left; padding: .35rem .5rem; border-bottom: 1px solid var(--rule); }
details.sp-details summary { cursor: pointer; font-size: .9375rem; margin-top: 1rem; }
.sp-footer { border-top: 1px solid var(--rule); padding: 2rem 1.25rem 3rem; }
.sp-footer__in { max-width: 64rem; margin: 0 auto; font-size: .8125rem; line-height: 1.6; color: var(--ink-3); }
.sp-footer a { color: inherit; }
.sp-ok { color: #2f6b45; font-weight: 500; }

@media (prefers-reduced-motion: reduce) { .sp-progress span { transition: none; } }

/* Print: the report only */
#sp-report { display: none; }
@media print {
  @page { size: A4; margin: 16mm 15mm; }
  body.sp > *:not(#sp-report) { display: none !important; }
  html, body.sp { background: #fff !important; }
  #sp-report { display: block !important; color: #111; font-size: 9.5pt; }
  .rp-page { page-break-after: always; break-after: page; }
  .rp-page:last-child { page-break-after: auto; break-after: auto; }
  .rp-head { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 1px solid #ccc; padding-bottom: 4mm; margin-bottom: 5mm; }
  .rp-brand { font-family: var(--font-serif); font-size: 14pt; }
  .rp-title { font-family: var(--font-serif); font-size: 22pt; font-weight: 400; margin: 0 0 2mm; }
  .rp-h { font-family: var(--font-serif); font-size: 12pt; font-weight: 400; margin: 3.5mm 0 1mm; }
  .rp-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 2mm 8mm; }
  .rp-p, .rp-list { margin: 0 0 1.5mm; line-height: 1.4; }
  .rp-list { padding-left: 4mm; }
  .rp-fine { break-inside: avoid; font-size: 7.5pt; color: #444; line-height: 1.4; margin-top: 5mm; border-top: 1px solid #ccc; padding-top: 3mm; }
  .sp-chart { max-height: 92mm; }
  .sp-chart text { font-size: 8.5px; }
}

/* ---------- Public profile (improvement 06) ---------- */
.sp-landing { max-width: 46rem; }
.sp-h1--xl { font-family: var(--font-grotesk, var(--font-sans)); font-weight: 600; letter-spacing: -.04em; font-size: clamp(2.8rem, 8vw, 5.2rem); line-height: .95; }
.sp-meta-line { font-family: var(--font-mono, monospace); font-size: .8125rem; letter-spacing: .04em; color: var(--ink-3); margin: 0 0 .5rem; }
.sp-btn--lg { min-height: 56px; padding: 1rem 1.6rem; font-size: 1.0625rem; }
.sp-btn { border-radius: 6px; }
.sp-btn:not(.sp-btn--ghost) { background: var(--accent, #ff603d); border-color: var(--accent, #ff603d); color: var(--ink); font-weight: 600; }
.sp-btn:not(.sp-btn--ghost):hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.sp-codebox { margin: 1.25rem 0 0; }
.sp-codebox summary { cursor: pointer; font-size: .9375rem; color: var(--ink-2); }
.sp-codebox .sp-field { margin-top: .9rem; max-width: 20rem; }
.sp-levels { list-style: none; margin: 2.5rem 0 1.5rem; padding: 0; border-top: 1px solid var(--ink); }
.sp-levels li { display: grid; grid-template-columns: 2.5rem 1fr; gap: .1rem .75rem; padding: .9rem 0; border-bottom: 1px solid var(--rule); line-height: 1.5; color: var(--ink-2); }
.sp-levels li span { grid-row: span 2; font-family: var(--font-mono, monospace); font-size: .8125rem; color: var(--accent-ink); padding-top: .15rem; }
.sp-levels li strong { color: var(--ink); font-weight: 600; }
.sp-graph__box { background: var(--ink); border-radius: 8px; padding: clamp(1rem, 3vw, 2rem); }
.sp-graph__box .sig { max-width: 560px; margin: 0 auto; display: block; }
.sp-graph__note { margin-top: .75rem; }
.sig .sig-plabel--muted { fill: #8b8e95; font-style: italic; }
.sp-extremes { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); counter-reset: ex; }
.sp-extremes li { display: flex; justify-content: space-between; gap: 1rem; padding: .7rem 0; border-bottom: 1px solid var(--rule); font-weight: 500; }
.sp-interp { margin-top: 1.5rem; }
.sp-gate { background: var(--stone, #e8e3db); border-top: 0; border-radius: 8px; padding: clamp(1.5rem, 4vw, 2.75rem); margin: 2rem 0; }
.sp-gate .sp-field input, .sp-gate .sp-field select { background: #fff; }
.sp-field select { font: 1rem/1.4 var(--font-sans); padding: .75rem .9rem; border: 1px solid var(--rule); border-radius: 12px; background: #fff; color: var(--ink); width: 100%; }
.sp-opt--check { align-items: flex-start; margin: .6rem 0 0; background: rgba(255, 255, 255, .7); }
.sp-opt--check .sp-opt__box { margin-top: .15rem; }
.sp-opt--check a { color: inherit; }
.sp-optlabel { margin: 1.5rem 0 0; font-family: var(--font-mono, monospace); font-size: .75rem; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); }
.sp-convert { background: var(--ink); color: var(--paper); border-radius: 8px; padding: clamp(1.5rem, 4vw, 2.75rem); margin: 2rem 0; border-top: 0; }
.sp-convert .sp-eyebrow, .sp-convert .sp-small { color: #a4a6ab; }
.sp-convert .sp-p { color: #d6d4cf; }
.sp-convert .sp-h2 { color: var(--paper); }
.sp-convert .sp-btn:hover { background: var(--paper); color: var(--ink); border-color: var(--paper); }

/* Report (print) */
@media print {
  #sp-report { font-family: var(--font-sans); }
  .rp-page { position: relative; min-height: 262mm; padding-bottom: 12mm; box-sizing: border-box; }
  .rp-kicker { font-family: var(--font-mono, monospace); font-size: 8pt; letter-spacing: .08em; text-transform: uppercase; color: #b33a1d; margin: 18mm 0 4mm; }
  .rp-cover { font-family: var(--font-grotesk, var(--font-sans)); font-weight: 600; letter-spacing: -.03em; font-size: 34pt; line-height: 1; margin: 0 0 3mm; }
  .rp-coversub { font-family: var(--font-serif); font-style: italic; font-size: 16pt; color: #b33a1d; margin: 0 0 6mm; }
  .rp-meta { color: #555; font-size: 9pt; margin-bottom: 10mm !important; }
  .rp-h3 { font-family: var(--font-grotesk, var(--font-sans)); font-weight: 600; font-size: 11pt; margin: 3mm 0 1.5mm; }
  .rp-dim { margin: 0 0 2mm; break-inside: avoid; }
  .rp-strong { font-weight: 600; margin-bottom: .5mm !important; }
  .rp-tip { color: #333; }
  .rp-muted { color: #666; }
  .rp-quote { border-left: 2px solid #ff603d; padding-left: 3mm; }
  .rp-plan { padding-left: 5mm; }
  .rp-plan li { margin: 0 0 4mm; line-height: 1.45; }
  .rp-step { display: block; font-family: var(--font-mono, monospace); font-size: 8pt; letter-spacing: .06em; text-transform: uppercase; color: #b33a1d; margin-bottom: 1mm; }
  .rp-foot { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between; font-size: 7.5pt; color: #777; border-top: 1px solid #ddd; padding-top: 2mm; }
  .sig--print { width: 100%; max-height: 190mm; margin: 4mm 0; }
  .sig--print .sig-grid { stroke: #e2ded6; }
  .sig--print .sig-mid { stroke: #888; }
  .sig--print .sig-head { fill: #666; font-size: 9px; }
  .sig--print .sig-blabel { font-family: var(--font-sans); font-size: 11px; fill: #111; }
  .sig--print .sig-plabel--muted { fill: #888; }
  .sig--print .sig-axis { fill: #666; font-size: 9px; }
  .sig--print .sig-dot--valley { fill: #fff; }
}
.sp-extremes__tie span:first-child { font-weight: 400; color: var(--ink-2); }
