/* ============================================================
   Wspólna templatka graficzna dla podstron szczegółowych "Dokumenty"
   (np. dokumenty-odrzucenie-spadku.html i kolejne). Każda z tych stron
   linkuje ten plik zamiast powielać CSS w swoim <style> — dzięki temu
   zmiana wyglądu tutaj odświeża wszystkie strony korzystające z tej
   templatki naraz.
   ============================================================ */

:root {
  --dok-bg-top: #c2c0bf;
  --dok-bg-bottom: #98968f;
  --dok-text: #29271f;
  --dok-text-mid: #55524a;
  --dok-line: rgba(41, 39, 31, 0.4);
}

/* ---- light-theme overrides for the shared header + quick-links bar ---- */

.site-header.site-header--minimal {
  background: linear-gradient(180deg, rgba(194, 192, 191, 0.94) 0%, rgba(194, 192, 191, 0.86) 65%, rgba(194, 192, 191, 0) 100%);
}

.site-header--minimal .site-nav a {
  color: var(--dok-text-mid);
}

.site-header--minimal .site-nav a:hover,
.site-header--minimal .site-nav a[aria-current="page"] {
  color: var(--dok-text);
  border-color: var(--accent);
}

.dok-section .quick-links a {
  color: rgba(41, 39, 31, 0.82);
}

.dok-section .quick-links a:hover,
.dok-section .quick-links a:focus-visible {
  color: var(--dok-text);
  border-color: var(--accent);
}

.dok-section .quick-links a.ql-current {
  color: var(--dok-text);
  border-color: var(--dok-text);
}

.dok-section .quick-links {
  background: linear-gradient(0deg, rgba(41, 39, 31, 0.14) 0%, rgba(41, 39, 31, 0.04) 70%, rgba(41, 39, 31, 0) 100%);
}

/* ---- page layout ---- */

.dok-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: linear-gradient(180deg, var(--dok-bg-top) 0%, var(--dok-bg-bottom) 100%);
  padding: 4.25rem 8vw 5.5rem 0;
  overflow: hidden;
}

@media (min-width: 1000px) {
  .dok-section { padding-right: 3.5rem; }
}

.dok-shell {
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  display: flex;
  align-items: stretch;
  gap: clamp(1.5rem, 3.5vw, 3rem);
}

.dok-rail {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: 0.2rem 0;
  border-right: 1px solid var(--dok-line);
  width: 2.75rem;
}

.dok-rail a {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  text-decoration: none;
  color: var(--dok-text-mid);
  font-weight: 600;
  font-size: 0.83rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  transition: color 0.3s ease;
}

.dok-rail a:hover,
.dok-rail a[aria-current="page"] { color: var(--dok-text); }

.dok-main {
  flex: 1 1 auto;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1fr);
  gap: clamp(3rem, 6.5vw, 6.5rem);
  align-items: start;
}

.dok-left p {
  text-align: justify;
  color: var(--dok-text-mid);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  font-size: min(clamp(0.71rem, 0.75vw, 0.81rem), clamp(0.67rem, 1.15vh, 0.81rem));
  line-height: 1.55;
  margin: 0 0 var(--space-2) 0;
}

.dok-left-example {
  margin: clamp(1rem, 3vh, 2.5rem) 0;
  text-align: right;
}

.dok-left-example p {
  text-transform: none;
  letter-spacing: 0;
  text-align: right;
  font-size: min(clamp(0.81rem, 0.9vw, 0.97rem), clamp(0.75rem, 1.3vh, 0.97rem));
  line-height: 1.6;
  margin: 0 0 0.9rem 0;
}

.dok-left-example strong,
.dok-left p strong { color: var(--dok-text); font-weight: 700; }

.dok-qa-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.75rem;
  margin: clamp(0.75rem, 2vh, 1.5rem) 0;
  color: var(--dok-text-mid);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: min(clamp(0.75rem, 0.8vw, 0.87rem), clamp(0.71rem, 1.1vh, 0.87rem));
}

.dok-qa-row .dok-pill { padding-left: 2.2rem; padding-right: 2.2rem; }

.dok-pill {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-decoration: none;
  font-weight: 600;
  font-size: min(clamp(0.75rem, 0.8vw, 0.87rem), clamp(0.71rem, 1.1vh, 0.87rem));
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--dok-text);
  background: transparent;
  border: 1px solid var(--dok-line);
  border-radius: 999px;
  padding: 0.6rem 1.4rem;
  transition: border-color 0.3s ease, color 0.3s ease;
  white-space: nowrap;
}

.dok-pill:hover,
.dok-pill:focus-visible { border-color: var(--dok-text); color: var(--dok-text); }

.dok-institutions {
  margin-top: clamp(1rem, 3vh, 2.5rem);
}

.dok-institutions h2 {
  font-weight: 700;
  font-size: min(clamp(1.15rem, 1.8vw, 1.75rem), clamp(1.1rem, 2.6vh, 1.75rem));
  letter-spacing: 0.01em;
  text-transform: uppercase;
  text-align: center;
  color: var(--dok-text);
  line-height: 1.25;
  margin: 0 0 0.7rem 0;
}

.dok-institutions-bar {
  width: 4.5rem;
  height: 4px;
  background: var(--dok-text);
  margin: 0 auto clamp(0.75rem, 2vh, 1.4rem) auto;
}

.dok-institutions-dropdown {
  position: relative;
}

.dok-search {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  width: 100%;
  list-style: none;
  text-decoration: none;
  color: var(--dok-text-mid);
  background: transparent;
  border: 1px solid var(--dok-line);
  border-radius: 999px;
  padding: 0.75rem 1.4rem;
  font-family: inherit;
  font-weight: 600;
  font-size: min(clamp(0.73rem, 0.78vw, 0.83rem), clamp(0.69rem, 1.05vh, 0.83rem));
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color 0.3s ease, color 0.3s ease;
}

.dok-search::-webkit-details-marker { display: none; }

.dok-search svg { flex: 0 0 auto; width: 1em; height: 1em; }

.dok-institutions-dropdown:hover .dok-search,
.dok-search:focus-visible,
.dok-institutions-dropdown[open] .dok-search { border-color: var(--dok-text); color: var(--dok-text); }

.dok-institutions-list {
  position: absolute;
  top: calc(100% + 0.6rem);
  left: 0;
  right: 0;
  z-index: 5;
  list-style: none;
  margin: 0;
  padding: 0.6rem 0.9rem;
  background: var(--dok-bg-bottom);
  border: 1px solid var(--dok-line);
  border-radius: 12px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
  max-height: clamp(9rem, 32vh, 16rem);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.dok-institutions-list li {
  border-bottom: 1px solid var(--dok-line);
  padding-bottom: 0.45rem;
}

.dok-institutions-list li:last-child { border-bottom: none; padding-bottom: 0; }

.dok-institutions-list a {
  display: block;
  text-decoration: none;
  color: var(--dok-text-mid);
  font-size: min(clamp(0.71rem, 0.76vw, 0.82rem), clamp(0.67rem, 1.02vh, 0.82rem));
  line-height: 1.4;
  transition: color 0.3s ease;
}

.dok-institutions-list a:hover,
.dok-institutions-list a:focus-visible { color: var(--dok-text); }

.dok-right-heading {
  font-family: var(--font-body);
  font-weight: 800;
  font-size: min(clamp(1.95rem, 4.4vw, 3.75rem), clamp(1.75rem, 6.2vh, 3.75rem));
  letter-spacing: 0.01em;
  color: var(--dok-text);
  margin: 0 0 clamp(0.5rem, 1.6vh, 1.1rem) 0;
}

.dok-right-intro {
  margin: 0 0 clamp(0.75rem, 2vh, 1.4rem) 0;
  text-align: justify;
  color: var(--dok-text-mid);
  font-size: min(clamp(0.77rem, 0.85vw, 0.91rem), clamp(0.73rem, 1.2vh, 0.91rem));
  line-height: 1.5;
}

.dok-right-intro strong { color: var(--dok-text); font-weight: 700; }

.dok-entry {
  display: grid;
  grid-template-columns: minmax(6.5rem, 0.32fr) 1fr;
  gap: clamp(1rem, 2.5vw, 2rem);
  border-top: 1px solid var(--dok-line);
  padding: clamp(0.75rem, 2vh, 1.4rem) 0;
}

.dok-entry:first-of-type { border-top: 1px solid var(--dok-text); }

.dok-entry-label {
  text-align: right;
  font-weight: 700;
  font-size: min(clamp(0.77rem, 0.85vw, 0.89rem), clamp(0.73rem, 1.15vh, 0.89rem));
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--dok-text-mid);
  line-height: 1.35;
}

.dok-entry p {
  margin: 0;
  text-align: justify;
  color: var(--dok-text-mid);
  font-size: min(clamp(0.77rem, 0.85vw, 0.91rem), clamp(0.73rem, 1.2vh, 0.91rem));
  line-height: 1.5;
}

.dok-entry p strong { color: var(--dok-text); font-weight: 700; }

.dok-notes {
  border-top: 1px solid var(--dok-line);
  padding-top: clamp(0.75rem, 2vh, 1.4rem);
  margin-top: clamp(0.25rem, 1vh, 0.5rem);
}

.dok-notes p {
  text-align: justify;
  color: var(--dok-text-mid);
  font-size: min(clamp(0.77rem, 0.85vw, 0.91rem), clamp(0.73rem, 1.2vh, 0.91rem));
  line-height: 1.5;
  margin: 0 0 0.8rem 0;
}

.dok-notes p:first-child { margin-bottom: clamp(1.2rem, 3vh, 2rem); }

.dok-notes p:last-child { margin-bottom: 0; }

@media (max-width: 899px) {
  .dok-section { padding: 6rem 8vw 9rem 8vw; justify-content: flex-start; }

  .dok-shell { flex-direction: column; gap: var(--space-3); }

  .dok-rail {
    flex-direction: row;
    justify-content: flex-start;
    gap: var(--space-4);
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--dok-line);
    padding-bottom: 0.75rem;
  }

  .dok-rail a { writing-mode: horizontal-tb; transform: none; }

  .dok-main { grid-template-columns: 1fr; gap: var(--space-4); }

  .dok-entry { grid-template-columns: 1fr; gap: 0.4rem; }

  .dok-entry-label { text-align: left; }

  .quick-links { position: static; padding: var(--space-3) 8vw var(--space-4); }
}
