/* Japan House Prices — "Sumi & Ai" (墨と藍) design system, 2026-10.
   Washi paper, sumi ink, indigo, one vermilion seal. One self-hosted Latin serif (Cormorant Garamond, 38 KB);
   CJK headings fall through to the reader's own Mincho/Song/Myeongjo. No CDNs. */
@font-face {
  font-family: "Cormorant Garamond";
  src: url("fonts/cormorant-latin.woff2") format("woff2");
  font-weight: 500 700; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215;
}
:root {
  --ink: #1b1e25;          /* sumi */
  --ink-2: #4a505d;
  --ink-3: #676c77;        /* 4.7:1 on washi (AA) */
  --paper: #f6f2ea;        /* washi */
  --paper-2: #eee8dc;
  --card: #fffdf8;
  --line: #e2dacb;
  --line-2: #cfc5b2;
  --navy: #182c48;         /* ai (indigo), deep */
  --ai: #2a5d9f;
  --ai-deep: #12223a;
  --shu: #b8432a;          /* vermilion seal */
  --accent: #b8432a;
  --accent-2: #8f3220;
  --link: #24508a;
  --warn-bg: #fbf1dc;
  --warn-line: #d9a441;
  --radius: 3px;
  --maxw: 1180px;
  --serif: "Cormorant Garamond", "Yu Mincho", YuMincho, "Hiragino Mincho ProN", "Noto Serif JP", "Noto Serif CJK JP", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, "Hiragino Sans", "Yu Gothic UI", "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif;
  --washi: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .42 0 0 0 0 .36 0 0 0 0 .26 0 0 0 .055 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --seigaiha: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='28' viewBox='0 0 56 28'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='.07'%3E%3Cpath d='M0 28a28 28 0 0 1 56 0M8 28a20 20 0 0 1 40 0M16 28a12 12 0 0 1 24 0M-28 14a28 28 0 0 1 56 0M28 14a28 28 0 0 1 56 0M-20 14a20 20 0 0 1 40 0M36 14a20 20 0 0 1 40 0M-12 14a12 12 0 0 1 24 0M44 14a12 12 0 0 1 24 0'/%3E%3C/g%3E%3C/svg%3E");

  /* chart roles (light) — validated: ai / shu / green, all checks pass on #fbf8f2 */
  --surface-1: #fffdf8;
  --text-primary: #1b1e25;
  --text-secondary: #5a5f6b;
  --grid: #e8e1d3;
  --series-1: #2a5d9f;
  --series-2: #c9502a;
  --series-3: #1f8f6a;
}
/* CJK / Thai: the reader's own serif sets Latin and digits too, so a heading never mixes two typefaces */
:lang(zh-Hans), :lang(zh-CN), :lang(zh) { --serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "SimSun", serif; }
:lang(zh-Hant), :lang(zh-TW), :lang(zh-HK) { --serif: "Noto Serif TC", "Source Han Serif TC", "Songti TC", "PMingLiU", "MingLiU", serif; }
:lang(ko) { --serif: "Noto Serif KR", "Nanum Myeongjo", "AppleMyungjo", "Batang", serif; }
:lang(th) { --serif: "Noto Serif Thai", "Tahoma", serif; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before { animation: none !important; transition: none !important; } }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.75;
  color: var(--ink);
  background: var(--paper) var(--washi);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
  font-variant-numeric: lining-nums;
}
::selection { background: #f3d6cb; color: var(--ink); }
img, svg { max-width: 100%; }
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: rgba(36, 80, 138, .35); transition: color .15s, text-decoration-color .15s; }
a:hover { color: var(--shu); text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--shu); outline-offset: 3px; border-radius: 2px; }

h1, h2, h3, h4 { font-family: var(--serif); color: var(--ink); font-weight: 600; font-variant-numeric: lining-nums; }
h1 { font-size: clamp(2.35rem, 5vw, 4rem); line-height: 1.04; margin: 0 0 .35em; letter-spacing: -.012em; font-weight: 500; text-wrap: balance; }
h2 { font-size: clamp(1.75rem, 3vw, 2.35rem); line-height: 1.12; margin: 2.6em 0 .6em; letter-spacing: -.005em; text-wrap: balance; position: relative; padding-top: .9em; }
h2::before { content: ""; position: absolute; left: 0; top: 0; width: 34px; height: 2px; background: var(--shu); }
h3 { font-size: 1.42rem; line-height: 1.22; margin: 1.8em 0 .45em; }
h4 { font-size: 1.15rem; margin: 1.4em 0 .4em; }
html[lang]:not([lang="en"]) h1 { font-weight: 600; line-height: 1.22; letter-spacing: 0; font-size: clamp(1.9rem, 4vw, 3.1rem); }
html[lang]:not([lang="en"]) h2 { line-height: 1.32; font-size: clamp(1.45rem, 2.6vw, 1.95rem); }
html[lang]:not([lang="en"]) h3 { font-size: 1.22rem; line-height: 1.4; }
p, ul, ol { margin: 0 0 1.05em; }
li { margin-bottom: .4em; }
li::marker { color: var(--ink-3); }
small, .muted { color: var(--ink-3); }
.jp { font-family: var(--sans); font-size: .9em; color: var(--ink-2); }
strong { font-weight: 650; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2.4em 0; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }
@media (max-width: 640px) { .wrap { padding: 0 20px; } body { font-size: 16px; } }

/* ── header ─────────────────────────────────────────── */
.site-header { position: sticky; top: 0; z-index: 30; background: rgba(246, 242, 234, .9); -webkit-backdrop-filter: saturate(1.4) blur(10px); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); color: var(--ink); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-top: 14px; padding-bottom: 14px; }
.brand { color: var(--ink); text-decoration: none; font-family: "Cormorant Garamond", var(--serif); font-size: 1.42rem; font-weight: 600; letter-spacing: .01em; display: inline-flex; align-items: center; gap: 12px; white-space: nowrap; line-height: 1; }
.brand:hover { color: var(--ink); }
.brand .mark { width: 30px; height: 30px; flex: none; display: inline-block; color: transparent; font-size: 0; background: var(--shu); border-radius: 3px; box-shadow: inset 0 0 0 2px var(--shu), inset 0 0 0 3.5px #f6f2ea; position: relative; }
.brand .mark::after { content: ""; position: absolute; inset: 8px 7px 7px; background: #f6f2ea; clip-path: polygon(50% 0, 100% 42%, 86% 42%, 86% 100%, 60% 100%, 60% 66%, 40% 66%, 40% 100%, 14% 100%, 14% 42%, 0 42%); }
.nav { display: flex; gap: 4px 22px; align-items: center; flex-wrap: wrap; justify-content: flex-end; font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; font-weight: 600; }
html[lang]:not([lang="en"]) .nav { text-transform: none; letter-spacing: .02em; font-size: .86rem; }
.nav a { color: var(--ink-2); text-decoration: none; padding: 4px 0; position: relative; white-space: nowrap; }
.nav a:not(.btn-sm)::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: var(--shu); transform: scaleX(0); transform-origin: left; transition: transform .25s ease; }
.nav a:hover { color: var(--ink); }
.nav a:hover::after { transform: scaleX(1); }
.nav .btn-sm { border: 1px solid var(--ink); color: var(--ink); padding: 7px 14px; border-radius: 2px; transition: background .2s, color .2s; }
.nav .btn-sm:hover { background: var(--ink); color: var(--paper); }
@media (max-width: 960px) {
  .site-header .wrap { flex-direction: column; align-items: stretch; gap: 8px; padding-top: 12px; padding-bottom: 0; }
  .nav { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; scrollbar-width: none; margin: 0 -20px; padding: 2px 20px 10px; -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 36px), transparent); }
  .nav::-webkit-scrollbar { display: none; }
  .nav .btn-sm { order: -1; background: var(--ink); color: var(--paper); padding: 5px 12px; }
  .brand { font-size: 1.3rem; }
}

.notbroker-bar { background: transparent; border-bottom: 1px solid var(--line); font-size: .78rem; color: var(--ink-3); letter-spacing: .01em; }
.notbroker-bar .wrap { padding-top: 7px; padding-bottom: 7px; }
.notbroker-bar .wrap::before { content: ""; display: inline-block; width: 6px; height: 6px; background: var(--shu); border-radius: 50%; margin-right: 8px; vertical-align: 1px; }

/* ── footer ─────────────────────────────────────────── */
.site-footer { margin-top: 110px; background: var(--ai-deep) var(--seigaiha); color: #b9c1cf; font-size: .86rem; line-height: 1.8; position: relative; }
.site-footer::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: linear-gradient(90deg, var(--shu) 0 64px, transparent 64px); }
.site-footer .wrap { padding-top: 56px; padding-bottom: 56px; }
.site-footer strong { font-family: var(--serif); font-size: 1.5rem; font-weight: 600; color: #fff; letter-spacing: .01em; }
.site-footer a { color: #e9e2d2; text-decoration-color: rgba(233, 226, 210, .3); }
.site-footer a:hover { color: #fff; }
.site-footer p { margin-bottom: .8em; max-width: 92ch; }
.site-footer p:last-child { color: #8e98aa; margin-top: 1.6em; padding-top: 1.4em; border-top: 1px solid rgba(255, 255, 255, .1); max-width: none; }

/* ── hero (top page) ────────────────────────────────── */
.hero { position: relative; color: var(--ink); overflow: hidden; background: #efe6d6; border-bottom: 1px solid var(--line); }
.hero-art { position: absolute; inset: 0; }
.hero-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(243, 233, 216, .97) 0, rgba(243, 233, 216, .9) 34%, rgba(243, 233, 216, .5) 48%, rgba(243, 233, 216, 0) 64%); }
.hero-art img { width: 100%; height: 100%; object-fit: cover; object-position: 70% 50%; display: block; animation: drift 24s ease-out both; }
@keyframes drift { from { transform: scale(1.06); } to { transform: scale(1); } }
.hero .wrap { position: relative; padding-top: clamp(80px, 13vw, 170px); padding-bottom: clamp(150px, 19vw, 250px); }
.hero h1 { color: var(--ink); max-width: 12ch; font-size: clamp(2.9rem, 7vw, 5.8rem); line-height: .98; animation: rise 1s .1s both; }
.hero h1 em { font-style: italic; color: var(--shu); font-weight: 500; }
.hero p.lede { font-size: 1.12rem; max-width: 46ch; color: var(--ink-2); animation: rise 1s .25s both; }
.hero .cta { margin-top: 30px; display: flex; gap: 12px; flex-wrap: wrap; animation: rise 1s .4s both; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@media (max-width: 760px) {
  .hero { background: #efe6d6; }
  .hero-art { position: relative; height: 250px; order: 2; }
  .hero-art img { object-position: 78% 60%; }
  .hero-art::after { background: linear-gradient(180deg, #efe6d6 0, rgba(239, 230, 214, 0) 30%); }
  .hero { display: flex; flex-direction: column; }
  .hero .wrap { padding-top: 46px; padding-bottom: 8px; }
  .hero h1 { font-size: 3rem; }
}
.eyebrow { display: inline-flex; align-items: center; gap: 10px; text-transform: uppercase; letter-spacing: .18em; font-size: .7rem; color: var(--shu); font-weight: 700; margin-bottom: 14px; }
.eyebrow::before { content: ""; width: 22px; height: 1px; background: currentColor; }
html[lang]:not([lang="en"]) .eyebrow { letter-spacing: .1em; }

/* ledger strip under the hero */
.ledger { display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: 1px solid var(--line); }
.ledger div { padding: 24px 24px; border-left: 1px solid var(--line); font-size: .86rem; color: var(--ink-2); line-height: 1.5; }
.ledger div:first-child { border-left: 0; padding-left: 0; }
.ledger b { display: block; font-family: var(--serif); font-size: 1.5rem; font-weight: 600; color: var(--ink); margin-bottom: 2px; line-height: 1.1; }
@media (max-width: 760px) { .ledger { grid-template-columns: 1fr 1fr; } .ledger div { padding: 16px 14px; } .ledger div:nth-child(3) { border-left: 0; padding-left: 0; } .ledger div:nth-child(n+3) { border-top: 1px solid var(--line); } }

/* ── page head (articles) ───────────────────────────── */
.page-head { position: relative; padding: 64px 0 44px; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, rgba(238, 232, 220, .7), rgba(246, 242, 234, 0)); overflow: hidden; }
.page-head .wrap { position: relative; z-index: 1; }
.page-head h1 { max-width: 19ch; animation: rise .9s both; }
html[lang]:not([lang="en"]) .page-head h1 { max-width: 24em; }
.page-head .lede { max-width: 62ch; animation: rise .9s .12s both; }
.page-head.has-art::before { content: ""; position: absolute; top: 0; right: 0; bottom: 0; width: min(58%, 900px); background: var(--art) center / cover no-repeat; -webkit-mask-image: linear-gradient(90deg, transparent 0, rgba(0,0,0,.35) 26%, #000 62%); mask-image: linear-gradient(90deg, transparent 0, rgba(0,0,0,.35) 26%, #000 62%); opacity: .95; animation: fadein 1.4s both; }
.page-head.has-art .wrap > * { max-width: min(62ch, 58%); }
.page-head.has-art .meta { max-width: 58%; }
@keyframes fadein { from { opacity: 0; } }
@media (max-width: 900px) {
  .page-head { padding: 0 0 30px; }
  .page-head:not(.has-art) { padding-top: 36px; }
  .page-head.has-art::before { position: relative; display: block; width: auto; height: 190px; background-image: var(--art-s, var(--art)); margin-bottom: 24px; -webkit-mask-image: linear-gradient(180deg, #000 55%, transparent); mask-image: linear-gradient(180deg, #000 55%, transparent); }
  .page-head.has-art .wrap > *, .page-head.has-art .meta { max-width: none; }
}
.meta { font-size: .76rem; color: var(--ink-2); display: flex; gap: 6px; flex-wrap: wrap; margin-top: 20px; letter-spacing: .01em; }
.meta > span { padding: 3px 10px; border: 1px solid var(--line-2); border-radius: 2px; background: rgba(255, 253, 248, .7); line-height: 1.5; }
.meta strong { color: var(--ink); }
.lede { font-size: 1.14rem; line-height: 1.65; color: var(--ink-2); max-width: 66ch; }

/* ── layout with TOC ────────────────────────────────── */
.article-grid { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 64px; padding-top: 36px; }
.toc { position: sticky; top: 92px; align-self: start; font-size: .84rem; max-height: calc(100vh - 110px); overflow: auto; padding-right: 6px; }
.toc strong { display: block; font-size: .7rem; text-transform: uppercase; letter-spacing: .16em; color: var(--shu); margin-bottom: 12px; font-weight: 700; }
.toc ol, .toc ul { padding-left: 0; margin: 0; list-style: none; counter-reset: t; border-left: 1px solid var(--line); }
.toc li { counter-increment: t; margin: 0; }
.toc a { display: block; color: var(--ink-2); text-decoration: none; padding: 5px 0 5px 16px; margin-left: -1px; border-left: 1px solid transparent; line-height: 1.4; }
.toc a:hover { color: var(--ink); border-left-color: var(--shu); }
article { max-width: 780px; min-width: 0; }
@media (max-width: 900px) {
  .article-grid { grid-template-columns: 1fr; gap: 0; padding-top: 24px; }
  .toc { position: static; max-height: none; background: var(--card); border: 1px solid var(--line); padding: 16px 18px; margin-bottom: 14px; }
}

/* ── components ─────────────────────────────────────── */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 0; margin: 30px 0; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.card { background: transparent; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 28px 26px; display: flex; flex-direction: column; transition: background .25s; }
.card:hover { background: var(--card); }
.card h3 { margin-top: 0; }
.card p { color: var(--ink-2); flex: 1; font-size: .95rem; }
.card .more { font-weight: 600; text-decoration: none; font-size: .9rem; }
.card .more:hover { text-decoration: underline; }

.callout { border-left: 2px solid var(--shu); background: var(--card); padding: 18px 22px; border-radius: 0; margin: 1.6em 0; box-shadow: 0 1px 0 var(--line); }
.callout.warn { border-left-color: var(--warn-line); background: var(--warn-bg); }
.callout.new { border-left-color: var(--ai); background: #f1f3f4; }
.callout p:last-child, .callout ul:last-child { margin-bottom: 0; }
.tag { display: inline-block; font-size: .66rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; padding: 2px 8px; border-radius: 2px; background: var(--ink); color: #fff; margin-right: 6px; vertical-align: 2px; }
.tag.gold { background: var(--shu); }

ol.steps { list-style: none; counter-reset: s; padding: 0; }
ol.steps > li { counter-increment: s; position: relative; padding: 0 0 22px 60px; margin: 0; }
ol.steps > li::before { content: counter(s, decimal-leading-zero); position: absolute; left: 0; top: -2px; width: 40px; height: 40px; border: 1px solid var(--ink); border-radius: 50%; color: var(--ink); background: var(--paper); display: grid; place-items: center; font-family: "Cormorant Garamond", var(--serif); font-weight: 600; font-size: 1.05rem; font-variant-numeric: lining-nums; }
ol.steps > li:not(:last-child)::after { content: ""; position: absolute; left: 19.5px; top: 42px; bottom: 2px; width: 1px; background: var(--line-2); }
ol.steps h3 { margin: 4px 0 6px; font-size: 1.3rem; }

.table-wrap { overflow-x: auto; margin: 1.2em 0 1.6em; border-top: 2px solid var(--ink); border-bottom: 1px solid var(--line-2); background: var(--card); -webkit-overflow-scrolling: touch; }
table { border-collapse: collapse; width: 100%; font-size: .9rem; font-variant-numeric: tabular-nums lining-nums; }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--card); font-weight: 700; color: var(--ink-2); white-space: nowrap; font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; border-bottom: 1px solid var(--line-2); }
html[lang]:not([lang="en"]) th { text-transform: none; letter-spacing: .02em; font-size: .8rem; }
tbody tr { transition: background .12s; }
tbody tr:hover { background: #f7f1e6; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (max-width: 640px) {
  th, td { padding: 9px 10px; }
  .table-wrap tbody th:first-child, .table-wrap td:first-child { position: sticky; left: 0; background: var(--card); box-shadow: 1px 0 0 var(--line); z-index: 1; }
}

details { border: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: transparent; padding: 0 4px; margin: -1px 0 0; }
details summary { cursor: pointer; padding: 15px 0; font-weight: 600; color: var(--ink); list-style: none; display: flex; justify-content: space-between; gap: 12px; align-items: center; }
details summary::-webkit-details-marker { display: none; }
details summary::after { content: "+"; font-family: "Cormorant Garamond", var(--serif); font-size: 1.6rem; line-height: 1; color: var(--shu); transition: transform .2s; flex: none; }
details[open] summary::after { transform: rotate(45deg); }
details[open] summary { border-bottom: 1px solid var(--line); margin-bottom: 12px; }
details[open] { padding-bottom: 8px; }

.sources { font-size: .86rem; color: var(--ink-2); }
.sources li { word-break: break-word; }

.disclaimer { font-size: .82rem; color: var(--ink-2); background: transparent; border: 0; border-top: 1px solid var(--line-2); border-radius: 0; padding: 18px 0 0; margin-top: 2.4em; }

/* buttons */
.btn { display: inline-flex; align-items: center; gap: 10px; background: var(--ink); color: var(--paper); text-decoration: none; padding: 13px 24px; border-radius: 2px; font-weight: 600; border: 1px solid var(--ink); font-size: .92rem; letter-spacing: .02em; cursor: pointer; font-family: var(--sans); transition: background .2s, color .2s, border-color .2s; }
.btn:hover { background: var(--shu); border-color: var(--shu); color: #fff; }
.btn.ghost { background: transparent; border: 1px solid var(--ink); color: var(--ink); }
.btn.ghost:hover { background: var(--ink); color: var(--paper); }
.btn.shu { background: var(--shu); border-color: var(--shu); }
.btn.shu:hover { background: var(--accent-2); border-color: var(--accent-2); }

/* inquiry form */
.inquiry { background: var(--ai-deep) var(--seigaiha); color: #d7dce5; border: 0; border-radius: 0; padding: 36px clamp(22px, 4vw, 44px); margin: 3em 0; position: relative; }
.inquiry::before { content: ""; position: absolute; left: 0; top: 0; width: 64px; height: 3px; background: var(--shu); }
.inquiry h2 { border: 0; margin-top: 0; padding-top: 0; color: #fff; }
.inquiry h2::before { display: none; }
.inquiry p, .inquiry li { color: #c9d0dc; }
.inquiry a { color: #f0e6cf; }
.inquiry label { color: #e3e7ee; }
.inquiry input[type=text], .inquiry input[type=email], .inquiry select, .inquiry textarea { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .22); color: #fff; }
.inquiry select option { color: var(--ink); }
.inquiry input::placeholder, .inquiry textarea::placeholder { color: #8e98aa; }
.inquiry .btn, .inquiry button { background: var(--shu); border-color: var(--shu); color: #fff; }
.inquiry .btn:hover, .inquiry button:hover { background: #fff; border-color: #fff; color: var(--ink); }
.inquiry .consent, .inquiry .form-note { color: #aab3c2; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 20px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
label { display: block; font-size: .8rem; font-weight: 600; color: var(--ink-2); margin-bottom: 5px; letter-spacing: .02em; }
input[type=text], input[type=email], select, textarea { width: 100%; padding: 11px 13px; border: 1px solid var(--line-2); border-radius: 2px; font: inherit; font-size: .95rem; background: var(--card); color: var(--ink); transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--shu); box-shadow: 0 0 0 3px rgba(184, 67, 42, .18); }
textarea { min-height: 110px; resize: vertical; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: .86rem; color: var(--ink-2); }
.consent input { margin-top: 5px; accent-color: var(--shu); }
.form-note { font-size: .8rem; color: var(--ink-3); margin-top: 12px; }

/* ── stats + charts ─────────────────────────────────── */
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 0; margin: 28px 0 14px; border-top: 2px solid var(--ink); }
.stat { background: transparent; border: 0; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); padding: 18px 20px 18px 0; margin-left: 20px; }
.stat-row .stat:first-child { margin-left: 0; }
.stat:last-child { border-right: 0; }
.stat .label { font-size: .7rem; color: var(--ink-3); text-transform: uppercase; letter-spacing: .1em; line-height: 1.45; font-weight: 600; min-height: 2.9em; }
html[lang]:not([lang="en"]) .stat .label { text-transform: none; letter-spacing: .02em; font-size: .78rem; }
.stat .value { font-family: "Cormorant Garamond", var(--serif); font-size: clamp(2rem, 3.4vw, 2.6rem); font-weight: 600; color: var(--ink); line-height: 1.05; margin-top: 8px; font-variant-numeric: lining-nums tabular-nums; letter-spacing: -.01em; }
.stat .sub { font-size: .8rem; color: var(--ink-2); margin-top: 4px; line-height: 1.5; }
@media (max-width: 640px) {
  .stat-row { grid-template-columns: 1fr 1fr; }
  .stat { margin-left: 0; padding: 14px 12px 14px 0; }
  .stat:nth-child(2n) { border-right: 0; padding-left: 14px; }
  .stat .value { font-size: 1.85rem; }
}

.chart-card { background: var(--surface-1); border: 1px solid var(--line); border-radius: 0; padding: 22px 22px 12px; margin: 22px 0; position: relative; box-shadow: 0 1px 0 var(--line), 0 18px 40px -32px rgba(27, 30, 37, .35); }
.chart-card h3 { margin: 0 0 4px; font-size: 1.3rem; }
html[lang]:not([lang="en"]) .chart-card h3 { font-size: 1.1rem; }
.chart-card .chart-sub { font-size: .8rem; color: var(--text-secondary); margin-bottom: 10px; line-height: 1.5; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .gridline { stroke: var(--grid); stroke-width: 1; }
.chart .axis-label { fill: var(--text-secondary); font-size: 12px; font-family: var(--sans); font-variant-numeric: tabular-nums; }
.chart .bar { fill: var(--series-1); }
.chart .line { stroke: var(--series-1); stroke-width: 2; fill: none; stroke-linejoin: round; stroke-linecap: round; }
.chart .dot { fill: var(--series-1); stroke: var(--surface-1); stroke-width: 2; }
.chart .hit { fill: transparent; cursor: crosshair; }
.chart .hit:hover + .hl, .chart .hl.on { opacity: 1; }
.chart .hl { opacity: 0; stroke: var(--text-secondary); stroke-width: 1; stroke-dasharray: 3 3; pointer-events: none; }
.chart .bar.dim { opacity: .45; }
.chart-tip { position: absolute; pointer-events: none; background: var(--ink); color: #fff; font-size: .8rem; line-height: 1.45; padding: 8px 11px; border-radius: 2px; white-space: nowrap; transform: translate(-50%, -112%); opacity: 0; transition: opacity .08s; z-index: 5; font-variant-numeric: tabular-nums; box-shadow: 0 8px 20px -8px rgba(0, 0, 0, .4); }
.chart-tip.on { opacity: 1; }
.chart-tip b { font-weight: 600; }

.sample-banner { background: var(--warn-bg); border: 1px dashed var(--warn-line); color: #6b4e00; padding: 12px 16px; border-radius: var(--radius); font-size: .92rem; margin: 18px 0; }

/* multi-series charts */
.chart .bar.s2 { fill: var(--series-2); }
.chart .line.s2 { stroke: var(--series-2); }
.chart .line.dash { stroke-dasharray: 6 4; }
.chart .dot.s2 { fill: var(--series-2); }
.chart .dot.sm { stroke-width: 1.5; }
.legend { display: flex; gap: 18px; flex-wrap: wrap; font-size: .8rem; color: var(--text-secondary); margin: 2px 0 8px; }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend .sw { display: inline-block; width: 14px; height: 4px; border-radius: 2px; background: var(--series-1); }
.legend .sw.s2 { background: var(--series-2); }
.legend .sw.dash { background: repeating-linear-gradient(90deg, var(--series-2) 0 5px, transparent 5px 8px); height: 3px; }
html[lang="ko"] body { word-break: keep-all; }
.chart .annot { stroke: var(--ink-3); stroke-width: 1; stroke-dasharray: 4 3; }
.chart .annot-label { fill: var(--text-secondary); font-size: 11px; font-family: var(--sans); }
article h3 { margin-top: 1.6em; }

/* ── tax & cost calculator ──────────────────────────── */
.big-notice { background: var(--warn-bg); border: 0; border-left: 3px solid var(--warn-line); border-radius: 0; padding: 18px 22px; margin: 20px 0; font-size: .98rem; color: #4d3800; }
.big-notice strong { font-size: 1.04rem; }
.tc-form { background: var(--card); border: 1px solid var(--line); border-top: 2px solid var(--ink); border-radius: 0; padding: 26px; margin: 20px 0; box-shadow: 0 18px 40px -34px rgba(27, 30, 37, .4); }
.tc-form fieldset { border: 0; padding: 0; margin: 0 0 20px; }
.tc-form legend { font-family: var(--serif); color: var(--ink); font-size: 1.4rem; font-weight: 600; margin-bottom: 10px; }
.tc-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px 20px; }
.tc-fields .full { grid-column: 1 / -1; }
.tc-form input[type=number] { width: 100%; padding: 11px 13px; border: 1px solid var(--line-2); border-radius: 2px; font: inherit; font-size: 1.05rem; background: var(--paper); color: var(--ink); font-variant-numeric: tabular-nums; }
.tc-form input[type=number]:focus { outline: none; border-color: var(--shu); box-shadow: 0 0 0 3px rgba(184, 67, 42, .18); }
.tc-form .check { display: flex; gap: 8px; align-items: flex-start; font-weight: 400; color: var(--ink-2); }
.tc-form .check input { margin-top: 6px; accent-color: var(--shu); }
.tc-hint { font-size: .78rem; color: var(--ink-3); margin-top: 4px; line-height: 1.45; }
.tc-table td { font-size: .9rem; }
.tc-formula { font-size: .8rem; color: var(--ink-2); font-variant-numeric: tabular-nums; margin-top: 3px; }
.tc-note { font-size: .82rem; color: var(--ink-2); margin-top: 3px; }
.tc-srcline { font-size: .76rem; color: var(--ink-3); margin-top: 3px; }
.tc-total { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: baseline; background: var(--ai-deep) var(--seigaiha); color: #fff; border-radius: 0; padding: 16px 22px; margin: -8px 0 22px; position: relative; }
.tc-total::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--shu); }
.tc-total strong { font-family: "Cormorant Garamond", var(--serif); font-size: 1.9rem; font-weight: 600; font-variant-numeric: lining-nums tabular-nums; }
.tc-total .tc-fx, .tc-total .tc-extra { color: #c3cad6; font-size: .88rem; }
.tc-ex-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 18px; margin: 16px 0; }
.tc-mini { background: var(--card); border: 1px solid var(--line); border-top: 2px solid var(--shu); border-radius: 0; padding: 16px 18px; height: 100%; }
.tc-mini .table-wrap { margin: .4em 0 .6em; border-top-width: 1px; }
.tc-mini td { padding: 7px 10px; }
.tc-mini .btn { padding: 8px 16px; font-size: .86rem; }
.tc-mini-h { margin-bottom: .3em; }
#tc-price-fx { font-size: .8rem; color: var(--ink-2); margin-top: 3px; }
#tc-loan-box { border-top: 1px solid var(--line); padding-top: 14px; }
#tc-loan-box a { font-weight: 600; }

/* third series */
.chart .line.s3 { stroke: var(--series-3); }
.chart .dot.s3 { fill: var(--series-3); }
.legend .sw.s3 { background: var(--series-3); }

/* monthly tracker: currency switcher — JS sets data-show; without JS every column shows */
.ccy-switch { margin: .8em 0; font-size: .9rem; }
.ccy-switch label { display: inline; font-weight: 600; margin-right: 8px; }
.ccy-switch select { width: auto; display: inline-block; padding: 7px 10px; }
.ccy-table:not([data-show="all"]) .c { display: none; }
.ccy-table[data-show="USD"] .c-USD, .ccy-table[data-show="TWD"] .c-TWD, .ccy-table[data-show="HKD"] .c-HKD, .ccy-table[data-show="KRW"] .c-KRW,
.ccy-table[data-show="THB"] .c-THB, .ccy-table[data-show="AUD"] .c-AUD, .ccy-table[data-show="SGD"] .c-SGD { display: table-cell; }
.inquiry button[disabled] { opacity: .55; cursor: not-allowed; }

/* ── top page ───────────────────────────────────────── */
.sec-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin: 96px 0 28px; flex-wrap: wrap; }
.sec-head h2 { margin: 0; }
.sec-head p { margin: 0; max-width: 46ch; color: var(--ink-2); font-size: .95rem; }
.places { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 18px; }
.place { grid-column: span 4; min-width: 0; position: relative; display: block; text-decoration: none; color: var(--ink); background: var(--card); border: 1px solid var(--line); overflow: hidden; transition: border-color .25s, box-shadow .3s; }
.place.wide { grid-column: span 8; }
.place.tall { grid-row: span 2; }
.place figure { margin: 0; aspect-ratio: 3 / 2; overflow: hidden; background: #e9e1d2; }
.place.wide figure { aspect-ratio: auto; position: relative; min-height: 240px; }
.place.wide img { position: absolute; inset: 0; }
.place img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 1.1s cubic-bezier(.2, .7, .2, 1); }
.place:hover { border-color: var(--line-2); box-shadow: 0 24px 50px -36px rgba(27, 30, 37, .55); color: var(--ink); }
.place:hover img { transform: scale(1.04); }
.place .cap { padding: 16px 18px 18px; display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.place .cap b { font-family: var(--serif); font-size: 1.55rem; font-weight: 600; line-height: 1.1; }
.place .cap span { font-size: .78rem; color: var(--ink-3); text-align: right; line-height: 1.4; }
.place.wide { display: grid; grid-template-rows: 1fr auto; }
@media (max-width: 900px) { .place, .place.wide { grid-column: span 6; } .place.tall { grid-row: auto; } .place.wide figure { aspect-ratio: 3 / 2; height: auto; } }
@media (max-width: 560px) { .places { gap: 12px; } .place, .place.wide { grid-column: span 12; } .place .cap b { font-size: 1.4rem; } }

.index-list { list-style: none; padding: 0; margin: 0; columns: 2; column-gap: 56px; border-top: 2px solid var(--ink); }
.index-list li { break-inside: avoid; padding: 14px 0; border-bottom: 1px solid var(--line); margin: 0; font-size: .9rem; color: var(--ink-2); line-height: 1.55; }
.index-list li > a:first-child { font-family: var(--serif); font-size: 1.22rem; font-weight: 600; color: var(--ink); text-decoration: none; line-height: 1.25; }
html[lang]:not([lang="en"]) .index-list li > a:first-child, .index-list[lang] li > a:first-child, [lang]:not(html) .index-list li > a:first-child { font-size: 1.04rem; }
.index-list li > a:first-child:hover { color: var(--shu); }
@media (max-width: 760px) { .index-list { columns: 1; } }

.feature-grid { counter-reset: f; }
.feature-grid .card { counter-increment: f; }
.feature-grid .card .eyebrow::after { content: counter(f, decimal-leading-zero); margin-left: auto; font-family: "Cormorant Garamond", var(--serif); font-size: 1.1rem; color: var(--ink-3); letter-spacing: 0; font-weight: 600; }
.feature-grid .card .eyebrow { display: flex; }

.langs { display: grid; grid-template-columns: 1fr 1fr; gap: 0 56px; }
.langs section { margin: 0 0 40px; }
.langs h2 { font-size: 1.6rem; margin-top: 0; }
@media (max-width: 900px) { .langs { grid-template-columns: 1fr; } }
.manifesto { margin: 90px 0 0; display: grid; grid-template-columns: 1fr 2fr; gap: 40px; padding-top: 40px; border-top: 1px solid var(--line); }
.manifesto h2 { margin: 0; }
.manifesto p { font-family: var(--serif); font-size: 1.55rem; line-height: 1.45; color: var(--ink); margin: 0; }
@media (max-width: 760px) { .manifesto { grid-template-columns: 1fr; gap: 16px; } .manifesto p { font-size: 1.3rem; } }


/* motion layer (assets/motion.js adds .js-motion; without JS everything is visible) */
.js-motion .rv { opacity: 0; transform: translateY(18px); transition: opacity .8s cubic-bezier(.2, .7, .2, 1), transform .8s cubic-bezier(.2, .7, .2, 1); }
.js-motion .in { opacity: 1 !important; transform: none !important; }
.js-motion .place.rv:nth-child(3n+2), .js-motion .card.rv:nth-child(4n+2) { transition-delay: .08s; }
.js-motion .place.rv:nth-child(3n), .js-motion .card.rv:nth-child(4n+3) { transition-delay: .16s; }
.read-progress { position: fixed; left: 0; right: 0; top: 0; height: 2px; background: var(--shu); transform: scaleX(0); transform-origin: left; z-index: 40; pointer-events: none; }
html[lang]:not([lang="en"]) .stat .value { font-size: clamp(1.45rem, 2.3vw, 1.85rem); line-height: 1.2; }
.wrap > article[style*="margin:0 auto"] { margin-left: 0 !important; }

/* ── round 2 (2026-10-01): breadcrumbs, language switcher, mobile charts & tables, footer, print ── */
.crumbs { margin: 0 0 18px; font-size: .74rem; letter-spacing: .04em; color: var(--ink-3); position: relative; z-index: 2; }
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 2px 0; }
.crumbs li { margin: 0; display: inline-flex; align-items: center; }
.crumbs li + li::before { content: ""; width: 5px; height: 5px; border-top: 1px solid var(--ink-3); border-right: 1px solid var(--ink-3); transform: rotate(45deg); margin: 0 10px 0 7px; }
.crumbs a { color: var(--ink-2); text-decoration: none; }
.crumbs a:hover { color: var(--shu); text-decoration: underline; }
.crumbs span { color: var(--ink-3); }

.site-header .wrap { position: relative; }
.langsw { position: relative; flex: none; }
details.langsw { border: 0; padding: 0; margin: 0; background: none; }
details.langsw[open] { padding: 0; }
.langsw summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 700; letter-spacing: .06em; color: var(--ink-2); padding: 6px 9px; border: 1px solid var(--line-2); border-radius: 2px; background: rgba(255, 253, 248, .6); line-height: 1; min-height: 32px; justify-content: flex-start; }
.langsw summary::-webkit-details-marker { display: none; }
.langsw summary::after { content: none; }
.langsw summary:hover, details.langsw[open] summary { color: var(--ink); border-color: var(--ink); border-bottom: 1px solid var(--ink); margin: 0; }
.langsw ul { position: absolute; right: 0; top: calc(100% + 8px); margin: 0; padding: 6px 0; list-style: none; background: var(--card); border: 1px solid var(--line-2); border-top: 2px solid var(--ink); box-shadow: 0 20px 40px -24px rgba(27, 30, 37, .45); min-width: 210px; z-index: 50; animation: rise .18s both; }
.langsw li { margin: 0; }
.langsw ul a { display: block; padding: 9px 16px; color: var(--ink); text-decoration: none; font-size: .9rem; white-space: nowrap; }
.langsw ul a:hover { background: var(--paper); color: var(--shu); }
.langsw ul a[aria-current] { color: var(--shu); font-weight: 650; }
.langsw ul a[aria-current]::before { content: ""; display: inline-block; width: 6px; height: 6px; background: var(--shu); border-radius: 50%; margin: 0 8px 1px -2px; }
@media (max-width: 960px) { .langsw { position: absolute; right: 20px; top: 9px; } }

/* charts keep a readable type size on phones: scroll sideways instead of shrinking labels to 5px */
@media (max-width: 640px) {
  .chart-card { padding: 18px 16px 10px; }
  /* without JS the drawing keeps its size and scrolls; motion.js redraws it for the phone and adds .m-ok */
  .chart:not(.m-ok) { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -16px; padding: 0 16px 6px; scrollbar-width: thin; }
  .chart:not(.m-ok) svg { min-width: 620px; }
  .table-wrap td:first-child, .table-wrap tbody th:first-child { min-width: 6.2em; }
}
:lang(zh) td, :lang(zh) th, :lang(ko) td, :lang(ko) th { word-break: keep-all; }

/* footer: brand line as a masthead */
.site-footer p:first-child { font-size: .95rem; padding-bottom: 1.3em; margin-bottom: 1.4em; border-bottom: 1px solid rgba(255, 255, 255, .1); max-width: none; }
.site-footer p:first-child strong { display: inline-block; font-size: 2.1rem; margin: 0 .2em .1em 0; font-family: "Cormorant Garamond", var(--serif); }
.site-footer p:first-child strong::before { content: ""; display: inline-block; width: 24px; height: 24px; background: var(--shu); border-radius: 3px; margin-right: 12px; vertical-align: -2px; box-shadow: inset 0 0 0 2px var(--shu), inset 0 0 0 3.5px var(--ai-deep); }
.site-footer p:last-child { line-height: 2.1; }
.site-footer p:last-child a { white-space: nowrap; }

/* privacy / thanks / 404 */
article.prose { max-width: 760px; padding-top: 30px; }

@media print {
  .site-header, .site-footer, .inquiry, .toc, .notbroker-bar, .crumbs, .langsw, .read-progress, .cta { display: none !important; }
  body { background: #fff; font-size: 11pt; color: #000; }
  .rv, .js-motion .rv { opacity: 1 !important; transform: none !important; }
  .page-head { padding: 0 0 12px; background: none; }
  .page-head.has-art::before { display: none; }
  .page-head.has-art .wrap > * { max-width: none; }
  .article-grid { display: block; padding-top: 10px; }
  h2 { margin-top: 1.4em; break-after: avoid; }
  .chart-card, .stat-row, .tc-mini, tr { break-inside: avoid; box-shadow: none; }
  .chart svg { min-width: 0 !important; }
  .table-wrap { overflow: visible; }
  .tc-form { box-shadow: none; border: 1px solid #999; padding: 12px; }
  .tc-total { background: #fff !important; color: #000; border: 2px solid #000; }
  .tc-total .tc-fx, .tc-total .tc-extra { color: #333; }
  input, select { border: 1px solid #999 !important; background: #fff !important; }
  a { color: #000; text-decoration: none; }
  .wrap { max-width: none; padding: 0; }
}

/* the wordmark is always the Latin serif, even where a page sets its own CJK heading font inline */
html .site-header .brand { font-family: "Cormorant Garamond", Georgia, serif !important; }
/* long menus (zh / hk pages carry 9–11 links): brand + language on one row, the menu on its own row */
@media (min-width: 961px) {
  .site-header .wrap:has(.nav > a:nth-child(8)) { flex-wrap: wrap; row-gap: 6px; padding-bottom: 8px; }
  .site-header .wrap:has(.nav > a:nth-child(8)) .nav { order: 3; flex: 1 0 100%; justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; gap: 4px 22px; }
}
.tc-form input[type=number], .tc-form select, .tc-form input[type=text] { height: 50px; padding-top: 0; padding-bottom: 0; }

/* 題箋 (tanzaku): the title cartouche of a woodblock print, set in the corner of each page's print */
.tanzaku { position: absolute; z-index: 2; top: 44px; right: max(28px, calc((100vw - var(--maxw)) / 2 + 28px)); writing-mode: vertical-rl; text-orientation: upright;
  font-family: "Yu Mincho", YuMincho, "Hiragino Mincho ProN", "Noto Serif JP", "Noto Serif CJK JP", "MS Mincho", serif; font-size: 1.15rem; font-weight: 600; letter-spacing: .32em; line-height: 1;
  color: var(--ink); background: rgba(251, 248, 241, .93); padding: 16px 9px 12px; border: 1px solid var(--ink); box-shadow: 0 0 0 3px rgba(251, 248, 241, .93), 0 0 0 4px rgba(27, 30, 37, .55); animation: fadein 1.6s .3s both; }
.tanzaku::after { content: ""; display: block; width: 14px; height: 14px; margin: 6px auto 0; background: var(--shu); border-radius: 2px; box-shadow: inset 0 0 0 1.5px var(--shu), inset 0 0 0 2.5px #fbf8f1; }
@media (max-width: 900px) { .tanzaku { top: 16px; right: 18px; font-size: .95rem; padding: 12px 7px 9px; } .tanzaku::after { width: 11px; height: 11px; } }
@media print { .tanzaku { display: none; } }
.tanzaku { padding-bottom: 16px; }
.tanzaku::after { position: absolute; left: 50%; bottom: -8px; margin: 0; transform: translateX(-50%); }

/* related pages (added by seo_head.py): an index card strip under every article */
aside.related-pages { margin: 96px 0 -40px; padding: 0; }
aside.related-pages h2 { font-size: .74rem; font-family: var(--sans); font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--shu); margin: 0 0 18px; padding: 0; display: flex; align-items: center; gap: 10px; }
aside.related-pages h2::before { position: static; width: 22px; height: 1px; background: currentColor; }
html[lang]:not([lang="en"]) aside.related-pages h2 { letter-spacing: .08em; font-size: .86rem; }
aside.related-pages ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); border-top: 2px solid var(--ink); counter-reset: rp; }
aside.related-pages li { margin: 0; counter-increment: rp; border-bottom: 1px solid var(--line); }
aside.related-pages li a { display: grid; grid-template-columns: 2.2em 1fr; gap: 4px; padding: 16px 18px 16px 0; height: 100%; color: var(--ink); text-decoration: none; font-family: var(--serif); font-size: 1.08rem; font-weight: 600; line-height: 1.3; transition: color .2s, background .2s; }
html[lang]:not([lang="en"]) aside.related-pages li a { font-size: .98rem; line-height: 1.45; }
aside.related-pages li a::before { content: counter(rp, decimal-leading-zero); font-family: "Cormorant Garamond", Georgia, serif; color: var(--ink-3); font-size: 1rem; padding-top: 1px; }
aside.related-pages li a:hover { color: var(--shu); background: linear-gradient(90deg, transparent, var(--card)); }
@media (min-width: 900px) { aside.related-pages ul { grid-template-columns: repeat(3, 1fr); } aside.related-pages li:not(:nth-child(3n+1)) a { padding-left: 18px; } aside.related-pages li:not(:nth-child(3n+1)) { border-left: 1px solid var(--line); } }
aside.related-pages .related-more { margin: 18px 0 0; font-size: .86rem; color: var(--ink-3); }
aside.related-pages .related-more a { font-weight: 600; }
@media print { aside.related-pages { display: none; } }
.site-footer .foot-index a { font-weight: 600; }

/* "On this page" (built by motion.js for wide screens) + scrollspy for every TOC */
.otp { display: none; }
@media (min-width: 1200px) {
  .wrap.has-otp { display: grid; grid-template-columns: minmax(0, 900px) 220px; justify-content: space-between; column-gap: 48px; }
  .wrap.has-otp > article { grid-column: 1; }
  .wrap.has-otp > :not(article):not(.otp) { grid-column: 1 / -1; }
  .otp { display: block; grid-column: 2; grid-row: 1; position: sticky; top: 96px; align-self: start; margin-top: 44px; font-size: .82rem; max-height: calc(100vh - 120px); overflow: auto; animation: fadein .8s .4s both; }
  .otp strong { display: block; font-size: .7rem; text-transform: uppercase; letter-spacing: .16em; color: var(--shu); margin-bottom: 12px; font-weight: 700; }
  html[lang]:not([lang="en"]) .otp strong { letter-spacing: .06em; font-size: .78rem; }
  .otp ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
  .otp li { margin: 0; }
  .otp a { display: block; padding: 5px 0 5px 14px; margin-left: -1px; border-left: 1px solid transparent; color: var(--ink-3); text-decoration: none; line-height: 1.4; }
  .otp a:hover { color: var(--ink); }
}
.toc a.on, .otp a.on { color: var(--ink); border-left-color: var(--shu); font-weight: 600; }
@media print { .otp { display: none !important; } }
.toc.toc-fold li:nth-child(n+6) { display: none; }
.toc.toc-fold ol { -webkit-mask-image: linear-gradient(180deg, #000 70%, rgba(0,0,0,.25)); mask-image: linear-gradient(180deg, #000 70%, rgba(0,0,0,.25)); }
.toc-more { margin: 10px 0 0 16px; padding: 6px 0; background: none; border: 0; border-bottom: 1px solid var(--shu); color: var(--ink); font: 600 .84rem var(--sans); cursor: pointer; }
.toc-more::after { content: " \2193"; color: var(--shu); }
@media print {
  .tc-form { font-size: 9pt; padding: 8px 10px; margin: 8px 0; }
  .tc-form fieldset { margin-bottom: 6px; }
  .tc-form legend { font-size: 12pt; margin-bottom: 4px; }
  .tc-fields { grid-template-columns: repeat(4, 1fr); gap: 4px 12px; }
  .tc-hint, #tc-price-fx, .meta { display: none !important; }
  .big-notice { font-size: 8.5pt; padding: 6px 10px; margin: 6px 0; }
  .tc-form input[type=number], .tc-form select, .tc-form input[type=text] { height: 26px; font-size: 9pt; padding: 0 6px; }
  .tc-form label { font-size: 8pt; margin-bottom: 1px; }
  .page-head h1 { font-size: 20pt; }
  .lede { font-size: 10pt; }
}
/* phones: places as a two-up grid (Tokyo stays full width) so the list is a glance, not a long scroll */
@media (max-width: 560px) {
  .places { gap: 10px; }
  .place, .place.wide { grid-column: span 6; }
  .places .place:first-child { grid-column: span 12; }
  .place:not(:first-child) figure, .place.wide:not(:first-child) figure { aspect-ratio: 4 / 3; min-height: 0; }
  .place:not(:first-child) .cap { flex-direction: column; gap: 2px; padding: 10px 12px 12px; }
  .place:not(:first-child) .cap b { font-size: 1.18rem; }
  .place:not(:first-child) .cap span { text-align: left; font-size: .7rem; }
}

/* charts on phones (built by motion.js from the chart's own marks) */
.chart .line, .chart .gridline, .chart .annot, .chart .hl { vector-effect: non-scaling-stroke; }
.hbars { list-style: none; margin: 4px 0 6px; padding: 0; }
.hbars li { margin: 0; padding: 10px 0 11px; border-top: 1px solid var(--line); }
.hbars li:first-child { border-top: 0; }
.hb-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; line-height: 1.3; }
.hb-name { font-size: .9rem; font-weight: 600; color: var(--ink); }
.hb-val { font-size: .95rem; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums lining-nums; white-space: nowrap; }
.hb-track { height: 8px; margin-top: 7px; background: var(--paper-2); border-radius: 1px; overflow: hidden; }
.hb-track i { display: block; height: 100%; background: var(--series-1); border-radius: 1px; transform-origin: left; animation: grow .9s cubic-bezier(.2, .7, .2, 1) both; }
.hbars li.hi .hb-track i { background: var(--series-2); }
.hb-note { font-size: .76rem; color: var(--ink-2); line-height: 1.5; margin-top: 6px; }
@keyframes grow { from { transform: scaleX(0); } }
.chart-card:has(.m-list) .chart-tip { display: none; }

/* one-row header on phones & tablets: brand · language · ≡ ; the menu drops down as a sheet */
.menu-btn { display: none; }
@media (max-width: 960px) {
  .js .site-header .wrap { flex-direction: row; flex-wrap: nowrap; align-items: center; gap: 10px; padding-top: 10px; padding-bottom: 10px; }
  .js .langsw { position: relative; right: auto; top: auto; margin-left: auto; order: 2; }
  .js .menu-btn { display: inline-grid; place-items: center; order: 3; width: 40px; height: 34px; padding: 0; border: 1px solid var(--ink); border-radius: 2px; background: var(--ink); cursor: pointer; flex: none; }
  .js .menu-btn span, .js .menu-btn span::before, .js .menu-btn span::after { display: block; width: 16px; height: 1.5px; background: var(--paper); position: relative; transition: transform .25s, background .2s; }
  .js .menu-btn span::before, .js .menu-btn span::after { content: ""; position: absolute; left: 0; }
  .js .menu-btn span::before { top: -5px; } .js .menu-btn span::after { top: 5px; }
  .js .site-header.open .menu-btn span { background: transparent; }
  .js .site-header.open .menu-btn span::before { transform: translateY(5px) rotate(45deg); }
  .js .site-header.open .menu-btn span::after { transform: translateY(-5px) rotate(-45deg); }
  .js .site-header .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; margin: 0; padding: 6px 20px 20px; flex-direction: column; align-items: stretch; gap: 0; overflow: visible; -webkit-mask-image: none; mask-image: none;
    background: var(--paper) var(--washi); border-bottom: 1px solid var(--line-2); box-shadow: 0 30px 40px -30px rgba(27, 30, 37, .45); font-size: .95rem; letter-spacing: .02em; text-transform: none; max-height: calc(100vh - 60px); overflow-y: auto; }
  .js .site-header.open .nav { display: flex; animation: rise .2s both; }
  .js .site-header .nav a { padding: 13px 0; border-bottom: 1px solid var(--line); white-space: normal; }
  .js .site-header .nav a::after { content: none; }
  .js .site-header .nav .btn-sm { order: 99; margin-top: 16px; text-align: center; padding: 13px; border-bottom: 0; background: var(--ink); color: var(--paper); }
  .js .brand { font-size: 1.22rem; gap: 10px; min-width: 0; }
  .js .brand .mark { width: 26px; height: 26px; }
  .js .brand .mark::after { inset: 7px 6px 6px; }
}
@media (max-width: 360px) { .js .brand { font-size: 1.08rem; } .js .langsw summary span { display: none; } }

/* homepage key-numbers band: the real medians, with their own little bar history */
.keyband { display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: 1px solid var(--line); border-top: 2px solid var(--ink); margin-top: -1px; position: relative; z-index: 1; background: var(--paper); }
.kb { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "k k" "v sp" "s s" "r r"; align-items: end; column-gap: 12px; padding: 22px 24px 20px; border-left: 1px solid var(--line); color: var(--ink); text-decoration: none; transition: background .25s; }
.kb:first-child { border-left: 0; padding-left: 0; }
a.kb:hover { background: var(--card); color: var(--ink); }
a.kb:hover .kb-k { color: var(--shu); }
.kb-k { grid-area: k; font-size: .68rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 6px; transition: color .2s; }
.kb-v { grid-area: v; font-family: "Cormorant Garamond", var(--serif); font-size: clamp(2rem, 3vw, 2.6rem); font-weight: 600; line-height: 1; letter-spacing: -.01em; font-variant-numeric: lining-nums tabular-nums; }
.kb-note .kb-v { font-size: clamp(1.5rem, 2.2vw, 1.9rem); }
.kb-spark { grid-area: sp; display: block; }
.kb-spark rect { fill: #b9c6d8; }
.kb-spark rect.now { fill: var(--ai); }
.kb-s { grid-area: s; font-size: .8rem; color: var(--ink-2); line-height: 1.45; margin-top: 8px; }
.kb-r { grid-area: r; font-size: .74rem; color: var(--ink-3); margin-top: 6px; font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.kb-note .kb-r { color: var(--shu); font-weight: 600; }
@media (max-width: 960px) { .keyband { grid-template-columns: 1fr 1fr; } .kb:nth-child(3) { border-left: 0; padding-left: 0; } .kb:nth-child(n+3) { border-top: 1px solid var(--line); } }
@media (max-width: 520px) { .kb { padding: 16px 12px 14px; } .kb:nth-child(2n) { padding-right: 0; } .kb-v { font-size: 1.75rem; } .kb-spark { width: 54px; height: 30px; } .kb-note .kb-v { font-size: 1.3rem; } }
.js-motion .kb-spark rect { transform-box: fill-box; transform-origin: bottom; animation: rise-bar .9s cubic-bezier(.2,.7,.2,1) both; }
.kb-spark rect:nth-child(2) { animation-delay: .06s; } .kb-spark rect:nth-child(3) { animation-delay: .12s; } .kb-spark rect:nth-child(4) { animation-delay: .18s; } .kb-spark rect:nth-child(5) { animation-delay: .24s; }
@keyframes rise-bar { from { transform: scaleY(0); } }
.kb { align-content: start; grid-template-rows: auto auto auto 1fr; }
.kb-r { align-self: end; }
.hb-top > * { min-width: 0; } .hb-val { flex: none; max-width: 60%; white-space: normal; text-align: right; }
