/* Japan Matcha Desk — site styles
   Fonts: Newsreader (Production Type) and Source Sans 3 (Adobe), both SIL OFL 1.1, self-hosted. */

@font-face { font-family: "Newsreader"; src: url("/fonts/newsreader-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("/fonts/newsreader-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("/fonts/newsreader-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("/fonts/newsreader-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Source Sans 3"; src: url("/fonts/source-sans-3-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Source Sans 3"; src: url("/fonts/source-sans-3-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }

:root {
  color-scheme: light;
  --paper: #f2f1e8;
  --paper-deep: #e8e6d9;
  --white: #fbfbf7;
  --ink: #1d221e;
  --ink-soft: #4d544f;
  --ink-faint: #6f756f;
  --rule: #cdcbbd;
  --green: #1f4a36;
  --green-hover: #2c6249;
  --matcha: #9ba63b;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Source Sans 3", "Segoe UI", Helvetica, Arial, sans-serif;
  --wrap: 72rem;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.1875rem;
  line-height: 1.6;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--green); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--green-hover); text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }
p { margin: 0 0 1em; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.15; margin: 0; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.25rem, 1.4rem + 3.2vw, 3.6rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.6rem, 1.3rem + 1vw, 2.1rem); }
h3 { font-size: 1.3rem; font-weight: 600; letter-spacing: 0; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -999px; top: 0; background: var(--green); color: var(--white); padding: .5rem 1rem; font-family: var(--sans); z-index: 10; }
.skip:focus { left: 1rem; }

/* Masthead */
.masthead { border-top: 5px solid var(--green); border-bottom: 1px solid var(--rule); background: var(--paper); }
.masthead .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 5rem; flex-wrap: wrap; padding-top: .75rem; padding-bottom: .75rem; }
.brand { text-decoration: none; color: var(--ink); display: grid; gap: .1rem; }
.brand:hover { color: var(--ink); }
.brand-name { font-family: var(--serif); font-weight: 600; font-size: 1.55rem; line-height: 1; letter-spacing: -0.015em; }
.brand-sub { font-family: var(--sans); font-size: .875rem; color: var(--ink-faint); line-height: 1.3; }
.nav { display: flex; gap: 1.75rem; font-family: var(--sans); font-size: 1rem; }
.nav a { color: var(--ink); text-decoration: none; padding: .35rem 0; border-bottom: 2px solid transparent; }
.nav a:hover { border-bottom-color: var(--rule); }
.nav a[aria-current="page"] { border-bottom-color: var(--green); }

/* Shared */
main { display: block; }
.section { padding: clamp(2.75rem, 6vw, 4.5rem) 0; }
.section + .section { border-top: 1px solid var(--rule); }
.lede { font-size: clamp(1.2rem, 1.1rem + .4vw, 1.4rem); line-height: 1.5; color: var(--ink-soft); max-width: 36em; }
.sans { font-family: var(--sans); }
.btn {
  display: inline-block; font-family: var(--sans); font-weight: 600; font-size: 1.0625rem;
  background: var(--green); color: var(--white); text-decoration: none;
  padding: .8rem 1.35rem; border-radius: 2px; border: 1px solid var(--green);
}
.btn:hover { background: var(--green-hover); border-color: var(--green-hover); color: var(--white); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.75rem; margin-top: 2rem; font-family: var(--sans); font-size: 1.0625rem; }
.note { font-family: var(--sans); font-size: .9375rem; color: var(--ink-faint); line-height: 1.5; }
.head-row { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 2rem; }
.head-row p { margin: 0; }

figure { margin: 0; }
figcaption { font-family: var(--sans); font-size: .875rem; color: var(--ink-faint); margin-top: .6rem; line-height: 1.4; }
.photo { background: var(--paper-deep); overflow: hidden; }
.photo img { width: 100%; height: 100%; object-fit: cover; }

/* Home: opening */
.opening .wrap { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.opening h1 { max-width: 13em; }
.opening .lede { margin-top: 1.5rem; }
.opening .photo { aspect-ratio: 4 / 5; }

/* Home: market */
.market-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
.chart h3 { font-family: var(--sans); font-size: 1.0625rem; font-weight: 600; margin-bottom: .2rem; }
.chart .sub { font-family: var(--sans); font-size: .9375rem; color: var(--ink-soft); margin: 0 0 1.25rem; }
.chart svg { width: 100%; height: auto; display: block; }
.chart svg text { font-family: var(--sans); }
.chart .note { margin-top: .75rem; }

.dates { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.dates li { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: 1.25rem; padding: 1.1rem 0; border-bottom: 1px solid var(--rule); }
.dates time, .dates .when { font-family: var(--sans); font-weight: 600; font-size: 1rem; line-height: 1.5; padding-top: .1rem; }
.dates p { margin: 0; font-size: 1.0625rem; line-height: 1.5; }
.dates strong { font-weight: 600; }
.dates-title { font-family: var(--sans); font-size: 1.0625rem; font-weight: 600; margin: 0 0 .75rem; }

/* Home: publications */
.pubs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1.5rem, 4vw, 3rem); }
.pub { background: var(--white); border: 1px solid var(--rule); padding: clamp(1.25rem, 3vw, 2rem); display: flex; flex-direction: column; }
.pub h3 { margin: .25rem 0 .6rem; }
.pub h3 a { color: var(--ink); text-decoration: none; }
.pub h3 a:hover { color: var(--green); text-decoration: underline; }
.pub .kind { font-family: var(--sans); font-size: .9375rem; color: var(--green); font-weight: 600; margin: 0; }
.pub p { font-size: 1.0625rem; color: var(--ink-soft); }
.pub .more { margin-top: auto; font-family: var(--sans); font-size: 1rem; padding-top: .5rem; }
.mini { margin: .5rem 0 1.25rem; padding: 1rem 1rem .75rem; background: var(--paper); border: 1px solid var(--paper-deep); }
.mini-row { display: grid; grid-template-columns: 7rem repeat(12, minmax(0, 1fr)); align-items: end; gap: 3px; height: 2.6rem; margin-bottom: .35rem; }
.mini-row span:first-child { font-family: var(--sans); font-size: .8125rem; color: var(--ink-soft); align-self: center; }
.mini-row i { display: block; background: var(--green); min-height: 2px; }
.pub .mini-cap { font-family: var(--sans); font-size: .8125rem; color: var(--ink-faint); margin: .25rem 0 0; }
.toc { list-style: none; padding: 0; margin: .5rem 0 1.25rem; font-family: var(--sans); font-size: 1rem; border-top: 1px solid var(--rule); }
.toc li { padding: .55rem 0; border-bottom: 1px solid var(--rule); display: flex; justify-content: space-between; gap: 1rem; }
.toc span:last-child { color: var(--ink-faint); white-space: nowrap; }

/* Home: about strip */
.about-strip .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: clamp(2rem, 5vw, 4.5rem); }
.about-strip blockquote { margin: 0; font-size: clamp(1.4rem, 1.2rem + .8vw, 1.8rem); line-height: 1.35; font-style: italic; color: var(--green); }
.about-strip p { max-width: 34em; }

/* Inner pages */
.page-head { padding: clamp(2.75rem, 6vw, 4.5rem) 0 clamp(2rem, 4vw, 3rem); }
.page-head h1 { max-width: 16em; }
.page-head .lede { margin-top: 1.25rem; }
.prose { max-width: 40rem; }
.prose h2 { margin: 2.5rem 0 1rem; }
.prose h2:first-child { margin-top: 0; }
.wide-photo { aspect-ratio: 21 / 9; }

.principles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1.5rem, 3vw, 2.5rem); margin: 0; }
.principles div { border-top: 2px solid var(--ink); padding-top: 1rem; }
.principles dt { font-weight: 600; font-size: 1.25rem; margin-bottom: .5rem; }
.principles dd { margin: 0; color: var(--ink-soft); font-size: 1.0625rem; }

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: clamp(2rem, 5vw, 4.5rem); }
.offer { list-style: none; padding: 0; margin: 1.5rem 0; border-top: 1px solid var(--rule); }
.offer li { padding: 1rem 0; border-bottom: 1px solid var(--rule); }
.offer strong { display: block; font-weight: 600; }
.offer span { color: var(--ink-soft); font-size: 1.0625rem; }

.contact-box { background: var(--white); border: 1px solid var(--rule); border-left: 4px solid var(--green); padding: 1.5rem 1.75rem; font-family: var(--sans); font-size: 1.0625rem; }
.contact-box p:last-child { margin-bottom: 0; }

.reasons { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1.5rem, 3vw, 2.5rem); }
.reasons li { border-top: 2px solid var(--ink); padding-top: 1rem; }
.reasons .fig { display: block; font-size: 2rem; font-weight: 500; color: var(--green); line-height: 1.1; margin-bottom: .6rem; font-variant-numeric: lining-nums; }
.reasons h3 { margin-bottom: .5rem; }
.reasons p { font-size: 1.0625rem; color: var(--ink-soft); margin: 0; }

.contents { list-style: none; padding: 0; margin: 0; border-top: 2px solid var(--ink); }
.contents li { display: grid; grid-template-columns: minmax(0, 15rem) minmax(0, 1fr); gap: 1.5rem; padding: 1.1rem 0; border-bottom: 1px solid var(--rule); }
.contents strong { font-weight: 600; }
.contents span { color: var(--ink-soft); font-size: 1.0625rem; }

.request { background: var(--paper-deep); border-top: 1px solid var(--rule); }
.request .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: clamp(2rem, 5vw, 4.5rem); padding-top: clamp(2.75rem, 6vw, 4.5rem); padding-bottom: clamp(2.75rem, 6vw, 4.5rem); }
.request p { font-size: 1.0625rem; }
.request .stages { margin: 0 0 1.5rem; padding-left: 1.2rem; font-family: var(--sans); font-size: 1rem; }

.legal dl { margin: 0; }
.legal dt { font-weight: 600; margin-top: 1.5rem; }
.legal dd { margin: .25rem 0 0; }
.updated { font-family: var(--sans); font-size: .9375rem; color: var(--ink-faint); margin-top: 1rem; }

.notfound { padding: clamp(4rem, 12vw, 8rem) 0; }
.notfound p { max-width: 32em; }

/* Data sample */
.data-head { padding: clamp(2.5rem, 5vw, 3.5rem) 0 1.5rem; }
.data-head h1 { font-size: clamp(1.9rem, 1.3rem + 2.2vw, 2.8rem); max-width: 22em; }
.data-meta { font-family: var(--sans); font-size: 1rem; color: var(--ink-soft); margin-top: .9rem; display: flex; flex-wrap: wrap; gap: .25rem 1.5rem; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 2px solid var(--ink); border-bottom: 1px solid var(--rule); margin: 1.5rem 0 3rem; }
.kpis div { padding: 1rem 1.25rem 1.1rem 0; }
.kpis div + div { padding-left: 1.25rem; border-left: 1px solid var(--rule); }
.kpis b { display: block; font-weight: 500; font-size: 1.9rem; line-height: 1.1; font-variant-numeric: lining-nums tabular-nums; }
.kpis span { display: block; font-family: var(--sans); font-size: .9375rem; line-height: 1.4; color: var(--ink-soft); margin-top: .3rem; }
.tbl-title { font-family: var(--sans); font-size: 1.125rem; font-weight: 600; margin: 0 0 1rem; }
.scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { border-collapse: collapse; width: 100%; font-family: var(--sans); font-size: .9375rem; font-variant-numeric: tabular-nums lining-nums; }
th, td { padding: .5rem .45rem; text-align: right; vertical-align: bottom; }
thead th { font-weight: 600; border-bottom: 2px solid var(--ink); white-space: nowrap; color: var(--ink); }
th[scope="row"], td.l, th.l { text-align: left; }
.exports { min-width: 52rem; }
.exports tbody tr.vol td { padding-top: 1rem; }
.exports tbody tr.val td, .exports tbody tr.val th { color: var(--ink-soft); border-bottom: 1px solid var(--rule); font-size: .875rem; padding-bottom: .7rem; }
.exports tbody tr.vol th { font-size: 1rem; font-weight: 600; color: var(--ink); vertical-align: bottom; }
.exports .unit { font-weight: 400; color: var(--ink-faint); font-size: .875rem; white-space: nowrap; }
.bar { display: flex; flex-direction: column; align-items: stretch; justify-content: flex-end; height: 3.25rem; }
.bar i { display: block; background: var(--green); min-height: 2px; }
.bar span { margin-top: .2rem; }
.exports td.total, .exports th.total { background: var(--paper-deep); font-weight: 600; }
.exports tr.val td.total { font-weight: 600; color: var(--ink); }
.producers { min-width: 44rem; }
.producers td, .producers th { text-align: left; vertical-align: top; border-bottom: 1px solid var(--rule); padding: .75rem .6rem .75rem 0; }
.producers td:last-child, .producers th:last-child { white-space: nowrap; color: var(--ink-soft); }
.producers td:first-child { font-weight: 600; width: 14rem; }
.sources { font-family: var(--sans); font-size: .875rem; color: var(--ink-soft); max-width: 60rem; margin: 1rem 0 0; line-height: 1.5; }
.data-block { margin-bottom: 3.5rem; }
.brief-box { background: var(--white); border: 1px solid var(--rule); border-left: 4px solid var(--green); padding: 1.25rem 1.5rem; font-family: var(--sans); font-size: 1.0625rem; max-width: 60rem; }
.brief-box p { margin: 0; }

/* Footer */
.site-foot { background: var(--green); color: #d9e0d8; font-family: var(--sans); font-size: 1rem; line-height: 1.55; margin-top: 0; }
.site-foot .wrap { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr); gap: 2rem; padding-top: 3rem; padding-bottom: 2rem; }
.site-foot a { color: var(--white); }
.site-foot .foot-name { font-family: var(--serif); font-weight: 600; font-size: 1.35rem; color: var(--white); margin-bottom: .4rem; }
.site-foot ul { list-style: none; margin: 0; padding: 0; }
.site-foot li { margin-bottom: .35rem; }
.site-foot .fine { grid-column: 1 / -1; border-top: 1px solid rgba(242, 241, 232, .22); padding-top: 1.25rem; margin-top: .5rem; font-size: .9375rem; color: #b9c5bc; }
.site-foot p { margin: 0 0 .4rem; }

/* Responsive */
@media (max-width: 860px) {
  .opening .wrap, .market-grid, .about-strip .wrap, .split, .request .wrap { grid-template-columns: minmax(0, 1fr); }
  .opening .photo { aspect-ratio: 3 / 2; order: -1; }
  .pubs, .principles, .reasons { grid-template-columns: minmax(0, 1fr); }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpis div:nth-child(3) { border-left: 0; padding-left: 0; }
  .kpis div:nth-child(n+3) { border-top: 1px solid var(--rule); }
  .site-foot .wrap { grid-template-columns: minmax(0, 1fr); }
  .contents li { grid-template-columns: minmax(0, 1fr); gap: .25rem; }
  .wide-photo { aspect-ratio: 3 / 2; }
}
@media (max-width: 560px) {
  body { font-size: 1.125rem; }
  .nav { gap: 1.25rem; }
  .dates li { grid-template-columns: minmax(0, 1fr); gap: .2rem; }
  .mini-row { grid-template-columns: 5.5rem repeat(12, minmax(0, 1fr)); }
}

@media print {
  .masthead { border-top: 0; }
  .nav, .skip, .actions .btn { display: none; }
  .site-foot { background: none; color: var(--ink); }
  .site-foot a { color: var(--ink); }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
