:root {
  --bg: #0a0f1c;
  --panel: #121a2b;
  --panel-2: #16203442;
  --line: #24314b;
  --ink: #e8eefc;
  --ink-dim: #a9b6d0;
  --ink-faint: #7d8aa5;
  --brand: #7f9bff;
  --brand-fill: #3f5ce0;
  --ok: #4ade80;
  --warn: #fbbf24;
  --fail: #f87171;
  --neutral: #94a3b8;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

a { color: var(--brand); }
a:hover { color: #a9baff; }

.wrap { max-width: 960px; margin: 0 auto; padding: 0 20px; }

header.site {
  border-bottom: 1px solid var(--line);
  background: #0c1322;
}
header.site .wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 60px;
  flex-wrap: wrap;
}
header.site .brand { font-weight: 700; letter-spacing: -0.01em; color: var(--ink); text-decoration: none; }
header.site .brand span { color: var(--ink-faint); font-weight: 400; }
header.site nav { margin-left: auto; display: flex; gap: 18px; flex-wrap: wrap; }
header.site nav a { color: var(--ink-dim); text-decoration: none; font-size: 14px; }
header.site nav a:hover, header.site nav a[aria-current="page"] { color: var(--ink); }

main { padding: 40px 0 64px; }

h1 { font-size: clamp(26px, 4vw, 38px); line-height: 1.2; letter-spacing: -0.02em; margin: 0 0 12px; }
h2 { font-size: 22px; letter-spacing: -0.01em; margin: 40px 0 12px; }
h3 { font-size: 17px; margin: 24px 0 8px; }
p { margin: 0 0 14px; }
.lede { font-size: 18px; color: var(--ink-dim); max-width: 62ch; }
.muted { color: var(--ink-dim); }
.faint { color: var(--ink-faint); font-size: 14px; }

form.check {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 24px 0 8px;
}
form.check input[type="text"] {
  flex: 1 1 320px;
  min-width: 0;
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #0d1526;
  color: var(--ink);
  font-size: 16px;
}
form.check input[type="text"]:focus { outline: 2px solid var(--brand); outline-offset: 1px; }
button, .button {
  padding: 14px 22px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: var(--brand-fill);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}
button:hover, .button:hover { background: #4a67ee; color: #fff; }

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px 22px;
  margin: 18px 0;
}

.summary { display: flex; gap: 18px; align-items: flex-start; flex-wrap: wrap; }
.summary .counts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid;
  white-space: nowrap;
}
.badge.ok { color: var(--ok); border-color: #4ade8055; background: #4ade8012; }
.badge.warn { color: var(--warn); border-color: #fbbf2455; background: #fbbf2412; }
.badge.fail { color: var(--fail); border-color: #f8717155; background: #f8717112; }
.badge.neutral { color: var(--neutral); border-color: #94a3b855; background: #94a3b80f; }

.check-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.check-head h2 { margin: 0; }

.findings { list-style: none; padding: 0; margin: 14px 0 0; }
.findings li { padding: 10px 0 10px 26px; position: relative; border-top: 1px solid var(--line); }
.findings li:first-child { border-top: 0; }
.findings li::before {
  position: absolute; left: 0; top: 10px; font-weight: 700;
}
.findings li.ok::before { content: "✓"; color: var(--ok); }
.findings li.info::before { content: "i"; color: var(--ink-faint); font-style: italic; }
.findings li.warn::before { content: "!"; color: var(--warn); }
.findings li.fail::before { content: "×"; color: var(--fail); }
.findings li .fix { display: block; color: var(--ink-dim); font-size: 14px; margin-top: 4px; }

/* WhatsApp-style link preview card */
.wa {
  border-left: 4px solid #25d366;
  background: #0e1524;
  border-radius: 8px;
  padding: 12px 14px;
  max-width: 460px;
}
.wa .wa-label { color: #25d366; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 8px; }
.wa .wa-img {
  width: 100%; aspect-ratio: 1.91 / 1; border-radius: 6px; background: #1a2438;
  display: flex; align-items: center; justify-content: center; color: var(--ink-faint);
  font-size: 13px; margin-bottom: 8px; overflow: hidden;
}
.wa .wa-img img { width: 100%; height: 100%; object-fit: cover; }
.wa .wa-title { font-weight: 600; margin-bottom: 2px; }
.wa .wa-desc { color: var(--ink-dim); font-size: 14px; }
.wa .wa-url { color: var(--ink-faint); font-size: 12px; margin-top: 6px; }

table.evidence { width: 100%; border-collapse: collapse; font-size: 14px; margin-top: 8px; }
table.evidence th, table.evidence td { text-align: left; padding: 8px 10px; border-top: 1px solid var(--line); vertical-align: top; }
table.evidence th { color: var(--ink-faint); font-weight: 500; width: 34%; }
table.evidence code, .mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  word-break: break-all;
}

details.raw { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 12px; }
details.raw summary { cursor: pointer; color: var(--ink-dim); font-size: 14px; }
pre {
  background: #0d1526; border: 1px solid var(--line); border-radius: 10px;
  padding: 14px; overflow-x: auto; font-size: 13px; line-height: 1.5;
}

/* The four things a phone settles before it shows your link as trustworthy. Drawn in CSS, not
   shipped as a picture: an image here would be a second request, would not follow the palette,
   would blur on a phone, and could never be corrected without re-exporting a file. */
.trust-flow { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; margin: 26px 0 6px; }
.trust-flow .node { position: relative; padding: 14px; border: 1px solid rgba(63, 92, 224, 0.38); background: rgba(63, 92, 224, 0.07); border-radius: 10px; }
.trust-flow .step { font: 600 12px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: 0.08em; color: var(--brand); }
.trust-flow h3 { font-size: 15px; margin: 8px 0 4px; }
.trust-flow p { margin: 0; font-size: 13px; line-height: 1.45; color: var(--ink-dim); }
.trust-flow .node:not(:last-child)::after {
  content: "\2192"; position: absolute; right: -22px; top: 50%; transform: translateY(-50%);
  color: var(--brand); font-size: 16px; line-height: 1;
}
@media (max-width: 760px) {
  .trust-flow { grid-template-columns: 1fr; gap: 34px; }
  .trust-flow .node:not(:last-child)::after {
    content: "\2193"; right: auto; left: 50%; top: auto; bottom: -27px; transform: translateX(-50%);
  }
}

.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid .card { margin: 0; }
.card h3 { margin-top: 0; }

footer.site { border-top: 1px solid var(--line); padding: 28px 0 40px; color: var(--ink-faint); font-size: 14px; }
footer.site a { color: var(--ink-dim); }

.notice {
  border-left: 3px solid var(--brand);
  background: #121a2b;
  padding: 12px 16px;
  border-radius: 0 8px 8px 0;
  color: var(--ink-dim);
  font-size: 15px;
}

@media (max-width: 560px) {
  form.check input[type="text"] { flex: 1 1 100%; }
  form.check button { width: 100%; }
  main { padding: 28px 0 48px; }
}
