/* Opora: page styles, copied from Aptechka's site/assets/site.css (which took them from Papirka) without the
   directories, the emergency notice, the home page's triage and the cabinet; tokens and components live in
   opora.css. */

/* ------------------------------------------------------------------ shell */
.skip { position: absolute; left: 12px; top: -48px; z-index: 10; padding: 10px 14px; border-radius: 10px;
  background: var(--brand); color: var(--brand-ink); font-weight: 700; text-decoration: none; }
.skip:focus { top: 10px; }
.theme-btn { cursor: pointer; }
.theme-btn .moon { display: none; }
:root[data-theme="dark"] .theme-btn .sun { display: none; }
:root[data-theme="dark"] .theme-btn .moon { display: block; }

/* compact language menu on phones (no script needed) */
.lang-menu { position: relative; }
.lang-menu summary { list-style: none; cursor: pointer; }
.lang-menu summary::-webkit-details-marker { display: none; }
.lang-menu[open] .lang-list { display: grid; }
.lang-list {
  display: none; position: absolute; right: 0; top: 46px; min-width: 160px; padding: 6px; gap: 2px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow);
}
.lang-list a { padding: 10px 12px; border-radius: 10px; color: var(--text); text-decoration: none; font-weight: 600; }
.lang-list a[aria-current] { background: var(--surface-2); }


/* the mark (a palm holding a circle) and the lowercase wordmark */
.logo { display: inline-flex; align-items: center; gap: 9px; color: var(--text); text-decoration: none; }
.mark { width: 32px; height: 32px; flex: none; }
.mark-b { stroke: var(--mark-bg); }
.mark-p { fill: var(--mark-fg); }
.wordmark { font-weight: 800; font-size: 22px; letter-spacing: -.6px; line-height: 1; }

/* ------------------------------------------------------------------ home */
.hero { padding: 24px 0 32px; }
.hero-text { min-width: 0; }
.hero h1 { font-size: 44px; letter-spacing: -2px; line-height: 1.05; margin: 12px 0 12px; }
.hero .lead { color: var(--muted); font-size: 18px; max-width: 32em; }
.langs-first { display: flex; flex-wrap: wrap; gap: 6px; }
.search { margin-top: 22px; position: relative; max-width: 560px; }
.search-row { display: flex; gap: 8px; }
.search-field {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 16px;
  background: var(--surface); border: 1.5px solid var(--line-strong); border-radius: var(--radius-s); color: var(--label);
}
.search-field:focus-within { border-color: var(--brand); }
.search-field input { all: unset; flex: 1; min-width: 0; color: var(--text); font-size: 17px; }
.search-field input::placeholder { color: var(--label); }
.search .btn { min-height: 52px; border-radius: var(--radius-s); flex: none; padding: 0 18px; }
.search-results {
  list-style: none; margin: 8px 0 0; padding: 6px; display: grid; gap: 2px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius-s); box-shadow: var(--shadow);
}
.search-results[hidden] { display: none; }
.search-results a { display: grid; gap: 2px; padding: 10px 12px; border-radius: 10px; color: var(--text); text-decoration: none; }
.search-results a:hover, .search-results a:focus { background: var(--surface-2); outline: none; }
.search-results strong { font-weight: 700; }
.search-results span { font-size: 14px; color: var(--muted); }
.search-results .empty { padding: 10px 12px; color: var(--muted); }

.band { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 36px 0; }
.band h2, .section h2 { font-size: 26px; letter-spacing: -.02em; }
.topic-groups { display: grid; gap: 22px; margin-top: 18px; }
.topic-group h3 { font-size: 13px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--label); margin-bottom: 10px; }
.topic-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.topic-chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px 10px 12px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line); color: var(--text); text-decoration: none; font-weight: 700; font-size: 15px;
}
.topic-chip .ic { color: var(--brand); }
.topic-chip:hover { border-color: var(--brand); }
@media (min-width: 900px) {
  .hero { padding: 56px 0 56px; }
  .hero h1 { font-size: 64px; }
  .hero .lead { font-size: 20px; }
  .band { padding: 48px 0; }
  .band h2, .section h2 { font-size: 30px; }
  .topic-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 40px; }
}

/* ------------------------------------------------------------------ the owner's network of sites (data/network.json):
   the strip above the header (brands only) and the footer's "Our network" block; this site is highlighted, not linked */
.net-bar { background: var(--surface-2); border-bottom: 1px solid var(--line); font-size: 13px; line-height: 1.2; }
.net-bar ul { list-style: none; margin: 0; padding: 6px 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 18px; }
.net-bar a { color: var(--muted); text-decoration: none; font-weight: 600; }
.net-bar a:hover { color: var(--text); text-decoration: underline; }
.net-bar [aria-current] { color: var(--text); font-weight: 800; box-shadow: inset 0 -2px 0 var(--brand); padding-bottom: 1px; }
/* The donations link (network/donate.json), at the right end of the strip. */
.net-bar .donate-item { margin-left: auto; }
.net-bar .donate-item a { color: var(--text); white-space: nowrap; }
.net-bar .donate-item span { color: var(--brand); }

/* ------------------------------------------------------------------ footer: white with a top border, portal chips on paper */
.site-footer { background: var(--surface); }
.portal .eyebrow { margin-bottom: 8px; }
.portal-chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.portal-chips li { display: flex; }
.portal-chip[aria-current] { border-color: var(--brand); background: var(--brand-soft); }
.portal-chip {
  display: grid; gap: 2px; padding: 10px 14px; border-radius: var(--radius-s); background: var(--bg); border: 1px solid var(--line);
  color: var(--text); text-decoration: none; max-width: 320px;
}
.portal-chip:hover { border-color: var(--brand); }
.portal-chip strong { font-size: 15px; }
.portal-chip span { font-size: 13px; color: var(--muted); }

/* ------------------------------------------------------------------ text pages, chooser, 404 */
.page { padding-top: 18px; padding-bottom: 24px; }
.prose { max-width: 720px; display: grid; gap: 16px; }
.prose h2 { margin-top: 12px; }
.prose ul { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.about { display: grid; gap: 12px; }
.about .card { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 14px; }
.chooser { min-height: 100vh; display: grid; place-items: center; padding: 32px 16px; }
.chooser-box { width: 100%; max-width: 520px; display: grid; gap: 22px; justify-items: start; }
.section.tight { padding-top: 0; }
@media (min-width: 900px) {
  .page { padding-top: 28px; }
}

/* ------------------------------------------------------------------ topic page */
.layout { display: grid; gap: 24px; margin-top: 14px; }
/* a 0-minimum column keeps long values and URLs inside a 320 px screen (a lesson from Papirka) */
.main { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; min-width: 0; }
.main a, .main .orig { overflow-wrap: break-word; }
.main h2 { margin-bottom: 12px; }
.main section h3 { margin: 16px 0 6px; }
.title h1 { margin-bottom: 4px; overflow-wrap: anywhere; }
.title .meta span { overflow-wrap: anywhere; }
.side { display: grid; gap: 16px; align-content: start; }
.side .cta-card { display: grid; gap: 10px; }
.side .cta-card h2 { margin: 0; font-size: 18px; }
.side .cta-card p { font-size: 15px; }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-s); overflow: hidden; font-size: 15px; }
.table caption { text-align: left; font-weight: 700; font-size: 14px; padding: 0 0 6px; }
.table th, .table td { text-align: left; vertical-align: top; padding: 9px 12px; border-top: 1px solid var(--line); overflow-wrap: break-word; hyphens: auto; }
.table thead th { font-weight: 700; color: var(--muted); font-size: 14px; background: var(--surface-2); }
.table tbody th { font-weight: 600; }
.table tr:first-child th, .table tr:first-child td { border-top: 0; }
@media (min-width: 900px) {
  .layout { grid-template-columns: minmax(0, 1fr) 340px; gap: 56px; align-items: start; }
  .main { max-width: 760px; gap: 36px; }
  .title h1 { font-size: 42px; }
  .side { position: sticky; top: 96px; }
}

/* ------------------------------------------------------------------ topics (from Papirka's situation pages) */
.picker-section { padding-top: 24px; }
.picker-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.tiles { display: none; }
.short { display: grid; gap: 10px; }
.short .answer { font-size: 18px; line-height: 1.5; }
.terms { margin: 0; display: grid; gap: 10px; }
.terms div { display: grid; gap: 2px; padding: 14px 16px; border-radius: var(--radius-s); background: var(--surface-2); }
.terms dt { font-weight: 800; }
.terms dd { margin: 0; color: var(--muted); }
.sources-card { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.sources-card h2 { margin: 0; }
.checked-line { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 12px; }
.checked-line > svg { color: var(--ok); margin-top: 3px; }
.toc { display: grid; gap: 2px; padding: 4px; }
.toc .eyebrow { margin-bottom: 6px; }
.toc a { color: var(--text); text-decoration: none; padding: 6px 10px; border-left: 2px solid var(--line); font-size: 15px; }
.toc a:hover { border-left-color: var(--brand); }
.fn { font-size: .7em; line-height: 0; margin-left: 1px; }
.fn a { text-decoration: none; font-weight: 700; padding: 0 2px; }
.fact-v { font-weight: 700; }
/* 0-minimum columns: a long Polish quote token ("współmałżonek/pełnomocnik/pracodawca?") or a host name
   in a footnote widened the situation page to 330 px at a 320 px viewport */
.footnotes { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.footnotes li { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 10px; scroll-margin-top: 90px; }
.footnotes li:target { background: var(--accent-soft); border-radius: 10px; padding: 6px; margin: -6px; }
.fn-n { width: 24px; height: 24px; border-radius: 8px; display: grid; place-items: center; font-size: 13px; font-weight: 800; background: var(--brand-soft); color: var(--brand); }
.footnotes .orig { font-size: 14px; color: var(--text); }
.footnotes .src { font-size: 13px; margin-top: 4px; }
.footnotes .orig, .footnotes .src { overflow-wrap: break-word; }
.footnotes .dom { color: var(--muted); }
.main section > p + p, .main section > p + ul, .main section > ul + p { margin-top: 10px; }
.main .bullets { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
@media (min-width: 900px) {
  .rows.picker-rows { display: none; }
  .tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
  .tile { display: grid; gap: 10px; align-content: start; padding: 20px; text-decoration: none; color: var(--text); min-height: 150px; transition: border-color .15s; }
  .tile:hover { border-color: var(--brand); }
  .tile .badge-ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); }
  .tile strong { font-size: 17px; line-height: 1.3; }
  .tile span { font-size: 14px; color: var(--muted); line-height: 1.45; }
  .terms { grid-template-columns: repeat(3, 1fr); }
}

/* ------------------------------------------------------------------ questions */
.faq .qa { padding: 14px 0; border-top: 1px solid var(--line); }
.faq .qa:first-of-type { border-top: 0; padding-top: 0; }
.faq h3 { font-size: 17px; margin-bottom: 4px; }
.faq .qa p + p { margin-top: 8px; }

/* ------------------------------------------------------------------ paragraph links (share.js) */
.main [id] { scroll-margin-top: 90px; }
.main [id^="p-"] { border-radius: 6px; }
.main [id^="p-"]:target { animation: p-arrive 3.2s ease-out; }
@keyframes p-arrive {
  0%, 45% { background: var(--accent-soft); box-shadow: 0 0 0 6px var(--accent-soft); }
  100% { background: transparent; box-shadow: 0 0 0 6px transparent; }
}
@media (prefers-reduced-motion: reduce) {
  .main [id^="p-"]:target { animation: none; background: var(--accent-soft); box-shadow: 0 0 0 6px var(--accent-soft); }
}
.p-share {
  display: inline-grid; place-items: center; width: 26px; height: 26px; margin: -4px 0; padding: 0;
  vertical-align: middle; border: 0; border-radius: 8px; background: none; color: var(--muted);
  cursor: pointer; opacity: .6; transition: opacity .15s, background-color .15s;
}
.p-share:hover, .p-share[aria-expanded="true"] { opacity: 1; color: var(--brand); background: var(--brand-soft); }
.p-share:focus-visible { opacity: 1; outline: 2px solid var(--focus); outline-offset: 1px; }
@media (hover: hover) {
  .p-share { opacity: 0; }
  .main [id^="p-"]:hover .p-share, .p-share:focus-visible, .p-share[aria-expanded="true"] { opacity: 1; }
}
.share-menu {
  position: absolute; z-index: 20; display: grid; min-width: 220px; max-width: calc(100vw - 16px); padding: 6px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-s); box-shadow: var(--shadow);
}
.share-menu[hidden], .share-menu [hidden] { display: none; }
.share-menu [role="menuitem"] {
  display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 12px; border: 0; border-radius: 10px;
  background: none; color: var(--text); font: inherit; font-size: 15px; font-weight: 600; text-align: left;
  text-decoration: none; cursor: pointer;
}
.share-menu [role="menuitem"] .ic { color: var(--muted); }
.share-menu [role="menuitem"]:hover, .share-menu [role="menuitem"]:focus { background: var(--surface-2); outline: none; }
.share-menu [role="menuitem"]:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.share-toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 30; max-width: calc(100vw - 32px); padding: 10px 16px;
  border-radius: 12px; background: var(--brand); color: var(--brand-ink); font-size: 15px; font-weight: 600;
  transform: translateX(-50%); opacity: 0; pointer-events: none; transition: opacity .2s;
}
.share-toast.on { opacity: 1; }

.gap-s { --gap: 8px; }
.note { padding: 14px 16px; border-radius: var(--radius-s); background: var(--brand-soft); border: 1px solid var(--brand-soft-line); }
.main ol.steps { margin: 8px 0 0; }
.main section > .table-wrap, .main section > .table-wrap + ul, .main section > h3 + ol { margin-top: 12px; }
.main section > p.note { margin-top: 10px; }

/* ------------------------------------------------------------------ the city of the network (site/assets/city.js, city.css) */
:root {
  --nc-fg: var(--text); --nc-muted: var(--muted); --nc-bg: var(--surface); --nc-surface: var(--surface-2);
  --nc-border: var(--line-strong); --nc-accent: var(--brand); --nc-accent-fg: var(--brand-ink); --nc-radius: var(--radius-s);
  --nc-font: var(--font);
}
/* the header keeps logo and buttons whole on a 320-375 px phone: the city label shortens instead */
.header-end { min-width: 0; }
.nc-slot { flex: 0 1 auto; min-width: 0; }
/* city.css loads after this file, so the overrides of its own properties name the header or the page */
.site-header .nc-chip { min-height: 40px; font-weight: 700; font-size: 14px; background: var(--surface); border-color: var(--line); }
.site-header .nc-chip:hover, .site-header .nc-chip-set { border-color: var(--brand); }
.nc-btn { font-weight: 700; }
html .nc-bar { background: var(--brand-soft); border-bottom-color: var(--brand-soft-line); }
.nc-title { font-weight: 800; letter-spacing: -.015em; }
/* the About page's #city and #storage (the header's privacy link) stay clear of the sticky header */
.about [id] { scroll-margin-top: 90px; }
/* the About page's privacy sections (#city, #cookies): space between paragraphs, lists and the button */
.about section > * + * { margin-top: 10px; }

/* ------------------------------------------------------------------ cookie banner (site/assets/consent.js)
   A floating card pinned to the bottom of the screen, as on ilenarece.pl. Until a choice is made it is a modal
   <dialog>: the page behind is dimmed and inert. "Accept" and "Reject" look the same on purpose: refusing must
   be as easy as agreeing. On the About page it opens non-modal, so the #cookies text stays readable. */
dialog.consent {
  position: fixed;
  z-index: 50; /* matters only on the About page, where it is not modal and not in the top layer */
  inset: auto 16px max(16px, env(safe-area-inset-bottom)) 16px;
  width: auto; max-width: 980px; max-height: calc(100dvh - 32px);
  margin: 0 auto; padding: 20px 22px; overflow: auto;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); color: var(--text);
  box-shadow: 0 24px 64px rgba(22, 27, 51, .35);
  font-size: 15px; line-height: 1.5; outline: none;
}
dialog.consent[open] {
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px;
  animation: consent-up .35s cubic-bezier(.2, .8, .2, 1);
}
dialog.consent::backdrop {
  background: rgba(22, 27, 51, .55);
  backdrop-filter: blur(3px);
  animation: consent-fade .35s ease;
}
html:has(dialog.consent[open]:modal) { overflow: hidden; }
@keyframes consent-up { from { transform: translateY(calc(100% + 24px)); opacity: 0; } }
@keyframes consent-fade { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  dialog.consent[open], dialog.consent::backdrop { animation: none; }
}
.consent-text { flex: 1 1 380px; min-width: 0; }
.consent p { margin: 0 0 6px; }
.consent a { color: var(--link); font-weight: 700; }
.consent-actions { display: flex; flex: 1 1 300px; flex-wrap: wrap; gap: 10px; min-width: 0; }
.consent-actions button {
  flex: 1 1 130px; min-height: 52px; padding: 0 22px; border: 0; border-radius: 14px;
  background: var(--brand); color: var(--brand-ink); font: 700 16px/1.2 var(--font); cursor: pointer;
  transition: background-color .15s ease, transform .15s ease;
}
.consent-actions button:hover { background: var(--brand-hover); transform: translateY(-2px); }
/* "Cookie settings" in the footer's links (added by the script; the About page's #cookies section has its own button) */
.consent-open {
  padding: 0; border: 0; background: none; color: var(--muted); font: inherit;
  text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1.5px; cursor: pointer;
}
.consent-open:hover { color: var(--text); }
