:root {
  --green: #147163;
  --green-dark: #0b4a42;
  --green-soft: #e4f2ef;
  --ink: #17231f;
  --muted: #5c6a66;
  --line: #d9e3df;
  --paper: #fbfcfa;
  --white: #ffffff;
  --amber: #d79a2b;
  --coral: #c85d4b;
  --sky: #3d7e9f;
  --shadow: 0 18px 40px rgba(12, 44, 38, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

a {
  color: var(--green-dark);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
  padding: 12px clamp(18px, 4vw, 56px);
  border-bottom: 1px solid rgba(217, 227, 223, 0.85);
  background: rgba(251, 252, 250, 0.92);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
}

.brand:hover {
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  color: var(--white);
  background: var(--green);
  font-weight: 800;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  color: var(--muted);
  font-size: 0.78rem;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.site-nav a {
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--ink);
  font-weight: 650;
  white-space: nowrap;
}

.site-nav a:hover,
.nav-cta {
  background: var(--green-soft);
  text-decoration: none;
}

.nav-toggle {
  display: none;
}

.home-hero {
  min-height: min(760px, 76vh);
  display: grid;
  align-items: center;
  padding: clamp(56px, 8vw, 112px) clamp(20px, 6vw, 84px);
  color: var(--white);
  background:
    linear-gradient(90deg, rgba(8, 42, 36, 0.9), rgba(8, 42, 36, 0.62) 44%, rgba(8, 42, 36, 0.1)),
    url("/assets/hero-family-prep.png") center right / cover no-repeat;
}

.hero-copy {
  max-width: 700px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--amber);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.home-hero h1,
.page-hero h1 {
  margin: 0;
  max-width: 980px;
  font-size: clamp(2.4rem, 7vw, 5.7rem);
  line-height: 1.03;
  letter-spacing: 0;
}

.home-hero p:not(.eyebrow),
.page-hero p:not(.eyebrow) {
  max-width: 720px;
  margin: 22px 0 0;
  font-size: clamp(1.05rem, 2vw, 1.34rem);
}

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

.button,
button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  color: var(--ink);
  font: inherit;
  font-weight: 750;
  cursor: pointer;
}

.button:hover,
button:hover {
  text-decoration: none;
  border-color: var(--green);
}

.button.primary,
button.primary {
  background: var(--green);
  color: var(--white);
  border-color: var(--green);
}

.button.ghost {
  color: var(--white);
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.42);
}

.button.full {
  width: 100%;
}

.metrics-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-block: 1px solid var(--line);
  background: var(--white);
}

.metrics-strip div {
  padding: 24px clamp(18px, 4vw, 42px);
  border-right: 1px solid var(--line);
}

.metrics-strip div:last-child {
  border-right: 0;
}

.metrics-strip strong {
  display: block;
  color: var(--green);
  font-size: clamp(1.6rem, 4vw, 2.7rem);
  line-height: 1;
}

.metrics-strip span {
  color: var(--muted);
  font-weight: 650;
}

.page-hero {
  padding: clamp(56px, 8vw, 104px) clamp(20px, 6vw, 84px);
  background:
    linear-gradient(135deg, rgba(20, 113, 99, 0.14), rgba(61, 126, 159, 0.1)),
    var(--white);
  border-bottom: 1px solid var(--line);
}

.page-hero h1 {
  color: var(--green-dark);
  font-size: clamp(2.1rem, 5vw, 4.8rem);
}

.page-hero p:not(.eyebrow) {
  color: var(--muted);
}

.content-band {
  padding: clamp(42px, 7vw, 86px) clamp(20px, 6vw, 84px);
}

.content-band.narrow,
.article {
  max-width: 960px;
  margin-inline: auto;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 28px;
}

.section-heading span {
  color: var(--coral);
  font-weight: 850;
  text-transform: uppercase;
  font-size: 0.8rem;
}

.section-heading h2,
.guide-main h2,
.side-panel h2,
.article h2 {
  margin: 4px 0 12px;
  color: var(--green-dark);
  font-size: clamp(1.45rem, 3vw, 2.35rem);
  line-height: 1.15;
}

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

.feature-grid.compact {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.feature-card,
.mini-card,
.side-panel,
.check-panel,
.tool-card,
.result-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.feature-card {
  min-height: 220px;
  padding: 22px;
  display: flex;
  flex-direction: column;
}

.feature-card h3,
.mini-card h3,
.check-panel h3,
.tool-card h3 {
  margin: 0 0 10px;
  font-size: 1.08rem;
  line-height: 1.25;
}

.feature-card p {
  color: var(--muted);
  margin: 0 0 18px;
}

.feature-card a {
  margin-top: auto;
  font-weight: 800;
}

.mini-card {
  min-height: 74px;
  padding: 18px;
  font-weight: 750;
}

.split-band,
.guide-grid,
.profile-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, 0.8fr);
  gap: 28px;
  align-items: start;
}

.check-panel,
.side-panel {
  padding: 24px;
}

.check-panel ol {
  margin: 12px 0 0;
  padding-left: 22px;
}

.plain-list,
.question-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.plain-list li,
.question-list li {
  position: relative;
  padding: 12px 0 12px 26px;
  border-bottom: 1px solid var(--line);
}

.plain-list li::before,
.question-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 22px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--green);
}

.guide-main {
  min-width: 0;
}

.guide-main p,
.article p {
  color: var(--muted);
  font-size: 1.03rem;
}

.lead {
  color: var(--ink) !important;
  font-size: 1.22rem !important;
}

.side-panel {
  position: sticky;
  top: 96px;
}

.side-panel label,
.tool-form label {
  display: block;
  margin: 12px 0;
  color: var(--muted);
  font-weight: 650;
}

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  color: var(--ink);
  font: inherit;
}

input[type="checkbox"] {
  width: auto;
  min-height: auto;
  margin-right: 8px;
  accent-color: var(--green);
}

.step-list {
  display: grid;
  gap: 14px;
  margin-top: 26px;
}

.step-list div {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.step-list span {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--green-soft);
  color: var(--green-dark);
  font-weight: 850;
}

.step-list h3,
.step-list p {
  margin: 0;
}

.step-list p {
  color: var(--muted);
}

.tool-band {
  background: #eef6f4;
  border-block: 1px solid var(--line);
}

.tool-shell {
  max-width: 1120px;
  margin: 0 auto;
}

.tool-card {
  padding: clamp(20px, 4vw, 32px);
}

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

.tool-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.result-panel {
  margin-top: 18px;
  padding: 18px;
  background: var(--paper);
}

.answer-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.answer-grid button {
  justify-content: flex-start;
  min-height: 58px;
  text-align: left;
}

.answer-grid button.correct {
  background: var(--green-soft);
  border-color: var(--green);
}

.answer-grid button.wrong {
  background: #fff0ed;
  border-color: var(--coral);
}

.school-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1.2fr) minmax(180px, 0.6fr) auto;
  gap: 12px;
  margin-bottom: 18px;
}

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

.school-card {
  min-height: 150px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.school-card strong {
  display: block;
  line-height: 1.25;
}

.school-card span {
  display: block;
  margin: 8px 0 14px;
  color: var(--muted);
  font-size: 0.92rem;
}

.link-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.link-cloud a,
.source-grid a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  font-weight: 750;
}

.source-band {
  background: var(--white);
  border-top: 1px solid var(--line);
}

.source-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.fact-list {
  display: grid;
  gap: 10px;
}

.fact-list div {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.fact-list dt {
  font-weight: 850;
}

.fact-list dd {
  margin: 0;
  color: var(--muted);
}

.faq-list details {
  border-bottom: 1px solid var(--line);
  padding: 18px 0;
}

.faq-list summary {
  cursor: pointer;
  font-weight: 850;
}

.site-footer {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) auto;
  gap: 24px;
  padding: 32px clamp(20px, 6vw, 84px);
  color: #d8e7e3;
  background: var(--green-dark);
}

.site-footer p {
  max-width: 760px;
  margin: 8px 0 0;
  color: #b9d2cc;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.footer-links a {
  color: var(--white);
}

@media (max-width: 980px) {
  .site-header {
    align-items: flex-start;
  }

  .nav-toggle {
    display: inline-flex;
    width: 72px;
    min-height: 40px;
    padding: 8px;
  }

  .site-nav {
    display: none;
    position: absolute;
    left: 20px;
    right: 20px;
    top: 68px;
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--white);
    box-shadow: var(--shadow);
  }

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

  .home-hero {
    min-height: 68vh;
    background:
      linear-gradient(180deg, rgba(8, 42, 36, 0.9), rgba(8, 42, 36, 0.62)),
      url("/assets/hero-family-prep.png") center / cover no-repeat;
  }

  .metrics-strip,
  .feature-grid,
  .feature-grid.compact,
  .split-band,
  .guide-grid,
  .profile-layout,
  .tool-row,
  .school-results,
  .site-footer {
    grid-template-columns: 1fr;
  }

  .side-panel {
    position: static;
  }

  .school-toolbar {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .site-header {
    padding-inline: 14px;
  }

  .brand strong {
    max-width: 170px;
    line-height: 1.15;
  }

  .home-hero h1,
  .page-hero h1 {
    font-size: 2.35rem;
  }

  .answer-grid,
  .fact-list div {
    grid-template-columns: 1fr;
  }

  .content-band,
  .page-hero {
    padding-inline: 16px;
  }
}
