/* ==========================================================================
   RWCloud — 機構級證券型代幣網站
   配色為中性紙本色系，全站不使用漸變、螢光或發光效果
   ========================================================================== */

:root {
  --paper: #FBFBF9;
  --surface: #FFFFFF;
  --sunken: #F4F4F1;
  --line: #E5E5E0;
  --line-2: #CFCFC8;

  --ink: #15181C;
  --body: #42464C;
  --muted: #767B82;
  --faint: #9CA0A6;

  --navy: #1B3A5C;
  --navy-dk: #12293F;
  --navy-tint: #EEF1F5;

  --positive: #2C6448;
  --caution: #87642C;
  --critical: #93301F;

  --f-serif: 'Source Serif 4', 'Noto Serif TC', Georgia, 'Times New Roman', serif;
  --f-sans: 'Noto Sans TC', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
  --f-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --wrap: 1180px;
  --gut: clamp(1.15rem, 4vw, 2.5rem);
  --gap: clamp(1rem, 2vw, 1.6rem);
  --r: 3px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

/* 作者樣式裏的 display 會蓋過 [hidden] 的預設值，這裏統一收口 */
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--body);
  font-family: var(--f-sans);
  font-size: 15px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4 {
  font-family: var(--f-serif);
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0.01em;
  line-height: 1.3;
}

.wrap { max-width: var(--wrap); margin: 0 auto; padding-inline: var(--gut); }

.mono { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }

.eyebrow {
  margin: 0 0 0.85rem;
  font-family: var(--f-sans);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  color: var(--muted);
}

.lede { color: var(--body); font-size: 0.97rem; line-height: 1.9; }

/* ---------- 頂部法規提示條 ---------- */

.utility {
  background: var(--navy);
  color: #D8DEE6;
  font-size: 0.72rem;
  letter-spacing: 0.02em;
}

.utility__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 34px;
  padding-block: 0.35rem;
}

.utility p { margin: 0; }
.utility__meta { display: flex; gap: 1.1rem; flex: none; color: #A9B6C6; }

/* ---------- 頁首 ---------- */

.masthead {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--line);
}

.masthead__inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-height: 68px;
}

.brand { display: flex; align-items: center; gap: 0.6rem; flex: none; }
.brand__mark { width: 30px; height: 30px; display: block; }

.brand__name {
  font-family: var(--f-serif);
  font-size: 1.14rem;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0.02em;
  line-height: 1.15;
}

.brand__sub {
  display: block;
  font-family: var(--f-sans);
  font-size: 0.63rem;
  font-weight: 400;
  letter-spacing: 0.14em;
  color: var(--muted);
}

.nav { display: flex; gap: 1.75rem; margin-left: auto; }

.nav a {
  position: relative;
  padding-block: 0.4rem;
  font-size: 0.86rem;
  color: var(--body);
  transition: color 0.15s ease;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--navy);
  transform: scaleX(0);
  transition: transform 0.18s ease;
}

.nav a:hover { color: var(--navy); }
.nav a:hover::after { transform: scaleX(1); }

.masthead__actions { display: flex; align-items: center; gap: 0.7rem; flex: none; }

/* ---------- 狀態標記 ---------- */

.status {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.28rem 0.6rem;
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  background: var(--surface);
  font-family: var(--f-mono);
  font-size: 0.68rem;
  color: var(--muted);
  white-space: nowrap;
}

.status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--faint);
}

.status--live { color: var(--positive); border-color: rgba(44, 100, 72, 0.3); }
.status--live::before { background: var(--positive); }

.status--alert { color: var(--critical); border-color: rgba(147, 48, 31, 0.3); }
.status--alert::before { background: var(--critical); }

/* ---------- 按鈕 ---------- */

.btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.62rem 1.15rem;
  border: 1px solid var(--navy);
  border-radius: var(--r);
  background: var(--surface);
  color: var(--navy);
  font-family: var(--f-sans);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.btn:hover:not(:disabled) { background: var(--navy-tint); }
.btn:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }

.btn--primary { background: var(--navy); color: #fff; }
.btn--primary:hover:not(:disabled) { background: var(--navy-dk); border-color: var(--navy-dk); }

.btn--quiet { border-color: var(--line-2); color: var(--body); }
.btn--quiet:hover:not(:disabled) { background: var(--sunken); border-color: var(--muted); }

.btn--sm { padding: 0.4rem 0.75rem; font-size: 0.76rem; }
.btn--wide { width: 100%; }

/* ---------- 錢包 ---------- */

.btn--warn { border-color: var(--caution); background: #FCF8F0; color: var(--caution); }
.btn--warn:hover:not(:disabled) { background: var(--caution); color: #fff; }

.btn.is-busy { opacity: 0.75; }
.btn.is-busy::before {
  content: "";
  width: 11px;
  height: 11px;
  margin-right: 0.15rem;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.wallet { position: relative; }

.wallet__btn--account { gap: 0.45rem; padding-inline: 0.65rem 0.75rem; }
.wallet__addr { font-family: var(--f-mono); font-size: 0.8rem; }
.wallet__caret { font-size: 0.6rem; color: var(--muted); }

.idicon { border-radius: 3px; flex: none; shape-rendering: crispEdges; }

.wallet__menu {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  z-index: 60;
  width: 290px;
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  background: var(--surface);
  box-shadow: 0 12px 28px -12px rgba(21, 24, 28, 0.28);
}

.wallet__id { display: flex; align-items: center; gap: 0.7rem; padding: 0.9rem 1rem; border-bottom: 1px solid var(--line); }
.wallet__full { margin: 0; font-size: 0.88rem; color: var(--ink); }
.wallet__via { margin: 0; font-size: 0.72rem; color: var(--muted); }

.wallet__rows { margin: 0; padding: 0.5rem 1rem; }
.wallet__row { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: 0.3rem 0; }
.wallet__row dt { font-size: 0.78rem; color: var(--muted); }
.wallet__row dd { margin: 0; font-family: var(--f-mono); font-size: 0.78rem; color: var(--ink); }
.wallet__row dd.is-ok { color: var(--positive); }
.wallet__row dd.is-warn { color: var(--caution); }

.wallet__warn {
  margin: 0;
  padding: 0.6rem 1rem;
  border-top: 1px solid var(--line);
  background: #FCF8F0;
  font-size: 0.73rem;
  line-height: 1.6;
  color: var(--caution);
}

.wallet__acts { padding: 0.35rem 0; border-top: 1px solid var(--line); }

.wallet__act {
  display: block;
  width: 100%;
  padding: 0.5rem 1rem;
  border: 0;
  background: none;
  color: var(--body);
  font-family: var(--f-sans);
  font-size: 0.82rem;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.wallet__act:hover { background: var(--navy-tint); color: var(--navy); }
.wallet__act--danger:hover { background: #FCF4F2; color: var(--critical); }
.wallet__act:focus-visible { outline: 2px solid var(--navy); outline-offset: -2px; }

/* 錢包選擇彈窗 */

.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 1.25rem; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(21, 24, 28, 0.42); }

.modal__panel {
  position: relative;
  width: min(400px, 100%);
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  background: var(--surface);
  box-shadow: 0 24px 60px -20px rgba(21, 24, 28, 0.4);
}

.modal__head { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.25rem; border-bottom: 1px solid var(--line); }
.modal__title { margin: 0; font-size: 1.08rem; }

.modal__close {
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 0.2rem;
}
.modal__close:hover { color: var(--ink); }

.modal__note { margin: 0; padding: 0.85rem 1.25rem; border-top: 1px solid var(--line); font-size: 0.74rem; line-height: 1.65; color: var(--muted); }

.wallet-list { margin: 0; padding: 0.5rem; list-style: none; }

.wallet-list__item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  width: 100%;
  padding: 0.7rem 0.8rem;
  border: 1px solid transparent;
  border-radius: var(--r);
  background: none;
  color: var(--ink);
  font-family: var(--f-sans);
  font-size: 0.9rem;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.wallet-list__item:hover { background: var(--navy-tint); border-color: var(--line-2); }
.wallet-list__item img { border-radius: 5px; }
.wallet-list__dot { width: 26px; height: 26px; border-radius: 5px; background: var(--sunken); border: 1px solid var(--line-2); }

.wallet-list__empty { padding: 1.25rem; text-align: center; }
.wallet-list__empty p { margin: 0 0 0.8rem; font-size: 0.86rem; color: var(--muted); }

/* ---------- 主視覺 ---------- */

.hero { padding-block: clamp(2.75rem, 6vw, 4.75rem) clamp(2rem, 4vw, 3rem); }

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.hero__title {
  margin: 0 0 1.15rem;
  font-size: clamp(2rem, 4.2vw, 2.95rem);
  line-height: 1.22;
  letter-spacing: 0.005em;
}

.hero__lede { margin: 0; max-width: 44ch; }

.hero__cta { display: flex; flex-wrap: wrap; gap: 0.65rem; margin-top: 1.85rem; }

.hero__figure { margin: 0; }

.hero__figure img {
  display: block;
  width: 100%;
  height: clamp(260px, 32vw, 400px);
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: var(--r);
  filter: saturate(0.72);
}

.hero__caption {
  margin: 0.6rem 0 0;
  font-size: 0.72rem;
  color: var(--faint);
  letter-spacing: 0.02em;
}

/* ---------- 關鍵數據帶 ---------- */

.facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  border-top: 1px solid var(--line-2);
  border-bottom: 1px solid var(--line-2);
}

.fact { padding: 1.15rem 1.4rem 1.15rem 0; border-right: 1px solid var(--line); }
.fact:last-child { border-right: 0; }
.fact:not(:first-child) { padding-left: 1.4rem; }

.fact dt {
  font-size: 0.71rem;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 0.3rem;
}

.fact dd {
  margin: 0;
  font-family: var(--f-serif);
  font-size: 1.22rem;
  font-weight: 600;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.fact dd small { display: block; font-family: var(--f-sans); font-size: 0.72rem; font-weight: 400; color: var(--muted); }

/* ---------- 區塊 ---------- */

.section { padding-block: clamp(2.75rem, 6vw, 4.5rem); }
.section--rule { border-top: 1px solid var(--line); }
.section--tint { background: var(--sunken); border-block: 1px solid var(--line); }

.section__head { max-width: 60ch; margin-bottom: clamp(1.75rem, 3.5vw, 2.5rem); }
.section__title { margin: 0 0 0.7rem; font-size: clamp(1.45rem, 2.8vw, 1.95rem); }
.section__head .lede { margin: 0; }

/* ---------- 鏈上結單 ---------- */

.statement {
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(21, 24, 28, 0.04);
}

.statement__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  padding: 1.1rem 1.5rem;
  border-bottom: 1px solid var(--line-2);
  background: var(--sunken);
}

.statement__title { margin: 0; font-size: 1.05rem; }
.statement__sub { margin: 0.1rem 0 0; font-family: var(--f-mono); font-size: 0.72rem; color: var(--muted); }
.statement__ref { margin: 0; font-family: var(--f-mono); font-size: 0.72rem; color: var(--muted); }

.statement__body { padding: 1.15rem 1.35rem 1.35rem; }

.holder {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.3rem 0.9rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--line);
}

/* 標籤與數值成對就近排列，避免在寬容器裏被拉到兩端、中間留出大片空白 */
.sgrid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin: 1.1rem 0 0;
  background: var(--line);
  border: 1px solid var(--line);
}

.sgrid__cell { padding: 0.72rem 0.9rem; background: var(--surface); }

.sgrid__cell dt {
  margin-bottom: 0.22rem;
  font-size: 0.71rem;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.sgrid__cell dd {
  margin: 0;
  font-family: var(--f-mono);
  font-size: 0.88rem;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sgrid__cell dd.is-figure { font-size: 1.02rem; font-weight: 500; }

.rows { margin: 0; }

.row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.78rem 0;
  border-bottom: 1px solid var(--line);
}

.row:last-child { border-bottom: 0; }
.row dt { font-size: 0.85rem; color: var(--muted); }
.row dd { margin: 0; font-family: var(--f-mono); font-size: 0.9rem; color: var(--ink); text-align: right; word-break: break-all; }
.row dd.is-figure { font-size: 1rem; font-weight: 500; }

.lbl { font-size: 0.71rem; letter-spacing: 0.1em; color: var(--muted); }
.val { font-family: var(--f-mono); font-size: 0.86rem; color: var(--ink); word-break: break-all; }

/* 鎖定期進度 */

.term { margin-top: 1.1rem; }

.term__head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: 0.45rem; }
.term__remain { font-family: var(--f-mono); font-size: 0.76rem; color: var(--body); }

.term__track { height: 4px; background: var(--line); border-radius: 2px; overflow: hidden; }
.term__fill { width: 0%; height: 100%; background: var(--navy); transition: width 0.5s ease; }

/* 憑證狀態章 */

.stamp {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.34rem 0.8rem;
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  background: var(--surface);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
}

.stamp::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--faint); }

[data-state="pending"] .stamp { color: var(--caution); border-color: rgba(135, 100, 44, 0.35); background: #FCF8F0; }
[data-state="pending"] .stamp::before { background: var(--caution); }

[data-state="authorized"] .stamp,
[data-state="matured"] .stamp { color: var(--navy); border-color: rgba(27, 58, 92, 0.3); background: var(--navy-tint); }
[data-state="authorized"] .stamp::before,
[data-state="matured"] .stamp::before { background: var(--navy); }

[data-state="locked"] .stamp,
[data-state="redeemed"] .stamp { color: var(--body); border-color: var(--line-2); background: var(--sunken); }
[data-state="locked"] .stamp::before,
[data-state="redeemed"] .stamp::before { background: var(--body); }

[data-state="settled"] .stamp { color: var(--positive); border-color: rgba(44, 100, 72, 0.3); background: #F1F6F3; }
[data-state="settled"] .stamp::before { background: var(--positive); }

/* ---------- 流程指示 ---------- */

.rail { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); margin: var(--gap) 0 0; padding: 0; list-style: none; }

.rail__item {
  padding: 0.7rem 0.7rem 0.7rem 0;
  border-top: 2px solid var(--line-2);
  color: var(--faint);
  font-size: 0.76rem;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.rail__no { display: block; font-family: var(--f-mono); font-size: 0.66rem; margin-bottom: 0.12rem; }

.rail__item[data-status="done"] { border-top-color: var(--navy); color: var(--body); }
.rail__item[data-status="active"] { border-top-color: var(--navy); color: var(--navy); font-weight: 500; }

/* ---------- 通用卡片 ---------- */

.grid { display: grid; gap: var(--gap); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid--kyc { grid-template-columns: minmax(0, 1.32fr) minmax(0, 1fr); align-items: stretch; }

/* 指引合成一張卡，內部以細線分節；三張獨立卡片會和左側表單湊不齊底邊 */
.guide { display: flex; flex-direction: column; padding: 0; }
.guide__block { padding: 1.15rem 1.3rem; border-bottom: 1px solid var(--line); }
.guide__block:last-child { border-bottom: 0; }
.guide__title { margin: 0 0 0.55rem; font-family: var(--f-serif); font-weight: 600; font-size: 0.97rem; color: var(--ink); }
.guide__note { margin: 0.7rem 0 0; font-size: 0.76rem; line-height: 1.7; color: var(--muted); }
.guide .mailto { font-size: 0.86rem; }
.guide .ticks li { margin-bottom: 0.34rem; }

.card {
  padding: clamp(1.2rem, 2.4vw, 1.6rem);
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
}

.card--plain { background: transparent; border-style: dashed; border-color: var(--line-2); }

.card__role { font-size: 0.69rem; letter-spacing: 0.15em; color: var(--muted); }
.card__title { margin: 0.2rem 0 1rem; font-size: 1.06rem; }
.card__note { margin: 0.9rem 0 0; font-size: 0.78rem; line-height: 1.7; color: var(--muted); }

/* ---------- 表單 ---------- */

.field { display: block; margin-bottom: 0.95rem; }
.field:last-of-type { margin-bottom: 0; }

.field__label { display: block; margin-bottom: 0.35rem; font-size: 0.78rem; color: var(--body); }
.field__label .req { color: var(--critical); }

.field input,
.field textarea {
  width: 100%;
  padding: 0.62rem 0.75rem;
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  background: var(--surface);
  color: var(--ink);
  font-family: var(--f-mono);
  font-size: 0.86rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field textarea { line-height: 1.65; resize: vertical; }
.field input::placeholder { color: var(--faint); }

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(27, 58, 92, 0.1);
}

.field input:disabled { background: var(--sunken); color: var(--muted); }

.field__row { display: flex; gap: 0.5rem; }
.field__row input { flex: 1 1 auto; min-width: 0; }

.field__note { display: block; margin-top: 0.3rem; min-height: 1.05rem; font-size: 0.74rem; color: var(--muted); }
.field__note[data-tone="ok"] { color: var(--positive); }
.field__note[data-tone="warn"] { color: var(--caution); }
.field__note[data-tone="err"] { color: var(--critical); }

.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 0 0.9rem; }

/* ---------- 關聯高階主管 ---------- */

.officers { display: flex; flex-direction: column; gap: 0.55rem; margin-bottom: 0.6rem; }

.officer {
  padding: 0.7rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--sunken);
}

.officer__top { display: flex; gap: 0.45rem; align-items: center; }
.officer__top .officer__name { flex: 1 1 auto; min-width: 0; }
.officer__top .officer__share { flex: 0 0 6.2rem; }

.officer__del {
  flex: 0 0 auto;
  width: 1.95rem;
  height: 1.95rem;
  padding: 0;
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  background: var(--surface);
  color: var(--muted);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.officer__del:hover { border-color: var(--critical); color: var(--critical); }
.officer__del:focus-visible { outline: 2px solid var(--navy); outline-offset: 1px; }

.officer__roles { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.55rem; }

.role {
  padding: 0.26rem 0.58rem;
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  background: var(--surface);
  color: var(--body);
  font-family: var(--f-sans);
  font-size: 0.74rem;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.role:hover { background: var(--sunken); }
.role[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.role:focus-visible { outline: 2px solid var(--navy); outline-offset: 1px; }

.defs { margin: 0; font-size: 0.8rem; }
.defs dt { margin-bottom: 0.18rem; font-weight: 500; color: var(--ink); }
.defs dd { margin: 0 0 0.65rem; font-size: 0.76rem; line-height: 1.7; color: var(--muted); }
.defs dd:last-child { margin-bottom: 0; }

/* 分段切換 */

.seg { display: inline-flex; margin-bottom: 1.2rem; border: 1px solid var(--line-2); border-radius: var(--r); overflow: hidden; }

.seg__btn {
  appearance: none;
  padding: 0.5rem 1.1rem;
  border: 0;
  border-right: 1px solid var(--line-2);
  background: var(--surface);
  color: var(--body);
  font-family: var(--f-sans);
  font-size: 0.82rem;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.seg__btn:last-child { border-right: 0; }
.seg__btn:hover { background: var(--sunken); }
.seg__btn.is-on { background: var(--navy); color: #fff; }
.seg__btn:focus-visible { outline: 2px solid var(--navy); outline-offset: -2px; }

.actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.1rem; }
.actions .btn { flex: 1 1 auto; }

.form__status { margin: 0.85rem 0 0; min-height: 1.3rem; font-size: 0.8rem; color: var(--body); }
.form__status[data-tone="ok"] { color: var(--positive); }
.form__status[data-tone="err"] { color: var(--critical); }

/* ---------- 清單 ---------- */

.ticks, .ordered { margin: 0; padding: 0; font-size: 0.84rem; color: var(--body); }
.ticks { list-style: none; }
.ticks li { position: relative; padding-left: 1.15rem; margin-bottom: 0.42rem; }
.ticks li::before { content: ""; position: absolute; left: 0; top: 0.72em; width: 5px; height: 5px; background: var(--navy); }
.ordered { padding-left: 1.2rem; }
.ordered li { margin-bottom: 0.42rem; }

.mailto {
  margin: 0 0 0.55rem;
  font-family: var(--f-mono);
  font-size: 0.92rem;
  color: var(--navy);
  word-break: break-all;
}

/* ---------- 文件清單 ---------- */

.docs { border-top: 1px solid var(--line-2); }

.doc {
  display: grid;
  grid-template-columns: 3.2rem minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 0.35rem 1.25rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--line);
  transition: background 0.15s ease;
}

a.doc:hover { background: var(--navy-tint); }

.doc__no { font-family: var(--f-mono); font-size: 0.76rem; color: var(--faint); }
.doc__name { margin: 0; font-size: 1rem; }
.doc__desc { grid-column: 2; margin: 0.1rem 0 0; font-size: 0.82rem; color: var(--muted); }
.doc__state { font-family: var(--f-sans); font-size: 0.76rem; white-space: nowrap; }

.doc--pending .doc__state { color: var(--caution); }
.doc--ready .doc__state { color: var(--navy); font-weight: 500; }

/* ---------- 權限提示 ---------- */

.gate {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: var(--gap);
  padding: 0.85rem 1.1rem;
  border: 1px solid var(--line-2);
  border-left: 3px solid var(--line-2);
  border-radius: var(--r);
  background: var(--surface);
  font-size: 0.85rem;
}

.gate p { margin: 0; color: var(--body); }
.gate[data-tone="ok"] { border-left-color: var(--positive); }
.gate[data-tone="ok"] p { color: var(--positive); }
.gate[data-tone="warn"] { border-left-color: var(--caution); background: #FCF8F0; }
.gate[data-tone="warn"] p { color: var(--caution); }

/* ---------- 管理台鎖定畫面 ---------- */

.lock { display: grid; place-items: center; min-height: 58vh; padding-block: 2rem; }

.lock__panel {
  width: min(440px, 100%);
  padding: clamp(1.75rem, 4vw, 2.5rem);
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(21, 24, 28, 0.04);
  text-align: center;
}

.lock__mark { display: block; margin: 0 auto 1rem; }
.lock__title { margin: 0 0 0.7rem; font-size: 1.35rem; }
.lock__text { margin: 0 0 1.5rem; font-size: 0.88rem; color: var(--body); }
.lock__state { margin: 1rem 0 0; min-height: 1.1rem; font-size: 0.8rem; color: var(--muted); }
.lock__state[data-tone="err"] { color: var(--critical); }

.lock__fine {
  margin: 1.5rem 0 0;
  padding-top: 1.1rem;
  border-top: 1px solid var(--line);
  font-size: 0.73rem;
  line-height: 1.7;
  color: var(--faint);
  text-align: left;
}

/* ---------- 記錄 ---------- */

.ledger { margin-top: var(--gap); border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }

.ledger__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 1rem;
  border-bottom: 1px solid var(--line);
  background: var(--sunken);
}

.ledger__title { margin: 0; font-family: var(--f-sans); font-size: 0.74rem; font-weight: 500; letter-spacing: 0.12em; color: var(--muted); }

.ledger__list { margin: 0; padding: 0.35rem 0; list-style: none; max-height: 230px; overflow-y: auto; font-family: var(--f-mono); font-size: 0.76rem; }

.ledger__item { display: flex; gap: 0.8rem; padding: 0.34rem 1rem; word-break: break-all; color: var(--body); }
.ledger__item--muted { color: var(--faint); }
.ledger__item--ok { color: var(--positive); }
.ledger__item--err { color: var(--critical); }
.ledger__item--pending { color: var(--caution); }
.ledger__time { flex: none; color: var(--faint); }
.ledger__item a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }

/* ---------- 提示條 ---------- */

.notice {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.15rem 0.75rem;
  padding: 0.85rem 1.05rem;
  border: 1px solid rgba(147, 48, 31, 0.28);
  border-radius: var(--r);
  background: #FDF8F7;
}

.notice::before {
  content: "!";
  grid-row: 1 / span 2;
  display: grid;
  place-items: center;
  width: 17px;
  height: 17px;
  margin-top: 0.18rem;
  border: 1px solid var(--critical);
  border-radius: 50%;
  color: var(--critical);
  font-family: var(--f-mono);
  font-size: 0.66rem;
  font-weight: 600;
  line-height: 1;
}

.notice strong {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--critical);
  letter-spacing: 0.01em;
}

.notice p { margin: 0; font-size: 0.78rem; line-height: 1.7; color: var(--body); }

/* 待補內容佔位 */

.placeholder {
  position: relative;
  padding: 1rem 1.15rem;
  border: 1px dashed var(--line-2);
  border-radius: var(--r);
  background: var(--surface);
}

.placeholder::before {
  content: "待提供 · " attr(data-slot);
  position: absolute;
  top: -0.6rem;
  left: 0.85rem;
  padding: 0 0.4rem;
  background: var(--paper);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  color: var(--caution);
}

.placeholder p { margin: 0; font-size: 0.86rem; color: var(--muted); }
.card .placeholder::before, .section--tint .placeholder::before { background: var(--sunken); }

/* ---------- 頁尾 ---------- */

.footer { border-top: 1px solid var(--line-2); background: var(--surface); }
.footer__inner { display: grid; grid-template-columns: 1.1fr 1fr 1.3fr; gap: clamp(1.5rem, 4vw, 3.5rem); padding-block: clamp(2.25rem, 4vw, 3.25rem); }

.footer__title { margin: 0 0 0.9rem; font-family: var(--f-sans); font-size: 0.71rem; font-weight: 600; letter-spacing: 0.14em; color: var(--muted); }
.footer__text { margin: 0 0 0.8rem; font-size: 0.79rem; line-height: 1.8; color: var(--muted); }

.addr { margin: 0; }
.addr__row { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.2rem 1rem; padding: 0.45rem 0; border-bottom: 1px solid var(--line); }
.addr__row dt { font-size: 0.78rem; color: var(--body); }
.addr__row dd { margin: 0; font-family: var(--f-mono); font-size: 0.72rem; }
.addr__row a { color: var(--navy); text-decoration: underline; text-underline-offset: 2px; }

.colophon { border-top: 1px solid var(--line); }
.colophon__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1.5rem; padding-block: 1.1rem; font-size: 0.74rem; color: var(--faint); }
.colophon__inner p { margin: 0; }

.link { color: var(--navy); text-decoration: underline; text-underline-offset: 2px; }

/* ---------- 響應式 ---------- */

@media (max-width: 1000px) {
  .hero__grid { grid-template-columns: minmax(0, 1fr); }
  .hero__figure { order: -1; }
  .grid--kyc { grid-template-columns: minmax(0, 1fr); }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fact { border-bottom: 1px solid var(--line); }
  .fact:nth-child(2n) { border-right: 0; }
  .fact:nth-child(n+3) { border-bottom: 0; }
  .rail { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .sgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nav { display: none; }
  .footer__inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 620px) {
  .utility__inner { flex-direction: column; align-items: flex-start; gap: 0.15rem; }
  .utility__meta { gap: 0.9rem; }
  .masthead__inner { min-height: 60px; gap: 0.75rem; }
  .brand__name { font-size: 1rem; }
  /* 網絡狀態在錢包面板裏已有，窄屏不必重複佔位 */
  .masthead__actions #netChip { display: none; }
  .wallet__menu { width: min(290px, calc(100vw - 1.75rem)); }
  .facts { grid-template-columns: minmax(0, 1fr); }
  .fact { border-right: 0; padding-left: 0 !important; }
  .fact:last-child { border-bottom: 0; }
  .rail { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pair { grid-template-columns: minmax(0, 1fr); }
  .field__row { flex-direction: column; }
  .officer__top { flex-wrap: wrap; }
  .officer__top .officer__name { flex: 1 1 100%; }
  .officer__top .officer__share { flex: 1 1 0; min-width: 0; }
  .footer__inner { grid-template-columns: minmax(0, 1fr); }
  .statement__body { padding: 1rem; }
  .sgrid__cell dd { white-space: normal; font-size: 0.83rem; }
  .sgrid__cell dd.is-figure { font-size: 0.95rem; }
  .row { flex-direction: column; gap: 0.15rem; }
  .row dd { text-align: left; }
}

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