/* owl SDD 看板 — owl 紫 / 銅金 / 綠 主題 */
:root {
  --owl: #5b3a8c;
  --owl-deep: #3d2563;
  --brass: #c79a3b;
  --accent: #2f9e6e;
  --bg: #f6f4fa;
  --surface: #ffffff;
  --ink: #241a33;
  --muted: #7a7088;
  --line: #e4def0;
  --todo: #cfc8db;
  --shadow: 0 1px 3px rgba(61, 37, 99, .08), 0 6px 20px rgba(61, 37, 99, .06);
}
* { box-sizing: border-box; }
html { font-size: 18px; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: "Noto Sans TC", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65; font-size: 1rem;
}
.site-header {
  display: flex; align-items: baseline; gap: 20px; flex-wrap: wrap;
  padding: 24px 40px; background: linear-gradient(100deg, var(--owl-deep), var(--owl));
  color: #fff; box-shadow: var(--shadow);
}
.brand { font-size: 1.55rem; font-weight: 700; color: #fff; text-decoration: none; }
.tagline { font-size: .92rem; opacity: .82; }
main { max-width: 1560px; margin: 0 auto; padding: 32px 28px 72px; }

.legend {
  display: flex; gap: 36px; flex-wrap: wrap; font-size: .9rem; color: var(--muted);
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  padding: 16px 24px; margin-bottom: 28px;
}
.legend strong { color: var(--owl); }

/* ── Kanban ── */
/* flex + wrap：有卡片的欄位 grow 變寬，空欄位收窄成細欄 */
.board { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.col { flex: 1 1 360px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px; }
.col--empty { flex: 0 1 150px; background: #faf8fd; }
.col--empty .col__title { font-size: .9rem; color: var(--muted); }
.col--empty .col__count { background: var(--todo); }
.col__title { margin: 4px 6px 16px; font-size: 1rem; color: var(--owl-deep); display: flex; align-items: center; gap: 10px; font-weight: 700; }
.col__count { background: var(--owl); color: #fff; border-radius: 20px; font-size: .78rem; padding: 2px 11px; font-weight: 600; }
.col__body { display: flex; flex-direction: column; gap: 16px; }
.col__empty { color: var(--todo); text-align: center; padding: 14px 0; font-size: 1rem; }

/* ── 卡片 ── */
.card {
  display: block; text-decoration: none; color: inherit;
  background: #fff; border: 1px solid var(--line); border-left: 5px solid var(--brass);
  border-radius: 12px; padding: 18px 18px; box-shadow: var(--shadow);
  transition: transform .12s ease, box-shadow .12s ease;
}
.card:hover { transform: translateY(-2px); box-shadow: 0 8px 26px rgba(61,37,99,.14); }
.card__head { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 6px; }
.card__title { font-size: 1.08rem; margin: 0; font-weight: 600; line-height: 1.4; }
.card__name { font-size: .8rem; color: var(--muted); font-family: ui-monospace, monospace; margin-bottom: 14px; word-break: break-all; }

/* ── 狀態 badge ── */
.badge { font-size: .72rem; font-weight: 700; padding: 3px 10px; border-radius: 7px; white-space: nowrap; text-transform: uppercase; letter-spacing: .04em; }
.badge--draft { background: #efeaf6; color: var(--owl); }
.badge--plan { background: #fdf3dc; color: #9a7414; }
.badge--design { background: #fdf3dc; color: #9a7414; }
.badge--story { background: #e7f5ef; color: var(--accent); }
.badge--tasks { background: #e7f5ef; color: var(--accent); }
.badge--implementing { background: #e3eefb; color: #2667c4; }
.badge--verified { background: #d9f2e6; color: #157a51; }
.badge--archived { background: #ede9f3; color: var(--muted); }

/* ── prospec stepper ── */
.stepper { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-bottom: 15px; }
.step { font-size: .8rem; padding: 3px 10px; border-radius: 20px; border: 1px solid var(--line); color: var(--todo); white-space: nowrap; }
.step--done { background: var(--accent); border-color: var(--accent); color: #fff; }
.step--current { background: #fff; border: 2px solid var(--brass); color: #9a7414; font-weight: 700; padding: 2px 9px; }
.step--todo { color: var(--todo); }
.step--optional { color: var(--muted); border-style: dashed; }
.step-arrow { color: var(--todo); font-size: .8rem; }

/* ── 跨 repo lane ── */
.repo-lane { display: flex; align-items: stretch; gap: 6px; }
.repo { flex: 1; border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; background: #faf8fd; min-width: 0; }
.repo__name { font-size: .74rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.repo__stage { font-size: .92rem; font-weight: 700; margin: 2px 0; }
.repo__note { font-size: .72rem; color: var(--muted); line-height: 1.4; }
.repo-arrow { align-self: center; color: var(--brass); font-weight: 700; font-size: 1.1rem; }
.repo--intent { border-left: 3px solid var(--owl); }
.repo--intent .repo__stage { color: var(--owl); }
.repo--pending { border-left: 3px solid var(--brass); }
.repo--pending .repo__stage { color: #9a7414; }
.repo--exploring, .repo--planning, .repo--implementing { border-left: 3px solid #2667c4; }
.repo--implementing .repo__stage { color: #2667c4; }
.repo--done { border-left: 3px solid var(--accent); }
.repo--done .repo__stage { color: var(--accent); }
.repo--n-a { opacity: .55; }
.repo--n-a .repo__stage { color: var(--muted); }
/* 卡片上只顯示 repo 名 + 階段，note 留到細節頁；讓卡片更緊湊 */
.card .repo__note { display: none; }
.card .repo { padding: 8px 10px; }

/* ── 細節頁 ── */
.detail { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 32px 40px; box-shadow: var(--shadow); max-width: 1080px; margin: 0 auto; }
.back { color: var(--owl); text-decoration: none; font-size: .92rem; }
.back:hover { text-decoration: underline; }
.detail__head { margin: 16px 0 22px; }
.detail__head h1 { font-size: 1.7rem; margin: 12px 0 6px; line-height: 1.3; }
.detail__name { font-size: .85rem; color: var(--muted); font-family: ui-monospace, monospace; }
.detail__progress { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; padding: 22px; background: #faf8fd; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 28px; }
.progress-block h4 { margin: 0 0 12px; font-size: .85rem; color: var(--owl-deep); letter-spacing: .02em; }
@media (max-width: 820px) { .detail__progress { grid-template-columns: 1fr; } }

/* ── tabs ── */
.tabs { display: flex; flex-wrap: wrap; gap: 8px; border-bottom: 2px solid var(--line); margin-bottom: 24px; }
.tab { background: none; border: none; padding: 11px 18px; font-size: .95rem; cursor: pointer; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -2px; font-family: inherit; }
.tab--on { color: var(--owl); font-weight: 700; border-bottom-color: var(--brass); }
.tab:hover { color: var(--owl); }
.pane { display: none; }
.pane--on { display: block; }

/* ── markdown ── */
.md { font-size: 1rem; }
.md h1, .md h2, .md h3 { color: var(--owl-deep); margin-top: 1.5em; }
.md h1 { font-size: 1.5rem; }
.md h2 { font-size: 1.25rem; border-bottom: 1px solid var(--line); padding-bottom: 7px; }
.md h3 { font-size: 1.1rem; }
.md code { background: #f0ecf7; padding: 2px 6px; border-radius: 4px; font-size: .9em; }
.md pre { background: #2a2236; color: #eee; padding: 16px; border-radius: 8px; overflow: auto; }
.md pre code { background: none; color: inherit; }
.md table { border-collapse: collapse; width: 100%; font-size: .9rem; margin: 1em 0; }
.md th, .md td { border: 1px solid var(--line); padding: 9px 12px; text-align: left; vertical-align: top; }
.md th { background: #f4f0fa; color: var(--owl-deep); }
.md blockquote { border-left: 3px solid var(--brass); margin: 1em 0; padding: 6px 16px; color: var(--muted); background: #faf8fd; }
.md ul, .md ol { padding-left: 1.4em; }
.md li { margin: .3em 0; }

/* ── specs section ── */
.section-title { color: var(--owl-deep); font-size: 1.2rem; margin: 44px 0 18px; display: flex; align-items: center; gap: 10px; }
.specs { margin-top: 16px; }
.spec-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.spec-card { display: flex; flex-direction: column; gap: 7px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 18px; text-decoration: none; color: inherit; box-shadow: var(--shadow); }
.spec-card:hover { border-color: var(--brass); transform: translateY(-2px); transition: transform .12s ease; }
.spec-card__id { font-size: .82rem; color: var(--muted); font-family: ui-monospace, monospace; }
.spec-card__title { font-size: 1.05rem; font-weight: 600; }

.muted { color: var(--muted); }
.site-footer { text-align: center; color: var(--muted); font-size: .85rem; padding: 32px; }
.site-footer code { background: #ede9f3; padding: 2px 6px; border-radius: 4px; }
