/* CryptoTaxWiki: kiểu Swiss tối giản, dễ đọc, ít màu. Mọi màu là biến, có sáng/tối (xem design-system/cryptotaxwiki/MASTER.md). */
:root {
  --bg: #f6f7f5; --surface: #ffffff; --sunk: #eef1ee; --fg: #111a1c; --muted: #4f5d64; --line: #dbe2de;
  --accent: #0d6b59; --accent-soft: #e5f2ee; --cta: #0f766e; --on-cta: #ffffff;
  --ok: #0d6b59; --ok-soft: #e5f2ee; --warn: #8a5300; --warn-soft: #fbf0dc; --err: #b42318;
  --radius: 12px; --mono: 'IBM Plex Mono', ui-monospace, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --bg: #0b1416; --surface: #111d20; --sunk: #16252a; --fg: #e6eeee; --muted: #9fb2b6; --line: #24383d; --accent: #5ad3b8; --accent-soft: #0f2a26; --cta: #3cc0a3; --on-cta: #04201b; --ok: #5ad3b8; --ok-soft: #0f2a26; --warn: #f2b84b; --warn-soft: #2e230f; --err: #ff8a80; color-scheme: dark; }
}
:root[data-theme="dark"] { --bg: #0b1416; --surface: #111d20; --sunk: #16252a; --fg: #e6eeee; --muted: #9fb2b6; --line: #24383d; --accent: #5ad3b8; --accent-soft: #0f2a26; --cta: #3cc0a3; --on-cta: #04201b; --ok: #5ad3b8; --ok-soft: #0f2a26; --warn: #f2b84b; --warn-soft: #2e230f; --err: #ff8a80; color-scheme: dark; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 17px/1.65 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 8px; background: var(--surface); padding: 8px 12px; z-index: 10; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
code { font-family: var(--mono); font-size: 0.88em; background: var(--sunk); padding: 1px 5px; border-radius: 5px; }

/* đầu trang */
.hd { border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 90%, transparent); position: sticky; top: 0; backdrop-filter: blur(8px); z-index: 5; }
.hd-in { display: flex; align-items: center; justify-content: space-between; min-height: 60px; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--fg); text-decoration: none; font-weight: 700; letter-spacing: -0.01em; font-size: 18px; }
.brand svg { width: 28px; height: 28px; flex: none; }
.brand .l1 { fill: #0f766e; } .brand .l3 { fill: #ffffff; } .brand .l2 { stroke: #0f766e; }
.hd nav { display: flex; align-items: center; gap: 2px; }
.hd nav a { color: var(--muted); text-decoration: none; font-weight: 600; font-size: 15px; padding: 10px; border-radius: 8px; }
.hd nav a:hover, .hd nav a[aria-current] { color: var(--fg); background: var(--sunk); }
.theme { width: 44px; height: 44px; border: 0; background: transparent; color: var(--muted); border-radius: 8px; cursor: pointer; display: grid; place-items: center; }
.theme:hover { background: var(--sunk); color: var(--fg); }
.theme svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; }
@media (max-width: 640px) {
  .brand span { display: none; }
  .hd nav a { padding: 10px 8px; font-size: 14.5px; }
}
@media (max-width: 440px) { .hd nav a[href="/about/"] { display: none; } .hd nav a { padding: 10px 6px; } .theme { width: 40px; } }

/* trang chủ */
.hero { padding: 56px 0 20px; max-width: 780px; }
.kicker { font: 600 12.5px/1 var(--mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent); margin: 0 0 14px; }
.hero h1 { font-size: clamp(32px, 6vw, 50px); line-height: 1.1; letter-spacing: -0.025em; margin: 0 0 16px; }
.lead { font-size: 19px; color: var(--muted); margin: 0; }
.section { padding: 26px 0; }
.section > h2, .related > h2 { font-size: 23px; letter-spacing: -0.01em; margin: 0 0 12px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.card { display: flex; flex-direction: column; gap: 8px; padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--fg); transition: border-color .2s; }
.card:hover { border-color: var(--accent); }
.card strong { font-size: 18px; line-height: 1.3; }
.card span:last-child { color: var(--muted); font-size: 15px; line-height: 1.5; }
.tag { align-self: flex-start; font: 600 11.5px/1 var(--mono); text-transform: uppercase; letter-spacing: 0.06em; color: var(--accent); background: var(--accent-soft); padding: 5px 8px; border-radius: 6px; }
.tag.ok { color: var(--ok); background: var(--ok-soft); }
.chips-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.ex { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; min-height: 44px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--fg); text-decoration: none; transition: border-color .2s; }
.ex:hover { border-color: var(--accent); }
.ex strong { font-size: 16.5px; }
.ex span { color: var(--muted); font-size: 13.5px; line-height: 1.4; }
.feature { display: flex; flex-wrap: wrap; gap: 16px 24px; align-items: center; justify-content: space-between; padding: 22px 24px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.feature h2 { margin: 10px 0 6px; font-size: 22px; } .feature p { margin: 0; color: var(--muted); max-width: 620px; }
.principles ul { padding-left: 20px; max-width: 780px; }
.principles li { margin: 8px 0; }
.trust { list-style: none; padding: 0; margin: 22px 0 0; display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 14.5px; color: var(--muted); }
.trust li::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); margin-right: 8px; vertical-align: middle; }
.page-head { max-width: 780px; padding: 10px 0 8px; }
.page-head h1 { font-size: clamp(30px, 5vw, 42px); line-height: 1.12; letter-spacing: -0.02em; margin: 6px 0 12px; }

/* nút */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 18px; border-radius: 10px; font-weight: 600; text-decoration: none; border: 1px solid var(--line); color: var(--fg); background: var(--surface); transition: border-color .2s, filter .2s; cursor: pointer; font: inherit; font-weight: 600; }
.btn:hover { border-color: var(--accent); }
.btn.primary { background: var(--cta); color: var(--on-cta); border-color: transparent; }
.btn.primary:hover { filter: brightness(1.08); }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 18px 0 0; }
.note, .small { font-size: 13.5px; color: var(--muted); }

/* bài viết */
.crumb { font-size: 14px; color: var(--muted); padding: 22px 0 0; }
.crumb a { color: var(--muted); }
.prose { max-width: 720px; padding: 8px 0 28px; }
.prose.wide { max-width: 860px; }
.prose h1 { font-size: clamp(30px, 5vw, 40px); line-height: 1.15; letter-spacing: -0.02em; margin: 10px 0 10px; }
.prose h2 { font-size: 25px; line-height: 1.25; letter-spacing: -0.01em; margin: 40px 0 10px; scroll-margin-top: 76px; }
.prose h3 { font-size: 19px; margin: 26px 0 6px; scroll-margin-top: 76px; }
.prose p, .prose li { overflow-wrap: anywhere; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li + li { margin-top: 6px; }
.meta { color: var(--muted); font-size: 14px; margin: 0 0 16px; }
.disclosure { font-size: 14px; color: var(--muted); border-left: 3px solid var(--line); padding: 2px 0 2px 12px; margin: 0 0 18px; }
.disclaimer { font-size: 14px; color: var(--muted); margin-top: 28px; }
.toc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 18px; margin: 0 0 24px; font-size: 15px; }
.toc summary { cursor: pointer; font-weight: 600; min-height: 32px; }
.toc ol { margin: 8px 0 4px; }
.callout { margin: 22px 0; padding: 14px 18px; background: var(--accent-soft); border-left: 4px solid var(--accent); border-radius: 8px; }
.callout.warn { background: var(--warn-soft); border-left-color: var(--warn); }
.tbl { overflow-x: auto; margin: 18px 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.tbl table { border-collapse: collapse; width: 100%; font-size: 15px; line-height: 1.45; }
.tbl th, .tbl td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl th { font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); background: var(--sunk); }
.tbl tr:last-child td { border-bottom: 0; }
.sources { font-size: 15px; } .sources li { overflow-wrap: anywhere; }
.author { margin-top: 24px; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); font-size: 15px; }
.author p { margin: 6px 0 0; color: var(--muted); }
.related { border-top: 1px solid var(--line); padding: 28px 0 40px; }
.prose pre { background: var(--sunk); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; overflow-x: auto; font: 14px/1.55 var(--mono); }
.prose pre code { background: none; padding: 0; }
.prose figure { margin: 22px 0; }
.prose figure img { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: 10px; }
.prose figcaption { font-size: 14px; color: var(--muted); margin-top: 8px; }

/* nút phần mềm thuế (CTA) và form email */
.cta-box, .nl-box { margin: 28px 0; padding: 20px 22px; border-radius: 14px; border: 1px solid color-mix(in srgb, var(--cta) 40%, var(--line)); background: var(--accent-soft); }
.cta-box strong, .nl-box strong { font-size: 19px; display: block; }
.cta-box p, .nl-box p { margin: 6px 0 0; }
.cta-box .cta-row { margin-top: 14px; }
.nl-box { max-width: 860px; background: var(--surface); border-color: var(--line); }
.nl { margin-top: 14px; }
.nl-row { display: flex; flex-wrap: wrap; gap: 10px; }
.nl input[type=email] { flex: 1 1 240px; min-height: 44px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--fg); font: inherit; }
.nl input[type=email]:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.consent { display: flex; gap: 10px; align-items: flex-start; margin-top: 12px; font-size: 14px; color: var(--muted); cursor: pointer; }
.consent input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--accent); flex: none; }
.hp { position: absolute; left: -9999px; }

/* máy tính thuế */
.calc { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; margin: 18px 0; }
@media (max-width: 760px) { .calc { grid-template-columns: 1fr; } }
.calc form, .calc .out { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; }
.field { margin: 0 0 14px; }
.field label, .field .lbl { display: block; font-weight: 600; font-size: 15px; margin-bottom: 4px; }
.field .hint { display: block; font-size: 13.5px; color: var(--muted); margin-top: 4px; }
.field input[type=text], .field select { width: 100%; min-height: 44px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--fg); font: inherit; font-variant-numeric: tabular-nums; }
.field input:focus, .field select:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.money { position: relative; } .money::before { content: "$"; position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.money input[type=text] { padding-left: 24px; }
.radio-row { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.radio-row label { display: flex; align-items: center; gap: 8px; min-height: 40px; font-weight: 500; cursor: pointer; }
.radio-row input { width: 18px; height: 18px; accent-color: var(--accent); }
.out h2 { margin: 0 0 6px; font-size: 20px; }
.big { font: 600 34px/1.15 var(--mono); letter-spacing: -0.02em; margin: 6px 0 2px; font-variant-numeric: tabular-nums; }
.kv { width: 100%; border-collapse: collapse; font-size: 15px; margin-top: 12px; font-variant-numeric: tabular-nums; }
.kv td { padding: 7px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.kv td:last-child { text-align: right; font-family: var(--mono); font-size: 14.5px; white-space: nowrap; padding-left: 12px; }
.kv tr.total td { font-weight: 700; border-bottom: 0; }
.err-msg { color: var(--err); font-size: 14px; margin-top: 4px; }
.bar { display: flex; height: 12px; border-radius: 6px; overflow: hidden; background: var(--sunk); margin: 12px 0 4px; }
.bar span { display: block; height: 100%; }
.bar .b0 { background: #9fb2b6; } .bar .b15 { background: #3cc0a3; } .bar .b20 { background: #0f766e; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }

/* checklist (in ra PDF được) */
.check { list-style: none; padding-left: 0 !important; }
.check li { position: relative; padding-left: 32px; }
.check li::before { content: ""; position: absolute; left: 0; top: 4px; width: 18px; height: 18px; border: 2px solid var(--accent); border-radius: 4px; }

/* chân trang */
.ft { border-top: 1px solid var(--line); background: var(--surface); margin-top: 24px; }
.ft-in { display: grid; grid-template-columns: 1fr 2fr; gap: 24px; padding-top: 28px; padding-bottom: 36px; font-size: 14.5px; color: var(--muted); }
.ft strong { color: var(--fg); }
.ft p { margin: 0 0 8px; }
.ft a { color: var(--muted); }
@media (max-width: 720px) { .ft-in { grid-template-columns: 1fr; } .hero { padding-top: 36px; } body { font-size: 16.5px; } .lead { font-size: 18px; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
@media print {
  .hd, .ft, .nl-box, .cta-box, .toc, .crumb, .related, .author, .no-print { display: none !important; }
  body { background: #fff; color: #000; font-size: 12pt; }
  .prose { max-width: none; }
  a { color: #000; text-decoration: none; }
}
.page-crypto-tax-checklist ul { list-style: none; padding-left: 0; }
.page-crypto-tax-checklist ul li { position: relative; padding-left: 32px; }
.page-crypto-tax-checklist ul li::before { content: ""; position: absolute; left: 0; top: 4px; width: 18px; height: 18px; border: 2px solid var(--accent); border-radius: 4px; }
.cta-banner { display: block; margin: -4px 0 14px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); }
.cta-banner img { display: block; width: 100%; height: auto; }
.cta-box .promo { margin-top: 12px; font-size: 14.5px; }
.cta-box .promo code { font-size: 15px; font-weight: 600; background: var(--surface); border: 1px dashed var(--accent); padding: 2px 8px; }
