:root {
  color-scheme: light;
  --bg: #f7f8fb;
  --surface: #ffffff;
  --surface-2: #eef3f7;
  --ink: #172033;
  --muted: #637083;
  --line: #dbe3ec;
  --accent: #1f7663;
  --accent-2: #2458a6;
  --warn: #a45b13;
  --shadow: 0 18px 50px rgba(23, 32, 51, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background: var(--bg);
  color: var(--ink);
  letter-spacing: 0;
}

body {
  margin: 0;
  min-height: 100vh;
}

a {
  color: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 72px;
  padding: 0 28px;
  background: rgba(247, 248, 251, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid #b9cad8;
  border-radius: 8px;
  background: #eaf4ef;
  color: var(--accent);
  font-weight: 820;
}

.brand strong,
.brand small {
  display: block;
  line-height: 1.15;
}

.brand small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

nav a {
  min-height: 36px;
  padding: 9px 11px;
  border-radius: 7px;
  color: #334155;
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
}

nav a:hover,
nav a:focus,
nav a[aria-current="page"] {
  background: #e7eef5;
  color: #102033;
}

main {
  max-width: 1380px;
  margin: 0 auto;
  padding: 28px 24px 56px;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(320px, 0.84fr) minmax(420px, 1.16fr);
  align-items: stretch;
  gap: 18px;
  min-height: calc(100vh - 128px);
}

.workspace-copy,
.graph-shell,
.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.workspace-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(28px, 5vw, 60px);
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 780;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  max-width: 720px;
  font-size: clamp(40px, 5vw, 72px);
  line-height: 0.98;
}

h2 {
  font-size: 22px;
  line-height: 1.2;
}

.intro {
  max-width: 620px;
  margin: 22px 0 0;
  color: #435166;
  font-size: 18px;
  line-height: 1.65;
}

.command-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 7px;
  font-weight: 760;
  text-decoration: none;
}

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

.button.primary:hover,
.button.primary:focus {
  background: #155b4c;
}

.button.secondary {
  border: 1px solid #bac7d6;
  background: #fff;
  color: #26354a;
}

.graph-shell {
  position: relative;
  overflow: hidden;
  min-height: 520px;
  background:
    linear-gradient(90deg, rgba(219, 227, 236, 0.48) 1px, transparent 1px),
    linear-gradient(0deg, rgba(219, 227, 236, 0.48) 1px, transparent 1px),
    #fbfcfe;
  background-size: 42px 42px;
}

#opportunityGraph {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 520px;
}

.graph-metrics {
  position: absolute;
  right: 16px;
  bottom: 16px;
  display: grid;
  grid-template-columns: repeat(2, minmax(138px, 1fr));
  gap: 8px;
  max-width: 330px;
}

.graph-metrics div {
  min-height: 64px;
  padding: 11px 12px;
  border: 1px solid rgba(186, 199, 214, 0.82);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.9);
}

.graph-metrics span,
.graph-metrics strong {
  display: block;
}

.graph-metrics span {
  color: var(--muted);
  font-size: 12px;
}

.graph-metrics strong {
  margin-top: 7px;
  font-size: 24px;
}

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

.panel {
  padding: 22px;
}

.panel p {
  margin: 12px 0 0;
  color: #46566d;
  line-height: 1.7;
}

.wide {
  margin-top: 14px;
}

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

.section-head p {
  margin: 0;
  color: var(--muted);
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

table {
  width: 100%;
  min-width: 780px;
  border-collapse: collapse;
  font-size: 14px;
}

th,
td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  background: var(--surface-2);
  color: #334155;
  font-size: 12px;
  text-transform: uppercase;
}

tr:last-child td {
  border-bottom: 0;
}

pre {
  overflow: auto;
  margin: 14px 0 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #101827;
  color: #eef7ff;
  line-height: 1.6;
}

footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 28px 20px 40px;
  color: var(--muted);
  font-size: 14px;
}

footer a {
  text-decoration: none;
}

footer a:hover,
footer a:focus {
  color: var(--ink);
}

@media (max-width: 980px) {
  .topbar {
    position: static;
    align-items: flex-start;
    flex-direction: column;
    padding: 18px;
  }

  nav {
    justify-content: flex-start;
  }

  main {
    padding: 16px 12px 44px;
  }

  .workspace {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .workspace-copy {
    padding: 30px 22px;
  }

  h1 {
    font-size: 40px;
  }

  .intro {
    font-size: 16px;
  }

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

  .graph-metrics {
    position: static;
    grid-template-columns: 1fr;
    max-width: none;
    padding: 0 14px 14px;
  }
}
