@font-face { font-family: Kanit; src: url(/fonts/kanit-600.woff2) format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: Geist; src: url(/fonts/geist.woff2) format("woff2"); font-weight: 100 900; font-display: swap; }

/* Mesmos tokens de site/src/index.css (docs/layout.md). */
:root {
  color-scheme: dark;
  --background: #000;
  --card: #121215;
  --muted: #18181c;
  --foreground: #f4f4f5;
  --muted-foreground: #a1a1aa;
  --primary: #ffb53d;
  --glow: #ffc96e;
  --border: rgb(255 255 255 / 10%);
  --up: #34d399;
  --slow: #fbbf24;
  --down: #ff6b81;
  --maintenance: #38bdf8;
  --unknown: #a1a1aa;
}
[data-state="up"] { --state: var(--up); }
[data-state="slow"] { --state: var(--slow); }
[data-state="down"] { --state: var(--down); }
[data-state="maintenance"] { --state: var(--maintenance); }
[data-state="unknown"], [data-state="loading"] { --state: var(--unknown); }

* { box-sizing: border-box; margin: 0; }
[hidden] { display: none !important; }
body { background: var(--background); color: var(--foreground); font: 400 1rem/1.5 Geist, system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
.page { max-width: 64rem; margin: 0 auto; padding: 0 1.25rem 4rem; }
h1, h2, .brand { font-family: Kanit, Geist, sans-serif; font-weight: 600; }
.num { font-variant-numeric: tabular-nums; }
.note { color: var(--muted-foreground); font-size: .8125rem; }
.note p { max-width: 64ch; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; border-radius: .5rem; }

.top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 5rem; }
.brand { display: flex; align-items: center; gap: .875rem; min-width: 0; font-size: 1.125rem; color: var(--muted-foreground); overflow-wrap: anywhere; }
.brand img { height: 2.5rem; width: auto; max-width: 11rem; object-fit: contain; }
.brand i { flex: none; width: 1px; height: 1.5rem; background: rgb(255 255 255 / 28%); }
.brand span { color: var(--foreground); }
.link { color: var(--glow); font-size: .875rem; text-underline-offset: .25em; padding: .75rem 0; white-space: nowrap; }

.hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem; flex-wrap: wrap; padding: clamp(2rem, 7vw, 4.5rem) 0 2rem; }
.title { display: flex; gap: .28em; font-size: clamp(2.5rem, 8vw, 5.25rem); line-height: 1; }
.title h1 { font-size: inherit; letter-spacing: -.02em; text-wrap: balance; }
.title svg { flex: none; width: .78em; height: .78em; margin-top: .13em; fill: none; stroke: var(--state); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 .14em color-mix(in srgb, var(--state) 55%, transparent)); }
.hero[data-state="up"] .title svg { --state: var(--primary); }
.detail { margin-top: 1rem; color: var(--muted-foreground); font-size: 1.0625rem; max-width: 46ch; }

.refresh { display: inline-flex; align-items: center; gap: .625rem; min-height: 2.75rem; padding: 0 1.125rem 0 .875rem; border: 1px solid var(--border); border-radius: 999px; background: var(--card); color: var(--foreground); font: 500 .875rem Geist, sans-serif; cursor: pointer; }
.refresh:not([aria-disabled="true"]):hover { background: var(--muted); border-color: var(--primary); }
.refresh[aria-disabled="true"] { cursor: not-allowed; color: var(--muted-foreground); }
#refresh-label { min-width: 6.75rem; text-align: left; font-variant-numeric: tabular-nums; }
.refresh svg { width: 1.125rem; transform: rotate(-90deg); fill: none; stroke-width: 3.5; }
.track { stroke: var(--border); }
.ring { stroke: var(--primary); stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 100; }

.pulse { border-top: 1px solid var(--border); padding: 1.25rem 0 1rem; }
.pulse figcaption { display: flex; justify-content: space-between; gap: 1rem; font-size: .875rem; color: var(--muted-foreground); }
#pulse-value { color: var(--foreground); }
#trace { display: block; width: 100%; height: clamp(6.5rem, 16vw, 10rem); margin: .5rem 0; overflow: visible; }
#trace path { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.trace-base { stroke: var(--border); }
.trace-line { stroke: var(--glow); }
.trace-line.last { filter: drop-shadow(0 0 8px var(--primary)); animation: beat .9s ease-out; }
#trace rect { fill: transparent; }
#trace rect:hover { fill: rgb(255 255 255 / 6%); }
.trace-down { stroke: var(--down); stroke-dasharray: 2 6; }
@keyframes beat { from { clip-path: inset(-100% 100% -100% 0); } to { clip-path: inset(-100% -100% -100% 0); } }

.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem 1rem; padding: 1.25rem 0; border-block: 1px solid var(--border); }
.facts dt { color: var(--muted-foreground); font-size: .8125rem; }
.facts dd { margin-top: .125rem; font-weight: 500; }

.group { margin-top: 3rem; }
.group h2 { font-size: 1.25rem; margin-bottom: .5rem; }
.group ul { list-style: none; padding: 0; }
.service { display: grid; grid-template-columns: 1.5rem minmax(0, 1fr) 13rem 4.5rem 7.5rem; align-items: center; gap: 1rem; padding: 1.125rem 0; border-top: 1px solid var(--border); }
.service > svg { width: 1.375rem; height: 1.375rem; fill: none; stroke: var(--state); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.name { font-weight: 500; }
.about { color: var(--muted-foreground); font-size: .875rem; }
.bars { display: flex; gap: 2px; height: 1.75rem; }
.bars i { flex: 1; border-radius: 2px; background: var(--muted); }
.bars i[data-state] { background: var(--state); }
.bars i[data-state="unknown"] { background: #3f3f46; }
.bars i[data-tip]:hover { filter: brightness(1.3); }
.ms { text-align: right; color: var(--muted-foreground); font-size: .875rem; white-space: nowrap; }
.label { justify-self: end; font-size: .8125rem; font-weight: 500; padding: .25rem .625rem; border-radius: 999px; color: var(--state); background: color-mix(in srgb, var(--state) 14%, transparent); white-space: nowrap; }

.tip { position: fixed; z-index: 10; display: grid; grid-template-columns: 1.125rem auto; align-items: center; gap: 0 .5rem; max-width: calc(100vw - 1rem); padding: .5rem .75rem; border: 1px solid var(--border); border-radius: .625rem; background: #141418; box-shadow: 0 12px 32px rgb(0 0 0 / 60%); pointer-events: none; white-space: nowrap; }
.tip svg { width: 1.125rem; height: 1.125rem; fill: none; stroke: var(--state); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tip strong { font-size: .875rem; font-weight: 500; }
.tip span { grid-column: 2; color: var(--muted-foreground); font-size: .8125rem; }

footer { margin-top: 3rem; padding-top: 1.25rem; border-top: 1px solid var(--border); }

@media (max-width: 48rem) {
  .facts { grid-template-columns: repeat(2, 1fr); }
  .service { grid-template-columns: 1.5rem minmax(0, 1fr) 6.5rem; row-gap: .75rem; }
  .label { grid-column: 3; grid-row: 1; }
  .bars { grid-column: 2; grid-row: 2; }
  .ms { grid-column: 3; grid-row: 2; }
}
@media (prefers-reduced-motion: reduce) { .trace-line.last { animation: none; } }
@media (forced-colors: active) { .bars i { forced-color-adjust: none; } }
