:root {
  color-scheme: light;
  --bg: #f7f7f3;
  --surface: #ffffff;
  --surface-soft: #f0eee8;
  --ink: #252321;
  --muted: #68615c;
  --line: #d8d2c8;
  --red: #e60012;
  --red-deep: #ab010b;
  --bronze: #945131;
  --gold: #d2a36c;
  --charcoal: #3e3a39;
  --radius: 8px;
  font-family: "Helvetica Neue", "Segoe UI", "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(230, 0, 18, 0.08), transparent 28%),
    linear-gradient(180deg, #ffffff 0, var(--bg) 360px);
  line-height: 1.5;
  letter-spacing: 0;
}

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

.topbar,
main {
  width: min(1320px, calc(100% - 48px));
  margin: 0 auto;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 86px;
  border-bottom: 1px solid var(--line);
}

.brand img {
  display: block;
  width: 178px;
  height: auto;
}

.status-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.status-strip span {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  padding: 7px 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

main {
  padding: 34px 0 56px;
}

.hero {
  min-height: clamp(300px, 42vh, 420px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  gap: 42px;
  align-items: end;
  padding: 30px 0 46px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--red);
  font-size: 13px;
  font-weight: 850;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  max-width: 820px;
  margin-bottom: 18px;
  color: var(--charcoal);
  font-size: clamp(42px, 7vw, 82px);
  line-height: 0.98;
  font-weight: 850;
}

.hero p:not(.eyebrow) {
  max-width: 720px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 18px;
}

.summary-metrics {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin: 0;
  padding: 0;
}

.summary-metrics div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid var(--line);
  padding: 16px 0;
}

.summary-metrics dt {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.summary-metrics dd {
  margin: 0;
  color: var(--charcoal);
  font-size: 19px;
  font-weight: 850;
  text-align: right;
}

.portal-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.portal-card {
  min-height: 430px;
  display: grid;
  align-content: start;
  gap: 24px;
  border: 1px solid var(--line);
  border-top: 5px solid var(--bronze);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 24px;
  box-shadow: 0 18px 36px rgba(62, 58, 57, 0.08);
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.portal-card:hover,
.portal-card:focus-visible {
  border-color: var(--red);
  box-shadow: 0 22px 44px rgba(171, 1, 11, 0.14);
  transform: translateY(-3px);
  outline: none;
}

.portal-card.primary {
  border-top-color: var(--red);
}

.card-code {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--red), var(--red-deep));
  color: #ffffff;
  font-weight: 850;
}

.portal-card h2 {
  margin-bottom: 10px;
  color: var(--charcoal);
  font-size: 25px;
  line-height: 1.18;
}

.portal-card p {
  margin-bottom: 0;
  color: var(--muted);
}

.portal-card ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.portal-card li {
  position: relative;
  padding-left: 18px;
  color: var(--charcoal);
  font-weight: 700;
}

.portal-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.68em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
}

.open-label {
  align-self: end;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  border-bottom: 2px solid var(--red);
  padding-bottom: 4px;
  color: var(--red-deep);
  font-weight: 850;
}

.open-label::after {
  content: "→";
}

@media (max-width: 980px) {
  .hero,
  .portal-grid {
    grid-template-columns: 1fr;
  }

  .portal-card {
    min-height: 0;
  }
}

@media (max-width: 640px) {
  .topbar,
  main {
    width: min(100% - 28px, 1320px);
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
    padding: 18px 0;
  }

  .status-strip {
    justify-content: flex-start;
  }

  main {
    padding-top: 18px;
  }

  .hero {
    gap: 28px;
    padding-bottom: 30px;
  }

  .portal-card {
    padding: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .portal-card {
    transition: none;
  }
}
