:root {
  color-scheme: dark;
  --bg: #000000;
  --fg: #ffffff;
  --accent: #ef8a23;

  --text-muted: oklch(0.78 0 0);
  --line: oklch(0.38 0 0);
  --surface: oklch(0.27 0 0);
  --surface-hover: oklch(0.41 0 0);
  --surface-active: oklch(0.47 0 0);

  --accent-hover: oklch(0.78 0.15 58);
  --accent-active: oklch(0.70 0.15 58);
  --focus: oklch(0.82 0.14 58);

  --space: 16px;

  --page-pad: 24px;

  --font-sans: Arial, Helvetica, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* Resource settings select named themes supplied by public asset collections. */
:root[data-theme="overwatch"] {
  --accent: #f99d1c;
  --accent-hover: #ffc15b;
  --accent-active: #dc7d00;
  --focus: #ffd68f;
  --surface: #202632;
  --surface-hover: #2d3748;
  --surface-active: #3b465b;
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f6f7f9;
  --fg: #17202a;
  --text-muted: #4b5563;
  --line: #b7bec8;
  --surface: #ffffff;
  --surface-hover: #e9edf2;
  --surface-active: #dfe5ec;
}

@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;

    --bg: #ffffff;
    --fg: #111111;

    --text-muted: oklch(0.22 0 0);
    --line: oklch(0.62 0 0);
    --surface: oklch(0.87 0 0);
    --surface-hover: oklch(0.80 0 0);
    --surface-active: oklch(0.77 0 0);
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
  border-radius: 0 !important;
}

/* Author styles such as .panel { display: grid } must not reveal hidden
   survey stages when the browser's default [hidden] rule is overridden. */
[hidden] {
  display: none !important;
}

html {
  background: var(--bg);
  color: var(--fg);
  font-size: 16px;
}

body {
  margin: 0;
  min-height: 90vh;
  min-height: 100svh;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  line-height: 1.4;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--accent);
}

a:hover {
  color: var(--accent-hover);
}

button,
input,
textarea {
  font: inherit;
  color: inherit;
}

button,
input[type="text"],
textarea {
  border: 1px solid var(--line);
  background: var(--bg);
}

button {
  min-height: 48px;
  padding: 12px 16px;
  color: var(--fg);
  cursor: pointer;
  background: var(--surface);
}

button:hover {
  background: var(--surface-hover);
  border-color: var(--fg);
}

button:active {
  background: var(--surface-active);
  border-color: var(--accent);
}

button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

button:disabled:hover {
  background: var(--bg);
  border-color: var(--line);
}

input[type="text"],
textarea {
  width: 100%;
  padding: 12px 14px;
  color: var(--fg);
  caret-color: var(--accent);
}

textarea {
  resize: vertical;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

::selection {
  background: var(--accent);
  color: var(--bg);
}

.page {
  min-height: 90vh;
  min-height: 100svh;
  padding: var(--page-pad);
}

.site-page {
  display: flex;
  align-items: center;
  justify-content: center;
}

.site-content {
  width: 100%;
  min-width: 0;
  margin: auto;
}

.home-content {
  width: fit-content;
  max-width: 100%;
}

.page-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: var(--space);
}

.page-title {
  margin: 0;
  font-size: clamp(2rem, 3.2vw, 3.5rem);
  line-height: 1;
  font-weight: 700;
}

.section-title {
  margin: 0 0 var(--space) 0;
  font-size: 0.8125rem;
  line-height: 1.2;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.panel {
  padding: var(--space);
  border: 1px solid var(--line);
  background: var(--surface);
}

.stack {
  display: grid;
  gap: var(--space);
}

.button-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
  font-weight: 700;
}

.button-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

.button-primary:active {
  background: var(--accent-active);
  border-color: var(--accent-active);
}

a.button-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 16px;
  border: 1px solid var(--accent);
  text-decoration: none;
}

.muted {
  color: var(--text-muted);
}

.mono {
  font-family: var(--font-mono);
}

@media (max-width: 720px) {
  :root {
    --page-pad: 16px;
  }

  .page-header {
    flex-direction: column;
    align-items: stretch;
  }
}
