@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/fonts/inter-latin.woff2") format("woff2");
}

@font-face {
  font-family: Roboto;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/fonts/roboto-latin.woff2") format("woff2");
}

html {
  color-scheme: dark;
  --bg: #0f0c15;
  --surface: #1e162b;
  --text: #f3f0f6;
  --brand: #9d65c9;
  --accent: #a31d48;
  --border: #3a2d4f;
  --on-brand: #0f0c15;
  --on-accent: #f3f0f6;
  --muted: color-mix(in srgb, var(--text) 68%, transparent);
  --font-display: Inter, sans-serif;
  --font-body: Roboto, sans-serif;
}

html[data-theme="light"] {
  color-scheme: light;
  --bg: #f7f5fa;
  --surface: #ffffff;
  --text: #201a29;
  --brand: #6b389e;
  --accent: #80153b;
  --border: #e4dcec;
  --on-brand: #f7f5fa;
  --on-accent: #f7f5fa;
}

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

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.5;
}

h1,
h2,
.brand,
.submenu {
  font-family: var(--font-display);
}

h1 {
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 0 0 1rem;
}

p {
  margin: 0 0 1rem;
}

p:last-child {
  margin-bottom: 0;
}

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

a:hover {
  text-decoration: none;
}

.top {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.site-header,
.submenu ul,
.wrap,
.site-footer {
  width: min(960px, calc(100% - 2rem));
  margin-inline: auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4rem;
}

.brand {
  color: var(--text);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.header-actions form {
  margin: 0;
}

.text-button {
  background: transparent;
  border: 0;
  color: var(--brand);
  cursor: pointer;
  font: inherit;
  padding: 0.25rem;
}

html[data-theme="dark"] .when-light,
html[data-theme="light"] .when-dark {
  display: none;
}

.submenu ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0 0 0.75rem;
}

.submenu a {
  color: var(--muted);
  font-weight: 600;
  text-decoration: none;
}

.submenu a[aria-current="page"] {
  color: var(--text);
  box-shadow: inset 0 -2px 0 var(--brand);
}

.wrap {
  flex: 1;
  padding: 2rem 0 3rem;
}

.wrap.narrow {
  width: min(32rem, calc(100% - 2rem));
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
}

.flash {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.85rem 1rem;
}

.flash-ok {
  border-color: var(--brand);
}

.flash-error {
  border-color: var(--accent);
}

form {
  display: grid;
  gap: 1rem;
}

label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.95rem;
}

input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  padding: 0.7rem 0.75rem;
}

.button {
  appearance: none;
  border: 0;
  border-radius: 8px;
  background: var(--brand);
  color: var(--on-brand);
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  padding: 0.75rem 1rem;
  width: fit-content;
}

.button-accent {
  background: var(--accent);
  color: var(--on-accent);
}

.help,
.checklist {
  color: var(--muted);
  font-size: 0.95rem;
}

.error-list {
  color: var(--accent);
  margin: 0 0 1rem;
  padding-left: 1.2rem;
}

.checklist {
  margin: 0 0 1rem;
  padding-left: 1.2rem;
}

.form-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  margin-top: 1rem;
}

.static-value {
  margin: 0;
  font-weight: 600;
}

.site-footer {
  padding: 1.25rem 0 1.75rem;
  color: var(--muted);
  font-size: 0.95rem;
}

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