@font-face {
  font-family: Poppins;
  src: url("/fonts/Poppins-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: Poppins;
  src: url("/fonts/Poppins-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: Poppins;
  src: url("/fonts/Poppins-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: Poppins;
  src: url("/fonts/Poppins-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --navy: #0b1028;
  --navy-mid: #12183e;
  --ink: #13172e;
  --muted: #4b4f69;
  --magenta: #e91e84;
  --magenta-dark: #b9156a;
  --violet: #7b47c6;
  --line: #c9cde0;
  --line-soft: #e6e8ec;
  --surface: #fafafd;
  --surface-low: #f5f6fc;
  --white: #ffffff;
  --shadow: 0 2px 8px rgba(11, 16, 40, 0.06);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: Poppins, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.65;
}

img { max-width: 100%; height: auto; }

a { color: var(--magenta-dark); }

.skip {
  position: absolute;
  left: 12px;
  top: -40px;
  background: var(--white);
  color: var(--navy);
  padding: 8px 12px;
  border-radius: 8px;
  z-index: 20;
}
.skip:focus { top: 12px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  padding: 10px 24px;
  background: var(--white);
  border-bottom: 1px solid var(--line-soft);
}

.brand img { display: block; height: 28px; width: auto; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-links a,
.nav-more a {
  color: rgba(0, 0, 0, 0.87);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 8px 10px;
  border-radius: 8px;
}

.nav-links a:hover,
.nav-more a:hover { background: var(--surface-low); }

.nav-more { display: none; position: relative; }

.nav-more summary {
  list-style: none;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--white);
}

.nav-more summary::-webkit-details-marker { display: none; }

.nav-more-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: 220px;
  padding: 8px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.nav-more-panel a { display: block; }

.btn {
  display: inline-block;
  background: var(--magenta);
  color: var(--white) !important;
  font-weight: 600;
  font-size: 14px;
  line-height: 1.2;
  padding: 12px 24px;
  border-radius: 8px;
  text-decoration: none !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.16);
}

.btn:hover { background: var(--magenta-dark); }

.btn-small { padding: 10px 18px; }

.btn-secondary {
  background: var(--white);
  color: var(--navy) !important;
  border: 1px solid var(--line);
  box-shadow: none;
}

.btn-secondary:hover { background: var(--surface-low); }

.wrap {
  width: min(760px, calc(100% - 32px));
  margin: 0 auto;
}

.article-grid {
  width: min(1080px, calc(100% - 40px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 720px) 240px;
  gap: 40px;
  align-items: start;
  justify-content: center;
}

.toc-rail {
  position: sticky;
  top: 88px;
  margin-top: 28px;
}

.toc-inline { display: none; }

.toc h2 {
  margin: 0 0 10px;
  font-size: 16px;
  line-height: 1.3;
  font-weight: 700;
  color: var(--navy);
}

.toc ul {
  margin: 0;
  padding-left: 1.15rem;
}

.toc li {
  margin: 0.45rem 0;
}

.toc a {
  color: var(--ink);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.4;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.toc a:hover { color: var(--magenta-dark); }

.wrap-wide {
  width: min(1040px, calc(100% - 32px));
  margin: 0 auto;
}

.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 28px 0 16px;
  color: var(--muted);
  font-size: 14px;
}

.crumbs a { color: var(--muted); text-decoration: none; font-weight: 500; }
.crumbs a:hover { color: var(--magenta-dark); }

.kicker {
  margin: 0 0 8px;
  color: var(--magenta);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

h1 {
  margin: 0 0 12px;
  font-size: 40px;
  line-height: 1.15;
  letter-spacing: -0.4px;
  font-weight: 700;
  color: var(--navy);
}

.meta {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 14px;
}

.hero-figure { margin: 0 0 28px; }

.hero-figure img {
  display: block;
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--line-soft);
  background: var(--navy);
}

.prose h2 {
  margin: 2.2rem 0 0.6rem;
  font-size: 24px;
  line-height: 1.25;
  font-weight: 600;
  color: var(--navy);
  scroll-margin-top: 84px;
}

.prose h3 {
  margin: 1.4rem 0 0.4rem;
  font-size: 18px;
  line-height: 1.35;
  font-weight: 600;
  color: var(--magenta-dark);
}

.prose p { margin: 0 0 1rem; }

.prose ul,
.prose ol { margin: 0 0 1rem; padding-left: 1.25rem; }

.prose li { margin: 0.35rem 0; }

.prose a { font-weight: 600; text-underline-offset: 2px; }

.prose strong { font-weight: 600; }

.note,
.cta,
.card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.note {
  margin: 1.25rem 0;
  padding: 16px 18px;
  background: var(--surface-low);
}

.note p:last-child { margin-bottom: 0; }

.cta {
  margin: 2.5rem 0 1rem;
  padding: 28px 24px;
  background: var(--navy);
  color: #f2f4ff;
  border-color: transparent;
}

.cta h2 {
  margin: 0 0 8px;
  color: var(--white);
  font-size: 24px;
}

.cta p { margin: 0 0 16px; color: rgba(242, 244, 255, 0.86); }

.cta .actions { display: flex; flex-wrap: wrap; gap: 10px; }

.related { margin: 12px 0 56px; }

.related h2 {
  margin: 0 0 14px;
  font-size: 24px;
  color: var(--navy);
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.card {
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
}

.card:hover { border-color: var(--violet); }

.card img { width: 100%; aspect-ratio: 1200 / 630; object-fit: cover; display: block; }

.card-body { padding: 14px 14px 16px; }

.card h3 {
  margin: 0 0 6px;
  font-size: 16px;
  line-height: 1.35;
  color: var(--navy);
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.page-intro {
  margin: 0 0 28px;
  font-size: 18px;
  color: var(--muted);
}

.guide-list {
  display: grid;
  gap: 14px;
  margin-bottom: 48px;
}

.guide-row {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 16px;
  padding: 12px;
  text-decoration: none;
  color: inherit;
}

.guide-row img {
  width: 100%;
  aspect-ratio: 1200 / 630;
  object-fit: cover;
  border-radius: 8px;
}

.guide-row h2 {
  margin: 0 0 6px;
  font-size: 20px;
  line-height: 1.3;
  color: var(--navy);
}

.guide-row p { margin: 0; color: var(--muted); font-size: 15px; }

.site-footer {
  background: var(--navy);
  color: rgba(255, 255, 255, 0.7);
  padding: 36px 24px 28px;
}

.footer-inner { width: min(1040px, 100%); margin: 0 auto; }

.footer-logo img { height: 32px; width: auto; }

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin: 16px 0;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-size: 14px;
}

.footer-links a:hover { color: var(--white); }

.copyright { margin: 8px 0 0; font-size: 12px; }

@media (max-width: 900px) {
  .article-grid {
    grid-template-columns: minmax(0, 760px);
    width: min(760px, calc(100% - 32px));
  }
  .toc-rail { display: none; }
  .toc-inline {
    display: block;
    margin: 0 0 8px;
  }
}

@media (max-width: 800px) {
  h1 { font-size: 28px; }
  .nav-links { display: none; }
  .nav-more { display: block; }
  .related-grid,
  .guide-row { grid-template-columns: 1fr; }
  .site-header { padding: 10px 16px; }
}
