/* Rättsskydd (/rattsskydd/): an editorial opener (the headline over a full-bleed sill), four facts as four pictures
   in an uneven sequence (the third is the small fee bar splitting), the check, the policy note + FAQ, a warm close. */

/* ---------- hero ---------- */
.ratt-hero__top { padding-top: var(--s-8); padding-bottom: var(--s-7); }
.ratt-hero__h1 { max-width: 15ch; }
.ratt-hero__aside { margin-top: var(--s-6); display: grid; gap: var(--s-5); }
.ratt-hero__aside .bl-lede { max-width: 40rem; }
.ratt-hero__band { position: relative; background: var(--sun); }
.ratt-hero__band img { width: 100%; height: auto; }
@media (min-width: 721px) {
  .ratt-hero__band { height: clamp(340px, 58vh, 660px); overflow: hidden; }
  .ratt-hero__band picture, .ratt-hero__band img { width: 100%; height: 100%; }
  .ratt-hero__band img { object-fit: cover; object-position: 50% 64%; }
}
@media (min-width: 1024px) {
  .ratt-hero__h1 { max-width: none; }
  .ratt-hero__aside { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: end; gap: var(--s-7); }
  .ratt-hero__aside .bl-actions { justify-content: flex-end; padding-bottom: 4px; }
}
/* phone: the picture leads the first screen (a 4:3 crop on the geraniums and the folder), the headline under it */
@media (max-width: 759.98px) {
  .ratt-hero { display: flex; flex-direction: column; }
  .ratt-hero__band { order: -1; aspect-ratio: 4 / 3; overflow: hidden; }
  .ratt-hero__band picture, .ratt-hero__band img { width: 100%; height: 100%; }
  .ratt-hero__band img { object-fit: cover; object-position: 50% 58%; }
  .ratt-hero__top { padding-top: var(--s-6); padding-bottom: var(--s-6); }
}

/* ---------- four facts: an uneven editorial sequence ---------- */
.ratt-facts__h { margin-bottom: var(--s-8); max-width: 14ch; }
.ratt-facts__list { list-style: none; display: grid; gap: var(--s-9); }
.ratt-fact { display: grid; gap: var(--s-5); align-items: end; }
.ratt-fact__pic { margin: 0; }
.ratt-fact__pic picture, .ratt-fact__pic img { width: 100%; height: 100%; }
.ratt-fact__text h3 { font-size: clamp(1.5rem, 1.2rem + 1vw, 2.125rem); line-height: 1.12; margin-bottom: var(--s-3); max-width: 18ch; }
.ratt-fact__text p { max-width: 34rem; }
.ratt-fact--1 .ratt-fact__pic { aspect-ratio: 7 / 5; }
.ratt-fact--2 .ratt-fact__pic { aspect-ratio: 8 / 7; }
.ratt-fact--4 .ratt-fact__pic { aspect-ratio: 3 / 2; }
.ratt-fact--4 .ratt-fact__pic img { object-position: 60% 40%; }
@media (max-width: 1023.98px) {
  .ratt-facts__list { gap: var(--s-8); }
  .ratt-fact--2 .ratt-fact__pic { width: 82%; margin-left: auto; }
}
@media (min-width: 1024px) {
  .ratt-fact { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--s-6); }
  .ratt-fact > * { grid-row: 1; }
  .ratt-fact--1 .ratt-fact__pic { grid-column: 1 / span 7; }
  .ratt-fact--1 .ratt-fact__text { grid-column: 9 / span 4; padding-bottom: var(--s-4); }
  .ratt-fact--2 { margin-top: calc(-1 * var(--s-6)); }
  .ratt-fact--2 .ratt-fact__text { grid-column: 2 / span 4; align-self: start; padding-top: var(--s-8); }
  .ratt-fact--2 .ratt-fact__pic { grid-column: 7 / span 5; }
  .ratt-fact--3 .ratt-fact__pic { grid-column: 1 / span 8; }
  .ratt-fact--3 .ratt-fact__text { grid-column: 9 / span 4; align-self: center; }
  .ratt-fact--4 .ratt-fact__text { grid-column: 1 / span 4; align-self: center; }
  .ratt-fact--4 .ratt-fact__pic { grid-column: 5 / span 8; margin-right: calc(-1 * var(--gut)); border-radius: var(--r-2) 0 0 var(--r-2); }
}
@media (min-width: 1500px) { .ratt-fact--4 .ratt-fact__pic { margin-right: 0; border-radius: var(--r-2); } }

/* ---------- F3: the fee bar is the picture ---------- */
.ratt-bar {
  --p: 1; aspect-ratio: auto; padding: clamp(24px, 4vw, 56px); border-radius: var(--r-2);
  background: radial-gradient(120% 90% at 85% 0%, rgba(230,237,245,.9), rgba(230,237,245,0) 60%), var(--paper);
  box-shadow: var(--sh-raised); border: 1px solid var(--line);
}
.ratt-bar__label { font: 500 clamp(1.25rem, 1.05rem + .6vw, 1.625rem)/1.2 var(--f-head); margin-bottom: var(--s-5); }
.ratt-bar__track { position: relative; height: clamp(56px, 6vw, 72px); border-radius: 14px; overflow: hidden; background: var(--sea); }
/* lead 2026-11-14 (QA r1 #5): the självrisk part grows with the insurer's part at 24:76, never larger */
/* v2-3 (lead 11-23): the client's part is 24 % from the start; the insurer's part fills the rest with the scroll */
.ratt-bar__track::before { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 20%; background: var(--ochre); }
.ratt-bar__ins {
  position: absolute; top: 0; bottom: 0; right: 0; width: calc(80% * var(--p)); background: var(--teal);
  box-shadow: -4px 0 0 var(--paper); border-radius: 0 14px 14px 0;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.ratt-bar__word {
  color: #fff; white-space: nowrap; font: italic 450 clamp(1.25rem, 1rem + 1vw, 1.875rem)/1 var(--f-head);
  opacity: clamp(0, calc((var(--p) - .8) * 5), 1);
}
.ratt-bar__keys { position: relative; height: 2.2em; margin-top: 10px; font: 600 var(--small)/1.2 var(--f-text); }
.ratt-bar__key { position: absolute; top: 0; white-space: nowrap; padding-top: 10px; }
.ratt-bar__key::before { content: ""; position: absolute; top: 0; width: 2px; height: 8px; border-radius: 1px; }
.ratt-bar__key--own { left: 0; color: #2E4A6B; }
.ratt-bar__key--own::before { left: 0; background: var(--ochre); }
.ratt-bar__key--ins { right: 0; color: var(--teal); opacity: clamp(0, calc(var(--p) * 2 - .6), 1); }
.ratt-bar__key--ins::before { right: 0; background: var(--teal); }
.ratt-bar__note { margin-top: var(--s-4); font-size: var(--small); color: var(--mute); max-width: 40rem; }

/* ---------- the check ---------- */
.ratt-check { background: linear-gradient(180deg, var(--cream), #EFF3F8 18%, #EFF3F8 82%, var(--cream)); }

/* ---------- policy + FAQ ---------- */
.ratt-faq__in { display: grid; gap: var(--s-8); }
.ratt-policy { border-left: 4px solid var(--ochre); padding-left: var(--s-5); align-self: start; }
.ratt-policy h2 { font-size: clamp(1.625rem, 1.3rem + 1.2vw, 2.375rem); margin-bottom: var(--s-4); }
.ratt-faq__h { font-size: clamp(1.625rem, 1.3rem + 1.2vw, 2.375rem); margin-bottom: var(--s-5); }
.ratt-faq__item { border-top: 1px solid var(--line); }
.ratt-faq__item:last-of-type { border-bottom: 1px solid var(--line); }
.ratt-faq__item summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: var(--s-4);
  min-height: 60px; padding: var(--s-4) 0; font: 500 clamp(1.125rem, 1.05rem + .3vw, 1.3125rem)/1.3 var(--f-head);
}
.ratt-faq__item summary::-webkit-details-marker { display: none; }
.ratt-faq__item summary::after {
  content: ""; flex: none; width: 14px; height: 14px; margin-right: 6px; border-right: 2px solid var(--teal); border-bottom: 2px solid var(--teal);
  transform: translateY(-3px) rotate(45deg); transition: transform 240ms var(--ease);
}
.ratt-faq__item[open] summary::after { transform: translateY(3px) rotate(-135deg); }
.ratt-faq__item summary:hover { color: var(--teal); }
.ratt-faq__item p { padding: 0 0 var(--s-5); color: var(--ink); }
@media (min-width: 1024px) {
  .ratt-faq__in { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--s-9); }
  .ratt-policy { position: relative; top: 0; margin-top: var(--s-8); }
}

/* ---------- close ---------- */
.ratt-close { padding: var(--s-9) 0; background: radial-gradient(70% 120% at 20% 100%, rgba(155,179,207,.32), rgba(155,179,207,0) 70%), var(--sun); }
.ratt-close__in h2 { margin-bottom: var(--s-4); max-width: 18ch; }
.ratt-close__in .bl-lede { margin-bottom: var(--s-6); max-width: 38rem; }
@media (max-width: 759.98px) { .ratt-close { padding: var(--s-8) 0; } }

/* ---------- v2-6: the fee bar static and labelled inside ---------- */
.ratt-bar { --p: 1; }
.ratt-bar__own { position: absolute; top: 0; bottom: 0; left: 0; width: 20%; z-index: 1; display: flex; align-items: center;
  justify-content: center; overflow: hidden; }
