@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+TC:wght@400;500;700&family=Noto+Serif+TC:wght@700;900&display=swap');

/* ===== 國王的推薦 DailyAICode — 編輯型媒體風格 ===== */
:root{
  --bg:#ffffff;
  --bg-soft:#f7f8fa;
  --ink:#15171c;        /* 標題/深色文字 */
  --text:#34383f;       /* 內文 */
  --muted:#71757e;      /* 次要 */
  --line:#e8eaee;       /* 細線 */
  --accent:#1b50e0;     /* 強調色 */
  --accent-ink:#1740b8;
  --accent-soft:#eef3ff;
  --maxw:1180px;
  --readw:920px;
  --radius:14px;
  --shadow:0 1px 2px rgba(20,22,28,.04), 0 8px 24px rgba(20,22,28,.06);
  --sans:"Noto Sans TC",system-ui,-apple-system,"PingFang TC","Microsoft JhengHei",sans-serif;
  --serif:"Noto Serif TC",Georgia,"Songti TC",serif;
}
*{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth;-webkit-text-size-adjust:100%;color-scheme:light}
body{
  font-family:var(--sans);
  background:var(--bg);
  color:var(--text);
  font-size:18px;
  line-height:1.85;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}
a{color:var(--accent);text-decoration:none}
a:hover{color:var(--accent-ink)}
img{max-width:100%;height:auto;display:block}
.wrap{max-width:var(--maxw);margin:0 auto;padding:0 24px}

/* ===== Header ===== */
.site-header{
  position:sticky;top:0;z-index:50;
  background:rgba(255,255,255,.86);
  backdrop-filter:saturate(180%) blur(12px);
  border-bottom:1px solid var(--line);
}
.nav{display:flex;align-items:center;justify-content:space-between;height:70px}
.brand{font-family:var(--serif);font-weight:900;font-size:23px;color:var(--ink);letter-spacing:.02em}
.brand span{color:var(--accent)}
.nav-links{display:flex;gap:30px;font-size:15.5px;font-weight:500}
.nav-links a{color:var(--muted);position:relative;padding:4px 0}
.nav-links a:hover{color:var(--ink)}
.nav-links a::after{content:"";position:absolute;left:0;right:100%;bottom:-2px;height:2px;background:var(--accent);transition:right .2s ease}
.nav-links a:hover::after{right:0}

/* ===== Hero ===== */
.hero{padding:90px 0 56px;text-align:center;background:
  radial-gradient(60% 120% at 50% -10%, var(--accent-soft) 0%, rgba(238,243,255,0) 60%);}
.hero h1{
  font-family:var(--serif);font-weight:900;color:var(--ink);
  font-size:clamp(32px,5vw,52px);line-height:1.28;letter-spacing:.01em;
}
.hero p{color:var(--muted);font-size:19px;max-width:600px;margin:22px auto 0;line-height:1.8}
.hero .cta{
  display:inline-block;margin-top:34px;background:var(--accent);color:#fff;
  padding:15px 34px;border-radius:999px;font-weight:700;font-size:16px;
  box-shadow:0 8px 20px rgba(27,80,224,.28);transition:transform .15s,box-shadow .15s;
}
.hero .cta:hover{color:#fff;transform:translateY(-2px);box-shadow:0 12px 28px rgba(27,80,224,.36)}

/* ===== Category chips ===== */
.cats{display:flex;flex-wrap:wrap;gap:12px;justify-content:center;margin:40px 0 8px}
.cats a{
  background:#fff;border:1px solid var(--line);color:var(--text);
  padding:9px 20px;border-radius:999px;font-size:14.5px;font-weight:500;transition:.15s;
}
.cats a:hover{color:var(--accent);border-color:var(--accent);background:var(--accent-soft)}

/* ===== Sections ===== */
.section{padding:54px 0}
.section h2{
  font-family:var(--serif);font-weight:700;color:var(--ink);
  font-size:28px;margin-bottom:28px;display:flex;align-items:center;gap:12px;
}
.section h2::before{content:"";width:4px;height:22px;background:var(--accent);border-radius:2px}

/* ===== Cards ===== */
.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(320px,1fr));gap:26px}
.card{
  background:#fff;border:1px solid var(--line);border-radius:var(--radius);
  overflow:hidden;display:flex;flex-direction:column;
  box-shadow:var(--shadow);transition:transform .18s,box-shadow .18s,border-color .18s;
}
.card:hover{transform:translateY(-4px);box-shadow:0 6px 14px rgba(20,22,28,.08),0 20px 40px rgba(20,22,28,.1);border-color:#d7dae1}
.card .body{padding:24px;display:flex;flex-direction:column;gap:12px;flex:1}
.card .tag{font-size:12px;color:var(--accent);font-weight:700;letter-spacing:.12em;text-transform:uppercase}
.card h3{font-family:var(--serif);font-size:21px;line-height:1.5;font-weight:700}
.card h3 a{color:var(--ink)}
.card h3 a:hover{color:var(--accent)}
.card p{color:var(--muted);font-size:15.5px;line-height:1.75}
.card .meta{margin-top:auto;color:#9aa0a8;font-size:13px;padding-top:6px}
.card.soon{opacity:.6}
.card.soon h3 a{pointer-events:none;color:var(--muted)}

/* ===== Trust / methodology ===== */
.trust{background:var(--bg-soft);border:1px solid var(--line);border-radius:var(--radius);padding:36px}
.trust>p{color:var(--text);font-size:17px}
.trust ul{list-style:none;display:grid;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));gap:20px;margin-top:24px}
.trust li{padding-left:32px;position:relative;color:var(--muted);font-size:15.5px;line-height:1.7}
.trust li::before{content:"✓";position:absolute;left:0;top:1px;color:#fff;background:var(--accent);width:20px;height:20px;border-radius:50%;font-size:12px;display:flex;align-items:center;justify-content:center;font-weight:700}
.trust li b{color:var(--ink)}

/* ===== Article ===== */
.article{max-width:var(--readw);margin:0 auto;padding:56px 0}
.breadcrumb{color:var(--muted);font-size:14px;margin-bottom:22px}
.breadcrumb a{color:var(--muted)}
.breadcrumb a:hover{color:var(--accent)}
.article h1{font-family:var(--serif);font-size:clamp(28px,4.2vw,42px);line-height:1.28;font-weight:800;color:var(--ink);margin-bottom:18px;letter-spacing:.005em}
.article .byline{color:var(--muted);font-size:14.5px;margin-bottom:10px}
.article .capsule{
  background:var(--accent-soft);border:1px solid #d7e1ff;border-left:4px solid var(--accent);
  border-radius:10px;padding:18px 22px;margin:30px 0;color:#23304d;font-size:16.5px;line-height:1.8;
}
.article .capsule strong{color:var(--accent-ink)}
.article h2{font-family:var(--serif);font-size:25px;font-weight:700;color:var(--ink);margin:46px 0 16px;line-height:1.4}
.article h3{font-size:20px;font-weight:700;color:var(--ink);margin:30px 0 10px}
.article p{margin:16px 0;color:var(--text)}
.article ul,.article ol{margin:16px 0 16px 8px;color:var(--text);padding-left:20px}
.article li{margin:9px 0}
.article strong{color:var(--ink);font-weight:700}

/* Table */
.article table{display:block;overflow-x:auto;-webkit-overflow-scrolling:touch;max-width:100%;border-collapse:collapse;margin:26px 0;font-size:15.5px;border:1px solid var(--line);border-radius:10px}
.article thead th{background:#fafbfc;color:var(--ink);font-weight:800;border-bottom:2px solid var(--ink);font-size:13.5px;letter-spacing:.03em;text-transform:none}
.article th,.article td{padding:13px 15px;text-align:left;vertical-align:top;border-bottom:1px solid var(--line);min-width:140px}
.article tbody tr:nth-child(even){background:var(--bg-soft)}
.article tbody tr:last-child td{border-bottom:none}
.article td{color:var(--text)}

/* FAQ */
.faq{margin-top:40px}
.faq h2{margin-bottom:8px}
.faq details{background:#fff;border:1px solid var(--line);border-radius:12px;padding:6px 20px;margin:12px 0;transition:border-color .15s}
.faq details[open]{border-color:#d7dae1;box-shadow:var(--shadow)}
.faq summary{cursor:pointer;font-weight:700;color:var(--ink);padding:12px 0;list-style:none;position:relative;padding-right:28px}
.faq summary::-webkit-details-marker{display:none}
.faq summary::after{content:"+";position:absolute;right:2px;top:10px;font-size:22px;color:var(--accent);font-weight:400;transition:transform .2s}
.faq details[open] summary::after{transform:rotate(45deg)}
.faq details p{margin:0 0 14px;color:var(--text);font-size:16px}

.disclosure{font-size:13.5px;color:var(--muted);background:var(--bg-soft);border-radius:10px;padding:16px 20px;margin-top:36px;line-height:1.7}

/* ===== Footer ===== */
.site-footer{background:var(--ink);color:#aab0bb;margin-top:64px;padding:48px 0 36px;font-size:14.5px}
.site-footer .cols{display:flex;flex-wrap:wrap;gap:48px;justify-content:space-between}
.site-footer .brand{color:#fff}
.site-footer .brand span{color:#7aa0ff}
.site-footer a{color:#aab0bb}
.site-footer a:hover{color:#fff}
.site-footer p{margin:6px 0}
.site-footer .copy{margin-top:28px;padding-top:20px;border-top:1px solid rgba(255,255,255,.1);color:#7d828c;font-size:13px}

/* ===== 評測元件 Review components ===== */
/* 快速推薦 / TL;DR */
.tldr{background:var(--bg-soft);border:1px solid var(--line);border-radius:var(--radius);padding:24px 26px;margin:30px 0}
.tldr h3{font-family:var(--serif);font-size:18px;color:var(--ink);margin-bottom:16px;display:flex;align-items:center;gap:10px}
.tldr h3::before{content:"";width:4px;height:18px;background:var(--accent);border-radius:2px;display:inline-block}
.tldr .picks{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:14px}
.tldr .pick{display:flex;flex-direction:column;gap:5px;padding:16px 18px;background:#fff;border:1px solid var(--line);border-radius:10px}
.tldr .pick .award{font-size:12px;font-weight:700;color:var(--accent);letter-spacing:.06em}
.tldr .pick .name{font-family:var(--serif);font-weight:700;color:var(--ink);font-size:17px}
.tldr .pick .why{font-size:13.5px;color:var(--muted);line-height:1.6}

/* 獎章 badge */
.badge{display:inline-block;font-size:12px;font-weight:700;letter-spacing:.05em;padding:4px 11px;border-radius:999px;background:var(--accent-soft);color:var(--accent-ink);border:1px solid #d7e1ff;vertical-align:middle}
.badge.gold{background:#fff7e6;color:#9a6a00;border-color:#ffe2a8}
.badge.green{background:#eafaf1;color:#1a7a4a;border-color:#bfe9d2}

/* 評分 */
.score{display:inline-flex;align-items:baseline;gap:3px;font-family:var(--serif);font-weight:900;color:var(--accent);font-size:23px;line-height:1}
.score small{font-size:13px;color:var(--muted);font-weight:400;font-family:var(--sans)}

/* 單一評測對象區塊 */
.review-item{border:1px solid var(--line);border-radius:14px;padding:22px 24px;margin:22px 0;box-shadow:var(--shadow)}
.review-item .head{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;margin-bottom:8px}
.review-item .head h3{font-family:var(--serif);font-size:21px;color:var(--ink);margin:0}
.review-item .head .left{display:flex;align-items:center;gap:10px;flex-wrap:wrap}

/* 優缺點 Pros / Cons */
.proscons{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin:16px 0 4px}
.proscons .col{border:1px solid var(--line);border-radius:12px;padding:16px 18px;background:#fff}
.proscons .pros{border-top:3px solid #1a7a4a}
.proscons .cons{border-top:3px solid #d14343}
.proscons h4{font-size:15px;margin-bottom:10px;color:var(--ink)}
.proscons ul{list-style:none;margin:0;padding:0}
.proscons li{position:relative;padding-left:24px;margin:8px 0;font-size:15px;color:var(--text);line-height:1.6}
.proscons .pros li::before{content:"✓";position:absolute;left:0;color:#1a7a4a;font-weight:800}
.proscons .cons li::before{content:"✕";position:absolute;left:0;color:#d14343;font-weight:800}

/* 比較表：推薦列 highlight */
.article table tr.winner td{background:var(--accent-soft)}
.article table tr.winner td:first-child{box-shadow:inset 4px 0 0 var(--accent);font-weight:700}

/* ===== 中文排版精修 ===== */
html{
  text-spacing-trim:space-all;
  hanging-punctuation:allow-end last;
}
body{ font-feature-settings:"palt" 0; }
h1,h2,h3,h4,.hero h1,.article h1{
  text-wrap:balance;          /* 標題自動平衡換行,不會頭重尾輕 */
  letter-spacing:0;            /* 中文不用負字距 */
}
p,li,.article .capsule,.tldr .pick .why,.tldr .pick .name,.hero p,.trust>p,.trust li,.card p,.card h3,.disclosure,.byline,.proscons li{
  text-wrap:pretty;            /* 段落最後一行不孤兒 */
  line-break:strict;           /* 中文標點符號正確處理 */
  overflow-wrap:break-word;    /* 長英文/網址才斷,中文不被亂斷 */
}
.article p,.article li,.article .capsule{ line-height:1.9; }
.article td,.article th{ line-break:strict; overflow-wrap:break-word; line-height:1.7; }
.article p{ margin:18px 0; }

@media(max-width:640px){
  body{font-size:17px}
  .nav-links{display:none}
  .hero{padding:60px 0 40px}
  .article{padding:40px 0}
  .wrap{padding:0 18px}
  .article table{font-size:14px}
  .article th,.article td{padding:10px 11px}
  .proscons{grid-template-columns:1fr}
}
