:root {
  /* 黃正憲醫師主品牌配色（純淺色模式，無弦月、無陶土） */
  --paper: #FDFAF5;
  --paper-subtle: #F6F1E9;
  --ink: #3A3330;
  --ink-muted: #6B625C;
  --border: #E5DDD2;

  /* 主品牌胭脂色系 */
  --crimson: #8E3B4A;       /* 主品牌連結、強調，對紙 ~7.3:1 */
  --crimson-accent: #B34A5C;/* 淺底短線與裝飾點，對紙 ~4.98:1 */

  /* 公共政策與健保專欄色系 */
  --policy-text: #466C9E;   /* 霧藍深，文字／連結／左側細線，對紙 ~5.2:1 */
  --policy-dot: #8FB0DE;    /* 霧藍，僅作裝飾色點／細線，不當文字 */

  --font-serif: "Noto Serif TC", "Songti TC", "PMingLiU", serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", sans-serif;

  --measure: 720px;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
}

main {
  flex: 1 0 auto;
  padding: 2.5rem 0 4rem;
}

.container {
  width: 100%;
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.skip-link {
  position: absolute;
  left: -9999px;
}
.skip-link:focus {
  position: fixed;
  left: 1rem;
  top: 1rem;
  background: var(--crimson);
  color: var(--paper);
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  z-index: 100;
}

a {
  color: var(--crimson);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
a:hover {
  text-decoration-thickness: 2px;
}

.section-policy a {
  color: var(--policy-text);
}

/* Header */
.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--paper);
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.1rem;
  padding-bottom: 1.1rem;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.brand-lockup {
  display: block;
  height: 44px;
  width: auto;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  font-size: 0.95rem;
}

.site-nav a {
  color: var(--ink);
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--crimson);
  border-bottom-color: var(--crimson-accent);
}

.section-policy .site-nav a[aria-current="page"] {
  color: var(--policy-text);
  border-bottom-color: var(--policy-text);
}

.site-nav .nav-external {
  color: var(--ink-muted);
}

/* Typography */
h1, h2, h3 {
  font-family: var(--font-serif);
  color: var(--ink);
  line-height: 1.4;
  font-weight: 700;
}

h1 {
  font-size: 1.85rem;
  margin: 0 0 0.75rem;
}

h2 {
  font-size: 1.35rem;
  margin: 2.25rem 0 0.75rem;
}

h3 {
  font-size: 1.12rem;
  margin: 1.5rem 0 0.5rem;
}

p {
  margin: 0 0 1.15rem;
}

ul, ol {
  margin: 0 0 1.25rem;
  padding-left: 1.4rem;
}

li {
  margin-bottom: 0.45rem;
}

blockquote {
  margin: 1.5rem 0;
  padding: 0.75rem 1.1rem;
  border-left: 3px solid var(--crimson-accent);
  background: var(--paper-subtle);
  color: var(--ink);
}

.section-policy blockquote {
  border-left-color: var(--policy-text);
}

/* Tables & Numbers (政策文章常用數據表) */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.92rem;
  font-variant-numeric: tabular-nums;
}

th, td {
  text-align: left;
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

th {
  font-weight: 600;
  border-bottom: 2px solid var(--ink);
  background: var(--paper-subtle);
}

/* Wide data tables scroll sideways on phones instead of overflowing the page */
.article-body table {
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.article-body th, .article-body td {
  min-width: 5.5em;
}

/* Figures (static SVG charts) */
figure {
  margin: 2rem 0;
}

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

figcaption {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--ink-muted);
}

.tabular-nums, time {
  font-variant-numeric: tabular-nums;
}

/* Home */
.hero {
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2rem;
}

.hero-rule {
  width: 40px;
  height: 3px;
  background: var(--crimson);
  margin-bottom: 1.25rem;
}

.hero-tagline {
  font-size: 0.95rem;
  color: var(--ink-muted);
  margin-bottom: 0.85rem;
}

.hero-intro {
  font-size: 1.05rem;
  margin-bottom: 0;
}

.section-heading {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 1.25rem;
}

.section-heading h2 {
  margin: 0;
  font-size: 1.25rem;
}

.column-icon {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
}

/* Post list */
.post-list {
  list-style: none;
  padding: 0;
  margin: 0 0 2.5rem;
}

.post-item {
  padding: 1.1rem 0 1.1rem 1rem;
  border-left: 3px solid var(--policy-text);
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.75rem;
}

.post-item-title {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0 0 0.35rem;
  line-height: 1.45;
}

.post-item-title a {
  color: var(--ink);
  text-decoration: none;
}

.post-item-title a:hover {
  color: var(--policy-text);
  text-decoration: underline;
}

.post-meta {
  font-size: 0.88rem;
  color: var(--ink-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin-bottom: 0.4rem;
}

.post-summary {
  font-size: 0.95rem;
  color: var(--ink-muted);
  margin: 0;
}

.empty-state {
  padding: 1.25rem 1.25rem;
  background: var(--paper-subtle);
  border-left: 3px solid var(--policy-dot);
  color: var(--ink-muted);
  font-size: 0.95rem;
  margin-bottom: 2.5rem;
}

/* Cross-link card to KidnSleep */
.sister-box {
  margin-top: 2.5rem;
  padding: 1.25rem 1.4rem;
  background: var(--paper-subtle);
  border: 1px solid var(--border);
  border-radius: 6px;
}

.sister-box h2 {
  font-size: 1.05rem;
  margin: 0 0 0.4rem;
}

.sister-box p {
  font-size: 0.94rem;
  color: var(--ink-muted);
  margin: 0;
}

/* Article page */
.article-header {
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.75rem;
}

.article-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--policy-text);
  margin-bottom: 0.65rem;
}

.article-kicker img {
  width: 22px;
  height: 22px;
}

.disclosure-box {
  margin: 0 0 1.75rem;
  padding: 0.9rem 1.15rem;
  background: var(--paper-subtle);
  border-left: 3px solid var(--policy-text);
  font-size: 0.93rem;
}

.disclosure-label {
  font-weight: 700;
  color: var(--policy-text);
  margin-bottom: 0.25rem;
}

.article-body img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 1.5rem auto;
}

.article-appendix {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.92rem;
}

.article-appendix h2 {
  font-size: 1.08rem;
  margin: 0 0 0.75rem;
}

.revisions-list {
  list-style: none;
  padding: 0;
}

.revisions-list li {
  display: flex;
  gap: 0.75rem;
  color: var(--ink-muted);
}

.signature-wrap {
  margin-top: 2.25rem;
}

.signature-wrap img {
  width: 180px;
  height: auto;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--paper-subtle);
  padding: 2rem 0 2.5rem;
  font-size: 0.86rem;
  color: var(--ink-muted);
}

.footer-identity {
  color: var(--ink);
  font-weight: 600;
  margin-bottom: 0.6rem;
}

.footer-disclaimer {
  margin-bottom: 0.45rem;
  line-height: 1.65;
}

.footer-links {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.55rem;
}

.footer-links a {
  color: var(--crimson);
}

.sep {
  color: var(--border);
}

@media (max-width: 600px) {
  html { font-size: 16px; }
  h1 { font-size: 1.55rem; }
  .brand-lockup { height: 38px; }
}
