:root {
  --ink: #173a4d;
  --ink-2: #315668;
  --cream: #f7f2e8;
  --paper: #fffdf8;
  --coral: #ed6a5a;
  --sun: #f4bf3a;
  --mint: #72b8a3;
  --sky: #6aa9c8;
  --violet: #8879ad;
  --line: #d9d4c8;
  --shadow: 0 18px 48px rgba(23, 58, 77, .12);
  --radius: 20px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: var(--cream);
  font-family: "Avenir Next", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.75;
}
a { color: inherit; }
.paper-texture {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .22;
  background-image: radial-gradient(#173a4d .55px, transparent .55px);
  background-size: 8px 8px;
}
.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 100;
  padding: 9px 13px;
  color: #fff;
  background: var(--ink);
  border-radius: 8px;
  transform: translateY(-140%);
}
.skip-link:focus { transform: translateY(0); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  min-height: 76px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 10px clamp(18px, 5vw, 76px);
  border-bottom: 1px solid rgba(23, 58, 77, .14);
  background: rgba(247, 242, 232, .94);
  backdrop-filter: blur(10px);
}
.guide-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.guide-brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: var(--cream);
  background: var(--ink);
  border-radius: 12px 12px 12px 4px;
  font: 900 24px/1 Georgia, serif;
  transform: rotate(-3deg);
}
.guide-brand strong,
.guide-brand small { display: block; }
.guide-brand strong { font-size: 18px; letter-spacing: .06em; }
.guide-brand small { margin-top: 1px; color: var(--ink-2); font-size: 10px; letter-spacing: .08em; }
.header-actions { display: flex; align-items: center; gap: 9px; }
.header-actions a {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  padding: 0 14px;
  border: 1px solid rgba(23, 58, 77, .2);
  border-radius: 12px;
  background: rgba(255, 253, 248, .76);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}
.header-actions .header-play { color: #fff; background: var(--ink); border-color: var(--ink); }
.header-actions a:hover { transform: translateY(-1px); }

.breadcrumb {
  display: flex;
  max-width: 1160px;
  align-items: center;
  gap: 9px;
  margin: 0 auto;
  padding: 24px clamp(20px, 4vw, 48px) 0;
  color: var(--ink-2);
  font-size: 13px;
}
.breadcrumb a { text-underline-offset: 4px; }
.breadcrumb strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.guide-article { max-width: 1160px; margin: 0 auto; padding: 26px clamp(20px, 4vw, 48px) 76px; }

.article-hero {
  display: grid;
  min-height: 510px;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, .85fr);
  align-items: center;
  gap: clamp(34px, 7vw, 86px);
  padding: 42px 0 66px;
}
.eyebrow,
.section-kicker {
  margin: 0 0 9px;
  color: var(--coral);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .17em;
  line-height: 1.4;
  text-transform: uppercase;
}
.article-hero h1,
.hub-hero h1 {
  margin: 0;
  font-size: clamp(46px, 6.8vw, 82px);
  font-weight: 900;
  letter-spacing: -.055em;
  line-height: 1.02;
}
.article-hero h1 > span { display: block; margin-bottom: 18px; font-size: .72em; line-height: 1; }
.article-hero h1 em,
.hub-hero h1 em { display: block; color: var(--coral); font-family: Georgia, "Songti SC", serif; font-style: normal; font-weight: 700; }
.lead { max-width: 650px; margin: 24px 0 18px; color: var(--ink-2); font-size: 18px; line-height: 1.8; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 8px; }
.hero-meta span {
  padding: 7px 11px;
  border: 1px solid rgba(23, 58, 77, .16);
  border-radius: 999px;
  background: rgba(255, 253, 248, .76);
  font-size: 12px;
  font-weight: 800;
}
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; margin-top: 28px; }
.primary-cta {
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  padding: 0 20px;
  color: #fff;
  background: var(--ink);
  border-radius: 13px;
  box-shadow: 0 7px 0 #0d2937;
  font-weight: 900;
  text-decoration: none;
  transition: .15s ease;
}
.primary-cta:hover { transform: translateY(-2px); box-shadow: 0 9px 0 #0d2937; }
.primary-cta span { margin-left: 18px; color: var(--sun); }
.secondary-cta { font-weight: 800; text-underline-offset: 5px; }
.access-note { display: block; margin-top: 17px; color: #667d85; line-height: 1.55; }
.hero-poster {
  position: relative;
  display: grid;
  width: min(390px, 90vw);
  aspect-ratio: 1;
  place-items: center;
  justify-self: center;
  overflow: hidden;
  border: 2px solid var(--ink);
  border-radius: 44% 56% 48% 52%;
  color: #fff;
  background: var(--ink);
  box-shadow: 16px 16px 0 var(--sun);
  transform: rotate(2deg);
}
.hero-poster::before {
  position: absolute;
  inset: 18px;
  border: 1px dashed rgba(255, 255, 255, .27);
  border-radius: 50%;
  content: "";
}
.hero-poster > span { z-index: 1; font-size: clamp(86px, 14vw, 150px); filter: drop-shadow(0 12px 12px rgba(0, 0, 0, .18)); }
.hero-poster b { position: absolute; top: 21px; right: 34px; color: rgba(255, 255, 255, .12); font: 800 100px/1 Georgia, serif; }
.hero-poster small { position: absolute; bottom: 34px; left: 50%; z-index: 1; padding: 7px 13px; border-radius: 999px; color: var(--ink); background: var(--sun); font-weight: 900; transform: translateX(-50%) rotate(-2deg); white-space: nowrap; }

.content-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 22px; margin: 26px 0 74px; }
.prose-block,
.prep-card {
  padding: clamp(24px, 4vw, 42px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
}
.prose-block { border-top: 8px solid var(--coral); }
.prep-card { color: #fff; background: var(--ink); border-color: var(--ink); box-shadow: 9px 9px 0 var(--mint); }
.prep-card > span { font-size: 38px; }
.prose-block h2,
.prep-card h2,
.section-heading h2,
.example-section h2,
.bottom-cta h2 { margin: 0; font-size: clamp(26px, 3vw, 36px); letter-spacing: -.03em; line-height: 1.24; }
.prose-block p:last-child,
.prep-card p,
.example-section p:last-child { margin: 15px 0 0; color: var(--ink-2); }
.prep-card p { color: #d2e0e5; }

.rule-section,
.steps-section,
.tips-section,
.faq-section,
.related-section { margin: 74px 0; scroll-margin-top: 98px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.section-heading > p { max-width: 370px; margin: 0; color: var(--ink-2); font-size: 14px; text-align: right; }
.section-heading > a { color: var(--coral); font-weight: 900; text-underline-offset: 5px; }
.rule-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 13px; margin: 0; padding: 0; counter-reset: rules; list-style: none; }
.rule-grid li {
  position: relative;
  min-height: 190px;
  padding: 62px 20px 22px;
  overflow: hidden;
  border: 1px solid rgba(23, 58, 77, .17);
  border-radius: 17px;
  background: var(--paper);
  color: var(--ink-2);
  font-size: 14px;
  counter-increment: rules;
}
.rule-grid li::before { position: absolute; top: 13px; left: 18px; color: var(--coral); content: "0" counter(rules); font: italic 800 29px/1 Georgia, serif; }
.rule-grid li::after { position: absolute; right: -15px; bottom: -23px; width: 70px; height: 70px; border-radius: 50%; background: var(--sun); content: ""; opacity: .28; }

.step-list { margin: 0; padding: 0; border-top: 2px solid var(--ink); list-style: none; }
.step-list li { display: grid; grid-template-columns: 74px minmax(0, 1fr); align-items: start; border-bottom: 1px solid var(--line); }
.step-list span { padding: 22px 0; color: var(--coral); font: italic 800 30px/1 Georgia, serif; }
.step-list p { margin: 0; padding: 20px 0; color: var(--ink-2); font-size: 17px; }

.example-section {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 23px;
  align-items: start;
  margin: 74px 0;
  padding: clamp(26px, 5vw, 48px);
  border: 2px solid var(--ink);
  border-radius: 23px;
  background: var(--sun);
  box-shadow: 10px 10px 0 var(--ink);
}
.example-icon { display: grid; width: 64px; height: 64px; place-items: center; border: 2px solid var(--ink); border-radius: 17px; background: var(--paper); font-size: 32px; transform: rotate(-3deg); }
.example-section .section-kicker { color: #97483d; }
.example-section p:last-child { color: var(--ink); font-size: 17px; }

.tips-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0; padding: 0; list-style: none; }
.tips-grid li { position: relative; padding: 19px 20px 19px 52px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255, 253, 248, .86); color: var(--ink-2); }
.tips-grid li::before { position: absolute; top: 19px; left: 19px; display: grid; width: 22px; height: 22px; place-items: center; border-radius: 7px; color: #fff; background: var(--mint); content: "✓"; font-size: 13px; font-weight: 900; }

.faq-list { border-top: 2px solid var(--ink); }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list summary { position: relative; padding: 20px 48px 20px 0; cursor: pointer; font-size: 17px; font-weight: 900; list-style: none; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { position: absolute; top: 18px; right: 6px; content: "+"; color: var(--coral); font: 800 26px/1 Georgia, serif; }
.faq-list details[open] summary::after { content: "−"; }
.faq-list details p { max-width: 850px; margin: -5px 0 20px; color: var(--ink-2); }

.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.related-card { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; padding: 18px; border: 1px solid var(--line); border-radius: 15px; background: var(--paper); text-decoration: none; transition: .18s ease; }
.related-card > span { display: grid; width: 48px; height: 48px; place-items: center; border: 2px solid var(--ink); border-radius: 13px; background: var(--sun); font-size: 24px; box-shadow: 3px 3px 0 var(--ink); }
.related-card small,
.related-card strong { display: block; }
.related-card small { color: var(--ink-2); font-size: 10px; }
.related-card strong { margin-top: 2px; }
.related-card > b { color: var(--coral); font-size: 22px; }
.related-card:hover { border-color: var(--ink); transform: translateY(-3px); }

.bottom-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  margin-top: 84px;
  padding: clamp(28px, 5vw, 48px);
  border-radius: 23px;
  color: #fff;
  background: var(--ink);
  box-shadow: 10px 10px 0 var(--sun);
}
.bottom-cta p:last-child { margin: 9px 0 0; color: #c6d6dc; }
.primary-cta.light { flex: 0 0 auto; color: var(--ink); background: var(--paper); box-shadow: 0 7px 0 var(--mint); }
.primary-cta.light:hover { box-shadow: 0 9px 0 var(--mint); }
.updated { margin: 28px 0 0; color: #76898f; font-size: 12px; text-align: center; }

.guide-footer { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 34px clamp(20px, 5vw, 76px); border-top: 1px solid rgba(23, 58, 77, .14); background: var(--paper); }
.guide-footer strong { font-size: 18px; }
.guide-footer p { margin: 2px 0 0; color: var(--ink-2); font-size: 12px; }
.guide-footer nav { display: flex; flex-wrap: wrap; gap: 18px; }
.guide-footer a { color: var(--ink-2); font-size: 13px; font-weight: 800; text-underline-offset: 4px; }

/* Tutorial hub */
.hub-hero { display: grid; max-width: 1160px; min-height: 570px; grid-template-columns: 1.08fr .92fr; align-items: center; gap: clamp(36px, 7vw, 90px); margin: 0 auto; padding: 68px clamp(20px, 4vw, 48px); }
.hub-hero > div:first-child > p:not(.eyebrow) { max-width: 610px; margin: 24px 0 0; color: var(--ink-2); font-size: 17px; }
.hub-visual { display: grid; width: min(390px, 88vw); aspect-ratio: 1; place-items: center; align-content: center; justify-self: center; border: 2px solid var(--ink); border-radius: 50%; color: #fff; background: var(--ink); box-shadow: 16px 16px 0 var(--mint); transform: rotate(2deg); }
.hub-visual b { color: var(--sun); font: 800 clamp(100px, 15vw, 160px)/.9 Georgia, serif; }
.hub-visual span { margin-top: 9px; font-size: 22px; font-weight: 900; }
.hub-visual i { margin-top: 13px; color: #bfd2da; font-size: 11px; font-style: normal; letter-spacing: .1em; }
.hub-intro { display: grid; max-width: 1060px; grid-template-columns: repeat(3, 1fr); gap: 0; margin: 0 auto 96px; padding: 25px 30px; border-radius: 20px; color: #fff; background: var(--ink); box-shadow: 9px 9px 0 var(--sun); }
.hub-intro > div { display: grid; grid-template-columns: 43px 1fr; gap: 11px; padding: 8px 20px; border-right: 1px dashed rgba(255, 255, 255, .25); }
.hub-intro > div:last-child { border-right: 0; }
.hub-intro b { color: var(--sun); font: italic 800 28px/1 Georgia, serif; }
.hub-intro strong,
.hub-intro small { display: block; }
.hub-intro small { margin-top: 3px; color: #bfd2da; }
.hub-guides { max-width: 1280px; margin: 0 auto; padding: 0 clamp(20px, 4vw, 48px) 60px; }
.hub-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; }
.hub-card a { display: flex; min-height: 300px; flex-direction: column; padding: 20px; overflow: hidden; border: 1px solid rgba(23, 58, 77, .17); border-radius: 18px; background: var(--paper); box-shadow: 0 4px 0 rgba(23, 58, 77, .08); text-decoration: none; transition: .2s ease; }
.hub-card a:hover { border-color: var(--ink); box-shadow: 0 10px 0 var(--sun); transform: translateY(-5px); }
.hub-card-top { display: flex; align-items: start; justify-content: space-between; }
.hub-card-top b { color: rgba(23, 58, 77, .12); font: 800 43px/1 Georgia, serif; }
.hub-icon { display: grid; width: 54px; height: 54px; place-items: center; border: 2px solid var(--ink); border-radius: 15px; background: var(--sun); box-shadow: 4px 4px 0 var(--ink); font-size: 27px; }
.hub-card a > small { margin-top: 23px; color: var(--coral); font-size: 10px; font-weight: 900; letter-spacing: .05em; }
.hub-card h2 { margin: 5px 0 7px; font-size: 20px; line-height: 1.35; }
.hub-card p { flex: 1; margin: 0; color: var(--ink-2); font-size: 13px; line-height: 1.65; }
.hub-card a > strong { margin-top: 15px; padding-top: 12px; border-top: 1px dashed var(--line); font-size: 12px; }
.hub-card a > strong span { float: right; color: var(--coral); font-size: 17px; }
.hub-bottom { max-width: 1060px; margin: 40px auto 96px; }

a:focus-visible,
summary:focus-visible { outline: 4px solid var(--sun); outline-offset: 3px; }

@media (max-width: 1000px) {
  .rule-grid { grid-template-columns: 1fr 1fr; }
  .hub-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 760px) {
  .site-header { min-height: 66px; }
  .guide-brand small { display: none; }
  .header-actions a:first-child { display: none; }
  .article-hero,
  .hub-hero { min-height: auto; grid-template-columns: 1fr; padding-top: 44px; }
  .article-hero { padding-bottom: 52px; }
  .hero-poster,
  .hub-visual { width: min(310px, 82vw); }
  .content-grid { grid-template-columns: 1fr; }
  .section-heading { align-items: start; flex-direction: column; gap: 7px; }
  .section-heading > p { text-align: left; }
  .related-grid { grid-template-columns: 1fr; }
  .bottom-cta { align-items: stretch; flex-direction: column; }
  .primary-cta.light { justify-content: center; }
  .hub-intro { grid-template-columns: 1fr; margin-right: 20px; margin-left: 20px; }
  .hub-intro > div { border-right: 0; border-bottom: 1px dashed rgba(255, 255, 255, .25); }
  .hub-intro > div:last-child { border-bottom: 0; }
  .hub-grid { grid-template-columns: 1fr 1fr; }
  .guide-footer { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 520px) {
  .site-header { padding-right: 14px; padding-left: 14px; }
  .guide-brand strong { font-size: 16px; }
  .guide-brand-mark { width: 38px; height: 38px; }
  .header-actions a { min-height: 38px; padding: 0 11px; font-size: 12px; }
  .breadcrumb { padding-top: 18px; }
  .guide-article { padding-right: 17px; padding-left: 17px; }
  .article-hero h1,
  .hub-hero h1 { font-size: 43px; }
  .hero-poster { width: 260px; }
  .hero-poster > span { font-size: 92px; }
  .hero-poster b { font-size: 72px; }
  .hero-actions { align-items: stretch; flex-direction: column; }
  .primary-cta { justify-content: center; }
  .secondary-cta { text-align: center; }
  .rule-grid,
  .tips-grid,
  .hub-grid { grid-template-columns: 1fr; }
  .rule-grid li { min-height: 0; }
  .step-list li { grid-template-columns: 54px minmax(0, 1fr); }
  .example-section { grid-template-columns: 1fr; }
  .hub-card a { min-height: 255px; }
  .hub-visual { width: 260px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
