/* Sub3 Profile report (v5). Design from mockups/sub3-profile.html. Scoped to .s3p so it can sit inside the Check page. */
.s3p {
  --s3-sheet: #ffffff; --s3-ink: #1a1d20; --s3-ink2: #56616b; --s3-rule: #dde1dd; --s3-tint: #f3f4f2;
  --s3-red: #c2412d; --s3-blue: #3e5c76; --s3-blue-soft: #d6e0e8; --s3-good: #2f7d5b;
  --s3-z1: #9fb8cc; --s3-z2: #5f86a6; --s3-z3: #3e5c76; --s3-z4: #c27a2d; --s3-z5: #8f2d1f;
  --s3-display: "Libre Franklin", "Arial Narrow", Arial, sans-serif; --s3-body: "Schibsted Grotesk", "Segoe UI", Roboto, Arial, sans-serif;
  max-width: 860px; margin: 0 auto; background: var(--s3-sheet); color: var(--s3-ink); border-radius: 10px; overflow: hidden;
  font-family: var(--s3-body); font-size: 16px; line-height: 1.5; text-align: left;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .s3p {
  --s3-sheet: #1a1d20; --s3-ink: #f3f4f2; --s3-ink2: #a8b4be; --s3-rule: #2e3338; --s3-tint: #24282c;
  --s3-red: #e0573f; --s3-blue: #8fa9c0; --s3-blue-soft: #2b3a47; --s3-good: #4fb486;
  --s3-z1: #3b4f60; --s3-z2: #55728c; --s3-z3: #8fa9c0; --s3-z4: #d9914a; --s3-z5: #f08a6f; } }
:root[data-theme="dark"] .s3p {
  --s3-sheet: #1a1d20; --s3-ink: #f3f4f2; --s3-ink2: #a8b4be; --s3-rule: #2e3338; --s3-tint: #24282c;
  --s3-red: #e0573f; --s3-blue: #8fa9c0; --s3-blue-soft: #2b3a47; --s3-good: #4fb486;
  --s3-z1: #3b4f60; --s3-z2: #55728c; --s3-z3: #8fa9c0; --s3-z4: #d9914a; --s3-z5: #f08a6f; }
.s3p * { box-sizing: border-box; }
.s3p p { margin: 0; max-width: 68ch; }
.s3p a { color: var(--s3-red); }
.s3p .nw { white-space: nowrap; }

.s3p-top { background: #1a1d20; color: #f3f4f2; padding: 28px clamp(18px, 4vw, 40px) 24px; display: grid; gap: 18px; }
.s3p-brand { font-family: var(--s3-display); font-weight: 900; letter-spacing: .02em; font-size: 20px; }
.s3p-brand span { color: #e0573f; }
.s3p-top h1 { margin: 0; font-family: var(--s3-display); font-weight: 900; text-transform: uppercase; font-size: clamp(28px, 6vw, 44px); line-height: 1; text-wrap: balance; color: #f3f4f2; }
.s3p-verdict { display: grid; gap: 6px; border-left: 4px solid #e0573f; padding: 2px 0 2px 14px; }
.s3p-verdict b { font-family: var(--s3-display); font-weight: 800; font-size: clamp(18px, 3.4vw, 22px); line-height: 1.2; }
.s3p-verdict span { color: #c9d1d8; font-size: 15px; max-width: 62ch; }
.s3p-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 10px 18px; font-size: 13px; }
.s3p-meta div { border-top: 1px solid #3a4046; padding-top: 6px; }
.s3p-meta small { display: block; text-transform: uppercase; letter-spacing: .08em; font-size: 11px; color: #a8b4be; }
.s3p-meta b { font-family: var(--s3-display); font-weight: 800; font-size: 17px; font-variant-numeric: tabular-nums; }

.s3p-sec { padding: 30px clamp(18px, 4vw, 40px); border-top: 1px solid var(--s3-rule); display: grid; gap: 16px; break-inside: avoid; }
.s3p-sec h2 { margin: 0; display: flex; gap: 12px; align-items: flex-start; font-family: var(--s3-display); font-weight: 900; font-size: clamp(21px, 4vw, 27px); line-height: 1.12; text-transform: uppercase; text-wrap: balance; }
.s3p-sec h2 i { font-style: normal; flex: none; width: 32px; height: 32px; margin-top: -2px; border-radius: 6px; background: var(--s3-red); color: #fff; display: grid; place-items: center; font-size: 17px; }
.s3p-src { font-size: 12px; color: var(--s3-ink2); }
.s3p-muted { color: var(--s3-ink2); }
.s3p-good { color: var(--s3-good); }
.s3p-two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: center; }
@media (max-width: 680px) { .s3p-two { grid-template-columns: 1fr; } }
.s3p svg { display: block; width: 100%; height: auto; overflow: visible; }
.s3p svg text { font-family: var(--s3-body); fill: var(--s3-ink2); }
.s3p-gauge, .s3p-radar { max-width: 380px; justify-self: center; }

.s3p-kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 2px solid var(--s3-ink); }
.s3p-kpi { padding: 12px 14px 12px 0; border-bottom: 1px solid var(--s3-rule); }
.s3p-kpi small { display: block; text-transform: uppercase; letter-spacing: .08em; font-size: 11px; color: var(--s3-ink2); }
.s3p-kpi b { font-family: var(--s3-display); font-weight: 900; font-size: 24px; font-variant-numeric: tabular-nums; }
.s3p-kpi b.red { color: var(--s3-red); }

.s3p table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.s3p-tw { overflow-x: auto; }
.s3p th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--s3-ink2); font-weight: 700; padding: 8px 10px 8px 0; border-bottom: 2px solid var(--s3-ink); white-space: nowrap; }
.s3p td { padding: 10px 10px 10px 0; border-bottom: 1px solid var(--s3-rule); vertical-align: middle; }
.s3p td b { font-family: var(--s3-display); font-weight: 800; font-size: 17px; white-space: nowrap; }
.s3p td small { display: block; color: var(--s3-ink2); font-size: 13px; line-height: 1.4; font-variant-numeric: normal; }
.s3p-zones td small { margin-top: 2px; max-width: 46ch; }
.s3p td.s3p-pace { text-align: right; padding-right: 0; vertical-align: top; padding-top: 12px; }
.s3p-zones th:last-child { text-align: right; padding-right: 0; }
.s3p-zones td { vertical-align: top; }
.s3p-z span { margin-top: 2px; }
.s3p td.s3p-score { white-space: nowrap; color: var(--s3-ink2); }
.s3p td.s3p-score b { color: var(--s3-ink); }
.s3p-z { width: 14px; padding-right: 12px; }
.s3p-z span { display: block; width: 14px; height: 30px; border-radius: 3px; }

.s3p-callout { background: var(--s3-tint); border-left: 4px solid var(--s3-red); border-radius: 0 8px 8px 0; padding: 12px 16px; }

.s3p-pri { counter-reset: p; display: grid; gap: 18px; margin: 0; padding: 0; list-style: none; }
.s3p-pri li { counter-increment: p; display: grid; grid-template-columns: 34px 1fr; gap: 14px; align-items: start; }
.s3p-pri li::before { content: counter(p); width: 34px; height: 34px; border-radius: 6px; background: var(--s3-ink); color: var(--s3-sheet); font-family: var(--s3-display); font-weight: 900; display: grid; place-items: center; }
.s3p-pri li:first-child::before { background: var(--s3-red); color: #fff; }
.s3p-pri b { display: block; font-size: 18px; margin-bottom: 4px; }
.s3p-tag { display: inline-block; vertical-align: 2px; margin-left: 6px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--s3-red); border: 1px solid currentColor; border-radius: 4px; padding: 1px 6px; }
.s3p-why { color: var(--s3-ink2); margin-bottom: 8px !important; }
.s3p-todo { background: var(--s3-tint); border-radius: 8px; padding: 10px 14px; }
.s3p-todo span { display: block; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--s3-red); margin-bottom: 2px; }

.s3p-blocks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; border-radius: 8px; overflow: hidden; }
.s3p-blocks div { padding: 12px 10px; color: #fff; min-height: 84px; display: grid; align-content: space-between; gap: 6px; }
.s3p-blocks small { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; opacity: .9; }
.s3p-blocks b { font-family: var(--s3-display); font-weight: 900; font-size: clamp(12px, 3.2vw, 20px); hyphens: auto; line-height: 1.1; text-transform: uppercase; }
.s3p-b1 { background: #3e5c76; } .s3p-b2 { background: #c27a2d; } .s3p-b3 { background: #c2412d; }
.s3p-blist { display: grid; gap: 10px; }
.s3p-blist div { display: grid; grid-template-columns: 14px 1fr; gap: 12px; align-items: start; }
.s3p-dot { width: 14px; height: 14px; border-radius: 3px; margin-top: 4px; }

.s3p-fuel { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 680px) { .s3p-fuel { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.s3p-fuel div { background: var(--s3-tint); border-radius: 8px; padding: 14px; display: grid; gap: 2px; }
.s3p-fuel small { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--s3-ink2); }
.s3p-fuel b { font-family: var(--s3-display); font-weight: 900; font-size: 24px; font-variant-numeric: tabular-nums; }
.s3p-fuel em { font-style: normal; font-size: 13px; color: var(--s3-ink2); line-height: 1.35; }

.s3p-splits { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1px; background: var(--s3-rule); border: 1px solid var(--s3-rule); border-radius: 6px; overflow: hidden; }
@media (max-width: 460px) { .s3p-splits { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.s3p-splits div { background: var(--s3-sheet); padding: 10px; }
.s3p-splits small { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--s3-ink2); }
.s3p-splits b { font-family: var(--s3-display); font-weight: 800; font-size: 18px; font-variant-numeric: tabular-nums; }
.s3p-splits .s3p-fin { background: var(--s3-red); }
.s3p-splits .s3p-fin small, .s3p-splits .s3p-fin b { color: #fff; }

.s3p-cta { background: var(--s3-tint); }
.s3p-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.s3p-btn { display: inline-block; box-sizing: border-box; width: 300px; max-width: 100%; text-align: center; background: var(--s3-red); color: #fff !important; text-decoration: none; font: 700 15px/1 var(--s3-body); letter-spacing: .05em; padding: 15px 24px; border-radius: 8px; border: 2px solid var(--s3-red); cursor: pointer; }
.s3p-btn--ghost { background: transparent; color: var(--s3-ink) !important; border-color: var(--s3-ink2); }
.s3p-btn:focus-visible { outline: 3px solid var(--s3-blue); outline-offset: 3px; }
.s3p-about { display: grid; grid-template-columns: 96px 1fr; gap: 16px; align-items: center; padding-top: 8px; }
.s3p-about img { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; }
@media (max-width: 460px) { .s3p-about { grid-template-columns: 72px 1fr; } .s3p-about img { width: 72px; height: 72px; } }
.s3p-foot { padding: 20px clamp(18px, 4vw, 40px) 28px; border-top: 1px solid var(--s3-rule); font-size: 12px; color: var(--s3-ink2); display: grid; gap: 8px; }

@media print {
  @page { margin: 12mm; }
  .s3p { --s3-sheet: #ffffff; --s3-ink: #1a1d20; --s3-ink2: #56616b; --s3-rule: #dde1dd; --s3-tint: #f3f4f2;
    --s3-red: #c2412d; --s3-blue: #3e5c76; --s3-blue-soft: #d6e0e8; --s3-good: #2f7d5b;
    --s3-z1: #9fb8cc; --s3-z2: #5f86a6; --s3-z3: #3e5c76; --s3-z4: #c27a2d; --s3-z5: #8f2d1f; }
  html, body { background: #fff !important; }
  body > *:not(main):not(#app) { display: none !important; }
  .s3p { max-width: none; border-radius: 0; }
  .s3p, .s3p * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .s3p-actions, .s3p-link, .no-print { display: none !important; }
  .s3p-sec { break-inside: avoid; page-break-inside: avoid; }
}

/* v5.1: "Your next 4 weeks" card at the top */
.s3p-next { background: var(--s3-tint); }
.s3p-next h2 span { border-bottom: 4px solid var(--s3-red); padding-bottom: 2px; }
.s3p-nextgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 680px) { .s3p-nextgrid { grid-template-columns: 1fr; } }
.s3p-nextgrid > div { background: var(--s3-sheet); border-radius: 8px; padding: 14px 16px; display: grid; gap: 4px; align-content: start; }
.s3p-nextgrid > div:first-child { border-left: 4px solid var(--s3-red); }
.s3p-nextgrid small { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--s3-red); }
.s3p-nextgrid b { font-family: var(--s3-display); font-weight: 800; font-size: 19px; line-height: 1.2; }
.s3p-nextgrid p { font-size: 15px; }
.s3p-mini { font-size: 15px; }
.s3p-mini a { font-weight: 700; }

/* v5.2 (25 Oct, Lukasz): one-line title, verdict stands out, biggest-return card as steps, pillars on one line */
.s3p { container-type: inline-size; }
.s3p-brand em { font-style: normal; color: #a8b4be; margin-left: 8px; font-weight: 800; }
.s3p-brand em::before { content: "· "; color: #5b646c; }
.s3p-top h1 { white-space: nowrap; font-size: clamp(17px, 6.2cqi, 46px); }
.s3p-verdict { border: 0; background: #c2412d; border-radius: 10px; padding: 16px 18px; gap: 8px; }
.s3p-verdict b { text-transform: uppercase; font-weight: 900; font-size: clamp(20px, 5.6cqi, 30px); line-height: 1.08; color: #fff; }
.s3p-verdict span { color: #fbe4df; font-size: 15px; }
.s3p-next .s3p-focus { background: #1a1d20; color: #f3f4f2; border-radius: 10px; padding: 18px; display: grid; gap: 6px; }
.s3p-focus small { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #e0573f; }
.s3p-focus b { font-family: var(--s3-display); font-weight: 900; text-transform: uppercase; font-size: clamp(22px, 5.4cqi, 30px); line-height: 1.05; }
.s3p-focus p { color: #c9d1d8; font-size: 15px; }
.s3p-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.s3p-steps li { display: grid; grid-template-columns: 40px 1fr; gap: 14px; position: relative; padding-bottom: 18px; }
.s3p-steps li:last-child { padding-bottom: 0; }
.s3p-steps li:not(:last-child)::after { content: ""; position: absolute; left: 19px; top: 40px; bottom: 0; width: 2px; background: var(--s3-rule); }
.s3p-steps i { font-style: normal; width: 40px; height: 40px; border-radius: 50%; background: var(--s3-red); color: #fff; display: grid; place-items: center; font-family: var(--s3-display); font-weight: 900; font-size: 18px; }
.s3p-steps small { display: block; font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--s3-ink); padding-top: 10px; margin-bottom: 4px; }
.s3p-steps p { font-size: 15.5px; }
.s3p td:first-child b { white-space: nowrap; }
.s3p-zones td:nth-child(2) b { white-space: normal; }
.s3p-zones td.s3p-pace b { white-space: nowrap; }
.s3p-zones td:nth-child(2) b { font-size: 15px; letter-spacing: .02em; }
.s3p-fuel { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 680px) { .s3p-fuel { grid-template-columns: repeat(2, minmax(0, 1fr)); } .s3p-fuel div:last-child:nth-child(odd) { grid-column: 1 / -1; } }

/* v5.3 (25 Oct, Lukasz): header as a rounded card, meta 3 per row, top section aligned with the header, list numbers distinct from section numbers, benchmark box */
.s3p { background: transparent; overflow: visible; }
.s3p-top { border-radius: 10px; }
.s3p-sec, .s3p-foot { background: var(--s3-sheet); }
.s3p-sec:last-child { border-radius: 0 0 10px 10px; }
.s3p-next + .s3p-sec { border-radius: 10px 10px 0 0; }
.s3p-brand { text-transform: uppercase; font-size: clamp(15px, 3.6cqi, 20px); }
.s3p-meta { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.s3p-next { background: transparent; padding-left: 0; padding-right: 0; border-top: 0; }
.s3p-next .s3p-steps { padding-left: clamp(18px, 4vw, 40px); padding-right: clamp(18px, 4vw, 40px); }
.s3p-pri li::before, .s3p-pri li:first-child::before { border-radius: 50%; background: var(--s3-blue); color: #fff; }
.s3p-bench { background: #1a1d20; color: #f3f4f2; border-radius: 10px; padding: 16px 18px; display: grid; gap: 4px; border-left: 6px solid #c2412d; }
.s3p-bench small { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #e0573f; }
.s3p-bench b { font-family: var(--s3-display); font-weight: 900; font-size: clamp(24px, 6cqi, 34px); line-height: 1; }
.s3p-bench p { color: #c9d1d8; font-size: 15px; }
@media print { .s3p-sec { background: #fff; } }
.s3p svg.s3p-chart { max-width: 400px; }

/* v5.4 (25 Oct, Lukasz): SUB3 = SUB in the text colour + red 3; more air around "Where to focus" */
.s3p .r3 { color: var(--s3-red); }
.s3p-top .r3, .s3p-focus .r3, .s3p-bench .r3 { color: #e0573f; }
.s3p-next { padding-top: 44px; padding-bottom: 36px; gap: 22px; }

/* v5.8 (26 Oct, Lukasz): phone layout. Red verdict as wide as the cards below, more air under the "Where to focus" line,
   tables fit without sideways scrolling, block names on one line */
.s3p-next h2 span { padding-bottom: 12px; }
@media (max-width: 560px) {
  .s3p-verdict { margin-inline: calc(-1 * clamp(18px, 4vw, 40px)); border-radius: 0; padding-inline: clamp(18px, 4vw, 40px); }
  .s3p th { letter-spacing: .04em; padding-right: 8px; white-space: normal; }
  .s3p td { padding-right: 8px; }
  .s3p td b { font-size: 15px; }
  .s3p td:first-child b { white-space: normal; }
  .s3p-blocks { grid-template-columns: 1fr; }
  .s3p-blocks div { min-height: 0; padding: 12px 14px; }
  .s3p-blocks b { font-size: 20px; hyphens: none; white-space: nowrap; }
}
