:root {
  --ink: #25221f;
  --muted: #675f56;
  --paper: #fbf6ed;
  --paper-2: #f3eadf;
  --panel: #fffdf8;
  --line: #ded3c4;
  --clay: #b86145;
  --sage: #61725f;
  --dark: #2d2a26;
  --shadow: 0 18px 42px rgba(63, 50, 37, .12);
  --radius: 20px;
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans TC", "PingFang TC", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  color: var(--ink);
  overflow-x: hidden;
  background:
    radial-gradient(circle at 95% 5%, rgba(184, 97, 69, .12), transparent 260px),
    radial-gradient(circle at 7% 35%, rgba(97, 114, 95, .12), transparent 300px),
    linear-gradient(135deg, #fffaf2 0%, #f3eadf 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(37, 34, 31, .025) 1px, transparent 1px);
  background-size: 100% 6px;
  mix-blend-mode: multiply;
}

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

button {
  font: inherit;
}

img {
  max-width: 100%;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px 20px;
  padding: 18px clamp(18px, 3vw, 40px);
  background: rgba(251, 246, 237, .84);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(120, 100, 78, .18);
}

.brand {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 11px;
  font-size: 19px;
  font-weight: 900;
  white-space: nowrap;
}

.brand-mark {
  position: relative;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(184, 97, 69, .28);
  border-radius: 11px;
  background:
    linear-gradient(135deg, rgba(184, 97, 69, .98) 0 48%, rgba(255, 253, 248, .7) 48% 51%, rgba(97, 114, 95, .95) 51% 100%);
  box-shadow: inset 0 1px 0 rgba(255, 253, 248, .42), 0 8px 18px rgba(63, 50, 37, .1);
}

.brand-mark::after {
  content: "";
  position: absolute;
  inset: 9px 8px;
  border-top: 2px solid rgba(255, 253, 248, .78);
  border-bottom: 2px solid rgba(255, 253, 248, .42);
  transform: skewX(-12deg);
}

.brand-aqualux {
  display: block;
  flex: 0 0 auto;
  width: 76px;
  height: 34px;
  object-fit: contain;
  object-position: left center;
  mix-blend-mode: multiply;
  opacity: .92;
  filter: contrast(1.06);
}

.nav {
  display: flex;
  flex: 1 1 0;
  justify-content: flex-end;
  min-width: 0;
  gap: 18px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
  overflow-x: auto;
}

.nav a {
  flex: 0 0 auto;
  padding: 8px 0;
  white-space: nowrap;
}

.nav .quest-link {
  border-radius: 999px;
  padding: 8px 13px;
  color: #fffaf2;
  background: var(--dark);
  box-shadow: 0 8px 18px rgba(45, 42, 38, .12);
}

.install-button,
.primary-action,
.secondary-action {
  border: 0;
  border-radius: 999px;
  font-weight: 900;
  cursor: pointer;
}

.install-button {
  padding: 10px 15px;
  color: #fff8ee;
  background: var(--sage);
}

.section-shell {
  position: relative;
  width: min(1460px, calc(100% - 40px));
  margin: 0 auto;
}

.section-shell[data-page]::after {
  content: attr(data-page);
  position: absolute;
  right: 4px;
  bottom: 28px;
  z-index: 1;
  min-width: 42px;
  border: 1px solid rgba(103, 95, 86, .16);
  border-radius: 999px;
  padding: 5px 9px;
  color: rgba(45, 42, 38, .54);
  background: rgba(255, 253, 248, .62);
  font-size: 12px;
  line-height: 1;
  font-weight: 950;
  letter-spacing: 0;
  text-align: center;
  pointer-events: none;
}

.hero {
  min-height: calc(100svh - 72px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 460px;
  gap: clamp(28px, 5vw, 70px);
  align-items: center;
  padding: clamp(56px, 8vw, 96px) 0 48px;
}

.hero-copy,
.course-panel {
  min-width: 0;
}

.section-label {
  margin: 0 0 12px;
  color: var(--sage);
  font-size: 15px;
  line-height: 1.2;
  font-weight: 900;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  color: #171614;
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: 0;
}

h1 {
  max-width: 820px;
  font-size: clamp(54px, 8vw, 112px);
  line-height: .94;
  overflow-wrap: anywhere;
}

h1 span {
  display: block;
}

.lead {
  max-width: 760px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: clamp(19px, 2.3vw, 25px);
  line-height: 1.6;
  font-weight: 680;
  overflow-wrap: anywhere;
}

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

.primary-action,
.secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 13px 20px;
}

.primary-action {
  background: var(--dark);
  color: #fff8ee;
}

.secondary-action {
  color: var(--sage);
  background: rgba(255, 253, 248, .72);
  border: 1px solid var(--line);
}

.course-panel,
.overview,
.formula-card,
.term-link-card,
.detail-grid article,
.research-text,
.practice-text,
.facilitator-card,
.advanced-card,
.source-panel,
.web-card,
.prompt-compare > div {
  border: 1px solid var(--line);
  background: rgba(255, 253, 248, .84);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.course-panel {
  width: 100%;
  overflow: hidden;
}

.panel-top {
  height: 46px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding-left: 18px;
  background: var(--dark);
}

.panel-top span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #d7c6b5;
}

.course-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 20px;
}

.course-metrics div {
  border: 1px solid #e5d9cb;
  border-radius: 16px;
  padding: 16px;
  background: #fffaf3;
}

.course-metrics strong {
  display: block;
  color: var(--clay);
  font-size: 34px;
  line-height: 1;
  margin-bottom: 8px;
}

.course-metrics span,
.lesson-flow span {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.45;
  font-weight: 700;
}

.lesson-flow {
  display: grid;
  gap: 12px;
  list-style: none;
  margin: 0;
  padding: 0 20px 22px;
}

.lesson-flow li {
  padding: 15px;
  border-radius: 15px;
  background: #f5eadc;
}

.lesson-flow b {
  display: block;
  font-size: 18px;
  margin-bottom: 5px;
}

.overview {
  display: grid;
  grid-template-columns: .85fr 1fr;
  gap: 28px;
  align-items: center;
  padding: clamp(24px, 4vw, 36px);
  margin-bottom: 72px;
}

.overview[data-page]::after {
  right: 14px;
  bottom: 14px;
}

.overview h2,
.section-heading h2 {
  font-size: clamp(42px, 5vw, 72px);
  line-height: 1;
}

.overview p,
.section-heading p:not(.section-label) {
  margin: 16px 0 0;
  max-width: 820px;
  color: var(--muted);
  font-size: 19px;
  line-height: 1.62;
  font-weight: 650;
}

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

.quick-grid div,
.quick-grid .quick-card,
.feature-pill {
  border: 1px solid #e5d9cb;
  border-radius: 16px;
  padding: 16px;
  background: #fffaf3;
}

.quick-grid .quick-card {
  display: block;
  border-color: rgba(184, 97, 69, .32);
  background: linear-gradient(135deg, rgba(184, 97, 69, .14), rgba(97, 114, 95, .12)), #fffdf8;
  box-shadow: 0 18px 34px rgba(63, 50, 37, .1);
}

.quick-grid b {
  display: block;
  font-size: 19px;
  margin-bottom: 8px;
}

.quick-grid span {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.45;
  font-weight: 700;
}

section[id] {
  scroll-margin-top: 92px;
  padding: 10px 0 82px;
}

section[id][data-page]::after {
  bottom: 28px;
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  margin-bottom: 26px;
}

.sub-heading {
  margin-top: 42px;
}

.prompt-layout {
  display: grid;
  grid-template-columns: .82fr 1.18fr;
  gap: 22px;
  align-items: stretch;
}

.formula-card {
  padding: 26px;
}

.formula-card h3,
.web-card h3 {
  margin: 0 0 18px;
  color: var(--sage);
  font-size: 29px;
  line-height: 1.15;
}

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

.formula-card li {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 12px;
  padding: 14px;
  border-radius: 15px;
  background: #fffaf3;
  border: 1px solid #e5d9cb;
}

.formula-card b {
  color: var(--clay);
  font-size: 18px;
}

.formula-card span {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.48;
  font-weight: 700;
}

.image-stack,
.comparison-grid {
  display: grid;
  gap: 16px;
}

.image-stack {
  grid-template-columns: repeat(3, 1fr);
}

.asset-card,
.comparison-card,
.gallery-strip button,
.wide-preview {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 253, 248, .84);
  box-shadow: var(--shadow);
  overflow: hidden;
  cursor: zoom-in;
}

.asset-card img,
.comparison-card img,
.gallery-strip img,
.wide-preview img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.asset-card span,
.comparison-card span {
  display: block;
  padding: 13px 15px 15px;
  color: #3b332d;
  font-size: 16px;
  line-height: 1.35;
  font-weight: 850;
}

.numbered-gallery .asset-card img {
  aspect-ratio: 16 / 10;
  object-fit: contain;
  background: #efe5d8;
}

.asset-card .page-code,
.comparison-card .page-code,
.gallery-strip .page-code,
.wide-preview .page-code {
  position: absolute;
  right: 10px;
  bottom: 54px;
  z-index: 2;
  width: auto;
  min-width: 30px;
  padding: 5px 8px;
  border-radius: 999px;
  color: #fff8ee;
  background: rgba(45, 42, 38, .64);
  box-shadow: 0 6px 14px rgba(45, 42, 38, .12);
  font-size: 12px;
  line-height: 1;
  font-weight: 950;
  text-align: center;
}

.gallery-strip .page-code,
.wide-preview .page-code {
  bottom: 10px;
}

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

.term-link-card {
  display: block;
  padding: 20px;
}

.term-link-card b {
  display: block;
  color: var(--clay);
  font-size: 24px;
  margin-bottom: 9px;
}

.term-link-card span {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.5;
  font-weight: 700;
}

.term-link-card:hover,
.term-link-card:focus-visible {
  outline: 2px solid rgba(97, 114, 95, .38);
  outline-offset: 3px;
}

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

.detail-grid article {
  padding: 22px;
  scroll-margin-top: 104px;
}

.detail-grid h3,
.research-text h3 {
  margin: 0 0 10px;
  color: var(--sage);
  font-size: 28px;
  line-height: 1.15;
}

.detail-grid p,
.research-text p {
  margin: 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.58;
  font-weight: 700;
}

.detail-grid ul {
  margin: 14px 0 0;
  padding-left: 20px;
  color: #4b443d;
  font-size: 16px;
  line-height: 1.5;
  font-weight: 750;
}

.research-layout {
  display: grid;
  grid-template-columns: .86fr 1.14fr;
  gap: 22px;
  align-items: start;
}

.research-text {
  padding: 26px;
}

.research-text h3 + p {
  margin-bottom: 22px;
}

.source-note {
  border-radius: 18px;
  background: var(--dark);
  color: #fff8ee;
  padding: 18px 20px;
}

.source-note b,
.source-note span {
  display: block;
}

.source-note b {
  color: #f0c2aa;
  font-size: 18px;
  margin-bottom: 7px;
}

.source-note span {
  font-size: 17px;
  line-height: 1.5;
  font-weight: 760;
}

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

.advanced-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 18px;
}

.advanced-card {
  padding: 24px;
}

.advanced-card h3,
.source-panel h3 {
  margin: 0 0 12px;
  color: var(--sage);
  font-size: 28px;
  line-height: 1.15;
}

.advanced-card p {
  margin: 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.58;
  font-weight: 720;
}

.advanced-card ul {
  margin: 16px 0 0;
  padding-left: 20px;
  color: #4b443d;
  font-size: 16px;
  line-height: 1.5;
  font-weight: 750;
}

.advanced-card li + li {
  margin-top: 8px;
}

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

.tooling-gallery {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.source-panel {
  margin-top: 18px;
  padding: 22px;
}

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

.source-panel a {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  border: 1px solid #e3d8ca;
  border-radius: 999px;
  padding: 8px 13px;
  color: var(--clay);
  background: #fffaf3;
  font-size: 15px;
  font-weight: 850;
}

.practice-layout {
  display: grid;
  grid-template-columns: .82fr 1.18fr;
  gap: 22px;
  align-items: start;
}

.practice-text {
  padding: 26px;
}

.practice-text h3 {
  margin: 0 0 16px;
  color: var(--sage);
  font-size: 30px;
  line-height: 1.15;
}

.practice-text ol {
  display: grid;
  gap: 13px;
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
}

.practice-text li {
  border: 1px solid #e3d8ca;
  border-radius: 15px;
  background: #fffaf3;
  padding: 15px;
}

.practice-text li b {
  display: block;
  color: var(--clay);
  font-size: 18px;
  margin-bottom: 6px;
}

.practice-text li span {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.5;
  font-weight: 720;
}

.practice-images {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.facilitator-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  align-items: start;
}

.facilitator-card {
  padding: 26px;
}

.facilitator-card h3 {
  margin: 0 0 18px;
  color: var(--sage);
  font-size: 30px;
  line-height: 1.15;
}

.timeline-list {
  display: grid;
  gap: 12px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.timeline-list li,
.question-list div {
  border: 1px solid #e3d8ca;
  border-radius: 15px;
  background: #fffaf3;
  padding: 14px 15px;
}

.timeline-list b,
.question-list b {
  display: block;
  color: var(--clay);
  font-size: 18px;
  margin-bottom: 6px;
}

.timeline-list span,
.question-list span {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.48;
  font-weight: 720;
}

.question-list {
  display: grid;
  gap: 12px;
}

.worksheet-link {
  display: inline-flex;
  margin-top: 18px;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 13px 18px;
  background: var(--dark);
  color: #fff8ee;
  font-weight: 900;
}

.gallery-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(220px, 1fr));
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 10px;
  scroll-snap-type: x mandatory;
}

.gallery-strip button {
  min-width: 220px;
  scroll-snap-align: start;
}

.comparison-grid {
  grid-template-columns: repeat(3, 1fr);
}

.web-card {
  display: grid;
  grid-template-columns: 1.08fr .92fr;
  gap: 22px;
  padding: 20px;
}

.web-card .wide-preview {
  align-self: start;
}

.prompt-compare {
  display: grid;
  gap: 14px;
}

.prompt-compare > div {
  box-shadow: none;
  padding: 16px;
}

.prompt-compare b {
  display: block;
  color: var(--clay);
  font-size: 18px;
  margin-bottom: 8px;
}

.prompt-compare p {
  margin: 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.55;
  font-weight: 740;
}

.lightbox {
  width: min(1400px, calc(100vw - 28px));
  max-width: none;
  max-height: calc(100svh - 28px);
  padding: 42px 12px 12px;
  border: 1px solid rgba(222, 211, 196, .5);
  border-radius: 22px;
  background: rgba(37, 34, 31, .92);
  box-shadow: 0 30px 90px rgba(0, 0, 0, .45);
}

.lightbox::backdrop {
  background: rgba(37, 34, 31, .55);
  backdrop-filter: blur(7px);
}

.lightbox img {
  display: block;
  width: 100%;
  max-height: calc(100svh - 96px);
  object-fit: contain;
  border-radius: 14px;
}

.close-lightbox {
  position: absolute;
  top: 10px;
  right: 12px;
  border: 0;
  border-radius: 999px;
  padding: 8px 13px;
  color: #fff8ee;
  background: rgba(255, 253, 248, .16);
  font-size: 14px;
  font-weight: 850;
  cursor: pointer;
}

@media (max-width: 1060px) {
  .topbar {
    align-items: center;
  }

  .nav {
    order: 3;
    flex: 1 0 100%;
    justify-content: flex-start;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    gap: 18px;
    padding-bottom: 2px;
  }

  .hero,
  .overview,
  .prompt-layout,
  .research-layout,
  .practice-layout,
  .facilitator-layout,
  .web-card {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .course-panel {
    max-width: 620px;
  }

  .image-stack,
  .comparison-grid,
  .term-grid,
  .detail-grid,
  .research-images,
  .advanced-grid,
  .expanded-gallery,
  .tooling-gallery,
  .practice-images,
  .facilitator-layout,
  .quick-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 680px) {
  .topbar {
    padding: 14px 16px;
    gap: 12px;
  }

  .brand {
    font-size: 17px;
    gap: 9px;
  }

  .brand-mark {
    width: 32px;
    height: 32px;
    border-radius: 10px;
  }

  .brand-aqualux {
    width: 66px;
    height: 30px;
  }

  .install-button {
    padding: 9px 12px;
  }

  .section-shell {
    width: auto;
    margin-left: 14px;
    margin-right: 14px;
  }

  .hero {
    padding-top: 42px;
  }

  h1 {
    font-size: 44px;
    line-height: 1.04;
    word-break: break-all;
  }

  .lead {
    font-size: 18px;
    word-break: break-all;
  }

  .overview h2,
  .section-heading h2 {
    font-size: clamp(36px, 10vw, 46px);
    line-height: 1.06;
  }

  section[id] {
    scroll-margin-top: 182px;
  }

  .course-metrics,
  .image-stack,
  .comparison-grid,
  .term-grid,
  .detail-grid,
  .research-images,
  .advanced-grid,
  .expanded-gallery,
  .tooling-gallery,
  .practice-images,
  .facilitator-layout,
  .quick-grid {
    grid-template-columns: 1fr;
  }

  .formula-card li {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .gallery-strip {
    grid-template-columns: repeat(6, 82vw);
  }

  .gallery-strip button {
    min-width: 82vw;
  }

  .asset-card span,
  .comparison-card span {
    font-size: 15px;
  }

  .section-shell[data-page]::after {
    right: 2px;
    bottom: 20px;
    transform: scale(.92);
    transform-origin: right bottom;
  }

  .overview[data-page]::after {
    right: 12px;
    bottom: 12px;
  }
}
