/* Общие стили для всего сайта: цвета, тема, шапка. */
:root {
  --bg: #f5f4f0;
  --surface: #ffffff;
  --surface-2: #efede7;
  --text: #1d1d1b;
  --muted: #6b6a65;
  --border: #dcd9d0;
  --border-strong: #2b2a27;
  --accent: #2f6fde;
  --accent-soft: #dce8fd;
  --accent-softer: #edf3fe;
  --same: #c5d8fb;
  --danger: #d23b3b;
  --danger-soft: #fbe3e3;
  --ok: #1f9d55;
  --on-accent: #ffffff;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(0,0,0,.05), 0 4px 16px rgba(0,0,0,.06);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #141517;
    --surface: #1d1f22;
    --surface-2: #26282c;
    --text: #ececea;
    --muted: #9a9a96;
    --border: #34373c;
    --border-strong: #8d9097;
    --accent: #6c9ef8;
    --accent-soft: #24365a;
    --accent-softer: #1d2638;
    --same: #2f4a7d;
    --danger: #f06c6c;
    --danger-soft: #4a2426;
    --ok: #4cc983;
    --on-accent: #0b1730;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 4px 16px rgba(0,0,0,.25);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #141517;
  --surface: #1d1f22;
  --surface-2: #26282c;
  --text: #ececea;
  --muted: #9a9a96;
  --border: #34373c;
  --border-strong: #8d9097;
  --accent: #6c9ef8;
  --accent-soft: #24365a;
  --accent-softer: #1d2638;
  --same: #2f4a7d;
  --danger: #f06c6c;
  --danger-soft: #4a2426;
  --ok: #4cc983;
  --on-accent: #0b1730;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 4px 16px rgba(0,0,0,.25);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
a { color: inherit; }
button { font: inherit; color: inherit; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 1080px;
  margin: 0 auto;
  padding: 14px 16px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.01em;
}
.brand-mark {
  width: 30px; height: 30px;
  border-radius: 9px;
  background: var(--text);
  color: var(--bg);
  display: grid; place-items: center;
  font-size: 15px;
}
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 38px;
  min-width: 38px;
  padding: 0 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.icon-btn:hover { background: var(--surface-2); }
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn:focus-visible, button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
