/*
Theme Name: 卡账本
Description: 中文虚拟卡费用比较及 AI 订阅付款指南。
Version: 1.0.0
Requires at least: 6.5
Requires PHP: 8.1
Text Domain: kazhangben
*/
:root {
  color-scheme: light;
  --ink: #142c24;
  --muted: #496357;
  --forest: #092c24;
  --forest-dark: #06241e;
  --mint: #a7f4bd;
  --paper: #f5f7f3;
  --border: #dce6dd;
  --accent: #146443;
  --white: #fff;
  --shell: 1184px;
  --ease: cubic-bezier(.2,.7,.3,1);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); line-height: 1.6; }
a { color: inherit; text-underline-offset: 3px; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
svg { flex: none; vertical-align: middle; }
img { display: block; max-width: 100%; height: auto; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.hero :focus-visible, .site-header :focus-visible, .site-footer :focus-visible { outline-color: var(--mint); }
.calculator :focus-visible, .mobile-nav nav :focus-visible { outline-color: var(--accent); }
.skip-link { position: absolute; z-index: 30; top: 12px; left: 12px; padding: 8px 14px; background: var(--white); transform: translateY(-150%); }
.skip-link:focus { transform: none; }
.shell { width: min(var(--shell), calc(100% - 88px)); margin-inline: auto; }
.section { padding-block: 68px 76px; }
#compare, #calculator { scroll-margin-top: 26px; }

.site-header { background: var(--forest-dark); color: #edf9ee; border-bottom: 1px solid #29483d; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 750; font-size: 21px; letter-spacing: .04em; white-space: nowrap; }
.custom-logo-link img { width: auto; max-width: 174px; max-height: 44px; object-fit: contain; }
.main-nav, .footer-menu { display: flex; align-items: center; gap: 30px; list-style: none; padding: 0; margin: 0; }
.main-nav a, .footer-menu a { text-decoration: none; font-size: 14px; }
.main-nav a { color: #c6dcd0; }
.main-nav a:hover, .main-nav .current-menu-item a { color: var(--mint); }
.header-cta { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border: 1px solid #5b8270; border-radius: 9px; text-decoration: none; font-size: 13px; color: #e2f5e7; }
.header-cta svg { width: 17px; height: 17px; }
.header-cta:hover { background: #193f32; }
.mobile-nav { display: none; }

.hero { color: #f4fff6; background: var(--forest); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); align-items: center; min-height: 504px; gap: 24px; }
.hero-intro { position: relative; z-index: 1; padding-block: 42px; }
.kicker { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 720; letter-spacing: .07em; color: var(--accent); margin: 0 0 10px; }
.kicker svg { width: 17px; height: 17px; }
.hero .kicker { display: inline-flex; align-items: center; padding: 5px 11px; border: 1px solid #57856c; border-radius: 100px; color: #c2f6ce; margin-bottom: 18px; }
.hero .kicker::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--mint); }
.hero h1 { font-size: clamp(36px, 4.25vw, 66px); letter-spacing: -.046em; line-height: 1.16; margin: 0 0 19px; font-weight: 800; }
.hero h1 span { color: var(--mint); }
.hero-copy { color: #c4dcd0; max-width: 435px; font-size: 16px; line-height: 1.85; margin: 0 0 25px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 11px; }
.hero-actions a, .button-link { display: inline-flex; align-items: center; gap: 10px; min-height: 45px; padding: 9px 17px; border: 1px solid #5c8273; border-radius: 9px; color: #ecfff2; font-size: 14px; font-weight: 700; text-decoration: none; transition: background-color .16s var(--ease), border-color .16s var(--ease); }
.hero-actions a.button-primary { background: var(--mint); border-color: var(--mint); color: #0f3526; }
.hero-actions a:hover { background: #235240; }
.hero-actions a.button-primary:hover { background: #d7ffe2; border-color: #d7ffe2; }
.hero-note { margin: 16px 0 0; color: #afcbbc; font-size: 12px; }
.hero-art { position: relative; min-width: 0; align-self: stretch; display: flex; align-items: center; isolation: isolate; }
.artwork { position: absolute; z-index: -1; right: -16%; top: 50%; transform: translateY(-50%); width: 128%; max-width: none; height: auto; mask-image: radial-gradient(ellipse 72% 66% at 62% 50%, #000 42%, transparent 90%); }
.calculator { width: min(100%, 374px); color: var(--ink); background: #fcfefb; padding: 21px 21px 18px; border-radius: 17px; box-shadow: 0 20px 55px #00181191; position: relative; margin-left: 6%; }
.receipt-title { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; }
.receipt-icon { display: grid; place-items: center; width: 37px; height: 37px; background: #e3f5e8; border-radius: 9px; color: var(--accent); }
.receipt-title h2 { font-size: 16px; line-height: 1.22; margin: 0 0 4px; letter-spacing: -.02em; }
.receipt-title p { margin: 0; font-size: 11px; color: var(--muted); }
.receipt-title select { border: 1px solid var(--border); border-radius: 7px; background: #f1f6f0; min-height: 33px; padding: 4px; font-size: 12px; font-weight: 700; }
.receipt-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px 11px; margin-block: 16px; }
.receipt-fields label { display: block; font-size: 12px; font-weight: 650; color: #456052; }
.receipt-fields label span { color: #607d6e; }
.receipt-fields input { display: block; margin-top: 4px; width: 100%; min-height: 36px; border-radius: 7px; border: 1px solid var(--border); background: var(--white); padding: 3px 9px; font-size: 16px; font-weight: 650; font-variant-numeric: tabular-nums; }
.receipt-fields input:invalid { border-color: #b23b22; }
.receipt-total { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 5px 10px; border-top: 1px dashed #c8dbcb; padding: 12px 9px 4px; }
.receipt-total span, .receipt-total small { display: block; }
.receipt-total span { font-size: 12px; font-weight: 750; }
.receipt-total small, .receipt-note { font-size: 11px; color: var(--muted); }
.receipt-total output { font-size: clamp(23px, 3vw, 34px); line-height: 1.15; letter-spacing: -.04em; color: #136549; font-weight: 810; font-variant-numeric: tabular-nums; word-break: break-word; }
.receipt-note { margin: 7px 0 0; min-height: 2.8em; }

.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 22px; margin-bottom: 24px; }
.section-heading h1, .section-heading h2 { font-size: clamp(27px, 3.2vw, 43px); letter-spacing: -.038em; line-height: 1.2; margin: 0 0 8px; font-weight: 800; }
.section-heading p { margin: 0; color: var(--muted); font-size: 15px; }
.source-note { flex: none; color: #375d49; display: inline-flex; align-items: center; gap: 5px; font-size: 13px; margin-bottom: 4px; }
.source-note svg { width: 17px; height: 17px; }
.filterbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.filters { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.filters button { border: 1px solid var(--border); border-radius: 7px; padding: 6px 13px; min-height: 36px; background: var(--white); font-size: 13px; font-weight: 680; transition: background-color .16s var(--ease), border-color .16s var(--ease); }
.filters button:hover { border-color: #74a68a; }
.filters button[aria-pressed="true"] { color: #fff; background: #1a5b43; border-color: #1a5b43; }
.results { flex: none; font-size: 13px; color: var(--muted); }
.compare-box { background: var(--white); border: 1px solid var(--border); border-radius: 13px; overflow: hidden; }
.compare-table { width: 100%; border-collapse: collapse; text-align: left; font-size: 13px; }
.compare-table thead { background: #eaf2e9; }
.compare-table th, .compare-table td { padding: 13px 15px; vertical-align: middle; }
.compare-table thead th { color: #3c5a4a; font-size: 12px; letter-spacing: .025em; }
.compare-table tbody tr + tr { border-top: 1px solid #e7eee6; }
.compare-table tbody th { text-align: left; }
.compare-table tbody tr:hover { background: #f9fcf8; }
.provider { display: flex; align-items: center; gap: 10px; font-size: 15px; }
.provider a { text-decoration: none; font-weight: 760; }
.provider a:hover { text-decoration: underline; }
.provider small { display: block; color: var(--muted); font-weight: 450; font-size: 11px; }
.provider-mark { flex: none; width: 33px; height: 33px; display: grid; place-items: center; border-radius: 8px; background: #e5f3e8; color: #174f37; font-size: 15px; font-weight: 780; }
.provider-mark[data-provider="wise"] { background: #d6f7b7; color: #294225; }
.provider-mark[data-provider="revolut"] { background: #eceaf7; color: #3c3766; }
.provider-mark[data-provider="redotpay"] { background: #fdeadd; color: #98462d; }
.provider-mark[data-provider="monzo-extra"] { background: #ffe7e5; color: #953e3c; }
.provider-mark[data-provider="privacy"] { background: #e6effb; color: #2b5592; }
.region-tag { background: #edf3ed; border-radius: 100px; color: #355647; font-size: 11px; padding: 4px 8px; white-space: nowrap; }
.fee { font-variant-numeric: tabular-nums; font-weight: 730; }
.table-links { display: flex; flex-wrap: wrap; align-items: center; gap: 7px 11px; }
.fee-source { color: var(--muted); font-size: 12px; }
.out-link { display: inline-flex; align-items: center; gap: 4px; min-height: 32px; padding: 4px 8px; border: 1px solid #c9dfce; border-radius: 7px; color: #185b3f; font-size: 12px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.out-link:hover { background: #e5f5e9; }
.out-link svg { width: 14px; height: 14px; }
.empty { padding: 16px; margin: 0; }
.compare-footnote { color: var(--muted); font-size: 12px; margin: 13px 0 0; line-height: 1.7; }
.compare-footnote a { margin-inline-start: .55em; color: var(--accent); }

.guide-section { background: #edf3eb; border-top: 1px solid #e2ebe1; }
.guide-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 15px; }
.guide-card { position: relative; background: #fbfdf9; border: 1px solid #dbe7db; border-radius: 13px; padding: 23px 25px 28px; min-height: 184px; }
.guide-card:focus-within, .guide-card:hover { border-color: #7cad90; }
.guide-card h3 { font-size: 18px; margin: 9px 0; line-height: 1.45; }
.guide-card h3 a { text-decoration: none; }
.guide-card h3 a:hover { text-decoration: underline; }
.guide-card h3 a::after { position: absolute; content: ""; inset: 0; border-radius: 13px; }
.guide-card p { font-size: 13px; color: var(--muted); margin: 0; padding-right: 12px; }
.guide-label { display: flex; align-items: center; gap: 7px; color: var(--accent); font-size: 12px; font-weight: 720; }
.guide-label svg, .guide-arrow svg { width: 16px; height: 16px; }
.guide-arrow { position: absolute; bottom: 12px; right: 13px; color: var(--accent); }
.text-action { display: inline-flex; align-items: center; justify-content: start; gap: 7px; font-size: 14px; font-weight: 700; color: var(--accent); text-decoration: none; white-space: nowrap; }
.text-action:hover { text-decoration: underline; }
.text-action svg { width: 17px; height: 17px; }

.site-footer { background: var(--forest-dark); color: #e0f2e7; }
.footer-inner { padding-block: 38px 24px; display: grid; grid-template-columns: 1fr auto auto; align-items: start; gap: 40px; }
.footer-inner p { color: #b7cfc0; font-size: 13px; margin: 10px 0 0; }
.footer-menu { flex-direction: column; align-items: start; gap: 6px; }
.footer-menu a { color: #c9ded0; }
.footer-menu a:hover { color: var(--mint); }
.footer-bottom { padding-block: 17px; border-top: 1px solid #345346; font-size: 12px; color: #bad1c3; }

.page-surface { background: #f9fbf8; min-height: 55vh; }
.article-shell { width: min(740px, calc(100% - 56px)); padding-block: 58px 74px; margin-inline: auto; overflow-wrap: anywhere; }
.article-shell h1 { font-size: clamp(29px, 5vw, 49px); line-height: 1.18; letter-spacing: -.035em; margin: 12px 0; }
.article-meta, .back-link { color: var(--muted); font-size: 13px; }
.article-meta svg { width: 15px; height: 15px; margin-right: 3px; }
.back-link:hover { color: var(--accent); }
.prose { font-size: 16px; line-height: 1.85; }
.prose h2 { font-size: 23px; line-height: 1.4; margin-block: 30px 8px; }
.prose p { margin-block: 14px; }
.prose a { color: var(--accent); }
.prose li { margin: 4px 0; }
.prose blockquote { margin: 20px 0; border-left: 3px solid #73a88a; padding: 4px 16px; background: #edf5ed; }
.product-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; background: #edf5ec; border: 1px solid var(--border); border-radius: 13px; padding: 19px; }
.product-facts dt { font-size: 12px; color: var(--muted); }
.product-facts dd { font-size: 15px; font-weight: 730; margin: 3px 0 0; }
.article-actions { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin-top: 24px; }
.listing { min-height: 50vh; }
.navigation.pagination { margin-top: 24px; }

@media (max-width: 1040px) {
  .shell { width: calc(100% - 64px); }
  .hero-grid { min-height: 458px; }
  .compare-table th, .compare-table td { padding-inline: 10px; }
  .calculator { margin-left: 0; }
}
@media (max-width: 840px) {
  .shell { width: calc(100% - 44px); }
  .main-nav { gap: 19px; }
  .section { padding-block: 54px 59px; }
  .compare-box { border: 0; background: transparent; overflow: visible; }
  .compare-table, .compare-table tbody { display: block; }
  .compare-table thead { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .compare-table tbody { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
  .compare-table tbody tr, .compare-table tbody tr + tr { display: block; background: var(--white); border: 1px solid var(--border); border-radius: 11px; overflow: hidden; }
  .compare-table th { display: block; padding: 10px 12px; background: #edf4ed; }
  .compare-table td { display: grid; grid-template-columns: 5.25em minmax(0,1fr); align-items: center; justify-items: start; gap: 4px; padding: 5px 12px; }
  .compare-table td::before { content: attr(data-label); color: var(--muted); font-size: 12px; font-weight: 450; }
  .compare-table td:last-child { padding-bottom: 11px; }
}
@media (max-width: 680px) {
  .shell { width: calc(100% - 36px); }
  .header-inner { min-height: 61px; gap: 12px; justify-content: start; }
  .brand { font-size: 19px; }
  .brand img { width: 30px; height: 30px; }
  .desktop-nav { display: none; }
  .mobile-nav { position: relative; display: block; margin-left: auto; order: 3; }
  .mobile-nav summary { color: #e9fff0; cursor: pointer; display: grid; place-items: center; width: 36px; min-height: 36px; border: 1px solid #557d69; border-radius: 7px; list-style: none; }
  .mobile-nav summary::-webkit-details-marker { display: none; }
  .mobile-nav nav { position: absolute; right: 0; top: calc(100% + 8px); z-index: 5; width: min(220px, 75vw); padding: 7px; border: 1px solid var(--border); border-radius: 10px; background: var(--white); box-shadow: 0 8px 20px #07282134; }
  .mobile-nav nav .main-nav { flex-direction: column; align-items: stretch; gap: 0; }
  .mobile-nav nav a { display: block; color: var(--ink); padding: 9px 10px; }
  .mobile-nav nav a:hover, .mobile-nav nav .current-menu-item a { color: var(--accent); }
  .header-cta { margin-left: auto; padding: 6px 9px; font-size: 12px; min-height: 35px; }
  .header-cta + .mobile-nav, .header-inner:has(.header-cta) .mobile-nav { margin-left: 0; }
  .hero-grid { grid-template-columns: minmax(0,1fr); min-height: 0; gap: 0; }
  .hero-intro { padding-block: 38px 18px; }
  .hero h1 { font-size: clamp(34px, 9vw, 56px); margin-bottom: 13px; }
  .hero-copy { font-size: 14px; margin-bottom: 18px; }
  .hero .kicker { margin-bottom: 13px; }
  .hero-note { margin-top: 12px; }
  .hero-art { min-height: 320px; padding-bottom: 34px; align-items: start; }
  .artwork { width: 104%; right: -27%; top: 43%; opacity: .83; }
  .calculator { margin-left: 0; width: min(88%, 360px); }
  .guide-grid { grid-template-columns: 1fr; gap: 10px; }
  .guide-card { min-height: 138px; padding: 17px 20px 23px; }
  .section-heading { align-items: start; gap: 8px; flex-direction: column; margin-bottom: 16px; }
  .section-heading p { font-size: 14px; }
  .section { padding-block: 43px 48px; }
  .filterbar { align-items: end; }
  .filters button { padding-inline: 8px; }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 18px; }
  .footer-inner > div { grid-column: 1 / -1; }
}
@media (max-width: 450px) {
  .compare-table tbody { grid-template-columns: 1fr; }
  .source-note { font-size: 12px; }
  .calculator { width: 92%; padding: 17px; }
  .section-heading h2 { margin-bottom: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}
