:root {  /* dark theme: the default */
  color-scheme: dark;
  --bg: #1c1a17;
  --surface: #26231f;
  --text: #ece6dc;
  --muted: #a39c90;
  --accent: #e0a458;
  --border: #3a362f;
  --error: #f2948b;
  --ok: #8fd19e;
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f7f4ee;
  --surface: #ffffff;
  --text: #1f1d1a;
  --muted: #6b655c;
  --accent: #a4561b;
  --border: #e3ddd2;
  --error: #b3261e;
  --ok: #2e6b3a;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.5;
}

a { color: inherit; }

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

/* Two rows on every screen: logo and switches, then the menu under the logo. */
.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
  max-width: 960px;
  width: 100%;
  margin: 0 auto;
  padding: 20px 16px;
}

.logo {
  display: flex;
  color: var(--accent);
  border-radius: 6px;
}

.logo svg { height: 1.5rem; width: auto; }

.nav { display: flex; gap: 8px; order: 3; flex-basis: 100%; }

.nav a, .switch a {
  text-decoration: none;
  color: var(--muted);
}

/* Fixed width, wide enough for the longest translation ("Предложить"):
   switching the language must not shift the menu items. */
.nav a { width: 7.5em; }
.nav a:first-child { width: 5.5em; }

.nav a[aria-current], .switch a[aria-current] { color: var(--text); }
.nav a[aria-current] {
  text-decoration: underline 2px var(--accent);
  text-underline-offset: 8px;
}

.switches { display: flex; gap: 12px; margin-left: auto; }

.switch { display: flex; gap: 2px; padding: 2px; border: 1px solid var(--border); border-radius: 8px; }

/* Fixed size: the bold active item must not shift its neighbours. */
.switch a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 1.75rem;
  font-size: 0.875rem;
  border-radius: 6px;
}

.switch a[aria-current] { font-weight: 600; background: var(--surface); }

.switch svg { width: 1rem; height: 1rem; }

.content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
  max-width: 760px;
  width: 100%;
  margin: 0 auto;
  padding: 32px 16px 64px;
}

.quote { margin: 0; text-align: center; }

.quote blockquote { margin: 0; }

.quote p {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.4rem, 1rem + 2vw, 2.25rem);
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.quote p::before { content: "“"; color: var(--accent); }
.quote p::after { content: "”"; color: var(--accent); }

.quote figcaption {
  margin-top: 20px;
  color: var(--muted);
  font-size: 1.05rem;
}

.quote cite {
  display: block;
  margin-top: 4px;
  font-size: 0.9rem;
  font-style: italic;
  opacity: 0.85;
}

.quote cite[hidden] { display: none; }

.button {
  display: inline-block;
  padding: 10px 22px;
  border: 1px solid var(--accent);
  border-radius: 999px;
  background: transparent;
  color: var(--accent);
  font: inherit;
  text-decoration: none;
  cursor: pointer;
}

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

.card {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
}

.card h1 { margin: 0 0 8px; font-size: 1.5rem; }

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

.notice { color: var(--ok); font-weight: 500; }

.errors { color: var(--error); padding-left: 20px; }

.form { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }

.form label { font-weight: 500; }

.form input, .form textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  margin-bottom: 8px;
}

.form textarea { resize: vertical; }

.form .button { align-self: flex-start; margin-top: 8px; }

/* Honeypot field: off-screen for people, still in the HTML for bots. */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

@media (max-width: 560px) {
  .card { padding: 20px; }
}
