/*!
 * Copyright (c) 2025-2026 Eireann Limited. All rights reserved.
 * SPDX-FileCopyrightText: 2025-2026 Eireann Limited
 * SPDX-License-Identifier: LicenseRef-Proprietary
 */

:root {
  --bg: #f4f4f4;
  --red: #ea4948;
  --amber: #f8af3b;
  --ink: #000;
  --line: #6e6e6e;
  --white: #fff;
  --header: 92px;
  --font: "Plus Jakarta Sans", "PingFang HK", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: auto; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
}

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

a { color: inherit; }

.skip {
  position: absolute;
  left: 12px;
  top: -40px;
  background: var(--white);
  padding: 8px 12px;
  z-index: 20;
}

.skip:focus { top: 12px; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.site-header {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto minmax(220px, 1fr);
  align-items: center;
  gap: 16px;
  padding: 18px 36px 8px;
  background: var(--bg);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  justify-self: start;
}

.brand img { width: 72px; height: auto; }

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.brand-en {
  font-size: 22px;
  font-weight: 700;
}

.brand-zh {
  font-size: 30px;
  font-weight: 400;
}

.domain {
  justify-self: center;
  font-size: clamp(22px, 2.4vw, 34px);
  font-weight: 700;
  text-decoration: none;
  text-align: center;
  white-space: nowrap;
}

.nav {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 16px;
}

.nav a { text-decoration: none; }

.nav a:hover,
.nav a[aria-current="page"] { text-decoration: underline; }

.nav-item { position: relative; display: flex; align-items: center; }

.caret {
  width: 22px;
  height: 22px;
  margin-left: 2px;
  border: 0;
  background: transparent;
  cursor: pointer;
  position: relative;
}

.caret::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 7px;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid #000;
}

.submenu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  min-width: 190px;
  margin: 0;
  padding: 6px 0 8px;
  list-style: none;
  background: var(--bg);
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
  z-index: 5;
}

.submenu::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -10px;
  height: 10px;
}

.submenu a {
  display: block;
  padding: 8px 16px;
}

.submenu a:hover { background: #fff; }

.nav-item.is-hover > .submenu,
.nav-item:focus-within > .submenu,
.nav-item.is-open > .submenu { display: block; }

.nav-toggle {
  display: none;
  justify-self: end;
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  display: block;
  width: 22px;
  height: 3px;
  background: #000;
  border-radius: 2px;
  position: relative;
}

.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle-bars::before { top: -7px; }
.nav-toggle-bars::after { top: 7px; }

main { padding: 12px 0 28px; }

.hero-title {
  margin: 18px 0 28px;
  padding: 0 24px;
  text-align: center;
  font-size: clamp(40px, 5.4vw, 76px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.intro {
  display: grid;
  grid-template-columns: minmax(280px, 0.86fr) 1.15fr;
  width: 100%;
  margin: 0 0 40px;
  min-height: 460px;
  background: var(--white);
}

.intro-copy {
  background: var(--white);
  padding: 54px 42px 42px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.intro-copy h2 {
  margin: 0 0 28px;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.25;
  max-width: 280px;
}

.intro-copy p {
  margin: 0 0 36px;
  font-size: 18px;
  line-height: 1.55;
  text-align: left;
  max-width: 420px;
}

.intro-photo { min-height: 420px; background: #e7d7c4; }

.intro-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 148px;
  min-height: 40px;
  padding: 8px 22px;
  border-radius: 999px;
  background: var(--red);
  border: 1px solid var(--red);
  color: #000;
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  text-align: center;
  line-height: 1.2;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.pill:hover,
.pill:focus-visible {
  background: var(--amber);
  border-color: var(--amber);
  outline: none;
}

.pill-cta { min-width: 234px; min-height: 50px; font-size: 16px; }

.page-title {
  margin: 10px 0 6px;
  padding: 0 20px;
  text-align: center;
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.disclaimer-link {
  margin: 0 0 18px;
  padding: 0 20px;
  text-align: center;
  font-size: 14px;
}

.disclaimer-link a { color: #333; }

.pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px 16px;
  max-width: 760px;
  margin: 0 auto 34px;
}

.subject {
  width: 100%;
  margin: 0 0 42px;
  padding: 0 16px;
  scroll-margin-top: 20px;
}

.subject h2 {
  margin: 0 0 12px;
  text-align: center;
  font-size: clamp(26px, 3vw, 34px);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.table-wrap {
  width: max-content;
  max-width: 100%;
  margin: 0 auto;
  height: 280px;
  overflow-x: auto;
  overflow-y: scroll;
  background: var(--white);
  border: 1px solid var(--line);
}

.table-wrap:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}

table {
  width: max-content;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--white);
  font-size: 15px;
}

th, td {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 2px 6px;
  text-align: center;
  font-weight: 500;
  white-space: nowrap;
  line-height: 1.35;
}

th:last-child,
td:last-child { border-right: 0; }

tbody tr:last-child th,
tbody tr:last-child td { border-bottom: 0; }

thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--red);
  font-weight: 700;
  border-bottom: 1px solid var(--line);
}

thead th:first-child {
  left: 0;
  z-index: 3;
}

tbody tr:nth-child(odd) th,
tbody tr:nth-child(odd) td {
  background: var(--white);
}

tbody tr:nth-child(even) th,
tbody tr:nth-child(even) td {
  background: #f3f3f3;
}

.table-error {
  margin: 12px auto 28px;
  max-width: 640px;
  padding: 0 20px;
  text-align: center;
}

tbody th {
  position: sticky;
  left: 0;
  z-index: 1;
  font-weight: 600;
}

.section-link { text-align: center; margin: 18px 0 0; }

.source-note {
  max-width: 980px;
  margin: 8px auto 10px;
  padding: 0 20px;
  font-size: 13px;
  line-height: 1.45;
  scroll-margin-top: 20px;
}

.site-footer {
  margin-top: 18px;
  padding: 26px 36px 18px;
  border-top: 2px solid var(--red);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(260px, 300px) minmax(0, 1fr) max-content;
  column-gap: 40px;
  align-items: start;
  width: 100%;
}

.footer-contact {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  min-width: 0;
  font-size: 16px;
}

.footer-contact img { width: 64px; height: auto; flex: none; }

.footer-contact > div { min-width: 0; }

.footer-contact p { margin: 0 0 2px; }

.footer-legal {
  min-width: 0;
  text-align: right;
  font-size: 14px;
  line-height: 1.45;
  white-space: normal;
}

.footer-legal p {
  margin: 0 0 10px auto;
  max-width: 68ch;
  text-align: right;
  white-space: normal;
}

.footer-links {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

.footer-links a {
  display: block;
  font-size: 14px;
  line-height: 1.35;
  text-decoration: underline;
  white-space: nowrap;
}

.copyright { margin-top: 16px; }

@media (max-width: 900px) {
  .site-header {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "brand toggle"
      "domain domain"
      "nav nav";
    padding: 12px 16px 8px;
  }

  .brand { grid-area: brand; }
  .domain { grid-area: domain; font-size: 26px; justify-self: center; padding: 6px 0 2px; }
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; grid-area: toggle; }
  .nav {
    display: none;
    grid-area: nav;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 0 12px;
    justify-self: stretch;
  }

  .nav.is-open { display: flex; }

  .nav > a,
  .nav-item > a {
    padding: 12px 4px;
  }

  .nav-item { flex-wrap: wrap; }

  .caret { margin-left: auto; }

  .submenu {
    position: static;
    display: none;
    width: 100%;
    box-shadow: none;
    border: 0;
    padding: 0 0 8px 12px;
  }

  .submenu::before { display: none; }

  .nav-item.is-hover > .submenu,
  .nav-item:focus-within > .submenu { display: none; }

  .nav-item.is-open > .submenu { display: block; }

  .intro { grid-template-columns: 1fr; }
  .intro-copy { padding: 32px 22px 28px; }
  .intro-photo { min-height: 280px; }

  .site-footer { padding: 22px 16px 16px; }
}

@media (max-width: 720px) {
  .footer-grid { grid-template-columns: 1fr; row-gap: 18px; }
}

@media (max-width: 640px) {
  .brand img { width: 58px; }
  .brand-en { font-size: 18px; }
  .brand-zh { font-size: 24px; }
  .hero-title { font-size: 32px; line-height: 1.2; padding-inline: 4px; }
  .pills .pill { min-width: 0; flex: 1 1 140px; }
}
