.lookup-form { display: flex; gap: 10px; }
.lookup-form input {
  flex: 1; min-width: 0; height: 56px; padding: 0 20px; font: inherit; font-size: 19px;
  color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  outline: none; transition: border-color .15s, box-shadow .15s;
}
.lookup-form input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.lookup-form button {
  height: 56px; padding: 0 26px; font: inherit; font-size: 17px; font-weight: 500;
  color: var(--accent-text); background: var(--accent); border: 0; border-radius: var(--radius); cursor: pointer;
}
.lookup-form button:disabled { opacity: .55; cursor: default; }
.lookup-message { color: var(--warn); text-align: center; margin: 20px 0 0; }

.lookup-result { margin-top: 48px; display: grid; gap: 14px; }
.lookup-result:empty { display: none; }
.result-heading { margin: 0 0 6px; font-size: 15px; font-weight: 500; color: var(--muted); display: flex; justify-content: space-between; gap: 12px; }
.result-heading strong { color: var(--text); font-weight: 600; }
.result-heading:focus { outline: none; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 22px 26px; }
.card-label { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 0 0 6px; }
.card-headline { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 12px; margin: 0 0 8px; }
.card-headline h2 { font-size: 28px; line-height: 1.2; font-weight: 700; letter-spacing: -0.02em; margin: 0; overflow-wrap: anywhere; }
.card-badge { font-size: 12px; font-weight: 500; color: var(--accent); background: var(--accent-soft); border-radius: 999px; padding: 3px 10px; white-space: nowrap; }
.card-text { margin: 0; color: var(--text); font-size: 16px; }
.card-notes { margin: 10px 0 0; padding: 0; list-style: none; color: var(--muted); font-size: 15px; display: grid; gap: 4px; }
.card-link { display: inline-block; margin-top: 10px; font-size: 15px; }
.card[data-status="none"] h2 { color: var(--muted); }
.card[data-status="unknown"] h2 { color: var(--warn); }

.card details { margin-top: 14px; }
.card summary { cursor: pointer; color: var(--muted); font-size: 14px; }
.card dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 12px 0 0; font-size: 14px; }
.card dt { color: var(--muted); }
.card dd { margin: 0; overflow-wrap: anywhere; }
.card pre { margin: 12px 0 0; padding: 12px; background: var(--sidebar); border-radius: 10px; font-size: 12px; overflow-x: auto; max-height: 320px; }
.raw-caption { font-size: 13px; color: var(--muted); margin: 14px 0 0; }

.card.placeholder h2 { width: 45%; height: 30px; border-radius: 8px; background: var(--border); }
.card.placeholder .card-text { width: 75%; height: 16px; border-radius: 6px; background: var(--border); }

@media (max-width: 520px) {
  .lookup-form { flex-direction: column; }
  .lookup-form input { flex: none; }
  .card { padding: 18px 20px; }
  .card-headline h2 { font-size: 24px; }
  .card dl { grid-template-columns: 1fr; gap: 2px; }
  .card dd { margin-bottom: 8px; }
}
