/* Baza certyfikatów.
   The palette comes from security printing: deep ink blue, guilloche teal, foil ochre. Ochre is
   reserved for one thing only - a date that is running out - so it never decorates anything else.
   Archivo's width axis carries information: headings run wide, data labels run condensed. */

:root {
  --band: #0F2038;
  --band-rule: #263E60;
  --band-bar: #5E7FA8;
  --band-text: #F5F7F9;
  --band-soft: #9FB0C4;

  --paper: #F5F7F9;
  --surface: #FFFFFF;
  --text: #12233C;
  --text-soft: #48607F;
  --rule: #CBD6E1;

  --ochre: #D9961A;
  --ochre-lit: #E2A337;
  --ochre-text: #9A6708;
  --teal: #2F7F86;
  --teal-hover: #12233C;

  --measure: 68ch;
  --column: 1120px;
  --gutter: clamp(1rem, 4vw, 3rem);
  --pad-block: clamp(2.75rem, 6vw, 4.5rem);
  color-scheme: light dark;  /* native controls and scrollbars follow the theme */
  font-synthesis: none;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0B1421;
    --surface: #12202F;
    --text: #E6ECF3;
    --text-soft: #9FB0C4;
    --rule: #23364E;
    --ochre-text: #E2A337;
    --teal: #6FC0C7;
    --teal-hover: #E6ECF3;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: "Archivo", system-ui, sans-serif;
  font-variation-settings: "wdth" 100;
  font-size: 1.0625rem;
  line-height: 1.55;
}

a { color: var(--teal); text-underline-offset: 0.18em; }
a:hover { color: var(--teal-hover); }
:focus-visible { outline: 3px solid var(--ochre); outline-offset: 2px; border-radius: 2px; }

h1, h2 {
  font-variation-settings: "wdth" 115;
  font-weight: 750;
  letter-spacing: -0.015em;
  line-height: 1.06;
  margin: 0 0 0.6em;
  text-wrap: balance;
}
h1 { font-size: clamp(1.95rem, 3.7vw, 2.6rem); max-width: 24ch; }
h2 { font-size: clamp(1.45rem, 2.5vw, 1.9rem); }

p { max-width: var(--measure); margin: 0 0 1em; }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---- the ink band: header and hero share one printed surface ---- */

.band { background: var(--band); color: var(--band-text); }
.band > * { max-width: var(--column); margin: 0 auto; padding-inline: var(--gutter); }

.top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 1.1rem; }
.brand {
  display: inline-flex; align-items: center; gap: 0.6rem;
  color: var(--band-text); text-decoration: none; font-weight: 700;
  font-variation-settings: "wdth" 112; letter-spacing: -0.01em; white-space: nowrap;
}
.mark { width: 1.55rem; height: 1.55rem; flex: none; fill: var(--band-text); }
.mark .lead { fill: var(--ochre-lit); }
.top-cta {
  color: var(--band-text); font-weight: 650; text-decoration: none; white-space: nowrap;
  border: 1.5px solid var(--band-rule); border-radius: 999px; padding: 0.4rem 1rem;
}
.top-cta:hover { color: var(--band); background: var(--band-text); border-color: var(--band-text); }

.hero { padding-block: clamp(1.75rem, 3.5vw, 2.75rem) clamp(2.5rem, 5vw, 3.5rem); }
.hero .lede { font-size: 1.15rem; color: var(--band-soft); max-width: 58ch; }

/* expiry chart: one recessive series, with the recertification window bracketed and named */
.strip { margin: clamp(1.75rem, 3.5vw, 2.5rem) 0 0; }
.plot { position: relative; padding-top: 3rem; }
.bars {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 2px;
  align-items: end; height: clamp(150px, 20vw, 210px);
  border-bottom: 2px solid var(--band-rule);
}
.month { position: relative; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; }
.month .bar {
  width: 100%; max-width: 42px; background: var(--band-bar); border-radius: 4px 4px 0 0;
  transform-origin: bottom; animation: grow 700ms cubic-bezier(.2,.8,.2,1) both;
}
.month.window .bar { background: var(--ochre-lit); }
.month .n { font-size: 0.8rem; color: var(--band-soft); margin-bottom: 0.35rem; font-variant-numeric: tabular-nums; }
.month.window .n { color: var(--band-text); font-weight: 700; }
.month .lab {
  position: absolute; bottom: -1.7rem; font-size: 0.75rem; color: var(--band-soft);
  white-space: nowrap; font-variation-settings: "wdth" 85;
}
.month.window .lab { color: var(--ochre-lit); }
.bracket {
  position: absolute; top: 1.6rem; height: 0.6rem;
  border: 1.5px solid var(--ochre); border-bottom: 0; border-radius: 5px 5px 0 0;
}
.bracket span {
  position: absolute; bottom: 0.9rem; left: 50%; transform: translateX(-50%);
  color: var(--ochre-lit); font-size: 0.8rem; font-weight: 650; white-space: nowrap;
  font-variation-settings: "wdth" 95;
}
.strip figcaption { margin-top: 2.9rem; color: var(--band-soft); max-width: var(--measure); font-size: 0.95rem; }
@keyframes grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@media (prefers-reduced-motion: reduce) { .month .bar { animation: none; } }

.figures { display: flex; flex-wrap: wrap; margin: 2.25rem 0 0; border-top: 1px solid var(--band-rule); }
.figures > div { flex: 1 1 8rem; display: flex; flex-direction: column-reverse; padding: 1rem 1.25rem 0 0; }
.figures > div + div { border-left: 1px solid var(--band-rule); padding-left: 1.25rem; }
.figures dd {
  margin: 0; font-size: clamp(1.7rem, 3.2vw, 2.4rem); font-weight: 750; line-height: 1;
  font-variation-settings: "wdth" 112; font-variant-numeric: tabular-nums;
}
.figures dt { color: var(--band-soft); font-size: 0.85rem; margin-top: 0.45rem; font-variation-settings: "wdth" 88; }

.asof { display: flex; align-items: center; flex-wrap: wrap; gap: 1rem 1.75rem; margin: 1.5rem 0 0; color: var(--band-soft); font-size: 0.92rem; max-width: none; }
.hero-cta {
  background: var(--ochre); color: #1B1304; font-weight: 700; text-decoration: none;
  border-radius: 7px; padding: 0.7rem 1.35rem;
}
.hero-cta:hover { background: var(--ochre-lit); color: #1B1304; }

/* ---- content on paper ---- */

main > section { max-width: var(--column); margin: 0 auto; padding: var(--pad-block) var(--gutter); }
main > section + section:not(.signup) { border-top: 1px solid var(--rule); }

.who dl { margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 2.5rem; }
.who dl > div { border-top: 3px solid var(--text); padding-top: 0.9rem; }
.who dt { font-weight: 700; font-size: 1.15rem; font-variation-settings: "wdth" 110; margin-bottom: 0.4rem; }
.who dd { margin: 0; color: var(--text-soft); }

.note { color: var(--text-soft); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.table-wrap table { min-width: 520px; }
th {
  text-align: left; font-weight: 650; font-size: 0.85rem; color: var(--text-soft);
  border-bottom: 2px solid var(--text); padding: 0.5rem 0.75rem 0.5rem 0;
  font-variation-settings: "wdth" 88;
}
td { padding: 0.7rem 0.75rem 0.7rem 0; border-bottom: 1px solid var(--rule); }
td:first-child { font-weight: 600; letter-spacing: 0.02em; }
td:last-child { color: var(--ochre-text); font-weight: 700; white-space: nowrap; }

.check-form { display: flex; gap: 0.5rem; max-width: 34rem; }
input[type=text], input[type=email], textarea {
  font: inherit; color: var(--text); background: var(--surface);
  border: 1.5px solid var(--rule); border-radius: 7px; padding: 0.65rem 0.8rem; width: 100%;
}
input:focus, textarea:focus { border-color: var(--teal); outline: none; box-shadow: 0 0 0 3px rgba(47,127,134,.25); }
button {
  font: inherit; font-weight: 700; cursor: pointer; white-space: nowrap;
  background: var(--text); color: var(--paper); border: 0; border-radius: 7px; padding: 0.68rem 1.3rem;
}
button:hover { background: var(--teal); color: #fff; }
button[disabled] { opacity: .6; cursor: wait; }

.check-result { margin-top: 1.1rem; max-width: 34rem; }
.check-result ul { list-style: none; margin: 0; padding: 0; }
.check-result li { display: flex; justify-content: space-between; gap: 1rem; padding: 0.6rem 0; border-bottom: 1px solid var(--rule); }
.check-result .to { font-weight: 700; white-space: nowrap; }
.check-result .soon { color: var(--ochre-text); }

.signup {
  background: var(--surface); border: 1px solid var(--rule); border-radius: 12px;
  box-shadow: 0 1px 2px rgba(15,32,56,.05), 0 12px 32px -20px rgba(15,32,56,.45);
  margin-block: clamp(1.5rem, 4vw, 2.5rem);
}
.lead-form { max-width: 44rem; display: grid; gap: 1.15rem; }
.lead-form > button { justify-self: start; }
fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 0.35rem; }
legend { font-weight: 700; margin-bottom: 0.4rem; }
fieldset label { display: flex; gap: 0.55rem; align-items: baseline; }
.lead-form > label, .row label { display: grid; gap: 0.3rem; font-weight: 600; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.hp { position: absolute; left: -9999px; }
.fine { font-size: 0.88rem; color: var(--text-soft); margin: 0; }
.lead-result { font-weight: 600; }
.lead-result.ok { color: var(--teal); }
.lead-result.err { color: #B5471A; }

.foot {
  max-width: var(--column); margin: 0 auto; padding: 2rem var(--gutter) 3rem;
  border-top: 1px solid var(--rule); color: var(--text-soft); font-size: 0.9rem;
}
.foot p { margin: 0 0 0.5rem; }
.foot-links a + a { margin-left: 1.4rem; }

/* privacy page */
.doc { max-width: 760px; margin: 0 auto; padding: clamp(2.5rem, 6vw, 3.5rem) var(--gutter); }
.doc h1 { max-width: none; }
.doc h2 { margin-top: 2.2rem; font-size: 1.25rem; }

/* Wide screens: the lede moves beside the headline and the three text-only sections stop
   leaving half the column empty. Everything below 900px stays in one column. */
@media (min-width: 1000px) {
  .hero {
    display: grid; grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr);
    column-gap: clamp(2rem, 3.5vw, 3rem); align-items: end;
  }
  .hero h1 { grid-column: 1; max-width: none; margin-bottom: 0; }
  .hero .lede { grid-column: 2; margin-bottom: 0.3rem; font-size: 1.05rem; max-width: none; }
  .hero .strip, .hero .figures, .hero .asof { grid-column: 1 / -1; }
}

@media (min-width: 900px) {
  .check {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    column-gap: clamp(2rem, 4vw, 3.5rem); align-items: start;
  }
  .check h2 { grid-column: 1; grid-row: 1; }
  .check > p { grid-column: 1; grid-row: 2; margin-bottom: 0; }
  .check-form { grid-column: 2; grid-row: 1; max-width: none; }
  .check-result { grid-column: 2; grid-row: 2; max-width: none; margin-top: 1.25rem; }

  .source { columns: 2; column-gap: clamp(2rem, 4vw, 3.5rem); }
  .source h2 { column-span: all; }
  .source p { max-width: none; break-inside: avoid; }

  .lead-form { max-width: none; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: clamp(2rem, 4vw, 3rem); }
  .lead-form > fieldset:first-of-type { grid-column: 1; }
  .lead-form > fieldset:nth-of-type(2) { grid-column: 2; }
  .lead-form > .row, .lead-form > label, .lead-form > button,
  .lead-form > .fine, .lead-form > .lead-result { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  .who dl { grid-template-columns: 1fr; gap: 1.5rem; }
  .row { grid-template-columns: 1fr; }
  .month .n { font-size: 0.7rem; }
  .month .lab { font-size: 0.68rem; transform: rotate(-52deg); transform-origin: top right; bottom: -2.3rem; right: 45%; }
  .strip figcaption { margin-top: 3.6rem; }
  .bracket span { font-size: 0.72rem; }
  .top { gap: 0.6rem; }
  .top-cta { padding: 0.35rem 0.8rem; font-size: 0.92rem; }
  .check-form { flex-direction: column; }
  .figures > div { flex-basis: 100%; padding-right: 0; }
  .figures > div + div { border-left: 0; border-top: 1px solid var(--band-rule); padding-left: 0; }
}
