/*
 * metadata — its own look.
 * Cool dossier / tag-reader. Not Serpeo, not promptguard.
 */

:root {
  --bg: #e8eef2;
  --ink: #0b1f2a;
  --mute: #4a6570;
  --faint: #7a929c;
  --line: #c5d2d8;
  --paper: #f7fafb;
  --panel: #ffffff;
  --hit: #1fa7a0;
  --hit-deep: #0f7f79;
  --hit-wash: #d7f3f1;
  --bad: #b42318;
  --bad-wash: #fdecea;
  --sans: 'Instrument Sans', system-ui, -apple-system, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    linear-gradient(165deg, #dfe9ee 0%, var(--bg) 42%, #eef4f6 100%);
  font: 400 16px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
}

.grain {
  pointer-events: none;
  position: fixed;
  inset: 0;
  opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 2px solid var(--hit);
  outline-offset: 3px;
}

.frame {
  position: relative;
  width: min(680px, calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0 80px;
}

.bar {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 40px;
  font: 500 12px/1 var(--mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--faint);
}

.bar a {
  color: var(--mute);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}

.bar a:hover {
  color: var(--ink);
  border-color: var(--hit);
}

.intro {
  margin-bottom: 28px;
  animation: fadeUp 0.45s ease both;
}

.kicker {
  margin: 0 0 10px;
  color: var(--hit-deep);
  font: 500 12px/1 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.intro h1 {
  margin: 0;
  font-family: var(--sans);
  font-weight: 700;
  font-size: clamp(48px, 12vw, 72px);
  line-height: 0.92;
  letter-spacing: -0.045em;
}

.lede {
  margin: 14px 0 0;
  max-width: 40ch;
  color: var(--mute);
  font-size: 16px;
  line-height: 1.5;
}

.dock {
  padding: 18px 18px 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 4px solid var(--hit);
  box-shadow: 0 18px 40px -28px rgba(11, 31, 42, 0.45);
  animation: fadeUp 0.5s ease 0.05s both;
}

.lbl {
  display: block;
  margin-bottom: 8px;
  font: 500 11px/1 var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
}

.row {
  display: flex;
  gap: 10px;
  align-items: stretch;
}

.row input {
  flex: 1;
  min-width: 0;
  padding: 12px 12px;
  border: 0;
  border-bottom: 2px solid var(--line);
  border-radius: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 14px/1.4 var(--mono);
  transition: border-color 0.18s, background 0.18s;
}

.row input::placeholder {
  color: #9aabb0;
}

.row input:focus {
  outline: none;
  border-bottom-color: var(--hit);
  background: #fff;
}

.go {
  flex: none;
  padding: 0 18px;
  border: 0;
  background: var(--ink);
  color: #f3f8f9;
  font: 600 14px/1 var(--sans);
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.12s;
}

.go:hover {
  background: #07151c;
}

.go:active {
  transform: translateY(1px);
}

.go:disabled {
  opacity: 0.55;
  cursor: progress;
}

.hint {
  margin: 12px 0 0;
  color: var(--faint);
  font: 400 12px/1.4 var(--mono);
}

.hint code {
  color: var(--mute);
}

.err {
  margin-top: 16px;
  padding: 12px 14px;
  border: 1px solid #f0b4ae;
  background: var(--bad-wash);
  color: var(--bad);
  font-size: 13px;
}

.pulse {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-top: 22px;
  padding: 14px 16px;
  background: var(--hit-wash);
  border: 1px solid #b9e4e0;
}

.pulseDot {
  width: 10px;
  height: 10px;
  margin-top: 4px;
  border-radius: 50%;
  background: var(--hit);
  animation: blink 1s ease-in-out infinite;
}

.pulse b {
  display: block;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.pulse span {
  display: block;
  margin-top: 2px;
  color: var(--mute);
  font: 400 12px/1.4 var(--mono);
  word-break: break-all;
}

.dossier {
  margin-top: 28px;
  animation: fadeUp 0.4s ease;
}

.card {
  display: grid;
  grid-template-columns: 150px 1fr;
  min-height: 128px;
  background: var(--panel);
  border: 1px solid var(--line);
  overflow: hidden;
}

.card.bare {
  grid-template-columns: 1fr;
}

.card .shot {
  min-height: 128px;
  background: #d5dee3 center / cover no-repeat;
  border-right: 1px solid var(--line);
}

.card.bare .shot {
  display: none;
}

.card .copy {
  padding: 16px 18px;
  min-width: 0;
}

.card .host {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  color: var(--faint);
  font: 500 11px/1 var(--mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.card .host img {
  width: 14px;
  height: 14px;
}

.card h2 {
  margin: 0;
  font-family: var(--sans);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.25;
}

.card p {
  margin: 8px 0 0;
  color: var(--mute);
  font-size: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.spec {
  margin: 14px 0 0;
  padding: 0;
  border: 1px solid var(--line);
  background: var(--panel);
}

.spec .item {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 12px;
  padding: 11px 14px;
  border-top: 1px solid var(--line);
  animation: fadeUp 0.35s ease both;
}

.spec .item:first-child {
  border-top: 0;
}

.spec .item:nth-child(1) { animation-delay: 0.02s; }
.spec .item:nth-child(2) { animation-delay: 0.06s; }
.spec .item:nth-child(3) { animation-delay: 0.1s; }
.spec .item:nth-child(4) { animation-delay: 0.14s; }
.spec .item:nth-child(5) { animation-delay: 0.18s; }
.spec .item:nth-child(6) { animation-delay: 0.22s; }
.spec .item:nth-child(7) { animation-delay: 0.26s; }

.spec dt {
  margin: 0;
  color: var(--faint);
  font: 500 11px/1.4 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding-top: 2px;
}

.spec dd {
  margin: 0;
  word-break: break-word;
  font-size: 14px;
}

.spec dd a {
  color: var(--hit-deep);
  text-decoration: none;
}

.spec dd a:hover {
  text-decoration: underline;
}

.spec dd.miss {
  color: var(--faint);
}

.raw {
  margin-top: 14px;
  background: var(--ink);
  color: #d7e4e8;
}

.rawTop {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font: 500 11px/1 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #8aa0a8;
}

.rawTop button {
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: transparent;
  color: #d7e4e8;
  padding: 5px 10px;
  font: 500 12px var(--sans);
  letter-spacing: -0.01em;
  cursor: pointer;
}

.rawTop button:hover {
  background: rgba(255, 255, 255, 0.06);
}

.raw pre {
  margin: 0;
  padding: 14px;
  max-height: 300px;
  overflow: auto;
  font: 400 12px/1.55 var(--mono);
}

.epLine {
  margin: 12px 0 0;
  color: var(--faint);
  font: 400 12px/1.4 var(--mono);
  word-break: break-all;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes blink {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.35;
    transform: scale(0.85);
  }
}

@media (max-width: 560px) {
  .frame {
    width: min(100% - 28px, 680px);
  }

  .row {
    flex-direction: column;
  }

  .go {
    height: 44px;
  }

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

  .card .shot {
    min-height: 150px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .spec .item {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}
