/* Code Calligraphy Status: same palette and type as www.codecalligraphy.com */
@font-face { font-family: "Inter"; src: url("../fonts/inter-var.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Cormorant"; src: url("../fonts/cormorant-500-normal.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Cormorant"; src: url("../fonts/cormorant-600-normal.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Cormorant"; src: url("../fonts/cormorant-500-italic.woff2") format("woff2"); font-weight: 500; font-style: italic; font-display: swap; }
@font-face { font-family: "Pinyon"; src: url("../fonts/pinyon.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }

:root {
  --ink: #2e2a26; --ink-2: #34302b; --paper: #e4d6bc; --paper-2: #dccdb0; --paper-line: rgba(40, 32, 20, .16);
  --card: #ede3d0; --card-hi: #f4ecdd; --text: #1c1915; --text-muted: #4a4640; --on-ink: #ece6da; --on-ink-muted: #b9b1a3;
  --gold: #c9a45c; --gold-deep: #6e5118; --seal: #b8412c; --seal-deep: #9c3522;
  --ok: #3f6b35; --ok-bg: rgba(79, 122, 64, .14); --ok-tick: #6f9a5c;
  --warn: #7a5410; --warn-bg: rgba(201, 164, 92, .25); --warn-tick: #c9a45c;
  --bad: #a3361f; --bad-bg: rgba(184, 65, 44, .14); --bad-tick: #b8412c;
  --unk: #5d574e; --unk-bg: rgba(74, 70, 64, .12); --unk-tick: #a59c8c;
  --serif: "Cormorant", "Cormorant Garamond", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --script: "Pinyon", "Snell Roundhand", cursive;
  --radius: 16px; --shadow-soft: 0 2px 6px rgba(60, 44, 16, .06), 0 24px 48px -22px rgba(60, 44, 16, .28);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { min-height: 100vh; display: flex; flex-direction: column; margin: 0; font-family: var(--sans); color: var(--text); background: var(--paper); line-height: 1.55; font-size: 1rem; }
[hidden] { display: none !important; }
a { color: inherit; }
img { display: block; max-width: 100%; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3 { margin: 0; }
.container { width: min(1120px, 100% - 2.5rem); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: .5rem; background: var(--ink); color: var(--on-ink); padding: .5rem .9rem; border-radius: 8px; z-index: 10; }
.skip:focus { left: .75rem; }
:focus-visible { outline: 2px solid var(--gold-deep); outline-offset: 3px; border-radius: 4px; }

/* Header */
.site-header { border-bottom: 1px solid var(--paper-line); background: rgba(228, 214, 188, .92); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 72px; }
.brand { display: inline-flex; align-items: center; gap: .7rem; text-decoration: none; }
.brand-name { white-space: nowrap; font-family: var(--serif); font-size: 1.5rem; font-weight: 600; letter-spacing: .01em; line-height: 1; }
.brand-name em { font-style: italic; font-weight: 500; color: var(--gold-deep); }
.brand-tag { font-size: .7rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--on-ink); background: var(--ink); padding: .28rem .55rem; border-radius: 999px; }
.header-link { font-size: .92rem; font-weight: 500; color: var(--text-muted); text-decoration: none; border-bottom: 1.5px solid transparent; transition: border-color .2s, color .2s; }
.header-link:hover { color: var(--text); border-color: var(--seal); }

/* Hero / overall */
.hero { padding: 3.2rem 0 2.2rem; background:
  radial-gradient(900px 300px at 85% -10%, rgba(201, 164, 92, .28), transparent 70%),
  radial-gradient(700px 260px at -10% 120%, rgba(184, 65, 44, .07), transparent 70%); }
.kicker { margin: 0 0 1rem; font-size: .78rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--gold-deep); }
.overall { display: flex; align-items: center; gap: 1.2rem; padding: 1.4rem 1.6rem; background: var(--card-hi); border: 1px solid var(--paper-line); border-radius: var(--radius); box-shadow: var(--shadow-soft); }
.overall h1 { font-family: var(--serif); font-weight: 600; font-size: clamp(1.9rem, 4.2vw, 2.8rem); line-height: 1.1; letter-spacing: -.005em; }
.overall-sub { margin: .35rem 0 0; color: var(--text-muted); font-size: .95rem; }
.seal { flex: none; width: 3.1rem; height: 3.1rem; border-radius: 50%; background: var(--unk-tick); position: relative; box-shadow: inset 0 0 0 4px rgba(255, 255, 255, .35); }
.seal::after { content: ""; position: absolute; inset: 30%; border-radius: 50%; background: rgba(255, 255, 255, .85); }
.overall[data-state="operational"] .seal { background: var(--ok-tick); }
.overall[data-state="degraded"] .seal { background: var(--warn-tick); }
.overall[data-state="outage"] .seal { background: var(--bad-tick); }
.overall[data-state="operational"] { border-color: rgba(79, 122, 64, .35); }
.overall[data-state="degraded"] { border-color: rgba(201, 164, 92, .6); }
.overall[data-state="outage"] { border-color: rgba(184, 65, 44, .45); background: #f6e6dd; }
.overall[data-state="loading"] .seal { animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .45; } }
.notice { margin: 1rem 0 0; color: var(--bad); }

/* Site cards */
.sites-section { padding: .6rem 0 3rem; }
.sites { display: grid; gap: 1.1rem; }
.site { background: var(--card); border: 1px solid var(--paper-line); border-radius: var(--radius); padding: 1.35rem 1.5rem 1.2rem; box-shadow: var(--shadow-soft); }
.site-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.site-name { font-family: var(--serif); font-size: 1.55rem; font-weight: 600; line-height: 1.15; }
.site-url { display: inline-block; margin-top: .15rem; font-size: .88rem; color: var(--text-muted); text-decoration: none; border-bottom: 1px solid rgba(74, 70, 64, .3); overflow-wrap: anywhere; }
.site-url:hover { color: var(--text); border-color: var(--seal); }
.chip { flex: none; display: inline-flex; align-items: center; gap: .45rem; padding: .34rem .75rem; border-radius: 999px; font-size: .84rem; font-weight: 600; white-space: nowrap; background: var(--unk-bg); color: var(--unk); }
.chip .dot { width: .55rem; height: .55rem; border-radius: 50%; background: currentColor; }
.chip[data-state="operational"] { background: var(--ok-bg); color: var(--ok); }
.chip[data-state="slow"], .chip[data-state="cert"] { background: var(--warn-bg); color: var(--warn); }
.chip[data-state="down"], .chip[data-state="content"] { background: var(--bad-bg); color: var(--bad); }

.history { margin: 1.1rem 0 .3rem; height: 30px; }
.history svg { display: block; width: 100%; height: 30px; }
.history .t-ok { fill: var(--ok-tick); }
.history .t-bad { fill: var(--bad-tick); }
.history .t-none { fill: rgba(74, 70, 64, .14); }
.history-cap { display: flex; justify-content: space-between; margin: 0 0 1rem; font-size: .74rem; color: var(--text-muted); }

.metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 1.9fr) repeat(2, minmax(0, 1fr)); gap: .5rem 1rem; margin: 0; padding-top: 1rem; border-top: 1px solid var(--paper-line); }
.metric { min-width: 0; }
.metric dt { font-size: .72rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); }
.metric dd { margin: .2rem 0 0; font-size: 1.05rem; font-weight: 600; font-variant-numeric: tabular-nums; display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.metric dd.v-ok { color: var(--ok); }
.metric dd.v-warn { color: var(--warn); }
.metric dd.v-bad { color: var(--bad); }
.metric dd.v-unk { color: var(--unk); font-weight: 500; }
.metric dd.v-na { color: var(--text-muted); font-weight: 500; }
.spark svg { display: block; width: 120px; height: 26px; }
.spark .line { fill: none; stroke: var(--gold-deep); stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
.spark .area { fill: rgba(201, 164, 92, .28); stroke: none; }
.spark .fail { fill: var(--bad-tick); }
.tick-ok::before { content: "\2713\00a0"; }
.tick-bad::before { content: "\2715\00a0"; }

/* Method */
.method { background: var(--ink); color: var(--on-ink); padding: 3rem 0; }
.method-inner { display: grid; grid-template-columns: 1fr 1.2fr; gap: 1rem 3rem; align-items: start; }
.method h2 { font-family: var(--serif); font-weight: 600; font-size: 2.1rem; line-height: 1.1; margin-bottom: .7rem; }
.method .script { font-family: var(--script); font-weight: 400; color: var(--gold); font-size: 1.15em; }
.method p { margin: 0; color: var(--on-ink-muted); }
.method strong { color: var(--on-ink); font-weight: 600; }
.method-list { display: grid; gap: .6rem; margin-top: .3rem; }
.method-list li { position: relative; padding-left: 1.4rem; color: var(--on-ink-muted); }
.method-list li::before { content: ""; position: absolute; left: 0; top: .62em; width: .5rem; height: .5rem; border-radius: 50%; background: var(--gold); }
.method-note { grid-column: 1 / -1; margin-top: 1rem !important; padding-top: 1.1rem; border-top: 1px solid rgba(236, 230, 218, .13); font-size: .9rem; }

/* Footer */
.site-footer { background: var(--ink-2); color: var(--on-ink-muted); font-size: .88rem; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1.5rem; padding: 1.4rem 0; }
.footer-inner p { margin: 0; }
.footer-inner a { color: var(--on-ink); text-decoration: none; border-bottom: 1px solid rgba(236, 230, 218, .3); }
.notfound { padding: 4rem 0; }
.notfound h1 { font-family: var(--serif); font-size: 2.4rem; }

@media (max-width: 900px) {
  .metrics { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .9rem 1rem; }
  .metric { grid-column: span 2; }
  .metric.m-wide { grid-column: span 6; }
  .metric:nth-last-child(-n+2) { grid-column: span 3; }
  .method-inner { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .container { width: calc(100% - 2rem); }
  .header-link { font-size: .85rem; }
  .brand-name { font-size: 1.3rem; }
  .brand img { width: 34px; height: 34px; }
  .hero { padding: 2rem 0 1.6rem; }
  .overall { padding: 1.1rem 1.1rem; gap: .9rem; }
  .seal { width: 2.4rem; height: 2.4rem; }
  .site { padding: 1.1rem 1.1rem 1rem; }
  .site-head { flex-direction: column; gap: .6rem; }
  .site-name { font-size: 1.4rem; }
  .header-link { display: none; }
  .metric dd { font-size: 1rem; }
}
@media (prefers-reduced-motion: reduce) { .overall[data-state="loading"] .seal { animation: none; } }
main { flex: 1 0 auto; }
