/* The Proven Path Strategies status page. Brand: navy, paper, the PROVEN colour stripe, Sora, DM Sans and
   JetBrains Mono. Spacing uses one scale: 4 8 12 16 24 32 48 64 96 120. */
@font-face { font-family: 'Sora'; src: url('/fonts/sora.woff') format('woff'); font-weight: 300 700; font-display: swap; }
@font-face { font-family: 'DM Sans'; src: url('/fonts/dmsans.woff') format('woff'); font-weight: 400 700; font-display: swap; }
@font-face { font-family: 'JetBrains Mono'; src: url('/fonts/jbmono.woff') format('woff'); font-weight: 500; font-display: swap; }

:root {
  --navy: #0F1E2E; --navy-2: #172B3E; --paper: #FBFAF6; --card: #FFFFFF; --ink: #0F1E2E; --body: #3A4855; --muted: #5F6B77;
  --line: #E4E0D8; --soft: #F1EEE7;
  --green: #1F7A4F; --green-bg: #E3F4EA; --amber: #EBA944; --amber-ink: #8A5A12; --amber-bg: #FFF1DC;
  --red: #B5292F; --red-bg: #FBE7E7; --teal: #108599; --nodata: #DAD6CD;
  --s1: #EDA944; --s2: #F4C842; --s3: #D3DC55; --s4: #97C459; --s5: #3D8399; --s6: #B5292F;
  --font: 'DM Sans', system-ui, sans-serif; --head: 'Sora', system-ui, sans-serif; --mono: 'JetBrains Mono', ui-monospace, monospace;
  --r: 16px; --r-lg: 22px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root { --paper: #0C141C; --card: #131E28; --ink: #E7ECF0; --body: #C3CED7; --muted: #9AA8B4; --line: #22303C; --soft: #1A2733;
    --green: #4CC38A; --green-bg: #122C1E; --amber-ink: #F0C27C; --amber-bg: #33270F; --red: #EC6A6F; --red-bg: #3A181B; --nodata: #2A3946; }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 16px/1.55 var(--font); -webkit-font-smoothing: antialiased; overflow-x: clip; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--head); margin: 0; letter-spacing: -.02em; }
p { margin: 0; }
.wrap { width: 100%; max-width: 960px; margin: 0 auto; padding: 0 24px; }
@media (min-width: 768px) { .wrap { padding: 0 32px; } }
@media (min-width: 1200px) { .wrap { padding: 0 40px; } }
.skip { position: absolute; left: 16px; top: -64px; z-index: 50; background: var(--card); color: var(--ink); padding: 12px 16px; border-radius: 12px; }
.skip:focus { top: 16px; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; border-radius: 6px; }
a, button { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }

/* ---------- the navy top: brand and the answer ---------- */
.top { background: var(--navy); color: #fff; position: relative; padding-bottom: clamp(48px, 7vw, 64px); }
.stripe { display: flex; height: 5px; }
.stripe span { flex: 1; }
.stripe span:nth-child(1) { background: var(--s1); } .stripe span:nth-child(2) { background: var(--s2); } .stripe span:nth-child(3) { background: var(--s3); }
.stripe span:nth-child(4) { background: var(--s4); } .stripe span:nth-child(5) { background: var(--s5); } .stripe span:nth-child(6) { background: var(--s6); }
.top-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 24px; padding-bottom: 24px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: #fff; min-height: 44px; }
.brand img { width: 84px; height: auto; flex: none; }
.brand span { font-family: var(--mono); font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: #C9D3DB; padding-left: 12px; border-left: 1px solid #33475A; }
.top-link { color: #C9D3DB; font-size: 15px; text-decoration: underline; text-underline-offset: 3px; min-height: 44px; display: inline-flex; align-items: center; }
.hero { padding-top: clamp(16px, 4vw, 48px); }
.eyebrow { font-family: var(--mono); font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: #9AA8B4; margin-bottom: 16px; }
.headline { display: flex; align-items: flex-start; gap: 16px; font-weight: 300; font-size: clamp(32px, 6vw, 52px); line-height: 1.1; max-width: 20ch; }
.headline b { font-weight: 600; }
.beacon { flex: none; width: 18px; height: 18px; border-radius: 50%; margin-top: .32em; background: #6B7682; position: relative; }
.beacon::after { content: ''; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid currentColor; opacity: .35; }
.beacon.up { background: #4CC38A; color: #4CC38A; } .beacon.slow { background: var(--amber); color: var(--amber); } .beacon.down { background: #EC6A6F; color: #EC6A6F; }
@media (prefers-reduced-motion: no-preference) { .beacon.up::after, .beacon.slow::after, .beacon.down::after { animation: ping 2.4s ease-out infinite; } }
@keyframes ping { 0% { transform: scale(.7); opacity: .6; } 80%, 100% { transform: scale(1.6); opacity: 0; } }
.sub { margin-top: 16px; color: #C9D3DB; font-size: 17px; max-width: 60ch; }
.sub .mono { font-family: var(--mono); font-size: 14px; color: #fff; }
.notice { margin-top: 24px; max-width: 64ch; padding: 16px 20px; border-radius: var(--r); background: var(--navy-2); border-left: 4px solid var(--amber); color: #E7ECF0; font-size: 15px; }
.notice[hidden] { display: none; }

/* ---------- sections ---------- */
main.wrap { padding-top: clamp(48px, 7vw, 64px); padding-bottom: clamp(64px, 9vw, 96px); display: grid; gap: clamp(48px, 7vw, 64px); }
.sec-head { display: grid; gap: 8px; margin-bottom: 24px; }
.sec-head h2 { font-size: clamp(24px, 3.4vw, 30px); font-weight: 600; }
.sec-head p { color: var(--muted); max-width: 64ch; }
.cards { display: grid; gap: 16px; }
@media (min-width: 768px) { .cards { gap: 24px; } }

/* a service */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; display: grid; gap: 16px; }
@media (min-width: 768px) { .card { padding: 28px; } }
.card-head { display: grid; grid-template-columns: 48px 1fr; gap: 16px; align-items: start; }
.card-head img { width: 48px; height: 48px; border-radius: 12px; flex: none; }
.card-title { display: grid; gap: 4px; min-width: 0; }
.card-title h3 { font-size: 20px; font-weight: 600; }
.ver { font-size: 14px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; }
.ver .mono { font-family: var(--mono); font-size: 13px; color: var(--ink); }
.pill { justify-self: start; grid-column: 1 / -1; display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; padding: 8px 14px; border-radius: 999px; background: var(--soft); color: var(--muted); }
.pill::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }
.pill.up { background: var(--green-bg); color: var(--green); }
.pill.slow, .pill.hiccup { background: var(--amber-bg); color: var(--amber-ink); }
.pill.down { background: var(--red-bg); color: var(--red); }
@media (min-width: 600px) {
  .card-head { grid-template-columns: 48px 1fr auto; }
  .card-head { align-items: center; }
  .pill { grid-column: auto; justify-self: end; }
}
.link { background: none; border: 0; padding: 4px 0; font: inherit; color: var(--teal); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; min-height: 32px; }
.dark .link, .link.on-navy { color: #fff; }

/* the 90 day bar: one sliver a day (the last 30 on phones) */
.bar { display: flex; gap: 2px; height: 36px; align-items: stretch; cursor: crosshair; touch-action: pan-y; }
.bar i { flex: 1 1 0; min-width: 2px; border-radius: 3px; background: var(--nodata); }
.bar i.up { background: var(--green); } .bar i.slow { background: var(--amber); } .bar i.down { background: var(--red); }
.bar i.on { outline: 2px solid var(--ink); outline-offset: 1px; }
.bar i.early { display: none; }
@media (min-width: 600px) { .bar i.early { display: block; } }
.bar-foot { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--muted); }
.bar-foot .uptime { font-family: var(--mono); color: var(--ink); text-align: center; }
.span-90 { display: none; } @media (min-width: 600px) { .span-90 { display: inline; } .span-30 { display: none; } }
.bar-cap { min-height: 20px; margin-top: -8px; font-size: 14px; color: var(--body); }
.bar-cap:empty { min-height: 0; margin-top: -16px; }

/* past problems */
.problems { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.problem { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; display: grid; gap: 8px; border-left: 4px solid var(--red); }
@media (min-width: 768px) { .problem { padding: 24px 28px; } }
.problem.closed { border-left-color: var(--line); }
.problem h3 { font-size: 17px; font-weight: 600; }
.problem .when { font-family: var(--mono); font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.problem .note { color: var(--body); }
.none { display: flex; gap: 12px; align-items: center; padding: 20px; border-radius: var(--r); background: var(--card); border: 1px solid var(--line); color: var(--body); }
.none::before { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--green); flex: none; }

/* help */
.help { background: var(--navy); color: #fff; border-radius: var(--r-lg); padding: 32px 24px; display: grid; gap: 16px; }
@media (min-width: 768px) { .help { padding: 48px; } }
.help h2 { font-size: clamp(24px, 3.4vw, 30px); font-weight: 600; }
.help p { color: #C9D3DB; max-width: 60ch; }
.btns { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 12px 22px; border-radius: 999px; font-weight: 700; text-decoration: none; border: 1px solid #33475A; color: #fff; overflow-wrap: anywhere; text-align: center; }
.btn.primary { background: var(--amber); border-color: var(--amber); color: var(--navy); }
@media (max-width: 599px) { .btns .btn { width: 100%; } }
@media (prefers-reduced-motion: no-preference) {
  .btn, .link { transition: scale .12s ease; }
  .btn:active { scale: .955; }
  .link:active { opacity: .5; }
}
@media (hover: hover) { .btn:hover { filter: brightness(1.06); } }

/* footer */
.foot { border-top: 1px solid var(--line); padding: 32px 0 48px; color: var(--muted); font-size: 14px; }
.foot .wrap { display: grid; gap: 16px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.foot nav a { min-height: 44px; display: inline-flex; align-items: center; }
.foot .legal { max-width: 70ch; }

/* the bottom contact bar on phones: glides away when scrolling down, back when scrolling up */
.bbar { position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 40; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 8px; border-radius: 18px; background: var(--navy); box-shadow: 0 10px 30px rgba(10, 21, 32, .3); }
.bbar a { min-height: 48px; display: flex; align-items: center; justify-content: center; border-radius: 12px; color: #fff; font-weight: 700; text-decoration: none; }
.bbar a.primary { background: var(--amber); color: var(--navy); }
.bbar.away { translate: 0 calc(100% + 24px); opacity: 0; pointer-events: none; }
@media (prefers-reduced-motion: no-preference) {
  .bbar { transition: translate .5s cubic-bezier(.2, .8, .2, 1), opacity .5s ease-out; }
  .bbar.away { transition: translate .3s cubic-bezier(.6, 0, .9, .5), opacity .3s ease-in; }
}
@media (min-width: 768px) { .bbar { display: none; } }

/* release notes */
dialog.notes { width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 64px); border: 0; border-radius: var(--r-lg); padding: 0; background: var(--card); color: var(--ink); }
dialog.notes::backdrop { background: rgba(10, 21, 32, .55); }
.notes-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 20px 24px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--card); }
.notes-head h2 { font-size: 20px; }
.notes-close { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--soft); color: var(--ink); font-size: 22px; cursor: pointer; flex: none; }
.notes-body { padding: 8px 24px 24px; display: grid; gap: 24px; }
.rel h3 { font-size: 17px; margin-top: 16px; }
.rel .when { font-family: var(--mono); font-size: 13px; color: var(--muted); margin: 4px 0 12px; }
.rel ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.rel li { display: grid; grid-template-columns: 64px 1fr; gap: 12px; align-items: start; color: var(--body); }
.kind { font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; text-align: center; padding: 4px 8px; border-radius: 999px; margin-top: 2px; }
.kind.new { background: var(--green-bg); color: var(--green); } .kind.better { background: #E6EEF6; color: #2C4766; } .kind.fixed { background: var(--soft); color: var(--muted); }
@media (prefers-color-scheme: dark) { .kind.better { background: #18263A; color: #A6BFE0; } }

/* skeleton while the first answer loads */
.loading .card { min-height: 180px; }
.count-note { position: fixed; left: 50%; top: 16px; translate: -50% 0; z-index: 99; margin: 0; padding: 12px 16px; border-radius: 12px; background: var(--navy); color: #fff; font: 600 14px/1.3 var(--font); }
noscript p { padding: 24px; }
