:root {
  color-scheme: light;
  --bg: #f5efe6;
  --panel: #fffdf8;
  --panel-soft: #f1e7d7;
  --text: #2d241d;
  --muted: #6f6054;
  --line: #d8c5ad;
  --accent: #8e4820;
  --accent-dark: #6f3214;
  --shadow: 0 12px 34px rgba(70, 45, 24, 0.09);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", Arial, Helvetica, sans-serif;
  line-height: 1.7;
}

a {
  color: var(--accent-dark);
  text-underline-offset: 3px;
}

a:focus-visible {
  outline: 3px solid rgba(142, 72, 32, 0.3);
  outline-offset: 4px;
}

.site-header {
  border-bottom: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.96);
}

.header-inner,
.page-shell,
.footer-inner {
  width: min(calc(100% - 32px), 920px);
  margin-inline: auto;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.brand-mark {
  display: block;
  width: 58px;
  height: 42px;
  object-fit: contain;
}

.header-link {
  font-size: 0.95rem;
  font-weight: 650;
}

.page-shell {
  padding-block: 34px 64px;
}

.breadcrumbs {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 0.92rem;
}

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.breadcrumbs li:not(:last-child)::after {
  margin-left: 8px;
  color: #a58f7c;
  content: "/";
}

.hero,
.content-card,
.lesson-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.hero {
  display: flex;
  min-height: clamp(320px, 36vw, 410px);
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  overflow: hidden;
  padding: clamp(28px, 6vw, 54px);
  border-color: rgba(196, 151, 88, 0.5);
  background-color: #071a36;
  background-image:
    linear-gradient(90deg, rgba(3, 15, 36, 0.97) 0%, rgba(3, 15, 36, 0.88) 44%, rgba(3, 15, 36, 0.48) 72%, rgba(3, 15, 36, 0.16) 100%),
    url("/an-sao-intro.webp");
  background-position: center, center;
  background-repeat: no-repeat;
  background-size: cover;
  box-shadow: 0 18px 42px rgba(15, 31, 55, 0.22);
}

.hero .eyebrow {
  color: #e9b96f;
}

.hero h1 {
  max-width: 640px;
  color: #fffdf8;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.34);
}

.hero .lead {
  max-width: 640px;
  color: rgba(245, 248, 255, 0.92);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.34);
}

.hero .cta {
  background: #a95b27;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.28);
}

.hero .cta:hover {
  background: #c16d31;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2 {
  line-height: 1.25;
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 6vw, 3.6rem);
  letter-spacing: -0.035em;
}

h2 {
  margin: 0 0 12px;
  font-size: clamp(1.25rem, 3vw, 1.65rem);
}

.lead {
  max-width: 720px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1.08rem;
}

.lesson-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 24px;
}

.lesson-card,
.content-card {
  padding: 26px;
}

.lesson-card p,
.content-card p {
  margin: 0;
}

.lesson-card a {
  display: inline-block;
  margin-top: 18px;
  font-weight: 750;
}

.content-stack {
  display: grid;
  gap: 20px;
  margin-top: 24px;
}

.note {
  border-left: 4px solid var(--accent);
  background: var(--panel-soft);
  box-shadow: none;
}

.cta {
  display: flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  max-width: 100%;
  margin: 24px auto 0;
  padding: 12px 18px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-weight: 750;
  text-align: center;
  text-decoration: none;
}

.cta:hover {
  background: var(--accent-dark);
}

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--panel-soft);
  color: var(--muted);
}

.footer-inner {
  padding-block: 24px;
  font-size: 0.92rem;
}

.footer-inner p {
  margin: 0;
}

@media (max-width: 680px) {
  .hero {
    min-height: 390px;
    padding: 32px 24px;
    align-items: stretch;
    background-image:
      linear-gradient(rgba(3, 15, 36, 0.78), rgba(3, 15, 36, 0.88)),
      url("/an-sao-intro-mobile.webp");
    background-position: center, 68% center;
  }

  .hero .eyebrow,
  .hero h1,
  .hero .lead {
    text-align: center;
  }

  .hero .lead {
    margin-inline: auto;
  }

  .lesson-grid {
    grid-template-columns: 1fr;
  }

  .header-inner {
    min-height: 60px;
  }

  .brand-mark {
    width: 44px;
    height: 34px;
  }

  .page-shell {
    padding-top: 24px;
  }
}
