/* ---------------------------------------------------------------------------
   Theme tokens
   --------------------------------------------------------------------------- */

:root {
  --bg: #f6f7f9;
  --panel: #ffffff;
  --panel-2: #f2f4f7;
  --border: #e0e4ea;
  --text: #16191d;
  --muted: #646c78;
  --accent: #2f6df6;
  --accent-soft: rgba(47, 109, 246, 0.09);

  --ok: #17794a;
  --ok-bg: rgba(23, 121, 74, 0.10);
  --wait: #9a6207;
  --wait-bg: rgba(154, 98, 7, 0.11);
  --bad: #c02626;
  --bad-bg: rgba(192, 38, 38, 0.09);

  --radius: 12px;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1116;
    --panel: #161a21;
    --panel-2: #1c212a;
    --border: #272d37;
    --text: #e6e9ef;
    --muted: #98a1b0;
    --accent: #6f9dff;
    --accent-soft: rgba(111, 157, 255, 0.12);

    --ok: #5fd39b;
    --ok-bg: rgba(95, 211, 155, 0.12);
    --wait: #e9b35c;
    --wait-bg: rgba(233, 179, 92, 0.12);
    --bad: #ff8080;
    --bad-bg: rgba(255, 128, 128, 0.12);
  }
}

/* ---------------------------------------------------------------------------
   Layout
   --------------------------------------------------------------------------- */

* { box-sizing: border-box; }

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

.page {
  max-width: 780px;
  margin: 0 auto;
  padding: 56px 20px 80px;
}

.head h1 {
  margin: 0 0 8px;
  font-size: 1.75rem;
  letter-spacing: -0.02em;
}

.lede {
  margin: 0 0 28px;
  color: var(--muted);
  max-width: 60ch;
}

code {
  font-family: var(--mono);
  font-size: 0.9em;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 0.1em 0.35em;
}

.lede code { background: none; border: none; padding: 0; }

/* ---------------------------------------------------------------------------
   Drop zone
   --------------------------------------------------------------------------- */

.drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 40px 24px;
  background: var(--panel);
  border: 1.5px dashed var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  text-align: center;
  transition: border-color .15s, background .15s;
}

.drop:hover,
.drop:focus-within { border-color: var(--accent); }

.drop.is-over {
  border-color: var(--accent);
  border-style: solid;
  background: var(--accent-soft);
}

.drop-icon {
  width: 30px;
  height: 30px;
  margin-bottom: 4px;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.drop-title { font-weight: 600; }
.drop-title code { background: none; border: none; padding: 0; }
.drop-hint { color: var(--muted); font-size: 0.9rem; }

/* ---------------------------------------------------------------------------
   Result
   --------------------------------------------------------------------------- */

.result:empty { display: none; }
.result { margin-top: 28px; }

.filename {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 0.9rem;
  font-family: var(--mono);
  word-break: break-all;
}

/* Verdict banner */
.verdict {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 18px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  margin-bottom: 20px;
}

.verdict-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-top: 7px;
  flex: none;
  background: currentColor;
}

.verdict-text { color: var(--text); }
.verdict h2 { margin: 0; font-size: 1.05rem; letter-spacing: -0.01em; }
.verdict p { margin: 3px 0 0; color: var(--muted); font-size: 0.92rem; }

.verdict.ok   { background: var(--ok-bg);   border-color: var(--ok);   color: var(--ok); }
.verdict.wait { background: var(--wait-bg); border-color: var(--wait); color: var(--wait); }
.verdict.bad  { background: var(--bad-bg);  border-color: var(--bad);  color: var(--bad); }

/* Cards */
.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 14px;
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.card-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.tag {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 8px;
  border-radius: 999px;
  white-space: nowrap;
}

.tag.ok   { background: var(--ok-bg);   color: var(--ok); }
.tag.wait { background: var(--wait-bg); color: var(--wait); }
.tag.bad  { background: var(--bad-bg);  color: var(--bad); }

/* Field rows */
.fields {
  display: grid;
  grid-template-columns: minmax(120px, max-content) 1fr;
  gap: 8px 18px;
  margin: 0;
  font-size: 0.9rem;
}

.fields dt {
  color: var(--muted);
}

.fields dd {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.85rem;
  word-break: break-all;
  overflow-wrap: anywhere;
}

.fields dd.plain {
  font-family: inherit;
  font-size: 0.9rem;
  word-break: normal;
}

.fields dd.none { color: var(--muted); font-style: italic; }

@media (max-width: 560px) {
  .page { padding: 36px 16px 60px; }
  .fields { grid-template-columns: 1fr; gap: 2px 0; }
  .fields dd { margin-bottom: 8px; }
}
