:root {
  color-scheme: dark;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background: #000;
  color: #0d0d0d;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background: #000;
}

button,
input {
  font: inherit;
}

.page-shell {
  align-items: flex-start;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.12), transparent 34rem),
    #000;
  display: flex;
  justify-content: center;
  min-height: 100vh;
  padding: 48px 24px;
}

.app-layout {
  display: grid;
  gap: 24px;
  max-width: 1120px;
  width: 100%;
}

.lookup-panel {
  background: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  box-shadow: 0 24px 80px rgba(255, 255, 255, 0.12);
  padding: 34px;
  width: 100%;
}

.brand-mark {
  align-items: center;
  background: #0d0d0d;
  border-radius: 8px;
  color: #fff;
  display: flex;
  font-size: 22px;
  font-weight: 800;
  height: 48px;
  justify-content: center;
  line-height: 1;
  margin-bottom: 24px;
  width: 48px;
}

h1 {
  color: #080808;
  font-size: clamp(2rem, 6vw, 3.4rem);
  letter-spacing: 0;
  line-height: 0.95;
  margin: 0 0 30px;
}

.lookup-form {
  display: grid;
  gap: 10px;
}

label {
  color: #282828;
  font-size: 0.92rem;
  font-weight: 700;
}

.input-row {
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) auto;
}

input {
  background: #f6f6f6;
  border: 1px solid #d8d8d8;
  border-radius: 8px;
  color: #080808;
  min-height: 48px;
  min-width: 0;
  outline: none;
  padding: 0 14px;
  width: 100%;
}

input:focus {
  border-color: #080808;
  box-shadow: 0 0 0 3px rgba(8, 8, 8, 0.12);
}

button {
  background: #080808;
  border: 0;
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  font-weight: 800;
  min-height: 48px;
  padding: 0 18px;
  white-space: nowrap;
}

button:hover {
  background: #252525;
}

button:disabled {
  cursor: wait;
  opacity: 0.7;
}

button:focus-visible {
  outline: 3px solid rgba(8, 8, 8, 0.28);
  outline-offset: 2px;
}

.form-status {
  color: #555;
  font-size: 0.92rem;
  min-height: 1.3em;
  margin: 4px 0 0;
}

.results-panel {
  background: #fff;
  border-radius: 8px;
  color: #0d0d0d;
  padding: 28px;
}

.results-header {
  align-items: flex-start;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  margin-bottom: 22px;
}

.eyebrow {
  color: #606060;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  margin: 0 0 8px;
  text-transform: uppercase;
}

h2,
h3 {
  color: #080808;
  letter-spacing: 0;
  line-height: 1.08;
  margin: 0;
}

h2 {
  font-size: clamp(1.6rem, 4vw, 2.5rem);
}

h3 {
  font-size: 1.2rem;
}

.raw-link {
  background: #080808;
  border-radius: 8px;
  color: #fff;
  flex: 0 0 auto;
  font-weight: 800;
  min-height: 44px;
  padding: 12px 16px;
  text-decoration: none;
}

.stat-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 28px;
}

.stat-card {
  background: #f5f5f5;
  border: 1px solid #dedede;
  border-radius: 8px;
  min-width: 0;
  padding: 14px;
}

.stat-card span {
  color: #666;
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.stat-card strong {
  color: #080808;
  display: block;
  font-size: 1rem;
  overflow-wrap: anywhere;
}

.timeline-section {
  border-top: 1px solid #e2e2e2;
  padding-top: 22px;
}

.timeline-section + .timeline-section {
  margin-top: 28px;
}

.section-heading {
  align-items: end;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 16px;
}

.section-heading p {
  color: #666;
  font-size: 0.9rem;
  margin: 0;
  text-align: right;
}

.timeline-list {
  display: grid;
  gap: 10px;
  max-height: 720px;
  overflow: auto;
  padding-right: 4px;
}

.timeline-item {
  display: grid;
  gap: 14px;
  grid-template-columns: 72px minmax(0, 1fr);
}

.timeline-time {
  background: #080808;
  border-radius: 8px;
  color: #fff;
  font-weight: 800;
  height: 34px;
  line-height: 34px;
  text-align: center;
}

.timeline-content {
  background: #f7f7f7;
  border: 1px solid #dfdfdf;
  border-radius: 8px;
  min-width: 0;
  padding: 12px 14px;
}

.timeline-type {
  color: #080808;
  font-size: 0.78rem;
  font-weight: 900;
  margin-bottom: 6px;
}

.timeline-content p {
  color: #333;
  margin: 0 0 10px;
}

details {
  color: #333;
}

summary {
  cursor: pointer;
  font-weight: 800;
}

pre {
  background: #080808;
  border-radius: 8px;
  color: #f4f4f4;
  font-size: 0.82rem;
  line-height: 1.5;
  max-height: 360px;
  overflow: auto;
  padding: 14px;
  white-space: pre-wrap;
}

.frame-list {
  display: grid;
  gap: 10px;
}

.frame-item {
  background: #f7f7f7;
  border: 1px solid #dfdfdf;
  border-radius: 8px;
  padding: 12px 14px;
}

@media (max-width: 560px) {
  .page-shell {
    padding: 16px;
  }

  .lookup-panel {
    padding: 26px;
  }

  .input-row {
    grid-template-columns: 1fr;
  }

  button {
    width: 100%;
  }

  .results-panel {
    padding: 20px;
  }

  .results-header,
  .section-heading {
    align-items: stretch;
    display: grid;
  }

  .section-heading p {
    text-align: left;
  }

  .raw-link {
    text-align: center;
  }

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

  .timeline-item {
    grid-template-columns: 1fr;
  }

  .timeline-time {
    width: 72px;
  }
}
