:root {
  color-scheme: light;
  --bg: #f5f7f8;
  --panel: #ffffff;
  --ink: #172026;
  --muted: #5d6972;
  --line: #dce3e7;
  --accent: #0f766e;
  --accent-2: #2563eb;
  --warn: #b45309;
  --shadow: 0 18px 40px rgba(26, 43, 52, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

a {
  color: inherit;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 260px;
  padding: 28px 22px;
  background: #132126;
  color: #f7fbfc;
  display: flex;
  flex-direction: column;
  gap: 36px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--accent);
  font-weight: 800;
}

.brand strong,
.brand span {
  display: block;
}

.brand span:not(.brand-mark) {
  margin-top: 3px;
  color: #abc0c7;
  font-size: 13px;
}

nav {
  display: grid;
  gap: 8px;
}

nav a {
  padding: 10px 12px;
  border-radius: 6px;
  color: #dbe7ea;
  text-decoration: none;
  font-size: 14px;
}

nav a:hover {
  background: rgba(255, 255, 255, 0.08);
}

main {
  margin-left: 260px;
  padding: 32px;
  display: grid;
  gap: 24px;
}

.hero,
.deploy {
  min-height: 360px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  align-items: end;
  padding: 42px;
  border-radius: 8px;
  background:
    linear-gradient(rgba(19, 33, 38, 0.72), rgba(19, 33, 38, 0.74)),
    url("https://images.unsplash.com/photo-1457369804613-52c61a468e7d?auto=format&fit=crop&w=1800&q=80") center/cover;
  color: #fff;
  box-shadow: var(--shadow);
}

.hero h1 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(34px, 5vw, 64px);
  line-height: 1.04;
  letter-spacing: 0;
}

.hero-copy {
  max-width: 760px;
  margin: 22px 0 0;
  color: #e7eff1;
  font-size: 18px;
  line-height: 1.65;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero .eyebrow,
.deploy .eyebrow {
  color: #7dd3c7;
}

.query-panel,
.metrics article,
.paper-card,
.journal-groups article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.query-panel {
  padding: 22px;
  color: var(--ink);
}

.query-panel span {
  color: var(--muted);
  font-size: 13px;
}

.query-panel strong {
  display: block;
  margin-top: 8px;
  font-size: 21px;
  line-height: 1.35;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.chips button,
.toolbar button {
  padding: 7px 10px;
  border: 0;
  border-radius: 999px;
  background: #edf7f6;
  color: #0b5f59;
  cursor: pointer;
  font-weight: 700;
}

.chips button:hover,
.toolbar button:hover,
.chips button.active,
.toolbar button.active {
  background: var(--accent);
  color: #fff;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.metrics article {
  padding: 20px;
}

.metrics span,
.metrics small {
  color: var(--muted);
}

.metrics strong {
  display: block;
  margin: 10px 0 4px;
  font-size: 34px;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 24px;
  align-items: start;
}

.section-heading h2 {
  margin: 0 0 18px;
  font-size: 30px;
}

.timeline {
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
  list-style: none;
  counter-reset: step;
}

.timeline li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 12px;
  align-items: start;
  padding: 16px;
  border-left: 4px solid var(--accent);
  background: #fff;
  border-radius: 8px;
}

.timeline li::before {
  content: counter(step);
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #e6f4f2;
  color: var(--accent);
  font-weight: 800;
}

.timeline strong,
.timeline span {
  display: block;
}

.timeline span {
  grid-column: 2;
  color: var(--muted);
  line-height: 1.5;
}

.journal-groups {
  display: grid;
  gap: 14px;
}

.journal-groups article {
  padding: 18px;
}

.journal-groups h3,
.paper-card h3 {
  margin: 0;
}

.journal-groups p,
.paper-card p {
  color: var(--muted);
  line-height: 1.6;
}

.paper-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.paper-card {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.paper-topline {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
}

dl {
  margin: auto 0 0;
  display: grid;
  gap: 8px;
}

dl div {
  display: grid;
  grid-template-columns: 78px 1fr;
  gap: 8px;
}

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

dd {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
  font-weight: 700;
}

.paper-card a,
.paper-card button,
.button {
  width: fit-content;
  padding: 9px 12px;
  border: 0;
  border-radius: 6px;
  background: #eaf3ff;
  color: var(--accent-2);
  cursor: pointer;
  font-weight: 800;
  text-decoration: none;
}

.paper-card button {
  background: var(--accent);
  color: #fff;
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: -6px 0 16px;
}

.toolbar button {
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line);
}

.toolbar button.active,
.toolbar button:hover {
  box-shadow: none;
}

.text-button {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--accent-2);
  cursor: pointer;
  font-weight: 800;
}

.bars {
  padding: 24px;
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
  display: grid;
  gap: 18px;
}

.bars label {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  font-weight: 800;
}

.bars i {
  grid-column: 1 / -1;
  height: 10px;
  border-radius: 999px;
  background:
    linear-gradient(90deg, var(--accent) var(--value), #e7edf0 var(--value));
}

.insight-panel {
  padding: 24px;
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.insight-panel h2 {
  margin: 0 0 12px;
}

.insight-panel p:last-child {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.timeline button {
  all: unset;
  display: grid;
  grid-column: 2;
  cursor: pointer;
}

.timeline button:hover strong,
.timeline button.active strong {
  color: var(--accent);
}

.detail-dialog {
  width: min(720px, calc(100vw - 32px));
  border: 0;
  border-radius: 8px;
  padding: 28px;
  color: var(--ink);
  box-shadow: 0 28px 80px rgba(12, 20, 24, 0.32);
}

.detail-dialog::backdrop {
  background: rgba(10, 20, 24, 0.48);
}

.detail-dialog h2 {
  margin: 0 0 12px;
  font-size: 28px;
  line-height: 1.2;
}

.detail-dialog p {
  color: var(--muted);
  line-height: 1.7;
}

.dialog-grid {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.dialog-grid div {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 12px;
  padding: 12px;
  border-radius: 6px;
  background: #f4f7f8;
}

.close-button {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: #eef3f5;
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
}

.deploy {
  min-height: 260px;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.deploy h2 {
  margin: 0 0 14px;
  font-size: 34px;
}

.deploy p {
  max-width: 820px;
  margin: 0;
  color: #e7eff1;
  line-height: 1.7;
}

code {
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.16);
}

@media (max-width: 1080px) {
  .sidebar {
    position: static;
    width: auto;
  }

  nav {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  main {
    margin-left: 0;
  }

  .hero,
  .deploy,
  .split {
    grid-template-columns: 1fr;
  }

  .metrics,
  .paper-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .sidebar,
  main {
    padding: 18px;
  }

  nav,
  .metrics,
  .paper-grid {
    grid-template-columns: 1fr;
  }

  .hero,
  .deploy {
    padding: 24px;
  }

  .hero h1 {
    font-size: 36px;
  }

  .query-panel {
    padding: 18px;
  }
}
