:root {
  color-scheme: light;
  --background: #eeeeeb;
  --surface: #f6f4f1;
  --card: #ffffff;
  --dark: #251b13;
  --dark-soft: rgba(37, 27, 19, 0.66);
  --dark-faint: rgba(37, 27, 19, 0.08);
  --line: rgba(37, 27, 19, 0.12);
  --green: #496b55;
  --green-dark: #233a2d;
  --blue: #3b526d;
  --gold: #946c32;
  --red: #9a3d35;
  --white-soft: rgba(255, 255, 255, 0.74);
  --shadow: 0 24px 80px rgba(27, 20, 14, 0.16);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--dark);
  font-family:
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "Noto Sans TC",
    "Microsoft JhengHei",
    sans-serif;
  font-size: 16px;
  line-height: 1.4;
  letter-spacing: 0;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

button,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-chrome {
  position: fixed;
  inset: 14px 16px auto;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  pointer-events: none;
}

.brand {
  grid-column: 2;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 38px;
  border-radius: 999px;
  padding: 8px 13px;
  color: var(--surface);
  background: rgba(37, 27, 19, 0.2);
  backdrop-filter: blur(18px);
  pointer-events: auto;
}

.brand-mark {
  display: inline-grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--dark);
  font-size: 14px;
  font-weight: 780;
}

.brand-word {
  font-size: 14px;
  font-weight: 680;
}

.top-nav {
  justify-self: end;
  display: inline-flex;
  gap: 4px;
  border-radius: 999px;
  padding: 4px;
  background: rgba(37, 27, 19, 0.18);
  backdrop-filter: blur(18px);
  pointer-events: auto;
}

.top-nav a {
  border-radius: 999px;
  padding: 7px 11px;
  color: var(--surface);
  font-size: 14px;
  font-weight: 560;
}

.top-nav a:hover {
  background: rgba(255, 255, 255, 0.14);
}

.hero {
  position: relative;
  display: grid;
  min-height: 100svh;
  overflow: hidden;
  place-items: center;
  padding: 94px 16px 48px;
  text-align: center;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: var(--dark);
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0.95;
  filter: saturate(0.92);
}

.hero-tint {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(37, 27, 19, 0.18), rgba(37, 27, 19, 0.34)),
    radial-gradient(circle at 50% 38%, rgba(255, 255, 255, 0.08), rgba(37, 27, 19, 0.38) 68%);
}

.hero-content {
  position: relative;
  z-index: 1;
  display: grid;
  width: min(580px, 100%);
  justify-items: center;
}

.eyebrow {
  margin: 0 0 12px;
  color: rgba(246, 244, 241, 0.78);
  font-size: 13px;
  font-weight: 680;
}

h1 {
  max-width: 680px;
  margin: 0;
  color: var(--surface);
  font-size: 30px;
  font-weight: 680;
  line-height: 1.18;
  text-wrap: balance;
}

.hero-copy {
  margin: 9px 0 24px;
  color: rgba(246, 244, 241, 0.78);
  font-size: 16px;
}

.clerk-card {
  display: grid;
  width: 100%;
  min-height: 220px;
  border-radius: 16px;
  padding: 14px;
  background: rgba(246, 244, 241, 0.96);
  box-shadow: var(--shadow);
  text-align: left;
}

.thread {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 82px;
  max-height: 260px;
  margin: 0;
  padding: 2px 2px 12px;
  overflow: auto;
  list-style: none;
}

.message {
  display: grid;
  gap: 4px;
  width: fit-content;
  max-width: min(440px, 94%);
}

.message span {
  color: var(--dark-soft);
  font-size: 12px;
  font-weight: 680;
}

.message p {
  margin: 0;
  border-radius: 13px;
  padding: 10px 12px;
  color: var(--dark);
  background: rgba(37, 27, 19, 0.06);
  white-space: pre-wrap;
}

.message--clerk p {
  background: #ffffff;
}

.message--user {
  justify-self: end;
}

.message--user span {
  text-align: right;
}

.message--user p {
  color: #1f3144;
  background: rgba(59, 82, 109, 0.12);
}

.message--status p {
  color: var(--dark-soft);
  background: transparent;
}

.quick-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 0;
  padding-bottom: 10px;
}

.choice-button {
  min-height: 34px;
  border: 1px solid rgba(37, 27, 19, 0.1);
  border-radius: 999px;
  padding: 7px 11px;
  background: rgba(255, 255, 255, 0.8);
  color: var(--dark);
  font-size: 14px;
  font-weight: 560;
}

.choice-button:hover {
  border-color: rgba(37, 27, 19, 0.24);
}

.composer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 40px;
  gap: 8px;
  align-items: end;
  border-top: 1px solid var(--dark-faint);
  padding-top: 12px;
}

.composer textarea {
  width: 100%;
  max-height: 128px;
  min-height: 40px;
  resize: none;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--dark);
  font-size: 16px;
  line-height: 1.4;
}

.composer textarea::placeholder {
  color: rgba(37, 27, 19, 0.48);
}

.send-button {
  display: inline-grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--dark);
  color: var(--surface);
  font-size: 20px;
  font-weight: 760;
}

.send-button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.composer-note {
  margin: 8px 0 0;
  color: var(--dark-soft);
  font-size: 12px;
  line-height: 1.45;
}

.composer-note a {
  color: var(--blue);
  font-weight: 680;
}

.trust-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}

.trust-row span {
  border: 1px solid rgba(246, 244, 241, 0.16);
  border-radius: 999px;
  padding: 7px 10px;
  color: rgba(246, 244, 241, 0.78);
  background: rgba(37, 27, 19, 0.24);
  backdrop-filter: blur(14px);
  font-size: 13px;
  font-weight: 560;
}

.button,
.artifact-tab {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 12px;
  background: var(--card);
  color: var(--dark);
}

.button--primary,
.artifact-tab.is-active {
  border-color: var(--green-dark);
  background: var(--green-dark);
  color: var(--surface);
}

.top-actions,
.artifact-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.toolkit-panel,
.details-panel {
  width: 100%;
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(246, 244, 241, 0.96);
  box-shadow: var(--shadow);
  overflow: hidden;
  text-align: left;
}

.toolkit-panel__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.toolkit-panel__top span {
  display: inline-block;
  margin-bottom: 6px;
  border-radius: 999px;
  padding: 4px 9px;
  background: var(--green);
  color: var(--surface);
  font-size: 12px;
  font-weight: 780;
}

.toolkit-panel h2,
.details-panel h3 {
  margin: 0;
  font-size: 18px;
  letter-spacing: 0;
}

.artifact-tabs {
  padding: 12px 16px;
}

.preview-drawer {
  border-top: 1px solid var(--line);
}

.preview-drawer summary,
.details-panel summary {
  padding: 14px 16px;
  color: var(--green-dark);
  font-weight: 680;
  cursor: pointer;
}

.artifact-preview {
  max-height: 340px;
  margin: 0;
  padding: 16px;
  overflow: auto;
  border-top: 1px solid var(--line);
  background: #15181b;
  color: #f3f7f2;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.details-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 14px;
  padding: 0 16px 16px;
}

.details-panel section:last-child {
  padding: 0 16px 16px;
}

.facts-list {
  display: grid;
  grid-template-columns: minmax(88px, auto) 1fr;
  gap: 8px 12px;
  margin: 12px 0 0;
}

.facts-list dt {
  color: var(--dark-soft);
  font-size: 13px;
}

.facts-list dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.issues-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.issue-group h4 {
  margin: 0 0 6px;
  color: var(--dark-soft);
  font-size: 13px;
}

.issue-group ul,
.source-list {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.issue-group li {
  border-left: 3px solid var(--blue);
  padding: 6px 8px;
  background: rgba(59, 82, 109, 0.08);
  font-size: 13px;
}

.issue-group li[data-severity="blocker"] {
  border-left-color: var(--red);
  background: rgba(154, 61, 53, 0.09);
}

.issue-group li[data-severity="warning"],
.issue-group li[data-severity="action"] {
  border-left-color: var(--gold);
  background: rgba(148, 108, 50, 0.1);
}

.muted {
  margin: 0;
  color: var(--dark-soft);
  font-size: 13px;
}

.source-list {
  margin-top: 12px;
}

.source-list li {
  display: grid;
  gap: 2px;
}

.source-list a {
  color: var(--blue);
  overflow-wrap: anywhere;
}

.source-list span {
  color: var(--dark-soft);
  font-size: 12px;
}

.proof-section,
.faq-section {
  width: min(920px, 100%);
  margin: 0 auto;
  padding: 88px 16px;
}

.section-heading {
  display: grid;
  gap: 8px;
  justify-items: center;
  text-align: center;
}

.section-heading p,
.faq-label {
  margin: 0;
  color: var(--dark-soft);
  font-size: 14px;
  font-weight: 640;
}

.section-heading h2 {
  max-width: 520px;
  margin: 0;
  font-size: 34px;
  font-weight: 680;
  line-height: 1.16;
  text-wrap: balance;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 38px;
}

.steps-grid article {
  display: grid;
  gap: 10px;
  min-height: 190px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.58);
}

.steps-grid span {
  display: inline-grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  background: var(--dark);
  color: var(--surface);
  font-weight: 700;
}

.steps-grid h3 {
  margin: 0;
  align-self: end;
  font-size: 19px;
  font-weight: 680;
}

.steps-grid p {
  margin: 0;
  color: var(--dark-soft);
}

.faq-section {
  padding-top: 0;
}

.faq-label {
  max-width: 620px;
  margin: 0 auto;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.faq-list {
  display: grid;
  max-width: 620px;
  margin: 0 auto;
}

.faq-list details {
  border-bottom: 1px solid var(--line);
}

.faq-list summary {
  padding: 18px 0;
  font-weight: 640;
  cursor: pointer;
}

.faq-list p {
  margin: -4px 0 18px;
  color: var(--dark-soft);
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  padding: 26px 16px 34px;
  color: var(--dark-soft);
  font-size: 13px;
}

.site-footer a {
  color: var(--blue);
  font-weight: 680;
}

.policy-page {
  min-height: 100svh;
  background:
    linear-gradient(180deg, rgba(73, 107, 85, 0.12), transparent 280px),
    var(--background);
}

.site-chrome--policy .brand,
.site-chrome--policy .top-nav {
  color: var(--dark);
  background: rgba(255, 255, 255, 0.72);
}

.site-chrome--policy .brand-mark {
  background: var(--dark);
  color: var(--surface);
}

.policy-shell {
  display: grid;
  min-height: calc(100svh - 92px);
  padding: 104px 16px 40px;
  place-items: start center;
}

.policy-card {
  width: min(760px, 100%);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 30px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 22px 70px rgba(27, 20, 14, 0.1);
}

.policy-card .eyebrow {
  color: var(--green);
}

.policy-card h1 {
  color: var(--dark);
  font-size: 38px;
}

.policy-lead {
  margin: 14px 0 28px;
  color: var(--dark-soft);
  font-size: 18px;
  line-height: 1.65;
}

.policy-card section {
  padding: 20px 0;
  border-top: 1px solid var(--line);
}

.policy-card h2 {
  margin: 0 0 8px;
  font-size: 20px;
}

.policy-card p {
  margin: 0;
  color: var(--dark-soft);
  line-height: 1.75;
}

.policy-updated {
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 13px;
}

.site-footer--policy {
  padding-top: 0;
}

@media (min-width: 1024px) {
  h1 {
    font-size: 48px;
  }

  .hero-copy {
    font-size: 18px;
  }
}

@media (max-width: 720px) {
  .site-chrome {
    grid-template-columns: auto 1fr auto;
  }

  .brand {
    grid-column: 1;
  }

  .top-nav {
    grid-column: 3;
  }

  .hero {
    padding-top: 86px;
    align-items: start;
  }

  .hero-content {
    width: 100%;
  }

  .clerk-card {
    min-height: 230px;
  }

  .toolkit-panel__top,
  .details-grid,
  .steps-grid {
    grid-template-columns: 1fr;
  }

  .toolkit-panel__top {
    display: grid;
  }

  .steps-grid article {
    min-height: 0;
  }

  .section-heading h2 {
    font-size: 28px;
  }

  .policy-card {
    padding: 22px;
  }

  .policy-card h1 {
    font-size: 30px;
  }
}
