@font-face {
  font-family: "Source Sans 3";
  src: url("../fonts/SourceSans3-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Source Sans 3";
  src: url("../fonts/SourceSans3-Italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Source Sans 3";
  src: url("../fonts/SourceSans3-Semibold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Source Sans 3";
  src: url("../fonts/SourceSans3-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --cyan: #26a7e1;
  --cyan-deep: #0077a8;
  --navy: #0a3d6b;
  --navy-hover: #0d4f86;
  --navy-deep: #072844;
  --ink: #1d2430;
  --muted: #4a5563;
  --line: #d5dee7;
  --page: #e6eef4;
  --paper: #fff;
  --footer: #0d2438;
  --focus: #ffbf47;
  --radius: 3px;
  --font: "Source Sans 3", "Microsoft JhengHei", "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background-color: #dbe9f6;
}

html,
body {
  margin: 0;
  padding: 0;
  color: var(--ink);
  font-family: var(--font);
}

body {
  background-color: #2f8bd3;
  background-image:
    url("../images/bg/sky-bg.svg");
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center top;
  background-attachment: fixed;
}

body.smallFont { font-size: 16px; }
body.mediumFont { font-size: 18px; }
body.largeFont { font-size: 20px; }

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--cyan-deep);
}

a:hover {
  color: var(--navy);
}

:focus {
  outline: none;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -48px;
  z-index: 50;
  background: var(--navy);
  color: #fff;
  padding: 8px 14px;
}

.skip-link:focus {
  top: 12px;
}

.wrap {
  width: min(1140px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  box-shadow: 0 2px 12px rgba(7, 40, 68, 0.08);
}

.utility {
  background: var(--navy-deep);
  color: #fff;
}

.utility-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  min-height: 40px;
}

.font-size {
  display: flex;
  align-items: baseline;
  gap: 2px;
}

.font-size-label {
  margin-right: 8px;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.72);
}

.font-size a {
  color: #fff;
  text-decoration: none;
  padding: 4px 8px;
  border-bottom: 2px solid transparent;
}

.font-size .smallFontSize a { font-size: 13px; }
.font-size .mediumFontSize a { font-size: 16px; }
.font-size .largeFontSize a { font-size: 19px; }

.font-size .current a {
  border-bottom-color: var(--cyan);
}

.brand-bar {
  position: relative;
  z-index: 1;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 8px 18px rgba(7, 40, 68, 0.14);
}

.logos {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 28px;
  padding: 14px 0;
}

.logos img {
  height: 52px;
  width: auto;
  display: block;
}

.hero {
  background: #08121c;
  border-bottom: 4px solid var(--cyan);
}

.hero img {
  display: block;
  width: 100%;
  height: clamp(250px, 40vw, 500px);
  object-fit: cover;
  object-position: 72% center;
}

.action-band {
  background: linear-gradient(100deg, var(--navy-deep), var(--navy));
  color: #fff;
}

.action-row {
  padding: 14px 0;
}

.partners {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 0;
  margin: 0;
  padding: 0;
  list-style: none;
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.45;
}

.partners li:not(:last-child)::after {
  content: "·";
  margin: 0 10px;
  color: rgba(255, 255, 255, 0.45);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  background: var(--cyan);
  color: #062033;
  text-decoration: none;
  font-weight: 700;
  box-shadow: inset 0 -3px 0 rgba(6, 32, 51, 0.16);
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: #7ad2f0;
  color: #062033;
  transform: translateY(-1px);
}

.btn-block {
  width: 100%;
  margin-bottom: 18px;
  background: var(--navy);
  color: #fff;
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.2);
}

.btn-block:hover,
.btn-block:focus-visible {
  background: var(--navy-hover);
  color: #fff;
}

main {
  padding: 36px 0 72px;
}

.content-shell {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 44px 48px 52px;
  background:
    linear-gradient(145deg, rgba(38, 167, 225, 0.055), transparent 28%),
    linear-gradient(180deg, #fff 0%, #fbfdff 100%);
  border: 1px solid rgba(213, 222, 231, 0.92);
  border-radius: 18px;
  box-shadow:
    0 24px 60px rgba(7, 40, 68, 0.18),
    0 6px 18px rgba(7, 40, 68, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.content-shell::before {
  content: "";
  position: absolute;
  z-index: 2;
  top: 0;
  right: 0;
  left: 0;
  height: 6px;
  background: linear-gradient(90deg, var(--navy-deep), var(--cyan) 55%, #72d4f3);
}

.content-shell::after {
  content: "";
  position: absolute;
  z-index: -1;
  top: -150px;
  right: -110px;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(38, 167, 225, 0.11), transparent 68%);
  pointer-events: none;
}

.page-title {
  position: relative;
  margin: 0 0 32px;
  padding: 4px 0 22px 22px;
  border-bottom: 1px solid var(--line);
}



.eyebrow {
  margin: 0 0 12px;
  color: var(--cyan-deep);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.page-title h1 {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 28em;
  color: var(--navy-deep);
}

.page-title-kicker {
  display: block;
  font-size: clamp(1.85rem, 3.4vw, 2.55rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.025em;
  color: var(--navy-deep);
}

.page-title-sub {
  display: block;
  padding-top: 10px;
  font-size: clamp(1.05rem, 1.6vw, 1.22rem);
  font-weight: 600;
  line-height: 1.4;
  color: var(--navy);
}

.layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}

@media (min-width: 880px) {
  .layout {
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
    gap: 48px;
    align-items: start;
  }
}

/* Coming soon: no draft content in the page until chapters are confirmed */
.layout--coming-soon {
  display: block;
}

.layout--coming-soon .coming-soon {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 300px;
  padding: 48px 24px;
  text-align: center;
  background: linear-gradient(180deg, #f4f8fb, #fff);
  border: 1px solid var(--line);
  border-top: 3px solid var(--navy);
  border-radius: var(--radius);
}

.coming-soon-label {
  margin: 0;
  font-size: clamp(1.5rem, 2.6vw, 1.95rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--navy-deep);
}

.coming-soon-label::after {
  content: "";
  display: block;
  width: 56px;
  height: 3px;
  margin: 14px auto 0;
  background: var(--cyan);
}

.coming-soon-text {
  margin: 0;
  max-width: 30em;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.55;
}

.intro h2,
.contents h2,
.resources h2 {
  margin: 0 0 14px;
  padding-bottom: 8px;
  font-size: 1.2rem;
  color: var(--navy);
  
}

.intro p {
  margin: 0 0 1em;
  line-height: 1.7;
  text-align: justify;
}

.intro .intro-lede {
  color: #293b4c;
  font-size: 1.08em;
  line-height: 1.68;
}

.contents {
  padding: 18px 18px 8px;
  background:
    linear-gradient(180deg, #f4f8fb, #fff);
  border: 1px solid var(--line);
  border-top: 3px solid var(--navy);
  border-radius: var(--radius);
  box-shadow: 0 6px 18px rgba(7, 40, 68, 0.06);
}

.contents-note {
  margin: -2px 0 8px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.4;
}

@media (min-width: 880px) {
  .contents {
    position: sticky;
    top: 144px;
  }
}

.chapter-list {
  margin: 0;
  padding-left: 1.25rem;
}

.chapter-list li {
  margin: 0;
  padding: 10px 0;
  border-bottom: 1px solid #e6edf2;
  line-height: 1.45;
}

.chapter-list li:last-child {
  border-bottom: 0;
}

.chapter-list li::marker {
  color: var(--navy);
  font-weight: 700;
}

.chapter-list a {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--cyan-deep);
  text-decoration: none;
}

.chapter-list a::after {
  content: "→";
  flex: 0 0 auto;
  color: var(--navy);
  font-weight: 700;
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.chapter-list a:hover,
.chapter-list a:focus-visible {
  color: var(--navy);
  text-decoration: underline;
}

.chapter-list a:hover::after,
.chapter-list a:focus-visible::after {
  opacity: 1;
  transform: translateX(0);
}

.resources {
  margin-top: 40px;
  padding: 24px;
  background: linear-gradient(180deg, #f4f9fc, #fff);
  border: 1px solid var(--line);
  border-top: 3px solid var(--cyan);
  border-radius: var(--radius);
}

.resources ul {
  margin: 0;
  padding-left: 1.2rem;
}

.resources li {
  margin: 10px 0;
  line-height: 1.5;
}

.resources a {
  font-weight: 600;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.site-footer {
  background: var(--footer);
  color: rgba(255, 255, 255, 0.84);
  padding: 36px 0 28px;
  border-top: 4px solid var(--cyan);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 800px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr auto;
    align-items: start;
  }
}

.footer-heading {
  margin: 0 0 10px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--cyan);
}

.footer-links {
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-links a,
.site-footer p a {
  color: #fff;
  text-decoration: none;
}

.footer-links a:hover,
.site-footer p a:hover,
.footer-links a:focus-visible,
.site-footer p a:focus-visible {
  color: var(--cyan);
  text-decoration: underline;
}

.footer-links li + li {
  margin-top: 6px;
}

.site-footer p {
  margin: 0;
  line-height: 1.55;
}

.footer-meta {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.site-footer img {
  width: 96px;
  padding: 4px;
}

@media (max-width: 879px) {
  body {
    background-attachment: scroll;
    overflow-x: hidden;
  }

  .wrap {
    width: min(1140px, calc(100% - 24px));
  }

  .site-header {
    position: sticky;
    top: 0;
  }

  .utility-row {
    min-height: 44px;
  }

  .font-size-label {
    font-size: 0.75rem;
  }

  .font-size a {
    min-width: 40px;
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .logos {
    gap: 10px 16px;
    padding: 10px 0;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .logos::-webkit-scrollbar {
    display: none;
  }

  .logos a {
    flex: 0 0 auto;
  }

  .logos img {
    height: 34px;
  }

  .hero {
    border-bottom-width: 3px;
  }

  .hero img {
    height: min(50vw, 260px);
    min-height: 180px;
    object-position: 88% center;
  }

  .partners {
    flex-direction: column;
    gap: 4px;
    font-size: 0.88rem;
  }

  .partners li:not(:last-child)::after {
    content: none;
    margin: 0;
  }

  main {
    padding: 22px 0 44px;
  }

  .content-shell {
    padding: 28px 22px 34px;
    border-radius: 14px;
    box-shadow:
      0 16px 36px rgba(7, 40, 68, 0.16),
      0 4px 12px rgba(7, 40, 68, 0.08);
  }

  .page-title {
    margin-bottom: 22px;
    padding: 2px 0 18px 14px;
  }

  .page-title::before {
    top: 4px;
    bottom: 20px;
    width: 3px;
  }

  .eyebrow {
    font-size: 0.72rem;
    letter-spacing: 0.12em;
  }

  .page-title h1 {
    max-width: none;
    gap: 8px;
  }

  .page-title-kicker {
    font-size: 1.7rem;
  }

  .page-title-sub {
    padding-top: 8px;
    font-size: 1.02rem;
  }

  .layout {
    gap: 22px;
  }

  .layout--coming-soon .coming-soon {
    gap: 12px;
    min-height: 220px;
    padding: 36px 18px;
  }

  .coming-soon-text {
    font-size: 0.98rem;
  }

  .contents {
    order: -1;
    padding: 16px 14px 6px;
  }

  .intro p,
  .intro .intro-lede {
    text-align: left;
    font-size: 1em;
    line-height: 1.65;
  }

  .intro h2,
  .contents h2,
  .resources h2 {
    font-size: 1.12rem;
  }

  .btn-block {
    min-height: 50px;
    margin-bottom: 14px;
  }

  .chapter-list {
    padding-left: 1.1rem;
  }

  .chapter-list li {
    padding: 0;
  }

  .chapter-list a {
    min-height: 48px;
    align-items: center;
    padding: 10px 0;
  }

  .chapter-list a::after {
    opacity: 0.45;
    transform: none;
  }

  .resources {
    margin-top: 22px;
    padding: 16px;
  }

  .resources li {
    margin: 0;
  }

  .resources a {
    display: inline-block;
    padding: 8px 0;
    overflow-wrap: anywhere;
  }

  .site-footer {
    padding: 28px 0 calc(24px + env(safe-area-inset-bottom));
  }

  .footer-grid {
    gap: 22px;
  }

  .site-footer p a {
    overflow-wrap: anywhere;
  }
}

@media (max-width: 480px) {
  .wrap {
    width: calc(100% - 16px);
  }

  .logos img {
    height: 30px;
  }

  .hero img {
    min-height: 160px;
    height: 180px;
  }

  .content-shell {
    padding: 22px 16px 28px;
    border-radius: 10px;
  }

  .page-title {
    padding-left: 12px;
  }

  .page-title-kicker {
    font-size: 1.48rem;
  }

  .page-title-sub {
    font-size: 0.98rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .btn-primary {
    transition: none;
  }
}

@media print {
  body {
    background: #fff;
  }

  .site-header,
  .action-band,
  .skip-link {
    display: none;
  }

  .hero img,
  .content-shell {
    box-shadow: none;
    border: 0;
  }

  .content-shell::before,
  .content-shell::after {
    display: none;
  }

  a {
    color: #000;
  }
}
