/*! Font notices (source record: docs/font-sources/demo-fonts.md in the site repository)
 * assets/en/text.woff2 - IBM Plex Sans (IBMPlexSans[wdth,wght].ttf), modified subset.
 *   License: SIL Open Font License 1.1 (OFL 1.1). Reserved Font Name: Plex.
 *   License URL: https://raw.githubusercontent.com/google/fonts/0b58fb370093f9a9f4ff785d94405710b79de67c/ofl/ibmplexsans/OFL.txt
 *   Copyright notice and full license text: assets/demo-fonts/IBMPlexSans-OFL.txt
 * assets/en/symbols.woff2 - Noto Sans TC (NotoSansTC.ttf), modified subset.
 *   License: SIL Open Font License 1.1 (OFL 1.1).
 *   Copyright notice and full license text: assets/demo-fonts/NotoSansTC-OFL.txt
 */
@font-face { font-family: 'Portfolio Sans'; src: url('assets/en/symbols.woff2') format('woff2'); font-weight: 100 900; unicode-range: U+25B2, U+25BC, U+25C6, U+25CB, U+25CE, U+25CF, U+30FB, U+4E2D, U+6587, U+FF0F; }
/* Only the English document loads this layer. */
:lang(en) { hyphens: none; }
html[lang=en] :is(p, li, dd, dt, h1, h2, h3, h4, button, a, figcaption, td, th) {
  overflow-wrap: normal;
  word-break: normal;
}
html[lang=en] :is(.nw,.map-user-part,.case-title-sub) { white-space: normal; }
html[lang=en] .hero-title { max-width: 36em; line-height: 1.35; }
html[lang=en] .hero h1 { font-size: clamp(25px,3.15vw,53px); line-height: 1.08; letter-spacing: -.035em; }
html[lang=en] .hero-summary { max-width: 53ch; line-height: 1.45; }
html[lang=en] .hero-detail { max-width: 65ch; line-height: 1.5; }
html[lang=en] :is(.section-lead,.job-body,.skill-description,.case-summary) { line-height: 1.55; }
html[lang=en] .case-toc a { white-space: normal; }
html[lang=en] .demo-satellite span { letter-spacing: 0; }
@media (max-width: 699px) {
  html[lang=en] .hero h1 { font-size: clamp(19px, 5.1vw, 32px); }
  html[lang=en] .hero-title { font-size: 12px; max-width: 32ch; }
  html[lang=en] .hero-detail { font-size: 13px; }
}

html.js[lang=en] #home h1 {
  font-size: clamp(25px, 2.55vw, 36px);
  line-height: 1.12;
  letter-spacing: -.035em;
}
html.js[lang=en] .intro-s { font-size: clamp(22px, 2.4vw, 38px); line-height: 1.35; letter-spacing: -.015em; }
html.js[lang=en] .intro-l { white-space: normal; }
html[lang=en] .language-link { font-family: 'Portfolio Sans', var(--sans); }
@media(max-width:699px) {
  html.js[lang=en] #home h1 { font-size: min(clamp(16px, 4.35vw, 25px), calc((100vw - 2 * var(--shell-pad)) / 20.3)); line-height: 1.18; }
  html.js[lang=en] .intro-s { font-size: clamp(16px,4.3vw,24px); }
}

html[lang=en] .map-products {display:flex; flex-wrap:wrap;}
html[lang=en] .map-products li {white-space:normal;}
html[lang=en] .rx-tag {white-space:normal; min-width:0;}
html[lang=en] .rx-cell {min-width:0;}

@media (min-width:1000px) and (max-width:1400px) {
  html[lang=en] .demo-satellite {font-size:12.5px;}
}
@media (max-width:389px) {
  html[lang=en] .demo-satellite {font-size:12px;}
}

@media (min-width:700px) and (max-width:999px) {
  html[lang=en] .hero-actions .button { padding-inline:11px; }
  html.js[lang=en] #motion-toggle { margin-left:-16px; }
  html[lang=en] .hero-case-link { margin-left:4px; }
}

/* Keep the phone controls below the orbit even with the shorter English heading. */
@media (max-width:699px) {
  html.js[lang=en] .hero-inner { padding-bottom:279px; }
  html.js[lang=en] .demo-topic-slot:not(:has(.demo-topic-panel:not([hidden]))) .demo-topic-dots { top:165px; }
}

html[lang=en] .case-summary { display:block; -webkit-line-clamp:unset; line-clamp:none; overflow:visible; }
html[lang=en] .rx-tile dt { white-space:normal; }
html[lang=en] .case-fig-label { overflow-wrap:normal; word-break:normal; }
@media (min-width:700px) {
  html[lang=en] .case-fig-layer { grid-template-columns:108px minmax(0,1fr); }
}

html[lang=en] .en-compound { white-space:nowrap; }

html[lang=en] .rx-tag-copy { min-width:0; }
html[lang=en] .rx-rows li { flex-wrap:wrap; gap:4px 8px; }
html[lang=en] .rx-c-cat { white-space:normal; }
/* Factor table First/Repeat: the dot and its word stay on one line with a small gap. On phones the
   40px status cells are right-aligned at the name column's 14px, so every text in a row keeps 6px or more. */
html[lang=en] .rx-table .rx-c-mark { white-space:nowrap; }
html[lang=en] .rx-table .rx-mark { margin-right:4px; }
@media (max-width:699px) {
  html[lang=en] .rx-table .rx-c-mark { text-align:right; }
  html[lang=en] .rx-table td.rx-c-mark { font-size:14px; }
  html[lang=en] .rx-table .rx-mark { margin-right:3px; }
}
@media (max-width:699px) {
  html[lang=en] .demo-map-caption { font-size:13px; letter-spacing:0; }
}
/* Hero stack: the controls keep 12px under the buttons. The copy column keeps its width and height,
   because the orbit beads treat the whole column as a wall (wider or taller hides beads). */
@media (min-width:700px) {
  html.js[lang=en] :is(#intro-ctl,#motion-toggle) { margin-top:4px; }
}
/* Phones: the dots sit 12px or more under the text. With a card open the dots and the two
   buttons drop below the longest card (the case link is hidden then), keeping 17px to the buttons.
   They are shifted, not reflowed, so the page height and the obstacle boxes of the orbit labels stay put. */
@media (max-width:439px) {
  html.js[lang=en] .demo-topic-slot:not(:has(.demo-topic-panel:not([hidden]))) .demo-topic-dots { top:173px; }
}
@media (max-width:339px) {
  html.js[lang=en] .demo-topic-slot:not(:has(.demo-topic-panel:not([hidden]))) .demo-topic-dots { top:180px; }
}
@media (min-width:390px) and (max-width:439px) {
  html.js[lang=en] .demo-topic-slot:has(.demo-topic-panel:not([hidden])) .demo-topic-dots { top:222px; }
  html.js[lang=en] #home:has(.demo-topic-panel:not([hidden])) .hero-actions { position:relative; top:calc(222px + 36px + 17px - 190px - 19.5px - clamp(20px,3.4vh,32px)); }
}
/* 360-389px: the two buttons share one row while a card is open, so the shifted row stays inside
   the band the two stacked buttons used before and clears the orbit on short phones too.
   Below 364px the overview stacks them, so the block keeps that height and the page does not jump. */
@media (min-width:360px) and (max-width:389px) {
  html.js[lang=en] .demo-topic-slot:has(.demo-topic-panel:not([hidden])) .demo-topic-dots { top:246px; }
  html.js[lang=en] #home:has(.demo-topic-panel:not([hidden])) .hero-actions { position:relative; top:calc(246px + 36px + 17px - 190px - 16px - clamp(20px,3.4vh,32px)); }
  html.js[lang=en] #home:has(.demo-topic-panel:not([hidden])) .hero-actions .button { padding-inline:15px; }
}
@media (min-width:360px) and (max-width:363px) {
  html.js[lang=en] #home:has(.demo-topic-panel:not([hidden])) .hero-actions { min-height:108px; align-content:flex-start; }
}
@media (min-width:440px) and (max-width:559px) {
  html.js[lang=en] .demo-topic-slot:has(.demo-topic-panel:not([hidden])) .demo-topic-dots { top:198px; }
  html.js[lang=en] #home:has(.demo-topic-panel:not([hidden])) .hero-actions { position:relative; top:calc(198px + 36px + 17px - 190px - 19.5px - clamp(20px,3.4vh,32px)); }
}
/* Tablets: the hero text is one step smaller and the dots row is shifted 20px into the 32px gap above
   the buttons. Shifted, not reflowed, so the page height and the copy column the beads avoid stay put. */
@media (min-width:700px) and (max-width:999px) {
  html[lang=en] .demo-overview .hero-summary { font-size:16px; }
  html[lang=en] .demo-overview .hero-detail { font-size:15px; }
  html[lang=en] .demo-topic-title { font-size:16px; }
  html[lang=en] .demo-topic-sentence { font-size:15px; line-height:1.6; }
  html.js[lang=en] .demo-topic-dots { translate:0 20px; }
}
@media (min-width:1000px) and (max-height:820px) {
  html.js[lang=en] :is(#intro-ctl,#motion-toggle) { margin-top:8px; }
}
