:root {
  color-scheme: light;
  --taw-ink: #14313d;
  --taw-muted: #5c7681;
  --taw-line: #d5e2e7;
  --taw-line-soft: #e6eef1;
  --taw-bg: #eef3f5;
  --taw-card: #ffffff;
  --taw-teal: #0f646b;
  --taw-teal-deep: #0e3a48;
  --taw-teal-soft: #e7f3f4;
  --taw-danger: #a1392c;
  --taw-danger-soft: #fdf1ef;
  --taw-amber: #8a5a10;
  --taw-amber-soft: #fff8e8;
  --taw-ok: #17624b;
  --taw-ok-soft: #e7f5ef;
  --taw-radius: 14px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: linear-gradient(180deg, #e7eff1 0, var(--taw-bg) 220px), var(--taw-bg);
  color: var(--taw-ink);
  font:
    15px/1.65 "Microsoft YaHei",
    "PingFang SC",
    "Noto Sans SC",
    system-ui,
    -apple-system,
    "Segoe UI",
    sans-serif;
}

h1,
h2,
h3,
p,
ul,
dl,
dd {
  overflow-wrap: anywhere;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
}

a {
  color: var(--taw-teal);
}

:focus-visible {
  outline: 3px solid #1b9aa0;
  outline-offset: 2px;
}

.taw-skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 10;
  padding: 10px 16px;
  background: #fff;
  border-radius: 0 0 10px 0;
  font-weight: 700;
}

.taw-skip:focus {
  left: 0;
}

.taw-header {
  background: linear-gradient(135deg, var(--taw-teal-deep), #126169 78%, #177a78);
  color: #eaf6f7;
  padding: clamp(18px, 3.6vw, 34px) clamp(12px, 3.6vw, 38px);
  border-bottom: 4px solid #0b2c37;
}

.taw-header-inner {
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 18px 28px;
  align-items: flex-end;
  justify-content: space-between;
}

.taw-brand {
  min-width: 0;
  flex: 1 1 420px;
}

.taw-kicker {
  margin: 0 0 6px;
  font-size: 12px;
  letter-spacing: 0.16em;
  color: #a7d6d9;
}

.taw-header h1 {
  margin: 0;
  font-size: clamp(26px, 3.6vw, 34px);
  line-height: 1.3;
  letter-spacing: 0.02em;
}

.taw-subtitle {
  margin: 8px 0 0;
  font-size: 14px;
  color: #c6e3e5;
  max-width: 62ch;
}

.taw-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.taw-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 8px 15px;
  border: 1px solid #4d8e93;
  border-radius: 999px;
  color: #eaf6f7;
  text-decoration: none;
  font-size: 13.5px;
  background: rgba(9, 45, 55, 0.28);
}

.taw-nav a:hover {
  background: rgba(9, 45, 55, 0.55);
  border-color: #86c2c6;
}

.taw-main {
  max-width: 1240px;
  margin: 0 auto;
  padding: clamp(14px, 2.6vw, 30px) clamp(12px, 3.6vw, 34px) 40px;
}

.taw-notice {
  display: grid;
  gap: 6px;
  margin: 0 0 14px;
  padding: 13px 16px;
  border: 1px solid #e2c581;
  border-left: 5px solid #b57e17;
  border-radius: 10px;
  background: var(--taw-amber-soft);
  color: #5e4309;
  font-size: 13.5px;
}

.taw-notice strong {
  font-size: 14.5px;
  color: #6b4a00;
}

.taw-global {
  margin: 0 0 6px;
  padding: 10px 14px;
  border: 1px dashed #b6ccd3;
  border-radius: 10px;
  background: #f7fbfc;
  color: var(--taw-muted);
  font-size: 13.5px;
}

.taw-global[data-tone="warn"] {
  border-color: #e5cb93;
  background: var(--taw-amber-soft);
  color: #6b4a00;
}

.taw-global[data-tone="error"] {
  border-color: #e3b4ae;
  background: var(--taw-danger-soft);
  color: #7d241b;
}

.taw-card {
  margin-block: 18px;
  padding: clamp(14px, 2.3vw, 24px);
  background: var(--taw-card);
  border: 1px solid var(--taw-line);
  border-radius: var(--taw-radius);
  box-shadow: 0 1px 2px rgba(18, 48, 61, 0.05);
}

.taw-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  justify-content: space-between;
}

.taw-card h2 {
  margin: 0;
  font-size: clamp(18px, 2.2vw, 21px);
  line-height: 1.35;
  color: #0d4550;
}

.taw-h3 {
  margin: 0;
  font-size: 16px;
  color: #0d4550;
}

.taw-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 3px 10px;
  border: 1px solid #c7dde1;
  border-radius: 999px;
  background: var(--taw-teal-soft);
  color: #14565c;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
}

.taw-chip-danger {
  border-color: #e8c1ba;
  background: var(--taw-danger-soft);
  color: #7f2c21;
}

.taw-desc {
  margin: 10px 0 0;
  color: #3f5a64;
  font-size: 14px;
}

.taw-bullets {
  margin: 10px 0 0;
  padding-left: 20px;
  color: #3f5a64;
  font-size: 13.5px;
}

.taw-bullets li + li {
  margin-top: 4px;
}

.taw-scope {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px 16px;
  align-items: end;
  margin-top: 14px;
}

.taw-scope-actions {
  display: flex;
  gap: 10px;
  padding-bottom: 1px;
}

.taw-field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.taw-field > label,
.taw-fieldset > .taw-field > label {
  font-weight: 600;
  font-size: 14px;
  color: #1d4650;
}

input,
select,
textarea {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid #b6ccd3;
  border-radius: 9px;
  background: #fff;
  color: var(--taw-ink);
}

input[readonly] {
  background: #f1f5f7;
  color: #38525c;
  border-style: dashed;
}

textarea {
  min-height: 92px;
  resize: vertical;
}

input[type="checkbox"],
input[type="radio"] {
  width: auto;
  min-width: 18px;
  height: 18px;
  padding: 0;
  margin: 2px 0 0;
  accent-color: var(--taw-danger);
}

select:disabled,
input:disabled,
textarea:disabled {
  background: #f2f5f6;
  color: #6b818a;
}

.taw-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr));
  gap: 10px;
  margin: 16px 0 0;
}

.taw-meta-item {
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--taw-line-soft);
  border-radius: 10px;
  background: #f8fbfc;
}

.taw-meta dt {
  font-size: 12px;
  color: var(--taw-muted);
}

.taw-meta dd {
  margin: 4px 0 0;
  font-weight: 600;
  font-size: 14px;
}

.taw-status {
  margin: 14px 0 0;
  padding: 11px 14px;
  border: 1px solid #cfe0e6;
  border-radius: 10px;
  background: #f4f9fb;
  color: #2c4d58;
  font-size: 13.5px;
}

.taw-status[data-tone="loading"] {
  border-color: #c6d8de;
  background: #f3f8fa;
  color: #3b5b66;
}

.taw-status[data-tone="ok"] {
  border-color: #b7ddcc;
  background: var(--taw-ok-soft);
  color: #14563f;
}

.taw-status[data-tone="warn"] {
  border-color: #e5cb93;
  background: var(--taw-amber-soft);
  color: #6b4a00;
}

.taw-status[data-tone="error"] {
  border-color: #e3b4ae;
  background: var(--taw-danger-soft);
  color: #7d241b;
}

.taw-status[data-tone="empty"] {
  border-color: #d7e3e7;
  background: #f7fafb;
  color: #4a6570;
}

.taw-fieldset {
  display: grid;
  gap: 12px;
  min-width: 0;
  margin: 0;
  padding: 14px;
  border: 1px solid var(--taw-line-soft);
  border-radius: 12px;
  background: #fcfeff;
}

.taw-fieldset legend {
  padding-inline: 8px;
  font-weight: 700;
  font-size: 14px;
  color: #0f4c56;
}

#withdraw-form {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.taw-target {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid #dbe7eb;
  border-radius: 10px;
  background: #f5fafb;
  font-size: 13.5px;
  color: #2f4f5a;
}

.taw-target-context {
  color: var(--taw-muted);
}

.taw-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  background: #e8f1f3;
  color: #245863;
  font-size: 12px;
  font-weight: 600;
}

.taw-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px 14px;
  border: 1px solid #e4c0ba;
  border-radius: 11px;
  background: #fdf7f6;
  font-size: 13.5px;
  font-weight: 600;
  color: #5c261f;
}

.taw-check input {
  flex: 0 0 auto;
}

.taw-check span {
  min-width: 0;
}

.taw-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.taw-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 9px 18px;
  border: 1px solid #a9c2ca;
  border-radius: 9px;
  background: #fff;
  color: #16434e;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
}

.taw-button:hover:not(:disabled) {
  background: #f1f8f9;
  border-color: #7ba8b2;
}

.taw-button:disabled {
  opacity: 0.55;
}

.taw-button-danger {
  border-color: #8f2f23;
  background: var(--taw-danger);
  color: #fff;
}

.taw-button-danger:hover:not(:disabled) {
  background: #8c2d21;
  border-color: #70231a;
}

.taw-button-small {
  min-height: 34px;
  padding: 5px 11px;
  font-size: 13px;
  white-space: nowrap;
}

.taw-hint {
  margin: 0;
  font-size: 12.5px;
  color: var(--taw-muted);
}

.taw-hint:empty {
  display: none;
}

.taw-table-wrap {
  margin-top: 14px;
  overflow-x: auto;
  border: 1px solid var(--taw-line);
  border-radius: 12px;
  background: #fff;
  -webkit-overflow-scrolling: touch;
}

.taw-table {
  width: 100%;
  min-width: 700px;
  border-collapse: collapse;
  font-size: 13px;
}

.taw-table th {
  padding: 10px 12px;
  text-align: left;
  vertical-align: bottom;
  background: #eef6f7;
  color: #1d4b56;
  font-size: 12.5px;
  font-weight: 700;
  white-space: nowrap;
  border-bottom: 1px solid #d5e4e8;
}

.taw-table td {
  padding: 11px 12px;
  vertical-align: top;
  border-bottom: 1px solid var(--taw-line-soft);
}

.taw-table tbody tr:last-child td {
  border-bottom: 0;
}

.taw-table tbody tr.is-revoked td {
  background: #fafbfc;
  color: #5f7279;
}

.taw-cell-stack {
  display: grid;
  gap: 4px;
  min-width: 110px;
}

.taw-mono {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Consolas, "Liberation Mono", monospace;
  font-size: 12.3px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.taw-muted {
  color: var(--taw-muted);
  font-size: 12.5px;
}

.taw-action-cell {
  white-space: nowrap;
}

.taw-badge {
  display: inline-block;
  align-self: flex-start;
  padding: 2px 9px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.6;
  white-space: nowrap;
}

.taw-badge-ok {
  border-color: #bfe3d6;
  background: var(--taw-ok-soft);
  color: var(--taw-ok);
}

.taw-badge-danger {
  border-color: #efc7c0;
  background: var(--taw-danger-soft);
  color: #8a2c1f;
}

.taw-badge-neutral {
  border-color: #d7e3e7;
  background: #eff4f6;
  color: #3d5a64;
}

.taw-empty {
  margin: 12px 0 0;
  padding: 14px;
  border: 1px dashed #cbdde2;
  border-radius: 10px;
  background: #fbfdfd;
  color: var(--taw-muted);
  font-size: 13.5px;
  text-align: center;
}

.taw-result {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.taw-result > .taw-status {
  margin-top: 0;
}

.taw-result-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid #cfe0e6;
  border-radius: 11px;
  background: #f5fafb;
}

.taw-result-head strong {
  font-size: 15px;
  color: #0f4550;
}

.taw-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
  gap: 10px;
  margin: 0;
}

.taw-fact {
  min-width: 0;
  padding: 9px 12px;
  border: 1px solid var(--taw-line-soft);
  border-radius: 10px;
  background: #f8fbfc;
}

.taw-fact dt {
  font-size: 12px;
  color: var(--taw-muted);
}

.taw-fact dd {
  margin: 4px 0 0;
  font-weight: 600;
  font-size: 13.5px;
}

.taw-impact-list {
  list-style: none;
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
}

.taw-impact-item {
  padding: 9px 12px;
  border-left: 4px solid #9fc4cc;
  border-radius: 0 9px 9px 0;
  background: #f5fafb;
  font-size: 13.5px;
  color: #2c4d58;
}

.taw-impact-item[data-tone="warn"] {
  border-left-color: #c9912f;
  background: var(--taw-amber-soft);
  color: #5e4309;
}

.taw-impact-item strong {
  color: inherit;
}

.taw-guidance {
  margin: 0;
  padding: 11px 13px;
  border: 1px dashed #c7dbe1;
  border-radius: 10px;
  background: #f7fbfc;
  color: #3f5a64;
  font-size: 13px;
}

.taw-footer {
  margin-top: 26px;
  padding-top: 14px;
  border-top: 1px solid #d7e3e7;
  color: var(--taw-muted);
  font-size: 12.5px;
}

.taw-footer p {
  margin: 4px 0;
}

.taw-noscript {
  max-width: 900px;
  margin: 20px auto;
  padding: 12px 16px;
  border: 1px solid #e3b4ae;
  border-radius: 10px;
  background: var(--taw-danger-soft);
  color: #7d241b;
}

.taw-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.authorized-document-picker {
  max-width: 100%;
}

@media (max-width: 860px) {
  .taw-scope {
    grid-template-columns: minmax(0, 1fr);
  }

  .taw-scope-actions .taw-button {
    width: 100%;
  }
}

@media (max-width: 720px) {
  .taw-header-inner {
    align-items: flex-start;
  }

  .taw-nav {
    width: 100%;
  }

  .taw-nav a {
    flex: 1 1 150px;
  }

  .taw-table {
    min-width: 640px;
    font-size: 12.5px;
  }

  .taw-actions {
    flex-direction: column;
  }

  .taw-actions .taw-button {
    width: 100%;
  }
}

@media (max-width: 420px) {
  body {
    font-size: 14.5px;
  }

  .taw-header {
    padding: 16px 12px 18px;
  }

  .taw-main {
    padding: 12px 9px 30px;
  }

  .taw-card {
    padding: 12px;
    border-radius: 12px;
  }

  .taw-fieldset {
    padding: 11px;
  }

  .taw-nav a {
    flex: 1 1 100%;
  }

  .taw-result-head {
    padding: 10px 11px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}
