:root {
  color-scheme: light;
  --ink: #152532;
  --muted: #536878;
  --line: #d6e0e3;
  --paper: #eef1ed;
  --white: #fbfdfb;
  --dark: #152532;
  --blue: #1e76b9;
  --blue-dark: #0f5ea8;
  --blue-light: #e8f4f7;
  --warm: #bd5b31;
  font-family: "Noto Serif SC", "Source Han Serif SC", "Songti SC", STSong, SimSun, serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--white); color: var(--ink); line-height: 1.7; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: inherit; text-underline-offset: .2em; }
button, input { font: inherit; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 4px; }
::selection { color: var(--dark); background: #d6edf8; }

.skip-link { position: absolute; left: 16px; top: -80px; z-index: 100; padding: 8px 14px; background: white; }
.skip-link:focus { top: 10px; }
.container { width: min(100% - 64px, 1180px); margin-inline: auto; }
.narrow { width: min(100% - 64px, 820px); margin-inline: auto; }
.eyebrow { margin: 0 0 14px; color: var(--blue-dark); font-family: "IBM Plex Serif", Georgia, serif; font-size: .76rem; font-weight: 800; text-transform: uppercase; }
.section-heading { max-width: 750px; margin-bottom: 38px; }
.section-heading h2 { margin: 0 0 16px; font-size: 2.55rem; line-height: 1.25; font-weight: 800; }
.section-heading p { margin: 0; color: var(--muted); font-size: 1.08rem; }
.section { padding-block: 78px; }
.section:not(.section-soft) { background: linear-gradient(rgba(30,118,185,.028) 1px, transparent 1px), linear-gradient(90deg, rgba(30,118,185,.028) 1px, transparent 1px), var(--white); background-size: 32px 32px, 32px 32px, auto; }
.section-soft { background: linear-gradient(rgba(30,118,185,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(30,118,185,.04) 1px, transparent 1px), linear-gradient(180deg, #f9fbfb, var(--paper)); background-size: 32px 32px, 32px 32px, auto; }
.muted { color: var(--muted); }

.site-header { position: sticky; top: 0; z-index: 30; background: rgba(251,253,251,.96); border-bottom: 1px solid var(--line); box-shadow: 0 8px 26px rgba(21,37,50,.07); backdrop-filter: blur(14px); }
.header-inner { min-height: 66px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; white-space: nowrap; flex-shrink: 0; }
.brand img { width: auto; height: 34px; }
.brand span { border-left: 1px solid #cbd8dc; padding-left: 11px; color: var(--ink); font-family: "IBM Plex Serif", Georgia, serif; font-size: .96rem; font-weight: 700; line-height: 1.1; }
.brand small { display: block; color: var(--muted); font-family: inherit; font-size: .66rem; margin-top: 3px; }
.nav { display: flex; align-items: center; gap: 22px; }
.nav a, .mobile-menu a { text-decoration: none; font-size: .9rem; font-weight: 650; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--blue-dark); }
.nav .nav-action { background: var(--blue-dark); color: white; padding: 9px 17px; border-radius: 4px; }
.nav .nav-action:hover { background: #0b4d87; color: white; }
.mobile-menu { display: none; }

.hero { min-height: clamp(500px, 64svh, 620px); color: white; background: var(--dark) url("assets/hero-dwg-lossless.webp?v=ude-hero-v1") center center / cover no-repeat; position: relative; display: flex; align-items: center; }
.hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(8,18,26,.94), rgba(8,18,26,.80) 42%, rgba(8,18,26,.22) 76%, rgba(8,18,26,.08)); }
.hero-content { position: relative; z-index: 1; padding-block: 60px; }
.hero .eyebrow { color: #91cff2; }
.hero h1 { max-width: 640px; font-family: "IBM Plex Serif", Georgia, serif; font-size: 4.65rem; line-height: 1.07; margin: 0 0 22px; font-weight: 700; }
.hero h1 span { display: block; color: white; }
.hero-summary { max-width: 550px; margin: 0; color: #d8e7f0; font-size: 1.21rem; line-height: 1.7; }
.hero-actions, .action-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 36px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 46px; padding: 10px 20px; border-radius: 4px; font-weight: 750; text-decoration: none; line-height: 1.25; }
.button-primary { background: var(--blue-dark); color: white; }
.button-primary:hover { background: #0b4d87; }
.button-outline { color: white; border: 1px solid #a0bacb; }
.button-outline:hover { background: rgba(255,255,255,.12); }
.button-dark { color: white; background: var(--blue-dark); }
.button-dark:hover { background: #0b4d87; }
.hero-note { margin-top: 43px; display: flex; gap: 16px; align-items: center; color: #b7cbd7; font-size: .77rem; font-weight: 700; text-transform: uppercase; }
.hero-note::before { content: ""; width: 37px; height: 1px; background: #91cff2; }

#scenarios, #versions { scroll-margin-top: 66px; }
.version-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 54px; align-items: start; }
.version-block { min-width: 0; border-top: 2px solid var(--blue-dark); padding-top: 17px; }
.version-block h3 { margin: 0 0 15px; font-size: 1.42rem; }
.version-table { min-width: 0; width: 100%; table-layout: fixed; border-collapse: collapse; font-size: .91rem; }
.version-table th { background: rgba(30,118,185,.07); color: var(--ink); }
.version-table th, .version-table td { padding: 12px 11px; border-bottom: 1px solid var(--line); }
.version-table td:first-child { width: 34%; font-family: "IBM Plex Serif", Georgia, serif; font-weight: 700; color: var(--blue-dark); }
.version-caption { margin: 17px 0 0; color: var(--muted); font-size: .83rem; }

.use-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.use-grid > div { border-top: 1px solid var(--line); padding-top: 19px; }
.use-grid h3 { margin: 0 0 10px; font-size: 1.18rem; }
.use-grid p { margin: 0; color: var(--muted); }

.scenario-heading { margin-inline: auto; max-width: 810px; text-align: center; }
.scenario-tabs { display: flex; align-items: stretch; justify-content: center; gap: 8px; margin-bottom: 40px; border-bottom: 1px solid var(--line); }
.scenario-tabs button { min-height: 54px; padding: 12px 18px 15px; border: 0; border-bottom: 3px solid transparent; background: transparent; color: var(--muted); cursor: pointer; font-size: .94rem; font-weight: 750; line-height: 1.3; }
.scenario-tabs button:hover { color: var(--blue-dark); }
.scenario-tabs button[aria-selected="true"] { border-bottom-color: var(--blue-dark); background: var(--blue-light); color: var(--blue-dark); }
.scenario-stage { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); align-items: center; gap: clamp(38px, 6vw, 88px); min-height: 390px; }
.scenario-copy { min-width: 0; }
.scenario-panel { padding-block: 18px; }
.scenario-panel[hidden] { display: none; }
.scenario-number { margin: 0 0 18px; color: var(--warm); font-size: .8rem; font-weight: 800; }
.scenario-panel h3 { margin: 0 0 19px; font-size: 2.05rem; line-height: 1.3; }
.scenario-panel p:not(.scenario-number) { max-width: 510px; margin: 0; color: var(--muted); font-size: 1.04rem; line-height: 1.9; }
.scenario-gallery[hidden], .scenario-visual[hidden] { display: none; }
.scenario-gallery { min-width: 0; }
.scenario-gallery-feature { margin: 0; }
.scenario-gallery-main { display: block; width: 100%; aspect-ratio: 3012 / 1355; overflow: hidden; background: #0c1016; border: 1px solid #cad5d9; border-radius: 4px; cursor: zoom-in; }
.scenario-gallery-main img { width: 100%; height: 100%; object-fit: contain; }
.scenario-gallery-feature figcaption { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 11px; font-size: .88rem; }
.scenario-gallery-title { font-weight: 750; }
.scenario-gallery-original { color: var(--blue-dark); text-decoration: none; white-space: nowrap; }
.scenario-gallery-original:hover { text-decoration: underline; }
.scenario-carousel-controls, .scenario-carousel-dots { display: flex; align-items: center; justify-content: center; }
.scenario-carousel-controls { gap: 10px; margin-top: 12px; }
.scenario-carousel-dots { gap: 4px; }
.scenario-carousel-arrow, .scenario-carousel-dot { display: grid; place-items: center; flex: 0 0 36px; width: 36px; height: 36px; padding: 0; cursor: pointer; }
.scenario-carousel-arrow { border: 1px solid var(--line); border-radius: 50%; background: var(--white); color: var(--blue-dark); font-size: 1.2rem; line-height: 1; }
.scenario-carousel-arrow:hover { border-color: var(--blue-dark); background: var(--blue-light); }
.scenario-carousel-dot { border: 0; background: transparent; }
.scenario-carousel-dot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #9aadb8; }
.scenario-carousel-dot[aria-pressed="true"]::before { width: 10px; height: 10px; background: var(--blue-dark); }
.scenario-visual { min-width: 0; margin: 0; }
.scenario-visual img { width: 100%; height: auto; aspect-ratio: 1135 / 800; object-fit: cover; border: 1px solid #cad5d9; border-radius: 4px; }
.scenario-visual figcaption { margin-top: 10px; color: var(--muted); font-size: .78rem; text-align: right; }

.boundary-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 65px; }
.boundary-grid h3 { font-size: 1.4rem; margin: 0 0 13px; }
.boundary-grid p { margin: 0 0 18px; color: var(--muted); }
.boundary-more { margin-top: 35px; }
.check-list { padding: 0; list-style: none; margin: 0; }
.check-list li { padding: 11px 0 11px 29px; border-top: 1px solid var(--line); position: relative; }
.check-list li::before { content: "+"; color: var(--blue-dark); font-weight: 800; position: absolute; left: 0; }
.limitation-list li::before { content: "·"; color: var(--warm); font-size: 1.6rem; line-height: .8; }

.closing { background: var(--blue-light); padding-block: 70px; border-top: 1px solid #cbdfe9; }
.closing-inner { display: flex; justify-content: space-between; align-items: end; gap: 40px; }
.closing h2 { font-size: 2.55rem; line-height: 1.22; margin: 0; }
.closing p { margin: 12px 0 0; max-width: 580px; color: var(--muted); }
.site-footer { padding: 48px 0 28px; background: #f3f6f4; color: var(--ink); border-top: 1px solid var(--line); }
.site-footer .brand span { color: var(--ink); border-color: #cbd8dc; }
.footer-top { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 40px; padding-bottom: 45px; }
.footer-top p { max-width: 390px; color: var(--muted); font-size: .88rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 15px 27px; align-content: start; }
.footer-links a { text-decoration: none; color: var(--muted); font-size: .88rem; }
.footer-links a:hover { color: var(--blue-dark); }
.footer-bottom { border-top: 1px solid var(--line); padding-top: 23px; color: var(--muted); font-size: .76rem; }

.page-intro { padding: 64px 0 63px; background: linear-gradient(rgba(30,118,185,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(30,118,185,.05) 1px, transparent 1px), linear-gradient(135deg, #fbfdfb, #e8f4f7); background-size: 32px 32px, 32px 32px, auto; border-bottom: 1px solid var(--line); }
.breadcrumbs { display: flex; gap: 9px; flex-wrap: wrap; color: #607382; font-size: .78rem; margin-bottom: 31px; }
.breadcrumbs a { text-decoration: none; }
.breadcrumbs a:hover { color: var(--blue-dark); }
.page-intro h1 { margin: 0 0 18px; font-size: 3.3rem; line-height: 1.2; }
.page-intro .lead { max-width: 790px; margin: 0; font-size: 1.09rem; color: var(--muted); }
.page-intro .eyebrow { margin-bottom: 12px; }
.api-intro { padding-bottom: 55px; }
.api-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: clamp(42px, 7vw, 94px); align-items: start; padding-top: 62px; padding-bottom: 82px; }
.api-sidebar { position: sticky; top: 92px; min-width: 0; }
.api-sidebar-title { margin: 0 0 13px; color: var(--ink); font-size: .78rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.api-sidebar nav { display: grid; gap: 2px; border-left: 1px solid var(--line); }
.api-sidebar a { display: block; padding: 7px 0 7px 15px; color: var(--muted); font-size: .88rem; line-height: 1.4; text-decoration: none; }
.api-sidebar a:hover, .api-sidebar a:focus { color: var(--blue-dark); border-left: 2px solid var(--blue-dark); margin-left: -1px; }
.api-doc { min-width: 0; max-width: 820px; }
.api-doc > * + * { margin-top: 23px; }
.api-doc h1 { display: none; }
.api-doc h2 { margin: 52px 0 15px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 1.82rem; line-height: 1.3; scroll-margin-top: 94px; }
.api-doc h3 { margin: 30px 0 8px; font-size: 1.14rem; line-height: 1.4; scroll-margin-top: 94px; }
.api-doc p { margin: 0; color: var(--muted); }
.api-doc ul { margin: 0; padding-left: 23px; color: var(--muted); }
.api-doc li + li { margin-top: 7px; }
.api-doc a { color: var(--blue-dark); }
.api-doc code, .api-code { font-family: Consolas, "SFMono-Regular", "Cascadia Code", monospace; }
.api-doc :not(pre) > code { display: inline-block; max-width: 100%; padding: 1px 5px; overflow-wrap: anywhere; background: #eaf2f6; border-radius: 3px; color: #15466e; font-size: .88em; }
.api-code { margin: 24px 0 0; padding: 21px 23px; overflow-x: auto; border-radius: 5px; background: #182d3c; color: #e3edf2; font-size: .84rem; line-height: 1.67; tab-size: 2; }
.api-code code { color: inherit; }
.api-table-wrap { margin: 24px 0 0; overflow-x: auto; border-top: 2px solid var(--ink); }
.api-table { width: 100%; min-width: 590px; border-collapse: collapse; font-size: .89rem; }
.api-table th { text-align: left; background: #eaf2f6; color: var(--ink); font-weight: 800; }
.api-table th, .api-table td { padding: 12px 14px; vertical-align: top; border-bottom: 1px solid var(--line); }
.api-table td:first-child { width: 31%; font-weight: 750; color: var(--ink); }
.api-table tr:hover td { background: rgba(232,244,247,.42); }
.api-doc blockquote { margin: 24px 0 0; padding: 17px 20px; border-left: 3px solid var(--warm); background: #f8f5ef; color: var(--muted); }
.api-doc hr { border: 0; border-top: 1px solid var(--line); }
.content-stack > * + * { margin-top: 50px; }
.content-stack h2 { margin: 0 0 16px; font-size: 1.8rem; line-height: 1.3; }
.content-stack h3 { margin: 25px 0 8px; font-size: 1.14rem; }
.content-stack p { color: var(--muted); margin: 0 0 14px; }
.content-stack ul, .content-stack ol { padding-left: 23px; }
.content-stack li { margin-bottom: 9px; }
.content-stack a { color: var(--blue-dark); }
.content-stack code, .content-stack pre { font-family: Consolas, "SFMono-Regular", monospace; }
.content-stack :not(pre) > code { background: #eaf2f6; padding: 2px 5px; border-radius: 3px; font-size: .87em; overflow-wrap: anywhere; }
.code-block { background: #182d3c; color: #e3edf2; border-radius: 5px; padding: 22px 26px; overflow-x: auto; font-size: .84rem; line-height: 1.65; }
.code-caption { margin: 7px 0 0 !important; font-size: .82rem; }
.table-wrap { overflow-x: auto; border-top: 2px solid var(--ink); }
table { width: 100%; border-collapse: collapse; min-width: 680px; font-size: .9rem; }
th { text-align: left; background: #eaf2f6; color: var(--ink); }
th, td { padding: 17px 16px; vertical-align: top; border-bottom: 1px solid var(--line); }
td:first-child { font-weight: 750; width: 170px; }
.status-tag { color: var(--blue-dark); font-weight: 800; white-space: nowrap; }
.status-partial { color: #9b563e; }
.note { padding: 22px 26px; border-left: 3px solid var(--warm); background: #f8f5ef; color: var(--muted); }
.note p { margin: 0; }
.steps { counter-reset: step; display: grid; grid-template-columns: repeat(3,1fr); gap: 38px; margin: 40px 0 0; padding: 0; list-style: none; }
.steps li { border-top: 1px solid var(--line); padding-top: 18px; }
.steps li::before { counter-increment: step; content: "0" counter(step); display: block; color: var(--warm); font-weight: 800; margin-bottom: 15px; }
.steps h3 { margin: 0 0 7px; font-size: 1.14rem; }
.steps p { color: var(--muted); margin: 0; }
.two-column { display: grid; grid-template-columns: 1fr 1fr; gap: 65px; }
.two-column h2 { margin: 0 0 12px; font-size: 1.6rem; }
.two-column h3 { margin: 0 0 14px; font-size: 1.25rem; }
.two-column p { color: var(--muted); margin: 0 0 14px; }
.detail-list { list-style: none; margin: 0; padding: 0; }
.detail-list li { padding: 12px 0; border-top: 1px solid var(--line); }

@media (max-width: 900px) {
  .container, .narrow { width: min(100% - 40px, 1180px); }
  .nav { gap: 13px; }
  .hero { background-position: center center; }
  .hero h1 { font-size: 4.1rem; }
  .section-heading h2, .closing h2 { font-size: 2.3rem; }
  .scenario-tabs { gap: 0; }
  .scenario-tabs button { padding-inline: 12px; font-size: .88rem; }
  .scenario-stage { gap: 30px; }
  .scenario-panel h3 { font-size: 1.8rem; }
  .page-intro h1 { font-size: 2.85rem; }
  .boundary-grid, .two-column { gap: 40px; }
  .api-layout { gap: 34px; }
  .api-sidebar { position: static; }
  .api-sidebar nav { display: flex; flex-wrap: wrap; border-left: 0; border-bottom: 1px solid var(--line); padding-bottom: 8px; gap: 3px 10px; }
  .api-sidebar a { padding: 6px 0; }
  .api-sidebar a:hover, .api-sidebar a:focus { margin-left: 0; border-left: 0; }
}

@media (max-width: 680px) {
  .container, .narrow { width: min(100% - 32px, 1180px); }
  .header-inner { min-height: 62px; }
  .brand { gap: 8px; }
  .brand img { height: 28px; }
  .brand span { font-size: .82rem; padding-left: 8px; }
  .brand small { font-size: .6rem; }
  .nav { display: none; }
  .mobile-menu { display: block; position: relative; }
  .mobile-menu summary { list-style: none; cursor: pointer; width: 36px; height: 36px; display: grid; place-items: center; font-size: 1.2rem; font-weight: 750; border: 1px solid var(--line); border-radius: 4px; }
  .mobile-menu summary::-webkit-details-marker { display: none; }
  .mobile-menu nav { position: absolute; right: 0; top: 38px; min-width: 170px; padding: 8px; background: white; border: 1px solid var(--line); box-shadow: 0 14px 35px rgba(21,37,50,.15); }
  .mobile-menu nav a { display: block; padding: 10px 12px; }
  .hero { min-height: clamp(470px, 67svh, 560px); background-position: center center; align-items: flex-start; }
  .hero::before { background: linear-gradient(90deg, rgba(12,29,43,.93), rgba(12,29,43,.70)); }
  .hero-content { padding-top: 65px; }
  .hero h1 { font-size: 2.85rem; }
  .hero-summary { font-size: 1rem; max-width: 460px; }
  .hero-actions { margin-top: 27px; }
  .hero-note { margin-top: 40px; }
  .section { padding-block: 70px; }
  .section-heading { margin-bottom: 33px; }
  .section-heading h2, .closing h2 { font-size: 2rem; }
  .scenario-heading { margin-bottom: 24px; }
  .scenario-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 28px; }
  .scenario-tabs button { min-width: 0; padding-inline: 8px; }
  .scenario-stage { grid-template-columns: 1fr; gap: 22px; min-height: 0; }
  .scenario-panel { padding-block: 0; }
  .scenario-panel h3 { font-size: 1.75rem; }
  .scenario-panel p:not(.scenario-number) { font-size: 1rem; }
  .scenario-visual figcaption { text-align: left; }
  .page-intro h1 { font-size: 2.35rem; }
  .boundary-grid, .two-column, .version-grid, .use-grid { grid-template-columns: 1fr; gap: 30px; }
  .api-layout { display: block; padding-top: 43px; padding-bottom: 60px; }
  .api-sidebar { margin-bottom: 42px; }
  .api-sidebar-title { margin-bottom: 9px; }
  .api-sidebar nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
  .api-sidebar a { padding: 8px 0; }
  .api-doc h2 { margin-top: 44px; font-size: 1.55rem; }
  .api-code { padding: 17px; font-size: .77rem; }
  .api-table { min-width: 540px; }
  .closing { padding-block: 62px; }
  .closing-inner { display: block; }
  .closing .button { margin-top: 24px; }
  .page-intro { padding: 54px 0 57px; }
  .breadcrumbs { margin-bottom: 25px; }
  .steps { grid-template-columns: 1fr; gap: 24px; }
  .code-block { padding: 19px; }
}

@media (max-width: 380px) {
  .hero h1 { font-size: 2.5rem; }
  .hero-actions .button { width: 100%; }
  .hero-note { margin-top: 28px; }
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
