/* Functional styles only — visual design comes later */

:root {
  color-scheme: light dark;

  --bg: #fbfaf8;
  --surface: #fff;
  --surface-alt: #f3f1ec;
  --text: #1b1b1b;
  --text-muted: #5a5a5a;
  --border: #ccc;
  --border-strong: #999;
  --accent: #0057a3;
  --error: #a40000;
  --disabled-bg: #e8e8e8;
  --disabled-text: #777;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16181c;
    --surface: #1e2126;
    --surface-alt: #23262c;
    --text: #e9eaec;
    --text-muted: #a3a7ad;
    --border: #3a3f47;
    --border-strong: #555b64;
    --accent: #6fb4ff;
    --error: #ff8f84;
    --disabled-bg: #2a2d33;
    --disabled-text: #797e86;
  }
}

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

body {
  margin: 0;
  font-family: system-ui, sans-serif;
  line-height: 1.5;
  padding: 1.5rem;
  background: var(--bg);
  color: var(--text);
}

main {
  max-width: 40rem;
}

h1 {
  font-size: 1.6rem;
}

.field {
  margin-bottom: 1.25rem;
}

label,
legend {
  display: block;
  margin-bottom: 0.35rem;
}

fieldset {
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.75rem 1rem 1rem;
  background: var(--surface);
}

.option {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  margin-bottom: 0.75rem;
  cursor: pointer;
}

.option input {
  margin-top: 0.25rem;
  flex-shrink: 0;
  accent-color: var(--accent);
}

input[type="text"],
textarea {
  width: 100%;
  padding: 0.5rem;
  font: inherit;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: 4px;
}

input[type="text"]:focus-visible,
textarea:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

textarea:disabled {
  background: var(--disabled-bg);
  color: var(--disabled-text);
  border-color: var(--border);
  cursor: not-allowed;
}

button {
  font: inherit;
  padding: 0.6rem 1.25rem;
  cursor: pointer;
  color: #fff;
  background: var(--accent);
  border: 1px solid transparent;
  border-radius: 4px;
}

@media (prefers-color-scheme: dark) {
  button {
    color: #10151b;
  }
}

button:hover {
  filter: brightness(1.08);
}

.status {
  min-height: 1.5em;
  margin-top: 0.75rem;
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.brev {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-top: 2.5rem;
  padding: 1rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--surface-alt);
}

.brev-ikon {
  width: 4rem;
  flex-shrink: 0;
  color: var(--text-muted);
}

.brev h2 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
}

.brev address {
  font-style: normal;
  font-weight: 600;
}

@media (max-width: 30rem) {
  .brev {
    flex-direction: column;
    align-items: flex-start;
  }
}
