:root {
  --paper: #f6f5f0;
  --white: #fff;
  --ink: #19221f;
  --secondary: #53605a;
  --line: #d9dfd9;
  --night: #15231f;
  --night-line: #3a4841;
  --map-muted: #a8b9af;
  --signal: #9fee9a;
  --cyber: #ff847a;
  --breach: #f0c073;
  --outage: #87cdb7;
  --display: Spectral, Georgia, serif;
  --body: Inter, Arial, sans-serif;
  --mono: "IBM Plex Mono", monospace;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--body);
  font-synthesis: none;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 22px; }
body { margin: 0; }
a { color: inherit; }
button, input { font: inherit; }
button { color: inherit; }
:focus-visible { outline: 2px solid #187254; outline-offset: 4px; }
h1, h2, h3, p { margin: 0; }
a, button, input { -webkit-tap-highlight-color: transparent; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: fixed; z-index: 10; top: 8px; left: 12px; padding: 12px; background: var(--white); transform: translateY(-150%); }
.skip-link:focus { transform: none; }
.shell { width: min(100% - 112px, 1224px); margin-inline: auto; }

.site-header { border-bottom: 1px solid var(--line); }
.masthead { min-height: 66px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 26px; }
.wordmark { width: fit-content; display: flex; align-items: center; gap: 8px; text-decoration: none; font: 700 23px/1 var(--body); letter-spacing: -.045em; }
.brand-icon { display: block; flex: none; }
.main-nav { display: flex; gap: 32px; font-size: 13px; font-weight: 600; }
.main-nav a { text-decoration: none; color: #3e4a43; }
.main-nav a:hover { text-decoration: underline; text-underline-offset: 5px; }

.intro { display: flex; align-items: end; justify-content: space-between; gap: 40px; padding-block: 39px 32px; }
.intro h1 { font: 600 clamp(34px, 5.6vw, 72px)/1.04 var(--display); letter-spacing: -.035em; }
.intro p { max-width: 602px; margin-top: 13px; color: var(--secondary); font-size: 16px; line-height: 1.6; }
.edition { display: grid; gap: 7px; margin-bottom: 4px; border-left: 1px solid #bfcac1; padding-left: 13px; white-space: nowrap; font: 11px var(--mono); }
.edition span { color: var(--secondary); }

.map-panel { overflow: hidden; border-radius: 9px; background: var(--night); color: #f2f6f0; }
.map-panel :focus-visible { outline-color: var(--signal); }
.map-heading, .map-bottom { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-inline: 23px; }
.map-heading { min-height: 62px; border-bottom: 1px solid var(--night-line); }
.map-heading h2 { font: 600 25px/1.16 var(--display); letter-spacing: -.015em; }
.map-window { display: inline-flex; align-items: center; gap: 8px; font: 11px var(--mono); white-space: nowrap; }
.map-window i { width: 7px; height: 7px; border: 1px solid var(--signal); border-radius: 50%; }
.map-body { display: grid; grid-template-columns: minmax(0, 1fr) 265px; }
.map-visual { display: grid; place-items: center; min-width: 0; min-height: 310px; padding: 12px 10px; }
.map-frame { position: relative; width: min(100%, 870px); aspect-ratio: 1000 / 430; }
#world-map, #map-markers { position: absolute; inset: 0; width: 100%; height: 100%; }
.dot { display: inline-block; width: 8px; height: 8px; flex: 0 0 8px; border-radius: 50%; background: var(--point); }
.cyber { --point: var(--cyber); --tag-text: #943729; --tag-bg: #faeae5; }
.breach { --point: var(--breach); --tag-text: #744a16; --tag-bg: #f6eedf; }
.outage { --point: var(--outage); --tag-text: #215b4a; --tag-bg: #e4f0e9; }

.pin { position: absolute; left: var(--x); top: var(--y); transform: translate(-50%, -50%); width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; text-decoration: none; z-index: 1; }
.pin::before, .pin::after { content: ""; position: absolute; border-radius: 50%; border: 1px solid var(--point); pointer-events: none; }
.pin::before { width: 19px; height: 19px; opacity: .48; }
.pin::after { width: 19px; height: 19px; animation: pulse 2.65s var(--delay, 0s) infinite ease-out; }
.pin .dot { width: 9px; height: 9px; box-shadow: 0 0 0 2px var(--night); }
@keyframes pulse {
  from { transform: scale(.8); opacity: .82; }
  85%, to { transform: scale(2.1); opacity: 0; }
}
.pin:hover, .pin:focus-visible, .pin.highlight { z-index: 3; }
.pin:hover::before, .pin:focus-visible::before, .pin.highlight::before { opacity: 1; border-width: 2px; }
.pin:hover::after, .pin:focus-visible::after, .pin.highlight::after { animation-play-state: paused; }
.pin-tip { position: absolute; bottom: calc(100% + 3px); left: 50%; transform: translateX(-50%); max-width: min(230px, 43vw); width: max-content; padding: 9px 11px; color: var(--ink); background: #f6f8f3; border-radius: 3px; pointer-events: none; visibility: hidden; opacity: 0; font: 650 12px/1.4 var(--body); }
.pin-tip small { display: block; font: 11px/1.4 var(--mono); color: var(--secondary); }
.pin.edge-right .pin-tip { left: auto; right: -5px; transform: none; }
.pin.edge-left .pin-tip { left: -5px; transform: none; }
.pin:hover .pin-tip, .pin:focus-visible .pin-tip, .pin.highlight .pin-tip { visibility: visible; opacity: 1; }

.map-side { padding: 21px 20px 13px; border-left: 1px solid var(--night-line); display: flex; flex-direction: column; }
.map-side-title { display: flex; justify-content: space-between; align-items: center; gap: 5px; color: var(--map-muted); font: 600 12px var(--body); }
.map-side-title span:last-child { white-space: nowrap; font: 11px var(--mono); }
#map-recent { margin-block: 7px auto; }
.map-row { display: grid; grid-template-columns: 8px minmax(0, 1fr) auto; align-items: start; gap: 9px; border-bottom: 1px solid var(--night-line); padding-block: 12px; text-decoration: none; }
.map-row:hover, .map-row:focus-visible { color: var(--signal); }
.map-row .dot { margin-top: 5px; }
.map-row strong, .map-row small { display: block; }
.map-row strong { font: 650 14px/1.35 var(--body); }
.map-row small { color: var(--map-muted); margin-top: 3px; font: 12px/1.4 var(--body); }
.map-row time { color: #c3d0c6; font: 11px/1.5 var(--mono); }
.map-more { width: fit-content; margin-top: 17px; font-size: 12px; font-weight: 600; text-decoration: none; }
.map-more span { margin-left: 4px; color: var(--signal); }
.map-more:hover { text-decoration: underline; text-underline-offset: 4px; }
.map-bottom { min-height: 48px; border-top: 1px solid var(--night-line); font: 12px var(--body); }
.legend { display: flex; gap: 19px; flex-wrap: wrap; }
.legend span { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.legend .dot { width: 7px; height: 7px; flex-basis: 7px; }
.map-note { color: var(--map-muted); text-align: right; }

.feed, .context { margin-top: 49px; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 12px; margin-bottom: 18px; }
.section-heading h2 { font: 600 clamp(29px, 3.5vw, 46px)/1.08 var(--display); letter-spacing: -.035em; }
.section-heading p { font: 11px var(--mono); color: var(--secondary); }
.feed-tools { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 13px 22px; align-items: center; margin-bottom: 17px; }
.filters { display: flex; flex-wrap: wrap; gap: 6px; }
.filters button, .pagination button { cursor: pointer; background: transparent; border: 1px solid #cdd6ce; border-radius: 4px; min-height: 38px; padding: 7px 11px; font-size: 12px; font-weight: 600; }
.filters button:hover, .pagination button:hover { border-color: #6d8a77; }
.filters button[aria-pressed="true"], .pagination button[aria-current="page"] { color: #f5f9f3; background: var(--night); border-color: var(--night); }
.search { position: relative; width: min(100%, 249px); }
.search input { width: 100%; height: 38px; border: 1px solid #cdd6ce; border-radius: 4px; padding-inline: 33px 10px; background: var(--white); color: var(--ink); font-size: 12px; }
.search i { position: absolute; z-index: 1; width: 11px; height: 11px; border: 1.5px solid #566c5e; border-radius: 50%; left: 12px; top: 12px; pointer-events: none; }
.search i::after { content: ""; position: absolute; width: 5px; height: 1.5px; left: 7px; top: 8px; transform: rotate(45deg); background: #566c5e; }
.feed-labels, .incident-row { display: grid; grid-template-columns: 127px minmax(0, 1fr) 116px 26px; gap: 17px; align-items: center; }
.feed-labels { color: var(--secondary); border-block: 1px solid var(--line); padding: 9px 14px; font: 11px var(--mono); }
.incident-list { list-style: none; padding: 0; margin: 0; }
.incident-list li { border-bottom: 1px solid var(--line); }
.incident-row { padding: 14px; text-decoration: none; min-height: 89px; }
.incident-row:hover { background: #edf0eb; }
.row-time { display: grid; gap: 4px; font: 11px var(--mono); }
.row-time span:first-child { color: var(--secondary); }
.row-time span + span { font-size: 15px; }
.row-main { min-width: 0; }
.row-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; color: var(--secondary); font: 11px var(--mono); }
.tag { color: var(--tag-text); background: var(--tag-bg); display: inline-block; padding: 2px 5px; border-radius: 3px; }
.row-title { display: block; margin-top: 5px; font: 600 21px/1.16 var(--display); letter-spacing: -.015em; }
.row-summary { display: block; color: var(--secondary); margin-top: 4px; font-size: 13px; line-height: 1.5; }
.example { color: #565b54; border: 1px solid #cbd2c9; border-radius: 3px; padding: 1px 4px; }
.row-status { display: flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 600; }
.row-status i { width: 7px; height: 7px; border-radius: 50%; background: #639880; flex: 0 0 auto; }
.row-status.ongoing i { background: #a67236; }
.row-status.confirmed i { background: #59706a; }
.row-arrow { font: 18px var(--mono); justify-self: end; color: #426b54; }
.empty { padding: 30px 14px; color: var(--secondary); }
.feed-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 14px; }
.feed-footer p { font: 11px var(--mono); color: var(--secondary); }
.pagination { display: flex; flex-wrap: wrap; gap: 6px; }
.pagination button { min-width: 38px; }

.context-grid { display: grid; grid-template-columns: repeat(3, 1fr); border-block: 1px solid #bfcac1; }
.context-grid article { padding: 20px 20px 22px; display: flex; align-items: start; flex-direction: column; }
.context-grid article:first-child { padding-left: 0; }
.context-grid article + article { border-left: 1px solid var(--line); }
.context-topic { font: 11px var(--mono); color: #35674d; }
.context-grid h3 { margin-top: 9px; font: 600 24px/1.12 var(--display); letter-spacing: -.02em; }
.context-grid p { font-size: 13px; line-height: 1.65; color: var(--secondary); margin-block: 9px 15px; }
.context-grid a { margin-top: auto; font-size: 12px; font-weight: 650; color: #25553e; text-underline-offset: 3px; }
.site-footer { margin-top: 52px; border-top: 1px solid var(--line); }
.footer-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px 23px; padding-block: 18px; font-size: 11px; color: var(--secondary); }
.footer-inner p { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 13px; }
.footer-inner strong { color: var(--ink); font: 700 16px var(--body); }
.footer-inner a { text-underline-offset: 3px; }

.detail { min-height: 60vh; padding-top: 35px; }
.back { display: inline-block; font-size: 13px; font-weight: 650; color: #315c47; text-underline-offset: 4px; margin-bottom: 29px; }
.detail-header { padding-bottom: 24px; border-bottom: 1px solid #bfcac1; }
.detail-header h1 { max-width: 960px; margin-block: 10px 12px; font: 600 clamp(32px, 5vw, 64px)/1.05 var(--display); letter-spacing: -.035em; }
.detail-header h1:focus { outline: none; }
.detail-header p { max-width: 730px; color: var(--secondary); font-size: 15px; line-height: 1.6; }
.detail-meta { margin-top: 15px; display: flex; flex-wrap: wrap; gap: 9px 18px; align-items: center; color: var(--secondary); font: 11px var(--mono); }
.detail-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(240px, .65fr); gap: 36px; }
.detail-section { border-bottom: 1px solid var(--line); padding-block: 22px; }
.detail-section h2 { font: 600 26px/1.15 var(--display); letter-spacing: -.02em; margin-bottom: 9px; }
.detail-section p, .detail-section li { font-size: 14px; line-height: 1.65; }
.detail-section ul, .detail-section ol { margin: 0; padding-left: 19px; }
.detail-section li + li { margin-top: 7px; }
.detail-section a { color: #24553d; font-weight: 600; text-underline-offset: 3px; }
.detail-section .timeline { list-style: none; padding-left: 0; }
.timeline li { border-left: 1px solid #b9cabd; padding: 0 0 9px 11px; }
.timeline time { display: block; color: var(--secondary); font: 11px var(--mono); margin-bottom: 3px; }
.timeline-source { display: block; width: fit-content; margin-top: 4px; font-size: 12px; }

@media (max-width: 1000px) {
  .shell { width: calc(100% - 60px); }
  .map-body { grid-template-columns: minmax(0, 1fr) 235px; }
  .map-side { padding-inline: 14px; }
}
@media (max-width: 740px) {
  .shell { width: calc(100% - 36px); }
  .masthead { grid-template-columns: 1fr auto; gap: 10px 15px; padding-block: 11px; }
  .main-nav { grid-column: 1 / -1; grid-row: 2; gap: 20px; }
  .wordmark { font-size: 20px; }
  .intro { align-items: start; flex-direction: column; gap: 15px; padding-block: 30px 22px; }
  .intro p { margin-top: 10px; font-size: 14px; }
  .edition { display: flex; gap: 8px; margin: 0; }
  .map-body { display: block; }
  .map-heading { min-height: 51px; }
  .map-heading, .map-bottom { padding-inline: 12px; }
  .map-heading h2 { font-size: 20px; }
  .map-window, .map-note { font-size: 11px; }
  .map-visual { min-height: 0; padding: 9px 4px; }
  .map-side { border-left: 0; border-top: 1px solid var(--night-line); padding: 11px 12px; }
  .map-row { padding-block: 8px; }
  .map-more { margin-top: 12px; }
  .map-bottom { padding-block: 10px; flex-wrap: wrap; gap: 7px; }
  .map-note { text-align: left; }
  .legend { gap: 8px 12px; font-size: 11px; }
  .pin { width: 28px; height: 28px; }
  .pin::before, .pin::after { width: 15px; height: 15px; }
  .pin .dot { width: 7px; height: 7px; }
  .feed, .context { margin-top: 34px; }
  .section-heading { align-items: start; flex-direction: column; gap: 7px; margin-bottom: 12px; }
  .feed-labels { display: none; }
  .incident-list { border-top: 1px solid var(--line); }
  .incident-row { grid-template-columns: 58px minmax(0, 1fr) 17px; gap: 7px 9px; padding: 12px 3px; align-items: start; }
  .row-time { grid-row: 1 / 3; padding-top: 2px; }
  .row-time span + span { font-size: 12px; }
  .row-status { grid-column: 2; grid-row: 2; }
  .row-arrow { grid-column: 3; grid-row: 1 / 3; align-self: center; }
  .row-title { font-size: 19px; }
  .context-grid, .detail-layout { display: block; }
  .context-grid article { padding-inline: 0; }
  .context-grid article + article { border-left: 0; border-top: 1px solid var(--line); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .pin::after { animation: none; opacity: 0; }
}

.warning { --point: #b5c8ed; --tag-text: #364a75; --tag-bg: #e8edf8; }
.map-empty { margin-top: 14px; color: var(--map-muted); font-size: 13px; line-height: 1.5; }

.map-window select { color: #f0f5ef; background: #263930; border: 1px solid #65796e; border-radius: 4px; padding: 7px 8px; font: inherit; }
.pin.cluster { width: 24px; height: 24px; padding: 0; border: 0; background: transparent; cursor: pointer; }
.pin.cluster::before, .pin.cluster::after { content: none; }
.cluster-mark { --cluster-color: #a9dcb6; position: relative; display: inline-block; width: 14px; height: 10px; }
.cluster-mark::before, .cluster-mark::after { content: ""; position: absolute; width: 8px; height: 8px; border: 1px solid var(--night); border-radius: 50%; background: var(--cluster-color); }
.cluster-mark::before { top: 0; right: 0; }
.cluster-mark::after { bottom: 0; left: 0; }
.pin.cluster[aria-pressed="true"] .cluster-mark { --cluster-color: #f2faee; }
.map-pages { display: flex; align-items: center; gap: 8px; padding-top: 8px; font: 11px var(--mono); }
.map-pages button, .map-clear { background: transparent; color: #e7f5e7; border: 1px solid var(--night-line); padding: 4px 6px; border-radius: 3px; cursor: pointer; }
.map-pages button:disabled { opacity: .35; cursor: default; }
.map-clear { margin-top: 7px; font-size: 11px; }
.map-side-title { flex-wrap: wrap; }
.pagination span { align-self: center; color: var(--secondary); }

.main-nav [aria-current="page"] { color: #196046; text-decoration: underline; text-underline-offset: 5px; }
.stats-intro { padding-bottom: 26px; }
.stats-method { margin-bottom: 3px; color: #2c6148; font-size: 13px; font-weight: 650; text-underline-offset: 4px; }
.stats-controls { display: flex; align-items: end; flex-wrap: wrap; gap: 10px 16px; padding-bottom: 11px; }
.stats-controls label, .company-search { display: grid; gap: 4px; color: var(--secondary); font-size: 12px; font-weight: 650; }
.stats-controls select, .company-search input { color: var(--ink); background: white; border: 1px solid #bdc9bf; border-radius: 4px; padding: 7px 9px; min-height: 36px; max-width: 100%; font: 13px var(--body); }
.stats-controls select { width: max-content; }
.stats-notice, .stats-hint { color: var(--secondary); font-size: 12px; line-height: 1.5; }
.stats-metrics { display: grid; grid-template-columns: repeat(4, 1fr); border-block: 1px solid var(--line); margin: 19px 0 0; }
.stats-metrics div { padding: 15px 19px; }
.stats-metrics div:first-child { padding-left: 0; }
.stats-metrics div + div { border-left: 1px solid var(--line); }
.stats-metrics dt { color: var(--secondary); font: 12px var(--mono); }
.stats-metrics dd { margin: 0; letter-spacing: -.045em; font: 700 clamp(25px, 5vw, 50px)/1 var(--body); font-variant-numeric: tabular-nums; }
.stats-block { margin-top: 39px; }
.stats-block .section-heading { margin-bottom: 9px; }
.month-chart { display: flex; gap: 4px; overflow-x: auto; padding: 6px 4px 8px; border-bottom: 1px solid var(--line); }
.month-chart button { display: grid; grid-template-rows: 18px 122px auto auto; align-items: end; gap: 4px; text-align: center; flex: 1 0 31px; min-width: 0; border: 0; background: transparent; padding: 0 2px; cursor: pointer; color: var(--secondary); font: 10px var(--mono); }
.month-chart button:disabled { cursor: default; }
.month-bar { display: flex; height: 100%; align-items: end; }
.month-bar i { width: 100%; height: var(--height); background: #3e7b5c; border-radius: 3px 3px 0 0; }
.month-chart button[aria-pressed="true"] .month-bar i, .month-chart button:hover:not(:disabled) .month-bar i { background: #234e3a; }
.month-chart button:disabled .month-bar i { background: #d0d6cc; }
.month-value { font-size: 10px; }
.company-search { width: min(100%, 330px); margin-block: 12px; }
.company-table-wrap { overflow-x: auto; }
.company-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.company-table th, .company-table td { padding: 7px; border-bottom: 1px solid var(--line); text-align: right; }
.company-table th:first-child { text-align: left; }
.company-table thead th { font: 11px var(--mono); color: var(--secondary); }
.company-table button { color: #246247; border: 0; background: none; padding: 3px 0; text-align: left; font-weight: 650; cursor: pointer; text-underline-offset: 3px; }
.company-table button:hover, .company-table button[aria-pressed="true"] { text-decoration: underline; }
#companies-note { margin-top: 7px; }
.stats-results { margin-top: 12px; padding: 14px; border-left: 2px solid #6a8d75; background: #edf2ee; font-size: 13px; }
.stats-results h3 { font: 600 21px var(--display); }
.stats-results ul { list-style: none; padding: 0; }
.stats-results li { display: flex; gap: 12px; padding: 4px 0; }
.stats-results time { flex-shrink: 0; font: 11px var(--mono); }
.stats-results a, .stats-sources a { color: #24553d; text-underline-offset: 3px; }
.stats-sources p, .stats-sources li { font-size: 13px; line-height: 1.6; }
.stats-sources ul { padding: 0; list-style: none; margin: 10px 0; }
.stats-sources li { display: grid; grid-template-columns: minmax(130px, .6fr) 2fr; gap: 12px; padding: 4px 0; }
@media (max-width: 480px) {
  .stats-metrics { grid-template-columns: repeat(2, 1fr); }
  .stats-metrics div { padding: 10px 6px; }
  .stats-metrics div + div { border-left: 0; }
  .stats-metrics div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .stats-sources li { display: block; }
  .stats-sources li span { display: block; }
  .map-window { font-size: 10px; gap: 4px; }
  .map-window select { max-width: 126px; padding-inline: 4px; }
  .row-time { font-size: 9px; }
}
.stats-links { display: flex; flex-wrap: wrap; gap: 6px 15px; }
#monitoring-status { margin-block: 12px; }
.monitor-table td, .monitor-table th, .monitor-table th:first-child { text-align: left; }
.monitor-table a { font-weight: 650; }

/* Przełącznik archiwum i oznaczenie rekordów z rejestrów */
.archive-toggle { display: inline-flex; align-items: center; gap: 7px; font: 12px var(--body); cursor: pointer; }
.archive-toggle input { width: 15px; height: 15px; accent-color: #2f7a57; }
.map-note .archive-toggle { margin-left: 10px; color: #f2f6f0; }
.tag.register { color: var(--secondary); background: transparent; border: 1px solid var(--line); }
@media (max-width: 740px) { .map-note .archive-toggle { margin: 6px 0 0; display: flex; } }
.permalink { margin-top: 18px; font-size: 13px; }
