:root {
  --ink: #2f4b5c;
  --muted: #6f8795;
  --mist: #dce7ec;
  --paper: #fbfaf7;
  --sand: #c9b79c;
  --white: #ffffff;
  --line: rgba(47, 75, 92, 0.16);
  --shadow: 0 26px 70px rgba(47, 75, 92, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 3%, rgba(201, 183, 156, 0.22), transparent 28%),
    radial-gradient(circle at 92% 18%, rgba(111, 135, 149, 0.2), transparent 30%),
    #edf3f5;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans TC", Arial, sans-serif;
}

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

.skip-link {
  position: fixed;
  z-index: 100;
  top: 10px;
  left: 10px;
  padding: 10px 14px;
  border-radius: 8px;
  color: var(--white);
  background: var(--ink);
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.page-shell {
  width: min(1360px, calc(100% - 36px));
  margin: 0 auto;
  padding: 24px 0 52px;
}

.page-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.back-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.88);
}

.back-link:hover,
.back-link:focus-visible,
.download-item:hover,
.download-item:focus-visible,
.source-links a:hover,
.source-links a:focus-visible {
  outline: 3px solid rgba(111, 135, 149, 0.25);
  outline-offset: 3px;
}

.resource-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.hero {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
  min-height: 350px;
  overflow: hidden;
  padding: clamp(38px, 5vw, 70px);
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(115deg, rgba(251, 250, 247, 0.98) 0%, rgba(251, 250, 247, 0.9) 52%, rgba(220, 231, 236, 0.78) 100%);
}

.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 760px;
}

.eyebrow,
.section-kicker {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.15em;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1,
h2 {
  font-family: "Noto Serif TC", "Songti TC", "STSong", serif;
}

h1 {
  margin: 10px 0 16px;
  font-size: clamp(48px, 5.8vw, 76px);
  line-height: 1.08;
  letter-spacing: 0.03em;
}

.hero-lead {
  max-width: 700px;
  margin: 0;
  color: #586f7c;
  font-size: clamp(17px, 1.8vw, 21px);
  line-height: 1.8;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.hero-tags span,
.format-pill {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 12px;
  border: 1px solid rgba(47, 75, 92, 0.14);
  border-radius: 999px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.66);
  font-size: 12px;
  font-weight: 800;
}

.hero-art {
  position: absolute;
  z-index: 1;
  top: 0;
  right: 0;
  bottom: 0;
  width: 48%;
  overflow: hidden;
}

.sun {
  position: absolute;
  top: 42px;
  right: 22%;
  width: 86px;
  height: 86px;
  border-radius: 50%;
  background: rgba(201, 183, 156, 0.72);
  box-shadow: 0 0 0 22px rgba(201, 183, 156, 0.12);
}

.mountain {
  position: absolute;
  right: -10%;
  bottom: -32%;
  width: 105%;
  height: 88%;
  border-radius: 54% 47% 0 0;
  transform: rotate(-8deg);
}

.mountain-back {
  right: -16%;
  bottom: -28%;
  background: #c7d7de;
}

.mountain-front {
  right: -25%;
  bottom: -50%;
  background: #8ea3ae;
  transform: rotate(-18deg);
}

.path {
  position: absolute;
  right: 18%;
  bottom: -42px;
  width: 58px;
  height: 230px;
  border-radius: 50% 50% 0 0;
  background: rgba(251, 250, 247, 0.78);
  transform: rotate(18deg);
}

.plant {
  position: absolute;
  bottom: 31px;
  width: 8px;
  height: 72px;
  border-radius: 999px;
  background: var(--ink);
  transform-origin: bottom;
}

.plant::before,
.plant::after {
  content: "";
  position: absolute;
  width: 32px;
  height: 14px;
  border-radius: 100% 0 100% 0;
  background: var(--ink);
}

.plant::before {
  top: 17px;
  right: 1px;
  transform: rotate(20deg);
}

.plant::after {
  top: 40px;
  left: 2px;
  transform: scaleX(-1) rotate(17deg);
}

.plant-one {
  right: 9%;
  transform: rotate(7deg);
}

.plant-two {
  right: 3%;
  bottom: 17px;
  height: 54px;
  opacity: 0.72;
  transform: scale(0.8) rotate(-7deg);
}

.resource-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(350px, 0.92fr);
  border-bottom: 1px solid var(--line);
}

.preview-panel,
.download-panel {
  min-width: 0;
  padding: clamp(28px, 4vw, 52px);
}

.preview-panel {
  border-right: 1px solid var(--line);
  background: linear-gradient(160deg, rgba(220, 231, 236, 0.7), rgba(251, 250, 247, 0.52));
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.section-heading h2,
.download-panel h2,
.source-section h2 {
  margin: 7px 0 0;
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.3;
}

.paper-preview {
  width: min(100%, 690px);
  margin: 28px auto 0;
}

.paper-preview img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid rgba(47, 75, 92, 0.12);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 22px 48px rgba(47, 75, 92, 0.2);
}

.download-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--paper);
}

.download-intro {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.8;
}

.download-list {
  display: grid;
  gap: 13px;
  margin: 30px 0;
}

.download-item {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  min-height: 88px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--white);
  box-shadow: 0 10px 24px rgba(47, 75, 92, 0.06);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.download-item.primary {
  border-color: rgba(47, 75, 92, 0.36);
  background: #eef5f7;
}

.download-item.script {
  background: #f8f4eb;
}

.download-item:hover,
.download-item:focus-visible {
  border-color: var(--muted);
  box-shadow: 0 15px 30px rgba(47, 75, 92, 0.12);
  transform: translateY(-2px);
}

.file-type {
  display: grid;
  width: 58px;
  height: 58px;
  border-radius: 15px;
  color: var(--white);
  background: var(--ink);
  place-items: center;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.06em;
}

.download-item:not(.primary) .file-type {
  background: var(--muted);
}

.download-item.script .file-type {
  color: var(--ink);
  background: var(--sand);
}

.file-copy strong,
.file-copy small {
  display: block;
}

.file-copy strong {
  margin-bottom: 5px;
  font-size: 17px;
  line-height: 1.35;
}

.file-copy small {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.download-arrow {
  color: var(--ink);
  font-size: 22px;
  font-weight: 900;
}

.quick-note {
  padding: 18px 20px;
  border-left: 4px solid var(--sand);
  border-radius: 4px 14px 14px 4px;
  background: #f7f2e9;
}

.quick-note strong {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
}

.quick-note p {
  margin: 0;
  color: #637985;
  font-size: 13px;
  line-height: 1.7;
}

.workflow {
  padding: clamp(34px, 5vw, 68px);
  border-bottom: 1px solid var(--line);
  background: #fffefb;
}

.workflow-heading > p {
  max-width: 360px;
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.workflow-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
}

.workflow-grid li {
  min-width: 0;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--paper);
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 30px;
  margin-bottom: 28px;
  border-radius: 999px;
  color: var(--white);
  background: var(--ink);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.workflow-grid h3 {
  margin: 0 0 9px;
  font-size: 19px;
}

.workflow-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.source-section {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(360px, 1.1fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  padding: clamp(34px, 5vw, 64px);
  border-bottom: 1px solid var(--line);
  background: linear-gradient(120deg, #eef4f6, #f7f4ed);
}

.source-section p:not(.section-kicker) {
  margin: 16px 0 0;
  color: var(--muted);
  line-height: 1.75;
}

.source-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.source-links a {
  display: flex;
  align-items: center;
  min-height: 74px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.78);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.5;
}

.source-links a::after {
  content: "↗";
  margin-left: auto;
  padding-left: 10px;
  color: var(--muted);
}

.page-footer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 28px;
  padding: 25px clamp(28px, 5vw, 64px);
  color: #6a7f8a;
  background: var(--paper);
  font-size: 12px;
  line-height: 1.7;
}

.page-footer p {
  max-width: 880px;
  margin: 0;
}

.page-footer span {
  flex: 0 0 auto;
  white-space: nowrap;
  font-weight: 800;
}

@media (max-width: 1020px) {
  .hero {
    grid-template-columns: minmax(0, 1fr) 300px;
  }

  .resource-layout {
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.86fr);
  }

  .preview-panel,
  .download-panel {
    padding: 30px;
  }

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

@media (max-width: 780px) {
  .page-shell {
    width: min(100% - 18px, 660px);
    padding: 10px 0 30px;
  }

  .page-nav {
    align-items: flex-start;
  }

  .page-nav > span {
    padding-top: 12px;
    text-align: right;
  }

  .resource-card {
    border-radius: 20px;
  }

  .hero {
    display: block;
    min-height: 450px;
    padding: 34px 24px 180px;
  }

  .hero-art {
    top: auto;
    width: 100%;
    height: 220px;
  }

  h1 {
    font-size: clamp(44px, 13vw, 62px);
  }

  .resource-layout,
  .source-section {
    grid-template-columns: 1fr;
  }

  .preview-panel {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .section-heading,
  .workflow-heading,
  .page-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .workflow-grid,
  .source-links {
    grid-template-columns: 1fr;
  }

  .workflow-grid li {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 15px;
  }

  .step-number {
    margin-bottom: 0;
  }

  .page-footer span {
    white-space: normal;
  }
}

@media (max-width: 420px) {
  .preview-panel,
  .download-panel,
  .workflow,
  .source-section {
    padding: 24px 18px;
  }

  .download-item {
    grid-template-columns: 48px minmax(0, 1fr) auto;
    gap: 12px;
    padding: 12px;
  }

  .file-type {
    width: 48px;
    height: 52px;
    border-radius: 12px;
  }

  .file-copy strong {
    font-size: 15px;
  }

  .file-copy small {
    font-size: 11px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
