:root {
  color-scheme: light;
  --paper: #f8f7f2;
  --white: #fffefa;
  --ink: #17223c;
  --soft-ink: #4c586c;
  --blue: #1948d8;
  --blue-dark: #1639a8;
  --line: #d9dfeb;
  --muted: #5b6680;
  --mono: ui-monospace, "Cascadia Code", Consolas, monospace;
  --sans: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.65 var(--sans); }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 4px; }
h1, h2, h3, p, figure { margin: 0; }
.wrap { width: min(1170px, calc(100% - 80px)); margin-inline: auto; }
.sr-only, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip:focus { position: fixed; top: 10px; left: 10px; z-index: 5; padding: .5rem 1rem; background: white; }

.masthead { border-bottom: 1px solid var(--line); }
.masthead-inner { min-height: 77px; display: grid; grid-template-columns: 1fr auto 1fr; gap: 28px; align-items: center; }
.brand { display: inline-flex; align-items: center; gap: 10px; justify-self: start; color: var(--ink); font-size: 21px; line-height: 1; letter-spacing: -.06em; font-weight: 800; }
.brand svg, .brand-accent { color: var(--blue); flex-shrink: 0; }
.brand small { display: block; font-size: 10px; font-weight: 650; color: var(--muted); letter-spacing: .13em; margin-top: 5px; }
nav { display: flex; align-items: center; gap: clamp(20px, 3vw, 44px); }
nav a { color: var(--soft-ink); font-size: 14px; font-weight: 650; white-space: nowrap; }
nav a:hover, .header-link:hover { color: var(--blue-dark); text-decoration: underline; text-underline-offset: 4px; }
.header-link { justify-self: end; white-space: nowrap; color: var(--blue); font-size: 14px; font-weight: 750; }
.header-link span { margin-left: 5px; }

.hero { display: grid; grid-template-columns: 1.08fr 1fr; align-items: center; column-gap: clamp(30px, 6vw, 90px); padding-block: 64px 52px; }
.eyebrow { color: var(--blue-dark); display: flex; align-items: center; gap: 10px; font: 700 12px/1.55 var(--mono); letter-spacing: .12em; }
.signal { width: 8px; height: 8px; flex: 0 0 8px; background: var(--blue); border-radius: 50%; box-shadow: 0 0 0 4px #dce6ff; margin-left: 4px; }
.slash { color: #768ac3; }
.hero h1 { margin-top: 19px; font-size: clamp(38px, 4.6vw, 64px); line-height: 1.18; letter-spacing: -.055em; font-weight: 850; text-wrap: balance; }
.hero h1 span { display: block; color: var(--blue); }
.hero-intro { max-width: 30em; color: var(--soft-ink); font-size: clamp(16px, 1.55vw, 19px); line-height: 1.85; margin-top: 23px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 29px; }
.button { min-height: 49px; padding: 11px 16px; border-radius: 6px; display: inline-flex; gap: 14px; align-items: center; justify-content: center; border: 1px solid var(--line); font-size: 14px; font-weight: 750; }
.primary { color: #fff; background: var(--blue); border-color: var(--blue); }
.primary:hover { background: var(--blue-dark); border-color: var(--blue-dark); }
.secondary { background: var(--white); }
.secondary:hover { color: var(--blue); border-color: var(--blue); }
.hero-note { font-size: 12px; color: var(--muted); margin-top: 15px; }
.hero-visual { min-width: 0; background: var(--white); border: 1px solid #c9d5ef; border-radius: 10px; overflow: hidden; box-shadow: 0 15px 32px #18377e0c; }
.hero-example { padding: clamp(17px, 3.1vw, 34px); background: linear-gradient(145deg, #fffefa 58%, #eff4ff); }
.example-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 12px; }
.hero-example h2 { margin-top: 11px; font-size: clamp(23px, 3.4vw, 37px); line-height: 1.25; letter-spacing: -.04em; }
.example-intro { margin-top: 6px; color: var(--soft-ink); font-size: 14px; }
.example-table { width: 100%; border-collapse: collapse; margin-top: 17px; font-size: 13px; color: var(--soft-ink); }
.example-table th, .example-table td { padding: 8px 4px; text-align: left; border-bottom: 1px solid #d5e0f6; }
.example-table th { font-weight: 750; color: var(--ink); }
.example-table td:nth-child(-n+2) { white-space: nowrap; padding-right: 10px; }
.example-table td:first-child { font-family: var(--mono); }
.example-link { display: inline-block; margin-top: 14px; font-size: 14px; }
.text-link { color: var(--blue-dark); font-weight: 750; }
.text-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.index-strip { display: grid; grid-template-columns: repeat(3, 1fr); border-block: 1px solid var(--line); }
.index-strip a { display: flex; align-items: center; gap: 12px; padding: 15px 18px; color: var(--ink); font-size: 14px; font-weight: 720; }
.index-strip a + a { border-left: 1px solid var(--line); }
.index-strip a:hover { background: #ecf1ff; }
.index-number, .index-arrow { color: var(--blue); font: 700 13px/1 var(--mono); }
.index-arrow { margin-left: auto; }

.section { padding-block: 68px; scroll-margin-top: 18px; }
.section-heading { display: grid; grid-template-columns: 1fr minmax(200px, 350px); gap: 24px; align-items: end; margin-bottom: 27px; }
.section-heading h2 { margin-top: 7px; font-size: clamp(29px, 4vw, 51px); font-weight: 800; line-height: 1.23; letter-spacing: -.045em; }
.section-heading > p { font-size: 14px; color: var(--soft-ink); line-height: 1.8; padding-bottom: 2px; }
.serial { display: inline-block; border: 1px solid #c6d4f8; border-radius: 3px; padding: 2px 5px; background: #eef3ff; letter-spacing: 0; }
.muted { color: var(--muted); font-size: 12px; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 17px; }
.filters button { min-height: 37px; border: 1px solid var(--line); border-radius: 100px; padding: 4px 13px; color: var(--soft-ink); background: var(--white); font-size: 13px; font-weight: 650; }
.filters button:hover { color: var(--blue); border-color: var(--blue); }
.filters button[aria-pressed="true"] { color: white; border-color: var(--blue); background: var(--blue); }
.news-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.news-card { min-height: 194px; display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--line); border-radius: 8px; padding: 19px 21px 15px; }
.news-meta, .news-source { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 12px; }
.news-meta time { color: var(--muted); font-family: var(--mono); }
.tag { border-radius: 3px; padding: 3px 8px; font-weight: 750; }
.tag.blue { color: #214bac; background: #e9f0ff; }
.tag.green { color: #236246; background: #e7f1e8; }
.tag.lilac { color: #59468b; background: #f0eaf8; }
.news-card h3 { margin-top: 12px; font-size: clamp(18px, 2vw, 23px); line-height: 1.4; letter-spacing: -.025em; }
.news-card p { margin-block: 7px 15px; color: var(--soft-ink); font-size: 14px; }
.news-source { margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line); color: var(--muted); }
.news-source a, .file-link, .privacy-note a, .back-top { color: var(--blue-dark); font-weight: 750; }
.news-source a:hover, .file-link:hover, .privacy-note a:hover, .back-top:hover { text-decoration: underline; text-underline-offset: 4px; }
.editor-note { margin-top: 16px; padding: 12px 15px; border: 1px solid var(--line); border-radius: 8px; background: var(--white); font-size: 14px; }
.editor-note summary { color: var(--blue-dark); font-weight: 750; }
.editor-note p { margin-top: 6px; color: var(--soft-ink); }

.guide { background: #edf2ff; border-block: 1px solid #d1ddf7; }
.learning-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.learning-grid article { background: #f8faff; border: 1px solid #d3dff8; border-radius: 8px; padding: 21px; }
.learning-num { color: var(--blue-dark); font: 700 12px/1 var(--mono); letter-spacing: .09em; }
.learning-grid h3 { font-size: 20px; margin-top: 8px; }
.learning-grid p { color: var(--soft-ink); font-size: 14px; margin-top: 8px; }
.layer-grid article { display: flex; flex-direction: column; }
.layer-grid .layer-example { margin-top: auto; padding-top: 13px; }
.layer-grid .text-link { margin-top: 11px; font-size: 13px; }
.layer-note { color: var(--soft-ink); font-size: 14px; margin-top: 15px; }
.layer-note a { display: inline-block; }
.ai-guide { margin-top: 34px; padding-top: 22px; border-top: 1px solid #cbd7f3; display: grid; grid-template-columns: 1fr 2fr; gap: 24px; }
.ai-guide h3 { margin-top: 5px; font-size: 23px; }
.ai-guide dl { margin: 0; display: grid; gap: 11px; }
.ai-guide dl > div { padding-bottom: 11px; border-bottom: 1px solid #cbd7f3; }
.ai-guide dl > div:last-child { padding-bottom: 0; border-bottom: 0; }
.ai-guide dt { color: var(--ink); font-size: 15px; font-weight: 750; }
.ai-guide dd { margin: 3px 0 0; color: var(--soft-ink); font-size: 14px; }
.ai-guide dd a { display: inline-block; }
summary { cursor: pointer; }

.workflow { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 21px; }
.workflow > div { display: flex; align-items: center; gap: 10px; background: #edf2ff; border-radius: 6px; padding: 9px 13px; font-size: 14px; font-weight: 650; }
.workflow span { display: inline-grid; place-items: center; width: 23px; height: 23px; flex: 0 0 23px; color: #fff; background: var(--blue); border-radius: 50%; font: 700 12px/1 var(--mono); }
.lesson { border: 1px solid var(--line); border-radius: 8px; background: var(--white); margin-top: 11px; scroll-margin-top: 16px; }
.lesson:target { border-color: var(--blue); }
.lesson summary { display: grid; align-items: center; grid-template-columns: 40px 1fr auto 16px; gap: 12px; padding: 17px 20px; list-style: none; }
.lesson summary::-webkit-details-marker { display: none; }
.lesson summary::after { content: "+"; color: var(--blue); font: 700 20px/1 var(--mono); text-align: center; }
.lesson[open] summary::after { content: "−"; }
.lesson summary:hover strong { color: var(--blue-dark); }
.lesson-no { color: var(--blue); font: 700 18px/1 var(--mono); }
.lesson summary strong { display: block; font-size: 18px; }
.lesson summary small { display: block; color: var(--muted); margin-top: 2px; }
.lesson-level { color: var(--blue-dark); background: #edf2ff; border-radius: 4px; font-size: 12px; padding: 3px 7px; }
.lesson-body { border-top: 1px solid var(--line); padding: 18px 21px 19px 72px; color: var(--soft-ink); font-size: 14px; }
.lesson-body p strong { color: var(--ink); margin-right: 6px; }
.file-link { display: inline-block; margin-top: 10px; }
.lesson-links { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; }
.start-steps { padding-left: 23px; margin-block: 13px; }
.start-steps li + li { margin-top: 4px; }
.data-callout { padding: 8px 11px; border-left: 3px solid #9ab0f0; background: #eef3ff; }
.lesson-customization { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin-top: 12px; }
.lesson-customization label { color: var(--ink); font-weight: 750; }
.lesson-customization select { padding: 5px 8px; color: var(--ink); background: var(--white); border: 1px solid #9ab0d0; border-radius: 4px; font: inherit; }
.lesson-checks { padding-left: 20px; }
.lesson-help { color: var(--muted); }
.prompt { background: #18233e; color: #e7edff; border: 1px solid #243356; border-radius: 6px; margin-top: 14px; }
.prompt-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 44px; padding: 7px 13px; border-bottom: 1px solid #3b4967; color: #d5e0ff; font-size: 13px; }
.copy { color: #fff; background: #344a79; border: 1px solid #768ab7; border-radius: 4px; padding: 3px 10px; font-size: 12px; }
.copy:hover { background: #435d94; }
.copy:focus-visible { outline-color: #aac3ff; }
.prompt pre { margin: 0; padding: 13px; white-space: pre-wrap; overflow-wrap: anywhere; font: 14px/1.8 var(--sans); }
.accept { margin-top: 12px; }
.privacy-note { margin-top: 22px; padding: 17px 19px; border-left: 3px solid var(--blue); background: #eef3ff; }
.privacy-note p { color: var(--soft-ink); font-size: 14px; margin-top: 5px; }
.privacy-note > div { display: flex; flex-wrap: wrap; gap: 8px 17px; margin-top: 7px; font-size: 13px; }
.footer { border-top: 1px solid var(--line); }
.footer-inner { display: grid; grid-template-columns: 1fr 1fr auto; gap: 24px; align-items: start; padding-block: 25px 30px; font-size: 13px; }
.footer-brand, .footer-inner > div > span { font-weight: 800; }
.footer-brand span { color: var(--blue); }
.footer-inner p { margin-top: 5px; color: var(--muted); }

@media (max-width: 900px) {
  .wrap { width: min(100% - 48px, 1170px); }
  .hero { padding-block: 48px 40px; column-gap: 28px; }
  .hero h1 { font-size: clamp(34px, 4.8vw, 53px); }
  .section { padding-block: 53px; }
}
@media (max-width: 680px) {
  .wrap { width: min(100% - 32px, 1170px); }
  .masthead-inner { grid-template-columns: 1fr auto; gap: 12px; min-height: 0; padding-block: 13px 10px; }
  .masthead nav { grid-column: 1 / -1; grid-row: 2; border-top: 1px solid var(--line); padding-top: 9px; gap: 21px; flex-wrap: wrap; }
  .header-link { grid-column: 2; grid-row: 1; }
  .hero, .section-heading, .news-grid, .learning-grid, .ai-guide { grid-template-columns: minmax(0, 1fr); }
  .hero { gap: 25px; padding-block: 33px 30px; }
  .hero h1 { font-size: clamp(31px, 7.1vw, 48px); margin-top: 13px; }
  .hero-intro { margin-top: 16px; }
  .hero-actions { margin-top: 17px; }
  .hero-visual { width: min(100%, 450px); }
  .index-strip { grid-template-columns: 1fr; }
  .index-strip a { padding: 9px 8px; }
  .index-strip a + a { border-left: 0; border-top: 1px solid var(--line); }
  .section { padding-block: 40px; }
  .section-heading { gap: 9px; margin-bottom: 18px; }
  .ai-guide { gap: 12px; margin-top: 23px; }
  .workflow { grid-template-columns: 1fr; gap: 5px; margin-bottom: 13px; }
  .lesson summary { padding: 13px 11px; grid-template-columns: 23px 1fr auto 13px; gap: 6px; }
  .lesson summary strong { font-size: 16px; }
  .lesson summary small { font-size: 12px; }
  .lesson-body { padding: 13px; }
  .footer-inner { grid-template-columns: 1fr; gap: 15px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
