/* check.zoes.one - white, quiet, fast. One stylesheet, system fonts, no framework. */

:root {
  --ink: #0f172a;
  --ink-2: #334155;
  --muted: #64748b;
  --line: #e2e8f0;
  --soft: #f8fafc;
  --brand: #1c38ea;
  --tone: #64748b;
  --radius: 14px;
  color-scheme: light;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: #ffffff;
  color: var(--ink);
  font: 16px/1.55 ui-sans-serif, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

[hidden] { display: none !important; }

/* Top bar */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 1080px;
  margin: 0 auto;
  padding: 18px 20px;
}
.brand { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); font-weight: 600; font-size: 18px; letter-spacing: -0.01em; }
.brand:hover { text-decoration: none; }
.topbar-link { font-size: 14px; color: var(--muted); }
.topbar-link:hover { color: var(--ink); text-decoration: none; }

main { max-width: 1080px; margin: 0 auto; padding: 0 20px 64px; }

/* Upload */
#view-upload { max-width: 640px; margin: 0 auto; }
.hero { text-align: center; padding: 40px 0 28px; }
h1 { font-size: clamp(32px, 6vw, 46px); line-height: 1.1; letter-spacing: -0.03em; margin: 0; font-weight: 650; }
.lede { color: var(--ink-2); font-size: 17px; margin: 16px auto 0; max-width: 520px; }

.dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 44px 24px;
  border: 1.5px dashed #cbd5e1;
  border-radius: var(--radius);
  background: var(--soft);
  cursor: pointer;
  text-align: center;
  transition: border-color .15s, background .15s, transform .15s;
}
.dropzone:hover, .dropzone:focus-within { border-color: #94a3b8; background: #f1f5f9; }
.dropzone.is-over { border-color: var(--brand); background: #eef2ff; transform: scale(1.01); }
.drop-icon { color: var(--ink-2); margin-bottom: 6px; }
.drop-title { font-weight: 600; font-size: 17px; }
.drop-sub { color: var(--muted); font-size: 14px; }
.link-like { color: var(--brand); }

.turnstile { display: flex; justify-content: center; margin-top: 14px; min-height: 0; }

.notice { margin: 14px 0 0; padding: 12px 14px; border-radius: 10px; font-size: 14px; }
.notice-error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }

.alt { margin-top: 28px; text-align: center; color: var(--ink-2); font-size: 15px; }
.alt p { margin: 12px 0 0; }
.alt-rule { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; }
.alt-rule::before, .alt-rule::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.howto { margin-top: 28px; border: 1px solid var(--line); border-radius: 12px; padding: 0 16px; }
.howto summary { cursor: pointer; padding: 14px 0; font-weight: 550; font-size: 15px; list-style: none; }
.howto summary::-webkit-details-marker { display: none; }
.howto summary::after { content: "+"; float: right; color: var(--muted); }
.howto[open] summary::after { content: "–"; }
.howto dl { margin: 0 0 16px; font-size: 14px; }
.howto dt { font-weight: 600; margin-top: 10px; }
.howto dd { margin: 2px 0 0; color: var(--ink-2); }

.promises { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 8px; color: var(--muted); font-size: 14px; }
.promises li { display: flex; gap: 10px; align-items: flex-start; }
.promises li::before { content: ""; flex: none; width: 6px; height: 6px; margin-top: 8px; border-radius: 50%; background: #22c55e; }

/* Working */
.working { max-width: 520px; margin: 0 auto; padding: 72px 0 24px; text-align: center; }
.working h2 { font-size: 26px; letter-spacing: -0.02em; margin: 18px 0 6px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.spinner { width: 34px; height: 34px; margin: 0 auto; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--ink); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.steps { list-style: none; padding: 0; margin: 28px auto 0; text-align: left; display: inline-grid; gap: 10px; font-size: 15px; color: var(--muted); }
.steps li { display: flex; align-items: center; gap: 10px; transition: color .3s; }
.steps li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--line); transition: background .3s; }
.steps li.is-active { color: var(--ink); }
.steps li.is-active::before { background: var(--ink); animation: pulse 1s ease-in-out infinite; }
.steps li.is-done { color: var(--ink-2); }
.steps li.is-done::before { background: #22c55e; }
@keyframes pulse { 50% { opacity: .35; } }

/* Result */
.verdict {
  margin-top: 16px;
  padding: 28px;
  border-radius: 18px;
  border: 1px solid color-mix(in srgb, var(--tone) 30%, #ffffff);
  background: color-mix(in srgb, var(--tone) 7%, #ffffff);
}
.verdict-head { display: flex; align-items: center; gap: 12px; }
.verdict-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--tone); box-shadow: 0 0 0 5px color-mix(in srgb, var(--tone) 20%, transparent); flex: none; }
.verdict h1 { font-size: clamp(28px, 5vw, 40px); }
.verdict-detail { margin: 10px 0 0; font-size: 18px; color: var(--ink); }
.verdict-advice { margin: 14px 0 0; color: var(--ink-2); font-size: 15px; }
.attack { margin-top: 16px; padding: 14px 16px; background: #ffffff; border-radius: 12px; border: 1px solid color-mix(in srgb, var(--tone) 25%, #ffffff); }
.attack-label { display: inline-block; font-weight: 650; font-size: 14px; color: var(--tone); }
.attack p { margin: 4px 0 0; color: var(--ink-2); font-size: 14px; }

.result-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px); gap: 20px; margin-top: 20px; align-items: start; }
/* No picture of the message: the facts take the whole width instead of leaving a blank column beside them. */
.result-grid.no-side { grid-template-columns: minmax(0, 1fr); }
.result-grid.no-side .result-side { display: none; }
.result-main { display: grid; gap: 20px; min-width: 0; }
.result-side { position: sticky; top: 16px; min-width: 0; }

.card { border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; background: #ffffff; min-width: 0; }
.card h2 { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 14px; }

.reasons { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.reasons li { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; }
.sev { flex: none; width: 9px; height: 9px; border-radius: 50%; margin-top: 7px; }
.sev-high { background: #d9301b; }
.sev-medium { background: #f59e0b; }
.sev-low { background: #94a3b8; }

.facts { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 10px 16px; margin: 0; font-size: 15px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.facts .flag { display: block; margin-top: 2px; color: #b45309; font-size: 13px; }

.auth { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 999px; font-size: 13px; font-weight: 550; border: 1px solid var(--line); }
.chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.chip-pass { color: #15803d; background: #f0fdf4; border-color: #bbf7d0; }
.chip-fail { color: #b91c1c; background: #fef2f2; border-color: #fecaca; }
.chip-none { color: var(--muted); background: var(--soft); }

.links, .attachments { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.links li, .attachments li { padding: 10px 12px; border-radius: 10px; background: var(--soft); font-size: 14px; min-width: 0; }
.link-domain { font-weight: 600; }
.link-url { display: block; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.link-warn { display: block; margin-top: 4px; color: #b91c1c; font-size: 13px; }
.links li.is-mismatched { background: #fef2f2; }
.att-meta { color: var(--muted); font-size: 13px; margin-left: 6px; }

.preview-frame { position: relative; max-height: 640px; overflow: auto; border-radius: 10px; border: 1px solid var(--line); background: var(--soft); }
.preview-frame img { display: block; width: 100%; height: auto; }
.skeleton { height: 420px; background: linear-gradient(90deg, #f1f5f9 0%, #e2e8f0 50%, #f1f5f9 100%); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.preview-card .small { margin: 10px 0 0; }

.result-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }

.button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 18px; border-radius: 10px; font: inherit; font-size: 15px; font-weight: 550; cursor: pointer; border: 1px solid transparent; text-decoration: none; }
.button:hover { text-decoration: none; }
.button-primary { background: var(--ink); color: #ffffff; }
.button-primary:hover { background: #1e293b; }
.button-ghost { background: #ffffff; color: var(--ink); border-color: var(--line); }
.button-ghost:hover { background: var(--soft); }

.cta { margin-top: 40px; padding: 32px; border-radius: 18px; background: var(--soft); border: 1px solid var(--line); }
.cta h2 { margin: 0; font-size: 24px; letter-spacing: -0.02em; }
.cta p { margin: 8px 0 18px; color: var(--ink-2); max-width: 560px; }

.footer { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px; padding: 28px 20px 40px; color: var(--muted); font-size: 13px; border-top: 1px solid var(--line); }
.footer a { color: var(--muted); }

@media (max-width: 860px) {
  .result-grid { grid-template-columns: minmax(0, 1fr); }
  .result-side { position: static; }
}

@media (max-width: 520px) {
  main { padding: 0 16px 48px; }
  .topbar { padding: 14px 16px; }
  .topbar-link { display: none; }
  .hero { padding-top: 24px; }
  .dropzone { padding: 36px 16px; }
  .verdict { padding: 22px 18px; }
  .card { padding: 16px; }
  .facts { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .facts dd { margin-bottom: 10px; }
  .cta { padding: 24px 18px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
