:root {
  color-scheme: dark;
  --bg: #090e19;
  --surface: #101827;
  --surface-hover: #142237;
  --line: #22334a;
  --ink: #f5f7fe;
  --muted: #aebdd2;
  --cyan: #6ae5fc;
  --warm: #ffb378;
  --content: 1184px;
  font: 16px/1.65 Inter, "Noto Sans HK", "Noto Sans CJK HK", "PingFang HK", "Microsoft JhengHei", system-ui, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); }
img { display: block; width: 100%; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { cursor: pointer; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible { outline: 2px solid var(--cyan); outline-offset: 4px; }
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }
.wrap { width: min(var(--content), calc(100% - 64px)); margin-inline: auto; }
.sr-only, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip:focus { position: fixed; top: 1rem; left: 1rem; padding: .6rem 1rem; background: var(--surface); z-index: 5; }
.header { border-bottom: 1px solid #182438; background: #0b111e; }
.header-inner, .footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
.header-inner { min-height: 72px; }
.brand { display: inline-flex; align-items: center; gap: .65rem; font-size: 1rem; font-weight: 850; line-height: 1.2; white-space: nowrap; }
.brand-copy { display: grid; gap: .16rem; }
.brand-accent { color: var(--cyan); }
.brand small { font-size: .75rem; font-weight: 650; color: var(--muted); }
.brand-mark { position: relative; width: 32px; height: 32px; border: 1px solid #29566f; border-radius: 9px; background: #102433; }
.brand-mark::before, .brand-mark::after { content: ""; position: absolute; border-radius: 50%; inset: 6px; border: 1px solid var(--cyan); transform: rotate(-38deg) scaleY(.55); }
.brand-mark::after { transform: rotate(38deg) scaleY(.55); }
.header nav, .footer nav { display: flex; align-items: center; gap: .45rem; }
.header nav a, .footer nav a { color: var(--muted); padding: .45rem .9rem; border-radius: 8px; font-size: .9rem; font-weight: 650; white-space: nowrap; }
.header nav a[aria-current], .header nav a:hover, .footer nav a:hover { color: var(--cyan); background: #132536; }
.hero { position: relative; display: grid; grid-template-columns: 43% 57%; align-items: center; min-height: 515px; padding-block: 36px; isolation: isolate; }
.hero-copy { position: relative; z-index: 1; padding-block: 24px; }
.eyebrow { display: flex; align-items: center; gap: .6rem; color: var(--cyan); font: 650 .83rem/1.5 "Geist Mono", "Courier New", "Noto Sans HK", "Noto Sans CJK HK", monospace; letter-spacing: .12em; }
.sig { height: 2px; width: 26px; background: var(--cyan); box-shadow: 0 0 10px #6ae5fc77; }
.hero h1 { color: var(--ink); margin: .8rem 0 1.05rem; font-size: clamp(3.2rem, 6.1vw, 5.35rem); line-height: 1.13; font-weight: 850; letter-spacing: -.07em; }
.hero h1 em { font-style: normal; color: var(--cyan); }
.lead { font-size: clamp(1.03rem, 1.6vw, 1.2rem); line-height: 1.8; color: var(--muted); max-width: 42ch; }
.hero .lead { max-width: 37ch; }
.hero-visual { position: relative; align-self: stretch; min-height: 340px; border-radius: 24px; overflow: hidden; background: #040a14; border: 1px solid #1c354d; }
.hero-visual img { height: 100%; position: absolute; inset: 0; object-fit: cover; object-position: 53% 50%; }
.frame-corner { position: absolute; width: 27px; height: 27px; border-color: #73dffb91; border-style: solid; pointer-events: none; }
.frame-corner.top { top: 14px; left: 14px; border-width: 1px 0 0 1px; }
.frame-corner.bottom { bottom: 14px; right: 14px; border-width: 0 1px 1px 0; }
.actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.65rem; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; padding: .65rem 1.12rem; min-height: 44px; border-radius: 9px; border: 1px solid transparent; font-size: .94rem; font-weight: 730; white-space: nowrap; }
.button.primary { color: #061324; background: var(--cyan); }
.button.primary:hover { background: #a0efff; }
.button.secondary { color: var(--ink); border-color: #344965; background: #101b2c; }
.button.secondary:hover { border-color: var(--cyan); }
.button[aria-pressed="true"] { border-color: var(--cyan); color: var(--cyan); }
.button:disabled { opacity: .6; cursor: wait; }
.home-section, .page-section { margin-bottom: 66px; }
.editorial { padding-top: 29px; border-top: 1px solid var(--line); }
.section-head { display: flex; align-items: end; justify-content: space-between; flex-wrap: wrap; gap: .9rem; margin-bottom: 1.3rem; }
.section-head h2 { margin-top: .25rem; font-weight: 800; font-size: clamp(1.7rem, 3vw, 2.45rem); line-height: 1.25; letter-spacing: -.04em; }
.section-head p:not(.eyebrow) { margin-top: .4rem; color: var(--muted); }
.text-link { color: var(--cyan); font-size: .92rem; font-weight: 700; text-underline-offset: .23em; }
.text-link:hover { text-decoration: underline; }
.grid, .news-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.news-grid { grid-template-columns: 1.25fr 1fr 1fr; }
.card { display: flex; flex-direction: column; min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 15px; overflow: hidden; transition: border-color .16s, background .16s; }
.card:hover { background: var(--surface-hover); border-color: #3d6384; }
.card-image { position: relative; background: #122239; aspect-ratio: 2 / 1; overflow: hidden; }
.card-image img { height: 100%; object-fit: cover; }
.news-grid .card-image { aspect-ratio: auto; height: clamp(135px, 14vw, 202px); }
.image-tag { position: absolute; bottom: .7rem; left: .8rem; padding: .12rem .58rem; border: 1px solid #5c8aa0; border-radius: 5px; background: #071423ee; color: #c5f8ff; font-size: .81rem; font-weight: 650; }
.featured .image-tag { border-color: #92603b; color: #ffd1ae; }
.card-body { display: flex; flex-direction: column; flex: 1; padding: 1rem 1.05rem 1.15rem; }
.card-body h3 { margin: .35rem 0 .5rem; font-size: 1.2rem; line-height: 1.4; }
.card-body p { margin-bottom: .75rem; color: var(--muted); line-height: 1.7; }
.card-body > .text-link, .tool-actions { margin-top: auto; }
.meta { display: flex; flex-wrap: wrap; justify-content: space-between; column-gap: .5rem; font-size: .82rem; color: var(--muted); }
.card-title:hover { color: var(--cyan); }
.lesson-card > a { display: flex; flex-direction: column; height: 100%; }
.category-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem; }
.category-grid a { position: relative; display: flex; align-items: flex-end; min-height: 115px; isolation: isolate; overflow: hidden; border: 1px solid var(--line); border-radius: 11px; }
.category-grid a:hover { border-color: var(--cyan); }
.category-grid img, .category-grid a::after { position: absolute; z-index: -1; inset: 0; height: 100%; object-fit: cover; }
.category-grid a::after { content: ""; background: linear-gradient(0deg, #060b15f0, #090e1933 94%); }
.category-grid span { padding: .65rem .9rem; font-weight: 750; }
.footer { border-top: 1px solid var(--line); background: #0b111e; }
.footer-inner { padding-block: 1.65rem; }
.footer p { color: var(--muted); font-size: .9rem; }
.page-head { padding-block: clamp(40px, 6vw, 83px) 32px; }
.page-head h1, .article-head h1 { margin: .4rem 0 .65rem; font-weight: 850; font-size: clamp(2.35rem, 5.8vw, 4.7rem); line-height: 1.17; letter-spacing: -.055em; }
.page-head .lead, .article-head .lead { max-width: 52ch; }
.topic-nav { display: flex; flex-wrap: wrap; gap: .55rem; margin-bottom: 2rem; }
.learn-start { display: flex; flex-wrap: wrap; gap: .75rem; margin-bottom: 1.6rem; }
.study-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
[id^="topic-"] { scroll-margin-top: 1.25rem; }
.pills { display: flex; flex-wrap: wrap; gap: .5rem; }
.news-filters { display: grid; gap: .6rem; margin-bottom: 1rem; }
.news-filter-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: .35rem .75rem; }
.news-filter-row > span { color: var(--muted); font-size: .92rem; font-weight: 650; }
.pills button, .save-button { border: 1px solid var(--line); color: var(--muted); background: var(--surface); border-radius: 8px; padding: .35rem .75rem; min-height: 38px; font-size: .91rem; font-weight: 650; }
.pills button:hover, .save-button:hover { border-color: #4a708d; color: var(--ink); }
.pills button[aria-pressed="true"], .save-button[aria-pressed="true"] { border-color: #3e8397; color: var(--cyan); background: #112c3c; }
.feed-status, .results { color: var(--muted); margin-bottom: .85rem; }
.feed-list { display: grid; gap: .65rem; }
.feed-result { padding: .8rem 1rem; border-radius: 9px; border: 1px solid var(--line); background: var(--surface); }
.feed-result h3 { font-size: 1.03rem; margin-top: .15rem; line-height: 1.45; }
.feed-result a:hover { color: var(--cyan); }
.tool-controls { display: flex; flex-wrap: wrap; align-items: end; gap: .9rem; margin-bottom: .9rem; }
.search-label { display: grid; gap: .3rem; width: min(100%, 430px); font-size: .92rem; font-weight: 650; }
.search-label input { min-width: 0; border: 1px solid #344965; border-radius: 9px; background: var(--surface); color: var(--ink); padding: .57rem .8rem; min-height: 44px; }
.search-label input::placeholder { color: #95a7bf; }
.tool-pills { margin-bottom: .65rem; }
.tool-actions { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.empty { padding: 2rem 0; color: var(--muted); }
.lesson { margin-top: clamp(35px, 6vw, 76px); }
.article-head { max-width: 790px; margin: 0 auto 1.6rem; }
.article-head .meta { margin-top: 1.2rem; }
.cover { max-width: 940px; margin-inline: auto; border-radius: 15px; border: 1px solid var(--line); overflow: hidden; aspect-ratio: 2.75 / 1; }
.cover img { height: 100%; object-fit: cover; }
.article-figure { max-width: 940px; margin: 0 auto; }
.article-figure figcaption { margin-top: .35rem; color: var(--muted); font-size: .84rem; }
.prose .button { min-width: 0; white-space: normal; text-align: center; }
.prose { max-width: 745px; margin: 2rem auto 3.5rem; }
.prose > section, .prose > aside { margin-bottom: 1.8rem; }
.prose h2 { font-size: clamp(1.35rem, 2.6vw, 1.75rem); line-height: 1.35; margin-bottom: .45rem; }
.prose p { color: var(--muted); font-size: 1.075rem; line-height: 1.85; }
.prose h2[id], .prose h3[id], .term-card { scroll-margin-top: 1.15rem; }
.lesson-contents, .lesson-terms { border: 1px solid var(--line); background: var(--surface); border-radius: 12px; margin-bottom: 1.25rem; padding: 1rem 1.15rem; }
.lesson-contents ul, .reading-links { margin: .45rem 0 0; padding-left: 1.25rem; }
.lesson-terms ul { display: flex; flex-wrap: wrap; list-style: none; gap: .45rem; margin: .7rem 0 .85rem; padding: 0; }
.lesson-terms li a { display: block; padding: .18rem .58rem; border: 1px solid #31536b; border-radius: 6px; color: var(--cyan); font-size: .88rem; }
.lesson-terms li a:hover { background: #13283d; }
.demo details { margin-top: .75rem; }
.demo summary, .term-references summary { color: var(--cyan); cursor: pointer; font-weight: 680; }
.demo details p { margin-top: .55rem; }
.article-jump { display: inline-block; margin-top: .9rem; }
.registration-section { border-top: 1px solid var(--line); padding-top: 1rem; }
.registration-section li { color: var(--muted); padding: .15rem 0; }
.guide-panel { border: 1px solid var(--line); background: var(--surface); border-radius: 12px; margin-top: 1rem; padding: .95rem 1.1rem; }
.guide-panel h3 { font-size: 1.22rem; }
.prose .registration-status { color: var(--cyan); font-weight: 750; margin: .45rem 0; }
.prose .registration-status.restricted { color: #ffd1ae; }
.prose .checked-date { font-size: .9rem; }
.guide-sources { padding-left: 1.25rem; }
.glossary-controls { display: flex; flex-wrap: wrap; gap: .65rem 1.1rem; margin-bottom: 1rem; }
.glossary-controls label { width: min(100%, 405px); }
.glossary-controls label:last-child { width: min(100%, 220px); }
.glossary-controls select { appearance: none; font: inherit; border-radius: 9px; min-height: 44px; border: 1px solid #344965; color: var(--ink); background: var(--surface); background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 52%, calc(100% - 13px) 52%; background-size: 5px 5px; background-repeat: no-repeat; padding: .5rem 2rem .5rem .8rem; }
.glossary-group { margin: 1.75rem 0 2.5rem; }
.glossary-group h2 { margin-bottom: .65rem; }
.glossary-grid { display: grid; gap: .8rem; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.term-card { display: flex; flex-direction: column; gap: .3rem; min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: .8rem .95rem; overflow-wrap: anywhere; }
.term-card:target { border-color: var(--cyan); background: #12233b; }
.term-card h3 { font-size: 1.11rem; }
.term-card h3 a:hover { color: var(--cyan); }
.term-card p { color: var(--muted); }
.term-card .term-english { color: #c4d4ea; font-size: .9rem; }
.term-card > .text-link { margin-top: auto; padding-top: .25rem; }
.term-references { margin-top: .8rem; }
.timeline h3 { font-size: 1.21rem; }
.demo { padding: 1.2rem; border: 1px solid #31536b; border-radius: 12px; background: #101f32; }
.demo .pills { margin-top: .75rem; }
.token-results { display: flex; flex-wrap: wrap; list-style: none; padding: 0; gap: .5rem; }
.token-results li { background: #172c44; border: 1px solid #3b5d7c; border-radius: 6px; padding: .23rem .65rem; color: #dff8ff; }
.demo .demo-note { font-size: .91rem; }
.timeline { list-style: none; padding: 0; }
.timeline li { display: grid; grid-template-columns: 5.7rem 1fr; gap: 1rem; border-bottom: 1px solid var(--line); padding: 1rem 0; }
.timeline time { color: var(--cyan); font-size: 1.55rem; line-height: 1.35; font-weight: 750; }
.diagram { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); list-style: none; padding: 0; gap: .65rem; margin-bottom: 1.65rem; }
.diagram li { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; display: grid; justify-items: center; text-align: center; padding: .75rem .25rem; }
.industry-diagram { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.diagram span { font-size: clamp(1.1rem, 4vw, 2rem); }
.diagram strong { font-size: .9rem; }
.learning-flow span { color: var(--cyan); font-weight: 750; }
.sources { border-top: 1px solid var(--line); padding-top: 1.15rem; }
.sources ul { padding-left: 1.25rem; }
.related { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 1030px) {
  .study-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .wrap { width: calc(100% - 48px); }
  .glossary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero { min-height: 430px; }
  .footer-inner { flex-wrap: wrap; }
}
@media (max-width: 730px) {
  .wrap { width: calc(100% - 36px); }
  .hero { grid-template-columns: 1fr; padding-block: 26px; gap: 1.2rem; min-height: 0; }
  .hero-copy { padding-block: 9px 0; }
  .hero-visual { aspect-ratio: 1.62; min-height: 0; border-radius: 16px; }
  .hero .lead { max-width: 33ch; }
  .hero h1 { font-size: clamp(3rem, 10.5vw, 4.55rem); }
  .grid, .news-grid, .category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .news-grid .featured { grid-column: 1 / -1; }
  .news-grid .card-image { height: auto; aspect-ratio: 2 / 1; }
  .news-grid .featured .card-image { aspect-ratio: 2.55 / 1; }
}
@media (max-width: 500px) {
  .glossary-grid { grid-template-columns: minmax(0, 1fr); }
  .header-inner { min-height: auto; align-items: flex-start; flex-direction: column; gap: .3rem; padding-block: .65rem; }
  .header nav { width: 100%; justify-content: space-between; gap: .15rem; }
  .header nav a, .footer nav a { padding: .4rem .55rem; }
  .home-section, .page-section { margin-bottom: 45px; }
  .news-grid, .grid { grid-template-columns: 1fr; }
  .news-grid .featured { grid-column: auto; }
  .news-grid .featured .card-image { aspect-ratio: 2 / 1; }
  .footer-inner { flex-direction: column; align-items: flex-start; gap: .45rem; }
  .footer nav { margin-left: -.55rem; }
  .cover { aspect-ratio: 1.75 / 1; }
  .industry-diagram { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .timeline li { grid-template-columns: 3.8rem 1fr; gap: .6rem; }
  .timeline time { font-size: 1.25rem; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }
