@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root{
  --coral:#EF5B6B;
  --yellow:#FFC94A;
  --ink:#1F2430;
  --paper:#FBF6EE;
  --soft:#5C636F;
  --line:#E3DACB;
  --white:#FFFFFF;
}

*,*::before,*::after{box-sizing:border-box}

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

body{
  margin:0;
  background:var(--paper);
  color:var(--ink);
  font-family:'Inter',system-ui,-apple-system,'Segoe UI','PingFang SC','Hiragino Sans GB','Microsoft YaHei',sans-serif;
  font-size:17px;
  line-height:1.72;
  font-weight:400;
}

a{color:inherit}
img{display:block;max-width:100%;height:auto}

a:focus-visible,
button:focus-visible{outline:3px solid var(--coral);outline-offset:2px}

/* ---------- top bar ---------- */
.topbar{
  position:sticky;
  top:0;
  z-index:60;
  display:grid;
  grid-template-columns:1fr auto 1fr;
  grid-template-areas:"strip strip strip" "left brand right";
  align-items:center;
  column-gap:20px;
  background:var(--paper);
  border-bottom:2px solid var(--ink);
}

.strip{
  grid-area:strip;
  margin:0;
  padding:7px 24px;
  background:var(--ink);
  color:var(--yellow);
  font-size:16px;
  font-weight:500;
  line-height:1.4;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.brand{
  grid-area:brand;
  justify-self:center;
  display:inline-flex;
  align-items:center;
  gap:10px;
  padding:10px 6px;
  text-decoration:none;
  color:var(--ink);
  font-size:22px;
  font-weight:700;
  letter-spacing:-.015em;
}

.brand-mark{width:28px;height:28px;border-radius:4px}

.menu-left{grid-area:left;justify-self:end}
.menu-right{grid-area:right;justify-self:start}

.menu ul{
  display:flex;
  align-items:center;
  gap:2px;
  margin:0;
  padding:0;
  list-style:none;
}

.menu a{
  display:inline-flex;
  align-items:center;
  min-height:44px;
  padding:0 11px;
  border-radius:4px;
  text-decoration:none;
  font-size:16px;
  font-weight:500;
  transition:background-color 160ms ease,color 160ms ease;
}

.menu a:hover{background:var(--yellow)}

.burger{
  display:none;
  grid-area:burger;
  justify-self:end;
  min-height:44px;
  padding:0 15px;
  margin-right:20px;
  border:0;
  border-radius:4px;
  background:var(--ink);
  color:var(--paper);
  font:inherit;
  font-size:16px;
  font-weight:600;
  cursor:pointer;
  transition:background-color 160ms ease;
}

.burger:hover{background:var(--coral)}

/* ---------- hero ---------- */
.hero{
  max-width:1180px;
  margin:0 auto;
  padding:44px 24px 60px;
  display:grid;
  grid-template-columns:1.08fr .92fr;
  gap:44px;
  align-items:center;
  min-height:70vh;
}

.hero h1{
  margin:0;
  font-size:clamp(2rem,4.6vw,3.4rem);
  line-height:1.14;
  letter-spacing:-.025em;
  font-weight:700;
}

.hero h1::after{
  content:"";
  display:block;
  width:92px;
  height:10px;
  margin-top:22px;
  background:var(--yellow);
}

.lede{
  margin:22px 0 0;
  max-width:44ch;
  color:var(--soft);
}

.hero-art{
  position:relative;
  margin:0;
  border:2px solid var(--ink);
  border-radius:10px;
  background:var(--white);
  box-shadow:12px 12px 0 rgba(255,201,74,.92);
  will-change:transform;
}

.hero-art .hero-svg,
.hero-art .hero-img{
  display:block;
  width:100%;
  height:auto;
  border-radius:8px;
}

.badge{
  position:absolute;
  left:-14px;
  bottom:18px;
  padding:8px 16px;
  border-radius:4px;
  background:var(--coral);
  color:var(--white);
  font-size:16px;
  font-weight:600;
  letter-spacing:.02em;
  transform:rotate(-3deg);
}

/* ---------- body split ---------- */
.split{
  max-width:1180px;
  margin:0 auto;
  padding:0 24px 84px;
  display:grid;
  grid-template-columns:minmax(0,1fr) 272px;
  gap:56px;
  align-items:start;
}

.prose{min-width:0}

.prose article{
  scroll-margin-top:130px;
  padding:48px 0;
  border-top:2px solid var(--line);
}

.prose article:first-child{border-top:0;padding-top:6px}

.prose h2{
  margin:0 0 18px;
  font-size:clamp(1.4rem,2.4vw,1.85rem);
  line-height:1.28;
  letter-spacing:-.02em;
  font-weight:700;
}

.prose h3{
  margin:30px 0 12px;
  font-size:1.16rem;
  line-height:1.4;
  font-weight:600;
}

.prose small{
  display:block;
  margin-bottom:6px;
  color:var(--coral);
  font-size:16px;
  font-weight:600;
  letter-spacing:.16em;
}

.prose p{margin:0 0 18px}
.prose p:last-child{margin-bottom:0}

.prose ul,
.prose ol{margin:0 0 18px;padding-left:24px}
.prose li{margin:0 0 8px}
.prose li::marker{color:var(--coral)}

.prose a{
  color:var(--coral);
  text-decoration:underline;
  text-underline-offset:3px;
  text-decoration-thickness:2px;
}

.prose a:hover{background:var(--yellow);color:var(--ink);text-decoration:none}

.prose blockquote{
  margin:0 0 18px;
  padding:16px 20px;
  border-left:6px solid var(--yellow);
  background:var(--white);
}

.prose blockquote p:last-child{margin-bottom:0}

.prose strong{font-weight:700}

.prose figure{margin:0 0 18px}
.prose figure img{border-radius:10px;border:2px solid var(--ink)}
.prose figcaption{font-size:16px;color:var(--soft);margin-top:8px}

.prose table{
  width:100%;
  border-collapse:collapse;
  margin:0 0 18px;
  background:var(--white);
}
.prose th,
.prose td{
  border:1px solid var(--line);
  padding:10px 12px;
  text-align:left;
  vertical-align:top;
}
.prose th{background:var(--yellow);font-weight:600}

.prose pre{
  margin:0 0 18px;
  padding:14px;
  overflow:auto;
  background:var(--ink);
  color:var(--paper);
  border-radius:10px;
  font-size:16px;
}

.prose code{font-family:ui-monospace,SFMono-Regular,Menlo,monospace}

/* ---------- side ---------- */
.side{
  position:sticky;
  top:126px;
  padding:18px 18px 22px;
  border:2px solid var(--ink);
  border-radius:10px;
  background:var(--white);
}

.side small{
  display:block;
  color:var(--coral);
  font-size:16px;
  font-weight:600;
  letter-spacing:.16em;
}

.side h2{
  margin:2px 0 14px;
  font-size:1.2rem;
  font-weight:700;
  letter-spacing:-.01em;
}

.side-nav ul{
  display:flex;
  flex-direction:column;
  gap:2px;
  margin:0;
  padding:0;
  list-style:none;
}

.side-nav a{
  display:flex;
  align-items:center;
  min-height:42px;
  padding:0 10px;
  border-radius:4px;
  text-decoration:none;
  font-size:16px;
  font-weight:500;
  transition:background-color 160ms ease;
}

.side-nav a:hover{background:var(--yellow)}

/* ---------- footer ---------- */
.foot{
  border-top:2px solid var(--ink);
  background:var(--paper);
}

.foot-top{
  max-width:1180px;
  margin:0 auto;
  padding:52px 24px 36px;
  display:grid;
  grid-template-columns:1.15fr 1fr;
  gap:44px;
}

.foot-logo{
  margin:0;
  font-size:clamp(2.4rem,6.5vw,4.4rem);
  line-height:.95;
  font-weight:700;
  letter-spacing:-.04em;
}

.foot-logo::after{
  content:"";
  display:block;
  width:64px;
  height:10px;
  margin-top:18px;
  background:var(--coral);
}

.foot address{
  margin:18px 0 0;
  max-width:38ch;
  font-style:normal;
  font-size:16px;
  color:var(--soft);
}

.foot-links{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:2px;
  align-content:start;
  margin:0;
  padding:0;
  list-style:none;
}

.foot-links a{
  display:flex;
  align-items:center;
  min-height:42px;
  padding:0 10px;
  border-radius:4px;
  text-decoration:none;
  font-size:16px;
  font-weight:500;
  transition:background-color 160ms ease;
}

.foot-links a:hover{background:var(--yellow)}

.foot-base{
  max-width:1180px;
  margin:0 auto;
  padding:16px 24px 34px;
  display:flex;
  flex-wrap:wrap;
  justify-content:space-between;
  align-items:center;
  gap:14px;
  border-top:2px solid var(--line);
}

.foot-base p{margin:0;font-size:16px;color:var(--soft)}

.foot-base a{
  display:inline-flex;
  align-items:center;
  min-height:42px;
  padding:0 15px;
  border-radius:4px;
  background:var(--ink);
  color:var(--paper);
  text-decoration:none;
  font-size:16px;
  font-weight:500;
  transition:background-color 160ms ease;
}

.foot-base a:hover{background:var(--coral)}

/* ---------- narrow ---------- */
@media (max-width:1000px){
  .topbar{
    grid-template-columns:1fr auto;
    grid-template-areas:"strip strip" "brand burger" "left left" "right right";
    column-gap:12px;
    padding-bottom:8px;
  }
  .brand{justify-self:start;padding-left:20px}
  .burger{display:inline-flex;align-items:center}
  .menu{display:none}
  .topbar.open .menu{display:block;padding:0 20px}
  .topbar.open .menu ul{flex-direction:column;align-items:stretch;gap:2px}
  .topbar.open .menu a{min-height:46px;padding:0 12px}
  .topbar.open{padding-bottom:14px}
}

@media (max-width:860px){
  .hero{
    grid-template-columns:1fr;
    gap:32px;
    min-height:0;
    padding:30px 20px 46px;
  }
  .hero h1::after{margin-top:18px}
  .hero-art{box-shadow:8px 8px 0 rgba(255,201,74,.92)}
  .split{
    grid-template-columns:1fr;
    gap:34px;
    padding:0 20px 64px;
  }
  .prose article{scroll-margin-top:150px;padding:38px 0}
  .side{position:static}
  .foot-top{grid-template-columns:1fr;gap:28px;padding:40px 20px 28px}
  .foot-base{padding:16px 20px 30px}
  .strip{padding:7px 20px}
}

@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  .hero-art{transform:none !important}
  *{transition-duration:1ms !important}
}

button[aria-expanded]{min-width:44px;min-height:44px}
