/* ComplyJapan — 新粗野主义 × 柔秋绿 */
:root {
  --bg: #f7f5f0;
  --paper: #ffffff;
  --ink: #0e0e12;
  --ink-2: #3a3a40;
  --muted: #6b6b70;
  --green: #b8cc8a;        /* 柔秋绿：高亮填充 */
  --green-deep: #5f7a3e;   /* 柔秋绿：文字/链接 */
  --green-pale: #e4ecd0;   /* 标签底色 */
  --warm: #f1dcc0;         /* 秋叶暖色标签 */
  --rust: #b4532f;
  --rust-pale: #f6dccf;
  --bw: 2px;
  --sh: 4px 4px 0 var(--ink);
  --sh-sm: 3px 3px 0 var(--ink);
  --font: -apple-system, "system-ui", "PingFang SC", "Hiragino Sans", "Noto Sans SC", "Noto Sans JP", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #15160f; --paper: #1e2018; --ink: #eeede6; --ink-2: #c9c8bf; --muted: #9a998f;
    --green: #8fa765; --green-deep: #c0d695; --green-pale: #2d3522; --warm: #3d3222;
    --rust: #e08a66; --rust-pale: #3a2620;
  }
}
:root[data-theme="dark"] {
  --bg: #15160f; --paper: #1e2018; --ink: #eeede6; --ink-2: #c9c8bf; --muted: #9a998f;
  --green: #8fa765; --green-deep: #c0d695; --green-pale: #2d3522; --warm: #3d3222;
  --rust: #e08a66; --rust-pale: #3a2620;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 15.5px; line-height: 1.85; -webkit-font-smoothing: antialiased; }
a { color: var(--green-deep); font-weight: 600; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 2px; }

.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 8px; background: var(--ink); color: var(--bg); padding: 6px 12px; z-index: 99; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 24px; }

/* ========== Header ========== */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--bg); border-bottom: var(--bw) solid var(--ink); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand-mark { width: 40px; height: 40px; flex: none; }
.brand-mark .lg-sh { fill: var(--ink); }
.brand-mark .lg-c { fill: var(--green); stroke: var(--ink); stroke-width: 2.5; }
.brand-mark .lg-k { fill: none; stroke: #0e0e12; stroke-width: 4.5; stroke-linecap: square; }
.site-footer .brand-mark .lg-sh { fill: var(--green); opacity: .35; }
.site-footer .brand-mark .lg-c { stroke: var(--bg); }
.brand-name em { font-style: normal; color: var(--green-deep); }
.site-footer .brand-name em { color: var(--green); }
.brand-name { font-weight: 900; font-size: 19px; letter-spacing: .3px; }
.brand-tag { display: block; font-size: 11.5px; color: var(--muted); line-height: 1.2; font-weight: 600; }
.nav { display: flex; gap: 6px; align-items: center; }
.nav a { color: var(--ink); padding: 5px 14px; border-radius: 999px; font-size: 15px; font-weight: 800; border: var(--bw) solid transparent; }
.nav a:hover { border-color: var(--ink); text-decoration: none; }
.nav a[aria-current] { background: var(--ink); color: var(--green); }
.theme-btn { border: var(--bw) solid var(--ink); background: var(--paper); color: var(--ink); border-radius: 999px; width: 34px; height: 34px; cursor: pointer; font: inherit; font-weight: 800; }

/* ========== Breadcrumb ========== */
.crumbs { font-size: 13px; color: var(--muted); padding: 20px 0 0; font-weight: 600; }
.crumbs a { color: var(--muted); }
.crumbs span { margin: 0 6px; }

/* ========== Labels / chips ========== */
.eyebrow, .kicker { display: inline-block; font-family: var(--mono); font-size: 12.5px; font-weight: 700; border: var(--bw) solid var(--ink); background: var(--paper); padding: 1px 10px; letter-spacing: .3px; color: var(--ink); }
.chip { display: inline-block; background: var(--green-pale); color: var(--ink); border: 1.5px solid var(--ink); padding: 0 10px; border-radius: 999px; font-size: 12.5px; font-weight: 700; line-height: 1.7; width: fit-content; }
.chip.warm { background: var(--warm); }

/* ========== Article layout ========== */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 44px; padding: 12px 0 64px; }
.article-head h1 { font-size: 38px; line-height: 1.3; margin: 14px 0 14px; font-weight: 900; letter-spacing: .2px; }
.meta { display: flex; flex-wrap: wrap; gap: 8px 14px; font-size: 13.5px; color: var(--muted); align-items: center; font-weight: 600; }
.lead { font-size: 16.5px; color: var(--ink-2); margin: 18px 0 0; }

.cover { margin: 28px 0 8px; border: var(--bw) solid var(--ink); box-shadow: var(--sh); background: var(--green); color: #0e0e12; padding: 26px 26px 24px; }
.cover-title { font-size: 22px; font-weight: 900; margin: 0 0 16px; }
.cover-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.cover-cards div { background: #fff; border: var(--bw) solid #0e0e12; padding: 10px 14px; font-size: 14px; line-height: 1.5; font-weight: 600; }
.cover-cards b { display: block; font-size: 20px; font-weight: 900; margin-bottom: 2px; }

/* ========== Prose ========== */
.prose h2 { font-size: 26px; font-weight: 900; margin: 52px 0 14px; line-height: 1.4; }
.prose h2 .num { display: block; width: fit-content; font-family: var(--mono); font-size: 12px; font-weight: 700; background: var(--ink); color: var(--green); padding: 1px 8px; margin-bottom: 8px; letter-spacing: .5px; }
.prose h3 { font-size: 18px; font-weight: 800; margin: 28px 0 6px; padding-left: 10px; border-left: 5px solid var(--green); line-height: 1.5; }
.prose p { margin: 12px 0; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin: 4px 0; }
.prose li::marker { color: var(--ink); font-weight: 800; }
.prose strong { font-weight: 800; background: linear-gradient(transparent 58%, var(--green) 58%); color: var(--ink); }

.table-wrap { overflow-x: auto; margin: 18px 0; border: var(--bw) solid var(--ink); box-shadow: var(--sh); background: var(--paper); }
table { border-collapse: collapse; width: 100%; font-size: 14px; line-height: 1.65; }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1.5px solid var(--ink); vertical-align: top; }
th { background: var(--ink); color: var(--bg); font-weight: 800; white-space: nowrap; font-size: 13px; }
td:first-child { font-weight: 800; }
tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: var(--green-pale); }

.callout { border: var(--bw) solid var(--ink); box-shadow: var(--sh); padding: 16px 20px; margin: 22px 0; background: var(--paper); }
.callout-title { font-weight: 900; font-size: 14px; margin-bottom: 4px; display: inline-block; font-family: var(--mono); letter-spacing: .5px; }
.callout.key { background: var(--green); color: #0e0e12; }
.callout.key strong { background: #fff; }
.callout.warn { background: var(--rust-pale); }
.callout.warn .callout-title { color: var(--rust); }
.callout.note { background: var(--warm); }
.callout p:first-of-type { margin-top: 4px; }
.callout :last-child { margin-bottom: 0; }

/* Checklist */
.checklist { list-style: none; padding: 0 !important; margin: 16px 0; background: var(--paper); border: var(--bw) solid var(--ink); box-shadow: var(--sh); }
.checklist li { display: flex; gap: 12px; padding: 12px 16px; border-bottom: 1.5px solid var(--ink); margin: 0 !important; align-items: flex-start; }
.checklist li:last-child { border-bottom: none; }
.checklist li:has(input:checked) { background: var(--green-pale); }
.checklist li:has(input:checked) label { text-decoration: line-through; text-decoration-thickness: 2px; color: var(--muted); }
.checklist input { appearance: none; margin-top: 5px; width: 18px; height: 18px; flex: none; border: var(--bw) solid var(--ink); background: var(--paper); cursor: pointer; display: grid; place-items: center; }
.checklist input:checked { background: var(--ink); }
.checklist input:checked::after { content: "✓"; color: var(--green); font-size: 13px; font-weight: 900; line-height: 1; }
.checklist label { cursor: pointer; font-weight: 600; }
.checklist .rid { margin-left: auto; font-size: 11.5px; font-family: var(--mono); font-weight: 700; white-space: nowrap; border: 1.5px solid var(--ink); padding: 0 6px; height: fit-content; margin-top: 3px; background: var(--bg); }
.progress { font-size: 14px; font-weight: 700; margin-top: -4px; }
.progress b { background: var(--ink); color: var(--green); padding: 1px 8px; font-family: var(--mono); }

.law-list li { margin: 8px 0; }

.faq details { background: var(--paper); border: var(--bw) solid var(--ink); padding: 2px 18px; margin: 0 0 -2px; }
.faq details[open] { background: var(--green-pale); }
.faq summary { cursor: pointer; font-weight: 800; padding: 12px 0; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::after { content: "+"; font-size: 22px; line-height: 1; font-weight: 900; }
.faq details[open] summary::after { content: "−"; }
.faq summary::-webkit-details-marker { display: none; }
.faq { border-bottom: 0; box-shadow: var(--sh); margin-bottom: 4px; }

.tags { display: flex; gap: 8px; flex-wrap: wrap; margin: 44px 0 0; padding-top: 24px; border-top: var(--bw) solid var(--ink); }
.tags a { font-size: 13px; color: var(--ink); background: var(--paper); border: 1.5px solid var(--ink); padding: 1px 12px; border-radius: 999px; font-weight: 700; }
.tags a:hover { background: var(--green); text-decoration: none; }

.disclaimer { margin-top: 24px; font-size: 13px; color: var(--muted); border: 1.5px dashed var(--ink); padding: 14px 18px; line-height: 1.7; }
.note-sm { font-size: 13px; color: var(--muted); }

/* ========== TOC ========== */
.toc { position: sticky; top: 84px; align-self: start; font-size: 14px; }
.toc-box { background: var(--paper); border: var(--bw) solid var(--ink); box-shadow: var(--sh); }
.toc-label { font-family: var(--mono); font-size: 12px; font-weight: 700; background: var(--ink); color: var(--green); padding: 6px 14px; letter-spacing: 1px; }
.toc ol { list-style: none; margin: 0; padding: 8px 0; counter-reset: t; }
.toc li { counter-increment: t; }
.toc a { display: flex; gap: 8px; color: var(--ink); padding: 5px 14px; line-height: 1.5; font-weight: 600; }
.toc a::before { content: counter(t, decimal-leading-zero); font-family: var(--mono); font-size: 11.5px; color: var(--muted); padding-top: 2px; }
.toc a:hover { text-decoration: none; background: var(--green-pale); }
.toc a.active { background: var(--green); color: #0e0e12; font-weight: 800; }
.toc a.active::before { color: #0e0e12; }
.side-cta { margin-top: 18px; background: var(--ink); color: var(--bg); border: var(--bw) solid var(--ink); box-shadow: 4px 4px 0 var(--green); padding: 18px; }
.side-cta b { display: block; font-size: 15px; margin-bottom: 4px; font-weight: 900; }
.side-cta p { margin: 0 0 14px; font-size: 13px; opacity: .85; line-height: 1.65; }

.btn { display: inline-block; background: var(--green); color: #0e0e12; font-weight: 900; font-size: 14px; padding: 7px 16px; border: var(--bw) solid var(--ink); box-shadow: var(--sh-sm); transition: transform .1s, box-shadow .1s; }
.side-cta .btn { border-color: var(--bg); box-shadow: 3px 3px 0 var(--bg); }
.btn:hover { text-decoration: none; transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }

/* ========== Cards ========== */
.section-title { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin: 0 0 18px; flex-wrap: wrap; }
.section-title h2 { font-size: 28px; font-weight: 900; margin: 0; }
.section-title > span, .section-title > a { font-size: 14px; font-weight: 700; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card { background: var(--paper); border: var(--bw) solid var(--ink); box-shadow: var(--sh); color: var(--ink); display: flex; flex-direction: column; transition: transform .12s, box-shadow .12s; font-weight: 400; }
a.card[href]:hover { text-decoration: none; transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.card-thumb { padding: 14px 16px; border-bottom: var(--bw) solid var(--ink); display: flex; justify-content: space-between; align-items: center; font-family: var(--mono); font-size: 12px; font-weight: 700; color: #0e0e12; }
.t1 { background: var(--green); } .t2 { background: #e7d6b4; } .t3 { background: #cddcb5; }
.t4 { background: #d9d2a6; } .t5 { background: #ecc9ae; } .t6 { background: #a9bf91; }
.card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-body h3 { margin: 0; font-size: 16px; line-height: 1.55; font-weight: 800; }
.card-meta { font-size: 12.5px; color: var(--muted); margin-top: auto; font-weight: 600; }
.card.draft { background: var(--bg); box-shadow: none; border-style: dashed; }
.card.draft .card-thumb { background: transparent; border-bottom-style: dashed; color: var(--muted); }
.card.draft h3 { color: var(--ink-2); }
.badge { font-family: var(--mono); font-size: 11px; border: 1.5px solid currentColor; padding: 0 6px; }
.related { padding: 52px 0 68px; border-top: var(--bw) solid var(--ink); }

/* ========== Home ========== */
.hero { padding-top: 52px; padding-bottom: 28px; }
.hero h1 { font-size: 50px; line-height: 1.2; margin: 16px 0 16px; font-weight: 900; letter-spacing: .5px; }
.hero h1 em { font-style: normal; background: var(--green); padding: 0 6px; border: var(--bw) solid var(--ink); box-shadow: var(--sh-sm); display: inline-block; line-height: 1.15; color: #0e0e12; }
.hero p { font-size: 16.5px; color: var(--ink-2); max-width: 680px; margin: 0; }
.hero-actions { display: flex; gap: 12px; margin: 22px 0 0; flex-wrap: wrap; }
.btn.ghost { background: var(--paper); color: var(--ink); }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin: 32px 0 0; }
.stat { background: var(--paper); border: var(--bw) solid var(--ink); box-shadow: var(--sh); padding: 14px 18px; }
.stat.hl { background: var(--green); color: #0e0e12; }
.stat small { font-size: 13px; font-weight: 600; display: block; }
.stat b { font-size: 34px; font-weight: 900; line-height: 1.25; display: block; }
.stat span { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.stat.hl span { color: #2c3a1a; }

.questions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin: 0; border: var(--bw) solid var(--ink); box-shadow: var(--sh); background: var(--paper); }
.questions div { padding: 16px 18px; border-right: var(--bw) solid var(--ink); font-weight: 700; }
.questions div:last-child { border-right: 0; }
.questions b { font-family: var(--mono); font-size: 12px; background: var(--ink); color: var(--green); padding: 1px 8px; display: inline-block; margin-bottom: 6px; }
.questions span { display: block; font-size: 16px; }

.cats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.cat { background: var(--paper); border: var(--bw) solid var(--ink); padding: 12px 14px; color: var(--ink); transition: transform .1s, box-shadow .1s; }
.cat:hover { text-decoration: none; background: var(--green); color: #0e0e12; box-shadow: var(--sh); transform: translate(-2px, -2px); }
.cat:hover small { color: #2c3a1a; }
.cat b { display: block; font-size: 15.5px; font-weight: 900; }
.cat small { color: var(--muted); font-size: 12.5px; line-height: 1.5; display: block; margin-top: 4px; font-weight: 600; }
.cat i { font-style: normal; font-family: var(--mono); font-size: 11.5px; font-weight: 700; border: 1.5px solid currentColor; padding: 0 6px; float: right; }
.block { padding-top: 40px; padding-bottom: 40px; }

.filter { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 22px; }
.filter button { font: inherit; font-size: 14px; font-weight: 800; border: var(--bw) solid var(--ink); background: var(--paper); color: var(--ink); padding: 2px 14px; border-radius: 999px; cursor: pointer; }
.filter button:hover { background: var(--green-pale); }
.filter button.on { background: var(--ink); color: var(--green); }

/* ========== Footer ========== */
.site-footer { background: var(--ink); color: var(--bg); padding: 44px 0 28px; font-size: 14px; }
.site-footer .brand { color: var(--bg); }
.site-footer p { opacity: .75; }
.foot-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; }
.foot-grid h4 { font-family: var(--mono); font-size: 12px; color: var(--green); margin: 0 0 10px; letter-spacing: 1px; }
.foot-grid ul { list-style: none; padding: 0; margin: 0; }
.foot-grid li { margin: 6px 0; }
.foot-grid a { color: var(--bg); font-weight: 600; }
.foot-bottom { margin-top: 32px; padding-top: 18px; border-top: 1.5px solid color-mix(in srgb, var(--bg) 25%, transparent); font-size: 12.5px; opacity: .65; line-height: 1.7; }

@media (max-width: 960px) {
  .layout { grid-template-columns: 1fr; gap: 0; }
  .toc { position: static; order: -1; margin: 20px 0 4px; }
  .side-cta { display: none; }
  .cats { grid-template-columns: repeat(2, 1fr); }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 620px) {
  .wrap { padding: 0 16px; }
  .brand-tag, .nav a.hide-sm { display: none; }
  .article-head h1 { font-size: 27px; }
  .hero h1 { font-size: 34px; }
  .cover { padding: 18px; }
  .cover-cards, .cards { grid-template-columns: 1fr; }
  .questions { grid-template-columns: 1fr; }
  .questions div { border-right: 0; border-bottom: var(--bw) solid var(--ink); }
  .questions div:last-child { border-bottom: 0; }
  .checklist .rid { display: none; }
  .stat b { font-size: 26px; }
}

/* ========== Logo img + language switcher ========== */
img.brand-mark { width: 40px; height: 40px; display: block; border-radius: 10px; }
.lang { position: relative; }
.lang summary { list-style: none; cursor: pointer; border: var(--bw) solid var(--ink); border-radius: 999px; padding: 2px 30px 2px 14px; font-weight: 800; font-size: 14px; background: var(--paper); position: relative; line-height: 1.8; white-space: nowrap; }
.lang summary::-webkit-details-marker { display: none; }
.lang summary::after { content: ""; position: absolute; right: 12px; top: 50%; width: 6px; height: 6px; border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink); transform: translateY(-70%) rotate(45deg); }
.lang[open] summary { background: var(--ink); color: var(--green); }
.lang[open] summary::after { border-color: var(--green); }
.lang > div { position: absolute; right: 0; top: calc(100% + 8px); background: var(--paper); border: var(--bw) solid var(--ink); box-shadow: var(--sh); min-width: 130px; z-index: 60; }
.lang > div a { display: block; padding: 8px 14px; color: var(--ink); font-weight: 700; font-size: 14px; border-bottom: 1.5px solid var(--ink); }
.lang > div a:last-child { border-bottom: 0; }
.lang > div a:hover { background: var(--green-pale); text-decoration: none; }
.lang > div a[aria-current] { background: var(--green); color: #0e0e12; }
.nav .lang > div a { border-radius: 0; border: 0; border-bottom: 1.5px solid var(--ink); padding: 8px 14px; background: var(--paper); color: var(--ink); }
.nav .lang > div a:last-child { border-bottom: 0; }
.nav .lang > div a:hover { background: var(--green-pale); }
.nav .lang > div a[aria-current] { background: var(--green); color: #0e0e12; }
