:root {
  --paper: #f5efe1;
  --paper-deep: #f0e9d8;
  --ink: #43302b;
  --forest: #064f49;
  --teal: #14b8a6;
  --line: #e6dcc4;
  --muted: #8a7969;
  --gold: #c9822b;
  --serif: "Source Han Serif SC", "Source Han Serif CN", "思源宋体", "Noto Serif CJK SC", "Songti SC", serif;
  --sans: "Source Han Sans SC", "Source Han Sans CN", "思源黑体", "Noto Sans CJK SC", "PingFang SC", sans-serif;
}

* { box-sizing: border-box; }
html { background: linear-gradient(rgba(190,175,150,.18) 1px, transparent 1px), linear-gradient(90deg, rgba(190,175,150,.18) 1px, transparent 1px), var(--paper); background-size: 40px 40px, 40px 40px, auto; }
body { margin: 0; min-height: 100vh; background: linear-gradient(180deg, rgba(253,251,247,.72), rgba(245,239,225,.96)); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.55; }
a { color: inherit; }
.site-header, main, footer { width: min(1200px, calc(100% - 40px)); margin: 0 auto; }
.site-header { display: flex; align-items: center; justify-content: space-between; min-height: 76px; border-bottom: 1px solid var(--line); }
.wordmark { color: var(--forest); font: 700 14px/1 var(--sans); text-decoration: none; letter-spacing: .08em; }
.wordmark span { color: var(--muted); font-weight: 500; }
.source-link { color: var(--forest); font-size: 13px; text-underline-offset: 4px; }
.hero { padding: clamp(72px, 12vw, 150px) 0 clamp(72px, 9vw, 110px); max-width: 900px; }
.eyebrow { color: var(--teal); font-size: 11px; font-weight: 700; letter-spacing: .15em; margin: 0 0 20px; }
h1, h2 { font-family: var(--serif); font-weight: 500; line-height: .98; letter-spacing: -.045em; margin: 0; text-wrap: pretty; }
h1 { font-size: clamp(53px, 9vw, 118px); color: var(--forest); }
h1 em { color: var(--gold); font-weight: 400; }
.lede { color: #4b5046; font: 400 clamp(18px, 2.1vw, 23px)/1.6 var(--serif); max-width: 610px; margin: 32px 0 0; }
.directory { border-top: 4px solid var(--forest); padding: 42px 0 90px; }
.directory-intro { display: grid; grid-template-columns: 1fr 2fr; gap: 20px; align-items: end; }
.directory-intro .eyebrow { grid-column: 1 / -1; margin-bottom: 0; }
h2 { font-size: clamp(40px, 5vw, 66px); color: var(--forest); }
.quiet { color: var(--muted); margin: 0; max-width: 500px; }
.filters { display: grid; grid-template-columns: minmax(240px, 1fr) 150px 170px 170px; gap: 10px; margin: 38px 0 18px; }
input, select { appearance: none; width: 100%; background: transparent; border: 1px solid var(--line); border-radius: 0; color: var(--ink); font: 14px var(--sans); min-height: 46px; padding: 0 14px; }
input:focus, select:focus { outline: 2px solid var(--teal); outline-offset: 2px; }
select { background: var(--paper); }
.result-bar { display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; margin-bottom: 8px; }
.company-list { border-top: 1px solid var(--line); }
.company-row { display: grid; grid-template-columns: minmax(190px, 1.4fr) minmax(150px, 1fr) 110px 34px; gap: 16px; align-items: center; width: 100%; padding: 17px 5px; background: transparent; border: 0; border-bottom: 1px solid var(--line); color: var(--ink); cursor: pointer; text-align: left; transition: background .18s ease, padding .18s ease; }
.company-row:hover { background: #ece5d7; padding-left: 12px; }
.company-name { font: 500 19px/1.2 var(--serif); }
.company-category, .company-region { color: var(--muted); font-size: 13px; }
.company-arrow { color: var(--teal); font-size: 22px; text-align: right; }
.tag { display: inline-block; border: 1px solid var(--line); color: var(--muted); font-size: 10px; letter-spacing: .06em; padding: 2px 6px; text-transform: uppercase; }
.detail-panel { position: fixed; z-index: 3; top: 0; right: 0; width: min(570px, 100%); height: 100dvh; overflow: auto; background: #fbf8f1; box-shadow: -18px 0 45px rgba(36,39,30,.14); padding: 82px clamp(28px, 5vw, 64px) 54px; transform: translateX(101%); transition: transform .28s cubic-bezier(.2,.8,.2,1); }
.detail-panel.is-open { transform: translateX(0); }
.backdrop { position: fixed; z-index: 2; inset: 0; background: rgba(26, 31, 25, .28); }
.close-button { position: absolute; top: 22px; right: 24px; width: 44px; height: 44px; border: 1px solid var(--line); background: transparent; color: var(--forest); cursor: pointer; font-size: 28px; }
.detail-head { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: start; }
.detail-logo { width: 62px; height: 62px; object-fit: contain; background: #fffdfa; border: 1px solid var(--line); padding: 8px; }
.detail-kicker { color: var(--teal); font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.detail-title { color: var(--forest); font: 500 clamp(38px, 7vw, 58px)/1.02 var(--serif); letter-spacing: -.04em; margin: 14px 0 24px; overflow-wrap: anywhere; }
.detail-copy { color: #4b5046; font: 18px/1.7 var(--serif); }
.detail-meta { border-top: 1px solid var(--line); margin-top: 32px; padding-top: 20px; }
.detail-meta dt { color: var(--muted); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; margin-top: 16px; }
.detail-meta dd { margin: 4px 0 0; }
.detail-meta a { color: var(--forest); text-underline-offset: 4px; overflow-wrap: anywhere; }
.detail-section { border-top: 1px solid var(--line); margin-top: 28px; padding-top: 24px; }
.detail-section h3 { color: var(--forest); font: 500 22px/1.2 var(--serif); margin: 0 0 12px; }
.detail-section p { margin: 0; color: #4b5046; }
.detail-list, .article-list { list-style: none; margin: 0; padding: 0; }
.detail-list li, .article-list li { border-top: 1px solid rgba(230, 220, 196, .7); padding: 13px 0; }
.detail-list li:first-child, .article-list li:first-child { border-top: 0; padding-top: 0; }
.detail-list span, .detail-list a, .article-list span, .article-list a { color: var(--forest); font-weight: 600; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.detail-list p { color: var(--muted); font-size: 14px; margin-top: 5px; }
.article-list time { display: block; color: var(--muted); font-size: 12px; margin-top: 4px; }
.detail-empty { color: var(--muted); font-size: 14px; }
.empty { padding: 32px 0; color: var(--muted); }
.pagination { display: flex; align-items: center; gap: 10px; justify-content: flex-end; padding-top: 20px; }
.pagination button { min-width: 38px; min-height: 38px; border: 1px solid var(--line); background: transparent; color: var(--forest); cursor: pointer; font: 13px var(--sans); }
.pagination button:not(:disabled):hover { background: var(--forest); color: var(--paper); }
.pagination button:disabled { color: #aaa69c; cursor: not-allowed; }
.page-note { color: var(--muted); font-size: 12px; }
footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; padding: 28px 0 45px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 680px) {
  .site-header, main, footer { width: min(100% - 30px, 1200px); }
  .site-header { min-height: 64px; }
  .wordmark span { display: none; }
  .hero { padding: 74px 0 76px; }
  .directory-intro { display: block; }
  .directory-intro .quiet { margin-top: 18px; }
  .filters { grid-template-columns: 1fr 1fr; }
  .filters label { grid-column: 1 / -1; }
  .company-row { grid-template-columns: 1fr auto; gap: 5px 12px; }
  .company-category { grid-column: 1; }
  .company-region { display: none; }
  .company-arrow { grid-column: 2; grid-row: 1 / 3; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
