/* waya.tw 共用樣式：純 CSS，手機優先 */
:root {
  --bg: #fbfaf7;
  --surface: #ffffff;
  --text: #1f2328;
  --muted: #5b6470;
  --line: #e3e0d8;
  --brand: #0f5c8c;
  --brand-dark: #0a4468;
  --accent: #e8a33b;
  --pending-bg: #fff4d6;
  --pending-text: #7a5300;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.8;
}

a { color: var(--brand); }
a:hover { color: var(--brand-dark); }

.wrap {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 16px;
}

/* 頁首 */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 20px;
  padding-top: 12px;
  padding-bottom: 12px;
}
.logo {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
  text-decoration: none;
}
.logo span { color: var(--brand); }
.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
}
.site-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] { color: var(--brand); }
.site-nav a[aria-current="page"] { font-weight: 700; }

/* 主內容 */
main { padding: 32px 0 48px; }

h1 {
  font-size: 1.75rem;
  line-height: 1.4;
  margin: 0 0 16px;
}
h2 {
  font-size: 1.3rem;
  line-height: 1.5;
  margin: 40px 0 12px;
  padding-left: 12px;
  border-left: 4px solid var(--accent);
}
h3 {
  font-size: 1.1rem;
  margin: 28px 0 8px;
}
p { margin: 0 0 16px; }

.lead {
  font-size: 1.15rem;
  color: var(--text);
}

.breadcrumb {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 12px;
}

/* 首頁卡片 */
.cards {
  list-style: none;
  padding: 0;
  margin: 24px 0 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
@media (min-width: 640px) {
  .cards { grid-template-columns: 1fr 1fr; }
}
.cards a {
  display: block;
  height: 100%;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px 18px;
  text-decoration: none;
  color: var(--text);
}
.cards a:hover { border-color: var(--brand); }
.cards strong {
  display: block;
  color: var(--brand);
  font-size: 1.05rem;
}
.cards span {
  font-size: 0.95rem;
  color: var(--muted);
}

/* 表格：手機可左右捲 */
.table-scroll {
  overflow-x: auto;
  margin: 0 0 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}
table {
  border-collapse: collapse;
  width: 100%;
  min-width: 520px;
  font-size: 0.95rem;
}
th, td {
  text-align: left;
  vertical-align: top;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}
th { background: #f2efe8; white-space: nowrap; }
tbody th { background: none; font-weight: 400; border-bottom: 1px solid var(--line); }
tr:last-child td, tr:last-child th { border-bottom: 0; }

/* 比較表：手機寬度改成一種一張卡片 */
@media (max-width: 600px) {
  .table-cards {
    overflow: visible;
    border: 0;
    background: none;
  }
  .table-cards table { min-width: 0; }
  .table-cards thead { display: none; }
  .table-cards tbody,
  .table-cards tr,
  .table-cards th,
  .table-cards td { display: block; }
  .table-cards tr {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    margin-bottom: 12px;
    padding: 4px 0;
  }
  .table-cards tbody th {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--brand);
    border-bottom: 1px solid var(--line);
  }
  .table-cards td { border-bottom: 0; padding: 6px 12px; }
  .table-cards td::before {
    content: attr(data-label) "：";
    color: var(--muted);
  }
}

/* LINE QR 碼 */
.line-qr { margin: 8px 0 24px; text-align: left; }
.line-qr img { display: block; width: 180px; height: auto; border: 1px solid var(--line); border-radius: 8px; }
.line-qr figcaption { font-size: 0.95rem; color: var(--muted); margin-top: 6px; }

/* 公式框 */
.formula {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand);
  border-radius: 6px;
  padding: 12px 16px;
  margin: 0 0 16px;
  font-weight: 700;
}

/* 待補標示 */
.pending {
  display: inline-block;
  background: var(--pending-bg);
  color: var(--pending-text);
  border-radius: 4px;
  padding: 0 8px;
  font-size: 0.9em;
  font-weight: 700;
}
.notice {
  background: var(--pending-bg);
  color: var(--pending-text);
  border-radius: 8px;
  padding: 16px 18px;
  margin: 16px 0;
}

/* 聯絡資料 */
.contact-list {
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
}
.contact-list li {
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.contact-list b {
  display: inline-block;
  min-width: 4.5em;
  color: var(--muted);
  font-weight: 400;
}

.cta {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px 18px;
  margin-top: 32px;
}

/* 頁尾 */
.site-footer {
  background: #23272e;
  color: #d6d9de;
  font-size: 0.92rem;
  line-height: 1.9;
}
.site-footer .wrap { padding-top: 28px; padding-bottom: 28px; }
.site-footer a { color: #ffffff; }
.site-footer .company { font-weight: 700; color: #ffffff; margin-bottom: 6px; }
.site-footer p { margin: 0 0 4px; }
.site-footer .links { margin-top: 12px; }
