:root {
  --bg: #e8eef4;
  --bg-deep: #d5e0ea;
  --card: #ffffff;
  --ink: #102033;
  --mute: #5b6b7c;
  --brand: #0f6e6a;
  --brand-dark: #0b5552;
  --accent: #d97706;
  --line: rgba(16, 32, 51, 0.1);
  --danger: #b42318;
  --ok: #0f6e6a;
  --shadow: 0 18px 50px rgba(16, 32, 51, 0.08);
  --font: "Manrope", "Segoe UI", sans-serif;
  --display: "Instrument Serif", Georgia, serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  position: relative;
}

.atmosphere {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 45% at 12% -10%, rgba(15, 110, 106, 0.18), transparent 55%),
    radial-gradient(ellipse 55% 40% at 100% 0%, rgba(217, 119, 6, 0.12), transparent 50%),
    linear-gradient(180deg, #f3f7fb 0%, var(--bg) 42%, var(--bg-deep) 100%);
}

.atmosphere::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.35;
  background-image: radial-gradient(rgba(16, 32, 51, 0.08) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: linear-gradient(180deg, #000 0%, transparent 75%);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.page {
  width: min(760px, calc(100% - 2rem));
  margin: 0 auto;
  padding: clamp(3rem, 8vw, 5.5rem) 0 4rem;
}

.hero {
  margin-bottom: 1.75rem;
  animation: rise 0.7s ease both;
}

.brand {
  margin: 0 0 0.85rem;
  font-family: var(--display);
  font-size: clamp(2.4rem, 7vw, 3.6rem);
  line-height: 0.95;
  letter-spacing: -0.02em;
  color: var(--ink);
}

h1 {
  margin: 0;
  font-family: var(--font);
  font-size: clamp(1.15rem, 2.8vw, 1.45rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.subtitle {
  margin: 0.55rem 0 0;
  color: var(--mute);
  line-height: 1.55;
  max-width: 34rem;
  font-size: 1.02rem;
}

.search-box {
  display: flex;
  gap: 0.65rem;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 0.45rem 0.45rem 0.45rem 1.15rem;
  box-shadow: var(--shadow);
  animation: rise 0.75s ease 0.08s both;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.search-box:focus-within {
  transform: translateY(-2px);
  box-shadow: 0 22px 55px rgba(16, 32, 51, 0.12);
  border-color: rgba(15, 110, 106, 0.35);
}

.search-box input {
  flex: 1;
  border: 0;
  outline: none;
  font: inherit;
  font-size: 1.02rem;
  font-weight: 500;
  background: transparent;
  min-width: 0;
  color: var(--ink);
}

.search-box input::placeholder {
  color: #8a97a6;
  font-weight: 450;
}

.search-box button {
  border: 0;
  border-radius: 14px;
  background: var(--brand);
  color: #fff;
  font: inherit;
  font-weight: 700;
  padding: 0.9rem 1.35rem;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
  white-space: nowrap;
}

.search-box button:hover:not(:disabled) {
  background: var(--brand-dark);
  transform: translateY(-1px);
}

.search-box button:disabled {
  opacity: 0.65;
  cursor: wait;
}

.status {
  margin: 1rem 0 0;
  color: var(--mute);
  font-size: 0.92rem;
  animation: rise 0.35s ease both;
}

.error {
  margin-top: 1rem;
  padding: 0.95rem 1.1rem;
  border-radius: 14px;
  background: #fff5f4;
  border: 1px solid #f3c4c0;
  color: var(--danger);
  font-size: 0.94rem;
  animation: rise 0.35s ease both;
}

.result {
  margin-top: 1.6rem;
  display: grid;
  gap: 1rem;
  animation: rise 0.55s ease both;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(16, 32, 51, 0.05);
}

.card-head {
  background: linear-gradient(135deg, #102033 0%, #1a364f 100%);
  color: #fff;
  padding: 1.2rem 1.3rem;
}

.card-head .label {
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.7;
  font-weight: 700;
}

.card-head .code {
  margin-top: 0.35rem;
  font-size: clamp(1.1rem, 3vw, 1.35rem);
  font-weight: 800;
  word-break: break-all;
  letter-spacing: -0.01em;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.85rem;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.3;
  max-width: 100%;
}

.status-pill::before {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: #34d399;
  flex-shrink: 0;
  box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.25);
}

.meta {
  padding: 1.15rem 1.3rem 1.25rem;
  display: grid;
  gap: 0.85rem;
}

.meta-row {
  display: grid;
  grid-template-columns: 8.5rem 1fr;
  gap: 0.75rem;
  font-size: 0.94rem;
}

.meta-row .k {
  color: var(--mute);
  font-weight: 500;
}

.meta-row .v {
  font-weight: 650;
  word-break: break-word;
}

.meta-row .v.status {
  color: var(--brand);
}

.timeline-title {
  padding: 1.05rem 1.3rem;
  border-bottom: 1px solid var(--line);
  font-weight: 800;
  font-size: 0.98rem;
}

.timeline {
  list-style: none;
  margin: 0;
  padding: 1.25rem 1.25rem 1.35rem 2rem;
  border-left: 2px solid rgba(15, 110, 106, 0.25);
  margin-left: 1.55rem;
}

.timeline li {
  position: relative;
  padding: 0 0 1.25rem 1rem;
  animation: rise 0.45s ease both;
}

.timeline li:nth-child(1) { animation-delay: 0.05s; }
.timeline li:nth-child(2) { animation-delay: 0.1s; }
.timeline li:nth-child(3) { animation-delay: 0.15s; }

.timeline li:last-child { padding-bottom: 0; }

.timeline li::before {
  content: "";
  position: absolute;
  left: -1.45rem;
  top: 0.35rem;
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 4px #fff;
}

.timeline li:first-child::before {
  background: var(--accent);
}

.timeline time {
  display: block;
  font-size: 0.78rem;
  color: var(--brand);
  font-weight: 750;
  margin-bottom: 0.2rem;
}

.timeline .loc {
  margin: 0 0 0.2rem;
  font-size: 0.78rem;
  color: var(--mute);
  font-weight: 600;
}

.timeline .desc {
  margin: 0;
  font-size: 0.94rem;
  line-height: 1.5;
}

.source {
  margin: 0;
  padding: 0 1.3rem 1.15rem;
  font-size: 0.75rem;
  color: var(--mute);
}

.track17-head {
  background: linear-gradient(135deg, #0b1f33 0%, #163552 100%);
}

.track17-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--line);
  background: #f7fafc;
}

.track17-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0.85rem 1.25rem 0.15rem;
  background: #f7fafc;
}

.track17-tab {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 0.45rem 0.85rem;
  cursor: pointer;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 650;
  color: var(--ink);
}

.track17-tab small {
  font-weight: 500;
  color: var(--mute);
  margin-left: 0.2rem;
}

.track17-tab.is-active {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
}

.track17-tab.is-active small {
  color: rgba(255, 255, 255, 0.8);
}

.track17-badge {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #0b1f33;
}

.track17-open {
  font-size: 0.85rem;
  font-weight: 750;
  color: var(--brand);
  text-decoration: none;
}

.track17-open:hover {
  text-decoration: underline;
}

.track17-frame-wrap {
  background: #fff;
  min-height: 640px;
}

.track17-frame {
  display: block;
  width: 100%;
  height: 720px;
  border: 0;
  background: #fff;
}

.foot {
  margin-top: 2.75rem;
  font-size: 0.86rem;
  color: var(--mute);
  line-height: 1.5;
  animation: rise 0.8s ease 0.15s both;
}

.foot p { margin: 0; }

.foot-meta {
  display: block;
  margin-top: 0.45rem;
  font-size: 0.75rem;
  opacity: 0.75;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 560px) {
  .search-box {
    flex-direction: column;
    align-items: stretch;
    border-radius: 18px;
    padding: 0.85rem;
  }

  .search-box button { width: 100%; }
  .meta-row { grid-template-columns: 1fr; gap: 0.18rem; }
  .track17-frame-wrap,
  .track17-frame { min-height: 520px; height: 560px; }
  .track17-toolbar { flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
