:root {
  color-scheme: light dark;
  --bg: #f5f7fb;
  --surface: #ffffff;
  --text: #182033;
  --muted: #5e687d;
  --accent: #6457e8;
  --border: #dfe4ee;
  --shadow: 0 18px 50px rgba(31, 38, 60, 0.08);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e111a;
    --surface: #171b27;
    --text: #f2f4fb;
    --muted: #adb5c7;
    --accent: #a99fff;
    --border: #2c3242;
    --shadow: none;
  }
}

* { box-sizing: border-box; }

html { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; line-height: 1.6; }

body { margin: 0; background: var(--bg); color: var(--text); }

a { color: var(--accent); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 0.14em; }
a:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; border-radius: 3px; }

.site-header { background: var(--surface); border-bottom: 1px solid var(--border); }
.site-header__inner, main, .site-footer__inner { width: min(100% - 32px, 860px); margin-inline: auto; }
.site-header__inner { display: flex; gap: 24px; align-items: center; justify-content: space-between; min-height: 68px; }
.brand { color: var(--text); font-size: 1.08rem; font-weight: 750; text-decoration: none; }
nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px 18px; }
nav a { color: var(--muted); font-size: 0.92rem; }

main { margin-block: 38px; padding: clamp(24px, 5vw, 56px); background: var(--surface); border: 1px solid var(--border); border-radius: 22px; box-shadow: var(--shadow); }
h1, h2, h3 { line-height: 1.22; letter-spacing: -0.015em; }
h1 { margin: 0 0 8px; font-size: clamp(2rem, 6vw, 3.1rem); }
h2 { margin-top: 2.1em; font-size: 1.45rem; }
h3 { margin-top: 1.5em; font-size: 1.08rem; }
p, li { max-width: 74ch; }
li + li { margin-top: 0.45em; }
.lede { color: var(--muted); font-size: 1.08rem; }
.meta { margin: 0 0 32px; color: var(--muted); font-size: 0.92rem; }
.notice { margin-block: 26px; padding: 18px 20px; border-left: 4px solid var(--accent); background: color-mix(in srgb, var(--accent) 8%, var(--surface)); border-radius: 8px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; margin-top: 30px; }
.card { display: block; padding: 20px; color: var(--text); text-decoration: none; border: 1px solid var(--border); border-radius: 14px; }
.card:hover { border-color: var(--accent); }
.card strong { display: block; margin-bottom: 6px; }
.card span { color: var(--muted); font-size: 0.94rem; }
.site-footer { padding-block: 0 36px; color: var(--muted); font-size: 0.88rem; }
.site-footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }

@media (max-width: 620px) {
  .site-header__inner { display: block; padding-block: 15px; }
  nav { justify-content: flex-start; margin-top: 8px; }
  main { width: 100%; margin-block: 0 28px; border-inline: 0; border-radius: 0 0 20px 20px; }
}

@media print {
  :root { --bg: #fff; --surface: #fff; --text: #000; --muted: #333; --border: #ccc; }
  .site-header, .site-footer { display: none; }
  main { width: 100%; margin: 0; padding: 0; border: 0; box-shadow: none; }
  a { color: inherit; }
}
