@import url("design/kokei-tokens.css");

@font-face {
  font-family: "Archivo Black";
  src: url("assets/ArchivoBlack-Regular.woff") format("woff");
  font-weight: 400;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #f6f8fb;
  --ink: #121b2b;
  --muted: #4e5a6c;
  --rule: #cbd3df;
  --signal: #456cde;
  --blue-dark: #294888;
  --blue-paper: #eaf0fd;
  --sans: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, "PingFang TC", "Noto Sans CJK TC", sans-serif;
  --display: "Archivo Black", var(--sans);
  --mono: ui-monospace, "SFMono-Regular", Consolas, monospace;
  --gutter: clamp(20px, 5vw, 80px);
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-synthesis: none;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
p, h1, h2, h3, figure, dl, dd { margin: 0; }
a { color: inherit; text-underline-offset: .25em; }
a:hover { color: var(--signal); }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 2px solid var(--signal); outline-offset: 5px; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; text-wrap: balance; letter-spacing: -.035em; line-height: 1.12; }
h1:lang(zh-Hant), h2:lang(zh-Hant), h3:lang(zh-Hant) { font-family: var(--sans); font-weight: 900; letter-spacing: -.045em; }
.shell { width: min(calc(100% - 2 * var(--gutter)), 1240px); margin-inline: auto; }
section[id], article[id], #ief { scroll-margin-top: 28px; }
.skip { position: absolute; z-index: 5; top: 6px; left: var(--gutter); transform: translateY(-160%); padding: 12px; background: white; }
.skip:focus { transform: translateY(0); }
.mast { display: flex; align-items: center; gap: 24px; min-height: 84px; border-bottom: 1px solid var(--rule); }
.brand { display: inline-flex; align-items: center; min-height: 44px; font-size: 14px; font-weight: 800; text-decoration: none; white-space: nowrap; }
.brand img { width: 112px; }
.mast-nav { display: flex; align-items: center; gap: clamp(18px, 3vw, 44px); margin-left: auto; }
.mast-nav a { display: flex; align-items: center; min-height: 44px; font-size: 14px; text-decoration: none; font-weight: 600; }
.mast-nav a:hover { text-decoration: underline; }
.language { display: flex; align-items: center; gap: 2px; }
.language button { min-height: 44px; min-width: 44px; border: 0; background: transparent; padding: 4px; color: var(--muted); font: 700 12px var(--sans); cursor: pointer; }
.language button[aria-pressed="true"] { color: var(--signal); text-decoration: underline; text-underline-offset: 6px; }
.language button:hover { color: var(--ink); }
.footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; border-top: 1px solid var(--ink); padding-block: 24px 40px; font-size: 13px; }
.footer a { display: flex; align-items: center; min-height: 44px; }
.section-space { padding-block: clamp(56px, 8vw, 112px); }
.section-label { color: var(--muted); font-size: 14px; font-weight: 700; }
.text-link, .action, .download-link { display: inline-flex; align-items: center; min-height: 44px; font-size: 14px; font-weight: 700; }
.action { margin-top: 12px; }
.download-link { color: var(--muted); font-size: 13px; }

/* One wordmark leads the home page; navigation follows the identity. */
.home-mast { padding-top: clamp(30px, 5vw, 66px); }
.brand-stage { padding-bottom: clamp(24px, 4vw, 44px); }
.hero-logo { position: relative; width: 94.5%; margin-block: 0 clamp(24px, 3vw, 40px); }
.hero-logo img { width: 100%; }
.blue-tab { position: absolute; top: 0; left: 103%; width: 1.6%; aspect-ratio: 1; background: var(--signal); clip-path: polygon(0 0,60% 0,60% 40%,100% 40%,100% 100%,0 100%); }
.hero-signature { border-top: 1px solid var(--rule); padding-top: 18px; }
.hero-signature h1 { font-size: clamp(14px, 2.25vw, 28px); letter-spacing: .105em; white-space: nowrap; }
sup { font: .42em var(--sans); vertical-align: super; margin-left: 3px; letter-spacing: 0; }
.hero-signature > p { color: var(--signal); font-size: clamp(10px, 1.1vw, 14px); font-weight: 800; letter-spacing: .25em; margin-top: 12px; }
.hero-summary { max-width: 51ch; margin-top: 24px; }
.hero-description { font-size: clamp(15px, 1.5vw, 18px); font-weight: 600; line-height: 1.65; text-wrap: pretty; }
.home-navigation { display: flex; align-items: center; justify-content: space-between; gap: 24px; border-block: 1px solid var(--rule); }
.home-navigation .mast-nav { margin-left: 0; }
.home-navigation .mast-nav a { min-height: 58px; }
.home-navigation .language { flex: none; }

.about { border-bottom: 1px solid var(--rule); }
.about-grid { display: grid; grid-template-columns: 1fr 1.12fr; gap: clamp(32px, 5vw, 64px); margin-top: 28px; align-items: start; }
.about h2 { font-size: clamp(34px, 3.8vw, 50px); margin-bottom: 28px; }
.about-copy { font-size: 16px; line-height: 1.85; }
.about-copy p + p { margin-top: 20px; color: var(--muted); }

/* Explanatory plates use the signal-blue ink; these are not research results. */
.imaging-plate { color: var(--signal); border-block: 1px solid var(--signal); background: var(--blue-paper); margin-top: 5px; }
.plate-heading { color: var(--blue-dark); display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; font-size: 13px; font-weight: 750; }
.plate-cross { font: 22px var(--mono); line-height: 1; }
.optical-drawing { display: block; width: 100%; height: auto; }
.chain-labels { color: var(--blue-dark); display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; margin: 18px 20px 16px; font-size: 12px; font-weight: 750; line-height: 1.5; }
.chain-labels > span { border-top: 1px solid #b5c6ef; padding-top: 10px; }
.imaging-plate figcaption { border-top: 1px solid #b5c6ef; padding: 12px 20px; font-size: 11px; line-height: 1.6; color: var(--blue-dark); }
.evaluation-process { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); column-gap: 28px; margin-top: 36px; border-top: 1px solid #b5c6ef; padding-top: 24px; color: var(--blue-dark); }
.process-step { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 16px; font-size: 14px; font-weight: 750; line-height: 1.5; }
.process-step svg { width: 64px; height: 64px; color: var(--signal); }
.process-arrow { position: absolute; right: 10px; top: 20px; color: var(--signal); font: 24px var(--mono); }
.process-caption { grid-column: 1 / -1; margin-top: 22px; border-top: 1px solid #b5c6ef; padding-top: 12px; font-size: 11px; font-weight: 500; }

.research-section { padding-top: 0; }
.philosophy { background: var(--blue-paper); padding: clamp(24px, 4vw, 52px); margin-inline: calc(-1 * clamp(0px, 1.5vw, 24px)); border-top: 5px solid var(--signal); }
.philosophy .section-label { color: var(--blue-dark); }
.philosophy-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 5vw, 70px); margin-top: 28px; }
.philosophy h2 { font-size: clamp(33px, 4vw, 52px); max-width: 16ch; }
.philosophy-grid > div { font-size: 16px; line-height: 1.85; }
.philosophy-grid .method-name { font-weight: 800; margin-top: 24px; margin-bottom: 6px; }
.directions { margin-top: 40px; }
.direction-row { display: grid; grid-template-columns: 64px minmax(0, 1fr) minmax(0, 1.12fr); gap: 28px; padding-block: 36px; border-bottom: 1px solid var(--rule); align-items: start; }
.topic-symbol { width: 56px; height: 56px; }
.direction-row h3 { font-size: clamp(23px, 2.8vw, 34px); line-height: 1.22; }
.direction-copy { font-size: 16px; line-height: 1.8; color: var(--muted); }
.status { display: block; margin-top: 14px; font-size: 13px; font-weight: 650; }
.direction-row .topic-symbol, .direction-row .status { color: var(--signal); }

.studies { border-top: 1px solid var(--ink); padding-top: 40px; }
.section-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 24px; margin-bottom: 40px; }
.section-heading h2, .index-title h2 { font-size: clamp(30px, 3.6vw, 46px); }
.section-heading > p { color: var(--muted); font-size: 15px; line-height: 1.6; }
.featured-study { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 68px); }
.study-copy h3 { font-size: clamp(27px, 3.5vw, 44px); margin-bottom: 16px; max-width: 19ch; }
.study-copy .deck { font-size: 16px; line-height: 1.8; color: var(--muted); }
.study-facts { margin-top: 20px; font-size: 13px; }
.study-facts > div { display: grid; grid-template-columns: .55fr 1fr; gap: 12px; padding-block: 9px; border-top: 1px solid var(--rule); }
.study-facts dt { color: var(--muted); }
.study-facts dd { font-weight: 650; }
.result-strip { margin-top: 20px; padding-top: 16px; border-top: 2px solid var(--signal); }
.result-strip > p { font: 12px var(--mono); color: var(--muted); margin-bottom: 10px; }
.result-strip dl { display: flex; flex-wrap: wrap; gap: 16px 28px; }
.result-strip dt { color: var(--muted); font-size: 12px; margin-bottom: 4px; }
.result-strip dd { font: 15px var(--mono); }
.figure { border: 1px solid var(--rule); background: #edf1f5; align-self: start; }
.figure img { width: 100%; }
.figure figcaption { display: flex; align-items: baseline; gap: 12px; padding: 12px 14px; border-top: 1px solid var(--rule); font-size: 13px; line-height: 1.6; }
.folio, .mono { color: var(--muted); font: 12px/1.5 var(--mono); letter-spacing: .025em; }
.figure figcaption > .folio { color: var(--signal); flex: none; }
.index-section { border-top: 1px solid var(--ink); padding-block: 40px 80px; }
.index-title { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.note-row { display: grid; position: relative; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 30px; border-top: 1px solid var(--rule); padding-block: 26px; }
.note-row .label { font-size: 12px; color: var(--signal); font-weight: 700; margin-bottom: 8px; }
.note-row h3 { font-size: clamp(23px, 2.6vw, 32px); line-height: 1.22; }
.note-row h3 a { text-decoration: none; }
.note-row h3 a::after { content: ""; position: absolute; inset: 0; }
.note-row:hover h3 a { color: var(--signal); text-decoration: underline; }
.note-row > p { color: var(--muted); font-size: 16px; line-height: 1.75; align-self: center; }

/* Shared full-length research articles. */
.paper-head { padding-block: clamp(36px, 6vw, 76px); border-bottom: 1px solid var(--ink); }
.paper-head > .folio { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; margin-bottom: 24px; }
.paper-head h1 { font-size: clamp(38px, 5.8vw, 76px); max-width: 20ch; }
.paper-head .lede { max-width: 58ch; font-size: clamp(17px, 2vw, 22px); line-height: 1.7; margin-top: 22px; color: var(--muted); }
.paper-topic { font-size: 14px; color: var(--signal); font-weight: 700; margin-top: 16px; }
.paper-layout { display: grid; grid-template-columns: minmax(160px, .32fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 70px); padding-block: 40px 80px; }
.contents { display: grid; gap: 4px; position: sticky; top: 24px; border-left: 1px solid var(--rule); padding-left: 18px; }
.contents > p { margin-bottom: 12px; }
.contents a { display: flex; align-items: center; min-height: 40px; font-size: 14px; line-height: 1.5; text-decoration: none; }
.contents a:hover { text-decoration: underline; }
.paper-body { width: min(100%, 768px); font-size: 17px; line-height: 1.85; }
.paper-section h2 { font-size: clamp(28px, 3.4vw, 42px); margin-bottom: 16px; }
.paper-section + .paper-section { margin-top: 40px; border-top: 1px solid var(--rule); padding-top: 36px; }
.paper-section .figure, .film-chain, .test-target { margin-top: 22px; }
.paper-section ol { padding-left: 26px; }
.paper-section li + li { margin-top: 10px; }
.reference-source { margin-top: 18px; font-size: 14px; line-height: 1.65; color: var(--muted); }
.test-target img { width: 100%; border: 1px solid var(--rule); }
.test-target figcaption, .film-chain figcaption { margin-top: 12px; font-size: 14px; color: var(--muted); line-height: 1.6; }
.reference-downloads a { display: inline-flex; align-items: center; min-height: 44px; font-size: 15px; font-weight: 700; color: var(--signal); }
.demo { background: #eaf0f7; border: 1px solid var(--rule); padding: clamp(18px, 3vw, 30px); }
.demo label { display: block; margin-top: 20px; font-size: 15px; font-weight: 700; }
.demo input { display: block; width: 100%; min-height: 44px; margin: 0 0 14px; accent-color: var(--signal); }
.demo .mono { margin-block: 10px 6px; }
.ramp, .values { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); }
.ramp { height: 30px; border: 1px solid var(--rule); }
.values { font: clamp(9px, 1.8vw, 12px)/1.6 var(--mono); text-align: center; margin-bottom: 14px; }
.plot { display: block; width: min(100%, 464px); height: auto; margin: 20px auto 12px; }
.film-chain { background: #eaf0f7; border: 1px solid var(--rule); padding: 18px; }
.film-chain ol { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding: 0; margin: 0; list-style: none; counter-reset: stage; }
.film-chain li, .film-chain li + li { counter-increment: stage; border-top: 1px solid var(--rule); margin: 0; padding-top: 8px; font-size: 14px; }
.film-chain li::before { content: counter(stage, decimal-leading-zero); color: var(--signal); font: 12px var(--mono); margin-right: 8px; }
.article-end { border-top: 1px solid var(--ink); margin-top: 44px; padding-top: 20px; }
.article-end a, .published-link { display: inline-flex; align-items: center; min-height: 44px; font-size: 14px; }
.published-link { color: var(--muted); gap: 6px; }
.anchor-alias { scroll-margin-top: 24px; }
.keep-together { white-space: nowrap; }

@media (max-width: 760px) {
  .mast { flex-wrap: wrap; gap: 0 16px; padding-top: 8px; }
  .mast .brand { order: 0; }
  .language { margin-left: auto; order: 1; }
  .mast-nav { order: 2; width: 100%; justify-content: space-between; border-top: 1px solid var(--rule); }
  .mast-nav a { font-size: 13px; }
  .home-mast { padding-top: 26px; }
  .brand-stage { padding-bottom: 24px; }
  .hero-logo { margin-bottom: 24px; }
  .hero-signature { padding-top: 13px; }
  .hero-signature h1 { font-size: clamp(9px, 2.8vw, 19px); letter-spacing: .04em; }
  .hero-signature > p { font-size: clamp(9px, 2.1vw, 13px); letter-spacing: .16em; margin-top: 8px; }
  .hero-summary { margin-top: 18px; }
  .hero-description { font-size: 15px; max-width: 36ch; }
  .home-navigation { gap: 10px; }
  .home-navigation .mast-nav { width: auto; gap: clamp(10px, 3.4vw, 24px); border: 0; order: 0; }
  .home-navigation .mast-nav a { font-size: 12px; min-height: 50px; }
  .home-navigation .language { margin-left: auto; }
  .home-navigation .language button { min-width: 40px; font-size: 11px; }
  .about-grid, .philosophy-grid, .featured-study, .paper-layout { grid-template-columns: minmax(0, 1fr); }
  .about-grid { gap: 26px; margin-top: 22px; }
  .about h2 { font-size: clamp(32px, 7.7vw, 46px); margin-bottom: 0; }
  .about-intro { display: contents; }
  .about-intro h2 { order: 0; }
  .imaging-plate { order: 1; margin: 0; }
  .about-copy { order: 2; }
  .chain-labels { margin: 10px 14px 14px; font-size: 10px; gap: 8px; }
  .plate-heading { padding: 13px 14px; font-size: 12px; }
  .imaging-plate figcaption { padding: 10px 14px; font-size: 10px; }
  .about-copy { font-size: 16px; }
  .philosophy { margin-inline: 0; }
  .philosophy-grid { gap: 24px; }
  .philosophy h2 { font-size: clamp(31px, 8vw, 45px); }
  .evaluation-process { column-gap: 16px; }
  .process-step { font-size: 11px; gap: 12px; }
  .process-step svg { width: 44px; height: 44px; }
  .process-arrow { top: 13px; right: -8px; font-size: 18px; }
  .direction-row { grid-template-columns: 44px minmax(0, 1fr); gap: 14px 16px; padding-block: 28px; }
  .topic-symbol { width: 40px; height: 40px; }
  .direction-row h3 { font-size: 25px; }
  .direction-copy { grid-column: 2; font-size: 15px; }
  .section-heading { display: block; margin-bottom: 30px; }
  .section-heading > p { margin-top: 16px; }
  .featured-study { gap: 28px; }
  .study-copy h3 { font-size: 32px; }
  .study-facts { font-size: 12px; }
  .result-strip dd { font-size: 14px; }
  .index-title { flex-wrap: wrap; gap: 12px; }
  .note-row { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .note-row h3 { font-size: 25px; }
  .note-row > p { font-size: 15px; }
  .contents { position: static; display: flex; flex-wrap: wrap; gap: 0 18px; }
  .contents > p { width: 100%; }
  .contents a { min-height: 44px; }
  .paper-head h1 { font-size: clamp(32px, 8vw, 48px); }
  .paper-body { font-size: 16px; }
  .paper-section h2 { font-size: 30px; }
  .figure figcaption { display: block; }
  .figure figcaption > .folio { display: block; margin-bottom: 6px; }
}
@media (max-width: 350px) {
  .language button { min-width: 40px; }
  .direction-row { column-gap: 12px; grid-template-columns: 32px minmax(0,1fr); }
  .topic-symbol { width: 32px; height: 32px; }
  .philosophy { padding-inline: 18px; }
  .film-chain ol { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media print {
  :root { background: white; color: black; }
  .mast, .footer, .contents, .skip, .published-link { display: none; }
  .shell { width: 100%; }
  .paper-layout { display: block; }
  .paper-body { width: 100%; }
  .figure, .film-chain { break-inside: avoid; }
}
