/* Defaults are the no-JS look; the script in index.html overrides these per domain. */
:root {
  --bg: #f6f5f2;
  --surface: #ffffff;
  --ink: #1d1d1f;
  --muted: #5c5c63;
  --accent: #3b5bdb;
  --on-accent: #ffffff;
  --line: color-mix(in oklch, var(--ink) 14%, var(--bg));
  --display: Georgia, serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --dw: 700;
  --tracking: -0.02em;
  --case: none;
  --radius: 14px;
}

*, *::before, *::after { box-sizing: border-box; }

html { background: var(--bg); }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.55;
  position: relative;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Background decoration */
.deco { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.deco.fade { -webkit-mask-image: radial-gradient(ellipse at 70% 30%, #000 10%, transparent 75%); mask-image: radial-gradient(ellipse at 70% 30%, #000 10%, transparent 75%); }
.deco.strip { border-top: 10px solid var(--accent); }
.blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .32; }
.m-vivid .blob { opacity: .22; }
.mono-letter {
  position: absolute;
  font-family: var(--display);
  font-weight: var(--dw);
  font-size: 80vmax;
  line-height: 1;
  color: color-mix(in oklch, var(--ink) 6%, transparent);
  text-transform: uppercase;
}

/* Page */
.page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100dvh;
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(20px, 4vw, 48px);
  display: flex;
  flex-direction: column;
}

.brand { display: flex; align-items: center; gap: 12px; font-family: var(--display); font-weight: var(--dw); font-size: 1.15rem; letter-spacing: var(--tracking); text-transform: var(--case); }
.mark {
  flex: none;
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: min(var(--radius), 12px);
  background: var(--accent);
  color: var(--on-accent);
  font-size: 1.25rem;
  line-height: 1;
}
.name { overflow-wrap: anywhere; }
.name b { font-weight: inherit; color: var(--muted); }

.msg { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: clamp(40px, 8vh, 80px) 0; }

.status {
  align-self: flex-start;
  display: inline-flex; align-items: center; gap: 10px;
  margin: 0 0 24px;
  padding: 6px 14px 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in oklch, var(--surface) 70%, transparent);
  font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted);
}
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); animation: pulse 1.8s ease-out infinite; }
.m-vivid .dot { background: var(--ink); }

h1 {
  font-family: var(--display);
  font-weight: var(--dw);
  font-size: clamp(2.5rem, 7vw, 5.6rem);
  line-height: 1.02;
  letter-spacing: var(--tracking);
  text-transform: var(--case);
  margin: 0 0 .4em;
  max-width: 13ch;
  text-wrap: balance;
}
h1 em { font-style: normal; color: var(--accent); }
.m-vivid h1 em { color: var(--surface); color: oklch(from var(--accent) .99 .02 h); }

.sub { margin: 0; max-width: 32em; font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: var(--muted); }

.bar { display: none; position: relative; width: min(260px, 70%); height: 4px; margin-top: 34px; border-radius: 4px; background: var(--line); overflow: hidden; }
.bar span { position: absolute; top: 0; bottom: 0; left: 0; width: 40%; border-radius: inherit; background: var(--accent); animation: slide 1.6s ease-in-out infinite; }
.m-vivid .bar span { background: var(--ink); }

.foot { font-size: .85rem; color: var(--muted); }

/* Status widget variants */
.s-bar .bar { display: block; }
.s-bar .dot { animation: none; }
.s-spin .dot { width: 12px; height: 12px; background: none; border: 2px solid var(--accent); border-right-color: transparent; animation: spin .9s linear infinite; }
.m-vivid.s-spin .dot { border-color: var(--ink); border-right-color: transparent; }

/* Layouts */
.l-center .page { align-items: center; text-align: center; }
.l-center .msg { align-items: center; }
.l-center .status { align-self: center; }
.l-center .sub, .l-center .bar { margin-left: auto; margin-right: auto; }
.l-center .bar { margin-top: 34px; }

.l-left h1 { font-size: clamp(2.8rem, 9vw, 7.4rem); max-width: 11ch; }

.l-card .page { align-items: center; }
.l-card .brand { align-self: stretch; }
.l-card .msg {
  flex: none;
  margin: auto 0;
  width: 100%;
  max-width: 640px;
  padding: clamp(28px, 5vw, 56px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) * 1.5);
  box-shadow: 0 30px 80px -34px rgba(0, 0, 0, .35);
}
.l-card h1 { font-size: clamp(2.2rem, 5.4vw, 3.6rem); }
.l-card .foot { align-self: stretch; }

.panel { display: none; }
.l-split { display: grid; grid-template-columns: 5fr 7fr; }
.l-split .panel {
  display: grid; place-items: center;
  position: relative; z-index: 1;
  overflow: hidden;
  background: var(--accent);
  color: var(--on-accent);
}
.l-split .panel span {
  font-family: var(--display);
  font-weight: var(--dw);
  font-size: min(70vh, 36vw);
  line-height: .8;
  text-transform: uppercase;
}
.l-split .page { margin: 0; max-width: 760px; width: 100%; }
.l-split .mark { display: none; }

.l-corner .page { max-width: none; }
.l-corner .msg { justify-content: flex-end; }
.l-corner h1 { font-size: clamp(3rem, 10.5vw, 9.5rem); max-width: 10ch; line-height: .96; }
.l-corner .foot { text-align: right; }

/* Phones */
@media (max-width: 800px) {
  .l-split { display: block; }
  .l-split .panel { height: 34vh; min-height: 180px; }
  .l-split .panel span { font-size: 30vh; }
  .l-split .page { min-height: 66vh; }
}

@media (max-width: 480px) {
  h1 { font-size: clamp(2.3rem, 11vw, 3.4rem); }
  .l-left h1, .l-corner h1 { font-size: clamp(2.6rem, 13vw, 4rem); }
  .l-card .msg { padding: 28px 22px; }
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in oklch, var(--accent) 55%, transparent); }
  70%, 100% { box-shadow: 0 0 0 10px transparent; }
}
@keyframes slide { from { transform: translateX(-100%); } to { transform: translateX(250%); } }
@keyframes spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  .dot, .bar span { animation: none !important; }
}
