/* Shared styles for every page. Page-specific rules live in /assets/pages/<name>.css,
   loaded after this file, and may override the defaults below. */

/* ---- Defaults (pages may redefine) ---- */
:root {
  --ink: #18202f;
  --muted: #667085;
  --line: #d9dee8;
  --paper: #ffffff;
  --soft: #f6f8fb;
  --brand: #1c3b7f;
  --brand-dark: #142c61;
  --brand-deep: #0b1835;
  --link: #105389;
  --gold: #b9862f;
  --teal: #287d86;
  --green: #4a7a4f;
  --shadow: 0 18px 46px rgba(24, 32, 47, .10);
}

main {
  width: min(1160px, calc(100% - 40px));
  margin: -38px auto 72px;
}

/* ---- Rules shared by the converted pages ---- */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--soft);
  font-family: "Noto Sans TC", "Microsoft JhengHei", system-ui, sans-serif;
  line-height: 1.6;
}

a {
  color: inherit;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.quota-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.quota {
  border: 1px solid #e7ebf2;
  background: #fbfcfe;
  padding: 20px;
  min-height: 150px;
}

.subjects {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #e7ebf2;
  color: #344054;
  font-size: 14px;
}

.req-list {
  margin: 0;
  padding-left: 22px;
  font-size: 15px;
  color: #344054;
}

@media (max-width: 620px) {
  .section-head {
    display: block;
  }

}

.quota .link-row {
  margin-top: 14px;
}

.link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.pill {
  min-height: 30px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  border: 1px solid #e3e8f0;
  background: #f8fafc;
  color: #475467;
  font-size: 13px;
  font-weight: 800;
}

.step em {
  display: block;
  color: var(--teal);
  font-style: normal;
  font-size: 13px;
  font-weight: 900;
}

.flow-step:last-child::after {
  display: none;
}

.guide-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.required-item {
  border: 1px solid var(--line);
  background: #fbfcfe;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 60px;
}

.group-card {
  background: var(--paper);
  border: 1px solid var(--line);
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(24, 32, 47, .05);
}

.group-card .group-head {
  padding: 18px;
  color: #fff;
}

.group-card .group-body {
  padding: 18px;
}

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

.summary-card {
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 20px;
  min-height: 130px;
}

/* ---- Site header ---- */
.topbar {
  border-bottom: 1px solid rgba(255, 255, 255, .18);
  background: var(--brand-dark);
  color: #fff;
}

.topbar-inner {
  width: min(1160px, calc(100% - 40px));
  min-height: 64px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  font-weight: 800;
  text-decoration: none;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .42);
  color: #fff;
  font-size: 14px;
}

.nav {
  display: flex;
  gap: 22px;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

.nav a {
  padding: 4px 0;
  border-bottom: 2px solid transparent;
  color: rgba(255, 255, 255, .86);
  text-decoration: none;
}

.nav a:hover,
.nav a:focus-visible {
  color: #fff;
}

.nav a[aria-current="page"] {
  border-bottom-color: var(--gold);
  color: #fff;
}

.nav-toggle {
  display: none;
  padding: 6px 14px;
  border: 1px solid rgba(255, 255, 255, .5);
  border-radius: 6px;
  background: none;
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

@media (max-width: 860px) {
  .nav-toggle {
    display: block;
  }

  .nav {
    display: none;
    flex-basis: 100%;
    flex-direction: column;
    gap: 0;
    padding-bottom: 12px;
    white-space: normal;
  }

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

  .nav a {
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, .14);
    font-size: 15px;
  }

  .nav a[aria-current="page"] {
    border-bottom-color: rgba(255, 255, 255, .14);
    color: var(--gold);
  }
}

/* ---- Site footer ---- */
.site-footer {
  background: var(--brand-deep, #0b1835);
  color: rgba(255, 255, 255, .78);
  font-size: 14px;
}

.site-footer-inner {
  width: min(1160px, calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
}

.site-footer p {
  margin: 0;
  color: #fff;
  font-weight: 700;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-links a {
  color: rgba(255, 255, 255, .86);
  text-decoration: none;
}

.footer-links a:hover,
.footer-links a:focus-visible {
  color: #fff;
  text-decoration: underline;
}

/* ---- Plain page (home placeholder, 404) ---- */
.plain-card {
  padding: 32px;
  border: 1px solid var(--line);
  background: var(--paper);
  box-shadow: var(--shadow);
}

.plain-card a {
  color: var(--link);
}
