:root {
  --primary: #1D3557;
  --primary-deep: #13263f;
  --secondary: #E76F51;
  --secondary-deep: #c85b3f;
  --accent: #F1FAEE;
  --bg: #F1FAEE;
  --bg-alt: #E6EEF2;
  --surface: #FFFFFF;
  --surface-soft: #F7FBFC;
  --text: #17324A;
  --text-muted: #4B6477;
  --border: #C7D6DF;
  --line-blue: #457B9D;
  --shadow: 0 18px 42px rgba(29, 53, 87, 0.12);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --max-width: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: linear-gradient(180deg, var(--bg) 0%, #f7fbf8 48%, var(--bg-alt) 100%);
  color: var(--text);
  font-family: "Inter", "Noto Sans TC", -apple-system, BlinkMacSystemFont, "PingFang TC", "Microsoft JhengHei", sans-serif;
  line-height: 1.72;
}

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

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(calc(100% - 32px), var(--max-width));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(241, 250, 238, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(29, 53, 87, 0.12);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 80px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--primary);
  font-weight: 800;
}

.brand::before {
  content: "";
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #6ea3c2 0%, var(--line-blue) 42%, var(--primary) 100%);
  box-shadow: 0 0 0 5px rgba(69, 123, 157, 0.14);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.main-nav a {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--text-muted);
  font-weight: 700;
}

.main-nav a:hover,
.main-nav a:focus-visible {
  background: rgba(29, 53, 87, 0.08);
  color: var(--primary);
}

.nav-cta,
.button,
.button-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.nav-cta,
.button {
  background: var(--primary);
  color: #f8fcfd;
  box-shadow: 0 14px 32px rgba(29, 53, 87, 0.18);
}

.button-secondary {
  background: rgba(231, 111, 81, 0.12);
  color: var(--secondary-deep);
  border-color: rgba(231, 111, 81, 0.3);
}

.nav-cta:hover,
.button:hover,
.button-secondary:hover {
  transform: translateY(-2px);
}

.hero {
  padding: 78px 0 52px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 28px;
  align-items: stretch;
}

.hero-copy {
  padding: 18px 0;
}

.hero-copy h1,
.section-title,
h1,
h2,
h3,
h4 {
  letter-spacing: -0.02em;
}

.hero-copy h1 {
  margin: 16px 0;
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  line-height: 1.05;
  color: var(--primary-deep);
}

.lede,
.section-sub,
.hero-copy p,
.footer-meta {
  color: var(--text-muted);
}

.hero-panel {
  min-width: 0;
}

.district-map {
  position: relative;
  background: linear-gradient(180deg, #f7fbfd 0%, #edf4f7 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  padding: 22px;
  overflow: hidden;
}

.district-map::before,
.district-map::after,
.accent-line {
  content: "";
  position: absolute;
  left: 22px;
  right: 22px;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--line-blue) 0%, var(--secondary) 100%);
  opacity: 0.9;
}

.district-map::before {
  top: 26px;
}

.district-map::after {
  top: 48px;
}

.accent-line {
  top: 70px;
}

.district-map img {
  width: 100%;
  aspect-ratio: 1216 / 640;
  object-fit: cover;
  border-radius: calc(var(--radius-xl) - 10px);
  border: 1px solid rgba(29, 53, 87, 0.12);
}

.station-chip,
.transit-stop {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(69, 123, 157, 0.12);
  color: var(--primary);
  font-size: 0.84rem;
  font-weight: 800;
}

.station-chip::before,
.transit-stop::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--secondary);
}

.section {
  padding: 74px 0;
}

.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
}

.section-kicker::before {
  content: "";
  width: 12px;
  height: 3px;
  border-radius: 999px;
  background: var(--secondary);
}

.section-title {
  margin: 14px 0 10px;
  font-size: clamp(2rem, 4vw, 3rem);
  color: var(--primary-deep);
}

.card-grid,
.panel-grid,
.footer-grid,
.transit-strip,
.pros-cons {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.street-card,
.kowloon-panel,
.article,
.score-table,
.cta-box,
.faq-block,
.pros-cons,
.article-hero,
.breadcrumbs {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.street-card,
.kowloon-panel {
  position: relative;
  overflow: hidden;
  padding: 22px;
}

.street-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 10px;
  background: linear-gradient(180deg, var(--primary) 0%, var(--line-blue) 100%);
}

.kowloon-panel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 7px;
  background: linear-gradient(90deg, var(--secondary) 0%, #ef9b84 100%);
}

.rank-banner {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--secondary);
  color: #fff8f5;
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.article-thumb {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 16px;
  border: 1px solid rgba(29, 53, 87, 0.12);
  margin-bottom: 16px;
}

.transit-strip {
  margin-top: 24px;
}

.transit-strip > div,
.transit-strip > article,
.transit-strip > section {
  position: relative;
  padding: 22px;
  background: linear-gradient(180deg, rgba(255,255,255,0.96) 0%, rgba(237,244,247,0.96) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.transit-strip > div::before,
.transit-strip > article::before,
.transit-strip > section::before {
  content: "";
  position: absolute;
  top: 18px;
  left: 18px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--secondary);
  box-shadow: 0 0 0 6px rgba(231, 111, 81, 0.14);
}

.article {
  padding: 28px;
}

.article h2 {
  margin-top: 32px;
  color: var(--primary-deep);
  font-size: 1.58rem;
}

.article h3 {
  margin-top: 22px;
  color: var(--primary);
  font-size: 1.14rem;
}

.article-hero {
  overflow: hidden;
  margin: 24px 0;
}

.article-hero img {
  width: 100%;
  aspect-ratio: 1216 / 640;
  object-fit: cover;
}

.breadcrumbs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 16px;
  margin-bottom: 20px;
  color: var(--text-muted);
}

.cta-box {
  padding: 24px;
  margin: 32px 0;
  background: linear-gradient(135deg, rgba(29, 53, 87, 0.07) 0%, rgba(231, 111, 81, 0.12) 100%);
}

.faq-block {
  padding: 24px;
  margin-top: 32px;
}

.faq-block .faq-item + .faq-item {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px dashed rgba(29, 53, 87, 0.18);
}
.faq-q { font-weight: 700; color: var(--primary); margin: 0 0 6px; font-size: 16px; }
.faq-a { color: var(--text-muted); font-size: 14px; line-height: 1.75; margin: 0; }

.score-table {
  padding: 16px;
}

.score-table table {
  width: 100%;
  border-collapse: collapse;
}

.score-table th,
.score-table td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

.pros-cons > div {
  padding: 20px;
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, rgba(255,255,255,0.96) 0%, rgba(237,244,247,0.96) 100%);
}

.site-footer {
  background: linear-gradient(180deg, #17324A 0%, #102337 100%);
  color: #edf6f4;
  padding: 52px 0 28px;
}

.site-footer a {
  color: #d9ebe7;
}

.footer-meta {
  color: rgba(237, 246, 244, 0.74);
}

@media (max-width: 980px) {
  .hero-grid,
  .card-grid,
  .panel-grid,
  .transit-strip,
  .pros-cons,
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .hero-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .main-nav {
    display: none;
  }

  .card-grid,
  .panel-grid,
  .transit-strip,
  .pros-cons,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 56px;
  }

  .hero-copy h1 {
    font-size: 2.35rem;
  }

  .button,
  .button-secondary,
  .nav-cta {
    width: 100%;
  }
}

/* === a11y-override v1 === */
/* 批量抬 CTA tap target 到 WCAG AA 44px，小字 12→14px */
.btn, a.btn, button.btn, .nav-cta, .cta, a.cta, button.cta,
[class*="btn-"], [class*="cta-"] {
  min-height: 44px;
  padding-top: 12px;
  padding-bottom: 12px;
  font-size: 15px;
  line-height: 1.3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn-text, .btn-text:hover { min-height: auto; padding-top: 6px; padding-bottom: 6px; }
.rank-body p, .rank-score small, small, .footer small, footer small,
.disclaimer, .copyright, .muted-small {
  font-size: 14px;
  line-height: 1.6;
}
@media (max-width: 600px) {
  .btn, .nav-cta, .cta, [class*="btn-"] {
    min-height: 48px;
    font-size: 16px;
    width: auto;
  }
}
/* === end a11y-override === */

/* === a11y-override v2 === */
/* R2 mobile 深修：image overlay 吃色 / 灰字對比 / 圖片變形 */

/* 1. image overlay 文字防吃色：凡是疊在圖片上嘅文字都加 text-shadow 同漸層罩 */
.hero, .hero-card, .card-image, .guide-card, [class*="card-"] {
  position: relative;
}
.hero h1, .hero h2, .hero p,
.card-image + *, .guide-card h3, .guide-card p,
[class*="overlay"], [class*="-on-image"] {
  text-shadow: 0 1px 3px rgba(0,0,0,0.6), 0 0 8px rgba(0,0,0,0.4);
}
.hero::after, .guide-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,0.45) 100%);
  pointer-events: none;
  border-radius: inherit;
}
.hero > *, .guide-card > * { position: relative; z-index: 1; }

/* 2. 灰字對比：所有淺灰字統一抬到 #555 (7:1+) */
.muted, .text-muted, .sub, .secondary-text,
[class*="muted"], [class*="-small"], small, .footer small, footer small,
.meta, .card-meta, .label-small, .caption {
  color: #555555 !important;
}
/* --text-muted token 亦強制更新 */
:root {
  --text-muted: #555555 !important;
  --text-secondary: #444444 !important;
}

/* 3. 圖片寬高比鎖定：避免手機下被縱向拉伸 */
.hero img, .card img, .card-image img, .guide-card img,
[class*="-image"] img, article img, .thumb img {
  aspect-ratio: 16 / 9;
  object-fit: cover;
  width: 100%;
  height: auto;
  display: block;
}
.logo img, .icon img, .avatar img { aspect-ratio: auto; }

/* 4. 手機專屬加強 */
@media (max-width: 600px) {
  .hero h1, .hero h2 { text-shadow: 0 2px 4px rgba(0,0,0,0.75); }
  img { max-width: 100%; height: auto; }
}
/* === end a11y-override v2 === */

/* === hero-upgrade v1 === */
/* Hero 視覺升級：漸層遮罩 + 微光 + glow CTA */

.hero {
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: -50%;
  width: 200%;
  height: 100%;
  background: radial-gradient(
    ellipse at 30% 20%,
    rgba(242, 181, 68, 0.06) 0%,
    transparent 50%
  );
  pointer-events: none;
  animation: hero-shimmer 12s ease-in-out infinite;
}
@keyframes hero-shimmer {
  0%, 100% { transform: translateX(-5%); opacity: 0.6; }
  50% { transform: translateX(5%); opacity: 1; }
}

.hero h1 {
  background: linear-gradient(135deg, var(--primary, #17324D) 0%, #2a5a8a 50%, var(--primary, #17324D) 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: hero-title-shine 6s ease-in-out infinite;
}
@keyframes hero-title-shine {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.hero .button,
.hero .btn,
.hero .btn-primary,
.hero a[class*="button"] {
  position: relative;
  box-shadow: 0 0 20px rgba(242, 181, 68, 0.3), 0 4px 12px rgba(0,0,0,0.2);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}
.hero .button:hover,
.hero .btn:hover,
.hero .btn-primary:hover,
.hero a[class*="button"]:hover {
  box-shadow: 0 0 30px rgba(242, 181, 68, 0.5), 0 6px 20px rgba(0,0,0,0.3);
  transform: translateY(-2px);
}

.hero-image,
.hero img:not(.brand-mark):not([class*="icon"]) {
  transition: transform 0.6s ease;
}
.hero:hover .hero-image,
.hero:hover img:not(.brand-mark):not([class*="icon"]) {
  transform: scale(1.03);
}

.hero-section { position: relative; overflow: hidden; }
.hero-section::before {
  content: "";
  position: absolute;
  top: 0; left: -50%; width: 200%; height: 100%;
  background: radial-gradient(ellipse at 30% 20%, rgba(242,181,68,0.06) 0%, transparent 50%);
  pointer-events: none;
  animation: hero-shimmer 12s ease-in-out infinite;
}

@media (max-width: 600px) {
  .hero { padding: 40px 0 36px; }
  .hero h1 { font-size: 28px; line-height: 1.3; }
  .hero .lede { font-size: 15px; }
}
/* === end hero-upgrade === */

