/*
Theme Name: Coin Field Notes
Description: 繁體中文加密資產教學與市場觀察。包含精選首頁、文章目錄、分類、搜尋及實用工具。
Version: 1.5.0
Requires at least: 6.4
Requires PHP: 7.4
Text Domain: coin-field-notes
License: GNU General Public License v2 or later
*/
:root {
  --ink: #20221f;
  --muted: #656862;
  --paper: #f7f7f2;
  --white: #fff;
  --line: #e4e5dc;
  --gold: #efd463;
  --deep: #20231f;
  --max: 1216px;
  --radius: 14px;
  --font: "Geist", "Inter", "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", "Noto Sans CJK TC", sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 26px; }
body { margin: 0; color: var(--ink); background: var(--paper); font: 16px/1.65 var(--font); }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
a:hover { color: #65510a; }
button, input, select { font: inherit; }
button, select { cursor: pointer; }
:focus-visible { outline: 3px solid #826800; outline-offset: 4px; }
::selection { background: var(--gold); color: var(--ink); }
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.28; }
.wrap { width: min(calc(100% - 72px), var(--max)); margin-inline: auto; }
.screen-reader-text, .skip-link:not(:focus) { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link:focus { position: absolute; z-index: 9999; inset: 8px auto auto 8px; background: #fff; color: #141512; padding: 12px; }
.site-header { background: var(--white); border-bottom: 1px solid var(--line); }
.header-inner { min-height: 78px; display: flex; align-items: center; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 11px; flex: 0 0 auto; }
.brand-mark { width: 43px; height: 43px; display: grid; place-items: center; border-radius: 12px; background: var(--deep); color: var(--gold); }
.brand-mark::before { display: block; content: "✦"; font-size: 29px; line-height: 1; }
.brand-text { display: grid; line-height: 1.12; }
.brand-name { font-size: 20px; font-weight: 820; letter-spacing: -.065em; }
.brand-sub { margin-top: 4px; font-size: 10px; color: var(--muted); letter-spacing: .16em; }
.site-nav { margin-left: auto; }
.site-nav ul, .footer-links, .language-list { display: flex; gap: 20px; list-style: none; margin: 0; padding: 0; align-items: center; }
.site-nav li { position: relative; }
.site-nav a { display: block; font-size: 14px; white-space: nowrap; font-weight: 650; padding-block: 14px; }
.site-nav .sub-menu { display: none; position: absolute; top: 100%; left: 0; z-index: 5; min-width: 164px; padding: 8px 14px; border: 1px solid var(--line); background: white; border-radius: 9px; }
.site-nav li:hover > .sub-menu, .site-nav li:focus-within > .sub-menu { display: block; }
.site-nav .sub-menu a { padding-block: 8px; }
.header-controls { display: flex; align-items: center; gap: 8px; }
.icon-button { width: 40px; height: 40px; background: white; color: var(--ink); border: 1px solid var(--line); border-radius: 9px; display: grid; place-items: center; }
.search-icon { display: block; width: 14px; height: 14px; border: 2px solid currentColor; border-radius: 50%; position: relative; transform: translate(-2px,-2px); }
.search-icon::after { content: ""; position: absolute; width: 7px; height: 2px; background: currentColor; transform: rotate(45deg); top: 11px; left: 9px; }
.menu-toggle { display: none; font-size: 18px; }
.language-list { gap: 10px; font-size: 12px; }
.header-search { padding: 0 0 18px; }
.search-form { display: flex; gap: 8px; max-width: 600px; }
.search-form input { min-width: 0; width: 100%; padding: 10px 13px; border: 1px solid #c9cbc0; border-radius: 8px; background: #fff; color: var(--ink); }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 15px; color: var(--ink); background: var(--gold); border: 1px solid transparent; border-radius: 8px; font-weight: 760; font-size: 14px; white-space: nowrap; }
.button:hover { color: #151510; background: #f6df7b; }
.button-secondary { background: #fff; border-color: var(--line); }
main { min-height: 55vh; }
.intro { padding-top: 42px; }
.intro p, .archive-heading p { margin-top: 11px; color: var(--muted); }
.intro h1 { font-weight: 820; font-size: clamp(32px, 4.2vw, 54px); letter-spacing: -.055em; }
.topic-links { margin: 23px 0 25px; display: flex; gap: 8px; flex-wrap: wrap; }
.topic-link { background: #fff; border: 1px solid var(--line); border-radius: 7px; color: #383b34; padding: 8px 14px; font-size: 13px; font-weight: 650; white-space: nowrap; }
.topic-link:hover { border-color: #bcb68c; }
.topic-link.is-current { color: #292613; background: var(--gold); border-color: transparent; }
.lead-grid { display: grid; grid-template-columns: minmax(0, 1.57fr) minmax(0, 1fr); gap: 24px; align-items: stretch; }
.feature { position: relative; display: flex; align-items: end; isolation: isolate; min-height: 394px; padding: 35px; overflow: hidden; border-radius: var(--radius); background: #242521; color: white; }
.feature img { z-index: -2; position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 58% 55%; }
.feature::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(12,13,10,.86), rgba(12,13,10,.52) 52%, rgba(12,13,10,.12)), linear-gradient(0deg, rgba(10,11,9,.48), transparent 75%); }
.feature-copy { max-width: 480px; }
.feature .eyebrow { color: #f4dd87; }
.eyebrow { font-size: 12px; font-weight: 750; letter-spacing: .09em; color: #70611d; }
.feature h2 { margin-top: 11px; font-size: clamp(27px, 3.3vw, 43px); font-weight: 820; letter-spacing: -.04em; }
.feature h2 a:hover { color: var(--gold); }
.feature p { max-width: 350px; margin-top: 11px; color: #eeeee4; font-size: 14px; }
.feature .button { margin-top: 22px; }
.recent-panel { padding: 23px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.panel-heading, .section-header { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.panel-heading h2, .section-header h2 { font-size: 22px; font-weight: 790; letter-spacing: -.025em; }
.text-link { font-size: 13px; font-weight: 730; color: #66551a; white-space: nowrap; }
.recent-list { display: grid; margin-top: 9px; }
.recent-item { display: grid; grid-template-columns: 94px 1fr; align-items: center; gap: 13px; padding-block: 13px; border-bottom: 1px solid var(--line); }
.recent-item:last-child { border-bottom: 0; padding-bottom: 0; }
.recent-item .cover { aspect-ratio: 1.38; }
.recent-item h3 { font-size: 15px; font-weight: 760; line-height: 1.42; margin-top: 3px; }
.meta { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 12px; flex-wrap: wrap; }
.meta a, .topic-label { color: #66551a; font-weight: 760; }
.cover { display: block; width: 100%; aspect-ratio: 2 / 1; overflow: hidden; border-radius: 8px; background: #ddd9c8; }
.cover img { width: 100%; height: 100%; object-fit: cover; }
.cover.is-market img { object-position: 74% 44%; }
.action-grid { margin-top: 25px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.action-card { display: flex; gap: 14px; align-items: center; min-height: 104px; border: 1px solid var(--line); border-radius: 12px; padding: 17px 19px; background: #f5ebc3; }
.action-card:nth-child(2) { background: #e7eee5; }
.action-icon { flex: none; width: 43px; height: 43px; background: #fff8df; border-radius: 10px; display: grid; place-items: center; font-size: 24px; font-weight: 750; }
.action-card:nth-child(2) .action-icon { background: #f5fbf2; }
.action-card strong { display: block; font-size: 16px; }
.action-card small { display: block; margin-top: 4px; color: #524f40; font-size: 13px; }
.action-arrow { margin-left: auto; font-weight: 820; }
.section { padding-block: 35px 0; }
.section-header { padding-bottom: 14px; border-bottom: 1px solid #d9dacf; margin-bottom: 15px; }
.article-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 17px; }
.article-card { padding: 11px 11px 14px; background: white; border: 1px solid var(--line); border-radius: 12px; min-width: 0; }
.article-card h3 { font-size: 16px; margin: 5px 0 0; line-height: 1.45; font-weight: 760; }
.article-card .meta { margin-top: 10px; }
.article-card .cover:focus-visible { outline-offset: 2px; }
.home-main { padding-bottom: 55px; }
.archive-heading { padding: 34px 0 22px; }
.archive-heading h1 { margin-top: 9px; font-size: clamp(28px, 4.3vw, 47px); letter-spacing: -.045em; }
.archive-content { padding-bottom: 45px; }
.archive-content .topic-links { margin-top: 0; }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; color: var(--muted); font-size: 12px; }
.breadcrumbs a:hover { text-decoration: underline; }
.article-layout { display: grid; gap: 28px; grid-template-columns: minmax(0, 2.38fr) minmax(240px, 1fr); padding-block: 30px 50px; align-items: start; }
.article-shell, .article-sidebar { min-width: 0; border: 1px solid var(--line); background: white; border-radius: 13px; }
.article-shell { padding: clamp(17px, 3.7vw, 38px); }
.article-shell h1 { margin: 12px 0; font-size: clamp(26px, 4.05vw, 45px); font-weight: 820; letter-spacing: -.045em; }
.article-shell .meta { margin-bottom: 15px; }
.article-shell .article-hero { margin-block: 18px 21px; }
.article-sidebar { padding: 19px; }
.article-sidebar h2 { font-size: 17px; margin: 0 0 10px; }
.article-sidebar li { padding-block: 9px; list-style: none; border-top: 1px solid var(--line); font-size: 14px; }
.article-sidebar ul { padding: 0; margin: 0; }
.article-sidebar .topic-links { margin: 9px 0 0; }
.entry-content { overflow-wrap: anywhere; color: #2c2e29; line-height: 1.82; }
.entry-content > * + * { margin-top: 15px; }
.entry-content h2 { font-size: 24px; margin: 25px 0 11px; }
.entry-content h3 { font-size: 18px; margin: 23px 0 8px; }
.entry-content p + p { margin-top: 12px; }
.entry-content a { color: #6e5508; text-decoration: underline; text-underline-offset: 2px; }
.entry-content ul, .entry-content ol { padding-left: 1.55em; }
.entry-content blockquote { border-left: 3px solid var(--gold); padding: 10px 14px; background: #f7f4e6; margin-left: 0; margin-right: 0; }
.entry-content table { width: 100%; border-collapse: collapse; }
.entry-content td, .entry-content th { text-align: left; border: 1px solid var(--line); padding: 8px; }
.entry-content th { background: var(--paper); }
.entry-content pre, .wp-block-table { overflow-x: auto; }
.toc { margin: 0 0 18px; padding: 12px 15px; background: #f7f7f1; border: 1px solid var(--line); border-radius: 9px; }
.toc summary { cursor: pointer; font-weight: 750; }
.toc ol { margin: 9px 0 0; padding-left: 20px; font-size: 14px; }
.toc a:hover { text-decoration: underline; }
.toc .subheading { margin-left: 15px; list-style-type: circle; }
.pagination { margin: 24px 0 0; display: flex; gap: 8px; flex-wrap: wrap; }
.page-numbers { background: #fff; border: 1px solid var(--line); border-radius: 6px; min-width: 34px; text-align: center; padding: 4px 9px; }
.page-numbers.current { background: var(--gold); }
.empty-state { padding: 24px; background: white; border: 1px solid var(--line); border-radius: 12px; }
.empty-state .search-form { margin-top: 15px; }
.tool-card { border: 1px solid var(--line); border-radius: 12px; padding: 17px; background: var(--paper); }
.fee-inputs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.fee-inputs label { display: grid; gap: 3px; font-weight: 640; font-size: 14px; }
.fee-inputs input, .fee-inputs select { border: 1px solid #c7c9bf; border-radius: 7px; padding: 8px; min-width: 0; background: #fff; color: var(--ink); }
.tool-card .button { margin-top: 13px; }
.fee-output { margin-top: 14px; padding: 9px 11px; background: #fffdf0; border-radius: 6px; font-weight: 730; }
.fee-note { color: var(--muted); margin-top: 11px; font-size: 13px; }
.checklist label { display: flex; align-items: baseline; gap: 10px; padding: 6px 0; }
.checklist input { accent-color: #846920; }
.site-footer { background: #222520; color: #f5f5ee; }
.footer-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; padding-block: 26px; }
.footer-top .brand-sub, .footer-note { color: #c5c7bb; font-size: 12px; }
.footer-top .brand-mark { background: #373a30; }
.footer-note { margin-top: 9px; }
.footer-links { flex-wrap: wrap; font-size: 13px; gap: 9px 17px; }
.site-footer a:hover { color: #f4db73; }
.footer-bottom { border-top: 1px solid #41443b; padding-block: 13px; font-size: 12px; color: #c5c7bb; }
@media (max-width: 1040px) {
  .header-inner { gap: 13px; }
  .site-nav ul { gap: 11px; }
  .site-nav a { font-size: 13px; }
  .feature { padding: 24px; }
}
@media (max-width: 840px) {
  .wrap { width: calc(100% - 42px); }
  .header-inner { min-height: 68px; flex-wrap: wrap; justify-content: space-between; gap: 0; }
  .menu-toggle { display: grid; }
  .site-nav { flex: 1 0 100%; margin-left: 0; order: 2; display: none; }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-wrap: wrap; gap: 0 16px; }
  .site-nav a { padding-block: 10px; }
  .lead-grid { gap: 17px; grid-template-columns: minmax(0, 1fr); }
  .feature { min-height: 338px; }
  .recent-panel { padding: 17px; }
  .article-layout { grid-template-columns: 1fr; gap: 17px; }
}
@media (max-width: 550px) {
  .wrap { width: calc(100% - 28px); }
  .intro { padding-top: 27px; }
  .intro p { font-size: 14px; }
  .topic-links { gap: 6px; margin: 16px 0; }
  .topic-link { padding: 5px 9px; }
  .feature { padding: 19px; min-height: 304px; }
  .feature p { font-size: 13px; }
  .action-grid, .article-grid { grid-template-columns: 1fr; }
  .action-grid { gap: 9px; margin-top: 16px; }
  .action-card { min-height: 75px; padding: 11px; }
  .section { padding-top: 26px; }
  .footer-top { display: grid; }
  .article-layout { padding-block: 18px 35px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; }
}

.referral-promo { display:flex; align-items:center; justify-content:space-between; gap:18px; padding:15px 20px; margin-top:15px; border:1px solid var(--line); border-radius:12px; background:white; }
.referral-promo:hover { border-color:#8a7430; }
.referral-promo strong, .referral-promo small { display:block; }
.referral-promo small { margin-top:3px; color:var(--muted); }
.entry-content .referral-box { margin-block:20px 28px; padding:clamp(16px, 3vw, 24px); background:#fff7d9; border:1px solid #dfc980; border-radius:12px; }
.referral-box > label { display:block; font-weight:700; }
.referral-code-row { display:flex; gap:8px 12px; align-items:center; flex-wrap:wrap; margin-block:9px 15px; }
.referral-code { width:9ch; max-width:100%; padding:7px 10px; border:1px solid #9a8650; border-radius:6px; background:white; color:inherit; font:700 19px/1.35 ui-monospace, monospace; }
.referral-copy { background:white; border:1px solid #9a8650; }
.referral-copy[hidden] { display:none; }
.referral-status, .entry-content .referral-note { font-size:13px; color:#59513d; }
.entry-content .referral-box a.button { color:#211a09; text-decoration:none; }
.entry-content .referral-note { margin:10px 0 0; }

.home-shelves { margin-top: 12px; }
.home-shelf { padding-top: 45px; }
.home-shelf .section-header { position: relative; align-items: baseline; padding-bottom: 11px; margin-bottom: 19px; }
.home-shelf .section-header::after { content: ""; position: absolute; left: 0; bottom: -1px; width: 44px; height: 3px; background: #c9a734; }
.home-shelf .section-header h2 { font-size: clamp(18px, 2vw, 25px); }
.home-article-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 24px; }
.home-article { min-width: 0; }
.home-article-link { display: block; }
.home-article .cover { aspect-ratio: 3 / 2; }
.home-article .cover img { transition: transform 180ms ease-out; }
.home-article-link:hover img { transform: scale(1.035); }
.home-article h3 { margin: 12px 0 8px; font-size: 17px; line-height: 1.5; font-weight: 760; }
.home-article .meta { font-size: 11.5px; }
.home-article .meta time:not(:first-child)::before { content: "/"; margin-right: 8px; color: #8a8b79; }
.article-deck { margin: 0 0 17px; color: #56564b; font-size: 17px; line-height: 1.7; }
.entry-content .article-references { margin-top: 30px; padding: 12px 16px; background: var(--paper); border: 1px solid var(--line); border-radius: 9px; }
.article-references h2 { margin: 0 0 4px; font-size: 17px; }
.article-references ul { margin: 0; font-size: 14px; }
.home-referral { position: fixed; z-index: 12; right: max(18px, env(safe-area-inset-right)); bottom: max(18px, env(safe-area-inset-bottom)); width: min(350px, calc(100% - 36px)); color: #faf8ef; background: #171a19; border: 1px solid rgba(230, 204, 116, .3); border-radius: 12px; box-shadow: 0 16px 55px #0c0e0e42; animation: cfn-referral-enter 170ms ease-out; }
.home-referral-content { padding: 18px 18px 15px; border-radius: 11px 11px 0 0; background: linear-gradient(90deg, #171a19 4%, #171a19e8 49%, #171a1955 100%), url(assets/hero.webp) 74% 55% / cover; }
.home-referral-platform { font-size: 11px; font-weight: 800; color: #f5d96d; letter-spacing: .12em; margin-bottom: 5px; }
.home-referral h2 { color: #fffdf5; font-size: 21px; }
.home-referral-code { margin-top: 4px; font-size: 13px; }
.home-referral-code strong { color: #f8df7d; font-family: ui-monospace, monospace; font-size: 18px; letter-spacing: .08em; }
.home-referral .button { margin-top: 8px; min-height: 42px; }
.home-referral-close { position: absolute; top: -12px; right: -9px; width: 32px; height: 32px; display: grid; place-items: center; padding: 0; color: #fff; background: #383b36; border: 1px solid #e4ddbe; border-radius: 50%; font-size: 23px; line-height: 1; }
.home-referral-close:hover { background: #52574d; }
.home-referral-footer { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 3px 8px; border-top: 1px solid #4b473a; padding: 8px 14px; color: #d9d7ca; font-size: 11px; }
.home-referral-footer a { color: #f6dc77; text-decoration: underline; text-underline-offset: 2px; }
@keyframes cfn-referral-enter { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (max-width: 840px) {
  .home-article-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 22px 16px; }
}
@media (max-width: 550px) {
  .home-shelf { padding-top: 28px; }
  .home-shelf .section-header { margin-bottom: 13px; }
  .home-article h3 { margin-top: 7px; font-size: 14px; line-height: 1.45; }
  .home-referral { right: max(13px, env(safe-area-inset-right)); bottom: max(9px, env(safe-area-inset-bottom)); width: min(273px, calc(100% - 32px)); }
  .home-referral-content { padding: 10px 13px 8px; }
  .home-referral h2 { font-size: 17px; }
  .home-referral .button { margin-top: 4px; min-height: 39px; padding: 6px 10px; font-size: 13px; }
  .home-referral-close { width: 38px; height: 38px; }
  .home-referral-footer { padding: 5px 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .home-referral { animation: none; }
  .home-article .cover img { transition: none; }
  .home-article-link:hover img { transform: none; }
}

.home-start { align-content: center; display: grid; gap: 12px; min-width: 0; padding: clamp(22px, 3.4vw, 42px); border-radius: var(--radius); color: #fffdf3; background: linear-gradient(100deg, #101c18f7 13%, #12221def 56%, #15251db8 100%), url(assets/wallet.webp) 63% center / cover; }
.home-start h2 { font-size: clamp(28px, 4vw, 47px); font-weight: 820; letter-spacing: -.045em; }
.home-start-summary { color: #e4e6d9; font-size: 15px; }
.home-start-steps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; padding: 0; margin: 4px 0 0; list-style: none; max-width: 540px; }
.home-start-steps a { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 7px 11px; border: 1px solid #d4d5b159; border-radius: 8px; background: #111b19ad; color: #fcfbf1; font-size: clamp(12px, 1.3vw, 15px); font-weight: 710; }
.home-start-steps a:hover { border-color: #eacf70; color: #f6de85; }
.home-start-step-number { flex: none; display: grid; place-items: center; width: 23px; height: 23px; border-radius: 50%; background: #54482e; color: #ffdf81; font-size: 12px; }
.home-start-arrow { margin-inline-start: auto; color: #d7c48c; }
.home-start-code > label { display: block; color: #f0ecd6; font-size: 13px; }
.home-start-code .referral-code-row { gap: 6px 8px; margin: 4px 0 0; }
.home-start-code .referral-code { color: #f4d773; background: #131c17; border-color: #bd9f52; padding-block: 5px; }
.home-start-code .referral-copy, .home-start-read { color: #fffdf3; background: #202a23; border: 1px solid #c4c6aa6e; }
.home-start-code .referral-copy { padding: 6px 10px; font-size: 13px; }
.home-start-code .referral-copy:hover, .home-start-read:hover { background: #374336; color: #fffdf3; }
.home-start-code .referral-status { color: #f4db88; font-size: 12px; }
.home-start-code .referral-status:empty { display: none; }
.home-start-actions { display: flex; gap: 7px; flex-wrap: wrap; }
.home-start-disclosure { color: #e5e2d0; font-size: 11.5px; }
.home-referral-offer { font-size: 12px; font-weight: 700; color: #eee9d4; }
.home-referral h2.home-referral-rate { display: flex; align-items: baseline; flex-wrap: wrap; gap: 5px 8px; font-size: 22px; }
.home-referral-rate strong { color: #ffdc65; font-size: clamp(36px, 5vw, 58px); font-weight: 840; letter-spacing: -.055em; }
.home-referral-footer p { flex-basis: 100%; line-height: 1.45; }
@media (max-width: 550px) {
  .home-start { gap: 10px; padding: 18px; }
  .home-start-actions .button { padding-inline: 11px; }
  .home-start-steps a { padding-inline: 7px; gap: 5px; }
  .home-start-step-number { width: 20px; height: 20px; }
  .home-referral h2.home-referral-rate { font-size: 17px; }
  .home-referral-rate strong { font-size: 39px; }
}
