:root {
  --ink: #17373c;
  --muted: #607579;
  --paper: #fffdf8;
  --surface: #f3f8f6;
  --line: rgba(23, 55, 60, 0.15);
  --teal: #126c71;
  --teal-dark: #0a4f55;
  --gold: #c98b28;
}

* {
  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% 2%, rgba(18, 108, 113, 0.14), transparent 31%),
    radial-gradient(circle at 92% 16%, rgba(201, 139, 40, 0.13), transparent 28%),
    #eaf3f1;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans TC", Arial, sans-serif;
}

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

.resource-shell {
  width: min(1320px, calc(100% - 36px));
  margin: 0 auto;
  padding: 24px 0 48px;
}

.resource-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.9);
}

.back-link:hover,
.back-link:focus-visible,
.download-item:hover,
.download-item:focus-visible {
  outline: 3px solid rgba(18, 108, 113, 0.22);
  outline-offset: 3px;
}

.resource-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: var(--paper);
  box-shadow: 0 28px 72px rgba(23, 55, 60, 0.13);
}

.resource-header {
  padding: 38px 44px 30px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(115deg, rgba(255, 255, 255, 0.97), rgba(242, 249, 246, 0.88)),
    var(--paper);
}

.resource-header > div:first-child {
  max-width: 780px;
}

.eyebrow,
.panel-kicker {
  margin: 0;
  color: var(--teal);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.13em;
}

h1 {
  margin: 8px 0 12px;
  font-family: "Noto Serif TC", "Songti TC", serif;
  font-size: clamp(46px, 5.2vw, 70px);
  line-height: 1.08;
  letter-spacing: 0.02em;
}

.lead {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.75;
}

.resource-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(330px, 0.88fr);
  min-height: 800px;
}

.visual-panel {
  display: grid;
  align-content: start;
  min-width: 0;
  margin: 0;
  padding: 34px;
  border-right: 1px solid var(--line);
  background:
    linear-gradient(rgba(243, 248, 246, 0.94), rgba(238, 246, 243, 0.94)),
    var(--surface);
}

.visual-panel img {
  display: block;
  width: min(100%, 620px);
  height: auto;
  margin: 0 auto;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 18px 44px rgba(23, 55, 60, 0.17);
}

.download-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(32px, 5vw, 70px);
}

.download-panel h2 {
  margin: 10px 0 16px;
  font-family: "Noto Serif TC", "Songti TC", serif;
  font-size: clamp(32px, 3.5vw, 48px);
  line-height: 1.3;
}

.download-panel > p:not(.panel-kicker) {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.8;
}

.download-list {
  display: grid;
  gap: 14px;
  margin: 34px 0;
}

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

.download-item.primary {
  border-color: rgba(18, 108, 113, 0.34);
  background: #f1faf7;
}

.download-item:hover,
.download-item:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(23, 55, 60, 0.11);
}

.file-type {
  display: grid;
  width: 58px;
  height: 58px;
  border-radius: 14px;
  color: #fff;
  background: var(--teal);
  place-items: center;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.05em;
}

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

.download-item strong,
.download-item small {
  display: block;
}

.download-item strong {
  margin-bottom: 4px;
  font-size: 18px;
}

.download-item small {
  color: var(--muted);
  font-size: 13px;
}

.download-item > b {
  color: var(--teal);
  font-size: 22px;
}

.download-panel .notice {
  padding: 15px 17px;
  border-left: 4px solid var(--gold);
  background: #fff8e8;
  color: #74591f;
  font-size: 13px;
  line-height: 1.7;
}

@media (max-width: 960px) {
  .resource-layout {
    grid-template-columns: minmax(0, 1fr) minmax(300px, 0.82fr);
  }

  .visual-panel,
  .download-panel {
    padding: 28px;
  }
}

@media (max-width: 720px) {
  .resource-shell {
    width: min(100% - 20px, 640px);
    padding-top: 10px;
  }

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

  .resource-nav > span {
    padding-top: 12px;
  }

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

  .resource-header {
    padding: 28px 22px 24px;
  }

  h1 {
    font-size: clamp(39px, 12vw, 54px);
  }

  .lead {
    font-size: 16px;
  }

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

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

  .download-panel {
    padding: 30px 22px 34px;
  }

  .download-item {
    grid-template-columns: 50px 1fr auto;
    gap: 12px;
    padding: 12px;
  }

  .file-type {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    font-size: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .download-item {
    transition: none;
  }
}
