:root {
  color-scheme: light dark;
  --hvn-red: #ea4445;
  /* Brand Red is too light for white text (3.6:1); filled controls use the dark variant. */
  --hvn-primary: #c93939;
  --hvn-primary-hover: #a82e2e;
  --hvn-red-light: #fdecec;
  --hvn-on-primary: #ffffff;
  --hvn-text: #333333;
  /* #808080 is below 4.5:1 on white, so secondary text uses a darker gray. */
  --hvn-muted: #666666;
  --hvn-bg: #ffffff;
  --hvn-surface: #ffffff;
  --hvn-bg-alt: #f5f5f5;
  --hvn-border: #e2e2e2;
  --hvn-link: #c93939;
  --hvn-success: #1e7e34;
  --hvn-warning-bg: #fff8e1;
  --hvn-warning: #ffc107;
  --hvn-focus: #c93939;
  --hvn-font-heading: 'Google Sans', Inter, Roboto, system-ui, sans-serif;
  --hvn-font-body: Inter, Roboto, system-ui, sans-serif;
  --hvn-radius: 8px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --hvn-red-light: rgba(234, 68, 69, 0.18);
    --hvn-text: #ececec;
    --hvn-muted: #b0b0b0;
    --hvn-bg: #18181a;
    --hvn-surface: #222225;
    --hvn-bg-alt: #2b2b2f;
    --hvn-border: #3a3a3e;
    --hvn-link: #ff8a8a;
    --hvn-success: #5fd17a;
    --hvn-warning-bg: #3a3214;
    --hvn-focus: #ff8a8a;
  }
}

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

/* Component display rules below must not override the hidden attribute. */
[hidden] {
  display: none !important;
}

body {
  margin: 0;
  background: var(--hvn-bg);
  color: var(--hvn-text);
  font-family: var(--hvn-font-body);
  font-size: 16px;
  line-height: 1.55;
}

h1,
h2,
h3 {
  font-family: var(--hvn-font-heading);
  line-height: 1.25;
  margin: 0 0 12px;
}

h1 {
  font-size: 28px;
  font-weight: 700;
}

h2 {
  font-size: 20px;
  font-weight: 500;
}

a {
  color: var(--hvn-link);
}

button,
.button {
  font: 500 15px var(--hvn-font-body);
  min-height: 40px;
  border: 1px solid var(--hvn-primary);
  border-radius: var(--hvn-radius);
  background: transparent;
  color: var(--hvn-link);
  padding: 8px 16px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 150ms ease-out;
}

button:hover,
.button:hover {
  background: var(--hvn-red-light);
}

button.primary,
.button.primary {
  background: var(--hvn-primary);
  color: var(--hvn-on-primary);
}

button.primary:hover,
.button.primary:hover {
  background: var(--hvn-primary-hover);
}

button.danger {
  border-color: var(--hvn-border);
  color: var(--hvn-muted);
}

button.danger:hover {
  border-color: var(--hvn-primary);
  color: var(--hvn-link);
}

button:disabled {
  opacity: 0.5;
  cursor: default;
}

button:disabled:hover {
  background: transparent;
}

input,
select {
  font: 400 15px var(--hvn-font-body);
  min-height: 40px;
  color: var(--hvn-text);
  background: var(--hvn-surface);
  border: 1px solid var(--hvn-border);
  border-radius: var(--hvn-radius);
  padding: 8px 10px;
}

:focus-visible {
  outline: 2px solid var(--hvn-focus);
  outline-offset: 2px;
}

input:focus,
select:focus {
  outline: 2px solid var(--hvn-focus);
  outline-offset: 0;
}

.page {
  max-width: 880px;
  margin: 0 auto;
  padding: 32px 16px 24px;
}

.muted {
  color: var(--hvn-muted);
  font-size: 14px;
}

.status-ok {
  color: var(--hvn-success);
}

.status-error {
  color: var(--hvn-link);
}

.hvn-footer {
  margin-top: 40px;
  padding-top: 12px;
  border-top: 1px solid var(--hvn-border);
  color: var(--hvn-muted);
  font-size: 13px;
}

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

.qev-icon {
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.qev-icon.filled {
  fill: currentColor;
}

button .qev-icon,
.button .qev-icon {
  width: 16px;
  height: 16px;
}

button,
.button {
  gap: 6px;
}

.with-icon {
  display: flex;
  align-items: center;
  gap: 8px;
}

h1.with-icon .qev-icon {
  width: 26px;
  height: 26px;
  color: var(--hvn-red);
}

h2.with-icon .qev-icon {
  width: 20px;
  height: 20px;
  color: var(--hvn-red);
}
