:root {
  --paper: #f7f2df;
  --surface: #fff8d8;
  --ink: #28220c;
  --text: #322d1b;
  --muted: #6b6245;
  --line: #28220c;
  --soft-line: rgba(40, 34, 12, 0.22);
  --sun: #f8d934;
  --sun-deep: #f0b90b;
  --rose: #ef5dae;
  --red: #ff383f;
  --green: #005142;
  --violet: #3c05a8;
  --clay: #702707;
  --sand: #d4d29e;
  --mist: #bfc9c2;
  --link: #006b55;
  --content: 1200px;
  --radius: 0;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Inter", Arial, sans-serif;
  --display: "Arial Black", Impact, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  --serif: Georgia, "Times New Roman", "Songti SC", serif;
  --mono: "SFMono-Regular", Menlo, Consolas, monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: auto;
  background: var(--paper);
}

[id] {
  scroll-margin-top: 8rem;
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, rgba(248, 217, 52, 0.14), rgba(247, 242, 223, 0.94) 18rem),
    var(--paper);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  overflow-x: hidden;
}

body.modal-open {
  overflow: hidden;
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

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

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  color: var(--ink);
  font-weight: 950;
  letter-spacing: 0;
  line-height: 1.02;
}

h1 {
  margin-bottom: 1rem;
  font-family: var(--display);
  font-size: clamp(3.2rem, 8vw, 7.1rem);
  max-width: 980px;
}

h2 {
  margin-bottom: 0.85rem;
  font-size: clamp(1.85rem, 3.8vw, 3.25rem);
}

h3 {
  margin-bottom: 0.45rem;
  font-size: 1.2rem;
}

p {
  margin-bottom: 1rem;
}

h1,
h2,
h3,
p,
li,
a,
span,
button,
code {
  overflow-wrap: anywhere;
}

.skip-button {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 50;
  min-height: 2.5rem;
  padding: 0 0.8rem;
  border: 3px solid var(--ink);
  background: var(--sun);
  color: var(--ink);
  font-weight: 900;
}

.skip-button:focus {
  top: 1rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background:
    repeating-linear-gradient(45deg, rgba(40, 34, 12, 0.58) 0 3px, transparent 3px 10px),
    repeating-linear-gradient(-45deg, rgba(40, 34, 12, 0.48) 0 3px, transparent 3px 10px),
    var(--sun);
  border-bottom: 4px solid var(--ink);
  color: var(--ink);
}

.site-header.is-scrolled {
  box-shadow: 0 14px 0 rgba(40, 34, 12, 0.16);
}

.masthead {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  width: min(var(--content), calc(100% - 2rem));
  margin: 0 auto;
  padding: 1rem 0;
}

.brand {
  display: inline-grid;
  gap: 0.05rem;
  min-width: 0;
  padding: 0.55rem 0.85rem;
  border: 3px solid var(--ink);
  background: var(--ink);
  color: var(--sun);
  text-decoration: none;
  box-shadow: 7px 7px 0 rgba(40, 34, 12, 0.2);
}

.brand-text {
  font-family: var(--display);
  font-size: clamp(1.55rem, 3vw, 2.6rem);
  font-weight: 950;
  line-height: 0.9;
}

.brand-subtitle {
  color: var(--paper);
  font-size: 0.76rem;
  font-weight: 900;
}

.site-nav {
  display: flex;
  gap: 0.35rem;
  justify-content: center;
  align-items: center;
  overflow-x: auto;
  scrollbar-width: none;
}

.site-nav::-webkit-scrollbar {
  display: none;
}

.site-nav button,
.site-nav a,
.route-panel button {
  border: 0;
  background: transparent;
  color: inherit;
  font-size: 0.88rem;
  font-weight: 950;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
}

.site-nav button,
.site-nav a {
  min-height: 2.35rem;
  padding: 0 0.7rem;
  background: rgba(255, 248, 216, 0.84);
  border: 2px solid var(--ink);
}

.site-nav button:hover,
.site-nav button.is-active,
.site-nav a:hover {
  background: var(--ink);
  color: var(--sun);
}

.header-actions {
  min-width: 0;
}

.header-cta,
.button {
  display: inline-flex;
  max-width: 100%;
  min-height: 2.9rem;
  align-items: center;
  justify-content: center;
  padding: 0.72rem 1.05rem;
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  font-weight: 950;
  line-height: 1.16;
  text-align: center;
  text-decoration: none;
  box-shadow: 5px 5px 0 var(--ink);
  transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease, color 140ms ease;
}

.header-cta {
  background: var(--green);
  color: var(--surface);
}

.button-primary {
  background: var(--ink);
  color: var(--sun);
}

.button-secondary {
  background: var(--red);
  color: var(--surface);
}

.button-ghost {
  background: var(--surface);
}

.button:hover,
.header-cta:hover,
.button:focus-visible,
.header-cta:focus-visible {
  transform: translate(3px, 3px);
  box-shadow: 2px 2px 0 var(--ink);
  outline: none;
}

.section-block,
.site-footer {
  width: min(var(--content), calc(100% - 2rem));
  margin-left: auto;
  margin-right: auto;
}

.section-block {
  padding-top: 2.4rem;
  padding-bottom: 2.4rem;
}

.breadcrumb {
  display: flex;
  gap: 0.45rem;
  align-items: center;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 900;
}

.breadcrumb a {
  color: var(--muted);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.section-rule {
  display: flex;
  align-items: center;
  min-height: 3rem;
  margin: 0;
  padding: 0.45rem 0.9rem;
  background:
    repeating-linear-gradient(45deg, rgba(248, 217, 52, 0.9) 0 3px, transparent 3px 9px),
    repeating-linear-gradient(-45deg, rgba(248, 217, 52, 0.75) 0 3px, transparent 3px 9px),
    var(--ink);
  border-bottom: 4px solid var(--ink);
}

.section-rule span {
  display: inline-flex;
  padding: 0.15rem 0.55rem;
  background: var(--ink);
  color: var(--sun);
  font-size: 0.9rem;
  font-weight: 950;
}

.story-meta,
.eyebrow,
.card-index,
.meta-line {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.latest-section {
  margin-top: 1rem;
  padding: 0;
  border: 4px solid var(--ink);
  background: var(--sun);
  box-shadow: 14px 14px 0 rgba(40, 34, 12, 0.18);
}

.lead-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.14fr) minmax(360px, 0.86fr);
  gap: 0;
  align-items: stretch;
}

.lead-story {
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: clamp(1.4rem, 4vw, 3.2rem);
}

.lead-image {
  order: 5;
  margin: 2rem -3.2rem -3.2rem;
  overflow: hidden;
  border-top: 4px solid var(--ink);
  background: var(--ink);
}

.lead-image img {
  height: 270px;
  object-fit: cover;
  object-position: center top;
  filter: saturate(1.12) contrast(1.05);
  transition: transform 320ms ease;
}

.lead-story:hover .lead-image img,
.story-card:hover img,
.trend-card:hover img {
  transform: scale(1.035);
}

.hero-lead {
  max-width: 760px;
  color: var(--text);
  font-size: 1.14rem;
  font-weight: 760;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin: 1.2rem 0 0.9rem;
}

.meta-line strong {
  color: var(--ink);
}

.story-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  border-left: 4px solid var(--ink);
}

.story-card,
.trend-card,
.feature-card,
.download-card,
.info-grid div,
.path-grid article {
  min-width: 0;
}

.story-card {
  display: flex;
  flex-direction: column;
  padding: 1rem;
  border-bottom: 4px solid var(--ink);
  color: var(--surface);
}

.story-card:nth-child(1) {
  background: #7a0033;
}

.story-card:nth-child(2) {
  background: var(--green);
}

.story-card:nth-child(3) {
  background: var(--violet);
}

.story-card:nth-child(4) {
  background: var(--clay);
}

.story-card img,
.trend-card img {
  height: 148px;
  object-fit: cover;
  background: var(--ink);
  margin-bottom: 0.7rem;
  clip-path: polygon(0 0, 100% 0, 100% 76%, 86% 100%, 72% 76%, 58% 100%, 44% 76%, 30% 100%, 16% 76%, 0 100%);
}

.story-card .story-meta,
.story-card h2,
.story-card button {
  color: var(--surface);
}

.story-card h2,
.trend-card h2 {
  font-size: 1.18rem;
  line-height: 1.12;
}

.story-card button,
.trend-card button,
.route-panel button {
  padding: 0;
  border: 0;
  color: var(--ink);
  background: transparent;
  font-weight: 950;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 0.16em;
}

.story-card button:hover,
.trend-card button:hover,
.route-panel button:hover,
.route-panel button.is-active {
  color: var(--red);
}

.trends-section {
  margin-top: 2.25rem;
  padding: 0;
  border: 4px solid var(--ink);
  background: var(--surface);
}

.trend-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
}

.trend-card {
  padding: 1rem;
  border-right: 3px solid var(--ink);
  background: var(--surface);
  transition: background 160ms ease, transform 160ms ease;
}

.trend-card:nth-child(1) {
  background: #f3c9d1;
}

.trend-card:nth-child(2) {
  background: #d6d6a5;
}

.trend-card:nth-child(3) {
  background: #c1cac3;
}

.trend-card:nth-child(4) {
  background: var(--sun);
}

.trend-card:hover {
  background: var(--rose);
  transform: translateY(-5px);
}

.trend-card img {
  height: 142px;
}

.category-section {
  display: grid;
  gap: 0;
  padding: 0;
  border: 4px solid var(--ink);
  background: var(--surface);
}

.category-section h2 {
  max-width: none;
  margin: 0;
  padding: clamp(1.3rem, 4vw, 2.4rem);
  background:
    linear-gradient(180deg, var(--red) 0 20%, var(--sand) 20% 40%, var(--mist) 40% 60%, #e5b7b7 60% 80%, var(--sun) 80% 100%);
  color: var(--ink);
  font-family: var(--display);
  font-size: clamp(2.5rem, 7vw, 5.7rem);
  line-height: 1.02;
}

.black-panel {
  display: grid;
  justify-items: center;
  margin-top: 2.25rem;
  margin-bottom: 2rem;
  padding: clamp(2rem, 5vw, 4rem) 1.5rem;
  border: 4px solid var(--ink);
  background: var(--green);
  color: var(--surface);
  text-align: center;
  box-shadow: 12px 12px 0 var(--sun);
}

.black-panel h2 {
  max-width: 830px;
  color: var(--surface);
  font-size: clamp(2rem, 5vw, 4.2rem);
}

.black-panel p {
  max-width: 720px;
  color: rgba(255, 248, 216, 0.88);
}

.black-panel .button-primary {
  border-color: var(--surface);
  background: var(--sun);
  color: var(--ink);
}

.black-panel .button-secondary {
  background: var(--red);
}

.article-section {
  display: grid;
  grid-template-columns: minmax(220px, 0.28fr) minmax(0, 1fr);
  gap: 1.4rem;
  align-items: start;
}

.route-panel {
  position: sticky;
  top: 6.7rem;
  display: grid;
  gap: 0;
  border: 4px solid var(--ink);
  background: var(--surface);
  box-shadow: 8px 8px 0 rgba(40, 34, 12, 0.18);
}

.route-heading {
  display: grid;
  gap: 0.1rem;
  padding: 1rem;
  border-bottom: 3px solid var(--ink);
  background: var(--sun);
}

.route-heading span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
}

.route-heading strong {
  color: var(--ink);
  font-size: 1.25rem;
  font-weight: 950;
}

.route-panel button {
  min-height: 3rem;
  padding: 0.75rem 1rem;
  border-bottom: 2px solid var(--ink);
  text-decoration: none;
}

.route-panel button:nth-child(odd) {
  background: #f2c7d0;
}

.route-panel button:nth-child(even) {
  background: #d8d8a6;
}

.route-panel button:hover,
.route-panel button.is-active {
  background: var(--ink);
  color: var(--sun);
}

.article-body {
  max-width: none;
  min-width: 0;
}

.content-panel {
  margin-bottom: 1.4rem;
  padding: clamp(1.3rem, 3.2vw, 2.4rem);
  border: 4px solid var(--ink);
  background: var(--surface);
  box-shadow: 8px 8px 0 rgba(40, 34, 12, 0.14);
}

.content-panel:nth-child(4n + 1) {
  border-top-width: 1.15rem;
  border-top-color: var(--sun);
}

.content-panel:nth-child(4n + 2) {
  border-top-width: 1.15rem;
  border-top-color: var(--red);
}

.content-panel:nth-child(4n + 3) {
  border-top-width: 1.15rem;
  border-top-color: var(--green);
}

.content-panel:nth-child(4n + 4) {
  border-top-width: 1.15rem;
  border-top-color: var(--violet);
}

.content-panel p,
.content-panel li,
.feature-card p,
.download-card p,
.path-grid p,
.page-hero p,
.service-grid p {
  color: var(--text);
}

.content-panel a {
  color: var(--link);
  font-weight: 950;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.18em;
}

.summary-points,
.feature-grid,
.download-grid,
.info-grid,
.path-grid,
.service-grid {
  display: grid;
  gap: 1rem;
}

.summary-points,
.info-grid,
.path-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.feature-grid,
.download-grid,
.service-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.summary-points div,
.feature-card,
.download-card,
.info-grid div,
.path-grid article {
  padding: 1rem;
  border: 3px solid var(--ink);
  background: #fff1b7;
}

.summary-points div:nth-child(2),
.download-card:nth-child(2),
.info-grid div:nth-child(2),
.path-grid article:nth-child(2),
.feature-card:nth-child(2) {
  background: #e9c0c4;
}

.summary-points div:nth-child(3),
.info-grid div:nth-child(3),
.path-grid article:nth-child(3),
.feature-card:nth-child(3) {
  background: #cbd4c6;
}

.summary-points strong,
.summary-points span,
.note-box strong,
.note-box span,
.inline-cta strong,
.inline-cta span {
  display: block;
}

.summary-points strong {
  color: var(--ink);
  font-weight: 950;
}

.note-box,
.inline-cta,
.mini-guide {
  margin-top: 1.2rem;
  padding: 1.1rem;
  border: 3px solid var(--ink);
  border-left-width: 0.9rem;
  background: var(--sun);
}

.guide-visual {
  margin: 1.1rem 0 1.2rem;
  border: 4px solid var(--ink);
  background: var(--ink);
}

.guide-visual img {
  max-height: 440px;
  object-fit: contain;
}

.check-list,
.step-list,
.mini-guide ol {
  display: grid;
  gap: 0.8rem;
}

.check-list {
  padding: 0;
  list-style: none;
}

.check-list li {
  position: relative;
  padding: 0.85rem 1rem 0.85rem 2.2rem;
  border: 2px solid var(--ink);
  background: #fff7cd;
}

.check-list li::before {
  content: "+";
  position: absolute;
  left: 0.72rem;
  top: 0.72rem;
  color: var(--red);
  font-family: var(--display);
  font-size: 1.1rem;
  line-height: 1;
}

.step-list {
  padding-left: 0;
  list-style: none;
  counter-reset: guide-step;
}

.step-list li {
  position: relative;
  padding: 1rem 1rem 1rem 4rem;
  border: 3px solid var(--ink);
  background: var(--paper);
  counter-increment: guide-step;
}

.step-list li::before {
  content: counter(guide-step);
  position: absolute;
  left: 1rem;
  top: 1rem;
  display: grid;
  width: 2.25rem;
  height: 2.25rem;
  place-items: center;
  border: 3px solid var(--ink);
  background: var(--red);
  color: var(--surface);
  font-family: var(--mono);
  font-weight: 950;
}

.inline-cta,
.final-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.faq-list {
  display: grid;
  gap: 0.8rem;
}

.faq-item {
  border: 3px solid var(--ink);
  background: var(--surface);
}

.faq-item summary {
  cursor: pointer;
  padding: 1rem;
  color: var(--ink);
  font-weight: 950;
}

.faq-item p {
  margin: 0;
  padding: 0 1rem 1rem;
}

.loading-text {
  color: var(--muted);
}

.final-cta {
  margin-bottom: 2rem;
  padding: 2rem;
  border: 4px solid var(--ink);
  background: var(--red);
  color: var(--surface);
  box-shadow: 10px 10px 0 var(--ink);
}

.final-cta h2,
.final-cta p,
.final-cta .eyebrow {
  color: var(--surface);
}

.final-cta .button-primary {
  background: var(--sun);
  color: var(--ink);
}

.page-hero {
  max-width: none;
  padding: clamp(2rem, 5vw, 4rem);
  border: 4px solid var(--ink);
  background: var(--sun);
  box-shadow: 12px 12px 0 rgba(40, 34, 12, 0.18);
}

.page-hero h1 {
  max-width: 900px;
  font-size: clamp(3rem, 8vw, 6rem);
}

.service-grid {
  align-items: stretch;
}

.feature-card {
  border-width: 4px;
}

.feature-card:nth-child(4) {
  background: var(--sun);
}

.site-footer {
  display: grid;
  justify-items: center;
  gap: 1.2rem;
  max-width: none;
  width: 100%;
  padding: 3.2rem max(1rem, calc((100vw - var(--content)) / 2));
  background:
    repeating-linear-gradient(45deg, rgba(248, 217, 52, 0.86) 0 3px, transparent 3px 10px),
    repeating-linear-gradient(-45deg, rgba(248, 217, 52, 0.74) 0 3px, transparent 3px 10px),
    var(--ink);
  color: var(--surface);
  text-align: center;
}

.site-footer strong {
  color: var(--sun);
  font-family: var(--display);
  font-size: 2.2rem;
  font-weight: 950;
}

.site-footer p {
  max-width: 640px;
  margin-bottom: 0;
  color: var(--surface);
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  color: var(--surface);
  font-size: 0.9rem;
  font-weight: 950;
}

.site-footer a:hover {
  color: var(--sun);
}

.modal[hidden] {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.74);
}

.modal-card {
  position: relative;
  z-index: 1;
  width: min(560px, 100%);
  max-height: min(760px, calc(100vh - 2rem));
  overflow: auto;
  padding: 1.4rem;
  border: 4px solid var(--ink);
  background: var(--surface);
  box-shadow: 12px 12px 0 var(--sun);
  animation: modal-in 160ms ease both;
}

.modal-close {
  float: right;
  min-height: 2.2rem;
  padding: 0 0.7rem;
  border: 3px solid var(--ink);
  background: var(--red);
  color: var(--surface);
  font-weight: 950;
}

.copy-code {
  display: block;
  margin: 1rem 0;
  padding: 0.9rem;
  border: 3px solid var(--ink);
  background: var(--paper);
  color: var(--link);
  font-family: var(--mono);
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.copy-status {
  min-height: 1.5rem;
  color: var(--link);
  font-weight: 950;
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    transition-duration: 1ms !important;
  }
}

@media (max-width: 1080px) {
  .masthead {
    grid-template-columns: 1fr;
    justify-items: stretch;
  }

  .brand {
    justify-self: start;
  }

  .site-nav {
    justify-content: flex-start;
  }

  .lead-layout,
  .article-section {
    grid-template-columns: 1fr;
  }

  .story-grid {
    border-top: 4px solid var(--ink);
    border-left: 0;
  }

  .route-panel {
    position: static;
  }

  .trend-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .article-body {
    max-width: none;
  }
}

@media (max-width: 720px) {
  body {
    font-size: 15.5px;
  }

  .section-block {
    width: min(100% - 1rem, var(--content));
    padding-top: 1.7rem;
    padding-bottom: 1.7rem;
  }

  .masthead {
    width: min(100% - 1rem, var(--content));
  }

  .lead-story {
    padding: 1rem;
  }

  .lead-image {
    margin: 1.2rem -1rem -1rem;
  }

  .lead-image img {
    height: 260px;
  }

  .story-grid,
  .trend-grid,
  .summary-points,
  .feature-grid,
  .download-grid,
  .service-grid,
  .info-grid,
  .path-grid {
    grid-template-columns: 1fr;
  }

  .category-section h2 {
    font-size: clamp(2rem, 12vw, 3.6rem);
  }

  .hero-actions,
  .inline-cta,
  .final-cta,
  .modal-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .button,
  .header-cta {
    width: 100%;
  }

  .step-list li {
    padding-left: 1rem;
    padding-top: 4rem;
  }
}
