/* ===================================================================
   Doodle Magazine 創業草圖 — 共用樣式
   設計原則：手機優先、手繪草圖風格、可掃讀、不依賴 JavaScript
   視覺系統：暖墨 + 草圖藍 + 紙感底，全部原創 SVG 插圖
   =================================================================== */

:root {
  --ink:        #23202a;   /* 主文字 */
  --ink-soft:   #56505c;   /* 次要文字 */
  --paper:      #fdfbf6;   /* 頁面底（紙感） */
  --paper-2:    #f4efe4;   /* 區塊底 */
  --card:       #ffffff;
  --line:       #e6dfd0;   /* 分隔線 */
  --accent:     #e0653f;   /* 草圖暖橙（重點 / 標題線） */
  --accent-soft:#fff3d6;   /* 插圖淺黃底 */
  --blue:       #2f6f8f;   /* 草圖藍（連結 / 欄目） */
  --yellow:     #ffd76a;   /* 插圖黃 */
  --note-bg:    #fff8e1;   /* 提示框淺黃（規格指定客戶識別色） */
  --note-line:  #e8d9a0;
  --maxw:       800px;
  --radius:     14px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang HK",
               "PingFang TC", "Hiragino Sans GB", "Microsoft YaHei",
               "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.8;
  font-size: 17px;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- 頂部導覽 ---------- */
.site-header {
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(140%) blur(6px);
  position: sticky; top: 0; z-index: 20;
}
.site-header .bar {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.brand {
  font-weight: 800;
  font-size: 19px;
  color: var(--ink);
  letter-spacing: .2px;
  display: flex; align-items: center; gap: 8px;
}
.brand .brand-ico { width: 26px; height: 26px; flex: 0 0 26px; }
.brand small {
  display: block;
  font-weight: 600;
  font-size: 11px;
  color: var(--ink-soft);
  letter-spacing: 1.5px;
}
.site-nav a {
  margin-left: 16px;
  font-size: 14px;
  color: var(--ink-soft);
}
.site-nav a:hover { color: var(--accent); }

/* ---------- 通用容器 ---------- */
.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 18px;
}
main { padding: 30px 0 48px; }

/* ---------- 首頁 Hero（文字＋插圖雙欄） ---------- */
.hero {
  background:
    radial-gradient(circle at 18% 20%, rgba(224,101,63,.06), transparent 40%),
    radial-gradient(circle at 85% 80%, rgba(47,111,143,.07), transparent 45%),
    var(--paper-2);
  border-bottom: 1px solid var(--line);
  padding: 40px 0 34px;
}
.hero .hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 26px;
  align-items: center;
}
.hero .tagline {
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 14px;
  font-weight: 700;
}
.hero h1 {
  font-size: 32px;
  line-height: 1.32;
  margin: 0 0 16px;
  letter-spacing: .3px;
}
.hero h1 .hl {
  background: linear-gradient(transparent 62%, var(--accent-soft) 62%);
  padding: 0 2px;
}
.hero p { color: var(--ink-soft); margin: 12px 0; }
.hero .hero-cta {
  display: inline-block; margin-top: 8px;
  background: var(--accent); color: #fff; font-weight: 700;
  padding: 11px 20px; border-radius: 999px; font-size: 15px;
}
.hero .hero-cta:hover { background: #c9522f; text-decoration: none; }

/* 插圖卡（手繪風：紙卡微微旋轉） */
.hero-art {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px;
  box-shadow: 0 14px 30px rgba(35,32,42,.08);
  transform: rotate(-1.4deg);
}
.hero-art svg { width: 100%; height: auto; display: block; }
.hero-art figcaption {
  font-size: 12px; color: var(--ink-soft); text-align: center;
  margin-top: 6px; letter-spacing: .5px;
}

/* ---------- 區塊標題（手繪波浪底線） ---------- */
.section { margin-top: 46px; }
.section > h2 {
  font-size: 23px;
  margin: 0 0 18px;
  padding-bottom: 10px;
  display: inline-block;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='6'%3E%3Cpath d='M0 3 Q12 0 24 3 T48 3' fill='none' stroke='%23e0653f' stroke-width='2'/%3E%3C/svg%3E");
  background-repeat: repeat-x;
  background-position: left bottom;
}

/* ---------- 文章卡 ---------- */
.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  padding: 20px;
  margin-bottom: 18px;
  transition: box-shadow .18s ease, transform .18s ease;
}
.card:hover { box-shadow: 0 8px 22px rgba(35,32,42,.08); transform: translateY(-2px) rotate(-.3deg); }
.card .eyebrow {
  font-size: 12px;
  letter-spacing: 1px;
  color: var(--accent);
  text-transform: uppercase;
  font-weight: 700;
  margin: 0 0 6px;
}
.card h3 {
  font-size: 19px;
  margin: 0 0 8px;
  line-height: 1.4;
}
.card h3 a { color: var(--ink); }
.card p { color: var(--ink-soft); font-size: 15px; margin: 0 0 10px; }
.card .meta { font-size: 13px; color: var(--ink-soft); }
.card .meta .dot { color: var(--accent); margin: 0 4px; }

/* 卡內小圖示（欄目） */
.card .col-ico { width: 38px; height: 38px; margin-bottom: 8px; display: block; }

/* ---------- 欄目雙欄 ---------- */
.cols-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}
@media (min-width: 640px) {
  .cols-2 { grid-template-columns: 1fr 1fr; }
}

/* ---------- 內容主題：圖示卡 ---------- */
.topic-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 560px) {
  .topic-grid { grid-template-columns: 1fr 1fr; }
}
.topic-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  padding: 20px;
  display: flex; gap: 14px; align-items: flex-start;
  transition: box-shadow .18s ease, transform .18s ease;
}
.topic-card:hover { box-shadow: 0 8px 22px rgba(35,32,42,.08); transform: translateY(-2px); }
.topic-ico {
  flex: 0 0 52px; width: 52px; height: 52px;
  border-radius: 14px;
  background: var(--accent-soft);
  display: grid; place-items: center;
  border: 1px solid var(--line);
}
.topic-ico svg { width: 38px; height: 38px; }
.topic-card h3 { font-size: 17px; margin: 2px 0 6px; }
.topic-card p { font-size: 14px; margin: 0; color: var(--ink-soft); }

/* ---------- 手繪分隔 ---------- */
.doodle-rule {
  display: flex; align-items: center; gap: 14px;
  margin: 34px 0 6px; color: var(--ink-soft);
}
.doodle-rule svg { flex: 1; height: 10px; }
.doodle-rule .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent); flex: 0 0 8px;
}

/* ---------- 文章頁 ---------- */
.article-head { margin-bottom: 8px; }
.article-head .eyebrow {
  font-size: 12px; letter-spacing: 1px; text-transform: uppercase;
  color: var(--accent); font-weight: 700; margin: 0 0 8px;
}
.article-head h1 {
  font-size: 29px; line-height: 1.34; margin: 0 0 12px; letter-spacing: .3px;
}
.deck {
  font-size: 17px; color: var(--ink-soft); margin: 0 0 20px;
}
.editorial-note {
  font-size: 14px; color: var(--ink-soft);
  border-left: 3px solid var(--line); padding: 4px 14px; margin: 0 0 22px;
}

/* 文章英雄圖 */
.article-hero {
  margin: 0 0 26px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: 0 10px 26px rgba(35,32,42,.08);
  background: var(--accent-soft);
  transform: rotate(-.6deg);
}
.article-hero img { width: 100%; display: block; }
.article-hero figcaption {
  font-size: 12px; color: var(--ink-soft);
  padding: 8px 12px; background: #fff; border-top: 1px solid var(--line);
}

/* 文章資料卡 */
.factcard {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin: 0 0 26px;
}
.factcard h2 {
  font-size: 14px; margin: 0 0 10px; color: var(--ink-soft);
  letter-spacing: 1px; text-transform: uppercase;
}
.factcard dl {
  display: grid; grid-template-columns: 96px 1fr; gap: 8px 12px; margin: 0;
  font-size: 14px;
}
.factcard dt { color: var(--ink-soft); font-weight: 700; }
.factcard dd { margin: 0; }
.factcard .disclosure {
  margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line);
  font-size: 13px; color: var(--ink-soft); font-style: italic;
}

/* 編號導覽 */
.toc {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px; margin: 0 0 28px;
}
.toc h2 { font-size: 15px; margin: 0 0 10px; }
.toc ol { margin: 0; padding-left: 22px; }
.toc li { margin: 4px 0; font-size: 15px; }
.toc a { color: var(--ink); }
.toc a:hover { color: var(--accent); }

/* 正文 */
.article-body h2 {
  font-size: 21px; margin: 34px 0 12px;
  padding-top: 8px; border-top: 1px solid var(--line);
}
.article-body h3 { font-size: 17px; margin: 22px 0 8px; }
.article-body p { margin: 12px 0; }
.article-body ul, .article-body ol { padding-left: 22px; }
.article-body li { margin: 6px 0; }

/* 步驟（6 件事）：圖示＋編號 */
.step { margin: 30px 0; }
.step h2 {
  display: flex; align-items: center; gap: 12px;
  border-top: none; padding-top: 0; margin-top: 0;
  background-image: none;
}
.step h2 .h-ico {
  flex: 0 0 46px; width: 46px; height: 46px;
  border-radius: 12px; background: var(--accent-soft);
  border: 1px solid var(--line); display: grid; place-items: center;
}
.step h2 .h-ico svg { width: 32px; height: 32px; }
.step h2 .h-txt { display: block; line-height: 1.35; }

/* 通用：任何 h2 都可加 .has-ico 手繪圖示 */
h2.has-ico,
.article-body h2.has-ico,
.prose h2.has-ico {
  display: flex; align-items: center; gap: 12px;
  border-top: none; padding-top: 0;
}
h2.has-ico .h-ico,
.article-body h2.has-ico .h-ico,
.prose h2.has-ico .h-ico {
  flex: 0 0 44px; width: 44px; height: 44px;
  border-radius: 12px; background: var(--accent-soft);
  border: 1px solid var(--line); display: grid; place-items: center;
}
h2.has-ico .h-ico svg,
.article-body h2.has-ico .h-ico svg,
.prose h2.has-ico .h-ico svg { width: 30px; height: 30px; }
h2.has-ico .h-txt { display: block; }

/* 表格 */
.table-wrap { overflow-x: auto; margin: 16px 0; }
table {
  border-collapse: collapse; width: 100%; font-size: 14px;
  background: #fff;
}
th, td {
  border: 1px solid var(--line); padding: 9px 11px; text-align: left;
  vertical-align: top;
}
th { background: var(--paper-2); font-weight: 700; }

/* 提示框（實務觀點） */
.tip {
  background: var(--note-bg);
  border: 1px solid var(--note-line);
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  padding: 14px 16px;
  margin: 20px 0;
  font-size: 15px;
}
.tip .label {
  display: block; font-weight: 700; color: var(--accent);
  margin-bottom: 6px; font-size: 14px;
}

/* 引語框（pullquote） */
.pullquote {
  position: relative;
  background: var(--paper-2);
  border-left: 5px solid var(--accent);
  border-radius: 0 14px 14px 0;
  padding: 20px 22px 20px 26px;
  margin: 26px 0;
  font-size: 18px; line-height: 1.7; color: var(--ink);
}
.pullquote::before {
  content: "\201C";
  position: absolute; left: 8px; top: -6px;
  font-size: 52px; line-height: 1; color: var(--accent);
  font-family: Georgia, "Times New Roman", serif;
}
.pullquote strong { color: var(--accent); }

/* 參考資料 */
.references { margin-top: 36px; font-size: 14px; color: var(--ink-soft); }
.references h2 { font-size: 16px; color: var(--ink); }
.references ol { padding-left: 22px; }

/* 結語 */
.conclusion {
  margin-top: 30px; padding: 20px; background: var(--card);
  border-radius: var(--radius); border: 1px solid var(--line);
  box-shadow: 0 6px 18px rgba(35,32,42,.05);
}

.disclosure-line {
  margin-top: 26px; padding: 12px 14px; font-size: 13px;
  color: var(--ink-soft); font-style: italic;
  border-top: 1px dashed var(--line);
}

/* ---------- 頁尾 ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--paper-2);
  padding: 26px 0;
  margin-top: 40px;
  font-size: 13px;
  color: var(--ink-soft);
}
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 18px; justify-content: space-between; }
.site-footer a { color: var(--ink-soft); }
.site-footer a:hover { color: var(--accent); }
.site-footer .disc { max-width: 480px; }
.site-footer .brand { font-size: 15px; }

/* ---------- 編採方法頁 ---------- */
.prose p { margin: 14px 0; }
.prose h2 { font-size: 20px; margin: 30px 0 10px; }
.prose ul { padding-left: 22px; }
.callout {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px; margin: 18px 0;
}

/* ---------- 桌面加強 ---------- */
@media (min-width: 760px) {
  .hero .hero-grid { grid-template-columns: 1.05fr .95fr; }
  .hero h1 { font-size: 38px; }
  .article-head h1 { font-size: 34px; }
}
