:root {
  --bg: #f7f8fa;
  --surface: #ffffff;
  --text: #1f2430;
  --muted: #5b6475;
  --accent: #2c6faf;
  --accent-dark: #1f5389;
  --border: #e3e7ee;
  --radius: 14px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15181e;
    --surface: #1e2228;
    --text: #e8ebf0;
    --muted: #a3acbb;
    --accent: #6ea8e0;
    --accent-dark: #8dbbe8;
    --border: #2d333c;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

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

.wrap {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 14px;
  padding-bottom: 14px;
  flex-wrap: wrap;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  font-size: 18px;
}
.brand img { width: 28px; height: 28px; }
.nav { display: flex; gap: 18px; }
.nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--accent); }

/* Main */
main { flex: 1; padding: 48px 0 64px; }

h1 { font-size: 2.1rem; line-height: 1.2; margin: 0 0 12px; }
h2 { font-size: 1.35rem; margin: 40px 0 10px; }
h3 { font-size: 1.1rem; margin: 26px 0 6px; }
p, ul { margin: 0 0 16px; }
ul { padding-left: 22px; }
li { margin-bottom: 6px; }

.lead { font-size: 1.1rem; color: var(--muted); }
.muted { color: var(--muted); }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  margin-top: 32px;
}
.card h2 { margin-top: 0; }

.buttons { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 20px; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 10px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); color: #fff; }
.btn-disabled {
  background: transparent;
  color: var(--muted);
  border-color: var(--border);
  cursor: default;
}

.note {
  background: rgba(44, 111, 175, 0.08);
  border-left: 3px solid var(--accent);
  padding: 12px 16px;
  border-radius: 6px;
}

.check {
  background: #fff3c4;
  color: #6b4e00;
  padding: 0 4px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.9em;
}

details {
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
}
summary { cursor: pointer; font-weight: 600; }
details p { margin: 10px 0 0; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  font-size: 0.92rem;
  color: var(--muted);
}
.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 20px;
  padding-bottom: 20px;
}
.site-footer nav { display: flex; gap: 16px; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--accent); }

@media (max-width: 560px) {
  body { font-size: 16px; }
  h1 { font-size: 1.7rem; }
  main { padding: 32px 0 48px; }
  .card { padding: 20px; }
}
