@import url("https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=Public+Sans:wght@500;600;700;800&family=Roboto+Mono:wght@500;600&display=swap");

:root {
  --ink: #111412;
  --paper: #f5f1e8;
  --panel: #fffdf6;
  --mist: #e2ebe3;
  --line: #1b211c;
  --muted: #5e675f;
  --green: #1d8a5b;
  --blue: #245fce;
  --red: #d33a2c;
  --yellow: #f0c747;
  --violet: #7057c8;
  --shadow: 6px 6px 0 #111412;
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(17, 20, 18, 0.04) 1px, transparent 1px) 0 0 / 28px 28px,
    linear-gradient(rgba(17, 20, 18, 0.035) 1px, transparent 1px) 0 0 / 28px 28px,
    var(--paper);
  font-family: "Public Sans", sans-serif;
}

html[lang^="zh"] body {
  font-family: "Public Sans", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

body,
button,
input {
  letter-spacing: 0;
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

code {
  border: 1px solid rgba(17, 20, 18, 0.24);
  border-radius: 5px;
  padding: 0.05em 0.28em;
  background: rgba(255, 253, 246, 0.8);
  font-family: "Roboto Mono", monospace;
  font-size: 0.88em;
}

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px clamp(18px, 4vw, 52px);
  border-bottom: 2px solid var(--line);
  background: rgba(245, 241, 232, 0.94);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 800;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 2px solid var(--line);
  border-radius: 50%;
  color: white;
  background: conic-gradient(from 90deg, var(--green), var(--blue), var(--yellow), var(--green));
  font-family: "Roboto Mono", monospace;
  font-size: 12px;
  box-shadow: 3px 3px 0 var(--line);
}

.nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.nav a {
  padding: 8px 10px;
  border: 2px solid transparent;
  border-radius: var(--radius);
  text-decoration: none;
  font-size: 14px;
  font-weight: 800;
}

.nav a:hover {
  border-color: var(--line);
  background: var(--panel);
}

.hero {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(320px, 500px);
  gap: clamp(26px, 5vw, 64px);
  align-items: center;
  min-height: auto;
  padding: clamp(36px, 5vw, 64px) clamp(18px, 5vw, 72px) clamp(32px, 5vw, 56px);
}

.hero-copy {
  max-width: 870px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--blue);
  font-family: "Roboto Mono", monospace;
  font-size: clamp(14px, 1.2vw, 17px);
  font-weight: 800;
  line-height: 1.2;
  overflow-wrap: normal;
  text-transform: uppercase;
  white-space: nowrap;
}

html[lang^="zh"] .eyebrow {
  font-family: "Public Sans", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: clamp(17px, 1.8vw, 22px);
}

h1 {
  margin: 0;
  max-width: 15ch;
  font-family: "Instrument Serif", Georgia, serif;
  font-size: clamp(54px, 8.4vw, 118px);
  font-weight: 400;
  line-height: 0.88;
}

html[lang^="zh"] h1,
html[lang^="zh"] h2,
html[lang^="zh"] .legal-page h1 {
  font-family: "Instrument Serif", "Songti SC", "STSong", "SimSun", serif;
  line-height: 1.16;
}

html[lang^="zh"] h1 {
  max-width: 12ch;
  padding-top: 0.08em;
  font-size: clamp(42px, 5.8vw, 72px);
}

.hero-text {
  max-width: 760px;
  margin: 26px 0 0;
  color: var(--muted);
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.32;
}

.audit-console,
.score-card,
.file-grid > div,
.code-panel,
.findings article,
.matrix-wrap {
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.audit-console {
  display: grid;
  gap: 16px;
  padding: clamp(18px, 3vw, 26px);
}

.input-line,
.mode-field {
  display: grid;
  gap: 8px;
}

label,
legend {
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

input[type="url"] {
  min-height: 50px;
  width: 100%;
  border: 2px solid var(--line);
  border-radius: 7px;
  padding: 12px 14px;
  background: #fefcf5;
  color: var(--ink);
  font-weight: 700;
  outline: none;
}

input[type="url"]:focus {
  box-shadow: 0 0 0 4px rgba(36, 95, 206, 0.18);
}

.mode-field {
  margin: 0;
  border: 2px solid var(--line);
  border-radius: 7px;
  padding: 12px;
  background: var(--mist);
}

.mode-field label {
  display: flex;
  align-items: center;
  gap: 8px;
  text-transform: none;
}

.verification-box {
  display: grid;
  gap: 12px;
  border: 2px solid var(--line);
  border-radius: 7px;
  padding: 12px;
  background: #fefcf5;
}

.verification-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 14px;
}

.verification-head span {
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.verification-head small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.turnstile-box {
  min-height: 0;
}

.verification-box[data-state="active"] .turnstile-box {
  min-height: 64px;
}

.verification-box[data-state="inactive"] .turnstile-box,
.verification-box[data-state="failed"] .turnstile-box {
  display: none;
}

.button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 16px;
  color: var(--ink);
  background: var(--panel);
  box-shadow: 4px 4px 0 var(--line);
  cursor: pointer;
  font-weight: 800;
  text-decoration: none;
  transition: transform 150ms ease, box-shadow 150ms ease;
}

.button:hover {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--line);
}

.button.primary {
  color: white;
  background: var(--green);
}

.button.secondary {
  background: var(--yellow);
}

.console-note {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.status-band {
  display: grid;
  grid-template-columns: minmax(260px, 0.5fr) minmax(300px, 1fr);
  gap: 18px;
  padding: 0 clamp(18px, 5vw, 72px) clamp(36px, 6vw, 72px);
}

.score-card {
  min-height: 180px;
  display: grid;
  gap: 8px;
  align-content: center;
  padding: 22px;
  background: var(--ink);
  color: var(--panel);
}

.score-label {
  color: var(--yellow);
  font-family: "Roboto Mono", monospace;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.score-card strong {
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 78px;
  font-weight: 400;
  line-height: 0.9;
}

.score-card span:last-child {
  color: #dfe9df;
  line-height: 1.35;
}

.file-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.file-grid > div {
  min-height: 180px;
  display: grid;
  align-content: space-between;
  gap: 14px;
  padding: 18px;
}

.file-grid span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.file-grid strong {
  font-size: clamp(22px, 2.5vw, 34px);
}

.section-heading {
  max-width: 1180px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin: 0 auto 22px;
}

h2 {
  margin: 0;
  font-family: "Instrument Serif", Georgia, serif;
  font-size: clamp(38px, 5.6vw, 76px);
  font-weight: 400;
  line-height: 0.92;
}

.results,
.matrix-section,
.policy-section,
.faq {
  padding: clamp(36px, 6vw, 72px) clamp(18px, 5vw, 72px);
}

.results {
  border-block: 2px solid var(--line);
  background: var(--mist);
}

.findings {
  max-width: 1180px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 0 auto;
}

.findings article {
  min-height: 180px;
  padding: 18px;
}

.finding-tag {
  display: inline-flex;
  padding: 5px 8px;
  border: 2px solid var(--line);
  border-radius: 999px;
  font-family: "Roboto Mono", monospace;
  font-size: 12px;
  font-weight: 700;
}

.finding-tag.high {
  color: white;
  background: var(--red);
}

.finding-tag.medium {
  background: var(--yellow);
}

.finding-tag.low {
  background: #cad8ff;
}

.finding-tag.good {
  color: white;
  background: var(--green);
}

.findings h3 {
  margin: 16px 0 8px;
  font-size: 22px;
}

.findings p {
  margin: 0;
  color: var(--muted);
  line-height: 1.42;
}

.error {
  max-width: 1180px;
  margin: 0 auto 18px;
  padding: 12px 14px;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: #ffddd7;
  font-weight: 800;
}

.matrix-section {
  background: var(--panel);
}

.matrix-wrap {
  max-width: 1180px;
  overflow-x: auto;
  margin: 0 auto;
  box-shadow: none;
}

.matrix-table {
  width: 100%;
  min-width: 780px;
  border-collapse: collapse;
}

th,
td {
  border-bottom: 2px solid var(--line);
  padding: 14px;
  text-align: left;
  vertical-align: top;
}

th {
  background: var(--ink);
  color: var(--panel);
  font-size: 12px;
  text-transform: uppercase;
}

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

.bot-token {
  font-family: "Roboto Mono", monospace;
  font-weight: 700;
}

.status-pill {
  display: inline-flex;
  padding: 5px 8px;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: var(--mist);
  font-family: "Roboto Mono", monospace;
  font-size: 12px;
  font-weight: 700;
}

.status-pill.blocked {
  color: white;
  background: var(--red);
}

.status-pill.allowed {
  color: white;
  background: var(--green);
}

.policy-section {
  background: var(--paper);
}

.policy-grid {
  max-width: 1180px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 0 auto;
}

.code-panel {
  min-height: 500px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: none;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border-bottom: 2px solid var(--line);
  background: var(--mist);
}

.panel-head h3 {
  margin: 0;
  font-size: 20px;
}

pre {
  flex: 1;
  margin: 0;
  padding: 16px;
  overflow: auto;
  color: #e8f0e8;
  background: #121713;
  font-family: "Roboto Mono", monospace;
  font-size: 12px;
  line-height: 1.48;
  white-space: pre-wrap;
}

.download-row {
  max-width: 1180px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin: 18px auto 0;
}

.copy-status {
  color: var(--muted);
  font-weight: 800;
}

.proof-band {
  padding: 28px clamp(18px, 5vw, 72px);
  border-block: 2px solid var(--line);
  background: var(--ink);
  color: var(--panel);
}

.source-list {
  max-width: 1180px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 auto;
}

.source-list a {
  border: 2px solid var(--panel);
  border-radius: 999px;
  padding: 8px 12px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 800;
}

.source-list a:hover {
  color: var(--ink);
  background: var(--yellow);
}

.guides-section {
  padding: clamp(36px, 6vw, 72px) clamp(18px, 5vw, 72px);
  background: var(--mist);
}

.guide-grid {
  max-width: 1180px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 0 auto;
}

.guide-card {
  min-height: 230px;
  display: grid;
  align-content: space-between;
  gap: 16px;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  color: inherit;
  background: var(--panel);
  box-shadow: var(--shadow);
  text-decoration: none;
}

.guide-card span {
  color: var(--blue);
  font-family: "Roboto Mono", monospace;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.guide-card strong {
  font-family: "Instrument Serif", Georgia, serif;
  font-size: clamp(32px, 3.4vw, 48px);
  font-weight: 400;
  line-height: 0.95;
}

.guide-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.42;
}

.guide-card:hover {
  transform: translate(2px, 2px);
  box-shadow: 3px 3px 0 var(--line);
}

.faq {
  max-width: 1180px;
  margin: 0 auto;
}

details {
  border-top: 2px solid var(--line);
  padding: 18px 0;
}

details:last-child {
  border-bottom: 2px solid var(--line);
}

summary {
  cursor: pointer;
  font-size: clamp(20px, 2.4vw, 30px);
  font-weight: 800;
}

details p {
  max-width: 800px;
  color: var(--muted);
  line-height: 1.48;
}

.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  padding: 24px 18px;
  border-top: 2px solid var(--line);
  background: var(--mist);
  font-weight: 800;
}

.legal-page {
  max-width: 860px;
  padding: clamp(42px, 7vw, 92px) 18px;
  margin: 0 auto;
}

.legal-page h1 {
  max-width: 12ch;
  font-family: "Instrument Serif", Georgia, serif;
  font-size: clamp(50px, 8vw, 96px);
  font-weight: 400;
  line-height: 0.9;
}

.legal-page h2 {
  margin: 34px 0 8px;
  font-family: "Public Sans", sans-serif;
  font-size: clamp(24px, 3vw, 38px);
  font-weight: 800;
  line-height: 1.05;
}

.legal-page p,
.legal-page li {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.55;
}

.legal-page ul {
  padding-left: 1.2em;
}

.guide-page {
  max-width: 980px;
  padding: clamp(42px, 7vw, 92px) 18px;
  margin: 0 auto;
}

.guide-page h1 {
  max-width: 13ch;
  font-family: "Instrument Serif", Georgia, serif;
  font-size: clamp(52px, 7vw, 96px);
  font-weight: 400;
  line-height: 0.92;
}

.guide-lede {
  max-width: 800px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: clamp(20px, 2.2vw, 26px);
  line-height: 1.34;
}

.guide-page section {
  margin-top: 42px;
}

.guide-page h2 {
  margin: 0 0 12px;
  font-family: "Public Sans", sans-serif;
  font-size: clamp(26px, 3.2vw, 42px);
  font-weight: 800;
  line-height: 1.06;
}

.guide-page p,
.guide-page li {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.58;
}

.guide-callout {
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(18px, 3vw, 28px);
  background: var(--mist);
  box-shadow: var(--shadow);
}

.guide-callout p {
  margin-bottom: 0;
  color: var(--ink);
  font-weight: 700;
}

.guide-table-wrap {
  overflow-x: auto;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.guide-table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
}

.guide-code {
  min-height: 0;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.inline-cta {
  margin-top: 4px;
}

.source-notes {
  border-top: 2px solid var(--line);
  padding-top: 24px;
}

@media (max-width: 1040px) {
  .hero,
  .status-band,
  .policy-grid,
  .findings,
  .guide-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .file-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  h1 {
    font-size: clamp(46px, 15vw, 72px);
  }

  .file-grid {
    grid-template-columns: 1fr;
  }

  .button {
    width: 100%;
  }

  .panel-head {
    align-items: flex-start;
    flex-direction: column;
  }
}
