:root {
  --accent: #c8002f;
  --accent-dark: #950023;
  --ink: #26333d;
  --muted: #5d6a73;
  --line: #d7dde2;
  --paper: #ffffff;
  --soft: #f3f6f8;
  --nav: #202020;
  font-family: Arial, Helvetica, sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--soft); font-size: 16px; }
a { color: inherit; }
.skip-link { position: absolute; left: 1rem; top: -4rem; background: #fff; padding: .6rem 1rem; z-index: 3; }
.skip-link:focus { top: .75rem; }
.top-strip { min-height: 36px; background: #fff; display: flex; justify-content: flex-end; align-items: center; padding: 0 clamp(1rem, 10vw, 20rem); border-bottom: 1px solid #eceff2; }
.accessibility { display: flex; gap: .4rem; align-items: center; }
.accessibility button { border: 0; background: transparent; font-weight: 700; font-size: 1rem; cursor: pointer; }
.accessibility button:last-child { background: #1e1e1e; color: #d7ff00; padding: .2rem .4rem; }
.brand-bar { background: #fff; padding: .75rem clamp(1rem, 17vw, 20rem); }
.sejm-link { display: inline-flex; gap: .8rem; align-items: center; color: #68737b; text-decoration: none; border: 1px dotted #888; padding: .25rem; }
.mini-logo { letter-spacing: .25rem; color: var(--accent); font-weight: 800; border-right: 1px solid #cfd4d8; padding-right: .7rem; }
.hero { min-height: 300px; background: linear-gradient(100deg, rgba(246,248,250,.98) 0%, rgba(246,248,250,.86) 47%, rgba(246,248,250,.25) 100%), radial-gradient(circle at 85% 18%, #d9e1e6 0 8%, transparent 28%), repeating-linear-gradient(165deg, #f8fafb 0 20px, #dce5ea 22px 31px, #f2f5f7 34px 54px); display: flex; align-items: center; }
.hero-content { width: min(1100px, calc(100% - 2rem)); margin: 0 auto; }
.eyebrow { color: var(--accent); font-size: 1.45rem; font-weight: 700; display: inline-block; border-bottom: 9px solid var(--accent); padding-bottom: .45rem; }
h1 { font-size: clamp(2.7rem, 6vw, 5rem); line-height: .95; margin: 2rem 0 1rem; max-width: 820px; }
.hero p:last-child { font-size: 1.25rem; max-width: 680px; color: var(--muted); }
.main-nav { background: var(--nav); border-bottom: 16px solid var(--accent); padding: 1.1rem clamp(1rem, 17vw, 20rem); display: flex; flex-wrap: wrap; gap: .6rem 0; }
.main-nav a { color: #fff; text-decoration: none; font-size: 1.2rem; padding: 0 .8rem; border-right: 1px solid #777; }
.main-nav a:first-child { padding-left: 0; }
.main-nav a.active { color: var(--accent); }
.page-shell { width: min(1180px, calc(100% - 2rem)); margin: 2rem auto; display: grid; gap: 1.5rem; }
.search-card, .results-card, .info-grid article { background: var(--paper); border: 1px solid var(--line); box-shadow: 0 14px 35px rgba(33,45,56,.08); padding: clamp(1rem, 3vw, 2rem); }
.section-heading p { color: var(--accent); text-transform: uppercase; letter-spacing: .08em; font-weight: 700; margin: 0; }
h2 { margin: .25rem 0 1rem; font-size: clamp(1.6rem, 3vw, 2.2rem); }
fieldset { border: 0; padding: 0; margin: 0 0 1.25rem; }
legend { font-weight: 700; margin-bottom: .75rem; }
.source-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; }
.source-option { border: 2px solid var(--line); padding: 1rem; cursor: pointer; font-weight: 700; background: #fafafa; }
.source-option:has(input:checked) { border-color: var(--accent); box-shadow: inset 0 -5px 0 var(--accent); }
.source-option input { margin-right: .5rem; }
.form-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 1rem; }
label { display: grid; gap: .4rem; color: #17232c; font-weight: 700; }
input { width: 100%; border: 1px solid #aeb8c0; padding: .85rem 1rem; font: inherit; }
.actions { display: flex; gap: .75rem; margin-top: 1.25rem; }
button { font: inherit; }
.primary-button, .secondary-button { border: 0; padding: .9rem 1.5rem; cursor: pointer; font-weight: 700; }
.primary-button { background: var(--accent); color: #fff; }
.secondary-button { background: #e8edf1; color: var(--ink); }
.results-header { display: flex; justify-content: space-between; gap: 1rem; align-items: start; border-bottom: 1px solid var(--line); margin-bottom: 1rem; }
.results-header p { color: var(--muted); max-width: 560px; }
.result-item { border-left: 5px solid var(--accent); padding: 1rem; margin: 1rem 0; background: #fafbfc; }
.result-meta { color: var(--muted); font-weight: 700; margin: .4rem 0; }
.doc-link { display: inline-block; margin-top: .75rem; color: var(--accent-dark); font-weight: 700; }
.info-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 1.5rem; }
.site-footer { background: #161616; color: #fff; padding: 1.5rem; text-align: center; }
.high-contrast { --accent: #d7ff00; --accent-dark: #d7ff00; --ink: #fff; --muted: #e9e9e9; --line: #757575; --paper: #111; --soft: #000; --nav: #000; }
.font-large { font-size: 18px; }
.font-xlarge { font-size: 20px; }
@media (max-width: 760px) { .source-grid, .form-grid, .info-grid { grid-template-columns: 1fr; } .results-header { display: block; } h1 { font-size: 3rem; } }

.hero-compact { min-height: 210px; }
.status { color: var(--muted); font-weight: 700; }
.tile-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.nav-tile { display: block; min-height: 150px; padding: 1.25rem; border: 2px solid var(--line); background: #fafbfc; text-decoration: none; }
.nav-tile:hover, .nav-tile:focus { border-color: var(--accent); box-shadow: inset 0 -5px 0 var(--accent); }
.nav-tile h3 { margin-top: 0; color: var(--accent-dark); }
@media (max-width: 760px) { .tile-grid { grid-template-columns: 1fr; } }
