/* MCPB — shared styles for the home page and the incident report page.
   Look: a black terminal, falling digits, lightbar-blue bands on the left and right edges,
   and one "intranet" window that speaks in small uppercase monospace. */
:root {
  --bg: #000;
  --ink: #eef2ff;
  --val: #b9c2d8;          /* values inside the window */
  --mail: #d3daec;
  --dim: #7f8aa6;          /* labels and HUD text */
  --blue: #1a30ff;         /* lightbar blue */
  --blue-hi: #5269ff;
  --ice: #8eaaff;          /* system accent */
  --tape: #ffdd32;         /* the logo's police-tape yellow */
  --line: rgba(120, 150, 255, .24);
  --line-hi: rgba(120, 150, 255, .5);
  --mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --disp: "Chakra Petch", "Arial Narrow", system-ui, sans-serif;
  --gutter: 36px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--dim);
  font: 400 14px/1.5 var(--mono); letter-spacing: .14em; text-transform: uppercase;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
a { color: inherit; }
:focus-visible { outline: 2px solid var(--tape); outline-offset: 3px; }

/* ---------- backdrop ---------- */
#rain { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.bands i { position: fixed; top: 0; bottom: 0; width: 24vw; z-index: 0; pointer-events: none; opacity: .26; animation: pulse2 3.4s ease-in-out infinite; }
.bands .l { left: 0; background: linear-gradient(to right, rgba(32,56,255,.62) 0, rgba(30,53,255,.47) 8%, rgba(28,50,255,.34) 20%, rgba(26,48,255,.23) 34%, rgba(26,48,255,.14) 48%, rgba(26,48,255,.075) 62%, rgba(26,48,255,.03) 78%, rgba(26,48,255,.008) 90%, rgba(26,48,255,0) 100%); }
.bands .r { right: 0; animation-delay: 1.7s; background: linear-gradient(to left, rgba(32,56,255,.62) 0, rgba(30,53,255,.47) 8%, rgba(28,50,255,.34) 20%, rgba(26,48,255,.23) 34%, rgba(26,48,255,.14) 48%, rgba(26,48,255,.075) 62%, rgba(26,48,255,.03) 78%, rgba(26,48,255,.008) 90%, rgba(26,48,255,0) 100%); }
@keyframes pulse2 { 0%, 100% { opacity: .26; } 8% { opacity: .68; } 16% { opacity: .32; } 24% { opacity: .6; } 42% { opacity: .26; } }
.scan { position: fixed; inset: 0; z-index: 5; pointer-events: none; background: repeating-linear-gradient(to bottom, rgba(255,255,255,.022) 0 1px, transparent 1px 3px); }
/* The host adds an empty frame pinned to the bottom corner. It shows nothing, but a pinned box at the screen
   edge makes phone browsers reserve a flat strip behind their toolbar, so it is taken out of the page. */
#nl-badge-frame { display: none !important; }

/* ---------- frame ---------- */
.shell {
  position: relative; z-index: 1; min-height: 100vh; min-height: 100dvh;
  display: grid; grid-template-rows: auto 1fr auto; gap: 28px;
  padding-block: 28px;
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
}
.hud { display: flex; justify-content: space-between; align-items: baseline; gap: 8px 24px; flex-wrap: wrap; font-size: 13px; }
.tz { display: flex; gap: 6px 24px; flex-wrap: wrap; font-variant-numeric: tabular-nums; }
.tz span { white-space: nowrap; }
.tz b { font-weight: 500; margin-right: 8px; }
.tz i { font-style: normal; color: var(--ink); }
.tz .home i { color: var(--ice); }
.ice { color: var(--ice); }
.loc { color: var(--ink); font-weight: 500; }
.live { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--ice); margin-right: 12px; position: relative; vertical-align: 1px; animation: live 2.4s ease-in-out infinite; }
.live::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 1px solid var(--ice); animation: ring 2.4s ease-out infinite; }
@keyframes live { 0%, 100% { opacity: 1; box-shadow: 0 0 10px rgba(142,170,255,.9); } 50% { opacity: .35; box-shadow: 0 0 0 rgba(142,170,255,0); } }
@keyframes ring { from { transform: scale(1); opacity: .7; } to { transform: scale(3.2); opacity: 0; } }

/* ---------- home: the intranet window ---------- */
.home main { display: grid; place-items: center; min-width: 0; }
.win { width: min(720px, 100%); font-size: 13.5px; border: 1px solid var(--line-hi); background: rgba(2,4,12,.955); box-shadow: 0 0 0 1px rgba(0,0,0,.6), 0 22px 70px rgba(0,0,0,.75), 0 0 84px rgba(26,48,255,.16); }
.wbar { display: flex; align-items: center; gap: 14px; padding: 10px 15px; border-bottom: 1px solid var(--line); }
.wbar .t { color: var(--val); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ctl { margin-left: auto; display: flex; gap: 7px; flex: none; }
.ctl i { width: 10px; height: 10px; border: 1px solid var(--line-hi); }
.ctl i:last-child { background: rgba(142,170,255,.35); }
.waddr { display: flex; align-items: center; gap: 12px; padding: 8px 15px; border-bottom: 1px solid var(--line); }
.bar { flex: 1; min-width: 0; border: 1px solid var(--line); padding: 5px 11px; background: rgba(0,0,0,.45); text-transform: none; letter-spacing: .04em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar b { color: var(--val); font-weight: 400; }
.waddr .ok { white-space: nowrap; }
.wbody { padding: 32px 32px 30px; }
.logo { margin: 0 0 36px; line-height: 0; }
.logo img { width: 124px; height: auto; display: block; }
.logo a { display: inline-block; }                                 /* on the home page the logo opens the YouTube channel */
.rows { margin: 0; border-top: 1px solid var(--line); }
.rows > div { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.rows dt { font-size: 11.5px; letter-spacing: .22em; }
.rows dd { margin: 0; color: var(--val); }
.mail { font-size: 17px; color: var(--mail); text-transform: none; letter-spacing: .1em; text-decoration: none; overflow-wrap: anywhere; }
.mail:hover { color: #fff; text-decoration: underline; text-underline-offset: 4px; }
.btn { margin-top: 26px; display: flex; justify-content: space-between; align-items: center; gap: 6px 20px; flex-wrap: wrap; padding: 14px 18px; background: var(--blue); border: 1px solid var(--blue-hi); color: #e6ebff; text-decoration: none; box-shadow: 0 0 30px rgba(26,48,255,.5); transition: background .15s; }
.btn b { font-weight: 400; color: #fff; }
.btn:hover { background: #2b41ff; }
.wfoot { display: flex; justify-content: space-between; gap: 4px 12px; flex-wrap: wrap; padding: 8px 15px; border-top: 1px solid var(--line); font-size: 11.5px; }

/* ---------- report page: a wide form under a top bar ---------- */
[hidden] { display: none !important; }
.report .bands i { width: 10vw; }
.report #rain { -webkit-mask: linear-gradient(90deg, #000 2%, transparent 5%, transparent 95%, #000 98%); mask: linear-gradient(90deg, #000 2%, transparent 5%, transparent 95%, #000 98%); }
.report .shell { grid-template-rows: auto 1fr; gap: 0; padding: 0; }
.rtop { display: flex; align-items: center; gap: 12px 24px; flex-wrap: wrap; padding-block: 14px; padding-left: max(var(--gutter), env(safe-area-inset-left, 0px)); padding-right: max(var(--gutter), env(safe-area-inset-right, 0px)); border-bottom: 1px solid var(--line); background: rgba(2,5,12,.9); font-size: 13px; }
.rtop .logo { margin: 0; line-height: 0; }
.rtop .logo img { width: 104px; }
.rtop .bar { flex: 1 1 240px; padding: 7px 12px; }
.rmain { width: min(1180px, 100%); margin: 0 auto; display: grid; gap: 28px; align-content: start; padding-block: 30px 44px; padding-left: max(var(--gutter), env(safe-area-inset-left, 0px)); padding-right: max(var(--gutter), env(safe-area-inset-right, 0px)); }
.rhead { display: flex; justify-content: space-between; align-items: flex-end; gap: 14px 24px; flex-wrap: wrap; }
.rhead h1 { margin: 0; font: 700 30px/1 var(--disp); letter-spacing: .01em; color: var(--ink); }
.rhead p { margin: 9px 0 0; font: 500 15px/1.45 var(--sans); letter-spacing: 0; text-transform: none; color: #c3cfe3; max-width: 62ch; }
.chip { font-size: 11.5px; letter-spacing: .16em; border: 1px solid var(--line-hi); color: var(--ice); padding: 6px 11px; white-space: nowrap; }
/* the one rule of this channel */
.rule { margin: 0; padding: 13px 16px; border-left: 2px solid var(--tape); background: rgba(255,221,50,.055); font: 500 14px/1.55 var(--sans); letter-spacing: 0; text-transform: none; color: #c3cfe3; }
.rule b { display: block; margin-bottom: 4px; font: 500 11.5px/1.4 var(--mono); letter-spacing: .22em; text-transform: uppercase; color: var(--tape); }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { width: 100%; padding: 0 0 11px; margin-bottom: 16px; border-bottom: 1px solid var(--line); font-size: 12px; letter-spacing: .2em; color: var(--ice); }
.grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px 14px; align-items: end; }
.fld { display: grid; gap: 6px; min-width: 0; }
.fld.s2 { grid-column: span 2; }
.fld.s3 { grid-column: span 3; }
.fld label { font-size: 11px; letter-spacing: .13em; color: #b4c1d6; }
.fld input { font: 500 15px/1.3 var(--sans); letter-spacing: 0; text-transform: none; color: var(--ink); background: rgba(255,255,255,.05); border: 1px solid var(--line); padding: 10px 12px; width: 100%; min-width: 0; border-radius: 0; }
.fld input::placeholder { color: #66758c; }
.fld input:focus-visible { outline: 2px solid var(--ice); outline-offset: 1px; }
.hint { margin: 2px 0 0; font-size: 11px; letter-spacing: .16em; color: var(--dim); overflow-wrap: anywhere; }
.hint.plain { font: 500 13px/1.5 var(--sans); letter-spacing: 0; text-transform: none; }
.hint.ok { color: var(--ice); }
.hint.bad { color: #ff8f9c; font: 500 13px/1.5 var(--sans); letter-spacing: 0; text-transform: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
/* privacy notice and consent */
.privacy ul { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 32px; font: 500 13px/1.55 var(--sans); letter-spacing: 0; text-transform: none; color: #9aa6bc; }
.privacy li b { color: #c3cfe3; font-weight: 600; }
.agree { display: flex; gap: 11px; align-items: flex-start; margin-top: 18px; font: 500 14px/1.45 var(--sans); letter-spacing: 0; text-transform: none; color: var(--ink); cursor: pointer; }
.agree input { width: 18px; height: 18px; margin: 1px 0 0; flex: none; accent-color: var(--blue); }
.plink { margin: 16px 0 0; font: 500 14px/1.4 var(--sans); letter-spacing: 0; text-transform: none; }
.plink a, .dmain a { color: var(--ice); text-underline-offset: 3px; }
.plink a:hover, .dmain a:hover { color: var(--ink); }
.hud a { color: inherit; text-decoration: none; }
.hud a:hover { color: var(--ink); }
/* home footer: three columns so the middle link sits at the true centre of the page, whatever the side texts measure */
.home footer.hud { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); }
.home footer.hud > :last-child { justify-self: end; }
@media (max-width: 640px) {
  .home footer.hud { grid-template-columns: minmax(0, 1fr); }
  .home footer.hud > :last-child { justify-self: start; }
}

/* privacy policy: a readable document in the same shell */
.dmain { width: min(880px, 100%); margin: 0 auto; display: grid; gap: 32px; align-content: start; padding-block: 30px 64px; padding-left: max(var(--gutter), env(safe-area-inset-left, 0px)); padding-right: max(var(--gutter), env(safe-area-inset-right, 0px)); }
.dmain h2 { margin: 0 0 14px; padding-bottom: 11px; border-bottom: 1px solid var(--line); font: 400 12px/1.4 var(--mono); letter-spacing: .2em; color: var(--ice); }
.dmain p, .dmain li, .dmain dt, .dmain dd { font: 500 15px/1.65 var(--sans); letter-spacing: 0; text-transform: none; color: #c3cfe3; }
.dmain p { margin: 0 0 10px; }
.dmain section > :last-child { margin-bottom: 0; }
.dmain ul { margin: 0 0 10px; padding-left: 20px; display: grid; gap: 6px; }
.dmain li b { color: var(--ink); font-weight: 600; }
.dmain dl { margin: 4px 0 14px; display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 8px 16px; padding: 14px 16px; border: 1px solid var(--line); background: rgba(255,255,255,.025); }
.dmain dt { color: var(--dim); }
.dmain dd { margin: 0; color: var(--ink); }
.todo { display: inline-block; margin-right: 8px; padding: 4px 7px; font: 500 11px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: #000; background: var(--tape); vertical-align: 1px; }
.docnav { display: flex; gap: 24px; flex-wrap: wrap; margin: 0; padding-top: 18px; border-top: 1px solid var(--line); }
@media (max-width: 640px) { .dmain dl { grid-template-columns: minmax(0, 1fr); gap: 2px 0; } .dmain dd { margin-bottom: 8px; } }

/* actions */
.rfoot { display: flex; justify-content: space-between; align-items: center; gap: 16px 28px; flex-wrap: wrap; }
.note { margin: 0; font: 500 13px/1.55 var(--sans); letter-spacing: 0; text-transform: none; color: var(--dim); max-width: 640px; }
.note b { color: var(--tape); font-weight: 600; }
.btns, .acts { display: flex; gap: 12px; flex-wrap: wrap; }
.acts { margin-top: 26px; }
.b { display: inline-block; font: 700 15px/1 var(--disp); letter-spacing: .06em; text-transform: uppercase; text-decoration: none; background: var(--tape); color: #000; border: 1px solid var(--tape); padding: 13px 22px; cursor: pointer; border-radius: 0; white-space: nowrap; }
.b:hover { filter: brightness(1.08); }
.b[disabled] { opacity: .32; cursor: not-allowed; filter: none; }
.b.ghost { background: transparent; color: var(--ink); border-color: var(--line-hi); }
.b.ghost:hover { background: rgba(142,170,255,.1); filter: none; }
.msg { margin: 0; min-height: 1.5em; font: 500 14px/1.5 var(--sans); letter-spacing: 0; text-transform: none; color: var(--ice); }
.msg.err { color: #ff8f9c; }

/* "Tip received. Stay safe." */
.sent { display: grid; place-items: center; min-height: calc(100vh - 140px); min-height: calc(100dvh - 140px); padding-block: 48px; padding-left: max(var(--gutter), env(safe-area-inset-left, 0px)); padding-right: max(var(--gutter), env(safe-area-inset-right, 0px)); }
.sent .state { margin: 0; font-size: 12px; letter-spacing: .2em; }
.sent h2 { margin: 18px 0 28px; font: 500 22px/1.5 var(--mono); letter-spacing: .14em; color: var(--ink); }

/* opening and transmit sequences */
.intro { position: fixed; inset: 0; z-index: 8; display: grid; place-items: center; background: rgba(0,0,0,.95); transition: opacity .36s ease; cursor: pointer; }
.intro.out { opacity: 0; pointer-events: none; }
.intro .box { width: min(480px, calc(100% - 40px)); font-size: 13px; }
.intro p { margin: 0 0 9px; display: flex; justify-content: space-between; gap: 16px; opacity: 0; transform: translateY(4px); transition: opacity .18s, transform .18s; }
.intro p.on { opacity: 1; transform: none; }
.intro p b { font-weight: 500; color: var(--ice); opacity: 0; transition: opacity .12s; }
.intro p.ok b { opacity: 1; }
.pbar { height: 2px; margin: 20px 0 18px; background: var(--line); }
.pbar i { display: block; height: 100%; width: 0; background: var(--blue-hi); box-shadow: 0 0 14px var(--blue); transition: width 1.35s cubic-bezier(.3, .6, .2, 1); }
.intro .granted { justify-content: center; color: var(--ink); letter-spacing: .34em; }
.reveal > * { animation: rise .55s cubic-bezier(.2, .7, .2, 1) both; }
.reveal > *:nth-child(2) { animation-delay: .07s; }
.reveal > *:nth-child(3) { animation-delay: .14s; }
.reveal > *:nth-child(4) { animation-delay: .21s; }
.reveal > *:nth-child(5) { animation-delay: .28s; }
.reveal > *:nth-child(n+6) { animation-delay: .35s; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

@media (max-width: 980px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fld.s3 { grid-column: span 2; }
}
@media (max-width: 760px) { .privacy ul { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) {
  .fld input { font-size: 16px; }                 /* keeps iOS from zooming on focus */
}
@media (max-width: 520px) {
  .grid { grid-template-columns: minmax(0, 1fr); }
  .fld.s2, .fld.s3 { grid-column: auto; }
}

/* ---------- smaller screens ---------- */
@media (max-width: 640px) {
  :root { --gutter: 16px; }
  body { font-size: 12.5px; }
  .shell { padding-block: 18px; gap: 20px; }
  .hud { font-size: 11px; }
  .tz { gap: 4px 16px; }
  .home .tz { display: grid; grid-template-columns: repeat(2, max-content); gap: 4px 22px; }
  .home .hud { flex-direction: column; align-items: flex-start; }
  .bands i { width: 34vw; }
  /* Phone browsers (iOS Safari above all) will not draw anything pinned to the screen behind their own bars:
     they fill that strip with one flat colour and cut the page off there. So on the home page the backdrop
     is part of the page instead of being pinned. The page itself runs on behind the toolbar to the bottom of
     the screen, glow and digits included, and the glow fades in from plain black at the top, which is the
     colour the status bar gets. */
  body.home { position: relative; min-height: calc(100lvh + 160px); }   /* measured on an iPhone: 100lvh + 40px stopped 20px short of the screen's bottom edge */
  .home .shell { min-height: 100svh; }
  .home #rain, .home .bands, .home .scan { position: absolute; inset: 0; }
  .home .bands { z-index: 0; pointer-events: none; overflow: hidden; }
  .home .bands i { position: absolute; }
  /* The glow eases in from the top and out at the very end of the page: a slow start, so no line shows where it begins. */
  .home .bands, .home .scan {
    -webkit-mask-image: linear-gradient(to bottom, transparent 0, rgba(0,0,0,.04) 14px, rgba(0,0,0,.14) 32px, rgba(0,0,0,.32) 56px, rgba(0,0,0,.56) 84px, rgba(0,0,0,.8) 116px, rgba(0,0,0,.94) 146px, #000 176px, #000 calc(100% - 110px), rgba(0,0,0,.8) calc(100% - 78px), rgba(0,0,0,.44) calc(100% - 44px), rgba(0,0,0,.14) calc(100% - 18px), transparent 100%);
    mask-image: linear-gradient(to bottom, transparent 0, rgba(0,0,0,.04) 14px, rgba(0,0,0,.14) 32px, rgba(0,0,0,.32) 56px, rgba(0,0,0,.56) 84px, rgba(0,0,0,.8) 116px, rgba(0,0,0,.94) 146px, #000 176px, #000 calc(100% - 110px), rgba(0,0,0,.8) calc(100% - 78px), rgba(0,0,0,.44) calc(100% - 44px), rgba(0,0,0,.14) calc(100% - 18px), transparent 100%);
  }
  .win { font-size: 12.5px; }
  .wbody { padding: 24px 18px 22px; }
  .logo { margin-bottom: 26px; }
  .rows > div { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .mail { font-size: 16px; }
  .btn { padding: 14px 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .bands i { opacity: .45; }
}
