/* SEG-D Monitor website - style "C": a navy branded header over a light
   page, download cards overlapping the header. Everything is served from
   this site - fonts included (fonts/, SIL OFL) - so the page makes no
   request outside it, and the CSP (default-src 'self') holds: no inline
   style, no inline script. */

@font-face { font-family: "Plex Sans"; src: url("fonts/plex-sans-var.woff2") format("woff2");
  font-weight: 100 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Plex Sans"; src: url("fonts/plex-sans-var-italic.woff2") format("woff2");
  font-weight: 100 700; font-style: italic; font-display: swap; }
@font-face { font-family: "Plex Mono"; src: url("fonts/plex-mono-400.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Plex Mono"; src: url("fonts/plex-mono-500.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap; }

:root {
  --navy: #10243d; --navy-2: #16304f; --navy-3: #1b4a74;
  --sky: #4aa3e0; --sky-ink: #062238; --sky-soft: #e8f2fb;
  --on-navy: #c9d7e6; --on-navy-2: #9fb6cf;
  --ink: #0f1c2e; --text: #25324a; --muted: #5f6b7c; --fine: #66717f;
  --line: #e3e8ef; --bg: #f5f7fa; --card: #fff;
  --ok: #188a4b; --warn: #8a5a14; --err: #9b2c2c; --info: #1c64b8;
  --radius: 14px; --radius-sm: 9px;
  --shadow: 0 12px 32px -10px rgba(16, 36, 61, .22), 0 2px 6px rgba(16, 36, 61, .06);
  --ease: cubic-bezier(.16, 1, .3, 1);
  --font: "Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scrollbar-color: #9fb0c3 transparent; }
body { margin: 0; font-family: var(--font); color: var(--text); background: var(--bg); line-height: 1.55; -webkit-font-smoothing: antialiased; }
::selection { background: rgba(74, 163, 224, .28); }
a { color: var(--info); text-underline-offset: .18em; text-decoration-thickness: 1px; }
/* padding-INLINE only: a "padding: 0 24px" here used to zero every
   section's padding-top (a class outranks the section rule), jamming each
   heading against the panel above it */
.wrap { max-width: 1120px; margin-inline: auto; padding-inline: 24px; }
.mono, code { font-family: var(--mono); }
h1, h2, h3 { color: var(--navy); line-height: 1.15; letter-spacing: -.02em; text-wrap: balance; }
h2 { font-size: 1.65rem; font-weight: 600; margin: 0 0 1rem; }
h3 { font-weight: 600; }
.fine, .sum, small, .kv dd { font-variant-numeric: tabular-nums; }

.skip { position: absolute; left: 16px; top: -60px; z-index: 10; padding: 10px 14px; border-radius: var(--radius-sm); background: #fff; color: var(--navy); font-weight: 600; text-decoration: none; transition: top .2s var(--ease); }
.skip:focus { top: 12px; }

/* header */
.top { position: relative; overflow: hidden; color: #fff; padding-bottom: 124px;
  background: radial-gradient(1200px 520px at 85% 110%, rgba(74, 163, 224, .16), transparent 60%),
              linear-gradient(160deg, #0d1f35 0%, var(--navy-2) 60%, var(--navy-3) 100%); }
.top .wave { position: absolute; left: -90px; bottom: -112px; width: 760px; opacity: .12; }
.top .wave path { fill: none; stroke: #fff; stroke-width: 12; stroke-linecap: round; }
.nav { position: relative; z-index: 1; display: flex; align-items: center; gap: 24px; padding-block: 20px; }

/* the brand: the app's shield, drawn for a dark header (the PNG was navy
   on navy and vanished), and a two-weight wordmark */
.brand { display: inline-flex; align-items: center; gap: 11px; margin-right: auto; color: #fff; text-decoration: none; border-radius: var(--radius-sm); }
.mark { width: 34px; height: 34px; flex: none; }
.mark .shield { fill: #1f4c78; stroke: rgba(201, 215, 230, .5); stroke-width: 1; }
.mark .trace { fill: none; stroke: #fff; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.mark .dot { fill: var(--sky); }
.brand-name { font-size: 1.18rem; font-weight: 650; letter-spacing: -.012em; white-space: nowrap; }
.brand-name span { font-weight: 400; color: var(--on-navy); }

.links { display: flex; gap: 26px; }
.links a { color: var(--on-navy); text-decoration: none; font-weight: 500; font-size: .95rem; transition: color .2s var(--ease); }
.links a:hover { color: #fff; }

.hero { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); gap: 52px; align-items: center; padding-top: 28px; }
.hero h1 { color: #fff; font-size: clamp(2.15rem, 4.2vw, 3.3rem); font-weight: 600; letter-spacing: -.028em; line-height: 1.04; margin: 0 0 18px; }
.hero .lead { color: var(--on-navy); font-size: 1.12rem; max-width: 34em; margin: 0; text-wrap: pretty; }
.hero-shot { margin: 0; }
.scan { position: relative; padding: 14px 16px 10px; border-radius: 12px; background: #fff;
  box-shadow: 0 28px 60px -16px rgba(3, 12, 24, .6), 0 0 0 1px rgba(255, 255, 255, .07); }
.scan img { display: block; width: 100%; height: auto; }
/* the 'now' cursor of the acquisition sweep: a box over the image whose
   full-width layer slides right, so its edge IS the reveal's edge */
.scan .cursor { display: none; position: absolute; inset: 14px 16px 10px 16px; overflow: hidden; pointer-events: none; }
.scan .cursor::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%);
  border-right: 2px solid var(--sky); background: linear-gradient(to right, transparent 82%, rgba(74, 163, 224, .2)); }
.hero-shot figcaption { margin-top: 12px; font-size: .82rem; color: var(--on-navy-2); }

/* downloads */
#download { position: relative; z-index: 2; margin-top: -76px; padding-top: 0; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.card h3 { margin: 0 0 4px; font-size: 1.15rem; }
.card p { margin: 0 0 16px; color: var(--muted); font-size: .9rem; }
.card .btn { margin-top: auto; }
.card .sum { margin: 10px 0 0; font-size: .72rem; color: var(--muted); word-break: break-all; }
/* no opacity on the card itself: over the header it let the navy and the
   wave show through and turned the cards a muddy grey */
.card.soon h3 { color: var(--text); }
/* "If it will not start": the same cards, holding text instead of a button */
.lead-in { margin: -6px 0 18px; color: var(--muted); max-width: 70ch; }
.help .card p { margin: 0 0 14px; line-height: 1.5; }
.help .card p:last-child { margin-bottom: 0; }
.help .card b { color: var(--text); font-weight: 600; }
.help code { display: inline-block; margin-top: 4px; padding: 2px 6px; background: var(--bg); border-radius: 6px; font-size: .84em; word-break: break-word; }
.fine { color: var(--fine); font-size: .82rem; margin: 14px 0 0; }

/* buttons and icons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 10px; padding: 11px 18px; font: 600 .95rem var(--font); text-decoration: none; border: 0; cursor: pointer;
  transition: background-color .2s var(--ease), transform .12s var(--ease), box-shadow .2s var(--ease); }
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-3); }
.btn-accent { background: var(--sky); color: var(--sky-ink); }
.btn-accent:hover { background: #63b2e8; }
.btn[disabled], .btn.disabled { background: #e6ebf1; color: var(--muted); cursor: not-allowed; transform: none; }
.btn:focus-visible, input:focus-visible, a:focus-visible { outline: 3px solid rgba(74, 163, 224, .55); outline-offset: 2px; }
.ico { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; transition: transform .18s var(--ease); }

/* sections */
section { padding-top: 72px; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }

/* licence */
.licence { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; box-shadow: var(--shadow); }
.licence h2 { margin-top: 0; }
.licence-intro p { margin: 0 0 18px; color: var(--muted); }
.steps { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; counter-reset: step; }
.steps li { position: relative; counter-increment: step; padding: 11px 12px 11px 48px; background: var(--bg); border-radius: 10px; font-size: .92rem; }
.steps li::before { content: counter(step); position: absolute; left: 12px; top: 10px; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: var(--navy); color: #fff; font-weight: 600; font-size: .8rem; }
.ui { white-space: nowrap; padding: 1px 6px; border: 1px solid var(--line); border-radius: 6px; background: #fff; font-weight: 500; font-size: .88em; }
.licence-form label { display: block; margin-bottom: 14px; font-weight: 600; font-size: .85rem; color: var(--navy); }
.licence-form input { display: block; width: 100%; margin-top: 6px; padding: 11px 12px; font: 400 .95rem var(--font); color: var(--ink); caret-color: var(--sky); background: #fbfcfd; border: 1px solid #cfd8e3; border-radius: var(--radius-sm);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease); }
.licence-form input:hover { border-color: #b7c4d3; }
.licence-form input:focus { border-color: var(--sky); box-shadow: 0 0 0 3px rgba(74, 163, 224, .2); outline: none; }
.licence-form input.mono { font-family: var(--mono); letter-spacing: .04em; text-transform: uppercase; }
/* the placeholder is an example, not a value: not forced to capitals */
.licence-form input::placeholder { color: var(--muted); text-transform: none; letter-spacing: 0; }
.licence-form input[aria-invalid="true"] { border-color: var(--err); background: #fff6f6; }
.licence-form .err { display: block; margin-top: 4px; color: var(--err); font-weight: 500; font-size: .8rem; }
.licence-form .btn { width: 100%; margin-top: 4px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.notice { padding: 10px 12px; background: #fff8e6; border: 1px solid #f0d9a0; border-radius: 10px; color: #6b4a0a; font-size: .9rem; }

/* the licence outcome */
.result { grid-column: 1 / -1; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; }
.result .head { padding: 10px 16px; color: #fff; font-weight: 600; font-size: .8rem; letter-spacing: .05em; text-transform: uppercase; }
.result .body { padding: 18px 16px; }
.result .body > p:first-child { margin-top: 0; }
.result.ok .head { background: var(--ok); }
.result.same .head { background: var(--info); }
.result.stop .head { background: var(--warn); }
.result.error .head { background: var(--err); }
.meter { display: flex; gap: 4px; margin: 12px 0 14px; }
.meter i { flex: 1; height: 9px; border-radius: 3px; background: #dde3ea; }
.meter i.on { background: var(--sky); }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 4px 12px; margin: 0 0 16px; font-size: .92rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.howto { margin: 12px 0 0; color: var(--muted); font-size: .88rem; }

/* the tour: a carousel of the app and its reports (v2.19.x). Without
   carousel.js it is a swipeable, snapping strip with thumbnail links. */
.tour-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 20px; }
.tour-head h2 { margin: 0; }
.tour-lead { margin: 0; max-width: 46ch; color: var(--muted); }
.stage { position: relative; overflow: hidden; border-radius: 18px; background: #e9eff6; border: 1px solid var(--line); box-shadow: var(--shadow); }
.track { position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: 100%; margin: 0; padding: 0; list-style: none;
  overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: none; }
.track::-webkit-scrollbar { display: none; }
.track:focus-visible { outline: 3px solid rgba(74, 163, 224, .55); outline-offset: -3px; }
.slide { scroll-snap-align: center; scroll-snap-stop: always; }
.slide figure { margin: 0; }
.slide img { display: block; width: 100%; height: auto; }
.slide figcaption { padding: 14px 22px 18px; background: #fff; border-top: 1px solid var(--line); color: var(--muted); font-size: .95rem; text-wrap: pretty; }
.slide figcaption b { margin-right: .45em; color: var(--navy); font-weight: 600; }
.tour-btn { position: absolute; top: calc(50% - 50px); display: grid; place-items: center; width: 48px; height: 48px; padding: 0; border: 0; border-radius: 50%; cursor: pointer;
  color: var(--navy); background: rgba(255, 255, 255, .94); box-shadow: 0 8px 22px -8px rgba(16, 36, 61, .45);
  transition: background-color .2s var(--ease), box-shadow .2s var(--ease); }
.tour-btn:hover { background: #fff; box-shadow: 0 10px 26px -8px rgba(16, 36, 61, .55); }
.tour-btn:focus-visible, .thumbs a:focus-visible, .play:focus-visible { outline: 3px solid rgba(74, 163, 224, .55); outline-offset: 2px; }
.tour-btn .ico { width: 22px; height: 22px; stroke-width: 2.2; }
.tour-btn.prev { left: 16px; }
.tour-btn.next { right: 16px; }
.tour-foot { display: flex; align-items: center; gap: 18px; margin-top: 14px; }
.thumbs { display: flex; flex: 1; gap: 10px; margin: 0; padding: 4px; list-style: none; overflow-x: auto; scrollbar-width: thin; }
.thumbs a { display: block; width: 96px; overflow: hidden; border: 2px solid transparent; border-radius: 9px; opacity: .62;
  transition: opacity .2s var(--ease), border-color .2s var(--ease); }
.thumbs a:hover { opacity: 1; }
.thumbs a[aria-current="true"] { opacity: 1; border-color: var(--sky); }
.thumbs img { display: block; width: 100%; height: auto; }
.counter { margin: 0; color: var(--muted); font-size: .9rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.play { padding: 7px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--text); font: 500 .85rem var(--font); cursor: pointer; white-space: nowrap;
  transition: border-color .2s var(--ease); }
.play:hover { border-color: #b7c4d3; }
@media (max-width: 860px) {
  .tour-head { display: block; }
  .tour-lead { margin-top: 8px; }
  .tour-btn { width: 40px; height: 40px; top: calc(50% - 46px); }
  .tour-btn.prev { left: 10px; }
  .tour-btn.next { right: 10px; }
  .slide figcaption { padding: 12px 16px 14px; font-size: .9rem; }
  .thumbs a { width: 84px; }
  /* the strip gets its own row; counter and button share the next */
  .tour-foot { flex-wrap: wrap; row-gap: 10px; }
  .thumbs { flex: 1 1 100%; }
  .play { margin-left: auto; }
}

/* manuals */
.manuals { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.manual { display: flex; gap: 14px; align-items: center; padding: 18px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); color: var(--text); text-decoration: none;
  transition: box-shadow .25s var(--ease), transform .25s var(--ease), border-color .25s var(--ease); }
.manual:hover { box-shadow: var(--shadow); transform: translateY(-2px); border-color: #d3dce7; }
.manual .icon { display: grid; place-items: center; width: 42px; height: 42px; flex: none; border-radius: 10px; background: var(--sky-soft); color: var(--navy-3); transition: transform .25s var(--ease), background-color .25s var(--ease); }
.manual:hover .icon { background: #dbeaf7; }
.manual .icon .ico { width: 22px; height: 22px; }
.manual b { display: block; color: var(--navy); font-weight: 600; }
.manual small { color: var(--muted); }

/* what's new */
.news h3 { margin: 0 0 12px; font-size: 1.05rem; }
.news ul { margin: 0; padding-left: 20px; max-width: 75ch; }
.news li { margin-bottom: 8px; }
.news li::marker { color: var(--sky); }

/* footer */
.foot { margin-top: 80px; padding: 24px 0; background: var(--navy); color: var(--on-navy-2); font-size: .88rem; }
.foot .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.foot a { color: var(--on-navy); }

/* small screens */
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; gap: 32px; }
  .hero-shot { max-width: 640px; }
}
@media (max-width: 860px) {
  .cards, .manuals, .licence { grid-template-columns: 1fr; }
  .links { display: none; }
  #download { margin-top: -84px; }
  section { padding-top: 56px; }
}
@media (max-width: 520px) {
  .wrap { padding-inline: 16px; }
  .two, .kv { grid-template-columns: 1fr; }
  .top { padding-bottom: 112px; }
  .panel { padding: 22px 18px; }
}

/* ── motion ─────────────────────────────────────────────────────────
   LAST in the file on purpose: these rules override the base rules
   above (same specificity, so order decides - placed earlier, the base
   `.scan .cursor { display: none }` won and the cursor never showed). */
/* the one authored moment: the trace records itself once, like a shot
   arriving. Still for anyone who asked for less motion. */
@media (prefers-reduced-motion: no-preference) {
  .top .wave path { stroke-dasharray: 1; stroke-dashoffset: 1; animation: record 2.8s var(--ease) .2s forwards; }
  @keyframes record { to { stroke-dashoffset: 0; } }

  /* the same moment on the report: shots land left to right at a steady
     cadence (linear - acquisition does not ease), gun 5's red arrives as
     the cursor reaches it, then the cursor leaves and the caption says
     what was seen */
  .scan img { animation: acquire 2s linear .35s both; }
  .scan .cursor { display: block; animation: cursor-out .45s ease 2.35s forwards; }
  .scan .cursor::after { animation: sweep 2s linear .35s both; }
  .hero-shot figcaption { animation: settle .6s var(--ease) 2.3s both; }
  @keyframes acquire { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
  @keyframes sweep { from { transform: translateX(-100%); } to { transform: translateX(0); } }
  @keyframes cursor-out { to { opacity: 0; } }
  @keyframes settle { from { opacity: 0; transform: translateY(4px); } }

  /* the three platforms arrive as a list, just after the header */
  .cards .card { animation: rise .6s var(--ease) both; }
  .cards .card:nth-child(1) { animation-delay: .15s; }
  .cards .card:nth-child(2) { animation-delay: .21s; }
  .cards .card:nth-child(3) { animation-delay: .27s; }
  @keyframes rise { from { opacity: 0; transform: translateY(14px); } }

  /* hover and press: acknowledge, never loop */
  .btn:active { transform: translateY(1px) scale(.99); }
  .btn-primary:hover .ico { transform: translateY(2px); }
  .manual:hover .icon { transform: translateY(-2px); }

  /* a licence answer: the panel arrives, the months used fill in order */
  .result:not([hidden]) { animation: arrive .38s var(--ease); }
  .meter i.on { transform-origin: left center; animation: fill .35s var(--ease) both; }
  .meter i:nth-child(1) { animation-delay: .25s; }   .meter i:nth-child(2) { animation-delay: .29s; }
  .meter i:nth-child(3) { animation-delay: .33s; }   .meter i:nth-child(4) { animation-delay: .37s; }
  .meter i:nth-child(5) { animation-delay: .41s; }   .meter i:nth-child(6) { animation-delay: .45s; }
  .meter i:nth-child(7) { animation-delay: .49s; }   .meter i:nth-child(8) { animation-delay: .53s; }
  .meter i:nth-child(9) { animation-delay: .57s; }   .meter i:nth-child(10) { animation-delay: .61s; }
  .meter i:nth-child(11) { animation-delay: .65s; }  .meter i:nth-child(12) { animation-delay: .69s; }
  @keyframes arrive { from { opacity: 0; transform: translateY(8px); } }
  @keyframes fill { from { transform: scaleX(0); } }
}
/* reduced motion keeps the state change, without the movement */
@media (prefers-reduced-motion: reduce) {
  .result:not([hidden]) { animation: appear .2s ease; }
  @keyframes appear { from { opacity: 0; } }
}
