:root {
  color-scheme: light;
  --ink: #172724;
  --muted: #506762;
  --paper: #f4f7f5;
  --surface: #ffffff;
  --line: #ccd9d5;
  --soft-line: #e3ebe8;
  --teal: #0a5f57;
  --teal-dark: #06443f;
  --teal-soft: #dcefeb;
  --amber: #9a4318;
  --amber-soft: #f8e9df;
  --red: #8a2f2a;
  --red-soft: #f7e6e4;
  --shadow: 0 22px 60px rgba(25, 55, 49, 0.12);
  --radius-lg: 30px;
  --radius-md: 20px;
  --radius-sm: 12px;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans TC", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% -10%, rgba(31, 132, 118, 0.18), transparent 34rem),
    linear-gradient(180deg, #eef5f2 0, var(--paper) 34rem);
  line-height: 1.65;
}

a { color: inherit; }

.site-header,
main,
footer {
  width: min(1180px, calc(100% - 36px));
  margin-inline: auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 0;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font-weight: 750;
  text-decoration: none;
}

.back-link span:first-child {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.75);
}

.header-status {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.84rem;
}

.header-status span { color: var(--muted); }

.header-status strong {
  padding: 7px 12px;
  color: var(--teal-dark);
  border: 1px solid #9ec7bf;
  border-radius: 999px;
  background: var(--teal-soft);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.75fr);
  gap: 34px;
  align-items: center;
  min-height: 610px;
  padding: 72px 68px;
  overflow: hidden;
  border: 1px solid rgba(10, 95, 87, 0.2);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(241, 248, 246, 0.9)),
    repeating-linear-gradient(90deg, transparent 0 64px, rgba(10, 95, 87, 0.06) 64px 65px);
  box-shadow: var(--shadow);
}

.eyebrow,
.section-heading > p,
.closing-panel > div > p {
  margin: 0 0 12px;
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

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

h1 {
  max-width: 800px;
  margin: 0;
  font-size: clamp(2.5rem, 5.8vw, 5.2rem);
  line-height: 1.06;
  letter-spacing: -0.055em;
}

.hero-lede {
  max-width: 760px;
  margin: 28px 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.7vw, 1.22rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.hero-actions a,
.closing-panel a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 800;
  text-decoration: none;
}

.primary-action {
  color: #fff;
  background: var(--teal);
  box-shadow: 0 10px 26px rgba(10, 95, 87, 0.24);
}

.secondary-action { border: 1px solid var(--line); background: #fff; }

.release-card {
  padding: 24px;
  border: 1px solid #b8d1cc;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 16px 34px rgba(31, 72, 64, 0.11);
}

.release-card-heading {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.release-card-heading p { margin: 0; color: var(--muted); font-size: 0.8rem; }
.release-card-heading strong { display: block; line-height: 1.35; }

.status-dot {
  flex: 0 0 auto;
  width: 12px;
  height: 12px;
  margin-top: 6px;
  border: 3px solid #bce1d9;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 4px rgba(10, 95, 87, 0.1);
}

.release-card dl { margin: 24px 0 18px; }
.release-card dl div { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--soft-line); }
.release-card dt { color: var(--muted); }
.release-card dd { margin: 0; font-size: 0.78rem; font-weight: 850; }
.release-card .pass { color: var(--teal); }
.release-card .pending { color: var(--amber); }
.release-card .blocked { color: var(--red); }
.release-card > p { margin: 0; color: var(--muted); font-size: 0.9rem; }

.section-nav {
  position: sticky;
  top: 12px;
  z-index: 20;
  display: flex;
  gap: 6px;
  width: max-content;
  max-width: 100%;
  margin: 20px auto 0;
  padding: 7px;
  overflow-x: auto;
  border: 1px solid rgba(163, 190, 183, 0.8);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 30px rgba(25, 55, 49, 0.1);
  backdrop-filter: blur(14px);
}

.section-nav a {
  flex: 0 0 auto;
  padding: 7px 13px;
  border-radius: 999px;
  color: #38534e;
  font-size: 0.86rem;
  font-weight: 750;
  text-decoration: none;
}

.section-nav a:hover { background: var(--teal-soft); }

.section {
  padding: 104px 0 16px;
  scroll-margin-top: 80px;
}

.tone-section,
.gate-section {
  width: calc(100% + 80px);
  margin-left: -40px;
  padding: 92px 40px 42px;
  border-radius: var(--radius-lg);
  background: #eaf2ef;
}

.section-heading { max-width: 760px; margin-bottom: 34px; }

.section-heading h2,
.closing-panel h2 {
  margin: 0;
  font-size: clamp(2rem, 4.2vw, 3.5rem);
  line-height: 1.12;
  letter-spacing: -0.035em;
}

.section-heading > span,
.closing-panel > div > span { display: block; margin-top: 14px; color: var(--muted); }

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

.integration-grid li,
.gate-grid article {
  min-height: 220px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.integration-grid li > span,
.gate-grid article > span {
  display: inline-grid;
  min-width: 38px;
  min-height: 30px;
  place-items: center;
  padding: 3px 8px;
  color: var(--teal-dark);
  border: 1px solid #aed1ca;
  border-radius: 999px;
  background: var(--teal-soft);
  font-size: 0.75rem;
  font-weight: 850;
}

.integration-grid h3,
.gate-grid h3 { margin: 32px 0 8px; line-height: 1.25; }
.integration-grid p,
.gate-grid p { margin: 0; color: var(--muted); font-size: 0.92rem; }

.boundary-note {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 24px;
  margin-top: 18px;
  padding: 22px 24px;
  color: #fff;
  border-radius: var(--radius-md);
  background: var(--teal-dark);
}

.boundary-note p { margin: 0; color: #d8ebe7; }

.factory-flow { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }

.factory-flow article {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 18px;
  min-height: 150px;
  padding: 24px;
  border: 1px solid #c5d6d1;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.84);
}

.factory-flow article > span {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  color: #fff;
  border-radius: 14px;
  background: var(--teal);
  font-weight: 900;
}

.factory-flow h3 { margin: 2px 0 8px; }
.factory-flow p { margin: 0; color: var(--muted); }

.table-scroll {
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
}

table { width: 100%; border-collapse: collapse; min-width: 760px; }
th, td { padding: 17px 20px; border-bottom: 1px solid var(--soft-line); text-align: left; vertical-align: top; }
th { color: var(--teal-dark); background: #e7f1ee; font-size: 0.82rem; }
td { color: var(--muted); }
td:first-child { color: var(--ink); font-weight: 800; }
tbody tr:last-child td { border-bottom: 0; }
code { font-family: "SFMono-Regular", Consolas, monospace; }

.split-section { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.75fr); gap: 36px; align-items: start; }

.endpoint-list { display: grid; gap: 10px; }
.endpoint-list article { padding: 19px 22px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; }
.endpoint-list code { color: var(--teal-dark); font-weight: 850; }
.endpoint-list p { margin: 6px 0 0; color: var(--muted); }

.interface-guardrails {
  margin-top: 4px;
  padding: 28px;
  color: #f7eae8;
  border-radius: var(--radius-md);
  background: #4a2926;
}

.interface-guardrails h3 { margin-top: 0; color: #fff; }
.interface-guardrails ul { padding-left: 20px; }
.interface-guardrails li + li { margin-top: 10px; }
.interface-guardrails > p { margin: 22px 0 0; padding-top: 18px; border-top: 1px solid rgba(255,255,255,0.18); color: #fff; font-weight: 750; }

.gate-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.gate-grid article { display: flex; flex-direction: column; min-height: 300px; }
.gate-grid article > strong { margin-top: auto; padding-top: 24px; color: var(--amber); font-size: 0.75rem; letter-spacing: 0.07em; }
.gate-grid .gate-pass > strong { color: var(--teal); }
.gate-grid .gate-pass { border-color: #84bab0; box-shadow: inset 0 4px 0 var(--teal); }

.evidence-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.evidence-grid a { display: grid; min-height: 150px; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius-md); background: #fff; text-decoration: none; }
.evidence-grid a:hover { border-color: #77aa9f; transform: translateY(-2px); box-shadow: 0 14px 24px rgba(25, 55, 49, 0.09); }
.evidence-grid span { color: var(--muted); font-size: 0.78rem; }
.evidence-grid strong { margin-top: 8px; font-size: 1.05rem; }
.evidence-grid small { align-self: end; color: var(--teal); font-weight: 850; }

.integrity-card { margin-top: 14px; padding: 8px 24px; border-radius: var(--radius-md); color: #e5f1ee; background: #172d29; }
.integrity-card > div { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 18px; padding: 15px 0; border-bottom: 1px solid rgba(255,255,255,0.1); }
.integrity-card > div:last-child { border-bottom: 0; }
.integrity-card span { color: #9eb9b3; font-size: 0.82rem; }
.integrity-card code { min-width: 0; overflow-wrap: anywhere; }

.closing-panel {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  align-items: flex-end;
  margin-top: 100px;
  padding: 48px;
  color: #fff;
  border-radius: var(--radius-lg);
  background: linear-gradient(125deg, var(--teal-dark), #0c655d);
  box-shadow: var(--shadow);
}

.closing-panel > div { max-width: 760px; }
.closing-panel > div > p { color: #b9d8d2; }
.closing-panel > div > span { color: #d9eae6; }
.closing-panel a { flex: 0 0 auto; color: var(--teal-dark); background: #fff; }

footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 38px 0 54px;
  color: var(--muted);
  font-size: 0.82rem;
}

footer p { margin: 0; }

a:focus-visible,
[tabindex="0"]:focus-visible {
  outline: 3px solid #d06424;
  outline-offset: 4px;
}

@media (max-width: 980px) {
  .hero,
  .split-section { grid-template-columns: 1fr; }
  .hero { min-height: auto; padding: 58px 44px; }
  .release-card { max-width: 620px; }
  .integration-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gate-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .evidence-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
  .site-header,
  main,
  footer { width: min(100% - 24px, 1180px); }
  .site-header { align-items: flex-start; }
  .header-status { align-items: flex-end; flex-direction: column; gap: 3px; }
  .hero { padding: 42px 22px; border-radius: 22px; }
  h1 { font-size: clamp(2.35rem, 13vw, 3.8rem); }
  .section { padding-top: 78px; }
  .tone-section,
  .gate-section { width: calc(100% + 24px); margin-left: -12px; padding: 72px 12px 28px; border-radius: 22px; }
  .integration-grid,
  .factory-flow,
  .gate-grid,
  .evidence-grid { grid-template-columns: 1fr; }
  .boundary-note { grid-template-columns: 1fr; gap: 8px; }
  .section-nav { justify-content: flex-start; border-radius: 14px; }
  .integrity-card > div { grid-template-columns: 1fr; gap: 4px; }
  .closing-panel { align-items: stretch; flex-direction: column; margin-top: 76px; padding: 34px 24px; border-radius: 22px; }
  .closing-panel a { width: 100%; }
  footer { flex-direction: column; }
}

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