/*
 * site.css
 * The Kiroshi Foundation stylesheet: tokens, the three display themes, the
 * asymmetric grid with its margin column, and every component on the site.
 * DESIGN.md explains the system.
 *
 * Created: 2026-11-03
 * Last modified: 2026-11-03
 */

/* ---------- Tokens ---------- */

:root {
  --paper: #ffffff;
  --ink: #121417;
  --ink-2: #4a4f57;
  --tint: #e9efec;
  --tint-2: #dce5e1;
  --rule: #d5d8dd;
  --rule-strong: #121417;
  --shu: #d23c1e;
  --shu-text: #c2321a;
  --shu-wash: #fbebe7;
  --focus: #c2321a;
  --link-line: #d23c1e;
  --underline: 2px;

  --font-display: 'Shippori Mincho', 'Hiragino Mincho ProN', 'Yu Mincho', 'Noto Serif JP', Georgia, serif;
  --font-codes: 'Atkinson Codes', 'Atkinson Hyperlegible Next Variable', ui-monospace, monospace;
  --font-text: 'Atkinson Hyperlegible Next Variable', 'Atkinson Hyperlegible Next', 'Atkinson Hyperlegible', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --step--1: 0.9375rem;
  --step-0: 1.1875rem;
  --step-1: 1.4375rem;
  --step-2: 1.8125rem;
  --step-3: 2.25rem;
  --step-4: 2.8125rem;
  --step-5: 3.5rem;
  --step-6: clamp(2.6rem, 5.4vw, 5rem);

  --leading: 1.6;
  --tracking: 0;
  --word-spacing: 0;
  --paragraph-gap: 1em;

  --wrap: 82.5rem;
  --gutter: 1.5rem;
  --margin: clamp(1rem, 4vw, 3rem);
  --band-gap: clamp(4rem, 9vw, 8.5rem);
}

/* Text size: 125 and 150 per cent of the reader's own default. */
html:has(#text-125:checked), html[data-text='125'] { font-size: 125%; }
html:has(#text-150:checked), html[data-text='150'] { font-size: 150%; }

/* Wide spacing, the WCAG 1.4.12 values. */
html:has(#spacing-wide:checked), html[data-spacing='wide'] {
  --leading: 1.9;
  --tracking: 0.12em;
  --word-spacing: 0.16em;
  --paragraph-gap: 2em;
}

/* High contrast: pure black on white, heavier rules. */
html:has(#contrast-high:checked), html[data-theme='high'] {
  --ink: #000000;
  --ink-2: #000000;
  --tint: #ffffff;
  --tint-2: #ffffff;
  --rule: #000000;
  --shu: #a42812;
  --shu-text: #a42812;
  --shu-wash: #ffffff;
  --focus: #000000;
  --link-line: #000000;
  --underline: 3px;
}

/* Yellow on black, which many readers with low vision prefer. */
html:has(#contrast-yellow:checked), html[data-theme='yellow'] {
  --paper: #000000;
  --ink: #ffe14d;
  --ink-2: #ffe14d;
  --tint: #000000;
  --tint-2: #111111;
  --rule: #ffe14d;
  --rule-strong: #ffe14d;
  --shu: #ff8a66;
  --shu-text: #ff8a66;
  --shu-wash: #000000;
  --focus: #ffffff;
  --link-line: #ff8a66;
  --underline: 3px;
}

@media (prefers-contrast: more) {
  html:not([data-theme]) {
    --ink: #000000; --ink-2: #000000; --rule: #000000; --shu: #a42812; --shu-text: #a42812; --focus: #000000; --link-line: #000000; --underline: 3px;
  }
}

/* ---------- Base ---------- */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--paper);
  color: var(--ink);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: var(--step-0);
  line-height: var(--leading);
  letter-spacing: var(--tracking);
  word-spacing: var(--word-spacing);
  font-variant-numeric: lining-nums;
  overflow-wrap: break-word;
}

@media (max-width: 37.5em) {
  body { font-size: 1.125rem; }
}

img, svg { max-width: 100%; height: auto; }
svg { display: block; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.22;
  margin: 0 0 0.5em;
  letter-spacing: calc(var(--tracking) * 0.5);
  text-wrap: balance;
}
h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-2); }
h4 { font-size: var(--step-1); }

p, ul, ol, dl, table, figure, blockquote { margin: 0 0 var(--paragraph-gap); }

a {
  color: var(--ink);
  text-decoration-line: underline;
  text-decoration-color: var(--link-line);
  text-decoration-thickness: var(--underline);
  text-underline-offset: 0.22em;
}
a:hover { text-decoration-thickness: calc(var(--underline) + 2px); }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 1px;
}
main:focus { outline: none; }

strong, b { font-weight: 700; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%);
  white-space: nowrap; margin: -1px; padding: 0; border: 0;
}

.skip-link {
  position: absolute; left: 1rem; top: -10rem; z-index: 10;
  background: var(--ink); color: var(--paper);
  padding: 0.75rem 1.25rem; font-weight: 700; text-decoration: none;
}
.skip-link:focus { top: 1rem; }

.family-name { font-variant-caps: all-small-caps; letter-spacing: 0.04em; font-weight: inherit; }

[lang='ja'] { font-family: var(--font-display); letter-spacing: 0.04em; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

/* ---------- Layout ---------- */

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--margin);
}

.band { padding-block: var(--band-gap) 0; }
.band:last-child { padding-bottom: var(--band-gap); }
.band--tint { background: var(--tint); padding-block: var(--band-gap); margin-top: var(--band-gap); }
.band--tint + .band { padding-top: var(--band-gap); }
.band--tint:last-child { margin-bottom: 0; }

/* The asymmetric grid: a margin column of three for the section marker,
   content across the next eight, and the twelfth left empty. */
.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
}
.grid > .marker { grid-column: 1 / span 3; }
.grid > .body { grid-column: 4 / span 8; min-width: 0; }
.grid > .body--wide { grid-column: 4 / span 9; min-width: 0; }
.grid > .body--full { grid-column: 1 / -1; min-width: 0; }
.grid > .body--bleed { grid-column: 4 / -1; min-width: 0; }

@media (max-width: 60em) {
  .grid { display: block; }
  .grid > .marker { margin-bottom: 1.5rem; }
}

/* Section marker: square, number, label and the Japanese word set
   vertically beside them. */
.marker {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto 1fr;
  column-gap: 1.25rem;
  align-content: start;
  font-size: var(--step--1);
}
.marker__square { grid-column: 1; grid-row: 1; width: 0.75rem; height: 0.75rem; background: var(--shu); margin-top: 0.45em; }
.marker__ring { grid-column: 2; grid-row: 1; width: 1.6rem; height: 1.6rem; color: var(--ink); margin-bottom: 0.2rem; }
.marker__number { grid-column: 2; grid-row: 1; font-family: var(--font-display); font-weight: 700; font-size: var(--step-1); line-height: 1.2; font-variant-numeric: tabular-nums; }
.marker__label { grid-column: 2; grid-row: 2; text-transform: uppercase; letter-spacing: 0.14em; font-weight: 700; color: var(--ink-2); }
.marker__ja {
  grid-column: 1; grid-row: 2 / span 2;
  writing-mode: vertical-rl;
  font-family: var(--font-display);
  font-size: var(--step-2);
  font-weight: 500;
  letter-spacing: 0.3em;
  line-height: 1;
  margin-top: 1rem;
  color: var(--ink);
}
@media (max-width: 60em) {
  .marker { grid-template-columns: auto auto 1fr; grid-template-rows: auto; align-items: center; column-gap: 0.75rem; }
  .marker__square { grid-row: 1; grid-column: 1; margin-top: 0; }
  .marker__number, .marker__ring { grid-row: 1; grid-column: 2; }
  .marker__ring { width: 1.25rem; height: 1.25rem; margin: 0; }
  .marker__label { grid-row: 1; grid-column: 3; }
  .marker__ja { display: none; }
}

/* ---------- Header and display controls ---------- */

.utility {
  border-bottom: 1px solid var(--rule);
  font-size: var(--step--1);
}
.utility__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  padding-block: 0.5rem;
}
.utility__nav ul { display: flex; flex-wrap: wrap; gap: 0.25rem 1.5rem; list-style: none; margin: 0; padding: 0; align-items: center; }
.utility__nav a { text-decoration-thickness: 1px; text-underline-offset: 0.25em; }
.utility__lang { color: var(--ink-2); }
.utility__lang-note { font-size: 0.85em; }

.display { min-width: 0; }
.display__summary {
  cursor: pointer;
  font-weight: 700;
  padding: 0.35rem 0;
  list-style-position: inside;
}
.display__panel { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1.75rem; }
@media (min-width: 60.01em) {
  .display[open] .display__summary { display: none; }
}
@media (max-width: 60em) {
  .display[open] .display__panel { padding: 0.5rem 0 0.75rem; }
}
.display__group { border: 0; margin: 0; padding: 0; display: flex; align-items: center; gap: 0.6rem; min-width: 0; }
.display__legend { float: left; font-weight: 700; margin-right: 0.6rem; padding: 0; }
.display__options { display: flex; flex-wrap: wrap; border: 1px solid var(--ink); }
.display__option { position: relative; display: block; cursor: pointer; }
.display__option input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.display__option > span[aria-hidden], .display__option > span:not(.visually-hidden) {
  display: block;
  padding: 0.2rem 0.65rem;
  min-height: 2rem;
  min-width: 2rem;
  line-height: 1.6;
  text-align: center;
}
.display__option + .display__option > span:first-of-type { border-left: 1px solid var(--ink); }
.display__option:has(input:checked) > span:first-of-type { background: var(--ink); color: var(--paper); }
.display__option:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; z-index: 1; }
.display__option--a1 > span:first-of-type { font-size: 0.85rem; }
.display__option--a2 > span:first-of-type { font-size: 1.05rem; }
.display__option--a3 > span:first-of-type { font-size: 1.3rem; line-height: 1.2; }
.display__reset {
  font: inherit; color: var(--ink); background: none; border: 0; padding: 0.2rem 0;
  text-decoration: underline; text-decoration-color: var(--link-line); text-underline-offset: 0.22em; cursor: pointer;
}

.masthead {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2.5rem;
  padding-block: 1.5rem 1.25rem;
  border-bottom: 1px solid var(--ink);
}
.masthead__home { text-decoration: none; color: var(--ink); }

.lockup { display: inline-flex; align-items: center; gap: 0.9rem; }
.logo-mark { flex: none; color: var(--ink); }
.lockup__words { display: flex; flex-direction: column; gap: 0.15rem; }
.lockup__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  line-height: 1.1;
}
.lockup__ja { font-size: 0.8rem; letter-spacing: 0.32em; color: var(--ink-2); line-height: 1.2; }

.primary__list { display: flex; flex-wrap: wrap; gap: 0.25rem 2rem; list-style: none; margin: 0; padding: 0; }
.primary__link {
  display: block;
  padding-block: 0.35rem;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 3px solid transparent;
}
.primary__link:hover { border-bottom-color: var(--rule); }
.primary__link[aria-current='page'] { border-bottom-color: var(--shu); }

@media (max-width: 47.5em) {
  .masthead { padding-block: 1rem; }
  .lockup__name { font-size: 1.1rem; letter-spacing: 0.12em; }
  .primary__list { gap: 0.15rem 1.25rem; }
}

.breadcrumbs { font-size: var(--step--1); padding-block: 1rem 0; }
.breadcrumbs ol { display: flex; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; gap: 0.25rem; }
.breadcrumbs li + li::before { content: '/'; margin-right: 0.4rem; color: var(--ink-2); }
.breadcrumbs a { text-decoration-thickness: 1px; }
.breadcrumbs [aria-current] { color: var(--ink-2); }

/* ---------- Page heads ---------- */

.page-head { padding-block: clamp(2.5rem, 6vw, 5rem) 0; }
.page-head__title { font-size: var(--step-4); max-width: 18em; margin-bottom: 0.4em; }
.page-head__lead { font-size: var(--step-1); line-height: 1.5; max-width: 34em; color: var(--ink); }
.page-head__meta { font-size: var(--step--1); color: var(--ink-2); margin-top: 1.5rem; }

.eyebrow {
  display: block;
  font-family: var(--font-text);
  font-size: var(--step--1);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--shu-text);
  margin-bottom: 0.75rem;
}

.lead { font-size: var(--step-1); line-height: 1.5; }
.prose { max-width: 40em; }
.prose > h2 { margin-top: 2.5rem; }
.prose > h2:first-child, .body > h2:first-child { margin-top: 0; }
.prose > h3 { margin-top: 2rem; }
.prose li + li { margin-top: 0.4em; }
.small { font-size: var(--step--1); color: var(--ink-2); }

/* ---------- Home: statement and plate ---------- */

.home-hero { padding-block: clamp(2.5rem, 6vw, 5.5rem) 0; }
.home-hero__grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
  align-items: start;
}
.home-hero__aside { grid-column: 1 / span 1; }
.home-hero__vertical {
  writing-mode: vertical-rl;
  font-family: var(--font-display);
  font-size: var(--step-2);
  letter-spacing: 0.35em;
  line-height: 1.4;
  margin: 0;
}
.home-hero__vertical-mark { display: block; width: 0.7rem; height: 0.7rem; background: var(--shu); margin: 0 auto 1rem 0; }
.home-hero__text { grid-column: 2 / span 6; padding-top: 0.5rem; }
.home-hero__title { font-size: var(--step-6); line-height: 1.12; letter-spacing: -0.01em; margin-bottom: 0.55em; max-width: 11em; }
.home-hero__lead { font-size: var(--step-1); line-height: 1.5; max-width: 30em; }
.home-hero__plate { grid-column: 8 / span 5; margin: 0; }
@media (max-width: 60em) {
  .home-hero__grid { display: block; }
  .home-hero__aside { display: none; }
  .home-hero__plate { margin-top: 2.5rem; max-width: 34rem; }
}

/* A figure plate: drawn diagram, numbered callouts, small caption. */
.plate { margin: 0; }
.plate__frame { border-top: 1px solid var(--ink); border-bottom: 1px solid var(--rule); padding-block: 1.25rem; }
.plate svg { width: 100%; height: auto; color: var(--ink); }
.plate__caption { font-size: var(--step--1); color: var(--ink-2); margin-top: 0.75rem; display: grid; grid-template-columns: auto 1fr; gap: 0 0.9rem; }
.plate__fig { font-variant-caps: all-small-caps; letter-spacing: 0.08em; font-weight: 700; color: var(--ink); }
.plate__legend { list-style: none; padding: 0; margin: 0.75rem 0 0; font-size: var(--step--1); columns: 2; column-gap: 1.5rem; }
.plate__legend li { break-inside: avoid; display: flex; gap: 0.5rem; }
.plate__legend b { font-family: var(--font-display); min-width: 1.2em; font-variant-numeric: tabular-nums; }
.plate__legend .is-accent b { color: var(--shu-text); }
@media (max-width: 30em) { .plate__legend { columns: 1; } }

/* Drawing colours, so the themes can recolour every illustration. */
.draw-ink { stroke: var(--ink); fill: none; }
.draw-ink-fill { fill: var(--ink); }
.draw-paper { fill: var(--paper); }
.draw-tint { fill: var(--tint-2); }
.draw-rule { stroke: var(--rule); fill: none; }
.draw-shu { stroke: var(--shu); fill: none; }
.draw-shu-fill { fill: var(--shu); }
.draw-grey { stroke: var(--ink-2); fill: none; }
.draw-grey-fill { fill: var(--ink-2); }
.draw-label { fill: var(--ink); font-family: var(--font-display); font-weight: 700; }
.draw-text { fill: var(--ink); font-family: var(--font-text); }

/* ---------- Figures row ---------- */

.figures {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid var(--ink);
  margin: 0;
}
.figures dd { margin: 0; }
.figures__item { display: flex; flex-direction: column; padding: 1.5rem 1.5rem 1.5rem 0; border-right: 1px solid var(--rule); margin: 0; min-width: 0; }
.figures__item .figures__value { order: -1; }
.figures__item + .figures__item { padding-left: 1.5rem; }
.figures__item:last-child { border-right: 0; }
.figures__value { display: block; font-family: var(--font-display); font-weight: 500; font-size: clamp(2rem, 3.1vw, 2.8125rem); line-height: 1; font-variant-numeric: tabular-nums; margin-bottom: 0.6rem; white-space: nowrap; }
.figures__item:first-child .figures__value { font-size: clamp(2.6rem, 4.4vw, 4rem); color: var(--shu-text); }
.figures__label { display: block; font-size: var(--step-0); line-height: 1.4; }
.figures__note { display: block; font-size: var(--step--1); color: var(--ink-2); margin-top: 0.35rem; }
.figures-caption { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 2rem; font-size: var(--step--1); color: var(--ink-2); margin-top: 1rem; }
@media (max-width: 60em) {
  .figures { grid-template-columns: 1fr 1fr; }
  .figures__item { border-right: 0; border-bottom: 1px solid var(--rule); padding-left: 0 !important; padding-right: 1rem; }
  .figures__item:first-child { grid-column: 1 / -1; }
}
@media (max-width: 30em) {
  .figures { grid-template-columns: 1fr; }
}

/* ---------- Programme index (numbered rows) ---------- */

.index-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.index-list__item {
  display: grid;
  grid-template-columns: 4.5rem minmax(0, 1fr) minmax(0, 13rem);
  gap: 0.5rem 1.5rem;
  padding-block: 1.6rem;
  border-bottom: 1px solid var(--rule);
  position: relative;
}
.index-list__ring { width: 2.6rem; height: 2.6rem; color: var(--ink); margin-top: 0.2rem; }
.index-list__item:hover .index-list__ring path { fill: var(--shu); }
.index-list__title { font-size: var(--step-2); margin: 0 0 0.35rem; }
.index-list__title a { text-decoration: none; }
.index-list__title a::after { content: ''; position: absolute; inset: 0; }
.index-list__title a:hover, .index-list__title a:focus-visible { text-decoration: underline; text-decoration-color: var(--link-line); }
.index-list__text { margin: 0; max-width: 34em; }
.index-list__ja { font-size: var(--step--1); color: var(--ink-2); margin-left: 0.5rem; font-weight: 500; }
.index-list__figure { text-align: right; align-self: center; }
.index-list__figure b { display: block; font-family: var(--font-display); font-size: var(--step-3); font-weight: 500; line-height: 1.1; font-variant-numeric: tabular-nums; }
.index-list__figure span { font-size: var(--step--1); color: var(--ink-2); line-height: 1.35; display: block; }
@media (max-width: 47.5em) {
  .index-list__item { grid-template-columns: 3rem minmax(0, 1fr); }
  .index-list__ring { width: 2rem; height: 2rem; }
  .index-list__figure { grid-column: 2; text-align: left; }
}

/* ---------- Story feature ---------- */

.feature { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); align-items: end; }
.feature__art { grid-column: 1 / span 7; margin: 0; }
.feature__art svg { width: 100%; height: auto; }
.feature__text { grid-column: 8 / span 5; padding-bottom: 0.5rem; }
.feature__quote { font-family: var(--font-display); font-size: var(--step-3); line-height: 1.3; margin: 0 0 1rem; text-wrap: balance; }
.feature__quote a { text-decoration: none; }
.feature__quote a:hover, .feature__quote a:focus-visible { text-decoration: underline; text-decoration-color: var(--link-line); }
.feature__meta { font-size: var(--step--1); color: var(--ink-2); }
@media (max-width: 60em) {
  .feature { display: block; }
  .feature__text { margin-top: 1.5rem; }
}

/* ---------- Tables ---------- */

.table-scroll { overflow-x: auto; margin-bottom: 1.5rem; }
.table-scroll:focus-visible { outline-offset: 0; }
table.data {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
  font-size: var(--step--1);
  margin: 0;
}
.data caption { text-align: left; font-family: var(--font-display); font-weight: 700; font-size: var(--step-1); padding-bottom: 0.75rem; caption-side: top; }
.data th, .data td { text-align: left; padding: 0.7rem 1rem 0.7rem 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
.data thead th { border-bottom: 2px solid var(--ink); font-weight: 700; vertical-align: bottom; }
.data tbody th { font-weight: 600; }
.data .num { text-align: right; white-space: nowrap; }
.data td.num, .data th.num { padding-left: 1rem; padding-right: 1.25rem; }
.data tr > :last-child { padding-right: 0; }
.data-notes + .table-scroll, .table-scroll + .table-scroll { margin-top: 2.5rem; }
.data tfoot td, .data tfoot th { border-bottom: 0; border-top: 2px solid var(--ink); font-weight: 700; }
.data .is-current { background: var(--shu-wash); }
.data-notes { font-size: var(--step--1); color: var(--ink-2); margin-top: 0.75rem; max-width: 46em; }
.data-notes p { margin-bottom: 0.4em; }

/* ---------- Outcome bars ---------- */

.bars { list-style: none; margin: 0 0 1rem; padding: 0; }
.bars__row { display: grid; grid-template-columns: minmax(0, 15rem) minmax(0, 1fr) 4.5rem; gap: 1rem; align-items: center; padding-block: 0.55rem; border-bottom: 1px solid var(--rule); font-size: var(--step--1); }
.bars__track { height: 1.1rem; background: var(--tint-2); position: relative; }
.bars__fill { position: absolute; inset: 0 auto 0 0; background: var(--ink); }
.bars__fill--shu { background: var(--shu); }
.bars__fill--hatch { background: repeating-linear-gradient(135deg, var(--ink) 0 2px, transparent 2px 6px); border: 1px solid var(--ink); }
.bars__fill--dots { background: radial-gradient(var(--ink) 1.2px, transparent 1.4px) 0 0 / 5px 5px; border: 1px solid var(--ink); }
.bars__value { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; }
@media (max-width: 37.5em) {
  .bars__row { grid-template-columns: minmax(0, 1fr) 4rem; }
  .bars__track { grid-column: 1 / -1; grid-row: 2; }
}

/* ---------- Notes, callouts and figures ---------- */

.note {
  border-left: 4px solid var(--shu);
  padding: 0.25rem 0 0.25rem 1.5rem;
  margin: 2rem 0;
  max-width: 44em;
}
.note__title { font-family: var(--font-text); font-size: var(--step--1); font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; margin: 0 0 0.5rem; color: var(--shu-text); }
.note p:last-child { margin-bottom: 0; }

.statement {
  font-family: var(--font-display);
  font-size: var(--step-2);
  line-height: 1.4;
  max-width: 24em;
  margin-bottom: 1.25em;
}

.pull-quote { margin: 2.5rem 0; padding: 0; border: 0; max-width: 30em; }
.pull-quote p { font-family: var(--font-display); font-size: var(--step-2); line-height: 1.4; margin-bottom: 0.6rem; }
.pull-quote p::before { content: '“'; color: var(--shu); margin-left: -0.5em; }
.pull-quote p::after { content: '”'; color: var(--shu); }
.pull-quote footer { font-size: var(--step--1); color: var(--ink-2); }

/* Key facts in a definition list. */
.facts { display: grid; grid-template-columns: minmax(0, 11rem) minmax(0, 1fr); gap: 0; border-top: 1px solid var(--ink); font-size: var(--step--1); }
.facts dt, .facts dd { margin: 0; padding: 0.7rem 0; border-bottom: 1px solid var(--rule); }
.facts dt { font-weight: 700; padding-right: 1rem; }
@media (max-width: 30em) {
  .facts { grid-template-columns: 1fr; }
  .facts dt { border-bottom: 0; padding-bottom: 0; }
}

/* Two columns of text inside the body area. */
.columns-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.5rem; }
@media (max-width: 47.5em) { .columns-2 { grid-template-columns: 1fr; gap: 0; } }

/* ---------- Lists of links: datelines, calls, reading ---------- */

.datelines { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.datelines__item { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: 0.25rem 1.5rem; padding-block: 1.1rem; border-bottom: 1px solid var(--rule); }
.datelines__date { font-variant-numeric: tabular-nums; font-size: var(--step--1); color: var(--ink-2); padding-top: 0.2rem; }
.datelines__tag { display: inline-block; font-size: var(--step--1); font-weight: 700; color: var(--shu-text); margin-bottom: 0.15rem; }
.datelines__title { font-family: var(--font-display); font-size: var(--step-1); font-weight: 500; line-height: 1.35; margin: 0; }
.datelines__title a { text-decoration: none; }
.datelines__title a:hover, .datelines__title a:focus-visible { text-decoration: underline; text-decoration-color: var(--link-line); }
@media (max-width: 37.5em) { .datelines__item { grid-template-columns: 1fr; } }

.more-link { display: inline-block; margin-top: 1.25rem; font-weight: 700; }
.more-link::after { content: ' →'; }

.button {
  display: inline-block;
  font: inherit;
  font-weight: 700;
  color: var(--paper);
  background: var(--ink);
  border: 2px solid var(--ink);
  padding: 0.7rem 1.4rem;
  text-decoration: none;
  cursor: pointer;
}
.button:hover { background: var(--paper); color: var(--ink); }
.button--quiet { background: var(--paper); color: var(--ink); }
.button--quiet:hover { background: var(--ink); color: var(--paper); }

/* ---------- The Kiroshi Opticals band ---------- */

.disclosure-band { border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); padding-block: 2.5rem; }
.disclosure-band__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2rem 4rem; align-items: start; }
.disclosure-band__figure { font-family: var(--font-display); font-size: calc(var(--step-6) * 1.2); line-height: 1; margin: 0 0 0.5rem; color: var(--ink); font-variant-numeric: tabular-nums; }
.disclosure-band__figure span { color: var(--shu-text); }
@media (max-width: 47.5em) { .disclosure-band__grid { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */

.site-footer { margin-top: 0; padding-bottom: 3rem; font-size: var(--step--1); border-top: 1px solid var(--ink); }
.acuity-rule { padding-block: 1.5rem 0.5rem; color: var(--ink); }
.acuity-rule svg { max-width: 100%; }
.footer__top { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2.5rem 2rem; padding-block: 2rem 2.5rem; }
.footer__brand { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, auto) minmax(0, 1fr) minmax(0, 1.2fr); gap: 1rem 3rem; align-items: start; padding-bottom: 2rem; border-bottom: 1px solid var(--rule); }
.footer__brand .footer__notice { margin: 0; }
.footer__notices { display: grid; gap: 0.75rem; }
.footer__home { text-decoration: none; display: inline-block; margin-bottom: 1rem; }
@media (min-width: 47.51em) { .footer__home .lockup__name { white-space: nowrap; font-size: 1.15rem; } }
.lockup__ja { white-space: nowrap; word-break: keep-all; }
@media (max-width: 30em) { .lockup__ja { letter-spacing: 0.18em; } }
.footer__statement { font-family: var(--font-display); font-size: var(--step-1); line-height: 1.35; max-width: 16em; }
.footer__notice { max-width: 26em; }
.footer__heading { font-family: var(--font-text); font-size: var(--step--1); font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; margin-bottom: 0.9rem; }
.footer__column ul, .footer__legal, .footer__office-list { list-style: none; padding: 0; margin: 0; }
.footer__column li + li { margin-top: 0.45rem; }
.footer__column a, .footer__legal a { text-decoration-thickness: 1px; }
.footer__offices { border-top: 1px solid var(--rule); padding-block: 2rem; }
.footer__office-list { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 1.5rem; }
.footer__office span { display: block; }
.footer__city { font-family: var(--font-display); font-weight: 700; font-size: var(--step-0); }
.footer__city-ja { font-weight: 500; font-size: 0.8em; color: var(--ink-2); margin-left: 0.25rem; }
.footer__role { color: var(--ink-2); margin-bottom: 0.4rem; line-height: 1.4; }
.footer__address { line-height: 1.45; }
.footer__contact { margin-top: 1.5rem; }
.footer__base { border-top: 1px solid var(--rule); padding-top: 1.5rem; }
.footer__legal { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; margin-bottom: 1rem; }
.footer__small { color: var(--ink-2); max-width: 60em; margin-bottom: 0.5rem; }
@media (max-width: 75em) {
  .footer__brand { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .footer__brand .footer__notices { grid-column: 1 / -1; }
  .footer__office-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 47.5em) {
  .footer__top { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer__brand { grid-template-columns: 1fr; }
  .footer__office-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 30em) {
  .footer__office-list { grid-template-columns: 1fr; }
}

/* ---------- Page bands that follow a page head ---------- */

.band--first { padding-top: clamp(2rem, 4vw, 3rem); }
.marker--quiet { min-height: 1px; }
.breakout { margin: 2.5rem 0; }
@media (min-width: 60.01em) { .breakout { margin-left: calc(-1 * (100% / 8 * 3 + var(--gutter))); max-width: 50rem; } }
.breakout .plate svg { max-height: 26rem; }
.nowrap { white-space: nowrap; }
.plain-list { padding-left: 1.2em; max-width: 40em; }
.plain-list li + li { margin-top: 0.6em; }
.plain-list li::marker { color: var(--shu); }
.home-hero__links { font-weight: 700; margin-top: 1.75rem; }
.home-hero__links span { color: var(--ink-2); margin-inline: 0.4rem; }

/* ---------- Standards list (home) ---------- */

.standards-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.standards-list li { display: grid; grid-template-columns: 6rem minmax(0, 1fr); gap: 0.1rem 1rem; padding-block: 1rem; border-bottom: 1px solid var(--rule); }
.standards-list__code { grid-row: span 2; font-family: var(--font-display); font-weight: 700; font-size: var(--step-0); color: var(--shu-text); white-space: nowrap; }
.standards-list a { font-family: var(--font-display); font-size: var(--step-1); line-height: 1.3; }
.standards-list__status { font-size: var(--step--1); color: var(--ink-2); }

/* ---------- Outcome bars caption ---------- */

.bars-figure { margin: 2rem 0 2.5rem; }
.bars-figure figcaption { font-family: var(--font-display); font-size: var(--step-1); margin-bottom: 0.75rem; }
.bars-figure figcaption strong { font-weight: 700; }

/* ---------- Programme page ---------- */

.programme-contact { margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid var(--rule); font-size: var(--step--1); }
.grant-id { display: block; font-family: var(--font-codes); font-size: var(--step--1); font-weight: 700; color: var(--shu-text); font-variant-numeric: tabular-nums; letter-spacing: 0.02em; }
.story-links { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--ink); }
.story-links li { padding-block: 0.9rem; border-bottom: 1px solid var(--rule); display: flex; flex-direction: column; gap: 0.2rem; }
.story-links a { font-family: var(--font-display); font-size: var(--step-1); line-height: 1.35; }

/* ---------- Reading list ---------- */

.reading-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.reading-list__item { padding-block: 1.4rem; border-bottom: 1px solid var(--rule); max-width: 44em; }
.reading-list__title { font-size: var(--step-1); margin-bottom: 0.15rem; }
.reading-list__meta { font-size: var(--step--1); color: var(--ink-2); margin-bottom: 0.6rem; }
.reading-list__item p:last-child { margin-bottom: 0; }

/* ---------- Story pages ---------- */

.story__head { padding-block: clamp(2.5rem, 6vw, 5rem) 0; }
.story__title { font-size: var(--step-6); line-height: 1.12; max-width: 14em; margin-bottom: 0.45em; }
.story__subtitle { font-size: var(--step-1); line-height: 1.5; max-width: 32em; }
.story__art { margin-block: clamp(2rem, 5vw, 4rem); }
.story__art svg { width: 100%; height: auto; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--rule); }
.story__art figcaption { margin-top: 0.75rem; }
.story__grid { align-items: start; }
.story__aside { grid-column: 1 / span 3; position: sticky; top: 1.5rem; }
.story__aside-title { font-family: var(--font-text); font-size: var(--step--1); font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; margin-bottom: 0.75rem; }
.story__aside .facts { grid-template-columns: 1fr; }
.story__aside .facts dt { border-bottom: 0; padding-bottom: 0; font-weight: 400; color: var(--ink-2); }
.story__aside .facts dd { font-family: var(--font-display); font-size: var(--step-1); font-weight: 700; padding-top: 0.1rem; }
.story__body > p:first-child::first-letter { font-family: var(--font-display); font-size: 3.4em; float: left; line-height: 0.9; margin: 0.08em 0.12em 0 0; color: var(--shu-text); }
.story__consent { border-top: 1px solid var(--rule); padding-top: 1rem; margin-top: 2.5rem; }
@media (max-width: 60em) {
  .story__aside { position: static; margin-bottom: 2rem; }
}

/* ---------- Grants database ---------- */

.scope p { max-width: 44em; }
.filters { border-top: 2px solid var(--ink); border-bottom: 1px solid var(--rule); padding-block: 1.5rem; margin-bottom: 1.5rem; display: grid; gap: 1.25rem; }
.filters label { display: block; font-weight: 700; font-size: var(--step--1); margin-bottom: 0.35rem; }
.filters input, .filters select {
  font: inherit; font-size: var(--step-0); color: var(--ink); background: var(--paper);
  border: 2px solid var(--ink); border-radius: 0; padding: 0.55rem 0.75rem; width: 100%; min-height: 2.9rem;
}
.filters select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%); background-position: calc(100% - 18px) 55%, calc(100% - 12px) 55%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 2.25rem; }
.filters__search { max-width: 40rem; }
.filters__row { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1rem; }
@media (max-width: 75em) { .filters__row { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 47.5em) { .filters__row { grid-template-columns: minmax(0, 1fr); } }
.results-status { font-weight: 700; margin-bottom: 0.75rem; }
.results-status:focus { outline: none; }
.grants-table th[scope='row'] { font-weight: 400; min-width: 16rem; }
.grant-title { display: block; }
.grant-country, .grant-type, .grant-term { display: block; font-size: 0.92em; color: var(--ink-2); }
.status { display: inline-block; font-size: 0.92em; font-weight: 700; padding: 0.05rem 0.5rem; border: 1px solid var(--ink); white-space: nowrap; }
.status--active { background: var(--ink); color: var(--paper); }
.pager { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; margin-top: 1.25rem; }
.pager__button { font: inherit; font-weight: 700; color: var(--ink); background: var(--paper); border: 2px solid var(--ink); padding: 0.5rem 1rem; cursor: pointer; }
.pager__button:disabled { opacity: 0.45; cursor: default; }
.pager__label { font-variant-numeric: tabular-nums; }
.results-empty { font-weight: 700; padding-block: 1rem; }

/* ---------- 404 ---------- */

.not-found__ring { color: var(--ink); margin-bottom: 1rem; }

/* ---------- Tables that stack on narrow screens ---------- */

@media (max-width: 47.5em) {
  .data--stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .data--stack, .data--stack tbody, .data--stack tr, .data--stack th, .data--stack td { display: block; width: 100%; }
  .data--stack tr { border-bottom: 1px solid var(--rule); padding-block: 0.9rem; }
  .data--stack tbody tr:first-child { border-top: 2px solid var(--ink); }
  .data--stack th, .data--stack td { border: 0; padding: 0.15rem 0; text-align: left; }
  .data--stack td.num { text-align: left; padding-left: 0; }
  .data--stack td[data-label]::before { content: attr(data-label) ': '; font-weight: 700; }
  .data--stack .grant-country, .data--stack .grant-type, .data--stack .grant-term { display: inline; margin-left: 0.4rem; }
  .data--stack th[scope='row'] { min-width: 0; }
  .data--stack .nowrap { white-space: normal; }
  .table-scroll:has(.data--stack) { overflow: visible; }
}

/* ---------- Phase two components ---------- */

.h3 { font-size: var(--step-2); }
.spaced { margin-top: 3rem; }
.index-list--compact .index-list__item { grid-template-columns: 3.5rem minmax(0, 1fr); padding-block: 1.1rem; }
.index-list--compact .index-list__ring { width: 2rem; height: 2rem; }
.index-list--compact .index-list__title { font-size: var(--step-1); }
.about .index-list { margin-top: 2rem; }

/* Numbered rules, steps and conditions */
.rules { counter-reset: rule; list-style: none; padding: 0; margin: 0 0 1.5rem; max-width: 44em; }
.rules > li { counter-increment: rule; position: relative; padding: 1rem 0 1rem 3.25rem; border-top: 1px solid var(--rule); }
.rules > li:last-child { border-bottom: 1px solid var(--rule); }
.rules > li::before { content: counter(rule); position: absolute; left: 0; top: 0.85rem; font-family: var(--font-display); font-weight: 700; font-size: var(--step-1); color: var(--shu-text); }

.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; }
.steps__item { counter-increment: step; display: grid; grid-template-columns: 3.5rem minmax(0, 1fr); column-gap: 1rem; padding-block: 1.25rem; border-top: 1px solid var(--ink); }
.steps__item::before { content: counter(step, decimal-leading-zero); grid-row: span 2; font-family: var(--font-display); font-size: var(--step-3); line-height: 1; color: var(--shu-text); }
.steps__title { font-size: var(--step-1); margin-bottom: 0.35rem; }
.steps__item p { margin: 0; max-width: 40em; }

.conditions { list-style: none; padding: 0; margin: 0; counter-reset: condition; }
.conditions__item { counter-increment: condition; padding-block: 1.25rem; border-top: 1px solid var(--rule); max-width: 44em; }
.conditions__title { font-size: var(--step-1); margin-bottom: 0.4rem; }
.conditions__title::before { content: counter(condition) '. '; color: var(--shu-text); }
.conditions__item p { margin: 0; }

.priorities { list-style: none; padding: 0; margin: 0 0 1.5rem; counter-reset: priority; }
.priorities > li { counter-increment: priority; padding: 1rem 0 1rem 3.25rem; border-top: 1px solid var(--rule); position: relative; }
.priorities > li::before { content: counter(priority) '.'; position: absolute; left: 0; top: 0.9rem; font-family: var(--font-display); font-weight: 700; font-size: var(--step-1); }
.priorities__title { font-size: var(--step-1); margin-bottom: 0.35rem; }
.priorities__region { font-family: var(--font-text); font-size: var(--step--1); font-weight: 400; color: var(--ink-2); letter-spacing: 0; }
.priorities ul { margin: 0; padding-left: 1.1em; }

/* Calls */
.calls { list-style: none; margin: 0; padding: 0; }
.call { padding-block: 1.5rem; scroll-margin-top: 2rem; }
.call + .call { border-top: 1px solid var(--rule); }
.call__title { font-size: var(--step-2); margin-bottom: 0.75rem; }
.call:target .call__title { color: var(--shu-text); }

/* Offices and link grids */
.office-cards { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--ink); }
.office-cards li { padding: 1rem 1rem 1rem 0; border-bottom: 1px solid var(--rule); }
.office-cards span { display: block; }
.office-cards__city { font-family: var(--font-display); font-weight: 700; font-size: var(--step-1); }
.office-cards__city [lang='ja'] { font-size: 0.7em; color: var(--ink-2); font-weight: 500; }
.office-cards__role { font-size: var(--step--1); color: var(--ink-2); }
@media (max-width: 47.5em) { .office-cards { grid-template-columns: 1fr 1fr; } }
@media (max-width: 30em) { .office-cards { grid-template-columns: 1fr; } }

.link-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 2rem; border-top: 1px solid var(--ink); }
.link-grid li { padding-block: 1rem; border-bottom: 1px solid var(--rule); display: flex; flex-direction: column; gap: 0.2rem; }
.link-grid a { font-family: var(--font-display); font-size: var(--step-1); line-height: 1.3; }
.link-grid span { font-size: var(--step--1); color: var(--ink-2); }
@media (max-width: 47.5em) { .link-grid { grid-template-columns: 1fr; } }

/* Timeline */
.timeline { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--ink); }
.timeline__item { display: grid; grid-template-columns: 5rem minmax(0, 1fr); gap: 1rem; padding: 0.85rem 0 0.85rem 1.5rem; position: relative; }
.timeline__item::before { content: ''; position: absolute; left: -7px; top: 1.3rem; width: 12px; height: 12px; background: var(--paper); border: 2px solid var(--ink); border-radius: 50%; }
.timeline__item.is-key::before { background: var(--shu); border-color: var(--shu); }
.timeline__year { font-family: var(--font-display); font-weight: 700; font-size: var(--step-1); line-height: 1.3; }
.timeline__text { margin: 0; max-width: 38em; }
@media (max-width: 30em) { .timeline__item { grid-template-columns: 1fr; gap: 0; } }

/* People */
.people-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.people-list__item { padding-block: 1rem; border-bottom: 1px solid var(--rule); }
.people-list__name { font-size: var(--step-1); margin-bottom: 0.15rem; }
.people-list__role { margin: 0 0 0.3rem; color: var(--ink-2); }
.people-list__interests { margin: 0; font-size: var(--step--1); }
.people-grid { list-style: none; margin: 0; padding: 0; }
.person { padding-block: 1.75rem; border-top: 1px solid var(--rule); scroll-margin-top: 2rem; }
.person__head { display: flex; gap: 1rem; align-items: flex-start; margin-bottom: 0.75rem; }
.person__mark { width: 2.2rem; height: 2.2rem; flex: none; color: var(--ink); margin-top: 0.3rem; }
.person__name { font-size: var(--step-2); margin: 0; }
.person__role { margin: 0.2rem 0 0; color: var(--ink-2); }
.person__bio { max-width: 40em; padding-left: 3.2rem; }
.person__bio p:last-child { margin-bottom: 0; }
.person:target .person__name { color: var(--shu-text); }
@media (max-width: 37.5em) { .person__bio { padding-left: 0; } }

/* FAQ */
.faq { padding-block: 1.5rem; border-top: 1px solid var(--rule); }
.faq:first-child { border-top: 1px solid var(--ink); }
.faq__question { font-size: var(--step-2); margin-bottom: 0.75rem; }

/* Programme cards (index) */
.programme-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 3rem; }
.programme-card { position: relative; padding: 1.75rem 0 1.75rem 0; border-top: 1px solid var(--ink); }
.programme-card:nth-child(2n) { margin-top: 3rem; }
.programme-card__ring { width: 2.4rem; height: 2.4rem; color: var(--ink); position: absolute; right: 0; top: 1.75rem; }
.programme-card__number { font-family: var(--font-display); font-weight: 700; color: var(--shu-text); margin: 0 0 0.35rem; }
.programme-card__title { font-size: var(--step-2); padding-right: 3.5rem; }
.programme-card__title [lang='ja'] { font-size: 0.55em; color: var(--ink-2); }
.programme-card__figure b { font-family: var(--font-display); font-size: var(--step-2); font-weight: 500; display: block; line-height: 1.1; }
.programme-card__figure { color: var(--ink-2); font-size: var(--step--1); }
.programme-card__meta { font-size: var(--step--1); color: var(--ink-2); margin: 0; }
@media (max-width: 47.5em) { .programme-cards { grid-template-columns: 1fr; } .programme-card:nth-child(2n) { margin-top: 0; } }

/* Stories index */
.story-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 3.5rem 3rem; }
.story-card__art svg { width: 100%; height: auto; border-top: 1px solid var(--ink); margin-bottom: 1rem; }
.story-card__quote { font-size: var(--step-2); line-height: 1.3; margin: 0.25rem 0 0.75rem; }
.story-card__quote a { text-decoration: none; }
.story-card__quote a:hover, .story-card__quote a:focus-visible { text-decoration: underline; text-decoration-color: var(--link-line); }
.story-card:nth-child(2n) { margin-top: 4rem; }
@media (max-width: 47.5em) { .story-grid { grid-template-columns: 1fr; } .story-card:nth-child(2n) { margin-top: 0; } }
h2.feature__quote { font-weight: 500; }

/* Publications */
.publications { list-style: none; margin: 0 0 1.5rem; padding: 0; border-top: 1px solid var(--ink); }
.publication { padding-block: 1.25rem; border-bottom: 1px solid var(--rule); max-width: 46em; }
.publication__meta { font-size: var(--step--1); color: var(--ink-2); margin-bottom: 0.25rem; }
.publication__meta .grant-id { display: inline; margin-right: 0.5rem; }
.publication__title { font-size: var(--step-1); margin-bottom: 0.4rem; }
.publication p:last-child { margin-bottom: 0; }

/* Standards */
.standard__section { padding-top: 0.5rem; }
.standard__section h2 { font-size: var(--step-2); border-top: 1px solid var(--ink); padding-top: 1rem; margin-top: 1.5rem; }
.standard__number { color: var(--shu-text); margin-right: 0.35rem; }
.requirement { display: grid; grid-template-columns: 3rem minmax(0, 1fr); gap: 1rem; padding: 0.6rem 0; border-bottom: 1px solid var(--rule); margin: 0; }
.requirement__id { font-family: var(--font-codes); font-weight: 700; font-size: var(--step--1); padding-top: 0.2rem; }
.standard__note { background: var(--tint); padding: 0.9rem 1.1rem; font-size: var(--step--1); margin: 1rem 0; border-left: 3px solid var(--rule); }

/* ---------- Reports ---------- */

.letter p { font-size: var(--step-0); }
.letter__sign { display: flex; align-items: center; gap: 1.25rem; margin-top: 2rem; padding-top: 1.25rem; border-top: 1px solid var(--rule); }
.letter__sign p { margin: 0; line-height: 1.5; }
.number-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin: 0; border-top: 1px solid var(--ink); }
.number-grid div { display: flex; flex-direction: column; padding: 1.25rem 1rem 1.25rem 0; border-bottom: 1px solid var(--rule); }
.number-grid dd { order: -1; margin: 0 0 0.35rem; font-family: var(--font-display); font-size: var(--step-3); line-height: 1.1; font-variant-numeric: tabular-nums; }
.number-grid dt { font-size: var(--step--1); color: var(--ink-2); }
.number-grid div:first-child dd { color: var(--shu-text); }
@media (max-width: 60em) { .number-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.accounts-notes h3 { font-size: var(--step-1); margin-top: 2rem; }
.accounts-notes h3:first-child { margin-top: 0; }
.accounts-notes > p { max-width: 44em; }

/* ---------- News articles ---------- */

.article__title { max-width: 22em; }
.article__aside { grid-column: 1 / span 3; padding-right: 1.5rem; }
.article__body p:first-child { font-size: var(--step-1); line-height: 1.5; }
.article__end { color: var(--shu); font-size: 0.8rem; }
.article__nav { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid var(--ink); }
.article__nav a { display: flex; flex-direction: column; gap: 0.25rem; font-family: var(--font-display); font-size: var(--step-0); line-height: 1.35; }
.article__nav a + a { text-align: right; }
.article__nav .small { font-family: var(--font-text); text-transform: uppercase; letter-spacing: 0.1em; }
@media (max-width: 60em) { .article__aside { margin-bottom: 1.5rem; } }
@media (max-width: 37.5em) { .article__nav { grid-template-columns: 1fr; } .article__nav a + a { text-align: left; } }

/* ---------- Careers ---------- */

.vacancies { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.vacancy { padding-block: 1.25rem; border-bottom: 1px solid var(--rule); }
.vacancy__title { font-size: var(--step-1); margin-bottom: 0.25rem; }
.vacancy__meta { font-size: var(--step--1); color: var(--ink-2); margin-bottom: 0.5rem; }
.vacancy p:last-child { margin-bottom: 0; max-width: 40em; }

/* ---------- Contact ---------- */

.enquiry { display: grid; gap: 1.25rem; max-width: 36rem; }
.enquiry label { display: block; font-weight: 700; margin-bottom: 0.35rem; }
.enquiry select, .enquiry textarea { font: inherit; color: var(--ink); background: var(--paper); border: 2px solid var(--ink); border-radius: 0; padding: 0.55rem 0.75rem; width: 100%; }
.enquiry button { justify-self: start; }
.enquiry__result { margin-top: 1.5rem; padding: 1rem 1.25rem; border-left: 4px solid var(--shu); background: var(--paper); max-width: 40rem; }
.enquiry__result:focus { outline: 3px solid var(--focus); outline-offset: 3px; }
.office-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 2rem; border-top: 1px solid var(--ink); }
.office-list__item { padding-block: 1.25rem; border-bottom: 1px solid var(--rule); }
.office-list__city { font-size: var(--step-2); margin-bottom: 0.25rem; }
.office-list__city [lang='ja'] { font-size: 0.6em; color: var(--ink-2); }
.office-list__role { color: var(--ink-2); font-size: var(--step--1); margin-bottom: 0.5rem; }
@media (max-width: 60em) { .office-list { grid-template-columns: 1fr 1fr; } }
@media (max-width: 37.5em) { .office-list { grid-template-columns: 1fr; } }
.partner-feature { border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); padding-block: 1.5rem; margin-bottom: 2rem; max-width: 44em; }
.partner-feature h2 { margin-bottom: 0.15rem; }

/* ---------- Legal ---------- */

.legal h2 { font-size: var(--step-2); margin-top: 2.25rem; }
.legal h2:first-child { margin-top: 0; }
.logo-specimens { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem; margin-bottom: 2rem; }
.logo-specimens figure { margin: 0; }
.logo-specimens__box { display: flex; align-items: center; justify-content: center; padding: 2.5rem; border: 1px solid var(--rule); margin-bottom: 0.75rem; }
.logo-specimens figcaption { font-size: var(--step--1); color: var(--ink-2); }
@media (max-width: 37.5em) { .logo-specimens { grid-template-columns: 1fr; } }

/* ---------- KURA (internal data service) ---------- */

body.kura { background: var(--paper); font-family: var(--font-codes); font-size: 1rem; }
.kura-bar { background: var(--ink); color: var(--paper); }
.kura-bar__inner { max-width: 72rem; margin: 0 auto; padding: 0.75rem var(--margin); display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 2rem; }
.kura-bar__name { margin: 0; font-weight: 700; letter-spacing: 0.08em; }
.kura-bar__name [lang='ja'] { color: var(--paper); font-weight: 700; margin-right: 0.25rem; }
.kura-bar__sub { font-weight: 400; letter-spacing: 0; opacity: 0.85; margin-left: 0.5rem; }
.kura-bar a { color: var(--paper); text-decoration-color: var(--shu); }
.kura-nav ul { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; list-style: none; margin: 0; padding: 0; }
.kura-nav a[aria-current] { text-decoration-thickness: 3px; }
.kura-bar__user { margin: 0 0 0 auto; font-size: 0.875rem; display: flex; align-items: center; gap: 0.75rem; }
.kura-bar .kura-button--quiet { color: var(--paper); border-color: var(--paper); background: transparent; }
.kura-training { background: var(--shu); color: #fff; font-weight: 700; padding: 0.5rem var(--margin); text-align: center; }
html[data-theme='yellow'] .kura-training, html:has(#contrast-yellow:checked) .kura-training { color: #000; }
.kura-wrap { max-width: 72rem; margin: 0 auto; padding: 2rem var(--margin) 4rem; }
.kura-title { font-family: var(--font-codes); font-weight: 700; font-size: 1.75rem; letter-spacing: 0; margin-bottom: 0.5rem; }
.kura-h2 { font-family: var(--font-codes); font-weight: 700; font-size: 1.25rem; margin-top: 2.25rem; }
.kura-meta, .kura-small { color: var(--ink-2); font-size: 0.875rem; }
.kura .data caption { font-family: var(--font-codes); font-size: 1rem; }
.kura .data { font-size: 0.875rem; }
.kura-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border: 1px solid var(--ink); margin: 1.5rem 0; }
.kura-stats div { display: flex; flex-direction: column; padding: 1rem; border-right: 1px solid var(--rule); min-width: 0; }
.kura-stats div:last-child { border-right: 0; }
.kura-stats dd { order: -1; margin: 0 0 0.25rem; font-size: clamp(1rem, 2.4vw, 1.5rem); font-weight: 700; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.kura-stats dt { font-size: 0.8125rem; color: var(--ink-2); }
@media (max-width: 47.5em) { .kura-stats { grid-template-columns: 1fr; } .kura-stats div { border-right: 0; border-bottom: 1px solid var(--rule); } }
.kura-signin { max-width: 30rem; }
.kura-form { display: grid; gap: 1rem; margin: 1.5rem 0; }
.kura-field label { display: block; font-weight: 700; margin-bottom: 0.3rem; }
.kura-field input { font: inherit; width: 100%; padding: 0.6rem 0.75rem; border: 2px solid var(--ink); background: var(--paper); color: var(--ink); border-radius: 0; text-transform: uppercase; }
.kura-button { font: inherit; font-weight: 700; padding: 0.55rem 1.1rem; border: 2px solid var(--ink); background: var(--ink); color: var(--paper); cursor: pointer; justify-self: start; }
.kura-button--quiet { background: var(--paper); color: var(--ink); padding: 0.2rem 0.6rem; }
.kura-error { color: var(--shu-text); font-weight: 700; margin: 0; }
.kura-frames { list-style: none; margin: 1.5rem 0 0; padding: 0; display: grid; gap: 2.5rem; }
.kura-frame { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 1.5rem; border-top: 1px solid var(--ink); padding-top: 1.25rem; }
.kura-frame__figure { margin: 0; }
.kura-frame__figure svg { width: 100%; height: auto; border: 1px solid var(--rule); }
.kura-frame__id { font-size: 0.8125rem; color: var(--ink-2); margin-top: 0.5rem; }
.kura-frame__meta { margin: 0; font-size: 0.875rem; }
.kura-frame__meta div { display: grid; grid-template-columns: 8rem minmax(0, 1fr); gap: 0.5rem; padding: 0.35rem 0; border-bottom: 1px solid var(--rule); }
.kura-frame__meta dt { color: var(--ink-2); }
.kura-frame__meta dd { margin: 0; }
@media (max-width: 47.5em) { .kura-frame { grid-template-columns: 1fr; } }
.kura-label { fill: #ffffff; font-family: var(--font-codes); font-weight: 700; letter-spacing: 0.02em; }
html[data-theme='yellow'] .kura-label, html:has(#contrast-yellow:checked) .kura-label { fill: #000000; }
.kura-mono { font-family: var(--font-codes); }
.kura-docs { list-style: none; margin: 1.5rem 0 0; padding: 0; border-top: 1px solid var(--ink); }
.kura-docs li { padding: 0.9rem 0; border-bottom: 1px solid var(--rule); display: flex; flex-direction: column; gap: 0.2rem; }
.kura-docs span { font-size: 0.8125rem; color: var(--ink-2); }
.kura-doc { max-width: 44rem; }
.kura-doc__kind { text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.8125rem; color: var(--shu-text); font-weight: 700; margin: 1rem 0 0.25rem; }
.kura-doc__head { margin: 1rem 0 1.5rem; font-size: 0.875rem; border-top: 1px solid var(--ink); }
.kura-doc__head div { display: grid; grid-template-columns: 4rem minmax(0, 1fr); gap: 0.5rem; padding: 0.35rem 0; border-bottom: 1px solid var(--rule); }
.kura-doc__head dt { color: var(--ink-2); }
.kura-doc__head dd { margin: 0; }
.kura-annex { margin-top: 2rem; padding: 1rem 1.25rem; border: 1px dashed var(--ink); }
.kura-annex .kura-h2 { margin-top: 0; font-size: 1rem; }

/* ---------- Mieru at home ---------- */

.mieru { border-top: 2px solid var(--ink); padding-top: 1.5rem; }
.mieru__steps { padding-left: 1.2em; max-width: 40em; }
.mieru__steps li + li { margin-top: 0.5rem; }
.mieru__calibrate { margin: 1.5rem 0; max-width: 100%; overflow: hidden; }
.mieru__calibrate label { display: block; font-weight: 700; margin-bottom: 0.35rem; }
.mieru__calibrate input { width: 100%; max-width: 30rem; accent-color: var(--shu); }
.mieru__card { height: 54px; margin-top: 0.75rem; border: 2px solid var(--ink); border-radius: 6px; background: var(--tint); display: flex; align-items: center; justify-content: center; font-size: var(--step--1); max-width: 100%; }
.mieru__eye { border: 0; padding: 0; margin: 0 0 1.5rem; }
.mieru__eye legend { font-weight: 700; margin-bottom: 0.35rem; padding: 0; }
.mieru__eye label { display: block; margin: 0.25rem 0; }
.mieru__progress { font-weight: 700; }
.mieru__stage { min-height: 200px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--rule); background: var(--paper); margin-bottom: 1rem; }
.mieru__ring { color: var(--ink); display: block; }
.mieru__answers { display: grid; grid-template-columns: repeat(3, minmax(0, 6rem)); grid-template-areas: '. up .' 'left . right' '. down .'; gap: 0.5rem; justify-content: center; margin-bottom: 1rem; }
.mieru__answer { font: inherit; font-weight: 700; padding: 0.7rem 0.5rem; border: 2px solid var(--ink); background: var(--paper); color: var(--ink); cursor: pointer; min-height: 3rem; }
.mieru__answer:hover { background: var(--ink); color: var(--paper); }
.mieru__answer--up { grid-area: up; } .mieru__answer--down { grid-area: down; } .mieru__answer--left { grid-area: left; } .mieru__answer--right { grid-area: right; }
.mieru__skip { text-align: center; font-size: var(--step--1); }
.link-button { font: inherit; color: var(--ink); background: none; border: 0; padding: 0; text-decoration: underline; text-decoration-color: var(--link-line); text-underline-offset: 0.22em; cursor: pointer; }
.mieru__panel:focus { outline: none; }
.handshake { font-family: var(--font-codes); background: var(--ink); color: var(--paper); padding: 1.25rem 1.5rem; margin-bottom: 1rem; max-width: 40rem; }
.handshake a { color: var(--paper); text-decoration-color: var(--shu); }
.handshake__title { font-weight: 700; margin-bottom: 0.75rem; }
.handshake__title::first-letter { color: var(--shu); }
.handshake__rows { margin: 0; }
.handshake__rows div { display: grid; grid-template-columns: 7rem minmax(0, 1fr); gap: 0.75rem; padding: 0.15rem 0; }
.handshake__rows dt { opacity: 0.8; }
.handshake__rows dd { margin: 0; overflow-wrap: anywhere; }
.chart-print .plate svg { max-width: 34rem; margin: 0 auto; }
.chart-text { margin-top: 1.5rem; }
.chart-text summary { cursor: pointer; font-weight: 700; margin-bottom: 1rem; }

@media print {
  .site-header, .breadcrumbs, .site-footer, .skip-link { display: none !important; }
  body:has(.chart-print) .mieru, body:has(.chart-print) .page-head, body:has(.chart-print) .band:not(#chart), body:has(.chart-print) .chart-text, body:has(.chart-print) .marker { display: none !important; }
  body:has(.chart-print) #chart { padding: 0; margin: 0; background: #fff; }
  body:has(.chart-print) #chart .grid { display: block; }
}

/* ---------- Main navigation as a menu on narrow or enlarged screens ---------- */

.nav-menu__summary { display: none; }
.nav-menu.is-collapsible .nav-menu__summary {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-weight: 700; cursor: pointer; padding: 0.45rem 0.9rem; border: 2px solid var(--ink); list-style: none;
}
.nav-menu.is-collapsible .nav-menu__summary::-webkit-details-marker { display: none; }
.nav-menu.is-collapsible .nav-menu__summary::before { content: ''; width: 1.1rem; height: 0.75rem; border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink); background: linear-gradient(var(--ink), var(--ink)) center / 100% 2px no-repeat; }
.nav-menu.is-collapsible[open] .nav-menu__summary { background: var(--ink); color: var(--paper); }
.nav-menu.is-collapsible[open] .nav-menu__summary::before { border-color: var(--paper); background-image: linear-gradient(var(--paper), var(--paper)); }
.nav-menu.is-collapsible { width: 100%; }
.nav-menu.is-collapsible .primary { margin-top: 0.75rem; }
.nav-menu.is-collapsible .primary__list { flex-direction: column; gap: 0; border-top: 1px solid var(--rule); }
.nav-menu.is-collapsible .primary__link { padding-block: 0.6rem; border-bottom: 1px solid var(--rule); }
.nav-menu.is-collapsible .primary__link[aria-current='page'] { border-bottom-color: var(--shu); }

/* ---------- Home: the headline set as an eye chart ---------- */

.chart-hero { padding-block: clamp(2.5rem, 6vw, 5rem) 0; }
.chart-hero__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); }
.chart-hero__vertical {
  grid-column: 1; grid-row: 1 / span 2;
  writing-mode: vertical-rl;
  font-family: var(--font-display);
  font-size: var(--step-2);
  letter-spacing: 0.4em;
  line-height: 1.4;
  margin: 0;
}
.chart-hero__mark { display: inline-block; width: 0.7rem; height: 0.7rem; background: var(--shu); margin-bottom: 1rem; }
.chart-hero__chart { grid-column: 2 / span 10; text-align: center; padding-bottom: clamp(2rem, 4vw, 3rem); border-bottom: 1px solid var(--ink); }
.chart-hero__ring { width: clamp(4rem, 9vw, 7.5rem); height: auto; margin: 0 auto clamp(1.25rem, 3vw, 2.5rem); color: var(--ink); }
.chart-hero__title { margin: 0; font-weight: 500; line-height: 1.12; letter-spacing: 0; }
.chart-line { position: relative; display: block; padding-inline: 3.25rem; margin-bottom: 0.18em; text-wrap: balance; }
.chart-line__text { letter-spacing: 0.06em; }
.chart-line__acuity { position: absolute; left: 0; top: 50%; transform: translateY(-50%); font-family: var(--font-text); font-size: var(--step--1); font-weight: 400; letter-spacing: 0; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.chart-line--1 { font-size: clamp(3rem, 10vw, 8.4rem); }
.chart-line--2 { font-size: clamp(2.3rem, 7vw, 5.9rem); }
.chart-line--3 { font-size: clamp(1.75rem, 4.9vw, 4.1rem); }
.chart-line--4 { font-size: clamp(1.4rem, 3.5vw, 2.9rem); }
.chart-line--5 { font-size: clamp(1.2rem, 2.5vw, 2.05rem); color: var(--shu-text); }
.chart-hero__lead { grid-column: 3 / span 7; padding-top: 2rem; }
.chart-hero__lead p:first-child { font-size: var(--step-1); line-height: 1.5; }
.chart-hero__links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.75rem; font-weight: 700; }
@media (max-width: 60em) {
  .chart-hero__grid { display: block; }
  .chart-hero__vertical { writing-mode: horizontal-tb; font-size: var(--step-0); letter-spacing: 0.2em; margin-bottom: 1.5rem; display: flex; align-items: center; gap: 0.75rem; }
  .chart-hero__mark { margin: 0; }
  .chart-line { padding-inline: 2.4rem; }
}
@media (max-width: 30em) { .chart-line { padding-inline: 0; } .chart-line__acuity { display: none; } }

/* ---------- The year as a ledger ---------- */

.ledger-title { font-size: var(--step-2); }
.ledger { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 3.5rem; margin: 0; border-top: 1px solid var(--ink); }
.ledger__row { display: flex; align-items: baseline; gap: 0.75rem; padding-block: 0.8rem; border-bottom: 1px solid var(--rule); }
.ledger__row dt { flex: 1; display: flex; align-items: baseline; gap: 0.75rem; min-width: 0; }
.ledger__row dt::after { content: ''; flex: 1; min-width: 1.5rem; border-bottom: 2px dotted var(--ink-2); transform: translateY(-0.25em); }
.ledger__row dd { margin: 0; font-family: var(--font-display); font-size: var(--step-2); line-height: 1; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ledger__row:first-child dd { color: var(--shu-text); }
.ledger-note { font-size: var(--step--1); color: var(--ink-2); margin-top: 1rem; max-width: 46em; }
@media (max-width: 60em) { .ledger { grid-template-columns: 1fr; } }

.home-plate { margin-top: 3rem; max-width: 40rem; }

/* ---------- Depth pages ---------- */

.link-grid--tight { margin-top: 2rem; }
.downloads { list-style: none; padding: 0; margin: 1rem 0; }
.downloads li { padding-block: 0.6rem; border-bottom: 1px solid var(--rule); }
.postal { font-style: normal; border-left: 4px solid var(--shu); padding: 0.5rem 0 0.5rem 1.25rem; margin: 1rem 0 1.5rem; line-height: 1.6; }
.report-form__group { border: 0; padding: 0; margin: 0; }
.report-form__group legend { font-weight: 700; margin-bottom: 0.35rem; padding: 0; }
.report-form__group label { display: block; margin: 0.2rem 0; }
.report-form input[type='text'] { font: inherit; color: var(--ink); background: var(--paper); border: 2px solid var(--ink); border-radius: 0; padding: 0.55rem 0.75rem; width: 100%; }
.report-form__output { font-family: var(--font-codes); font-size: var(--step--1); width: 100%; border: 2px solid var(--ink); padding: 0.75rem; background: var(--paper); color: var(--ink); margin-top: 0.35rem; }
.enquiry__result label { display: block; font-weight: 700; margin-top: 1rem; }
.arrangement__title { font-family: var(--font-display); font-size: var(--step-3); letter-spacing: 0.5em; text-align: center; margin-bottom: 1rem; }
.arrangement__parties { text-align: center; margin-bottom: 2rem; }
.arrangement { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.arrangement__article { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1rem 3rem; padding-block: 1.25rem; border-bottom: 1px solid var(--rule); }
.arrangement__heading { font-size: var(--step-1); margin-bottom: 0.35rem; }
.arrangement__heading--en { font-family: var(--font-text); font-weight: 700; font-size: var(--step-0); }
.arrangement__ja p { font-family: var(--font-display); line-height: 1.9; }
.arrangement__signatures { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1rem 3rem; margin-top: 2rem; font-size: var(--step--1); }
@media (max-width: 47.5em) { .arrangement__article, .arrangement__signatures { grid-template-columns: 1fr; } }
.publication__id { display: inline; margin-right: 0.5rem; }
.citation { font-size: var(--step--1); border-left: 3px solid var(--rule); padding-left: 1rem; }
@media (max-width: 37.5em) {
  .ledger { grid-template-columns: minmax(0, 1fr); }
  .ledger__row { flex-wrap: wrap; min-width: 0; }
  .ledger__row dt { flex: 1 1 100%; }
  .ledger__row dt::after { display: none; }
  .ledger__row dd { white-space: normal; }
}
.report-form__group label { font-weight: 400; }
