/* PulseGuard | Forecast design system
   The sky behind the page is the weather of what you're looking at; content sits on frosted panels
   so text stays readable on any sky. One typeface (Sora), white type, colour only for state. */
:root {
  --ink: #ffffff;
  --dim: rgba(255,255,255,.84);
  --faint: rgba(255,255,255,.72);
  --panel: rgba(12,22,46,.40);
  --panel-2: rgba(12,22,46,.55);
  --panel-solid: #17284a;
  --edge: rgba(255,255,255,.16);
  --edge-2: rgba(255,255,255,.28);
  --navy: #16305f;
  --storm: #ff7b7b;
  --cloud: #ffd27a;
  --ok: #9ef0c0;
  --fog: #dfe4ea;
  --font: 'Sora', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --ease: cubic-bezier(.23,1,.32,1);
  --spring: cubic-bezier(.34,1.45,.64,1);
  --radius: 22px;
  --gutter: max(20px, env(safe-area-inset-left, 0px));
  --max: 1180px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { background: #2a4f8f; scroll-behavior: smooth; }
/* body stays transparent so the fixed sky canvas behind it shows */
body { color: var(--ink); font-family: var(--font); font-size: 16px; line-height: 1.55; -webkit-font-smoothing: antialiased; overflow-x: hidden; min-height: 100vh; background: transparent; }
::selection { background: #fff; color: var(--navy); }
a { color: inherit; text-underline-offset: 3px; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 2px solid #fff; outline-offset: 3px; border-radius: 10px; }
h1, h2, h3, h4 { text-wrap: balance; letter-spacing: -.03em; line-height: 1.05; font-weight: 600; }
p { text-wrap: pretty; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--dim); }
.faint { color: var(--faint); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.shadowtext { text-shadow: 0 2px 24px rgba(10,20,40,.35); }
[hidden] { display: none !important; }

/* Sized to the largest viewport (lvh) so a phone's address bar sliding in and out while
   scrolling never resizes the canvas; a resize would wipe it and flash */
.skybg { position: fixed; top: 0; left: 0; width: 100%; height: 100vh; height: 100lvh; z-index: -1; display: block; pointer-events: none; transform: translateZ(0); }
.wrap { max-width: var(--max); margin: 0 auto; padding-inline: var(--gutter) max(20px, env(safe-area-inset-right, 0px)); }

/* ---------- Surfaces ---------- */
.panel { background: var(--panel); -webkit-backdrop-filter: blur(18px) saturate(1.2); backdrop-filter: blur(18px) saturate(1.2); border-radius: var(--radius); box-shadow: inset 0 0 0 1px var(--edge); }
.panel.solid { background: var(--panel-2); }
.panel-pad { padding: 20px 22px; }
.panel-title { font-size: 13px; font-weight: 600; color: var(--dim); letter-spacing: .02em; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.panel-title a, .panel-title button { font-size: 13px; }
.light-card { background: rgba(255,255,255,.94); color: var(--navy); border-radius: var(--radius); }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; padding: 0 20px; border-radius: 999px; border: 0; background: #fff; color: var(--navy); font: 600 15.5px/1 var(--font); text-decoration: none; cursor: pointer; white-space: nowrap; transition: transform .16s var(--ease), background .2s, opacity .2s; }
.btn:active { transform: scale(.96); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn.glass { background: var(--panel-2); color: #fff; box-shadow: inset 0 0 0 1px var(--edge); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.btn.navy { background: var(--navy); color: #fff; }
.btn.danger { background: rgba(255,90,90,.18); color: #ffd0d0; box-shadow: inset 0 0 0 1px rgba(255,123,123,.45); }
.btn.sm { height: 36px; padding: 0 14px; font-size: 14px; }
.btn.lg { height: 54px; padding: 0 26px; font-size: 17px; }
.btn.block { width: 100%; }
@media (hover: hover) { .btn:not([disabled]):hover { background: #eef3ff; } .btn.glass:not([disabled]):hover { background: rgba(12,22,46,.7); } .btn.navy:not([disabled]):hover { background: #1d3b72; } .btn.danger:not([disabled]):hover { background: rgba(255,90,90,.3); } }
.link { background: none; border: 0; color: #fff; font: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; padding: 0; }
.spinner { width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; display: inline-block; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(1turn); } }

/* ---------- Segmented control ---------- */
.seg { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--panel-2); box-shadow: inset 0 0 0 1px var(--edge); flex-wrap: wrap; }
.seg button, .seg a { all: unset; cursor: pointer; display: flex; align-items: center; gap: 7px; padding: 7px 13px; border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--dim); transition: background .2s, color .2s; }
.seg [aria-pressed="true"], .seg [aria-current="page"] { background: #fff; color: var(--navy); }
.seg button:focus-visible, .seg a:focus-visible { outline: 2px solid #fff; }

/* ---------- Weather chips ---------- */
.wx { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; font-size: 14px; white-space: nowrap; }
.wx svg { flex: none; }
.wx-chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 11px 0 7px; border-radius: 999px; background: rgba(255,255,255,.14); font-size: 13px; font-weight: 600; white-space: nowrap; }
.wx-chip.storm { background: rgba(255,90,90,.26); }
.wx-chip.cloudy { background: rgba(255,210,122,.22); }
.wx-chip.fog { background: rgba(255,255,255,.1); color: var(--dim); }

/* ---------- Site navigation ---------- */
.site-nav { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 40; }
.site-nav .wrap { display: flex; align-items: center; gap: 24px; height: 72px; }
.logo { display: inline-flex; align-items: center; gap: 9px; font-weight: 700; font-size: 19px; text-decoration: none; letter-spacing: -.02em; }
.logo svg { flex: none; }
.nav-links { display: flex; align-items: center; gap: 22px; margin-left: auto; font-size: 15px; font-weight: 500; }
.nav-links > a { text-decoration: none; color: var(--dim); transition: color .15s; }
.nav-links > a:hover, .nav-links > a[aria-current="page"] { color: #fff; }
.nav-auth { display: flex; gap: 8px; align-items: center; }
.nav-toggle { display: none; margin-left: auto; background: var(--panel-2); color: #fff; border: 0; width: 42px; height: 42px; border-radius: 50%; box-shadow: inset 0 0 0 1px var(--edge); cursor: pointer; }
.site-nav.scrolled { background: rgba(12,22,46,.28); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: 0 1px 0 var(--edge); }
@media (max-width: 860px) {
  .nav-toggle { display: grid; place-items: center; }
  .nav-links { display: none; position: absolute; left: 12px; right: 12px; top: 68px; flex-direction: column; align-items: stretch; gap: 4px; padding: 12px; border-radius: 20px; background: rgba(14,26,52,.92); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); box-shadow: inset 0 0 0 1px var(--edge); }
  .nav-links.open { display: flex; }
  .nav-links > a { padding: 10px 12px; border-radius: 12px; }
  .nav-auth { padding-top: 8px; }
  .nav-auth .btn { flex: 1; }
}

/* ---------- Footer ---------- */
.site-footer { padding-block: 40px 72px; }
.site-footer .wrap { display: grid; grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr)); gap: 28px; }
.site-footer p { color: var(--dim); font-size: 14.5px; max-width: 34ch; margin-top: 10px; }
.site-footer h4 { font-size: 13px; color: var(--faint); font-weight: 600; letter-spacing: .02em; margin-bottom: 10px; }
.site-footer nav a { display: block; text-decoration: none; color: var(--dim); font-size: 14.5px; padding: 3px 0; }
.site-footer nav a:hover { color: #fff; }
.site-footer .legal { grid-column: 1 / -1; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 13.5px; color: var(--faint); padding-top: 20px; border-top: 1px solid var(--edge); }
@media (max-width: 760px) { .site-footer .wrap { grid-template-columns: 1fr 1fr; } .site-footer .brand { grid-column: 1 / -1; } }

/* ---------- Page sections ---------- */
.section { padding-block: 120px 0; }
.section:first-of-type { padding-top: 64px; }
.h1 { font-size: clamp(40px, 5.6vw, 72px); font-weight: 500; letter-spacing: -.045em; }
.h2 { font-size: clamp(34px, 4.4vw, 58px); font-weight: 500; letter-spacing: -.04em; max-width: 16ch; }
.lede { font-size: clamp(17px, 1.5vw, 20px); color: var(--dim); max-width: 52ch; margin-top: 16px; }
.new-tag { display: inline-block; font-size: 13px; font-weight: 600; background: #fff; color: var(--navy); padding: 3px 10px; border-radius: 999px; vertical-align: middle; margin-left: 8px; letter-spacing: 0; }
.page-head { padding-block: 56px 8px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 900px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } .section { padding-top: 88px; } }

/* Feature rows: an icon of weather, a title and a sentence */
.fact { display: grid; grid-template-columns: 40px 1fr; gap: 14px; align-items: start; padding: 20px 22px; }
.fact b { display: block; font-weight: 600; font-size: 17px; }
.fact span { color: var(--dim); font-size: 15.5px; }

/* Plans */
.plan { padding: 26px; display: flex; flex-direction: column; gap: 10px; transition: transform .35s var(--ease); }
.plan:hover { transform: translateY(-6px); }
.plan.featured { background: rgba(255,255,255,.94); color: var(--navy); box-shadow: none; }
.plan h3 { font-size: 20px; font-weight: 600; }
.plan .price { font-size: 52px; font-weight: 300; letter-spacing: -.06em; line-height: 1; }
.plan .price small { font-size: 15px; font-weight: 500; letter-spacing: 0; opacity: .75; }
.plan ul { list-style: none; display: flex; flex-direction: column; gap: 6px; margin: 8px 0 16px; font-size: 15.5px; }
.plan li::before { content: "·"; margin-right: 8px; opacity: .6; }
.plan .btn { margin-top: auto; }
.plan.featured .btn { background: var(--navy); color: #fff; }
.plan.featured .tag { align-self: flex-start; font-size: 12.5px; font-weight: 600; background: var(--navy); color: #fff; padding: 3px 10px; border-radius: 999px; }

/* Questions */
.faq { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 40px; }
.faq > div { padding: 20px 22px; }
.faq h3 { font-size: 18px; letter-spacing: -.02em; }
.faq p { color: var(--dim); margin-top: 6px; }
@media (max-width: 900px) { .faq { grid-template-columns: 1fr; } }

/* ---------- Forms ---------- */
.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; min-width: 0; }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.form-label { font-size: 13.5px; font-weight: 600; color: var(--dim); }
.form-hint { font-size: 13px; color: var(--faint); }
.form-input { width: 100%; height: 46px; padding: 0 14px; border-radius: 14px; border: 0; background: rgba(255,255,255,.12); color: #fff; font: 15.5px var(--font); box-shadow: inset 0 0 0 1px var(--edge); transition: box-shadow .15s, background .15s; }
textarea.form-input { height: auto; min-height: 120px; padding: 12px 14px; resize: vertical; }
select.form-input { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='white' stroke-width='1.8' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }
select.form-input option { background: var(--panel-solid); color: #fff; }
.form-input::placeholder { color: rgba(255,255,255,.6); }
.form-input:focus { outline: none; background: rgba(255,255,255,.18); box-shadow: inset 0 0 0 2px #fff; }
.form-input.error { box-shadow: inset 0 0 0 2px var(--storm); }
.field-error { font-size: 13px; color: #ffd0d0; font-weight: 500; }
input[type="color"].form-input { padding: 4px; width: 64px; }
.check { display: flex; align-items: flex-start; gap: 10px; font-size: 15px; cursor: pointer; padding: 6px 0; }
.check input { width: 20px; height: 20px; accent-color: #fff; margin-top: 2px; flex: none; }
.check small { display: block; color: var(--faint); font-size: 13.5px; }
.switch { position: relative; width: 46px; height: 28px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; cursor: pointer; margin: 0; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: rgba(255,255,255,.2); transition: background .25s; pointer-events: none; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform .3s var(--spring); }
.switch input:checked + span { background: #4fbf85; }
.switch input:checked + span::after { transform: translateX(18px); }
.switch input:focus-visible + span { outline: 2px solid #fff; outline-offset: 2px; }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }

/* ---------- Auth pages ---------- */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 32px max(16px, env(safe-area-inset-right, 0px)) 48px max(16px, env(safe-area-inset-left, 0px)); }
.auth-card { width: min(440px, 100%); padding: 32px 30px 28px; }
.auth-card .logo { margin-bottom: 26px; }
.auth-card h1 { font-size: 30px; font-weight: 500; }
.auth-card .sub { color: var(--dim); margin: 8px 0 24px; }
.auth-card .alt { margin-top: 18px; font-size: 14.5px; color: var(--dim); text-align: center; }
.auth-card .alt a { color: #fff; font-weight: 600; }
.auth-card .note { padding: 14px 16px; border-radius: 14px; background: rgba(255,255,255,.12); font-size: 15px; }
.auth-aside { margin-top: 18px; display: flex; align-items: center; gap: 10px; justify-content: center; color: var(--dim); font-size: 14px; }

/* ---------- Toast ---------- */
.toast { position: fixed; left: 50%; bottom: max(24px, env(safe-area-inset-bottom, 0px)); z-index: 200; display: flex; align-items: center; gap: 10px; max-width: calc(100vw - 32px); padding: 12px 18px; border-radius: 16px; background: rgba(255,255,255,.96); color: var(--navy); font-weight: 600; font-size: 15px; box-shadow: 0 18px 40px -18px rgba(10,20,40,.6); transform: translate(-50%, calc(100% + 40px)); transition: transform .45s var(--spring); }
.toast.toast-show { transform: translate(-50%, 0); }
.toast .dot { width: 9px; height: 9px; border-radius: 50%; background: #2f9e64; flex: none; }
.toast.toast-error .dot { background: #d63d3d; }

/* ---------- Modal ---------- */
.modal-overlay { position: fixed; inset: 0; z-index: 150; display: grid; place-items: center; padding: 20px; background: rgba(8,14,30,.45); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); animation: fade .2s var(--ease); }
.modal { width: min(520px, 100%); max-height: calc(100vh - 40px); overflow: auto; padding: 26px 26px 22px; background: rgba(20,34,64,.92); border-radius: 26px; box-shadow: inset 0 0 0 1px var(--edge), 0 30px 60px -20px rgba(0,0,0,.5); animation: rise .3s var(--ease); }
.modal-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 20px; }
.modal-head h2 { font-size: 22px; }
.modal-close { background: rgba(255,255,255,.12); border: 0; color: #fff; width: 36px; height: 36px; border-radius: 50%; cursor: pointer; font-size: 20px; line-height: 1; }
.modal-actions { display: flex; gap: 10px; margin-top: 8px; flex-wrap: wrap; }
.modal-actions .btn:first-child { flex: 1; }
.modal hr { border: 0; border-top: 1px solid var(--edge); margin: 6px 0 14px; }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(12px) scale(.98); } }

/* ---------- Empty and loading states ---------- */
.empty { text-align: center; padding: 48px 24px; }
.empty svg { margin: 0 auto 14px; }
.empty h3 { font-size: 22px; font-weight: 500; }
.empty p { color: var(--dim); margin: 8px auto 20px; max-width: 42ch; }
.loading { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 50vh; color: var(--dim); }

/* ---------- Uptime bars (a bar per day or per check) ---------- */
.bars { display: flex; gap: 2px; height: 34px; align-items: flex-end; }
.bars i { flex: 1; border-radius: 2px; background: rgba(255,255,255,.75); height: 100%; transition: transform .2s var(--ease); transform-origin: bottom; }
.bars i.w { background: var(--cloud); height: 70%; }
.bars i.b { background: var(--storm); height: 42%; }
.bars i.n { background: rgba(255,255,255,.18); }
.bars i:hover { transform: scaleY(1.12); }
.bars-meta { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--faint); margin-top: 6px; }

/* ---------- Hour strip ---------- */
.hours { display: flex; overflow-x: auto; gap: 2px; scrollbar-width: none; scroll-snap-type: x proximity; }
.hours::-webkit-scrollbar { display: none; }
.hr { flex: 0 0 66px; scroll-snap-align: end; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 2px; border-radius: 14px; font-size: 13.5px; transition: background .2s; }
.hr:hover { background: rgba(255,255,255,.08); }
.hr.now { background: rgba(255,255,255,.16); }
.hr .t { color: var(--dim); }
.hr b { font-weight: 600; }

/* ---------- Outlook rows ---------- */
.day { display: grid; grid-template-columns: 96px 32px minmax(0, 1fr); gap: 14px; align-items: center; padding: 12px 6px; }
.day + .day { border-top: 1px solid var(--edge); }
.day b { font-weight: 600; }
.day p { color: var(--dim); font-size: 15px; }
.day p + p { margin-top: 2px; }

/* ---------- Public status page ---------- */
.sp { max-width: 780px; margin: 0 auto; padding: 36px max(20px, env(safe-area-inset-right, 0px)) 80px max(20px, env(safe-area-inset-left, 0px)); }
.sp-brand { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-weight: 600; font-size: 17px; }
.sp-brand img { height: 32px; width: auto; border-radius: 8px; }
.sp-brand span { color: var(--dim); font-size: 14px; font-weight: 500; }
.sp-top { text-align: center; padding: 56px 0 36px; }
.sp-top h1 { font-size: clamp(30px, 4.4vw, 44px); font-weight: 500; }
.sp-top .big { display: flex; justify-content: center; margin: 18px 0 6px; }
.sp-top h2 { font-size: 26px; font-weight: 600; }
.sp-top p { color: var(--dim); font-size: 18px; max-width: 40ch; margin: 8px auto 0; }
.svc { padding: 18px 20px; margin-top: 12px; }
.svc .t { display: flex; align-items: center; gap: 12px; }
.svc .t b { font-weight: 600; font-size: 18px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.svc .t span { font-weight: 600; white-space: nowrap; }
.svc .bars { margin-top: 14px; }
.sp h3 { font-size: 20px; font-weight: 600; margin: 40px 0 12px; }
.sp-row { padding: 16px 20px; display: grid; grid-template-columns: 30px 1fr; gap: 12px; align-items: start; }
.sp-row + .sp-row { margin-top: 10px; }
.sp-row b { display: block; font-weight: 600; }
.sp-row span { color: var(--dim); }
.sp-foot { margin-top: 48px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; color: var(--dim); font-size: 14px; }

/* Phones: live blur over an animated sky makes every frosted panel re-render each frame while
   scrolling, which flickers on mobile GPUs. Use slightly more opaque panels without the blur. */
@media (max-width: 900px), (pointer: coarse) {
  :root { --panel: rgba(12,22,46,.52); --panel-2: rgba(12,22,46,.66); }
  .panel, .btn.glass, .seg, .site-nav.scrolled, .nav-links, .modal-overlay, .app-bar, .me-menu { -webkit-backdrop-filter: none; backdrop-filter: none; }
  .site-nav.scrolled, .app-bar { background: rgba(12,22,46,.72); }
  .modal-overlay { background: rgba(8,14,30,.6); }
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .btn:active { transform: none; } .plan:hover { transform: none; } .toast { transition: opacity .2s; } }
