/* Sekcje rozwijane z okrągłym przyciskiem +/–.
   Komponenty z własną ikoną lub kartą zachowują swój układ. */

details > summary { list-style: none; }
details > summary::-webkit-details-marker { display: none; }
details > summary::marker { content: ''; }

details:not(:has(> summary > .icon), .wywiad-why) {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0 clamp(16px, 2vw, 20px);
  margin-block: 16px;
}
details > summary:not(:has(> .icon)) {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 56px;
  padding: 10px 0;
  cursor: pointer;
  font-weight: 650;
  font-size: 16px;
  line-height: 1.3;
  color: var(--ink);
  overflow-wrap: anywhere;
}
details > summary:not(:has(> .icon))::after {
  content: '';
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--rose) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23783e51' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E") center / 16px no-repeat;
  transition: background-color .15s;
}
details[open] > summary:not(:has(> .icon))::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23783e51' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M5 12h14'/%3E%3C/svg%3E");
}
details > summary:not(:has(> .icon)):hover::after { background-color: var(--error); }
details > summary:not(:has(> .icon)):focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; border-radius: 10px; }
details[open]:not(:has(> summary > .icon), .wywiad-why) { padding-block-end: 16px; }
details[open] > summary:not(:has(> .icon)) { border-bottom: 1px solid var(--line); margin-bottom: 12px; }
details > :is(ol, ul) { padding-inline-start: 22px; }

/* Zagnieżdżone sekcje korzystają z odstępu od krawędzi karty nadrzędnej. */
:is(.answer-list, details) details:not(:has(> summary > .icon), .wywiad-why) {
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding-inline: 0;
  margin: 0;
  background: transparent;
}

@media (max-width: 679px) {
  details > summary:not(:has(> .icon)) { font-size: 15px; min-height: 52px; }
}
@media (prefers-reduced-motion: reduce) {
  details > summary::after { transition: none; }
}

/* Czytelność na telefonie (audyt 21.11): minimalne rozmiary krojów i cele dotyku */
.small-label { font-size: 14px; }
.institution { font-size: 14px; }
.filter { font-size: 14px; min-height: 44px; display: inline-flex; align-items: center; }
.text-button { font-size: 14px; }
@media (max-width: 679px) {
  /* „Zapytaj Otulę” jako okrągła ikona – nie zasłania kart i wyników */
  .assistant-launcher { padding: 0; width: 56px; min-height: 56px; justify-content: center; border-radius: 50%; }
  .assistant-launcher span:not(.icon) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  #main { padding-bottom: 96px; }
}

/* Menu boczne: grupy z nagłówkami, krótsze pozycje */
#sidebar nav .nav-section { margin-top: 18px; }
#sidebar .nav-item { min-height: 42px; padding-top: 8px; padding-bottom: 8px; line-height: 1.25; }

/* Teczka sprawy: kroki jako spokojna lista etykiet, nie klikalny stepper */
.zus-steps { display: flex !important; flex-wrap: wrap; gap: 8px !important; margin: 14px 0 !important; counter-reset: none; }
.zus-steps li { counter-increment: none; padding: 6px 14px; border-radius: 999px; background: var(--rose); color: var(--berry); font-size: 14px; font-weight: 650; }
.zus-steps li:before { content: none !important; }

/* Przycisk asystenta nie zasłania treści na komputerze */
@media (min-width: 1000px) {
  .assistant-launcher { padding: 0; width: 56px; min-height: 56px; justify-content: center; border-radius: 50%; }
  .assistant-launcher span:not(.icon) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

/* Spójne karty i cienie na wszystkich ekranach */
.zus-notice { border-radius: 16px; }
.zus-result, .zus-dossier { border-radius: 22px; }
/* Wspólna warstwa spójności — STYL-I-DESIGN, rozdział 12. */
:root { --card-radius:22px; }
body { line-height:1.5; }
button, a { -webkit-tap-highlight-color:transparent; }
.button,.filter,.text-button,.profile-button,.chip,.eu-sym,.sprawa-status,.zus-simulation-badge { font-size:14px; border-radius:999px; }
.button,.filter,.text-button,.profile-button,.icon-button,.eu-menu a,.eu-menu button { min-height:44px; }
#sidebar .nav-item { min-height:44px; }
.small-label,.nav-label,.hero-label,.institution { font-size:12px; text-transform:uppercase; }
.crumb,.frame-date,.brand-subtitle,.home-family label,.home-family a,.home-shortcuts a,.benefit-launch small,.home-kicker,.home-date-icon small,.home-date p,.dashboard-link,.progress span,.case-sub,.path-status,.plan-note,.plan-note a,.stage-label,.stats small,.stats p,.date-form p,.calendar-weekdays,.calendar-legend,.back-link span,.eu-profile small,.source-box a,.segmented span,.segmented small,.handbook-hero p,.handbook-tabs a,.shelf-choice { font-size:14px; }
input:not([type=checkbox]):not([type=radio]):not([type=file]),select,textarea { font-size:16px; font-family:'DM Sans','Segoe UI',sans-serif; line-height:1.5; min-height:48px; max-width:100%; color:var(--ink); background-color:#fff; border:1px solid var(--line); border-radius:15px; padding:10px 12px; }
select { appearance:none; padding-right:36px; background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23783e51' stroke-width='1.65' stroke-linecap='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E"); background-position:right 10px center; background-repeat:no-repeat; background-size:18px; }
input[type=checkbox],input[type=radio] { accent-color:var(--berry); width:22px; height:22px; flex:none; }
label:has(> input[type=checkbox]),label:has(> input[type=radio]) { min-height:44px; }
input[type=file]::file-selector-button { border:1px solid var(--line); background:var(--rose); color:var(--berry); min-height:44px; border-radius:999px; padding:8px 16px; font:600 14px 'DM Sans',sans-serif; margin-right:12px; }
:focus-visible { outline:3px solid var(--focus); outline-offset:3px; }
.zus-wizard-progress button,.zus-segment-control button { border-radius:999px; font-size:14px; min-height:48px; }
.zus-guide-cards article,.zus-guide-help,.month-card,.eu-card,.eu-login,.sprawa-drop,.zus-dossier,.zus-result { border-radius:var(--card-radius); }
.zus-guide-cards article { background:var(--peach); }
.zus-guide-cards article:nth-child(3n+2) { background:var(--rose); }
.zus-guide-cards article:nth-child(3n+3) { background:var(--gold); }
.zus-guide-help { background:var(--sage); }
.back-link { display:inline-flex; align-items:center; min-height:44px; font-size:14px; margin-bottom:16px; }
.zus-steps li { background:var(--peach); color:var(--peach-ink); }
@media(max-width:700px) {
 .zus-wizard-progress { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
 .zus-wizard-progress button { flex-direction:row; align-items:center; padding:10px; gap:8px; }
 .zus-wizard-progress button strong { overflow-wrap:normal; font-size:14px; }
 .zus-wizard-progress button span { font-size:14px; }
 .brand-subtitle { font-size:14px; }
 #main { padding-left:16px; padding-right:16px; }
 .page-heading h1 { font-size:clamp(38px,7vw,48px); }
}
@media(prefers-reduced-motion:reduce) {
 *,*::before,*::after { animation:none!important; transition:none!important; scroll-behavior:auto!important; }
}
/* Domknięcie pomiaru 320 px: podpis marki i etykiety pomocnicze. */
.mobile-brand .brand-subtitle,.home-progress h3,.ring small,#main label small { font-size:14px; }
#main h1 { font-size:clamp(38px,4.6vw,64px); }
#main h2 { font-size:clamp(25px,2.5vw,36px); }
.starter-list button { min-height:44px; border-radius:999px; }
.back-link > span { overflow:visible; text-overflow:clip; white-space:normal; text-align:left; }
.zus-hospital-fields { grid-column:1/-1; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; padding:20px; border:1px solid var(--line); border-radius:22px; background:var(--gold); }
.zus-hospital-fields > :is(legend,p,.zus-notice,.zus-checkbox) { grid-column:1/-1; }
.sprawa-decyzja.nieustalona { background:var(--gold); color:var(--gold-ink); border-color:var(--gold-ink); }
.cal-done { background:var(--sage); color:var(--sage-ink); border-color:var(--sage-ink); }
.calendar-leaf small { font-size:12px; }
@media(max-width:700px) { .zus-hospital-fields { grid-template-columns:minmax(0,1fr); padding:16px; } }
@media(max-width:400px) {
 .home-feature { display:flex; flex-direction:column; align-items:stretch; }
 .home-feature .feature-art { display:none; }
 .home-feature .mobile-feature-art { display:block; width:100%; height:150px; object-fit:contain; background:var(--peach); }
 .home-feature .feature-copy { width:100%; padding:20px; }
 .home-feature .feature-copy h2 { overflow-wrap:normal; }
 .ask-hero,.reader-hero,.daily-hero { grid-template-columns:minmax(0,1fr); }
 .ask-hero .ask-art,.reader-hero .reader-art,.daily-hero .daily-art { grid-row:1; width:100%; height:110px; min-height:110px; margin:0; background-size:contain; }
 .ask-hero>div:first-child,.reader-hero>div:first-child { padding:16px; }
 .reader-hero .small-label { font-size:12px; }
}

/* ===== Czcionka: okrągła i delikatna (Nunito, SIL OFL) ===== */
@font-face { font-family: 'Nunito'; src: url('assets/nunito.ttf') format('truetype'); font-weight: 200 1000; font-style: normal; font-display: swap; }
:root { --serif: 'Nunito', 'Segoe UI', sans-serif; }
body, button, input, select, textarea { font-family: 'Nunito', 'DM Sans', 'Segoe UI', sans-serif; }
h1, h2, h3, .brand > span, .request-card textarea, .big { font-family: 'Nunito', 'Segoe UI', sans-serif; }
h1, h2 { font-weight: 700; letter-spacing: -.015em; }
h3 { font-weight: 700; }
.hero h1, .page-intro h1, .welcome h1, .case-head h1 { letter-spacing: -.02em; }
.small-label, .home-kicker, .nav-label { font-weight: 800; letter-spacing: .1em; }
.button, .filter, .chip, .stage-label { font-weight: 750; }
.case-title, .catalog-card strong { font-weight: 750; }

/* ===== Więcej kolorów ze smakiem: błękit i lilia obok brzoskwini, żółci, różu i szałwii ===== */
.sky { background-color: #e1eef8; color: #3d6488; }
.lilac { background-color: #ece4f6; color: #6b4f8f; }
.tile-icon { border-radius: 16px; }

/* ===== Start: ułożone w siatkę, kolorowe karty o równych wysokościach ===== */
main:has(.home-dashboard) > .back-link { display: none; }
.home-dashboard .home-shortcuts { display: none; }
.home-dashboard .dashboard-panels { gap: 16px; align-items: stretch; }
.home-dashboard .home-progress { border: 1px solid var(--line, #e9e1dd); }
.home-dashboard .home-kicker { font-size: 12px; }
@media (max-width: 999px) {
  .home-dashboard .home-shortcuts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; }
  .home-dashboard .home-shortcuts a, .home-dashboard .home-shortcuts a:nth-child(n) { border-radius: 16px; min-height: 52px; font-size: 13.5px; }
}

/* ===== Biblioteka spraw: kolorowe karty z dużą ikoną ===== */
.catalog-grid { gap: 16px; }
.catalog-card { position: relative; overflow: hidden; border-radius: 22px; padding: 20px; border: 1px solid var(--line, #e9e1dd); transition: transform .15s, box-shadow .15s; }
.catalog-card::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 5px; background: var(--c, #f2d98a); }
.catalog-card:hover { transform: translateY(-2px); box-shadow: 0 10px 26px #5a2e4014; }
.catalog-card .tile-icon { width: 54px; height: 54px; border-radius: 18px; }
.catalog-card .tile-icon svg { width: 28px; height: 28px; }
.catalog-card.peach { --c: #f4b99a; background: linear-gradient(180deg, #fff6f0, #fff 55%); }
.catalog-card.gold  { --c: #f2d98a; background: linear-gradient(180deg, #fffaec, #fff 55%); }
.catalog-card.rose  { --c: #eaa9bd; background: linear-gradient(180deg, #fff3f6, #fff 55%); }
.catalog-card.sage  { --c: #b9d3a8; background: linear-gradient(180deg, #f6faf1, #fff 55%); }
.catalog-card.sky   { --c: #a9cbe6; background: linear-gradient(180deg, #f1f7fc, #fff 55%); }
.catalog-card.lilac { --c: #cdb9e6; background: linear-gradient(180deg, #f7f2fc, #fff 55%); }
.catalog-card strong { font-size: 17px; line-height: 1.3; }
.catalog-foot { border-top-color: #00000010; }

/* ===== Poprawki po przeglądzie ===== */
main :is(h1, h2), .dashboard-head h1, .home-feature h2, .home-calendar h2, .home-progress h2, .home-reading h2, .path-summary h2, .section-title h2 { font-weight: 700; }
.catalog-card, .catalog-card.peach, .catalog-card.gold, .catalog-card.rose, .catalog-card.sage, .catalog-card.sky, .catalog-card.lilac { color: var(--ink, #452e35); }
.catalog-card .tile-icon.peach { color: #934e3f; } .catalog-card .tile-icon.gold { color: #80611f; } .catalog-card .tile-icon.rose { color: #91526c; }
.catalog-card .tile-icon.sage { color: #4c6944; } .catalog-card .tile-icon.sky { color: #3d6488; } .catalog-card .tile-icon.lilac { color: #6b4f8f; }
.catalog-card .catalog-foot { color: var(--berry, #783e51); font-weight: 750; }
.search-box { background: #fff; border-radius: 18px; }
.search-box input, .search-box input:focus { border: 0 !important; box-shadow: none !important; background: transparent !important; outline: none; border-radius: 0; }
.library-search { margin-block-end: 20px; }
.library-tools { display: flex; gap: 8px; margin-bottom: 4px; }

/* Podsumowanie rodzica: istniejące karty i tokeny, szczegóły niżej. */
.home-dashboard > section { margin-bottom:24px; }
#main .home-dashboard .zus-guide-cards h2 { margin:12px 0 8px; font-size:25px; line-height:1.25; }
.home-dashboard .zus-guide-cards p { font-size:16px; line-height:1.5; }
.home-dashboard .zus-guide-cards .home-progress { display:flex; flex-direction:column; align-items:flex-start; padding:22px; }
.home-dashboard .zus-guide-cards .dashboard-link { margin-top:auto; }
.home-dashboard .home-progress > p { margin:12px 0; }
.home-dashboard .home-progress > .button { margin-top:12px; }
.home-dashboard > .home-progress > .dashboard-link { margin-left:16px; }
#main .home-dashboard .dashboard-head h1 { font-size:clamp(38px,4vw,52px); letter-spacing:-.025em; }
.home-dashboard .dashboard-panels { grid-template-columns:repeat(2,minmax(0,1fr)); }
@media (min-width:1100px) { .home-dashboard .zus-guide-cards { grid-template-columns:repeat(3,minmax(0,1fr)); } }
@media (max-width:700px) {
  .home-dashboard .dashboard-panels { grid-template-columns:minmax(0,1fr); }
  .home-dashboard .zus-guide-cards .home-progress { padding:18px; }
  .home-dashboard > .home-progress > .dashboard-link { margin-left:0; display:flex; }
}

/* ===== Wywiad: spokojniejsze pytania, nawigacja wstecz/dalej, wyjaśnienia ===== */
.wywiad-page { max-width: 820px; }
.wywiad-stepper { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; margin: 4px 0 16px; }
.wywiad-nav-btn { min-height: 44px; padding: 0 16px; font-size: 14px; white-space: nowrap; }
.wywiad-nav-btn[disabled] { opacity: .4; cursor: default; }
.wywiad-progressbar { position: relative; display: grid; gap: 6px; font-size: 13px; color: var(--muted, #6f6265); font-weight: 700; }
.wywiad-progressbar::after { content: ''; display: block; height: 6px; border-radius: 99px; background: #f3e8ec; }
.wywiad-progressbar i { position: absolute; left: 0; bottom: 0; height: 6px; border-radius: 99px; background: linear-gradient(90deg, #f4b99a, #eaa9bd); transition: width .2s; }
.wywiad-question { border-radius: 24px; border: 1px solid var(--line, #e9e1dd); box-shadow: 0 8px 28px #5a2e400d; }
.wywiad-question h1, .wywiad-page .wywiad-question h1 { font-size: clamp(22px, 2.6vw, 30px); line-height: 1.25; letter-spacing: -.01em; margin: 0 0 8px; max-width: 30ch; }
.wywiad-question .small-label { display: none; }
.wywiad-question .wywiad-help { font-size: 15px; color: var(--muted, #6f6265); margin: 0 0 12px; max-width: 60ch; }
.wywiad-choices { display: grid; gap: 10px; margin: 16px 0 4px; }
@media (min-width: 700px) { .wywiad-choices:has(> :nth-child(2)):not(:has(> :nth-child(5))) { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.wywiad-choice { min-height: 56px; border-radius: 18px; justify-content: space-between; text-align: left; font-size: 16px; }
.wywiad-picks { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
.wywiad-picks .wywiad-choice { justify-content: center; font-size: 18px; }
.wywiad-picks .wywiad-choice-mark { display: none; }
.wywiad-input { max-width: 320px; }
.wywiad-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; padding-top: 14px; border-top: 1px solid var(--line, #e9e1dd); }
.wywiad-auto { font-size: 13px !important; margin-top: 8px !important; }
.wywiad-why { margin: 4px 0 8px; border: 0; background: #fbf6f2; border-radius: 14px; padding: 2px 14px; }
.wywiad-why summary { font-weight: 750; color: var(--berry, #783e51); font-size: 14px; }
.wywiad-why p { font-size: 14.5px; margin: 6px 0 10px; }
.wywiad-unknown-card { margin-top: 14px; padding: 18px; border-radius: 20px; background: linear-gradient(180deg, #fffaec, #fff); border: 1px solid #f2d98a; }
.wywiad-unknown-card h2 { font-size: 19px; margin: 0 0 8px; }
.wywiad-unknown-card p { font-size: 15px; margin: 6px 0; }
.wywiad-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; color: var(--muted, #6f6265); font-size: 14px; margin: 4px 4px 12px; }
.wywiad-skipped { color: #80611f !important; }
.wywiad-missing { border-radius: 22px; border: 1px solid #f2d98a; background: linear-gradient(180deg, #fffaec, #fff 60%); }
.wywiad-missing-head { display: flex; gap: 14px; align-items: flex-start; }
.wywiad-missing-head h2 { margin: 0 0 4px; font-size: 21px; }
.wywiad-missing-head p { margin: 0; color: var(--muted, #6f6265); }
.wywiad-missing-list { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 10px; counter-reset: braki; }
.wywiad-missing-list li { display: flex; gap: 14px; justify-content: space-between; align-items: center; padding: 12px 14px; background: #fff; border: 1px solid var(--line, #e9e1dd); border-radius: 16px; }
.wywiad-missing-list p { margin: 4px 0 0; font-size: 14px; }
.wywiad-crumbs { display: none; }
@media (max-width: 640px) {
  .wywiad-stepper { grid-template-columns: 1fr 1fr; }
  .wywiad-progressbar { grid-column: 1 / -1; grid-row: 1; }
  .wywiad-nav-btn { justify-content: center; }
  .wywiad-missing-list li { flex-direction: column; align-items: stretch; }
}
#interview-content .wywiad-question h1#wywiad-title { font-size: clamp(22px, 2.4vw, 30px) !important; line-height: 1.25; letter-spacing: -.01em; max-width: 32ch; margin: 0 0 8px; }
#interview-content .wywiad-page > .page-intro h1, #interview-content .wywiad-page h1#wywiad-title:not(.wywiad-question h1) { font-size: clamp(28px, 3.4vw, 42px); }
#interview-content .wywiad-unknown-card h2, #interview-content .wywiad-missing h2 { font-size: 20px !important; line-height: 1.3; letter-spacing: 0; }
