/* SHTFWire -- public breaking-events site. Palette and component look follow the private SHTF dashboard.
   Single stylesheet; no external resources (CSP: default-src 'self'). */
:root {
  --red: #c8102e; --red-50: #fdecee; --red-100: #fbd5da;
  --bg: #f1f3f6; --card: #fff; --border: #e2e6ed; --border-strong: #cfd5df;
  --text: #1b2232; --text-2: #364055; --muted: #5d687c;
  --green: #17803a; --green-600: #1f9d48; --green-50: #e8f6ec; --green-100: #cdebd6;
  --amber: #a14a00; --amber-500: #e07a10; --amber-50: #fff2e2; --amber-100: #fde0bd;
  --blue: #1d4f91; --blue-50: #eef4fc; --grey-50: #f2f4f7; --grey-100: #e5e8ee; --grey-600: #5b6577;
  --focus: #2563eb; --radius: 10px; --radius-sm: 6px;
  --shadow: 0 1px 2px rgba(16,24,40,.05), 0 1px 3px rgba(16,24,40,.06);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 14px; line-height: 1.45; color: var(--text); background: var(--bg); }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; }
p { margin: 0 0 .6em; }
svg { flex-shrink: 0; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px; }
main.wrap { padding-top: 16px; padding-bottom: 24px; }
.ico { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; }
.ico-sm { width: 14px; height: 14px; } .ico-lg { width: 26px; height: 26px; } .ico-xl { width: 32px; height: 32px; }

.topbar { background: #141a2b; color: #fff; }
.topbar .wrap { display: flex; align-items: center; gap: 14px; min-height: 52px; flex-wrap: wrap; }
.brand { color: #fff; font-weight: 800; font-size: 20px; letter-spacing: .3px; display: inline-flex; align-items: center; gap: 8px; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 12px; height: 24px; background: var(--red); transform: skewX(-14deg); border-radius: 2px; }
.brand-wire { color: #ff6b7d; }
.tag { color: #8c96ab; font-size: 13px; }

.fresh { margin-top: 12px; padding: 8px 14px; border-radius: var(--radius-sm); font-size: 13px; font-weight: 600;
  background: var(--green-50); color: #0f5a28; border: 1px solid var(--green-100); }
.fresh-delayed { background: var(--amber-50); color: #6d3500; border-color: var(--amber-100); }
.fresh-offline { background: var(--red-50); color: #8f0a1f; border-color: var(--red-100); }
.fresh-empty { background: var(--grey-50); color: var(--text-2); border-color: var(--grey-100); }
.fresh-note { font-weight: 500; }

.page-head { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 16px; flex-wrap: wrap; }
.page-head .ico-xl { color: var(--text-2); margin-top: 2px; }
.page-head h1 { font-size: 26px; font-weight: 800; }
.page-head .subtitle { color: var(--muted); margin-top: 3px; }
.pills { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 6px; }
.breadcrumb { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.breadcrumb a { color: var(--muted); }

.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); min-width: 0; }
.card-head { display: flex; align-items: center; gap: 10px; padding: 14px 18px 10px; }
.card-head h2 { font-size: 18px; font-weight: 700; }
.card-head .ico-lg { color: var(--red); }
.card-body { padding: 4px 18px 16px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.mt { margin-top: 16px; }
.muted { color: var(--muted); } .small { font-size: 12.5px; } .strong { font-weight: 700; }
.break { overflow-wrap: anywhere; }
.empty { padding: 28px 18px; text-align: center; color: var(--muted); }

.filters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; align-items: end; }
.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.field label { font-size: 13px; font-weight: 600; color: var(--text-2); }
input[type=search], select { width: 100%; min-height: 40px; padding: 8px 10px; border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm); background: #fff; color: var(--text); font: inherit; }
.actions { grid-column: 1 / -1; display: flex; gap: 8px; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 8px 14px; border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm); background: #fff; color: var(--text); font: inherit; font-weight: 600; cursor: pointer; }
.btn:hover { background: var(--grey-50); text-decoration: none; }
.btn-primary { background: var(--text); border-color: var(--text); color: #fff; }
.btn-primary:hover { background: #2b3550; }
.btn-sm { min-height: 34px; padding: 5px 12px; }
.pagination { display: flex; justify-content: center; align-items: center; gap: 14px; padding: 12px; border-top: 1px solid var(--border); }

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th { text-align: left; font-weight: 600; color: var(--text-2); font-size: 13px; padding: 8px 12px;
  border-bottom: 1px solid var(--border); background: #fafbfc; white-space: nowrap; }
.tbl td { padding: 9px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover td { background: #fafbfd; }
.tbl .time { font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 500; }
.tbl tr.rail td:first-child { box-shadow: inset 4px 0 0 var(--red); padding-left: 16px; }
.tbl tr.rail-confirmed td:first-child { box-shadow: inset 4px 0 0 var(--amber-500); }
.tbl tr.rail-expired td:first-child { box-shadow: inset 4px 0 0 #b8bfcb; }

.pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700;
  letter-spacing: .3px; white-space: nowrap; border: 1px solid transparent; line-height: 1.4; }
.pill-unconfirmed { color: #b34700; background: var(--amber-50); border-color: var(--amber-100); }
.pill-confirmed { color: #126b30; background: var(--green-50); border-color: var(--green-100); }
.pill-expired, .pill-off { color: #4e5869; background: var(--grey-50); border-color: var(--grey-100); }
.sev { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; white-space: nowrap; }
.sev-critical { background: #7a0717; color: #fff; } .sev-high { background: var(--red); color: #fff; }
.sev-medium { background: #f5a524; color: #3d2400; } .sev-low { background: var(--grey-100); color: #3c4555; }

.timeline { list-style: none; margin: 0; padding: 0 0 0 4px; }
.timeline li { position: relative; padding: 0 0 16px 26px; }
.timeline li::before { content: ""; position: absolute; left: 6px; top: 16px; bottom: -2px; width: 2px; background: var(--border-strong); }
.timeline li:last-child::before { display: none; }
.timeline li::after { content: ""; position: absolute; left: 0; top: 3px; width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 3px solid var(--grey-600); }
.timeline li.t-red::after { border-color: var(--red); }
.timeline li.t-green::after { border-color: var(--green-600); background: var(--green-600); }
.timeline li.t-amber::after { border-color: var(--amber-500); }
.timeline li.t-grey::after { border-color: #a6aebb; }
.timeline .t-title { font-weight: 700; } .timeline .t-when { color: var(--muted); font-size: 13px; }
.report { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 14px; }
.report h3 { font-size: 15px; margin-bottom: 6px; overflow-wrap: anywhere; }
dl.facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 7px 16px; margin: 0; }
dl.facts dt { color: var(--muted); font-size: 13px; } dl.facts dd { margin: 0; overflow-wrap: anywhere; }
.callout { border-left: 4px solid var(--blue); background: var(--blue-50); padding: 10px 14px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; color: #163e73; }
.foot { padding-top: 8px; padding-bottom: 28px; color: var(--muted); font-size: 12.5px; text-align: center; }

/* Mobile: the events table becomes stacked cards (same data-label pattern as the private site). */
@media (max-width: 699px) {
  .filters, .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .page-head h1 { font-size: 22px; }
  table.stackable, table.stackable tbody, table.stackable tr, table.stackable td { display: block; width: 100%; }
  table.stackable thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  table.stackable tr { border-bottom: 1px solid var(--border); padding: 10px 14px; position: relative; }
  table.stackable tbody tr:last-child { border-bottom: 0; }
  table.stackable td { border: 0; padding: 3px 0; display: flex; gap: 12px; align-items: center; min-width: 0; text-align: left; overflow-wrap: anywhere; }
  table.stackable td > * { min-width: 0; }
  table.stackable td[data-label]::before { content: attr(data-label); flex: 0 0 92px; color: var(--muted); font-size: 12.5px; font-weight: 600; }
  table.stackable td.primary { font-size: 15px; font-weight: 600; padding-bottom: 4px; }
  table.stackable td.primary::before { display: none; }
  table.stackable td.primary .small { font-weight: 400; }
  table.stackable tr.rail td:first-child { padding-left: 0; box-shadow: none !important; }
  table.stackable tr.rail { box-shadow: inset 4px 0 0 var(--red); }
  table.stackable tr.rail.rail-confirmed { box-shadow: inset 4px 0 0 var(--amber-500); }
  table.stackable tr.rail.rail-expired { box-shadow: inset 4px 0 0 #b8bfcb; }
  table.stackable tr:hover td { background: none; }
}

/* utility classes replacing inline style attributes (strict CSP blocks style="") */
.u-grow{min-width:0;flex:1}.u-minw0{min-width:0}.u-mb16{margin-bottom:16px}.u-mb6{margin-bottom:6px}.u-mt12{margin-top:12px}.u-rel{margin:4px 0 0}.u-pt14{padding-top:14px}
