:root {
  color-scheme: light;
  --hf-paper: #faf7f2;
  --hf-surface: #fffdf9;
  --hf-ink: #1c1917;
  --hf-muted: #78716c;
  --hf-line: #e7e5e4;
  --hf-accent: #9a3412;
  --hf-ok: #3f6212;
  --hf-stop: #b91c1c;
  --hf-unknown: #a16207;
  --hf-radius: 0.75rem;
  --hf-shadow: 0 1px 2px rgb(28 25 23 / 0.06);
  font-family: "Source Sans 3", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; color: var(--hf-ink); background: var(--hf-paper); }
button, a { font: inherit; }
a { color: inherit; }
.page, .footer { width: min(100% - 2rem, 58rem); margin-inline: auto; }
.page { padding: 1.25rem 0 4.5rem; }
.header { display: flex; align-items: center; justify-content: space-between; min-height: 3rem; margin-bottom: 3.25rem; }
.brand { font-family: Fraunces, Georgia, serif; font-size: 1.65rem; font-weight: 600; letter-spacing: -0.035em; text-decoration: none; }
.languages { display: flex; gap: 0.25rem; }
.languages button { min-width: 44px; min-height: 44px; border: 0; border-radius: 999px; color: var(--hf-muted); background: transparent; cursor: pointer; }
.languages button[aria-pressed="true"] { color: var(--hf-ink); background: var(--hf-surface); box-shadow: 0 0 0 1px var(--hf-line); }
:focus-visible { outline: 3px solid rgb(154 52 18 / 0.34); outline-offset: 3px; }
.page-context p { margin: 0 0 0.9rem; color: var(--hf-muted); font-size: 0.86rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }

.status-banner {
  --state-color: var(--hf-muted);
  --state-ink: var(--hf-ink);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.25rem;
  align-items: center;
  min-height: 12rem;
  padding: clamp(1.5rem, 5vw, 2.75rem);
  border: 1px solid color-mix(in srgb, var(--state-color) 22%, var(--hf-line));
  border-radius: calc(var(--hf-radius) * 1.5);
  color: var(--state-ink);
  background: linear-gradient(135deg, color-mix(in srgb, var(--state-color) 10%, var(--hf-surface)), var(--hf-surface) 72%);
  box-shadow: var(--hf-shadow);
}
.status-banner[data-state="operational"] { --state-color: var(--hf-ok); --state-ink: #29420b; }
.status-banner[data-state="unavailable"] { --state-color: var(--hf-stop); --state-ink: #7f1d1d; }
.status-banner[data-state="unknown"] { --state-color: #b0893f; --state-ink: #5f5139; }
.status-icon { display: grid; width: 3.25rem; height: 3.25rem; place-items: center; border-radius: 50%; background: color-mix(in srgb, var(--state-color) 13%, white); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--state-color) 25%, transparent); }
.status-icon span { width: 0.9rem; height: 0.9rem; border-radius: 50%; background: var(--state-color); }
.status-banner h1 { margin: 0; font-family: Fraunces, Georgia, serif; font-size: clamp(2rem, 5.5vw, 3.5rem); font-weight: 550; line-height: 1.05; letter-spacing: -0.035em; }
.status-banner p { margin: 0.7rem 0 0; color: color-mix(in srgb, var(--state-ink) 74%, var(--hf-muted)); font-size: clamp(1rem, 2.5vw, 1.15rem); }

.services, .monitoring { margin-top: 2.75rem; }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 0.8rem; }
.section-heading h2, .monitoring h2 { margin: 0; font-family: Fraunces, Georgia, serif; font-size: 1.45rem; font-weight: 600; }
.section-heading span { color: var(--hf-muted); font-size: 0.86rem; }
.service-row { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 6rem; padding: 1.25rem 1.4rem; border: 1px solid var(--hf-line); border-radius: var(--hf-radius); background: var(--hf-surface); box-shadow: var(--hf-shadow); }
.service-row h3 { margin: 0; font-size: 1.05rem; }
.service-row p { margin: 0.25rem 0 0; color: var(--hf-muted); }
.service-status { display: inline-flex; align-items: center; gap: 0.55rem; flex: none; font-weight: 700; }
.service-status i { width: 0.55rem; height: 0.55rem; border-radius: 50%; background: var(--hf-muted); }
.status-banner[data-state="operational"] ~ .services .service-status { color: var(--hf-ok); }
.status-banner[data-state="operational"] ~ .services .service-status i { background: var(--hf-ok); }
.status-banner[data-state="unavailable"] ~ .services .service-status { color: var(--hf-stop); }
.status-banner[data-state="unavailable"] ~ .services .service-status i { background: var(--hf-stop); }
.status-banner[data-state="unknown"] ~ .services .service-status { color: var(--hf-unknown); }
.status-banner[data-state="unknown"] ~ .services .service-status i { background: var(--hf-unknown); }

.monitoring { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1.5rem 3rem; padding-top: 2.25rem; border-top: 1px solid var(--hf-line); }
.monitoring > div:first-child { max-width: 34rem; }
.monitoring p { margin: 0.65rem 0 0; color: var(--hf-muted); line-height: 1.55; }
.monitoring-indicator { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 0.45rem 0.6rem; min-width: 15rem; align-self: center; color: var(--hf-muted); font-size: 0.92rem; font-weight: 650; }
.monitoring-indicator small { grid-column: 2; color: var(--hf-muted); font-size: 0.82rem; font-weight: 400; }
.pulse { width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--hf-ok); box-shadow: 0 0 0 0 rgb(63 98 18 / 0.3); animation: pulse 2.4s ease-out infinite; }
@keyframes pulse { 0%, 55%, 100% { box-shadow: 0 0 0 0 rgb(63 98 18 / 0.25); } 25% { box-shadow: 0 0 0 0.3rem rgb(63 98 18 / 0.03); } }
.footer { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.35rem 0 2rem; border-top: 1px solid var(--hf-line); color: var(--hf-muted); font-size: 0.9rem; }
.footer div { display: flex; gap: 0.65rem; align-items: center; }
.footer a { text-underline-offset: 0.2em; }

@media (max-width: 640px) {
  .page { padding-bottom: 3.5rem; }
  .header { margin-bottom: 2.5rem; }
  .status-banner { grid-template-columns: 1fr; min-height: 15rem; align-content: center; }
  .status-icon { width: 2.75rem; height: 2.75rem; }
  .service-row { align-items: flex-start; flex-direction: column; gap: 1rem; }
  .monitoring { grid-template-columns: 1fr; }
  .monitoring-indicator { min-width: 0; }
  .footer { align-items: flex-start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
