/* 配色、字體照 200_Reference/writing-samples/social/DESIGN.md */
:root {
  --bg: #d4d8f0;
  --card: #fffffe;
  --text: #232946;
  --text-muted: rgba(35, 41, 70, 0.78); /* 小字要達 WCAG 4.5:1 */
  --main: #b8c1ec;
  --highlight: #eebbc3;
  --stroke: #121629;
  --shadow: 0 4px 16px rgba(35, 41, 70, 0.08);
  --radius: 24px;
  /* 英數字用 Poppins／Inter，中文自動落到 Huninn／Noto Sans TC */
  --font-head: "Poppins", "Huninn", "Noto Sans TC", sans-serif;
  --font-body: "Inter", "Noto Sans TC", sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--font-head); font-weight: 600; line-height: 1.4; margin: 0; }
a { color: inherit; }
[hidden] { display: none !important; }
.wrap { width: 100%; max-width: 760px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--text-muted); }
.center { text-align: center; }
.icon { flex-shrink: 0; color: var(--stroke); vertical-align: -3px; }

.card {
  display: block;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px 22px;
  text-decoration: none;
}
a.card { transition: transform 200ms ease, box-shadow 200ms ease; cursor: pointer; }
a.card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(35, 41, 70, 0.12); }
a:focus-visible, button:focus-visible { outline: 3px solid var(--text); outline-offset: 3px; }

/* 頁首 */
.site-header { position: sticky; top: 0; z-index: 10; background: rgba(212, 216, 240, 0.92); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 14px; padding-bottom: 14px; }
.brand { font-family: var(--font-head); font-weight: 600; font-size: 18px; text-decoration: none; white-space: nowrap; }
.switch { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; text-decoration: none; background: var(--card); padding: 6px 14px; border-radius: 999px; white-space: nowrap; }

/* 首頁 */
.hero { padding: 48px 0 28px; }
.hero h1 { font-size: clamp(30px, 7vw, 44px); }
.lead { font-size: 18px; color: var(--text-muted); margin: 12px 0 0; }
.choose-q { font-size: 20px; margin-bottom: 16px; }
.choose-grid { display: grid; gap: 16px; margin-bottom: 16px; }
@media (min-width: 640px) { .choose-grid { grid-template-columns: 1fr 1fr; } }
.choose-card { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 26px 24px; }
.choose-icon { width: 56px; height: 56px; border-radius: 50%; background: var(--main); display: flex; align-items: center; justify-content: center; margin-bottom: 6px; }
.choose-title { font-family: var(--font-head); font-weight: 600; font-size: 21px; }
.choose-go { position: absolute; right: 22px; top: 26px; }

/* 列表頁 */
.list-head { padding: 32px 0 8px; }
.list-head .muted { margin: 0; font-size: 14px; }
.list-head h1 { font-size: 30px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 8px; }
.pill-btn {
  font: inherit; font-size: 14px; color: var(--text);
  background: var(--card); border: 0; border-radius: 999px; padding: 6px 14px; cursor: pointer;
  transition: background 150ms ease;
}
.pill-btn:hover { background: var(--main); }
.pill-btn.is-active { background: var(--highlight); }
.group { margin: 28px 0; }
.group h2 { font-size: 19px; margin-bottom: 12px; }
.cards { display: grid; gap: 14px; }
.article-card h3 { font-size: 19px; margin: 8px 0 6px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pill { background: var(--main); border-radius: 999px; padding: 1px 12px; font-size: 13px; }
.aud { font-size: 13px; color: var(--text-muted); }
.meta { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; color: var(--text-muted); margin: 0; }
.meta .icon { color: var(--text-muted); }
.empty { margin: 28px 0; text-align: center; color: var(--text-muted); }

/* 文章頁 */
.back { display: inline-flex; align-items: center; gap: 6px; margin: 24px 0 8px; font-size: 15px; text-decoration: none; }
.article-head { margin: 8px 0 20px; }
.article-head h1 { font-size: clamp(26px, 6vw, 36px); margin: 10px 0 6px; }
.prose { padding: 26px 24px; }
.prose h2 { font-size: 21px; margin: 28px 0 10px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 18px; margin: 20px 0 8px; }
.prose p { margin: 0 0 14px; }
.prose ul, .prose ol { padding-left: 1.4em; margin: 0 0 14px; }
.prose li { margin: 4px 0; }
.prose li::marker { color: var(--text-muted); }
strong { font-weight: 700; }
mark { background: var(--highlight); color: var(--text); border-radius: 4px; padding: 0 3px; }
.refs { margin-top: 16px; }
.refs h2 { display: flex; align-items: center; gap: 8px; font-size: 17px; margin-bottom: 6px; }
.refs ul { margin: 0; padding-left: 1.4em; }
.refs a { word-break: break-all; }
.ask { display: flex; align-items: center; gap: 8px; margin: 16px 0 0; }

/* 頁尾 */
.site-footer { padding: 40px 0 48px; text-align: center; font-size: 14px; color: var(--text-muted); }
.site-footer p { margin: 8px 0 0; }
.ig { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; color: var(--text); font-weight: 500; }

@media (max-width: 380px) {
  .wrap { padding: 0 16px; }
  .brand { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
