:root {
  color-scheme: light;
  --page: #f8f9fc;
  --white: #fff;
  --ink: #141b30;
  --muted: #536078;
  --line: #dfe5ef;
  --blue: #244bd0;
  --navy: #0e1735;
  --pale: #eef2fe;
  --font: Inter, "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(--page); color: var(--ink); font-family: var(--font); font-size: 1rem; line-height: 1.7; }
body:has(dialog[open]) { overflow: hidden; }
h1, h2, h3, p { margin: 0; }
a { color: inherit; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 3px solid #5377f8; outline-offset: 4px; }
[hidden] { display: none !important; }
.shell { width: min(1200px, calc(100% - 72px)); margin-inline: auto; }
.visually-hidden, .skip-link:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link:focus { position: fixed; z-index: 5; top: 14px; left: 14px; background: var(--white); padding: 8px 16px; }

.site-header { border-bottom: 1px solid var(--line); background: var(--white); }
.header-inner { min-height: 76px; display: flex; align-items: center; gap: 47px; }
.brand { display: inline-flex; flex: none; align-items: center; gap: 11px; text-decoration: none; font-size: 1.24rem; font-weight: 750; line-height: 1; letter-spacing: -.035em; }
.brand img { border-radius: 9px; }
.header-inner nav { display: flex; align-items: center; gap: 34px; }
.header-inner nav a { color: var(--muted); text-decoration: none; font-size: .9375rem; font-weight: 600; }
.header-inner nav a:hover, .header-inner nav a[aria-current] { color: var(--blue); }
.search-trigger { margin-left: auto; display: flex; align-items: center; justify-content: center; gap: 9px; min-height: 40px; min-width: 82px; padding: 6px 13px; background: var(--white); border: 1px solid var(--line); border-radius: 8px; font-size: .875rem; }
.search-trigger:hover { background: var(--pale); }
.search-icon { position: relative; display: inline-block; width: 13px; height: 13px; border: 1.6px solid currentColor; border-radius: 50%; margin-right: 3px; }
.search-icon::after { content: ""; position: absolute; height: 1.6px; width: 6px; background: currentColor; transform: rotate(48deg); transform-origin: left center; top: 9px; left: 9px; border-radius: 2px; }

.hero { position: relative; isolation: isolate; overflow: hidden; margin-top: 40px; min-height: 486px; display: flex; align-items: center; border-radius: 17px; background: var(--navy); color: var(--white); }
.hero-image { z-index: -2; position: absolute; inset: 0 0 0 auto; width: 75%; height: 100%; object-fit: cover; object-position: 64% 54%; }
.hero::before { content: ""; position: absolute; z-index: -1; inset: 0; background: linear-gradient(90deg, #0e1735 19%, #0e1735 30%, #0e1735e8 38%, #0e17355e 60%, #0e173500 78%); }
.hero-content { width: min(100%, 560px); padding: 48px 0 50px clamp(36px, 5.55vw, 84px); }
.hero-kicker { color: #c0ceff; font-size: .875rem; font-weight: 650; letter-spacing: .11em; margin-bottom: 18px; }
.hero h1 { font-size: clamp(2.55rem, 5.15vw, 4.45rem); font-weight: 720; letter-spacing: -.065em; line-height: 1.14; }
.hero-summary { margin-top: 23px; color: #e0e7fb; line-height: 1.8; max-width: 22em; font-size: 1rem; }
.button { display: inline-flex; justify-content: center; align-items: center; min-height: 45px; padding: 8px 18px; border: 1px solid transparent; border-radius: 8px; font-size: .9375rem; font-weight: 680; text-decoration: none; }
.hero .button { margin-top: 30px; }
.button-light { background: var(--white); color: var(--ink); }
.button-light:hover { background: #dce5ff; }
.button-blue { color: var(--white); background: var(--blue); }
.button-blue:hover { background: #1a36a7; }

.articles { margin-top: 60px; scroll-margin-top: 24px; }
.section-heading { padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.section-heading h2, .about h2 { font-size: clamp(1.4rem, 2.5vw, 1.9rem); font-weight: 730; letter-spacing: -.035em; }
.feature { display: grid; grid-template-columns: minmax(0, .92fr) minmax(0, 1fr); gap: clamp(24px, 5.3vw, 84px); align-items: center; padding-block: 26px 36px; }
.feature-image { background: #c9d5f7; border-radius: 11px; overflow: hidden; aspect-ratio: 1.86; display: block; }
.feature-image img { width: 100%; height: 100%; object-fit: cover; object-position: center 48%; transition: transform 260ms ease; }
.feature-image:hover img { transform: scale(1.035); }
.metadata { display: flex; align-items: center; flex-wrap: wrap; gap: 9px 12px; color: var(--muted); font-size: .875rem; line-height: 1.6; }
.category { color: var(--blue); font-weight: 690; }
.separator { width: 3px; height: 3px; flex: 0 0 3px; border-radius: 50%; background: #8492aa; }
.feature h3 { max-width: 19em; margin-top: 12px; font-size: clamp(1.35rem, 2.55vw, 2.05rem); line-height: 1.42; font-weight: 730; letter-spacing: -.038em; }
.feature h3 a { text-decoration: none; }
.feature h3 a:hover { color: var(--blue); }
.feature-copy > p:not(.metadata) { margin-top: 15px; max-width: 30em; color: var(--muted); }
.text-link { display: inline-block; margin-top: 20px; color: var(--blue); font-weight: 680; text-underline-offset: 5px; text-decoration-color: #91a3e2; }
.text-link:hover { text-decoration-color: currentColor; }
.about { display: grid; grid-template-columns: 1fr 1fr; align-items: baseline; gap: 30px; border-top: 1px solid var(--line); padding-block: 39px 65px; scroll-margin-top: 28px; }
.about p { max-width: 31em; color: var(--muted); }
.site-footer { border-top: 1px solid var(--line); }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 18px; min-height: 82px; color: var(--muted); font-size: .875rem; }
.footer-brand { color: var(--ink); font-size: 1rem; }
.footer-brand img { border-radius: 7px; }
.footer-details { display: flex; flex-wrap: wrap; justify-content: end; gap: 2px 21px; }
.footer-details a { text-decoration: none; }
.footer-details a:hover { text-decoration: underline; }

.search-dialog { margin: min(18vh, 120px) auto auto; width: min(calc(100% - 36px), 560px); max-height: 70vh; border: 1px solid var(--line); border-radius: 14px; padding: 23px; background: var(--white); color: var(--ink); box-shadow: 0 22px 72px #111d4632; }
.search-dialog::backdrop { background: #11183088; }
.dialog-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 13px; gap: 12px; }
.dialog-header h2 { font-size: 1.18rem; }
.icon-close { width: 39px; height: 39px; border: 1px solid var(--line); border-radius: 8px; line-height: 1; background: var(--white); font-size: 1.45rem; }
.icon-close:hover { background: var(--pale); }
.search-dialog input { width: 100%; min-height: 46px; border: 1px solid #b9c5db; border-radius: 8px; padding: 9px 12px; background: var(--white); }
.search-result { display: grid; gap: 3px; background: var(--pale); margin-top: 16px; border-radius: 8px; text-decoration: none; padding: 12px 14px; font-weight: 640; }
.search-result:hover { background: #e5ebff; }
.search-result small, .search-empty { color: var(--muted); font-size: .875rem; }
.search-empty { margin-top: 16px; }

.reading { padding-block: 29px 60px; }
.breadcrumb { display: inline-block; color: var(--muted); font-size: .875rem; text-decoration: none; margin-bottom: 29px; }
.breadcrumb:hover { color: var(--blue); text-decoration: underline; }
.article-heading { max-width: 940px; }
.article-heading h1 { margin-top: 15px; max-width: 20em; font-size: clamp(2rem, 5.6vw, 3.68rem); font-weight: 730; line-height: 1.23; letter-spacing: -.05em; }
.article-heading .intro { margin-top: 21px; max-width: 40em; color: var(--muted); font-size: clamp(1rem, 2vw, 1.16rem); line-height: 1.8; }
.article-cover { margin-top: 31px; width: 100%; height: clamp(200px, 30vw, 375px); object-fit: cover; object-position: center 46%; border-radius: 12px; background: #c9d5f7; }
.read-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(170px, 235px); justify-content: space-between; gap: clamp(40px, 8vw, 120px); margin-top: 47px; }
.contents { align-self: start; position: sticky; top: 25px; border-left: 1px solid var(--line); padding-left: 22px; }
.contents p { font-weight: 720; font-size: .94rem; }
.contents ul { padding: 0; list-style: none; margin-block: 12px 0; }
.contents li + li { margin-top: 9px; }
.contents a { font-size: .875rem; color: var(--muted); text-decoration: none; display: inline-block; }
.contents a:hover, .contents a[aria-current] { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }
.article-body { min-width: 0; max-width: 760px; font-size: 1rem; line-height: 1.87; }
.article-body section { scroll-margin-top: 24px; }
.article-body section + section { margin-top: 43px; }
.article-body h2 { font-size: clamp(1.32rem, 3vw, 1.72rem); line-height: 1.45; letter-spacing: -.035em; }
.article-body h3 { font-size: 1.06rem; margin-top: 22px; }
.article-body h2 + p, .article-body h3 + p { margin-top: 10px; }
.article-body p + p { margin-top: 14px; }
.article-body li + li { margin-top: 8px; }
.article-body li::marker { color: var(--blue); font-weight: 650; }
.article-body ul, .article-body ol { padding-left: 1.5em; margin-block: 12px 18px; }
.article-body a:not(.button) { color: var(--blue); text-underline-offset: 4px; }
.download-box { padding: 18px 21px; margin-block: 17px 20px; background: var(--pale); border: 1px solid #dae3fa; border-radius: 10px; }
.download-box .button { margin-top: 10px; }
.inline-code { padding: 2px 5px; border-radius: 4px; background: #e9eefc; font: .92em "Cascadia Mono", Consolas, monospace; overflow-wrap: anywhere; }
.table-scroll { width: 100%; overflow-x: auto; margin-block: 13px 15px; }
.table-scroll table { width: 100%; min-width: 342px; border-spacing: 0; font-size: .925rem; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.table-scroll th, .table-scroll td { padding: 8px 12px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.table-scroll th { font-weight: 680; background: var(--pale); }
.table-scroll tbody tr:last-child td { border-bottom: 0; }
.code-panel { margin-block: 17px; border: 1px solid var(--line); border-radius: 10px; background: var(--white); overflow: hidden; }
.code-panel summary { cursor: pointer; padding: 12px 15px; font-weight: 680; }
.code-panel[open] summary { border-bottom: 1px solid var(--line); }
.code-toolbar { display: flex; gap: 12px; align-items: center; padding: 10px 14px; background: #eff3fc; }
.copy-button { background: var(--white); border: 1px solid #cdd6eb; border-radius: 6px; padding: 5px 10px; font-size: .875rem; min-height: 36px; }
.copy-button:hover { background: #e5ebff; }
.copy-status { color: var(--muted); font-size: .875rem; }
.code-panel pre { margin: 0; overflow: auto; max-height: 460px; padding: 16px; font: .875rem/1.65 "Cascadia Mono", Consolas, monospace; color: #e6ecff; background: #121b36; tab-size: 4; }
.code-panel .code-download { padding: 8px 14px; display: block; font-size: .875rem; }
.article-end { margin-top: 35px; border-top: 1px solid var(--line); padding-top: 17px; }

@media (max-width: 850px) {
  .shell { width: calc(100% - 48px); }
  .hero { min-height: 420px; }
  .hero-image { width: 83%; object-position: 61% 50%; }
  .hero::before { background: linear-gradient(90deg, #0e1735 10%, #0e1735 24%, #0e1735ce 47%, #0e173500 86%); }
  .hero-content { padding-left: 37px; }
  .read-grid { grid-template-columns: minmax(0, 1fr); gap: 23px; margin-top: 25px; }
  .contents { grid-row: 1; position: static; background: var(--pale); border: 0; border-radius: 8px; padding: 12px 15px; }
  .contents ul { display: flex; flex-wrap: wrap; gap: 5px 15px; margin-top: 5px; }
  .contents li + li { margin: 0; }
}
@media (max-width: 620px) {
  .shell { width: calc(100% - 36px); }
  .header-inner { min-height: 67px; gap: 19px; }
  .brand { font-size: 1.065rem; gap: 7px; }
  .brand img { width: 29px; height: 29px; border-radius: 7px; }
  .header-inner nav { gap: 15px; }
  .header-inner nav a { font-size: .875rem; }
  .search-trigger { min-width: 34px; padding-inline: 9px; gap: 6px; }
  .hero { min-height: 0; margin-top: 20px; display: block; padding-bottom: 162px; border-radius: 12px; }
  .hero-image { width: 100%; height: 80%; inset: auto 0 0; object-position: 68% bottom; }
  .hero::before { background: linear-gradient(180deg, #0e1735 16%, #0e1735 39%, #0e1735bc 54%, #0e173500 78%); }
  .hero-content { padding: 30px 23px 0; }
  .hero-kicker { margin-bottom: 14px; }
  .hero h1 { font-size: clamp(2.2rem, 9vw, 3.1rem); line-height: 1.17; }
  .hero-summary { margin-top: 16px; max-width: 20em; font-size: .956rem; }
  .hero .button { margin-top: 18px; }
  .articles { margin-top: 37px; }
  .feature { grid-template-columns: minmax(0, 1fr); gap: 18px; padding-block: 20px 30px; }
  .feature-image { aspect-ratio: 1.65; }
  .feature h3 { margin-top: 8px; }
  .feature-copy > p:not(.metadata) { margin-top: 9px; }
  .text-link { margin-top: 13px; }
  .about { grid-template-columns: 1fr; gap: 8px; padding-block: 27px 38px; }
  .reading { padding-block: 18px 38px; }
  .breadcrumb { margin-bottom: 21px; }
  .article-cover { margin-top: 20px; }
  .article-body section + section { margin-top: 33px; }
}
@media (max-width: 360px) {
  .header-inner { gap: 12px; }
  .header-inner nav { gap: 11px; }
  .search-trigger > span:last-child { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
