/* ================================================================
 * japan-work.nodokaya.jp — Japan Work Guide
 * 「墨と金」: tokens and components borrowed from the 許可ガイド family
 * (takken-menkyo-site/templates/css/site.css). Rewritten with logical
 * properties (inline-start/end) so the Urdu page (dir=rtl) mirrors.
 * Fonts: per-page subsets declared inline in <head> (JW Body / JW Script / JW Maru).
 * ============================================================== */

:root {
  --bg-craft: #F2E6D5;
  --bg-craft-light: #F8F0E5;
  --bg-white-card: #FFFDF9;
  --color-brown-dark: #4A3728;
  --color-brown: #8B6F4E;
  --color-brown-light: #A08A6E;
  --color-note: #7C6346;
  --sumi: #1A1614;
  --sumi-soft: #2E2A27;
  --gold: #B8942E;
  --gold-deep: #8B6914;
  --gold-light: #D9BC5E;
  --gold-tint: #F3E7C2;
  --shadow-card: 0 2px 12px rgba(26, 22, 20, 0.08);
  --shadow-seal: 0 1px 3px rgba(26, 22, 20, 0.35), inset 0 0 0 1px rgba(184, 148, 46, 0.4);
  --radius: 10px;
  --radius-lg: 16px;
  --notch: 12px;
  --max-width: 960px;
  --max-width-wide: 1120px;
  --font-body: -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-heading: var(--font-body);
  /* aliases used by inline SVG diagrams */
  --ink: var(--sumi);
  --paper: var(--bg-white-card);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  color: var(--color-brown-dark);
  background: var(--bg-craft);
  line-height: 1.9;
  font-weight: 400;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  overflow-wrap: break-word;
  position: relative;
}
body[data-lang="ja"] { font-feature-settings: "palt"; }
/* Nastaliq needs more height; its letters read small at the same font-size */
body[data-lang="ur"] { font-size: 1.08rem; line-height: 2.35; }
body[data-lang="my"], body[data-lang="km"], body[data-lang="si"], body[data-lang="lo"] { line-height: 2.05; }
strong, b { font-weight: 700; color: var(--sumi); }
a { color: var(--gold-deep); text-decoration: underline; text-decoration-color: var(--gold-light); text-underline-offset: 3px; text-decoration-thickness: 1px; transition: color .15s ease, text-decoration-color .15s ease; }
a:hover { color: var(--sumi); text-decoration-color: var(--gold); }
img { max-width: 100%; height: auto; display: block; }
ul, ol { padding-inline-start: 1.5em; }
li { margin: .3em 0; }
h1, h2, h3, h4 { font-family: var(--font-heading); color: var(--sumi); line-height: 1.45; }
p { margin: .8em 0; }
.term { white-space: nowrap; font-weight: 700; color: var(--sumi); }
.page-hero__h1 .term, .section-title .term { color: inherit; }
thead th .term { white-space: normal; }
@media (max-width: 380px) { .term { white-space: normal; } }
/* a date in running text stays on one line (site-api.js render: span.nw); a table cell may still wrap it, and
   so may a very narrow phone (a Mongolian date with its ending, 2027 оны дөрөвдүгээр сарын 1-нээс, is ~260px) */
.nw { white-space: nowrap; }
.data-table .nw { white-space: normal; }
@media (max-width: 340px) { .nw { white-space: normal; } }
/* Code check 2026-09-26 — nothing may push a phone page sideways:
   - Korean keeps words whole (keep-all), so a table-of-contents line of joined terms (A·B·C) could not wrap;
   - a Japanese source title inside the Korean page breaks as Japanese does, not word by word;
   - on narrow screens a long word in the industries table header or first column may break (ru, ta, uz). */
.page-toc__item a { overflow-wrap: anywhere; }
body[data-lang="ko"] [lang="ja"] { word-break: normal; }
@media (max-width: 640px) { .data-table--fields thead th, .data-table--fields tbody th { overflow-wrap: anywhere; } }

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='100' height='100' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100' height='100' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E") repeat;
  pointer-events: none;
  z-index: 0;
}
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; position: relative; z-index: 1; }
@media (max-width: 480px) { .container { padding: 0 16px; } }

.skip-link { position: absolute; inset-inline-start: 8px; top: -60px; z-index: 100; background: var(--sumi); color: var(--gold-light); padding: 8px 14px; border-radius: 4px; }
.skip-link:focus { top: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ============ Site Nav ============ */
.site-nav { background: var(--sumi); color: var(--gold-light); border-bottom: 3px solid var(--gold); position: relative; z-index: 5; }
.site-nav__inner { max-width: var(--max-width-wide); margin: 0 auto; padding: 12px 24px; display: flex; justify-content: space-between; align-items: center; gap: 12px 16px; flex-wrap: wrap; }
.site-nav__brand { display: flex; align-items: center; gap: 12px; color: var(--gold-light); text-decoration: none; font-weight: 700; }
.site-nav__brand:hover { color: #fff; }
.site-nav__seal {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; background: var(--gold); color: var(--sumi);
  font-family: 'JW Maru', sans-serif; font-weight: 700; font-size: 1.15rem;
  border-radius: 6px; box-shadow: var(--shadow-seal); line-height: 1;
}
.site-nav__brand-text { font-size: .95rem; letter-spacing: .04em; }

/* language menu: <details> closed by default everywhere (it is a picker, not the main navigation) */
.lang-menu { position: relative; }
.lang-menu__summary {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer; list-style: none;
  color: var(--gold-light); font-size: .85rem; padding: 6px 12px;
  border: 1px solid rgba(217, 188, 94, .45); border-radius: 6px; line-height: 1.4;
}
.lang-menu__summary::-webkit-details-marker { display: none; }
.lang-menu__summary:hover, .lang-menu[open] .lang-menu__summary { color: #fff; border-color: var(--gold); }
.lang-menu__icon { display: inline-flex; }
.lang-menu__list {
  position: absolute; inset-inline-end: 0; top: calc(100% + 8px); z-index: 20;
  list-style: none; padding: 8px; margin: 0; width: min(92vw, 520px);
  display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 2px;
  background: var(--bg-white-card); border: 1px solid rgba(139, 105, 20, .3); border-radius: var(--radius);
  box-shadow: 0 8px 28px rgba(26, 22, 20, .22);
}
.lang-menu__list li { margin: 0; }
/* Language names are shown in the reader's system fonts: 25 scripts on every page would mean 25 web fonts. */
.lang-menu__list a, .lang-list__grid a { font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Noto Sans', sans-serif; }
.lang-menu__list a { display: block; padding: 7px 10px; border-radius: 4px; color: var(--color-brown-dark); text-decoration: none; font-size: .92rem; line-height: 1.5; }
.lang-menu__list a:hover { background: var(--gold-tint); color: var(--sumi); }
.lang-menu__list a[aria-current="page"] { background: var(--sumi); color: var(--gold-light); }

/* ============ Breadcrumb ============ */
.breadcrumb-wrap { padding: 14px 0 4px; }
.breadcrumb { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; font-size: .82rem; color: var(--color-brown); }
.breadcrumb__list { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 6px; }
.breadcrumb__item { display: inline-flex; align-items: center; gap: 6px; margin: 0; }
.breadcrumb__item a { color: var(--color-brown); text-decoration: none; }
.breadcrumb__item a:hover { color: var(--gold-deep); text-decoration: underline; }
.breadcrumb__item span[aria-current="page"] { color: var(--sumi); font-weight: 500; }
.breadcrumb__item .term { font-weight: 500; }
.breadcrumb__sep { color: var(--color-brown-light); }
[dir="rtl"] .breadcrumb__sep { transform: scaleX(-1); display: inline-block; }

/* ============ Page Hero ============ */
.page-hero { padding: 24px 0 8px; }
.page-hero__eyecatch { margin: 0 auto 28px; max-width: var(--max-width); padding: 0 24px; }
.page-hero__eyecatch img { width: 100%; aspect-ratio: 1200 / 630; object-fit: cover; border-radius: var(--radius-lg); box-shadow: var(--shadow-card); background: var(--bg-craft-light); }
.page-hero__eyebrow {
  display: inline-flex; align-items: center; gap: 10px; margin: 0 0 12px;
  padding-block: 4px; padding-inline: 4px 14px;
  background: var(--sumi); color: var(--gold-light);
  font-size: .78rem; font-weight: 500; letter-spacing: .06em; border-radius: 4px; line-height: 1.5;
}
.page-hero__seal {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 24px; height: 24px; background: var(--gold); color: var(--sumi);
  font-family: 'JW Maru', sans-serif; font-weight: 700; font-size: .9rem; border-radius: 3px; line-height: 1;
}
.page-hero__h1 {
  font-weight: 700; font-size: clamp(1.45rem, 4.2vw, 2.05rem); line-height: 1.5; color: var(--sumi);
  margin: 8px 0 16px; border-inline-start: 4px solid var(--gold); padding-inline-start: 16px;
}
body[data-lang="ur"] .page-hero__h1 { line-height: 2.1; }
.page-hero__h1-sub { display: block; font-size: .58em; font-weight: 500; color: var(--color-brown); margin-top: 8px; letter-spacing: .02em; }
.page-hero__lead { font-size: 1.02rem; line-height: 1.95; margin: 16px 0 8px; max-width: 72ch; }
.page-meta { font-size: .82rem; color: var(--color-note); margin: 8px 0 0; line-height: 1.9; }
.page-meta__sep { margin: 0 .5em; color: var(--color-brown-light); }
.page-asof { font-size: .82rem; color: var(--color-note); margin: 2px 0 0; }

/* ============ Key terms (最序盤: what SSW / ESD stand for) ============ */
.terms-section { padding: 12px 0 4px; }
.terms-box { background: var(--bg-white-card); border: 1px solid rgba(139, 105, 20, .25); border-radius: var(--radius); box-shadow: var(--shadow-card); padding: 16px 20px; }
.terms-box__title { font-weight: 700; color: var(--sumi); font-size: .95rem; letter-spacing: .06em; margin: 0 0 8px; padding-bottom: 6px; border-bottom: 1px dashed var(--gold-light); }
.terms-box__list { margin: 0; }
.terms-box__row { padding: 10px 0; border-bottom: 1px dashed rgba(139, 111, 78, .3); display: grid; gap: 2px; }
.terms-box__row:last-child { border-bottom: 0; }
.terms-box__term { font-size: 1.05rem; }
.terms-box__abbr { font-weight: 700; color: var(--gold-deep); font-size: .93rem; margin: 0; }
.terms-box__ja { margin: 0; font-size: .88rem; color: var(--color-note); }
.terms-box__ja-label { font-size: .78rem; border: 1px solid var(--gold-light); border-radius: 3px; padding: 0 6px; margin-inline-end: 4px; }
.terms-box__ja [lang="ja"] { font-family: 'JW Maru', sans-serif; font-weight: 700; color: var(--sumi); }
.terms-box__desc { margin: 2px 0 0; font-size: .92rem; line-height: 1.8; }

/* ============ Summary ("In short") — family .qa-answer ============ */
.summary-section { padding: 12px 0 4px; }
.summary-box { background: var(--bg-white-card); border-inline-start: 4px solid var(--gold); border-radius: var(--radius); box-shadow: var(--shadow-card); padding: 16px 20px; }
.summary-box__label { color: var(--gold-deep); font-size: .9rem; font-weight: 700; letter-spacing: .06em; margin: 0 0 4px; }
.summary-box__list { margin: 0; padding-inline-start: 1.2em; }
.summary-box__list li { margin: .5em 0; line-height: 1.9; font-weight: 500; }

/* ============ Section eyebrow + title ============ */
.section-eyebrow { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 8px; font-size: .78rem; font-weight: 700; letter-spacing: .08em; color: var(--color-brown); }
.section-eyebrow__num {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 26px; height: 26px; padding: 0 5px; flex-shrink: 0; white-space: nowrap;
  background: var(--sumi); color: var(--gold); font-weight: 700; font-size: .95rem; border-radius: 3px; line-height: 1;
}
.section-title {
  font-weight: 700; font-size: clamp(1.3rem, 3.2vw, 1.65rem); color: var(--sumi); line-height: 1.55;
  margin: 4px 0 20px; padding-bottom: 10px; border-bottom: 2px solid var(--gold); position: relative;
}
body[data-lang="ur"] .section-title { line-height: 2.1; }
.section-title::after { content: ''; position: absolute; inset-inline-start: 0; bottom: -2px; width: 60px; height: 2px; background: var(--sumi); }

/* ============ 監修カード (family .integrated-card: seal straddling the top edge + notch) ============ */
.integrated-card { position: relative; background: var(--bg-white-card); border: 1px solid rgba(139, 105, 20, 0.25); border-radius: var(--radius-lg); padding: 36px 24px 20px; margin: 32px 0; box-shadow: var(--shadow-card); }
.integrated-card::after {
  content: ''; position: absolute; top: 0; inset-inline-end: 0; width: var(--notch); height: var(--notch);
  background: linear-gradient(135deg, transparent 50%, var(--bg-craft) 50%); border-start-end-radius: var(--radius-lg); pointer-events: none;
}
[dir="rtl"] .integrated-card::after { background: linear-gradient(225deg, transparent 50%, var(--bg-craft) 50%); }
.integrated-card__seal-wrap { position: absolute; top: -14px; inset-inline-start: 20px; z-index: 2; }
.integrated-card__seal {
  display: inline-flex; align-items: center; justify-content: center; padding: 6px 16px; min-height: 30px;
  background: var(--sumi); color: var(--gold); font-weight: 700; font-size: .82rem; letter-spacing: .08em;
  border-radius: 3px; box-shadow: var(--shadow-seal); white-space: nowrap; line-height: 1.3;
}
.integrated-card__section-title { font-size: .88rem; letter-spacing: .08em; color: var(--gold-deep); font-weight: 700; margin: 0 0 10px; }
.integrated-card__supervisor-body { display: flex; gap: 20px; align-items: flex-start; }
.integrated-card__photo { flex-shrink: 0; width: 96px; height: 96px; border-radius: 50%; overflow: hidden; border: 2px solid var(--gold-light); background: var(--bg-craft-light); margin: 0; }
.integrated-card__photo img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.integrated-card__name { font-size: 1rem; margin: 0 0 4px; line-height: 1.4; }
.integrated-card__name strong { font-size: 1.12rem; }
.integrated-card__kana { display: inline-block; font-size: .8rem; color: var(--color-brown); margin-inline-start: 8px; font-family: 'JW Maru', sans-serif; }
.integrated-card__bio { font-size: .93rem; line-height: 1.8; margin: 0; }
.integrated-card__divider { height: 1px; margin: 18px 0 12px; background: linear-gradient(to right, transparent 0%, var(--gold-light) 20%, var(--gold-light) 80%, transparent 100%); }
.integrated-card__office-desc { margin: 0; font-size: .9rem; }
@media (max-width: 520px) { .integrated-card__supervisor-body { flex-direction: column; gap: 12px; } .integrated-card__photo { width: 80px; height: 80px; } }

/* ============ TOC ============ */
.page-toc { background: var(--bg-white-card); border: 1px solid rgba(184, 148, 46, 0.2); border-inline-start: 4px solid var(--gold); border-radius: var(--radius); padding: 20px 24px; margin: 32px auto; max-width: calc(var(--max-width) - 48px); }
@media (max-width: 1008px) { .page-toc { margin-inline: 24px; } }
@media (max-width: 480px) { .page-toc { margin-inline: 16px; padding: 16px; } }
.page-toc__title { font-weight: 700; color: var(--sumi); font-size: 1rem; letter-spacing: .06em; margin: 0 0 12px; padding-bottom: 8px; border-bottom: 1px dashed var(--gold-light); }
.page-toc__list { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.page-toc__item { margin: 0; }
.page-toc__item a { display: flex; align-items: center; gap: 12px; padding: 8px 4px; color: var(--color-brown-dark); text-decoration: none; border-radius: 4px; line-height: 1.6; }
.page-toc__item a:hover { background: var(--gold-tint); color: var(--sumi); }
.page-toc__item .term { font-weight: 500; color: inherit; }
.page-toc__num { display: inline-flex; align-items: center; justify-content: center; min-width: 28px; height: 28px; padding: 0 6px; background: var(--sumi); color: var(--gold); font-weight: 700; font-size: .95rem; border-radius: 3px; flex-shrink: 0; line-height: 1; }

/* ============ Sections (zebra: odd sections tinted — "different from the one before") ============ */
.column-section, .faq-section, .sources-section { padding: 44px 0; }
.column-section--tint { background: var(--bg-craft-light); }
.column-block__h3 { font-size: 1.06rem; color: var(--sumi); margin: 26px 0 8px; padding-inline-start: 10px; border-inline-start: 4px solid var(--gold); line-height: 1.6; }
body[data-lang="ur"] .column-block__h3 { line-height: 2.1; }
.bullets { margin: 10px 0 14px; }
.bullets li { margin: .45em 0; line-height: 1.85; }
.bullets li::marker { color: var(--gold-deep); }
.column-sources { font-size: .85rem; color: var(--color-note); margin: 12px 0 0; line-height: 1.8; }

/* ============ Figures (inline SVG diagrams) ============ */
.fig { margin: 24px auto; max-width: 464px; background: var(--bg-white-card); border: 1px solid rgba(139, 111, 78, .2); border-radius: var(--radius); padding: 12px; }
.fig svg { display: block; width: 100%; height: auto; }
.fig__caption { font-size: .85rem; color: var(--color-note); margin: 8px 4px 0; line-height: 1.8; text-align: center; }
.fig-missing { padding: 24px; text-align: center; color: #9b1c1c; border: 2px dashed #9b1c1c; font-weight: 700; }
.jw-svg text { font-family: var(--font-body); }

/* ============ Tables (family .data-table; stacked on narrow screens instead of scrolling) ============ */
.table-wrap { margin: 20px 0; border-radius: var(--radius); box-shadow: var(--shadow-card); }
.data-table { width: 100%; border-collapse: collapse; background: var(--bg-white-card); border: 1px solid rgba(139, 111, 78, 0.25); font-size: .9rem; line-height: 1.7; }
.data-table caption { caption-side: top; text-align: start; font-weight: 700; color: var(--sumi); font-size: .9rem; padding: 0 2px 8px; }
.data-table thead th { background: var(--sumi); color: var(--gold-light); font-weight: 700; font-size: .82rem; padding: 10px 12px; text-align: start; vertical-align: bottom; }
.data-table thead .term { color: var(--gold-light); font-weight: 700; white-space: normal; }
.data-table tbody th { text-align: start; font-weight: 700; color: var(--sumi); padding: 10px 12px; border-bottom: 1px dashed rgba(139, 111, 78, 0.3); border-inline-start: 3px solid var(--gold); vertical-align: top; }
.data-table td { padding: 10px 12px; border-bottom: 1px dashed rgba(139, 111, 78, 0.3); vertical-align: top; }
.data-table tr:last-child td, .data-table tr:last-child th { border-bottom: 0; }
.data-table--compare { table-layout: fixed; }
.data-table--compare thead th:first-child, .data-table--compare tbody th { width: 20%; }
.data-table--fields td { text-align: center; white-space: nowrap; }
.data-table--fields thead th:not(:first-child) { text-align: center; }
.mark { display: inline-flex; align-items: center; justify-content: center; }
.mark--yes { color: var(--gold-deep); }
.mark--no { color: var(--color-brown-light); }
.badge-new { display: inline-block; font-size: .7rem; font-weight: 700; color: var(--sumi); background: var(--gold-tint); border: 1px solid var(--gold-light); border-radius: 3px; padding: 0 5px; margin-inline-start: 4px; vertical-align: middle; line-height: 1.5; }
.table-note { font-size: .82rem; color: var(--color-note); margin: 6px 0 0; }
.data-table--fields td, .data-table--fields tbody th { vertical-align: middle; }
@media (max-width: 700px) {
  /* compare table: stack each row into a card (label above value; one grid item per cell) */
  .data-table--compare, .data-table--compare tbody, .data-table--compare tr, .data-table--compare th, .data-table--compare td { display: block; width: auto !important; }
  .data-table--compare { border: 0; background: transparent; }
  .data-table--compare caption { display: block; }
  .data-table--compare thead { display: none; }
  .table-wrap--compare { box-shadow: none; }
  .data-table--compare tr { background: var(--bg-white-card); border: 1px solid rgba(139, 111, 78, 0.25); border-inline-start: 3px solid var(--gold); border-radius: 6px; margin: 0 0 10px; padding: 6px 0; box-shadow: var(--shadow-card); }
  .data-table--compare tbody th { border: 0; padding: 6px 14px 2px; }
  .data-table--compare td { border: 0; padding: 4px 14px; display: grid; grid-template-columns: minmax(6.5em, 38%) 1fr; gap: 10px; align-items: start; }
  .data-table--compare td::before { content: attr(data-label); font-size: .76rem; font-weight: 700; color: var(--color-note); line-height: 1.6; padding-top: 3px; }
  /* fields table: stays a table, compact */
  .data-table--fields { font-size: .82rem; }
  .data-table--fields thead th { font-size: .7rem; padding: 8px 4px; line-height: 1.35; }
  .data-table--fields thead th:first-child { padding-inline-start: 8px; }
  .data-table--fields tbody th { padding: 8px 6px 8px 8px; font-size: .82rem; line-height: 1.45; }
  .data-table--fields td { padding: 8px 2px; }
  .data-table--fields .badge-new { display: inline-block; margin: 2px 0 0; }
}
/* ============ Help links / sources ============ */
.help-links, .source-list { list-style: none; padding: 0; margin: 12px 0; display: grid; gap: 8px; }
.help-links li, .source-list li { margin: 0; }
.help-links a { display: block; padding: 12px 14px; background: var(--bg-white-card); border: 1px solid rgba(139, 111, 78, 0.2); border-inline-start: 3px solid var(--gold); border-radius: 6px; color: var(--color-brown-dark); text-decoration: none; line-height: 1.7; }
.help-links a:hover { border-color: var(--gold); background: var(--gold-tint); color: var(--sumi); }
.source-list li { padding: 8px 12px; background: var(--bg-white-card); border: 1px solid rgba(139, 111, 78, 0.15); border-radius: 6px; line-height: 1.7; }
.source-list__orig { display: block; font-size: .78rem; color: var(--color-note); font-family: 'JW Maru', var(--font-body); margin-top: 2px; }
.disclaimer { font-size: .85rem; color: var(--color-note); border-top: 1px dashed var(--gold-light); padding-top: 12px; margin-top: 20px; }

/* ============ FAQ ============ */
.faq-list { margin: 20px 0; }
.faq-item { background: var(--bg-white-card); border: 1px solid rgba(139, 111, 78, 0.2); border-radius: var(--radius); padding: 18px 22px; margin: 12px 0; box-shadow: var(--shadow-card); }
.faq-item__q { font-weight: 700; color: var(--sumi); font-size: 1.02rem; line-height: 1.6; margin: 0 0 10px; border-inline-start: 3px solid var(--gold); padding-inline-start: 12px; }
.faq-item__a { margin: 0; padding-inline-start: 12px; line-height: 1.85; font-size: .95rem; }
body[data-lang="ur"] .faq-item__q, body[data-lang="ur"] .faq-item__a { line-height: 2.2; }

/* ============ Language list (end of article) and hub ============ */
.lang-list { padding: 36px 0 8px; }
.lang-list__title { font-weight: 700; color: var(--sumi); margin: 0 0 10px; }
.lang-list__grid, .hub-grid { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.lang-list__grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.lang-list__grid li, .hub-grid li { margin: 0; }
.lang-list__grid a { display: block; padding: 8px 12px; background: var(--bg-white-card); border: 1px solid rgba(139, 111, 78, 0.2); border-radius: 6px; color: var(--color-brown-dark); text-decoration: none; font-size: .92rem; }
.lang-list__grid a:hover { border-color: var(--gold); background: var(--gold-tint); color: var(--sumi); }
.lang-list__grid a[aria-current="page"] { background: var(--sumi); color: var(--gold-light); border-color: var(--sumi); }
.hub-section { padding: 16px 0 40px; }
.hub-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.hub-card { display: flex; flex-direction: column; gap: 6px; height: 100%; padding: 14px 16px; background: var(--bg-white-card); border: 1px solid rgba(139, 111, 78, 0.2); border-inline-start: 3px solid var(--gold); border-radius: 8px; text-decoration: none; color: var(--color-brown-dark); box-shadow: var(--shadow-card); }
.hub-card:hover { border-color: var(--gold); background: var(--gold-tint); }
.hub-card__native { font-weight: 700; color: var(--sumi); font-size: 1.1rem; line-height: 1.5; }
.hub-card__title { font-size: .85rem; line-height: 1.7; }
.hub-card__title .term { font-weight: 700; white-space: normal; }
.hub-card[lang="ur"] .hub-card__title { line-height: 2.2; }
.notfound { padding: 60px 24px; }

/* ============ Footer ============ */
.site-footer { background: var(--sumi); color: rgba(255, 255, 255, 0.75); margin-top: 48px; padding: 40px 0 20px; border-top: 4px solid var(--gold); position: relative; z-index: 2; }
.site-footer__inner { max-width: var(--max-width-wide); margin: 0 auto; padding: 0 24px; display: grid; grid-template-columns: 1fr; gap: 28px; }
@media (min-width: 720px) { .site-footer__inner { grid-template-columns: 1.3fr 1fr; gap: 40px; } }
.site-footer__brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 700; font-size: 1rem; margin: 0 0 12px; }
.site-footer__seal { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; background: var(--gold); color: var(--sumi); font-family: 'JW Maru', sans-serif; font-weight: 700; border-radius: 4px; font-size: 1.05rem; box-shadow: var(--shadow-seal); line-height: 1; }
.site-footer__address { font-style: normal; font-size: .82rem; line-height: 1.8; color: rgba(255, 255, 255, 0.72); }
.site-footer__address [lang="ja"] { font-family: 'JW Maru', var(--font-body); }
.site-footer__group-title { font-weight: 700; color: var(--gold); font-size: .82rem; letter-spacing: .08em; margin: 0 0 10px; padding-bottom: 6px; border-bottom: 1px solid rgba(184, 148, 46, 0.3); }
.site-footer__links { list-style: none; padding: 0; margin: 0; }
.site-footer__links li { margin: 6px 0; }
.site-footer__links a { color: rgba(255, 255, 255, 0.78); font-size: .85rem; text-decoration: none; }
.site-footer__links a:hover { color: var(--gold-light); text-decoration: underline; }
.site-footer__note { font-size: .78rem; color: rgba(255, 255, 255, 0.55); margin: 14px 0 0; line-height: 1.8; }
.site-footer__copy { text-align: center; margin: 32px 0 0; padding-top: 18px; font-size: .74rem; color: rgba(255, 255, 255, 0.5); border-top: 1px solid rgba(184, 148, 46, 0.2); }

@media (prefers-reduced-motion: reduce) { * { transition-duration: .01ms !important; scroll-behavior: auto !important; } }
@media print { .site-nav, .lang-menu, .lang-list, .site-footer, .ad-unit { display: none; } body { background: #fff; } }

/* Scripts whose letters join or stack (Devanagari's headline, Nastaliq's joins, Brahmic clusters,
   Thai/Lao/Khmer/Myanmar marks) are never letter-spaced: the label styles above are for Latin/CJK. */
body:is([data-lang="hi"],[data-lang="ne"],[data-lang="bn"],[data-lang="ta"],[data-lang="si"],[data-lang="th"],[data-lang="lo"],[data-lang="km"],[data-lang="my"],[data-lang="ur"]) * { letter-spacing: normal; }

/* Japanese headings break between phrases, not inside a word (移 / 行). Ignored where unsupported. */
html[lang="ja"] :is(h1, h2, h3, .page-toc a) { word-break: auto-phrase; }
/* Korean is set word by word (keep-all), as Korean typography expects: no break inside 차이점. */
html[lang="ko"] body { word-break: keep-all; }

/* Ad unit (AdSense Multiplex "autorelaxed") — the family's rules (nta / pref / 管轄ガイド style.css); the family draws its label
   「スポンサーリンク」 with ::before, here it is a real line in the page's language (_includes/ad-unit.njk) */
.ad-unit { margin: 2.25rem 0; text-align: center; min-height: 1px; }
.ad-unit__label { display: block; font-size: .68rem; letter-spacing: .18em; color: var(--color-brown-light); margin: 0 0 .4rem; }
body[data-lang="ur"] .ad-unit__label { letter-spacing: 0; }   /* Nastaliq is joined script: letter-spacing would break the joins */
.ad-unit .adsbygoogle { display: block; }
.ad-unit:has(ins.adsbygoogle[data-ad-status="unfilled"]) { display: none; }   /* no ad served: no orphan label */
