/* ============================================================
   /jamfor-privatlan — landing page for paid social
   ------------------------------------------------------------
   Page-only styles on top of styles.css. The look is the site's own: the /privatlan hero (.lp-hero — dark forest gradient, mint
   glow, bar pattern), .lp-mint, .lp-pills, the .lp-rating trust row, .btn--primary, the slider, .ic icons, the dark .site-footer.
   Nothing here redefines a brand colour or font; this file only lays them out (a white card that floats over the band's edge,
   the filled slider track, the steps, the footer's minimal content).

   Phone (default): header · dark band with headline · white card (inputs, result, list, button) overlapping the band's bottom edge
   · chips and trust row on the off-white page below the card · steps · Viktig information · footer. The button stays on the first
   screen at 390 × 844 (checked by tests/jamfor-privatlan-page.test.js); the chips and trust row come after it.
   ≥ 1024 px: two columns (headline, chips and trust on the left, the card on the right, ~1120 px wide in all), see the last block.

   Spacing is one 8 px scale (4 px for the tightest gaps): 8 · 16 · 24 · 32 · 40 · 48 · 56.
   ============================================================ */

/* The sticky "Jämför alternativ" bar main.js adds to every page has no place on a page that already has one button in
   view — same treatment as /ansok. */
body[data-page-key="jamfor_privatlan"] .mobile-cta-bar { display: none !important; }
body[data-page-key="jamfor_privatlan"].has-mcta { padding-bottom: 0; }

/* ---------- Header: the logo only, no menu ---------- */
.jp-header .nav { height: 56px; }
.jp-header .brand-logo { height: 32px; }
.jp-header .wrap { max-width: 552px; padding: 0 16px; }

/* ---------- Hero: band + grid ----------
   .jp-hero is a grid whose side padding keeps the content to 520 px (1072 px from 1024). The band is the site's .lp-hero drawn
   behind it (absolutely placed in grid row 1; from 1024 px rows 1–2) so the card can hang over its bottom edge. */
.jp-hero {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto auto;
  padding-inline: max(16px, calc((100% - 520px) / 2));
}
.jp-hero > * { position: relative; z-index: 1; }
.jp-hero > .jp-band { position: absolute; inset: 0; grid-row: 1 / 2; grid-column: auto; padding: 0; z-index: 0; }

.jp-text { grid-row: 1; padding: 20px 0 64px; }
.jp-h1 { color: #fff; font-size: 1.75rem; line-height: 1.14; letter-spacing: -0.02em; margin: 0 0 8px; }
.jp-sub { margin: 0; font-size: 1.05rem; line-height: 1.4; color: var(--hero-dark-muted); }

/* The white card floats: rounded, soft shadow, pulled up over the band's bottom edge. */
.jp-card {
  grid-row: 2; margin-top: -48px;
  background: var(--surface); border-radius: var(--radius); padding: 16px;
  box-shadow: 0 1px 2px rgba(14,33,28,.06), 0 16px 40px rgba(14,33,28,.20);
  color: var(--ink);
}
.jp-card .field-amt + .field-amt { margin-top: 16px; }
.jp-card .field-amt-row { margin-bottom: 0; }
.jp-card .field-amt-minmax { font-variant-numeric: tabular-nums; }

/* Slider: the track is filled in the brand green up to the thumb. --fill (0–1) is written inline for the first paint and kept
   in step by jamfor-privatlan.js; the thumb's half-width is added so the fill ends under the middle of the thumb. */
.jp-card input[type="range"] {
  --jp-thumb: 20px; --fill: 0;
  background: linear-gradient(to right, var(--accent) calc(var(--jp-thumb) / 2 + (100% - var(--jp-thumb)) * var(--fill)), var(--border-2) 0);
}
@media (max-width: 860px) { .jp-card input[type="range"] { --jp-thumb: 26px; } }

/* ---------- The result: a small label, one number, a plain two-column list, one line of explanation ---------- */
.jp-result { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }
.jp-result-label { margin: 0 0 4px; font-size: 14px; line-height: 1.4; color: var(--muted); }
.jp-monthly { margin: 0; display: flex; align-items: baseline; gap: 4px; line-height: 1.2; color: var(--accent); }
.jp-ca, .jp-unit { font-size: 18px; font-weight: 400; }
.jp-num { font-size: 32px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }

/* Label left, value right, thin dividers. Normal text colour at 15 px — these are the offer's terms, not fine print. The two rates
   share one rule (same size, same weight); the effective rate comes first. */
.jp-facts { margin: 16px 0 0; padding: 0; }
.jp-fact {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  padding: 8px 0; border-top: 1px solid var(--border-2);
  font-size: 15px; line-height: 1.4; color: var(--ink);
}
.jp-fact:last-child { border-bottom: 1px solid var(--border-2); }
.jp-fact dt, .jp-fact dd { margin: 0; }
.jp-fact dt { font-weight: 400; }
.jp-fact dd { font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.jp-example-note { margin: 8px 0 0; font-size: 13px; line-height: 1.5; color: var(--muted); }

/* ---------- The button: full width, brand green, a small arrow, clear hover and pressed states ---------- */
.jp-cta { margin-top: 16px; }
.jp-cta-btn {
  min-height: 56px; padding-inline: 16px; font-size: 1rem; font-weight: 700; gap: 10px;
  box-shadow: 0 6px 16px rgba(30,92,79,.28);
  transition: transform .04s ease, background .15s var(--ease), box-shadow .15s var(--ease);
}
.jp-cta-btn:hover { box-shadow: 0 8px 20px rgba(18,57,48,.34); }
.jp-cta-btn:active { background: #0C2A23; box-shadow: 0 2px 6px rgba(18,57,48,.3); transform: scale(.985); }
.jp-cta-arrow { flex: none; transition: transform .15s var(--ease); }
.jp-cta-btn:hover .jp-cta-arrow { transform: translateX(3px); }
@media (prefers-reduced-motion: reduce) { .jp-cta-btn, .jp-cta-arrow { transition: none; } .jp-cta-btn:hover .jp-cta-arrow { transform: none; } }
.jp-cta-note { margin: 8px 0 0; font-size: 13px; line-height: 1.5; color: var(--muted); }

/* The Sambla badge as a white pill under the sentence (shown only in the Sambla flow). */
.jp-partner { margin-top: 16px; }
.jp-partner[hidden] { display: none; }
.jp-partner-badge.ansok-partner-line {
  display: inline-flex; margin: 0; gap: 8px; padding: 6px 16px 6px 14px;
  background: #fff; border: 1px solid var(--border-2); border-radius: 999px;
  box-shadow: 0 1px 2px rgba(18,21,26,.05);
  font-size: 14px; line-height: 1.4; color: var(--muted);
}
.jp-partner-badge .ansok-partner-logo { height: 20px; }

/* ---------- Chips and trust row (the /privatlan components) ----------
   Phone: they sit under the card on the off-white page, so they take the light palette. From 1024 px they are on the band and
   keep the site's dark-hero palette (the defaults of .lp-pill / .lp-rating inside .lp-hero). */
.jp-trust { grid-row: 3; margin-top: 24px; }
.jp-trust .lp-pills { margin-bottom: 16px; gap: 8px; }
@media (max-width: 479px) { .jp-trust .lp-pill { padding: 8px 12px 8px 10px; font-size: .82rem; gap: 6px; } }
.jp-trust .lp-pill { background: #fff; border-color: var(--border-2); color: var(--ink); }
.jp-trust .lp-pill .ic { color: var(--accent); }
.jp-trust .lp-rating { margin-bottom: 4px; }
.jp-trust .lp-rating-sub, .jp-trust .lp-rating-note { color: var(--muted); }
.jp-trust .lp-rating-note { margin: 4px 0 0; }

/* ---------- Everything under the hero: one column ---------- */
.jp-after { width: min(100% - 32px, 520px); margin-inline: auto; }

/* Three steps: icons in mint circles; a compact list on a phone, one row from 768 px. The texts are the homepage's. */
.jp-steps-section { padding-top: 40px; }
.jp-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.jp-step { display: flex; align-items: center; gap: 16px; }
.jp-step-ic {
  display: flex; align-items: center; justify-content: center; flex: none;
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(53,199,147,.16); color: var(--accent);
}
.jp-step-ic .ic { width: 20px; height: 20px; }
.jp-step-text { font-size: 15px; line-height: 1.4; font-weight: 600; color: var(--ink); }

/* Bra att veta innan du lånar: the educational part under the steps. The site's own pieces — calm white cards with a hairline border and a
   mint icon circle (the steps' icon style), the .acc accordion for the FAQ, quiet outlined links for the guides. No shadow, no colour of
   its own. One column on a phone, two from 600 px, four from 1100 px. Nothing here touches the hero, the card, the button or the steps. */
.jp-learn { margin-top: 56px; }
.jp-learn h2 { font-size: 1.375rem; line-height: 1.25; letter-spacing: -0.01em; margin: 0 0 16px; }
.jp-edu-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.jp-edu {
  display: flex; flex-direction: column; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px;
}
.jp-edu-ic {
  display: flex; align-items: center; justify-content: center; flex: none;
  width: 40px; height: 40px; border-radius: 50%; margin-bottom: 12px;
  background: rgba(53,199,147,.16); color: var(--accent);
}
.jp-edu-ic .ic { width: 20px; height: 20px; }
.jp-edu h3 { margin: 0 0 8px; font-size: 1rem; line-height: 1.3; font-weight: 650; color: var(--ink); overflow-wrap: break-word; }
.jp-edu p { margin: 0 0 12px; font-size: 15px; line-height: 1.55; color: var(--muted); }
.jp-edu-link { margin-top: auto; padding: 8px 0; font-size: 15px; font-weight: 600; line-height: 1.3; color: var(--accent); text-decoration: none; }
.jp-edu-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.jp-learn a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.jp-faq-h { margin: 40px 0 16px; font-size: 1.125rem; line-height: 1.3; letter-spacing: -0.01em; }
.jp-faq .acc summary { padding: 16px 16px 16px 20px; font-size: 15px; line-height: 1.4; }
.jp-faq .acc .acc-body { padding: 0 20px 16px; }
.jp-faq .acc .acc-body p { margin: 0; font-size: 15px; line-height: 1.55; }

.jp-guides-label { margin: 32px 0 8px; font-size: 14px; line-height: 1.4; font-weight: 600; color: var(--muted); }
.jp-guides { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.jp-guides a {
  display: inline-flex; align-items: center; min-height: 40px; padding: 8px 14px;
  background: var(--surface); border: 1px solid var(--border-2); border-radius: 999px;
  font-size: 14px; line-height: 1.3; color: var(--ink); text-decoration: none;
  transition: border-color .15s var(--ease), color .15s var(--ease);
}
.jp-guides a:hover { border-color: var(--accent); color: var(--accent); }
@media (prefers-reduced-motion: reduce) { .jp-guides a { transition: none; } }

/* Viktig information: the Sambla partner line, the representative example, the credit warning — in that order, one calm section.
   The badge, the disclosure sentence and the example are inserted by tracking.js with inline margins and the /ansok
   placeholder's dashed box; here they are plain 14 px text (!important only where the inserted element carries an inline style). */
.jp-info { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--border); }
.jp-info h2 { font-size: 1rem; line-height: 1.3; letter-spacing: -0.01em; margin: 0 0 16px; }
.jp-info .ansok-partner-line { margin: 0 0 8px !important; font-size: 14px; gap: 8px; }
.jp-info .ansok-partner-logo { height: 20px !important; }
.jp-info .jp-disclosure { margin: 0 0 8px; font-size: 14px; line-height: 1.55; color: var(--muted); }
.jp-info .ansok-example-placeholder {
  margin: 0 0 24px !important; padding: 0; border: 0; background: none; text-align: left;
  font-size: 14px; line-height: 1.55; color: var(--muted);
}
.jp-info .creditwarn { margin: 0; }
/* The red triangle must be at least three text lines tall. Under 768 px the site's own sizes already are (58–60 px against
   3 × 19–20 px); from 768 px its 68 px falls 0.4 px short of 3 × 22.8 px, so this page makes it 72 px. */
@media (min-width: 768px) { .jp-info .creditwarn .warn-ic { width: 72px; height: 72px; } }

@media (min-width: 600px) { .jp-edu-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; } }

/* ---------- The site's standard dark footer, with only what this page needs ---------- */
.jp-footer { margin-top: 56px; padding: 40px 0 32px; }
.jp-footer .footer-about .brand { margin-bottom: 0; }
.jp-footer .footer-bottom.jp-footer-bottom { margin-top: 24px; padding-top: 24px; }
.jp-footer .footer-company { margin: 0 0 8px; }
.jp-footer-links { margin: 0 0 8px; display: flex; flex-wrap: wrap; gap: 4px 16px; }
.jp-footer-links .footer-linklike { display: inline; margin: 0; font-size: inherit; }

/* ---------- 768 px and up ---------- */
@media (min-width: 768px) {
  .jp-header .nav { height: 64px; }
  .jp-header .brand-logo { height: 40px; }
  .jp-text { padding: 40px 0 88px; }
  .jp-card { margin-top: -72px; padding: 24px; }
  .jp-result { margin-top: 24px; padding-top: 24px; }
  .jp-cta { margin-top: 24px; }
  .jp-steps-section { padding-top: 56px; }
  .jp-steps { grid-template-columns: repeat(3, 1fr); gap: 24px; }
  .jp-after { width: min(100% - 48px, 1072px); }
  .jp-info > * { max-width: 640px; }
  .jp-learn { margin-top: 64px; }
  .jp-learn h2 { font-size: 1.625rem; margin-bottom: 24px; }
  .jp-faq { max-width: 720px; }
}

/* ---------- 1024 px and up: the laptop layout ----------
   Built so the whole calculator, the button included, is on the first screen of a normal laptop (1280 × 720 and up):
   · two columns inside a ~1120 px container: the hero text, chips and trust row on the left (≤ 440 px), the card on the right
     (~600–640 px);
   · the white card sits fully inside the green band, with the same 48 px of green above and below it; the left block (headline,
     sub-line, chips, trust row) is centred against the card, so there is no empty dark area under it;
   · inside the card: the two sliders side by side (each with its label on the left and its value on the right of one row), the
     big number with its label beside the rate list (that pair centred against the list), the button full width, and under it the
     sentence (left) and the Sambla pill (right);
   · the header is solid and scrolls away (there is no menu to keep in reach), so the card never shows through a blurred bar;
   · the Sambla badge appears once, in the card — "Viktig information" keeps the disclosure sentence, the example and the warning.
   Nothing here applies below 1024 px. */
@media (min-width: 1024px) {
  .jp-header { position: static; background: var(--bg); -webkit-backdrop-filter: none; backdrop-filter: none; }
  .jp-header .wrap { max-width: 1168px; padding: 0 24px; }   /* the logo lines up with the hero's left edge (1120 px of content) */

  .jp-hero {
    grid-template-columns: minmax(0, clamp(340px, 35vw, 440px)) minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) max-content max-content minmax(0, 1fr);   /* the two 1fr rows centre the left block against the card */
    column-gap: 40px;
    padding-inline: max(24px, calc((100% - 1120px) / 2));
  }
  .jp-hero > .jp-band { grid-row: 1 / 5; }               /* the band is as tall as the card plus its green margin */

  .jp-text { grid-column: 1; grid-row: 2; padding: 0; }
  .jp-h1 { font-size: 2.1rem; margin-bottom: 12px; }
  .jp-trust { grid-column: 1; grid-row: 3; align-self: start; margin: 24px 0 0; }
  /* on the band: the site's dark-hero palette */
  .jp-trust .lp-pill { background: rgba(255,255,255,.08); border-color: var(--hero-dark-border); color: var(--hero-dark-ink); }
  .jp-trust .lp-pill .ic { color: var(--mint); }
  .jp-trust .lp-rating-num { color: #fff; }
  .jp-trust .lp-rating-suffix, .jp-trust .lp-rating-sub, .jp-trust .lp-rating-note { color: var(--hero-dark-muted); }

  /* The card, inside the band: 48 px of green above and below. Two columns inside; the amount gets the wider one because its
     label and its value (up to "800 000 kr") must fit one row. */
  .jp-card {
    grid-column: 2; grid-row: 1 / 5; align-self: start; margin: 48px 0; padding: 24px;
    display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); column-gap: 24px; align-content: start;
  }
  .jp-card .field-amt + .field-amt { margin-top: 0; }
  .jp-result, .jp-cta { grid-column: 1 / -1; }

  /* The slider headers: label on the left, value right-aligned at the slider's right edge, on one row. The value boxes are only as
     wide as their longest number, so nothing is indented. */
  .jp-card .field-amt-row { flex-wrap: nowrap; }
  .jp-card #jp-amount { width: 7ch; }
  .jp-card #jp-years { width: 2.4ch; }

  /* the big number with its label on the left, the rate list on the right; the pair is centred against the list */
  .jp-result {
    margin-top: 16px; padding-top: 16px;
    display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); column-gap: 32px; align-items: start;
    grid-template-rows: minmax(0, 1fr) auto auto minmax(0, 1fr) auto;
  }
  .jp-result-label { grid-column: 1; grid-row: 2; margin-bottom: 8px; }
  .jp-monthly { grid-column: 1; grid-row: 3; white-space: nowrap; }
  .jp-num { font-size: 36px; }
  .jp-facts { grid-column: 2; grid-row: 1 / 5; margin: 0; }
  .jp-example-note { grid-column: 1 / -1; grid-row: 5; }

  /* the button full width; the sentence under it on the left, the Sambla pill on the right of the same row */
  .jp-cta { margin-top: 16px; display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 24px; align-items: center; }
  .jp-cta-btn { grid-column: 1 / -1; }
  .jp-cta-note { grid-column: 1; margin-top: 12px; }
  .jp-partner { grid-column: 2; margin-top: 12px; }

  .jp-steps-section { padding-top: 48px; }
  .jp-after { width: min(100% - 48px, 1120px); }
  .jp-footer { margin-top: 56px; }

  /* the Sambla badge is already in the card; here the disclosure sentence, the example and the warning stay */
  .jp-info .ansok-partner-line { display: none !important; }
}

/* Four explainers in one row once there is room (the cards then are ~260 px wide inside a 1120 px container). */
@media (min-width: 1100px) { .jp-edu-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
