:root {
  color-scheme: light;
  --ink: #2f2b26;
  --muted: #756d64;
  --paper: #fffdf8;
  --cream: #fff8eb;
  --line: #e3d8c9;
  --soft: #fff3dc;
  --brand: #4aa692;
  --brand-dark: #2f7458;
  --accent: #ffd45c;
  --alert: #ef5546;
  --grass: #8fc923;
  --shadow: 0 16px 42px rgba(74, 52, 26, .08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    radial-gradient(circle at 85% 0%, rgba(255, 212, 92, .24), transparent 30%),
    linear-gradient(180deg, #fffdf8 0%, var(--cream) 100%);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang TC", "Microsoft JhengHei", "Noto Sans TC", sans-serif;
  letter-spacing: 0;
  line-height: 1.65;
}

body::before {
  content: "";
  position: fixed;
  inset: 0 auto 0 0;
  width: 22px;
  background: linear-gradient(90deg, var(--alert) 0 33%, #f3ae28 33% 66%, var(--grass) 66% 100%);
  z-index: 20;
}

a { color: inherit; }
img { display: block; max-width: 100%; height: auto; }

.page-search {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, .82);
}
.page-search span {
  display: block;
  color: var(--muted);
  font-size: .92rem;
  font-weight: 800;
  white-space: nowrap;
}

input[type="search"] {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 12px 16px;
  background: #fff;
  color: var(--ink);
  font-size: 1rem;
  outline: none;
}
input[type="search"]:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(74, 166, 146, .14);
}

.page-shell {
  width: min(1240px, calc(100% - 64px));
  margin: 0 auto;
  padding: 28px 0 64px 22px;
}
.hero,
.tool-band,
.notice,
.sop-card {
  width: min(1180px, 100%);
  margin: 0 auto 22px;
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .94), rgba(255, 248, 235, .82)),
    var(--paper);
  box-shadow: var(--shadow);
}
.hero::after {
  content: "";
  position: absolute;
  inset: auto 28px 0 auto;
  width: min(360px, 42%);
  height: 10px;
  border-radius: 999px 999px 0 0;
  background: linear-gradient(90deg, var(--alert), #f3ae28, var(--grass), var(--brand));
}
.hero-brand {
  display: flex;
  align-items: center;
}
.hero-brand img { width: 180px; }

.title-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 22px;
  align-items: end;
  margin-top: 28px;
}
.eyebrow {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 1rem;
  font-weight: 800;
}
h1 {
  margin: 0;
  max-width: 100%;
  font-size: clamp(2.1rem, 4.4vw, 4.25rem);
  line-height: 1.12;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}
.meta-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 28px 0 0;
}
.meta-grid div {
  min-width: 0;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, .76);
}
dt {
  color: var(--muted);
  font-size: .78rem;
  font-weight: 800;
}
dd {
  margin: 4px 0 0;
  overflow-wrap: anywhere;
  font-weight: 900;
}

.tool-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}
.section-toc {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(172px, 1fr));
  gap: 10px 12px;
  align-items: stretch;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, .82);
}
.section-toc a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--brand-dark);
  font-size: .96rem;
  line-height: 1.35;
  text-decoration: none;
  font-weight: 800;
  overflow-wrap: anywhere;
}
.section-toc a:hover { background: var(--soft); }
.section-toc a:focus-visible {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(74, 166, 146, .14);
}

.notice,
.sop-card {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: rgba(255, 255, 255, .84);
  box-shadow: 0 10px 28px rgba(74, 52, 26, .05);
}
.notice {
  border-left: 8px solid var(--brand);
  background: linear-gradient(90deg, var(--soft), rgba(255, 255, 255, .88));
}
.notice strong {
  color: var(--brand-dark);
  font-size: 1.08rem;
}
.notice p {
  margin: 8px 0 0;
  color: var(--muted);
  font-weight: 650;
}

.content-area {
  width: min(1180px, 100%);
  margin: 0 auto;
}
.sop-card { scroll-margin-top: 24px; }
.section-heading {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding-bottom: 16px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.section-heading span {
  display: inline-grid;
  place-items: center;
  min-width: 46px;
  height: 46px;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-weight: 900;
}
h2 {
  margin: 0;
  font-size: clamp(1.55rem, 2.4vw, 2.3rem);
  line-height: 1.28;
  letter-spacing: 0;
}

.content-block {
  margin: 16px 0;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--paper);
}
.content-block h3 {
  display: inline-flex;
  align-items: center;
  margin: 0 0 10px;
  padding: 6px 12px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--brand) 13%, white);
  color: var(--brand-dark);
  font-size: 1rem;
  font-weight: 900;
}
.content-block p {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 1.05rem;
}
.line-list {
  display: grid;
  gap: 8px;
}
.line-list p {
  margin: 0;
  padding: 10px 12px 10px 18px;
  border-left: 5px solid var(--accent);
  border-radius: 14px;
  background: #fff;
  text-indent: 0;
}
.sop-visuals {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}
.sop-visuals h3 {
  grid-column: 1 / -1;
}
.sop-visuals figure {
  display: grid;
  place-items: center;
  margin: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}
.sop-visuals img {
  width: 100%;
  max-height: 420px;
  object-fit: contain;
  border-radius: 10px;
}
.section-source {
  margin-top: 14px;
  color: var(--muted);
  font-size: .92rem;
  font-weight: 700;
}

pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fffdf8;
  color: var(--ink);
  font-family: "PingFang TC", "Microsoft JhengHei", "Noto Sans TC", sans-serif;
  line-height: 1.75;
}

.is-hidden { display: none !important; }
mark {
  padding: 0 2px;
  border-radius: 4px;
  background: #fff0a8;
}

@media (max-width: 980px) {
  body::before {
    inset: 0 0 auto 0;
    width: auto;
    height: 14px;
    background: linear-gradient(90deg, var(--alert) 0 33%, #f3ae28 33% 66%, var(--grass) 66% 100%);
  }
  .page-shell {
    width: min(100% - 28px, 1180px);
    padding: 28px 0 44px;
  }
  .title-row {
    display: block;
  }
  .meta-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .hero,
  .notice,
  .sop-card {
    padding: 18px;
    border-radius: 22px;
  }
  .hero-brand {
    display: grid;
    gap: 12px;
  }
  .hero-brand img {
    width: 150px;
  }
  .meta-grid {
    grid-template-columns: 1fr;
  }
  h1 {
    font-size: 2rem;
    max-width: 11em;
  }
  .page-search {
    display: block;
    padding: 16px;
  }
  .page-search span {
    margin-bottom: 8px;
  }
  .section-toc {
    grid-template-columns: 1fr;
    padding: 14px;
  }
  .section-heading {
    display: grid;
  }
  .content-block {
    padding: 14px;
  }
}
