*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
:root{
  --blue:#3d3df0;
  --blue-dark:#2626c9;
  --ink:#14141f;
  --gray:#5a5a68;
  --line:#e2e2ee;
  --bg-tint:#e8edfb;
  --white:#ffffff;
  --mint:#3ce6a8;
}
html{scroll-behavior:smooth}
body{font-family:'Noto Sans TC','Segoe UI',sans-serif;color:var(--ink);background:var(--white);font-size:16px;line-height:1.7}
a{color:inherit;text-decoration:none}
img{max-width:100%;display:block}
.wrap{max-width:1180px;margin:0 auto;padding:0 24px}

/* header */
header{border-bottom:1px solid var(--line);background:var(--white);position:sticky;top:0;z-index:50}
.header-inner{max-width:1180px;margin:0 auto;padding:16px 24px;display:flex;align-items:center;justify-content:space-between;gap:24px}
.logo{font-size:20px;font-weight:700;letter-spacing:.02em;display:flex;align-items:center;gap:8px}
.logo-mark{width:28px;height:28px;border-radius:8px;background:var(--blue);flex-shrink:0}
nav.main-nav{display:flex;gap:28px;font-size:15px}
nav.main-nav a:hover{color:var(--blue)}
.btn{display:inline-flex;align-items:center;gap:6px;background:var(--blue);color:#fff;padding:10px 20px;border-radius:999px;font-size:14px;font-weight:600;white-space:nowrap}
.btn:hover{background:var(--blue-dark)}
.btn-outline{background:transparent;border:1.5px solid var(--ink);color:var(--ink);border-radius:999px;padding:8px 18px;font-size:14px;font-weight:600}

/* hero */
.hero{padding:64px 0 40px}
.hero h1{font-size:44px;font-weight:800;line-height:1.15;margin-bottom:28px;max-width:760px}
.hero-cards{display:grid;grid-template-columns:1.1fr 1fr 1fr;gap:20px}
.hero-card{border-radius:20px;padding:32px;min-height:260px;display:flex;flex-direction:column;justify-content:flex-end}
.hero-card.primary{background:var(--blue);color:#fff}
.hero-card.primary h2{font-size:24px;font-weight:700;margin-bottom:8px}
.hero-card.primary p{font-size:14px;opacity:.9;margin-bottom:20px}
.hero-card.image{background-size:cover;background-position:center;padding:0}
.hero-card.tint{background:var(--bg-tint);color:var(--ink);font-size:15px}

/* section generic */
section{padding:56px 0}
section.tint{background:var(--bg-tint)}
.section-head{margin-bottom:28px}
.section-head h2{font-size:28px;font-weight:800;margin-bottom:8px}
.section-head p{color:var(--gray);font-size:15px}

/* category grid */
.cat-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:14px}
.cat-card{background:var(--white);border:1px solid var(--line);border-radius:14px;padding:20px 22px;font-size:15px;font-weight:600}
.cat-card:hover{border-color:var(--blue)}
.cat-card.search{display:flex;align-items:center;gap:8px;color:var(--gray);font-weight:400}

/* featured banner */
.featured{display:grid;grid-template-columns:1fr 1fr;gap:48px;align-items:center}
.featured img{border-radius:18px}
.featured h2{font-size:26px;font-weight:800;margin-bottom:12px}
.featured p{color:var(--gray);margin-bottom:20px}

/* carousel-style card row (tool/calculator) */
.card-row{display:grid;grid-template-columns:repeat(4,1fr);gap:18px}
.tool-card{background:var(--white);border-radius:18px;padding:26px;border:1px solid var(--line);display:flex;flex-direction:column;min-height:220px}
.tool-card h3{font-size:17px;font-weight:700;margin-bottom:10px}
.tool-card p{font-size:14px;color:var(--gray);flex:1;margin-bottom:18px}
.tool-icon{width:40px;height:40px;border-radius:10px;background:var(--bg-tint);margin-bottom:16px;display:flex;align-items:center;justify-content:center;color:var(--blue);font-weight:700}

/* article cards */
.article-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:24px}
.article-card{border-radius:16px;overflow:hidden;background:var(--white);border:1px solid var(--line)}
.article-card img{aspect-ratio:16/10;object-fit:cover;background:var(--bg-tint)}
.article-card .body{padding:20px}
.article-card h3{font-size:16px;font-weight:700;line-height:1.5;margin-bottom:8px}
.article-card .meta{font-size:13px;color:var(--gray)}

/* newsletter bar */
.newsletter{background:var(--ink);color:#fff;border-radius:20px;padding:36px 40px;display:flex;align-items:center;justify-content:space-between;gap:24px;flex-wrap:wrap}
.newsletter p{font-size:15px;opacity:.9}
.newsletter .btn{background:var(--mint);color:var(--ink)}

/* footer */
footer{background:var(--bg-tint);padding:48px 0 32px;margin-top:32px}
.footer-grid{display:grid;grid-template-columns:1.4fr 1fr 1fr;gap:32px}
.footer-grid h4{font-size:15px;font-weight:700;margin-bottom:14px}
.footer-grid a{display:block;font-size:14px;color:var(--gray);padding:5px 0}
.footer-grid a:hover{color:var(--blue)}
.footer-bottom{border-top:1px solid #d3d9ef;margin-top:32px;padding-top:20px;font-size:13px;color:var(--gray)}

/* inner page hero (about/article/author/privacy) */
.page-hero{border-radius:0;min-height:280px;background-size:cover;background-position:center;position:relative;display:flex;align-items:flex-end;margin-bottom:32px}
.page-hero::after{content:"";position:absolute;inset:0;background:linear-gradient(180deg,rgba(20,20,31,0) 40%,rgba(20,20,31,.72) 100%)}
.page-hero .wrap{position:relative;z-index:1;padding-bottom:36px;width:100%}
.page-hero h1{color:#fff;font-size:38px;font-weight:800}
.updated{color:var(--gray);font-size:14px;margin-bottom:18px}
.lede{font-size:22px;font-weight:600;line-height:1.5;max-width:760px;margin-bottom:28px}

.toc{border:1px solid var(--line);border-radius:16px;margin-bottom:40px;overflow:hidden}
.toc-head{padding:18px 24px;font-weight:700;font-size:16px;border-bottom:1px solid var(--line)}
.toc a{display:flex;justify-content:space-between;align-items:center;padding:14px 24px;border-bottom:1px solid var(--line);font-size:15px}
.toc a:last-child{border-bottom:none}
.toc a:hover{color:var(--blue)}
.toc-num{background:var(--bg-tint);color:var(--blue);width:26px;height:26px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:13px;font-weight:700}

article.content h2{font-size:24px;font-weight:800;margin:40px 0 16px;padding-bottom:10px;border-bottom:2px solid var(--mint)}
article.content h3{font-size:18px;font-weight:700;margin:24px 0 10px}
article.content p{margin-bottom:16px;color:#2b2b38}
article.content ul{margin:0 0 16px 20px}
article.content li{margin-bottom:8px;color:#2b2b38}
article.content li::marker{color:var(--blue)}
.callout{background:var(--bg-tint);border-radius:14px;padding:20px 24px;margin:20px 0;font-size:15px}
.callout a{color:var(--blue);font-weight:600;text-decoration:underline}

/* author box */
.author-card{display:flex;gap:20px;align-items:center;border:1px solid var(--line);border-radius:16px;padding:24px;margin-bottom:32px}
.author-avatar{width:64px;height:64px;border-radius:50%;background:var(--blue);flex-shrink:0}
.author-card h3{font-size:17px;font-weight:700;margin-bottom:4px}
.author-card p{font-size:14px;color:var(--gray)}

@media(max-width:900px){
  .hero-cards,.card-row,.article-grid,.cat-grid{grid-template-columns:1fr 1fr}
  .featured{grid-template-columns:1fr}
  .footer-grid{grid-template-columns:1fr}
  nav.main-nav{display:none}
  .hero h1{font-size:32px}
}
