/* /dla-rodziny/ – tabela obszarów ochrony, lista kontrolna zabezpieczeń, warunki polisy. */

/* ---------- Cztery obszary (tabela na desktopie, karty na telefonie) ---------- */
.areas { border-bottom: 1px solid var(--line); }
.areas__head, .area {
  display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 4fr) minmax(0, 4fr); column-gap: var(--gap);
}
.areas__head { padding-bottom: .85rem; border-bottom: 1px solid var(--line-strong); font-size: var(--fs-xs); font-weight: 600; color: var(--muted); }
.areas__head span:first-child { padding-left: 3.75rem; }
.area { position: relative; padding-block: clamp(1.75rem, 1.3rem + 1.4vw, 2.5rem); border-top: 1px solid var(--line); }
.area:first-of-type { border-top: 0; }
.area__title { display: grid; grid-template-columns: 2.5rem minmax(0, 1fr); gap: 0 1.25rem; align-items: start; }
.area__title h3 { font-size: clamp(1.375rem, 1.25rem + .5vw, 1.625rem); }
.area__title p { margin-top: .35rem; font-size: var(--fs-sm); color: var(--muted); max-width: 22em; }
.area__cell { font-size: var(--fs-sm); line-height: 1.65; }
.area__cell .list-dash li + li { margin-top: .55rem; }
.area__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.area__more { margin-top: 1rem; }
@media (max-width: 960px) {
  .areas__head { display: none; }
  .area { grid-template-columns: 1fr; row-gap: 1.1rem; }
  .area:first-of-type { border-top: 1px solid var(--line-strong); }
  .area__cell { padding-left: 3.75rem; }
  .area__label { position: static; width: auto; height: auto; overflow: visible; clip: auto; display: block; margin-bottom: .3rem; font-size: var(--fs-xs); font-weight: 600; color: var(--gold-deep); }
}
@media (max-width: 560px) {
  .area__title { grid-template-columns: 2rem minmax(0, 1fr); gap: 0 .9rem; }
  .area__title .feature__icon { width: 1.6rem; height: 1.6rem; }
  .area__cell { padding-left: 0; }
}

/* ---------- Lista kontrolna ---------- */
.check-map { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); row-gap: 2.5rem; align-items: start; }
.check-map__form { grid-column: 1 / span 6; }
.check-map__result { grid-column: 8 / span 5; }
.check-map__intro { margin-top: 1.25rem; max-width: 34em; }

.check-map__fields { margin-top: 2.25rem; display: grid; gap: 2.25rem; }
.check-map__set { border: 0; margin: 0; padding: 0; min-width: 0; }
.check-map__set legend {
  display: flex; align-items: baseline; gap: .75rem; padding: 0; margin-bottom: .6rem;
  font: 500 1.25rem/1.3 var(--font-serif); color: var(--ink);
}
.check-map__set legend span { font: 400 1.25rem/1 var(--font-serif); color: var(--gold); }

.opt {
  display: grid; grid-template-columns: 1.25rem minmax(0, 1fr); gap: .9rem; align-items: start;
  padding: .8rem .9rem; margin-inline: -.9rem; border-top: 1px solid var(--line); cursor: pointer;
  border-radius: var(--radius); transition: background-color .15s var(--ease);
}
.check-map__set .opt:last-of-type { border-bottom: 1px solid var(--line); }
.opt:hover { background: rgba(255, 255, 255, .7); }
.opt input {
  appearance: none; -webkit-appearance: none; margin: .18rem 0 0; width: 1.25rem; height: 1.25rem; flex: none;
  border: 1.5px solid var(--line-strong); border-radius: 2px; background: var(--white); cursor: pointer;
  display: grid; place-items: center; transition: background-color .15s, border-color .15s;
}
.opt input::after {
  content: ""; width: .32rem; height: .62rem; margin-top: -.12rem;
  border: solid var(--white); border-width: 0 2px 2px 0; transform: rotate(45deg) scale(0); transition: transform .15s var(--ease);
}
.opt input:checked { background: var(--ink); border-color: var(--ink); }
.opt input:checked::after { transform: rotate(45deg) scale(1); }
.opt input:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.opt:hover input:not(:checked) { border-color: var(--ink); }
.opt > span { font-size: var(--fs-sm); line-height: 1.5; color: var(--text); }
.opt input:checked + span { color: var(--ink); font-weight: 600; }
.opt small { display: block; margin-top: .15rem; font-size: var(--fs-xs); font-weight: 400; color: var(--muted); }

.check-map__jump { display: none; }

/* Karta wyniku */
.cm-card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(1.5rem, 1rem + 2vw, 2.5rem);
}
.cm-card > * + * { margin-top: 1rem; }
.cm-card__top { font-size: var(--fs-xs); font-weight: 600; color: var(--muted); }
.cm-card__title { font-size: clamp(1.5rem, 1.3rem + .8vw, 1.875rem); line-height: 1.25; font-weight: 450; }
.cm-card__title:focus { outline: none; }
.cm-card__lead { color: var(--text); }
.cm-card__preview { margin-top: 1.5rem; border-top: 1px solid var(--line); }
.cm-card__preview li { display: flex; align-items: center; gap: .75rem; padding: .7rem 0; border-bottom: 1px solid var(--line); font-size: var(--fs-sm); color: var(--line-strong); }
.cm-card__preview i { width: .6rem; height: .6rem; border: 1.5px solid var(--line-strong); border-radius: 50%; }
.cm-card__preview + p { margin-top: 1.5rem; }

/* pasek stanu: jeden segment na obszar */
.cm-bar { display: flex; gap: 3px; margin-top: 1.25rem; }
.cm-bar i { flex: 1; height: 4px; background: var(--line); }
.cm-bar i.is-ok { background: var(--steel-deep); }
.cm-bar i.is-check { background: var(--gold); }
.cm-bar i.is-gap { background: var(--ink); }
.cm-legend { display: flex; flex-wrap: wrap; gap: .35rem 1.25rem; font-size: var(--fs-xs); color: var(--muted); }
.cm-legend span { display: inline-flex; align-items: center; gap: .4rem; }
.cm-legend span::before { content: ""; width: .75rem; height: 4px; background: var(--line); }
.cm-legend .is-ok::before { background: var(--steel-deep); }
.cm-legend .is-check::before { background: var(--gold); }
.cm-legend .is-gap::before { background: var(--ink); }

.cm-gaps { margin-top: 1.75rem !important; border-top: 1px solid var(--line-strong); }
.cm-gap { padding: 1.15rem 0; border-bottom: 1px solid var(--line); }
.cm-gap__head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.cm-gap h4 { font: 500 1.1875rem/1.35 var(--font-serif); color: var(--ink); }
.cm-tag { flex: none; font-size: var(--fs-xs); font-weight: 650; white-space: nowrap; }
.cm-tag { display: inline-flex; align-items: center; gap: .4rem; }
.cm-tag::before { content: ""; width: .75rem; height: 4px; }
.cm-tag--gap { color: var(--ink); }
.cm-tag--gap::before { background: var(--ink); }
.cm-tag--check { color: var(--gold-deep); }
.cm-tag--check::before { background: var(--gold); }
.cm-gap p { margin-top: .4rem; font-size: var(--fs-sm); line-height: 1.6; }
.cm-gap p a { font-size: var(--fs-sm); }

.cm-sub { margin-top: 1.75rem !important; font-size: var(--fs-sm); font-weight: 650; color: var(--ink); }
.cm-ok { margin-top: .6rem !important; font-size: var(--fs-sm); }
.cm-ok li::before { border-color: var(--steel-deep); }
.cm-na { font-size: var(--fs-xs); color: var(--muted); }
.cm-firm { padding: 1rem 1.1rem; background: var(--mist); border-radius: var(--radius); font-size: var(--fs-sm); }
.cm-actions { margin-top: 1.75rem !important; }
.cm-note { font-size: var(--fs-xs); color: var(--muted); line-height: 1.55; }

@media (prefers-reduced-motion: no-preference) {
  .cm-card.is-new { animation: cm-in .35s var(--ease); }
  @keyframes cm-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
}

@media (max-width: 1100px) {
  .check-map__form { grid-column: 1 / span 6; }
  .check-map__result { grid-column: 7 / span 6; }
}
@media (max-width: 960px) {
  .check-map__form, .check-map__result { grid-column: 1 / -1; }
  .check-map__jump:not([hidden]) {
    display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1rem; align-items: baseline;
    position: sticky; bottom: 4.25rem; z-index: 5; padding: .85rem 1rem; margin-top: -.75rem;
    background: var(--ink); color: var(--white); border-radius: var(--radius); font-size: var(--fs-sm); font-weight: 600;
  }
  .check-map__jump .link { color: var(--white); }
}
@media (min-width: 760px) and (max-width: 960px) {
  .check-map__jump:not([hidden]) { bottom: 1rem; }
}
@media (max-width: 560px) {
  .cm-card { padding: 1.25rem; }
  .cm-actions .btn { width: 100%; }
  .cm-gap__head { flex-direction: column; gap: .15rem; }
  .opt { margin-inline: 0; padding-inline: 0; }
  .opt:hover { background: none; }
}

/* ---------- Warunki polisy ---------- */
.terms { margin-top: clamp(3rem, 2rem + 3vw, 5rem); padding-top: clamp(2rem, 1.5rem + 1.5vw, 3rem); border-top: 1px solid var(--line-strong); }
.terms__title { font-size: var(--fs-h3); }
.terms__text { margin-top: 1rem; color: var(--muted); font-size: var(--fs-sm); max-width: 26em; }
.terms__dl { grid-template-columns: minmax(9rem, 12rem) minmax(0, 1fr); }
.terms__dl dt { font: 500 1.0625rem/1.4 var(--font-serif); color: var(--ink); }
.terms__dl dd { color: var(--text); }
.terms__dl dt:last-of-type, .terms__dl dd:last-of-type { border-bottom: 1px solid var(--line); }
.terms__note { margin-top: 2.5rem; }
@media (max-width: 560px) {
  .terms__dl { grid-template-columns: 1fr; }
  .terms__dl dd { border-top: 0; padding-top: 0; }
}

.faq-aside { margin-top: 1.25rem; color: var(--muted); }
