:root {
  color-scheme: light;
  --brand: #a60018;
  --brand-dark: #720010;
  --brand-soft: #fff0f2;
  --ink: #202124;
  --muted: #62666d;
  --line: #dfe1e5;
  --canvas: #f5f6f8;
  --surface: #ffffff;
  --surface-alt: #fafbfc;
  --success: #146c43;
  --success-soft: #eef9f3;
  --warning: #845400;
  --warning-soft: #fff7e6;
  --radius: 1rem;
  --shadow: 0 18px 52px rgba(32, 33, 36, 0.08);
  --content: 72rem;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 8% 0%, rgba(166, 0, 24, 0.075), transparent 28rem),
    var(--canvas);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang TC",
    "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  font-size: 17px;
  line-height: 1.75;
  -webkit-text-size-adjust: 100%;
}

img {
  max-width: 100%;
}

a {
  color: var(--brand-dark);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

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

a:focus-visible,
summary:focus-visible {
  border-radius: 0.25rem;
  outline: 3px solid rgba(166, 0, 24, 0.3);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  top: 0.7rem;
  left: 0.7rem;
  z-index: 50;
  padding: 0.55rem 0.9rem;
  border-radius: 0.5rem;
  background: var(--ink);
  color: #fff;
  transform: translateY(-200%);
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(223, 225, 229, 0.92);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(var(--content), calc(100% - 2rem));
  min-height: 4.35rem;
  margin: 0 auto;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--ink);
  font-weight: 800;
  letter-spacing: 0.01em;
  text-decoration: none;
}

.brand img {
  width: 2.45rem;
  height: 2.45rem;
  border-radius: 0.72rem;
  object-fit: cover;
  box-shadow: 0 4px 14px rgba(32, 33, 36, 0.15);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.92rem;
  font-weight: 700;
}

.site-nav a {
  color: #45484e;
  text-decoration: none;
}

.site-nav a[aria-current="page"] {
  color: var(--brand);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  width: min(var(--content), calc(100% - 2rem));
  margin: 2.5rem auto 1.5rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 1.5rem;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.hero-copy {
  padding: clamp(1.6rem, 5vw, 4rem);
}

.eyebrow {
  margin: 0 0 0.35rem;
  color: var(--brand);
  font-size: 0.82rem;
  font-weight: 850;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(2.15rem, 6vw, 4.25rem);
  line-height: 1.12;
  letter-spacing: -0.045em;
}

.hero-summary {
  max-width: 47rem;
  margin: 1rem 0 0;
  color: #464a50;
  font-size: clamp(1.02rem, 2vw, 1.18rem);
}

.hero-logo-wrap {
  display: grid;
  width: clamp(13rem, 24vw, 20rem);
  min-height: 100%;
  padding: 2.5rem;
  place-items: center;
  background:
    linear-gradient(135deg, rgba(166, 0, 24, 0.08), transparent 62%),
    var(--surface-alt);
}

.hero-logo {
  width: clamp(8rem, 16vw, 12rem);
  aspect-ratio: 1;
  border: 1px solid rgba(166, 0, 24, 0.12);
  border-radius: 2rem;
  object-fit: cover;
  box-shadow: 0 20px 42px rgba(32, 33, 36, 0.16);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  margin-top: 1.3rem;
  gap: 0.65rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.8rem;
  padding: 0.55rem 1rem;
  border: 1px solid var(--brand);
  border-radius: 0.7rem;
  background: var(--brand);
  color: #fff;
  font-size: 0.92rem;
  font-weight: 760;
  text-decoration: none;
}

.button:hover {
  background: var(--brand-dark);
  color: #fff;
}

.button.secondary {
  background: #fff;
  color: var(--brand-dark);
}

.summary-strip {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  background: var(--surface-alt);
}

.summary-item {
  padding: 1rem 1.2rem;
  color: #3e4248;
  font-size: 0.92rem;
  font-weight: 700;
  text-align: center;
}

.summary-item + .summary-item {
  border-left: 1px solid var(--line);
}

.page-shell {
  display: grid;
  grid-template-columns: 16rem minmax(0, 1fr);
  align-items: start;
  width: min(var(--content), calc(100% - 2rem));
  margin: 0 auto 3.5rem;
  gap: 1.5rem;
}

.toc {
  position: sticky;
  top: 5.8rem;
  padding: 1.2rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.toc-title {
  margin: 0 0 0.55rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.08em;
}

.toc ol,
.toc ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.toc a {
  display: block;
  padding: 0.25rem 0;
  color: #4a4e54;
  font-size: 0.88rem;
  text-decoration: none;
}

.toc a:hover {
  color: var(--brand);
}

.document,
.panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 10px 34px rgba(32, 33, 36, 0.05);
}

.document-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  padding: 1.15rem clamp(1.25rem, 4vw, 2.5rem);
  gap: 0.5rem 1.5rem;
  border-bottom: 1px solid var(--line);
  background: var(--brand-soft);
  color: #4e1a22;
  font-size: 0.9rem;
}

.document-body,
.panel {
  padding: clamp(1.4rem, 5vw, 3.25rem);
}

.document-body section + section {
  margin-top: 2.5rem;
  padding-top: 2.25rem;
  border-top: 1px solid var(--line);
}

h2 {
  margin: 0 0 0.9rem;
  font-size: clamp(1.35rem, 3vw, 1.85rem);
  line-height: 1.35;
  letter-spacing: -0.02em;
}

h3 {
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.45;
}

p {
  margin: 0.7rem 0 0;
}

ul,
ol {
  padding-left: 1.25rem;
}

li + li {
  margin-top: 0.4rem;
}

.section-number {
  display: inline-grid;
  width: 2rem;
  height: 2rem;
  margin-right: 0.55rem;
  place-items: center;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-size: 0.92rem;
  font-weight: 850;
  vertical-align: 0.08em;
}

.notice {
  margin-top: 1rem;
  padding: 1rem 1.1rem;
  border-left: 4px solid var(--brand);
  border-radius: 0 0.65rem 0.65rem 0;
  background: var(--brand-soft);
  color: #4d1720;
}

.notice.success {
  border-left-color: var(--success);
  background: var(--success-soft);
  color: #174d35;
}

.notice.warning {
  border-left-color: var(--warning);
  background: var(--warning-soft);
  color: #5d420f;
}

.table-wrap {
  margin-top: 1rem;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 0.8rem;
}

table {
  width: 100%;
  min-width: 42rem;
  border-collapse: collapse;
  background: #fff;
  font-size: 0.91rem;
}

th,
td {
  padding: 0.8rem 0.9rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  background: var(--surface-alt);
  color: #40444a;
  font-size: 0.8rem;
  letter-spacing: 0.02em;
}

tr:last-child td {
  border-bottom: 0;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 1rem;
  gap: 0.85rem;
}

.card {
  padding: 1.05rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  background: var(--surface-alt);
}

.card p {
  color: #555a61;
  font-size: 0.92rem;
}

.contact-card {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 1rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 0.8rem;
}

.contact-item {
  padding: 1rem 1.1rem;
}

.contact-item + .contact-item {
  border-left: 1px solid var(--line);
}

.contact-label {
  display: block;
  margin-bottom: 0.15rem;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.content-stack {
  width: min(var(--content), calc(100% - 2rem));
  margin: 0 auto 3.5rem;
}

.quick-links {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 1.5rem;
  gap: 0.8rem;
}

.quick-link {
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  background: #fff;
  color: #34383e;
  font-size: 0.94rem;
  font-weight: 750;
  text-decoration: none;
  box-shadow: 0 8px 25px rgba(32, 33, 36, 0.04);
}

.quick-link span {
  display: block;
  color: var(--brand);
  font-size: 0.76rem;
  letter-spacing: 0.06em;
}

.panel + .panel {
  margin-top: 1.5rem;
}

.section-label {
  margin: 0 0 0.2rem;
  color: var(--brand);
  font-size: 0.76rem;
  font-weight: 850;
  letter-spacing: 0.1em;
}

.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  gap: 0.85rem;
  list-style: none;
  counter-reset: steps;
}

.steps li {
  position: relative;
  min-height: 11rem;
  padding: 3.55rem 1rem 1rem;
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  background: var(--surface-alt);
  counter-increment: steps;
}

.steps li::before {
  position: absolute;
  top: 1rem;
  left: 1rem;
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand-dark);
  content: counter(steps);
  font-size: 0.9rem;
  font-weight: 850;
}

.steps p {
  color: #555a61;
  font-size: 0.9rem;
}

.file-layout {
  display: grid;
  grid-template-columns: minmax(17rem, 0.85fr) 1.15fr;
  align-items: start;
  gap: 1.3rem;
}

pre {
  margin: 0;
  overflow-x: auto;
  padding: 1.1rem;
  border-radius: 0.8rem;
  background: #202124;
  color: #fff;
  font: 0.88rem/1.7 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.faq details {
  border-top: 1px solid var(--line);
}

.faq details:last-child {
  border-bottom: 1px solid var(--line);
}

summary {
  position: relative;
  padding: 1rem 2.4rem 1rem 0;
  cursor: pointer;
  font-weight: 750;
  list-style: none;
}

summary::-webkit-details-marker {
  display: none;
}

summary::after {
  position: absolute;
  top: 1rem;
  right: 0.3rem;
  color: var(--brand);
  content: "+";
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1;
}

details[open] summary::after {
  content: "−";
}

details > div {
  padding: 0 2.4rem 1rem 0;
  color: #50545b;
}

.choice-list {
  display: grid;
  gap: 0.9rem;
}

.choice {
  display: grid;
  grid-template-columns: 2.4rem minmax(0, 1fr);
  padding: 1rem;
  gap: 0.9rem;
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  background: var(--surface-alt);
}

.choice-number {
  display: grid;
  width: 2.25rem;
  height: 2.25rem;
  place-items: center;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-weight: 850;
}

.choice p {
  color: #555a61;
  font-size: 0.92rem;
}

.site-footer {
  padding: 1.5rem 1rem 3rem;
  color: var(--muted);
  font-size: 0.84rem;
  text-align: center;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.9rem;
}

.not-found {
  display: grid;
  min-height: 72vh;
  padding: 2rem;
  place-items: center;
}

.not-found-card {
  width: min(38rem, 100%);
  padding: clamp(1.5rem, 5vw, 3rem);
  border: 1px solid var(--line);
  border-radius: 1.2rem;
  background: #fff;
  box-shadow: var(--shadow);
  text-align: center;
}

@media (max-width: 860px) {
  .page-shell {
    grid-template-columns: 1fr;
  }

  .toc {
    position: static;
  }

  .toc ol,
  .toc ul {
    columns: 2;
  }

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

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

@media (max-width: 660px) {
  body {
    font-size: 16px;
  }

  .site-nav a:not([aria-current="page"]) {
    display: none;
  }

  .hero {
    grid-template-columns: minmax(0, 1fr) 5.5rem;
    margin-top: 1rem;
    border-radius: 1.1rem;
  }

  .hero-copy {
    padding: 1.5rem;
  }

  .hero-logo-wrap {
    width: 5.5rem;
    padding: 0.5rem;
  }

  .hero-logo {
    width: 4.6rem;
    border-radius: 1.1rem;
  }

  .summary-strip,
  .card-grid,
  .contact-card {
    grid-template-columns: 1fr;
  }

  .summary-item {
    text-align: left;
  }

  .summary-item + .summary-item,
  .contact-item + .contact-item {
    border-top: 1px solid var(--line);
    border-left: 0;
  }
}

@media (max-width: 440px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .hero-logo-wrap {
    display: none;
  }

  .quick-links,
  .steps {
    grid-template-columns: 1fr;
  }

  .steps li {
    min-height: 0;
  }

  .toc ol,
  .toc ul {
    columns: 1;
  }

  .button {
    flex: 1 1 12rem;
  }
}

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

@media print {
  body {
    background: #fff;
    color: #000;
    font-size: 11pt;
  }

  .site-header,
  .toc,
  .summary-strip,
  .hero-actions,
  .quick-links {
    display: none;
  }

  .hero,
  .document,
  .panel {
    border: 0;
    box-shadow: none;
  }

  .hero {
    margin: 0 auto 1rem;
  }

  .hero-copy,
  .document-body,
  .panel {
    padding: 0;
  }

  .hero-logo-wrap {
    width: 7rem;
    padding: 0;
    background: #fff;
  }

  .hero-logo {
    width: 6rem;
    box-shadow: none;
  }

  .page-shell {
    display: block;
    width: 100%;
    margin: 0;
  }

  details > div {
    display: block;
  }
}
