:root {
  --bg: radial-gradient(circle at top left, #ffd786 0%, rgba(255,215,134,0) 30%), radial-gradient(circle at bottom right, #ffb0a9 0%, rgba(255,176,169,0) 32%), linear-gradient(145deg, #fff4d0 0%, #ffd5b8 44%, #ffe8f3 100%);
  --ink: #2b1833;
  --muted: #7a5968;
  --card: rgba(255,255,255,0.86);
  --line: rgba(43,24,51,0.1);
  --primary: #ff8f4d;
  --primary-strong: #db5c3b;
  --accent: #d84f8b;
  --accent-strong: #a53267;
  --danger: #9f3a38;
  --shadow: 0 24px 70px rgba(103,39,59,0.14);
  --hero-shadow: 0 30px 90px rgba(180,63,83,0.28);
  --surface-soft: rgba(255,255,255,0.62);
}
html[data-theme="night"],
body[data-theme="night"] {
  --bg: radial-gradient(circle at top left, #2f1d5c 0%, rgba(47,29,92,0) 30%), radial-gradient(circle at bottom right, #8d214f 0%, rgba(141,33,79,0) 34%), linear-gradient(155deg, #07131c 0%, #15263a 42%, #25163e 100%);
  --ink: #f7eef9;
  --muted: #ccb6d4;
  --card: rgba(17,24,39,0.82);
  --line: rgba(247,238,249,0.11);
  --primary: #54d2ff;
  --primary-strong: #96f0ff;
  --accent: #ff7ab6;
  --accent-strong: #ffb2d4;
  --danger: #ff8f87;
  --shadow: 0 24px 70px rgba(0,0,0,0.32);
  --hero-shadow: 0 34px 100px rgba(0,0,0,0.46);
  --surface-soft: rgba(255,255,255,0.06);
}
* { box-sizing: border-box; }
html { color-scheme: light; }
html[data-theme="night"] { color-scheme: dark; }
body {
  margin: 0;
  font-family: "Gill Sans", "Avenir Next", "Trebuchet MS", "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
  min-height: 100vh;
  transition: background .25s ease, color .25s ease;
}
.brand-block h1 { margin-bottom: 0; }
.topbar, .shell { width: min(1100px, calc(100% - 24px)); margin: 0 auto; }
.topbar { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; padding: 24px 0 14px; }
.topbar-actions { display: grid; justify-items: end; gap: 12px; }
.topnav { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
.topnav-form { margin: 0; }
.topnav a, .topnav button, .chip, .theme-toggle {
  text-decoration: none;
  color: var(--ink);
  background: var(--surface-soft);
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  transition: transform .18s ease, background .18s ease, border-color .18s ease, color .18s ease;
}
.topnav button {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  font: inherit;
  appearance: none;
}
.topnav a:hover, .topnav button:hover, .chip:hover, .theme-toggle:hover { transform: translateY(-1px); }
.theme-toggle {
  cursor: pointer;
  font: inherit;
  min-height: 42px;
  padding-inline: 16px;
  box-shadow: none;
}
.shell { padding-bottom: 42px; }
.eyebrow { margin: 0 0 4px; text-transform: uppercase; letter-spacing: .15em; color: var(--muted); font-size: .78rem; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(1.9rem, 3vw, 2.7rem); }
h2 { font-size: clamp(1.45rem, 2.2vw, 2rem); }
.card {
  background: var(--card);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.28);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 22px;
  transition: background .25s ease, color .25s ease, border-color .25s ease;
}
.hero-card {
  background: linear-gradient(145deg, rgba(216,79,139,0.94), rgba(255,143,77,0.94) 58%, rgba(255,214,102,0.96));
  color: #f7fffd;
  box-shadow: var(--hero-shadow);
}
.hero-card .eyebrow,
.hero-card .lead,
.hero-card .metric-label { color: rgba(247,255,253,0.8); }
.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin: 18px 0; }
.hero { align-items: stretch; }
.hero-home { grid-template-columns: minmax(0, 1.3fr) minmax(290px, .9fr); }
.hero-card-top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 20px;
}
.hero-copy {
  max-width: 38rem;
  font-size: 1.02rem;
  line-height: 1.55;
  margin-bottom: 22px;
}
.hero-cta {
  min-height: 60px;
  padding-inline: 24px;
  background: #fff;
  color: #5c1933;
  border: none;
  font-size: 1.03rem;
  font-weight: 700;
  box-shadow: 0 16px 38px rgba(92,25,51,0.22);
}
.hero-cta:visited,
.hero-cta:hover,
.hero-cta:active,
.hero-cta:focus {
  color: #5c1933;
}
.hero-support { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 14px; }
.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  font-weight: 700;
  font-size: .9rem;
  white-space: nowrap;
}
.status-pill.is-good { background: rgba(255,255,255,0.18); color: #fff7db; }
.status-pill.is-waiting { background: rgba(255,255,255,0.22); color: #fff; }
.insight-card { display: grid; gap: 14px; align-content: start; }
.metric-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.metric {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 14px;
  display: grid;
  gap: 4px;
}
.metric-value { font-size: 1.5rem; font-weight: 800; }
.metric-label, .card-kicker, .shortcut small { color: var(--muted); }
.dashboard-card { display: grid; gap: 10px; align-content: start; }
.event-line {
  padding: 10px 12px;
  margin-bottom: 8px;
  border-radius: 14px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
}
.empty-state {
  color: var(--muted);
  background: var(--surface-soft);
  border: 1px dashed var(--line);
  border-radius: 18px;
  padding: 14px;
}
.lead { color: var(--muted); }
.stack { display: grid; gap: 16px; }
.split { display: flex; justify-content: space-between; gap: 18px; align-items: start; flex-wrap: wrap; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; }
.actions.column { flex-direction: column; min-width: 180px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 46px; padding: 0 16px; border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.92);
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
  font-weight: 700;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 12px 24px rgba(19,38,47,0.12); }
.btn.primary { background: linear-gradient(145deg, var(--primary), var(--primary-strong)); color: #fff; border-color: transparent; }
.btn.soft { background: rgba(255,255,255,0.12); color: #fff; border-color: rgba(255,255,255,0.18); }
html[data-theme="night"] .btn:not(.primary):not(.soft) {
  background: rgba(20,31,49,0.92);
  color: var(--ink);
  border-color: rgba(247,238,249,0.16);
}
.flash { padding: 14px 18px; border-radius: 16px; margin: 8px 0 18px; }
.flash.success { background: rgba(31,111,120,0.14); }
.flash.error { background: rgba(159,58,56,0.14); color: var(--danger); }
label, fieldset { display: grid; gap: 8px; }
label {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 14px 16px;
}
fieldset {
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 16px;
  background: var(--surface-soft);
}
legend { padding: 0 8px; font-weight: 700; }
input[type="text"], input[type="password"], input[type="datetime-local"], select, textarea {
  width: 100%;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.9);
  color: var(--ink);
}
textarea { resize: vertical; min-height: 110px; }
input[type="range"] {
  width: calc(100% - 24px);
  margin: 8px 12px 0;
  accent-color: var(--accent);
  touch-action: pan-y;
}
output {
  width: fit-content;
  min-width: 54px;
  padding: 6px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--primary) 18%, transparent);
  color: var(--primary-strong);
  font-weight: 800;
}
.checkbox { display: flex; gap: 10px; align-items: center; }
.checkbox input { flex: none; }
.checkbox-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.shortcut { text-decoration: none; color: var(--ink); display: grid; gap: 8px; min-height: 148px; align-content: start; }
.shortcut span { font-size: 1.8rem; }
.panel { border: 1px solid var(--line); border-radius: 18px; padding: 16px; background: var(--surface-soft); }
.panel.focus { border-color: color-mix(in srgb, var(--accent) 55%, white); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.narrow { max-width: 520px; margin: 10vh auto 0; }
@media (max-width: 720px) {
  .topbar { padding-top: 18px; align-items: stretch; }
  .topbar-actions { width: 100%; justify-items: stretch; }
  .topnav { font-size: .92rem; justify-content: flex-start; }
  .theme-toggle { width: auto; }
  .card { border-radius: 20px; }
  .hero-home { grid-template-columns: 1fr; }
  .hero-card-top { flex-direction: column; }
  .metric-strip { grid-template-columns: 1fr; }
  .actions { flex-direction: column; }
  .actions .btn, .hero-support .btn { width: 100%; }
  .shortcut { min-height: 0; }
  input[type="range"] { width: calc(100% - 32px); margin-inline: 16px; }
}
