:root {
  color-scheme: dark;
  --black: #020706;
  --surface: #07100e;
  --ink: #e2ece8;
  --muted: #91a29c;
  --line: rgba(108, 160, 143, 0.22);
  --green: #4bc99a;
  --amber: #b58b52;
  --font-body: 16px;
  --font-meta: 14px;
  --safe: clamp(22px, 5vw, 76px);
}

* { box-sizing: border-box; }

html { background: var(--black); scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    linear-gradient(115deg, transparent 0 76%, rgba(75, 201, 154, 0.025) 76% 77%, transparent 77%),
    radial-gradient(circle at 82% 8%, rgba(49, 111, 92, 0.13), transparent 36%),
    var(--black);
  font-family: Inter, "Noto Sans TC", system-ui, sans-serif;
  font-size: var(--font-body);
  line-height: 1.5;
}

a { color: inherit; }

.skip-link {
  position: fixed;
  z-index: 20;
  top: 10px;
  left: 10px;
  padding: 10px 14px;
  background: var(--ink);
  color: var(--black);
  transform: translateY(-160%);
}

.skip-link:focus { transform: none; }

:focus-visible { outline: 2px solid var(--green); outline-offset: 4px; }

.utility-masthead {
  position: sticky;
  z-index: 10;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 66px;
  padding: 0 var(--safe);
  border-bottom: 1px solid var(--line);
  background: rgba(2, 7, 6, 0.88);
  backdrop-filter: blur(18px);
}

.home-link {
  color: var(--muted);
  font-size: var(--font-meta);
  text-decoration: none;
  letter-spacing: 0.06em;
}

.home-link::before { content: "←"; margin-right: 10px; color: var(--amber); }

.language-toggle {
  padding: 8px 10px;
  border: 1px solid var(--line);
  color: var(--muted);
  background: transparent;
  font: inherit;
  font-size: var(--font-meta);
  cursor: pointer;
}

[data-language-option][data-active="true"] { color: var(--ink); }

.utility-shell {
  width: min(1040px, 100%);
  margin: 0 auto;
  padding: clamp(70px, 10vw, 132px) var(--safe) 96px;
}

.document-kicker,
.document-status,
.section-index {
  color: var(--amber);
  font: 650 var(--font-meta)/1.5 ui-monospace, SFMono-Regular, Consolas, monospace;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1 {
  max-width: 15ch;
  margin: 18px 0 24px;
  font-size: clamp(44px, 7vw, 82px);
  line-height: 0.98;
  letter-spacing: -0.05em;
}

.document-lead {
  max-width: 64ch;
  margin: 0;
  color: #adbbb6;
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.75;
}

.document-status {
  display: inline-block;
  margin-top: 28px;
  padding: 8px 10px;
  border-left: 2px solid var(--amber);
  background: rgba(181, 139, 82, 0.07);
}

.document-sections {
  margin-top: 72px;
  border-top: 1px solid var(--line);
}

.document-section {
  display: grid;
  grid-template-columns: minmax(110px, 0.35fr) minmax(0, 1fr);
  gap: 32px;
  padding: 42px 0;
  border-bottom: 1px solid var(--line);
}

.document-section h2 {
  margin: 0 0 18px;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.15;
}

.document-section h3 { margin: 28px 0 8px; font-size: 17px; }
.document-section p,
.document-section li {
  color: var(--muted);
  line-height: 1.8;
}

.document-section p {
  max-width: 68ch;
  margin: 0;
}

.document-section p + p,
.document-section ul + p,
.document-section ol + p {
  margin-top: 16px;
}

.document-section ul { margin: 12px 0 0; padding-left: 20px; }
.document-section ol { margin: 12px 0 0; padding-left: 22px; }
.document-section li + li { margin-top: 8px; }
.document-section strong { color: var(--ink); font-weight: 640; }
.document-section code {
  padding: 2px 5px;
  color: #c9ddd5;
  background: rgba(145, 162, 156, 0.09);
  font: 0.86em ui-monospace, SFMono-Regular, Consolas, monospace;
}

.document-section:target {
  scroll-margin-top: 84px;
}

.document-section:target > div {
  padding-left: 18px;
  border-left: 2px solid var(--green);
}

.qualification {
  margin-top: 18px;
  padding: 14px 16px;
  border-left: 2px solid var(--green);
  color: #b7c8c1 !important;
  background: rgba(75, 201, 154, 0.05);
}

.risk-callout {
  max-width: 760px;
  margin-top: 54px;
  padding: 22px 24px;
  border: 1px solid rgba(181, 139, 82, 0.32);
  background: rgba(181, 139, 82, 0.07);
}

.risk-callout p {
  margin: 0;
  color: #bec9c5;
  line-height: 1.75;
}

.risk-callout strong { color: #e7d4b7; }

.document-action {
  display: inline-flex;
  min-height: 44px;
  margin-top: 22px;
  padding: 0 16px;
  align-items: center;
  border: 1px solid rgba(75, 201, 154, 0.54);
  color: #d8e8e2;
  background: rgba(75, 201, 154, 0.07);
  font-size: var(--font-body);
  text-decoration: none;
}

.document-action:hover {
  border-color: var(--green);
  background: rgba(75, 201, 154, 0.13);
}

.fee-table-wrap {
  max-width: 720px;
  margin-bottom: 22px;
  overflow-x: auto;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.fee-table {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

.fee-table th,
.fee-table td {
  padding: 15px 18px;
  border-bottom: 1px solid rgba(108, 160, 143, 0.14);
  text-align: left;
}

.fee-table th {
  color: var(--muted);
  font: 650 var(--font-meta)/1.5 ui-monospace, SFMono-Regular, Consolas, monospace;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.fee-table td {
  color: #c5d3ce;
  font-size: var(--font-body);
}

.fee-table td:last-child,
.fee-table th:last-child {
  text-align: right;
}

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

.fee-table strong {
  color: var(--green);
  font-size: 18px;
}

.utility-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  padding: 28px var(--safe) 46px;
  border-top: 1px solid var(--line);
  color: #71817b;
  font-size: var(--font-meta);
}

.lang-en { display: none; }
html[data-language="en"] .lang-zh { display: none; }
html[data-language="en"] .lang-en { display: revert; }

@media (max-width: 680px) {
  .document-section { grid-template-columns: 1fr; gap: 12px; }
  .utility-shell { padding-top: 64px; }
  .document-section:target > div { padding-left: 12px; }
  .risk-callout { margin-top: 40px; padding: 18px; }
}

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