main, .main { display: block; }
header.global, .global:not(footer) { position: sticky; top: 0; z-index: 40; height: var(--top-h);
  display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: var(--space-4);
  padding: 0 var(--page-margin); background: var(--c-ink); color: var(--on-dark); border-bottom: 1px solid var(--line-dark); }
body[data-idiom="brand"] header.global { background: var(--c-night); border-bottom-color: rgba(255, 255, 255, .1); }
.wordmark { justify-self: start; align-self: center; flex: none; display: inline-flex; align-items: center; font-family: var(--f-latin);
  font-size: clamp(16px, 9px + .55vw, 22px); font-weight: 600; letter-spacing: .14em; line-height: 1; white-space: nowrap; color: var(--on-dark); }
.wordmark i { display: inline-block; flex: none; height: 1.05em; width: 1px; margin: 0 .5em 0 .36em; background: var(--on-dark-mut); transform: rotate(18deg); }
header.global nav { justify-self: center; display: flex; align-items: center; gap: var(--nav-gap);
  font-size: var(--fs-nav); font-weight: var(--fw-nav); letter-spacing: var(--ls-nav); color: var(--on-dark-mut); }
header.global nav a { position: relative; padding: calc((var(--top-h) - 1.4em) / 2) 0; white-space: nowrap; word-break: keep-all; line-height: 1.4; transition: color var(--dur); }
header.global nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--c-gold); transform: scaleX(0); transition: transform var(--dur) var(--ease); }
header.global nav a:hover { color: var(--c-white); }
header.global nav a:is([aria-current="page"], [aria-current="true"], .active) { color: var(--c-white); }
header.global nav a:is([aria-current="page"], [aria-current="true"], .active)::after { transform: none; }
header.global .lang { justify-self: end; flex: none; display: flex; gap: 2px; padding: 2px; border: 1px solid var(--line-dark-strong); border-radius: 3px; }
header.global .lang button { font-size: 13px; line-height: 1.2; white-space: nowrap; padding: 6px 11px; min-height: 30px; border-radius: 2px; color: var(--on-dark-mut);
  transition: background var(--dur), color var(--dur); }
header.global .lang button:hover { color: var(--c-white); }
header.global .lang button[aria-pressed="true"] { background: var(--on-dark); color: var(--c-ink); }
header.global :focus-visible { outline-color: var(--gold-light); }
footer.global, body > footer { background: var(--c-ink); color: var(--on-dark-mut); font-size: var(--fs-small); line-height: 1.6; letter-spacing: .02em; }
footer.global { padding: var(--space-6) var(--page-margin) var(--space-5); display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: end;
  column-gap: var(--space-6); row-gap: var(--space-4); border-top: 1px solid var(--line-dark); }
footer.global > :is(.foot-inner, .shell, .w-main) { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: end;
  column-gap: var(--space-6); row-gap: var(--space-4); width: auto; margin: 0; }
footer.global .wordmark { font-size: clamp(20px, 10px + 1vw, 34px); }
footer.global nav { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-5); letter-spacing: var(--ls-nav); }
footer.global nav a, footer.global .to-top, body > footer a { transition: color var(--dur); }
footer.global nav a:hover, footer.global .to-top:hover, body > footer a:hover { color: var(--c-white); }
footer.global .to-top { white-space: nowrap; }
body > footer:not(.global) { padding: var(--space-5) 0; }
body > footer:not(.global) .shell { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
body > footer .foot-mark { font-family: var(--f-latin); letter-spacing: .14em; color: var(--on-dark); }
.subnav { position: sticky; top: var(--top-h); z-index: 30; background: var(--c-white); border-bottom: 1px solid var(--line); }
.subnav .shell { width: auto; margin-left: var(--page-margin); margin-right: var(--page-margin);
  display: flex; align-items: center; gap: clamp(22px, 1.8vw, 44px); overflow-x: auto; white-space: nowrap; scrollbar-width: none; overscroll-behavior-x: contain; }
.subnav .shell::-webkit-scrollbar { display: none; }
.subnav a { flex: none; font-size: var(--fs-subnav); letter-spacing: .02em; word-break: keep-all; line-height: 1.4; padding: 13px 0 12px; color: var(--mut); border-bottom: 2px solid transparent; }
.subnav a:hover { color: var(--ink); }
.subnav a:is(.active, [aria-current="page"], [aria-current="true"]) { color: var(--ink); font-weight: 600; border-bottom-color: var(--c-gold); }
.subnav.dark { background: var(--c-ink-2); border-bottom-color: var(--line-dark); }
.subnav.dark a { color: var(--on-dark-mut); }
.subnav.dark a:hover, .subnav.dark a:is(.active, [aria-current="page"], [aria-current="true"]) { color: var(--c-white); }
.crumb { font-size: var(--fs-small); letter-spacing: .04em; line-height: 1.6; color: var(--mut); margin-bottom: var(--space-4); }
.crumb a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.crumb i, .crumb .sep { font-style: normal; margin: 0 7px; opacity: .7; }
.kicker { display: block; margin: 0 0 var(--space-3); font-family: var(--idiom-label-font); font-size: var(--fs-label); font-weight: 700; letter-spacing: var(--tracking-label);
  line-height: 1.5; text-transform: uppercase; color: var(--idiom-accent-text); }
.lead { font-size: var(--fs-lead); line-height: var(--lh); color: var(--idiom-mut); max-width: var(--measure-lead); }
.muted { color: var(--mut); }
.t-main { font-size: inherit; font-weight: inherit; letter-spacing: inherit; text-transform: none; }
.t-main:lang(zh) { font-family: var(--f-zh); }
.t-main:lang(ja) { font-family: var(--f-ja); }
.t-en { display: block; margin-top: .32em; font-family: var(--f-latin); font-size: max(12px, .6em); font-weight: 400; font-style: normal; line-height: 1.3;
  letter-spacing: .03em; text-transform: none; color: color-mix(in srgb, currentColor 64%, transparent); text-wrap: balance; }
.t-en:empty { display: none; }
:is(.crumb, .path li a, .node-detail li a, .deep-index a, .path-trail, .link-card b, .rel-card b, .work-row b, .side-nodes a) .t-en {
  display: inline; margin: 0 0 0 .5em; font-size: max(12px, .72em); }
:is(.kicker, .crumb, small, .sec-kind) .t-main { letter-spacing: .04em; }
.textlink { display: inline-flex; align-items: center; gap: 8px; padding: 10px 0 8px; border-bottom: 1px solid currentColor; font-size: var(--fs-small); line-height: 1.4;
  transition: gap var(--dur) var(--ease), opacity var(--dur); }
.textlink:hover { gap: 14px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 10px 20px; border: 1px solid var(--c-green);
  border-radius: 3px; background: var(--c-green); color: var(--c-white); font-size: var(--fs-small); line-height: 1.3; white-space: nowrap; transition: background var(--dur); }
.button:hover { background: var(--c-ink-2); border-color: var(--c-ink-2); }
.button.ghost { background: transparent; color: var(--green-text); }
.button.ghost:hover { background: var(--c-green-tint); }
.status, .status-tag { display: inline-flex; align-items: center; gap: 8px; font-size: var(--fs-label); font-weight: 600; line-height: 1.4; letter-spacing: .04em;
  color: var(--green-text); white-space: nowrap; }
.status::before, .status-tag::before { content: ""; width: 7px; height: 7px; border: 1.5px solid currentColor; border-radius: 50%; flex: none; }
.status time, .status .status-time, .status-tag .status-time { font-weight: 400; color: var(--mut); letter-spacing: 0; }
.status-line, .status-note { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; font-size: var(--t-xs); line-height: var(--lh-s); color: var(--mut); }
.endnote { padding: 24px 0 36px; font-size: var(--fs-label); line-height: 1.7; color: var(--mut); }
.next-topic { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 28px 0; border-bottom: 1px solid var(--line); }
.next-topic .kicker { margin: 0; }
.next-topic a { font-size: var(--fs-h4); font-weight: 600; line-height: 1.4; text-align: right; }
.next-topic a:hover, .path-grid a:hover b { text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px; }
[data-l3-notice]:not(:empty) { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin: 18px 0 0; padding: 12px 16px; width: auto; max-width: 60em;
  flex: 1 0 100%; border-left: 3px solid var(--c-gold); background: var(--c-white); font-size: var(--t-xs); line-height: 1.6; color: var(--ink); }
.workspace-cta [data-l3-notice]:not(:empty) { margin-top: 6px; }
[data-l3-notice] a { color: var(--green-text); font-weight: 600; border-bottom: 1px solid currentColor; }
.pending { border: 1px dashed var(--line-strong); border-radius: var(--r); padding: 18px 22px; margin: 20px 0; color: var(--mut); font-size: var(--fs-small); }
@media (max-width: 1023px) {
  header.global nav { gap: 22px; }
  footer.global, footer.global > :is(.foot-inner, .shell, .w-main) { grid-template-columns: minmax(0, 1fr) auto; }
  footer.global nav { grid-column: 1 / -1; grid-row: 2; }
}
@media (max-width: 767px) {
  header.global, .global:not(footer) { height: auto; min-height: 0; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: 54px 42px; gap: 0 12px; }
  .wordmark { font-size: 15px; }
  header.global .lang { grid-column: 2; grid-row: 1; }
  header.global nav { grid-column: 1 / -1; grid-row: 2; justify-self: stretch; justify-content: space-between; gap: var(--nav-gap); overflow-x: auto; scrollbar-width: none;
    border-top: 1px solid var(--line-dark); }
  header.global nav::-webkit-scrollbar { display: none; }
  header.global nav a { flex: none; padding: 9px 0 9px; }
  header.global .lang button { padding: 6px 11px; font-size: 13px; }
  .subnav { position: static; }
  .subnav .shell { gap: 22px; }
  .subnav a { padding: 12px 0 11px; }
  .next-topic { flex-direction: column; align-items: flex-start; gap: 8px; }
  .next-topic a { text-align: left; }
  .crumb { letter-spacing: .02em; }
  footer.global, footer.global > :is(.foot-inner, .shell, .w-main) { grid-template-columns: minmax(0, 1fr); align-items: start; }
  footer.global nav { grid-row: auto; }
  body > footer, footer.global { font-size: 14px; }
}
.scroll-x { overflow-x: auto; overscroll-behavior-x: contain; }
@media (max-width: 1023px) {
  [data-scroll-hint] { --hint-l: 0px; --hint-r: 0px;
    -webkit-mask-image: linear-gradient(to right, transparent 0, #000 var(--hint-l), #000 calc(100% - var(--hint-r)), transparent 100%);
    mask-image: linear-gradient(to right, transparent 0, #000 var(--hint-l), #000 calc(100% - var(--hint-r)), transparent 100%); }
  [data-scroll-hint]:not([data-at-end]) { --hint-r: 40px; }
  [data-scroll-hint]:not([data-at-start]) { --hint-l: 24px; }
}
@media (min-width: 1024px) {
  .subnav [data-scroll-hint] { --hint-l: 0px; --hint-r: 0px;
    -webkit-mask-image: linear-gradient(to right, transparent 0, #000 var(--hint-l), #000 calc(100% - var(--hint-r)), transparent 100%);
    mask-image: linear-gradient(to right, transparent 0, #000 var(--hint-l), #000 calc(100% - var(--hint-r)), transparent 100%); }
  .subnav [data-scroll-hint]:not([data-at-end]) { --hint-r: 56px; }
  .subnav [data-scroll-hint]:not([data-at-start]) { --hint-l: 32px; }
}
