
:root{
  --bg:#f6f4ef;
  --paper:#fffdf8;
  --ink:#1c2524;
  --muted:#66706d;
  --line:#d9ded9;
  --accent:#355b57;
  --accent-soft:#e7eeeb;
  --max:1120px;
  --article:760px;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",
    "Noto Sans TC","PingFang TC","Microsoft JhengHei",sans-serif;
  color:var(--ink);
  background:var(--bg);
  line-height:1.8;
}
a{color:inherit}
.site-header{
  position:sticky;top:0;z-index:20;
  background:rgba(246,244,239,.94);
  backdrop-filter:blur(12px);
  border-bottom:1px solid var(--line);
}
.nav{
  max-width:var(--max);margin:auto;padding:16px 24px;
  display:flex;align-items:center;justify-content:space-between;gap:24px;
}
.brand{text-decoration:none;display:flex;align-items:baseline;gap:10px;font-weight:760;letter-spacing:.04em}
.brand small{font-weight:500;color:var(--muted);letter-spacing:.08em}
.menu{display:flex;gap:22px;flex-wrap:wrap}
.menu a{text-decoration:none;color:var(--muted);font-size:.95rem}
.menu a:hover{color:var(--ink)}
.hero{
  max-width:var(--max);margin:auto;padding:92px 24px 72px;
  display:grid;grid-template-columns:minmax(0,1.4fr) minmax(260px,.6fr);gap:56px;align-items:end;
}
.eyebrow{font-size:.83rem;letter-spacing:.16em;text-transform:uppercase;color:var(--accent);font-weight:700}
h1,h2,h3{line-height:1.25;letter-spacing:-.02em}
.hero h1{font-size:clamp(2.7rem,6vw,5.7rem);margin:.2em 0 .25em}
.hero p{font-size:1.18rem;color:var(--muted);max-width:760px}
.hero-card{
  border-left:3px solid var(--accent);padding:6px 0 6px 24px;color:var(--muted)
}
.cta{
  display:inline-block;margin-top:22px;padding:11px 18px;border:1px solid var(--ink);
  text-decoration:none;border-radius:999px;font-weight:650;background:var(--paper)
}
.section{max-width:var(--max);margin:auto;padding:48px 24px 82px}
.section h2{font-size:clamp(1.7rem,3vw,2.5rem);margin:0 0 28px}
.grid-3{display:grid;grid-template-columns:repeat(3,1fr);gap:18px}
.card{
  background:var(--paper);border:1px solid var(--line);border-radius:18px;padding:25px;
}
.card h3{margin-top:0}
.card p{color:var(--muted);margin-bottom:0}
.article-list{display:grid;gap:18px}
.article-card{
  display:block;background:var(--paper);border:1px solid var(--line);border-radius:18px;
  padding:28px;text-decoration:none
}
.article-card:hover{border-color:#aab6b0;transform:translateY(-1px)}
.article-card .meta{font-size:.84rem;color:var(--accent);letter-spacing:.08em;text-transform:uppercase}
.article-card h2,.article-card h3{margin:.3em 0}
.article-card p{color:var(--muted);margin-bottom:0}
.page-head{max-width:var(--max);margin:auto;padding:78px 24px 28px}
.page-head h1{font-size:clamp(2.3rem,5vw,4.3rem);margin:.15em 0}
.page-head p{color:var(--muted);max-width:760px}
.article{
  max-width:var(--article);margin:auto;padding:38px 24px 96px;
  font-size:1.08rem;
}
.article .kicker{color:var(--accent);font-weight:700;letter-spacing:.08em}
.article h1{font-size:clamp(2.2rem,5vw,4rem);margin:.15em 0 .15em}
.article .subtitle{font-size:1.45rem;color:var(--muted);margin-top:0}
.article p{margin:1.15em 0}
.article blockquote{
  margin:1.6em 0;padding:18px 24px;border-left:3px solid var(--accent);
  background:var(--accent-soft);border-radius:0 12px 12px 0;
}
.article figure{margin:34px -70px 38px}
.article figure img{
  display:block;width:100%;height:auto;background:white;border:1px solid var(--line);border-radius:14px;
}
.article figcaption{text-align:center;font-size:.9rem;color:var(--muted);margin-top:9px}
.flow{
  list-style:none;padding:18px 22px;margin:1.4em 0;background:var(--paper);border:1px solid var(--line);border-radius:14px;
}
.flow li{padding:5px 0}
.note{
  margin-top:42px;padding:22px 25px;background:#f1eee7;border-radius:15px;border:1px solid #ddd6ca;
  font-size:.95rem;color:#515a57
}
.note h2{font-size:1rem;margin:0 0 8px;letter-spacing:.08em}
.about-box{max-width:800px}
.site-footer{border-top:1px solid var(--line)}
.footer{
  max-width:var(--max);margin:auto;padding:30px 24px 46px;
  display:flex;justify-content:space-between;gap:30px;flex-wrap:wrap;color:var(--muted);font-size:.9rem;
}
@media(max-width:800px){
  .hero{grid-template-columns:1fr;padding-top:64px}
  .grid-3{grid-template-columns:1fr}
  .article figure{margin:30px 0}
  .nav{align-items:flex-start}
  .menu{justify-content:flex-end}
}


/* Article 2 diagrams */
.article .a2-diagram{background:var(--paper);border:1px solid var(--line);border-radius:14px;padding:22px}
.article .a2-flow{display:flex;align-items:stretch;justify-content:center;gap:10px}
.article .a2-flow-node{flex:1;min-width:110px;display:flex;align-items:center;justify-content:center;text-align:center;background:var(--accent-soft);border-radius:10px;padding:16px;font-weight:650;line-height:1.45}
.article .a2-flow-arrow{display:flex;align-items:center;justify-content:center;color:var(--accent);font-size:1.35rem;font-weight:800}
.article .a2-compare{display:grid;grid-template-columns:1fr auto 1fr;gap:16px;align-items:stretch}
.article .a2-compare-panel{padding:20px;border:1px solid var(--line);border-radius:11px}
.article .a2-compare-panel.a2-preferred{background:var(--accent-soft)}
.article .a2-compare-panel strong{color:var(--accent);font-size:1.15rem}
.article .a2-compare-panel ul{margin:10px 0 0;padding-left:1.2em}
.article .a2-source{font-size:.88rem;color:var(--muted);overflow-wrap:anywhere;margin:.55em 0}
@media(max-width:800px){.article .a2-flow{flex-direction:column}.article .a2-flow-arrow{transform:rotate(90deg)}.article .a2-compare{grid-template-columns:1fr}}


/* Article 3 and unified publication figures */
.article .article-version{margin:.35rem 0 1rem;color:var(--muted);font-size:.9rem;letter-spacing:.04em}
.article .deck{font-size:1.16rem;color:var(--accent);font-weight:650;border-left:3px solid var(--accent);padding-left:18px;margin:1.5em 0 2em}
.article h2{font-size:clamp(1.55rem,3vw,2.15rem);margin:2.3em 0 .65em;color:var(--accent)}
.article h3{font-size:clamp(1.25rem,2.4vw,1.65rem);margin:1.9em 0 .55em;color:var(--ink)}
.article .route{background:var(--paper);border:1px solid var(--line);border-left:4px solid #2c6eaa;border-radius:12px;padding:15px 18px;font-weight:700;color:#13253d;overflow-wrap:anywhere}
.article figure.figure-portrait{max-width:560px;margin-left:auto;margin-right:auto}
.article figure img{background:#f6f8fb}

/* Article 4 responsive figures and publication navigation */
.hero .hero-subtitle{font-size:clamp(1.25rem,2.5vw,1.75rem);line-height:1.5;margin:1.1em 0 .5em;color:var(--accent)}
.article-navigation{display:flex;justify-content:space-between;gap:24px;border-top:1px solid var(--line);padding-top:24px;margin-top:42px;font-size:.95rem}
.article-navigation a{overflow-wrap:anywhere}
.a4-article{overflow-wrap:break-word}
.a4-article .a4-figure{margin:28px 0 32px}
.a4-article .a4-figure img{width:100%;height:auto;object-fit:contain}
.a4-article .a4-screenshot-pair{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:28px;align-items:start;margin:28px 0 36px}
.a4-article .a4-screenshot-pair figure{margin:0;min-width:0}
.a4-article .a4-screenshot-pair img{max-height:650px;object-fit:contain;background:transparent;border:none;border-radius:0}
.a4-article .a4-screenshot-pair figcaption{line-height:1.55;margin-top:14px}
.a4-mobile-flow{display:none}
.a4-table-wrap{margin:26px 0 32px;overflow-x:auto}
.a4-table-wrap table{width:100%;border-collapse:collapse;table-layout:auto;font-size:.95rem;line-height:1.7}
.a4-table-wrap th,.a4-table-wrap td{padding:12px 14px;border:1px solid var(--line);text-align:left;vertical-align:middle;overflow-wrap:anywhere}
.a4-table-wrap th{background:var(--accent-soft);font-weight:700}
.a4-table-wrap tbody tr:nth-child(even){background:var(--paper)}
.a4-article .a4-numbered{padding-left:1.35em;text-indent:-1.35em}
.a4-sources{font-size:.9rem;line-height:1.75;padding-left:1.3em}
.a4-sources li{margin:.5em 0}
@media(max-width:600px){
 .a4-article .a4-screenshot-pair{grid-template-columns:minmax(0,1fr);gap:30px}
 .a4-article .a4-screenshot-pair figure{width:100%;max-width:360px;margin-inline:auto}
 .a4-article .a4-screenshot-pair img{max-height:none}
 .a4-desktop-diagram{display:none}
 .a4-mobile-flow{display:grid;gap:16px;list-style:none;padding:0;margin:28px 0 32px}
 .a4-mobile-flow li{position:relative;display:flex;flex-direction:column;gap:3px;padding:16px 18px 16px 56px;background:#f5f9fc;border:1px solid #c7d8e7;border-radius:12px;line-height:1.55}
 .a4-mobile-flow li:not(:last-child)::after{content:"↓";position:absolute;bottom:-20px;left:calc(50% - 6px);color:#2c6eaa;font-weight:700}
 .a4-mobile-flow strong{font-size:1.05rem;color:#13253d}
 .a4-mobile-flow li>span:not(.step-index){font-size:.9rem;color:#52647a}
 .step-index{position:absolute;left:16px;top:17px;border-radius:50%;width:26px;height:26px;text-align:center;background:#2c6eaa;color:white;font-size:.9rem;line-height:26px}
 .a4-table-wrap th,.a4-table-wrap td{padding:10px 9px;font-size:.86rem}
 .article-navigation{flex-direction:column;gap:12px}
}

.hero .hero-subtitle,.a4-article h1,.a4-article h2,.a4-article h3{text-wrap:balance}
@media(max-width:600px){.a4-wallet-comparison th:first-child,.a4-wallet-comparison td:first-child{width:76px;min-width:76px;white-space:nowrap;overflow-wrap:normal}}

/* Desktop Article 4 image proportions. Mobile layout is unchanged. */
@media(min-width:601px){
 .a4-article .a4-screenshot-pair{grid-template-columns:repeat(2,minmax(0,240px));max-width:508px;margin:28px auto 36px;justify-content:center;align-items:start}
 .a4-article .a4-screenshot-pair img{width:100%;height:420px;max-height:420px;object-fit:contain;object-position:center center}
 .a4-article .a4-screenshot-pair figcaption{margin-top:12px;font-size:.85rem;line-height:1.5}
}
