/* ===========================================================
   Claire Daily — The Knowledge Seeker palette
   Source: Vault/00_CreationSystem/Brand/Characters/
           the-knowledge-seeker/website-palette.md
   自 2026-08-05 起為全站樣式表（_layouts/default.html 引用本檔）
   舊版 style.css 已停用，保留作為歷史紀錄
   =========================================================== */

@import url('https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,600;1,400&family=Plus+Jakarta+Sans:wght@400;500;600&display=swap');

:root {
  /* Primary — 70% */
  --linen:        #FAF8F5;  /* Linen White  主背景 */
  --ivory:        #F6F3EB;  /* Warm Ivory   次背景 */
  --sage-soft:    #C7D6CC;  /* Soft Sage    大區塊 */
  --sage-pale:    #DCE6DE;  /* Pale Sage    hover 底 */
  --sage-mist:    #B7C7BA;  /* Mist Green   UI 表面 */

  /* Accent — 10% */
  --lake:         #71AEA6;  /* Lake Green   填色、裝飾 */
  --lake-deep:    #326B63;  /* Deep Lake    ★ 新增：互動文字用，最低 4.8:1 (AA) */
  --seaglass:     #9FD8D0;  /* Sea Glass    highlight / icon */
  --moss-soft:    #8FA897;  /* Soft Moss    hover / active */
  --sage-grey:    #AAB8AC;  /* Sage Grey    次要 accent */

  /* Text */
  --ink:          #37403B;  /* Forest Ink   標題 */
  --text:         #55615B;  /* Moss Text    內文與小字 */
  --text-light:   #8A938D;  /* Light Text   純裝飾，不承載必要資訊 */

  /* Border */
  --border:       #D9E2DA;  /* Soft Border */
  --border-light: #E9EEEA;  /* Light Border */

  /* Atlas */
  --frost:        #E9F4F2;
  --ice:          #D6F7F2;
  --glow:         #F4FFFD;

  /* 語意別名（元件只引用這一層） */
  --bg:      var(--linen);
  --surface: #FFFFFF;
  --primary: var(--ink);
  --accent:  var(--lake-deep);
  --muted:   var(--text);
  --shadow:  rgba(55, 64, 59, 0.10);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--primary);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

.container {
  width: min(720px, calc(100% - 48px));
  margin: 0 auto;
}

/* ── Header ── */
.site-header {
  border-bottom: 1px solid var(--border);
  padding: 20px 0;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.site-logo {
  font-family: 'Lora', serif;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.site-nav {
  display: flex;
  gap: 24px;
  list-style: none;
}
.site-nav a {
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.15s;
}
.site-nav a:hover,
.site-nav a.active {
  color: var(--lake-deep);
}

/* ── Footer ── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 24px 0;
  text-align: center;
  font-size: 12px;
  color: var(--text);
}

/* ── 首頁 Hero ── */
.hero {
  padding: 80px 0 56px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 56px;
}
.hero h1 {
  font-family: 'Lora', serif;
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 20px;
}
.hero-desc {
  color: var(--text);
  font-size: 1rem;
  line-height: 1.8;
  max-width: 560px;
}

/* ── 最新一篇 ── */
.latest-label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 20px;
}
.latest-label span {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text);
}
.latest-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}
.post-card-featured {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px 32px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.post-card-featured:hover {
  border-color: var(--lake);
  box-shadow: 0 4px 24px var(--shadow);
}
.post-card-featured::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 3px; height: 100%;
  background: var(--lake);
  border-radius: 3px 0 0 3px;
}
.post-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.post-date {
  font-size: 12px;
  color: var(--text);
  font-weight: 500;
}
.post-week {
  font-size: 11px;
  background: var(--ivory);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 8px;
  font-weight: 500;
}
.post-card-featured h2 {
  font-family: 'Lora', serif;
  font-size: 1.45rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--ink);
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}
.post-preview {
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 20px;
}
.read-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--lake-deep);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: gap 0.15s;
}
.read-more:hover { gap: 10px; }
.read-more svg { width: 14px; height: 14px; }

/* ── 社群連結 ── */
.social-section {
  padding: 48px 0 80px;
  border-top: 1px solid var(--border);
  margin-top: 48px;
}
.section-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 16px;
}
.social-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 8px;
}
.social-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  text-decoration: none;
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  transition: border-color 0.15s, background 0.15s;
}
.social-link:hover {
  border-color: var(--lake);
  background: var(--sage-pale);
}
.social-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--seaglass);
  flex-shrink: 0;
}

/* ── Archive / 目錄 ── */
.archive-header {
  padding: 56px 0 40px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 40px;
}
.archive-header h1 {
  font-family: 'Lora', serif;
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 8px;
}
.archive-header p {
  color: var(--text);
  font-size: 0.95rem;
}
.year-group { margin-bottom: 48px; }
.year-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--lake-deep);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.year-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}
.post-list { display: flex; flex-direction: column; gap: 2px; }
.post-list-item {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.15s;
}
.post-list-item:hover { background: var(--sage-pale); }
.post-list-left { flex: 1; min-width: 0; }
.post-list-title {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}
.post-list-item:hover .post-list-title { color: var(--lake-deep); }
.post-list-excerpt {
  font-size: 13px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.post-list-date {
  font-size: 12px;
  color: var(--text);
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

/* ── 文章頁 ── */
.article-header {
  padding: 64px 0 40px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 48px;
}
.article-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 32px;
  transition: color 0.15s;
}
.article-back:hover { color: var(--lake-deep); }
.article-week-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--lake-deep);
  background: var(--frost);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 3px 10px;
  margin-bottom: 16px;
}
.article-header h1 {
  font-family: 'Lora', serif;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 16px;
}
.article-body {
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--text);
  padding-bottom: 80px;
}
.article-body h2,
.article-body h3 {
  font-family: 'Lora', serif;
  color: var(--ink);
  margin: 1.8em 0 0.6em;
  letter-spacing: -0.01em;
}
.article-body a { color: var(--lake-deep); }
.article-body p { margin-bottom: 1.4em; }
.article-body blockquote {
  border-left: 3px solid var(--sage-soft);
  background: var(--ivory);
  padding: 16px 20px;
  border-radius: 0 8px 8px 0;
  margin-bottom: 1.4em;
  color: var(--text);
}
.article-body hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 36px 0;
}
.article-footer {
  border-top: 1px solid var(--border);
  padding: 40px 0 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.subscribe-cta {
  background: var(--ink);
  color: #fff;
  border-radius: 10px;
  padding: 24px 28px;
  flex: 1;
  min-width: 260px;
}
.subscribe-cta h3 {
  font-family: 'Lora', serif;
  font-size: 1.1rem;
  margin-bottom: 6px;
}
.subscribe-cta p {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.78);
  margin-bottom: 16px;
}
.btn-subscribe {
  display: inline-block;
  background: var(--lake-deep);
  color: #fff;
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s;
}
.btn-subscribe:hover { background: #295751; }
.nav-posts {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-end;
  text-align: right;
}
.nav-post-link {
  text-decoration: none;
  color: var(--text);
  font-size: 13px;
  transition: color 0.15s;
}
.nav-post-link:hover { color: var(--lake-deep); }
.nav-post-link strong {
  display: block;
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
}

/* ── 浮動膠囊導覽 ── */
.float-nav {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 4px;
  background: var(--ink);
  border-radius: 999px;
  padding: 6px;
  box-shadow: 0 4px 24px rgba(55, 64, 59, 0.25);
  z-index: 100;
}
.float-nav-item {
  padding: 8px 20px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.78);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}
.float-nav-item:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}
.float-nav-item.active {
  background: var(--lake-deep);
  color: #fff;
}

/* 避免浮動導覽擋住 footer */
.site-footer { margin-bottom: 80px; }

/* ── 分類頁 ── */
.category-group {
  margin-bottom: 48px;
}
.category-title {
  font-family: 'Lora', serif;
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.year-list {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.year-link {
  display: inline-block;
  padding: 10px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  text-decoration: none;
  color: var(--ink);
  font-size: 15px;
  font-weight: 500;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.year-link:hover {
  border-color: var(--lake);
  background: var(--sage-pale);
  color: var(--lake-deep);
}

/* ── 焦點樣式（原本缺，鍵盤操作看不到位置）── */
a:focus-visible,
.btn-subscribe:focus-visible {
  outline: 2px solid var(--lake-deep);
  outline-offset: 3px;
  border-radius: 4px;
}

@media (max-width: 520px) {
  .hero { padding: 48px 0 36px; }
  .hero h1 { font-size: 2rem; }
  .post-card-featured { padding: 20px; }
}
