@font-face { font-family: "Figtree Variable"; font-weight: 300 900; font-display: swap; src: url("/fonts/figtree.woff2") format("woff2"); }

:root {
  --ink: #082119; --muted: rgba(8, 33, 25, .68); --line: rgba(8, 33, 25, .12);
  --paper: #f8fcf9; --card: #fff; --panel: #eef7f1;
  --accent: #247a64; --accent-strong: #11604d; --accent-tint: #cfebda;
  --brand: #741b21; --pink: #f3a9a9; --sun: #ffd885; --sky: #a1d0f7;
  --ok: #2f9e6f; --ok-soft: #e2f3e9; --good: #8fcf9a; --warn: #e0a42e; --warn-soft: #fff4d6; --bad: #ca2b3d; --bad-soft: #fcecf0; --none: rgba(8, 33, 25, .1);
  --shadow: 0 2px 4px rgba(8,33,25,.04), 0 12px 32px rgba(8,33,25,.07);
  --font: "Figtree Variable", ui-rounded, system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #eaf3ee; --muted: rgba(234, 243, 238, .7); --line: rgba(234, 243, 238, .14);
    --paper: #0d1914; --card: #14241d; --panel: #101e18;
    --accent: #3aa88a; --accent-strong: #7fd6bb; --accent-tint: #1d3a30;
    --brand: #f3a9a9; --pink: #741b21; --sun: #6b5217; --sky: #254a68;
    --ok: #3cb985; --ok-soft: #153327; --good: #5da36a; --warn: #f0b955; --warn-soft: #3a2f12; --bad: #ff6b7b; --bad-soft: #3d1a20; --none: rgba(234, 243, 238, .12);
    --shadow: 0 12px 32px rgba(0,0,0,.35);
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 17px/1.5 var(--font); min-height: 100dvh; position: relative; overflow-x: hidden; }
body::before, body::after { content: ""; position: fixed; z-index: -1; border-radius: 50%; filter: blur(80px); pointer-events: none; }
body::before { width: 480px; height: 480px; left: -180px; top: -140px; background: var(--accent-tint); opacity: .55; }
body::after { width: 420px; height: 420px; right: -160px; top: 220px; background: var(--sun); opacity: .3; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.top { display: flex; align-items: center; gap: 12px; width: min(52rem, 100%); margin: 0 auto; padding: 20px clamp(16px, 4vw, 28px) 4px; }
.grow { flex: 1; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { width: 40px; height: 40px; object-fit: contain; transition: transform .25s; }
.brand:hover img { transform: rotate(-6deg) scale(1.06); }
.brand b { font-size: 1.3rem; font-weight: 900; letter-spacing: -.02em; }
.lang { appearance: none; display: inline-flex; padding: 3px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); cursor: pointer; font: 800 13px var(--font); color: var(--muted); transition: transform .12s; }
.lang:active { transform: scale(.95); }
.lang span { padding: 5px 11px; border-radius: 999px; }
html[lang="it"] .lang span:first-child, html[lang="en"] .lang span:last-child { background: var(--accent); color: #fff; }

main { width: min(52rem, 100%); margin: 0 auto; padding: 8px clamp(16px, 4vw, 28px) 24px; display: grid; gap: 20px; }

/* The answer to the only question people have */
.hero { display: flex; align-items: center; gap: clamp(16px, 4vw, 28px); padding: clamp(22px, 5vw, 34px); border-radius: 32px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); --tone: var(--muted); --soft: var(--panel); }
.hero[data-state="up"] { --tone: var(--ok); --soft: var(--ok-soft); }
.hero[data-state="slow"] { --tone: var(--warn); --soft: var(--warn-soft); }
.hero[data-state="down"] { --tone: var(--bad); --soft: var(--bad-soft); }
.orb { position: relative; flex: none; width: 84px; height: 84px; border-radius: 50%; background: var(--soft); color: var(--tone); display: grid; place-items: center; transition: background .3s, color .3s; }
.orb svg { position: relative; }
.ring { position: absolute; inset: 0; border-radius: 50%; border: 3px solid var(--tone); opacity: 0; }
.hero[data-state="up"] .ring { animation: ping 3.4s ease-out infinite; }
.hero[data-state="down"] .ring, .hero[data-state="slow"] .ring { animation: ping 1.8s ease-out infinite; }
@keyframes ping { 0% { transform: scale(.9); opacity: .55 } 70%, 100% { transform: scale(1.5); opacity: 0 } }
.orb svg > * { display: none; }
.hero[data-state="up"] .i-up, .hero[data-state="slow"] .i-slow, .hero[data-state="down"] .i-down, .hero[data-state="load"] .i-load, .hero[data-state="stale"] .i-slow { display: block; }
.hero[data-state="up"] .i-up { stroke-dasharray: 40; stroke-dashoffset: 40; animation: draw .55s .1s ease-out forwards; }
@keyframes draw { to { stroke-dashoffset: 0 } }
.hero[data-state="load"] .i-load { transform-origin: 24px 24px; animation: turn 1s linear infinite; }
@keyframes turn { to { transform: rotate(360deg) } }
h1 { margin: 0; font-size: clamp(1.9rem, 6vw, 2.8rem); line-height: 1.06; font-weight: 900; letter-spacing: -.03em; }
.hl { background: linear-gradient(transparent 62%, var(--pink) 62% 92%, transparent 92%); padding: 0 .06em; }
.sub { margin: 8px 0 0; color: var(--muted); font-size: 1.05rem; }
.checked { margin: 8px 0 0; font-size: 14px; font-weight: 650; color: var(--muted); font-variant-numeric: tabular-nums; }

.notices { display: grid; gap: 12px; }
.notices:empty { display: none; }
.notice { padding: 16px 20px; border-radius: 22px; background: var(--card); border: 1px solid var(--line); border-left: 7px solid var(--accent); box-shadow: var(--shadow); animation: rise .35s ease-out both; }
.notice[data-kind="maintenance"] { border-left-color: var(--sky); }
.notice[data-kind="incident"] { border-left-color: var(--bad); }
.notice b { display: block; font-size: 1.05rem; }
.notice p { margin: 2px 0 0; color: var(--muted); }
.notice small { display: block; margin-top: 6px; color: var(--muted); font-size: 13.5px; font-weight: 650; }
@keyframes rise { from { opacity: 0; transform: translateY(8px) } to { opacity: 1; transform: none } }

.panel { background: var(--card); border: 1px solid var(--line); border-radius: 28px; box-shadow: var(--shadow); padding: clamp(18px, 4vw, 28px); }
.panel-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 8px; }
h2 { margin: 0; font-size: 1.2rem; font-weight: 850; letter-spacing: -.01em; }
.legend { color: var(--muted); font-size: 14px; font-weight: 650; }

.services, .incidents { list-style: none; margin: 0; padding: 0; }
.svc { padding: 18px 0; border-top: 1px solid var(--line); display: grid; gap: 12px; }
.svc:first-child { border-top: 0; }
.svc-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.svc-name b { display: block; font-size: 1.08rem; font-weight: 850; }
.svc-name span { color: var(--muted); font-size: 14.5px; }
.badge { display: inline-flex; align-items: center; gap: 7px; padding: 6px 13px 6px 10px; border-radius: 999px; font-weight: 800; font-size: 14px; background: var(--ok-soft); color: var(--ok); white-space: nowrap; }
.badge[data-s="slow"] { background: var(--warn-soft); color: var(--warn); }
.badge[data-s="down"] { background: var(--bad-soft); color: var(--bad); }
.badge svg { width: 15px; height: 15px; }
.strip { display: grid; grid-template-columns: repeat(90, 1fr); gap: 2px; height: 34px; cursor: default; touch-action: manipulation; }
.strip i { border-radius: 3px; background: var(--none); transition: transform .12s, opacity .12s; }
.strip i[data-t="great"] { background: var(--ok); }
.strip i[data-t="good"] { background: var(--good); }
.strip i[data-t="warn"] { background: var(--warn); }
.strip i[data-t="bad"] { background: var(--bad); }
.strip i:hover, .strip i.on { transform: scaleY(1.18); }
.strip-foot { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 13.5px; font-weight: 650; font-variant-numeric: tabular-nums; }
@media (max-width: 560px) { .strip { gap: 1px; } .strip-foot { flex-wrap: wrap; } .strip-foot span:nth-child(2) { order: 3; flex-basis: 100%; } .hero { flex-direction: column; align-items: flex-start; } }

.incidents li { padding: 14px 0; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 6px 16px; flex-wrap: wrap; }
.incidents li:first-child { border-top: 0; }
.incidents b { font-weight: 800; }
.incidents small { color: var(--muted); font-size: 14.5px; font-variant-numeric: tabular-nums; }
.incidents .live { color: var(--bad); font-weight: 800; }
.empty { margin: 4px 0 0; color: var(--muted); }
.why { margin: 4px 4px 0; color: var(--muted); font-size: 14.5px; text-align: center; }

.foot { width: min(52rem, 100%); margin: 0 auto; display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 24px; padding: 4px clamp(16px, 4vw, 28px) calc(32px + env(safe-area-inset-bottom)); font-weight: 700; font-size: 15px; }
.foot a { text-decoration: underline; text-decoration-color: var(--accent-tint); text-decoration-thickness: 3px; text-underline-offset: 5px; }
.foot a:hover { text-decoration-color: var(--accent); }

.tip { position: fixed; z-index: 10; pointer-events: none; padding: 9px 13px; border-radius: 14px; background: var(--ink); color: var(--paper); font-size: 13.5px; font-weight: 650; line-height: 1.35; max-width: 15rem; box-shadow: var(--shadow); }
.tip b { display: block; font-weight: 850; }
.tip[hidden] { display: none; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } .hero[data-state="up"] .i-up { stroke-dashoffset: 0; } }
