:root {
  color-scheme: light;
  --paper: #f2eee6;
  --panel: #f9f6ef;
  --ink: #191817;
  --muted: #5b554f;
  --line: #c9c0b4;
  --dark: #171716;
  --dark-line: #41403a;
  --red: #a42b20;
  --flare: #ff5d46;
  --white: #fff7ec;
  --mono: ui-monospace, SFMono-Regular, Consolas, monospace;
  --display: Impact, 'Arial Narrow', 'Arial Black', sans-serif;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.55;
  background: var(--paper);
  color: var(--ink);
}

* { box-sizing: border-box; }
body, h1, h2, h3, p, figure { margin: 0; }
a { color: inherit; }
img { display: block; max-width: 100%; height: auto; }
:focus-visible { outline: 3px solid #226dd5; outline-offset: 4px; }
[id] { scroll-margin-top: 18px; }
.wrap { width: min(1240px, calc(100% - 80px)); margin-inline: auto; }
.icon { width: 20px; height: 20px; flex: 0 0 auto; }
.skip-link { position: fixed; z-index: 2; left: 16px; top: -100px; padding: 10px 14px; color: var(--ink); background: var(--white); }
.skip-link:focus { top: 10px; }

.site-header, .site-footer { color: var(--white); background: var(--dark); }
.site-header { border-bottom: 1px solid var(--dark-line); }
.header-row { min-height: 76px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 22px; }
.brand { display: inline-flex; align-items: center; gap: 11px; font-size: 15px; font-weight: 900; line-height: 1.12; text-decoration: none; letter-spacing: .02em; justify-self: start; width: fit-content; }
.brand > span > span { color: var(--flare); }
.brand small { display: block; margin-top: 4px; color: #c2b7a9; font: 700 10px var(--mono); letter-spacing: .16em; }
.brand-mark { display: grid; width: 34px; height: 34px; color: var(--white); background: #b63326; }
.header-row nav { display: flex; gap: 27px; align-items: stretch; align-self: stretch; }
.header-row nav a { display: inline-flex; align-items: center; position: relative; color: #ded5ca; font-size: 13px; font-weight: 650; text-decoration: none; white-space: nowrap; }
.header-row nav a:hover, .header-row nav a[aria-current] { color: #fff8ef; }
.header-row nav a[aria-current]::after { position: absolute; bottom: 0; left: 0; right: 0; height: 3px; content: ''; background: var(--flare); }

.button { min-height: 46px; display: inline-flex; justify-content: center; align-items: center; gap: 10px; padding: 10px 15px; border: 1px solid transparent; font-size: 14px; font-weight: 760; line-height: 1.2; text-decoration: none; }
.button-primary { color: #17110e; background: var(--flare); }
.button-primary:hover { background: #ff816d; }
.header-play { justify-self: end; border-color: #69574c; min-height: 40px; color: var(--white); }
.header-play:hover, .button-ghost:hover { border-color: var(--flare); }
.button-ghost { border-color: #60564e; color: var(--white); }
.button-secondary { border-color: var(--line); background: var(--panel); color: var(--ink); }
.button-secondary:hover { border-color: var(--red); }

.hero {
  color: var(--white);
  border-bottom: 4px solid #b93629;
  background:
    radial-gradient(ellipse at 80% 100%, #42221b 0, transparent 56%),
    repeating-linear-gradient(125deg, transparent 0 44px, #ffffff08 44px 45px, transparent 45px 65px),
    var(--dark);
}
.hero-grid { display: grid; grid-template-columns: minmax(0, .76fr) minmax(0, 1.24fr); align-items: center; gap: clamp(30px, 5vw, 77px); padding-block: 65px 56px; }
.eyebrow { display: flex; align-items: center; gap: 9px; color: #dfcbbd; font: 700 11px/1.4 var(--mono); letter-spacing: .12em; }
.eyebrow.light { color: var(--red); }
.signal { width: 8px; height: 8px; background: var(--flare); }
.eyebrow-divider { width: 13px; height: 1px; background: currentColor; opacity: .65; }
.hero h1 { margin-block: 15px 17px; font-family: var(--display); font-weight: 900; font-size: clamp(64px, 8.1vw, 124px); line-height: .86; letter-spacing: .012em; }
.hero h1 span { color: var(--flare); }
.hero-description { max-width: 385px; color: #e5d9cd; font-size: 16px; line-height: 1.6; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.hero-shortcuts { display: flex; flex-wrap: wrap; gap: 0 14px; margin-top: 6px; }
.hero-shortcuts a { display: inline-flex; align-items: center; min-height: 44px; color: #f2ddcf; font-size: 13px; text-underline-offset: 4px; }
.hero-shortcuts a:hover { color: #fff; }
.hero-image { min-width: 0; padding: 8px 8px 0; border: 1px solid #62534a; background: #201b18; }
.hero-image img, .loop-image img { width: 100%; aspect-ratio: 16 / 9; object-fit: contain; }
.image-label { display: flex; justify-content: space-between; gap: 10px; color: #e8ccba; font: 700 10px var(--mono); letter-spacing: .13em; padding: 3px 2px 8px; }
figcaption { font-size: 12px; line-height: 1.5; padding: 8px 1px; color: var(--muted); }
.hero-image figcaption { color: #d2c0b3; }
figcaption a { text-underline-offset: 3px; }

.guide-index { padding-block: 44px 48px; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 22px; margin-bottom: 18px; }
.section-heading h2, .loop-section h2 { font-size: clamp(34px, 4vw, 53px); font-weight: 850; letter-spacing: -.05em; line-height: 1.05; margin-top: 5px; }
.guide-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; }
.guide-card { min-height: 220px; min-width: 0; padding: 16px 20px 14px; display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); text-decoration: none; }
.guide-card:hover { border-color: var(--red); background: #fffaf1; }
.guide-card-top { display: flex; justify-content: space-between; align-items: start; gap: 10px; margin-bottom: 16px; }
.card-icon { display: grid; place-items: center; width: 38px; height: 36px; border: 1px solid #dfb4a8; color: var(--red); background: #fae8e0; }
.card-index, .card-category { font: 700 10px/1.4 var(--mono); letter-spacing: .12em; }
.card-index { color: var(--muted); }
.card-category { color: var(--red); }
.guide-card h3 { font-size: 24px; letter-spacing: -.035em; line-height: 1.15; margin: 4px 0 6px; }
.guide-card p { color: var(--muted); font-size: 14px; }
.card-bottom { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--red); font-weight: 760; font-size: 13px; padding-top: 12px; margin-top: auto; }
.loop-section { display: grid; grid-template-columns: 1fr .82fr; gap: 38px; align-items: center; border-top: 1px solid var(--line); padding-block: 35px 62px; }
.loop-image { padding: 6px 6px 0; border: 1px solid var(--line); background: var(--panel); }
.loop-copy > p:not(.eyebrow) { margin-block: 13px 16px; color: var(--muted); max-width: 52ch; }
.text-action, .footer-play-link { display: inline-flex; align-items: center; gap: 8px; font-weight: 760; color: var(--red); text-underline-offset: 3px; }
.site-footer { border-top: 1px solid var(--dark-line); }
.footer-inner { display: grid; grid-template-columns: 1fr auto; align-items: center; padding-block: 27px; gap: 24px; }
.footer-inner p, .footer-inner small { color: #d2c0b3; font-size: 12px; margin-top: 6px; }
.footer-inner .brand small { font-size: 10px; }
.footer-play-link { color: var(--white); font-size: 13px; }

@media (max-width: 980px) {
  .guide-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wrap { width: min(100% - 48px, 1240px); }
  .header-row nav { gap: 16px; }
  .hero-grid { grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 24px; padding-block: 48px 42px; }
  .hero h1 { font-size: clamp(60px, 9vw, 100px); }
}
@media (max-width: 700px) {
  .wrap { width: calc(100% - 36px); }
  .header-row { grid-template-columns: 1fr auto; gap: 0 10px; min-height: 0; padding-top: 11px; }
  .header-row nav { grid-column: 1 / -1; grid-row: 2; justify-content: space-between; flex-wrap: wrap; gap: 0 6px; }
  .header-row nav a { min-height: 44px; padding-inline: 1px; font-size: 12px; }
  .header-play { font-size: 12px; min-height: 38px; padding-inline: 9px; }
  .header-play .icon { width: 16px; height: 16px; }
  .brand { font-size: 13px; gap: 7px; }
  .brand-mark { width: 31px; height: 31px; }
  .hero-grid { grid-template-columns: 1fr; padding-block: 30px 23px; gap: 23px; }
  .hero h1 { font-size: clamp(62px, 14vw, 89px); }
  .hero-description { font-size: 15px; }
  .hero-actions { margin-top: 18px; }
  .hero-image { padding: 6px 6px 0; }
  .guide-index { padding-block: 31px 34px; }
  .section-heading { flex-direction: column; align-items: start; gap: 8px; margin-bottom: 14px; }
  .guide-grid { grid-template-columns: 1fr; gap: 10px; }
  .guide-card { min-height: 0; }
  .guide-card-top { margin-bottom: 12px; }
  .loop-section { grid-template-columns: 1fr; gap: 16px; padding-block: 24px 36px; }
  .loop-copy { grid-row: 1; }
  .footer-inner { grid-template-columns: 1fr; gap: 8px; padding-block: 20px; }
}

.article-header { color: var(--white); background: linear-gradient(110deg, var(--dark) 54%, #36201b); border-bottom: 4px solid #b93629; padding-block: 26px 44px; }
.breadcrumb { display: flex; gap: 10px; align-items: center; margin-bottom: 28px; font-size: 13px; color: #e4d2c5; }
.breadcrumb a { text-underline-offset: 3px; }
.article-header h1 { font-size: clamp(42px, 5.3vw, 72px); font-weight: 860; letter-spacing: -.05em; line-height: 1.04; margin-top: 7px; max-width: 1080px; text-wrap: balance; }
.article-lead { color: #e9d9cb; margin-top: 15px; font-size: clamp(15px, 2vw, 20px); max-width: 70ch; }
.article-grid { display: grid; grid-template-columns: minmax(0, 760px) minmax(0, 268px); grid-template-areas: 'answer index' 'content index'; justify-content: space-between; align-items: start; column-gap: 34px; padding-block: 30px 62px; }
.quick-answer { grid-area: answer; background: #fff5eb; border: 1px solid #d7b2a7; border-left: 4px solid var(--red); padding: 17px 20px 19px; }
.quick-answer > p + p { font-size: 18px; line-height: 1.5; margin-top: 6px; }
.task-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.article-index { grid-area: index; position: sticky; top: 20px; background: var(--panel); border: 1px solid var(--line); padding: 16px 18px; }
.article-index ol { margin: 8px 0 0; padding-left: 20px; }
.article-index li { padding-block: 3px; color: var(--muted); font-size: 14px; }
.article-index a { text-underline-offset: 3px; }
.article-index a:hover { color: var(--red); }
.article-content { grid-area: content; min-width: 0; }
.article-section { margin-top: 34px; }
.featured-section { grid-area: answer; margin-top: 0; min-width: 0; }
.article-section h2 { line-height: 1.16; font-size: clamp(23px, 3vw, 33px); letter-spacing: -.035em; }
.article-section > p { margin-top: 12px; max-width: 72ch; }
.article-section a { color: var(--red); text-underline-offset: 3px; }
.steps { list-style: none; counter-reset: step; margin: 12px 0 0; padding: 0; border-top: 1px solid var(--line); }
.steps li { position: relative; padding: 12px 2px 12px 44px; border-bottom: 1px solid var(--line); counter-increment: step; }
.steps li::before { position: absolute; top: 14px; left: 0; display: grid; place-items: center; width: 31px; height: 27px; content: counter(step, decimal-leading-zero); color: var(--red); font: 700 12px var(--mono); border: 1px solid #d7b2a7; background: #fae8e0; }
.decision-list { margin: 13px 0 0; border: 1px solid var(--line); background: var(--panel); }
.decision-list div { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 12px; padding: 13px; }
.decision-list div + div { border-top: 1px solid var(--line); }
.decision-list dt { font-weight: 770; }
.decision-list dd { margin: 0; color: var(--muted); }
.code-list { list-style: none; margin: 14px 0 0; padding: 0; border: 1px solid var(--line); background: var(--panel); }
.code-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; }
.code-list li + li { border-top: 1px solid var(--line); }
.code-list code { display: block; font: 750 16px/1.4 var(--mono); }
.code-reward { display: block; color: var(--muted); font-size: 14px; }
.copy-code { min-height: 44px; border-color: var(--line); background: var(--white); color: var(--red); cursor: pointer; }
.copy-code:hover { border-color: var(--red); }
.copy-code[hidden] { display: none; }
.copy-status { display: block; color: var(--muted); font-size: 13px; }
.article-section .code-date { margin-top: 8px; color: var(--muted); font-size: 13px; }
.article-image { max-width: 580px; margin-top: 16px; padding: 6px 6px 0; background: var(--panel); border: 1px solid var(--line); }
.setting-example { margin-top: 13px; border: 1px solid var(--line); background: var(--panel); }
.setting-example summary { cursor: pointer; font-weight: 760; padding: 12px 15px; }
.setting-example p { padding: 0 15px 14px; }
.next-guide { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 25px; padding: 13px 16px; background: var(--panel); border: 1px solid var(--line); text-decoration: none; }
.next-guide:hover { border-color: var(--red); }
.next-guide small, .next-guide strong { display: block; }
.next-guide small { color: var(--red); font: 700 10px var(--mono); letter-spacing: .1em; margin-bottom: 3px; }
.next-guide .icon { color: var(--red); }
.missing-page { padding-block: clamp(30px, 5vw, 64px); }
.missing-page h1 { margin-block: 6px 12px; }
.missing-page > p:not(.eyebrow) { margin-bottom: 12px; color: var(--muted); }
.missing-page h2 { margin-block: 28px 12px; }

@media (max-width: 700px) {
  .article-header { padding-block: 16px 26px; }
  .breadcrumb { margin-bottom: 18px; }
  .article-header h1 { font-size: clamp(37px, 10vw, 56px); }
  .article-grid { display: flex; flex-direction: column; gap: 16px; padding-block: 19px 35px; }
  .article-grid > * { width: 100%; }
  .article-index { position: static; padding: 10px 14px; }
  .quick-answer { padding: 12px 14px 14px; }
  .quick-answer > p + p { font-size: 16px; }
  .article-section { margin-top: 26px; }
  .decision-list div { grid-template-columns: 1fr; gap: 4px; }
}
