:root {
  --paper: #f2efdf;
  --ink: #151515;
  --muted: #69675e;
  --line: rgba(21, 21, 21, 0.16);
  --signal: #ff5b36;
  --acid: #d5ff3f;
  --white: #fffdf4;
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: var(--paper);
  font-family: "Courier New", Courier, monospace;
}

.paper-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.35;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(to bottom, black, transparent 65%);
}

.masthead,
main,
footer {
  position: relative;
  z-index: 1;
  width: min(1400px, calc(100% - 40px));
  margin-inline: auto;
}

.masthead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 0 18px;
  border-bottom: 1px solid var(--ink);
}

.wordmark {
  display: flex;
  gap: 12px;
  align-items: center;
  color: inherit;
  text-decoration: none;
}

.wordmark span {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  color: var(--paper);
  background: var(--ink);
  font-weight: 800;
}

.wordmark strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 16px;
  line-height: 0.95;
}

.status {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #2ca469;
  box-shadow: 0 0 0 4px rgba(44, 164, 105, 0.14);
}

.hero {
  display: grid;
  grid-template-columns: 1.65fr 0.75fr;
  gap: 7vw;
  align-items: end;
  padding: clamp(64px, 9vw, 132px) 0 52px;
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  max-width: 940px;
  margin-bottom: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(58px, 8vw, 126px);
  font-weight: 400;
  line-height: 0.84;
  letter-spacing: -0.055em;
}

h1 em {
  color: var(--signal);
  font-weight: 400;
}

.hero-copy p {
  color: #42413b;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 20px;
  line-height: 1.5;
}

button {
  cursor: pointer;
  font: inherit;
}

#refresh-button {
  display: flex;
  justify-content: space-between;
  width: 100%;
  padding: 17px 18px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  color: var(--paper);
  background: var(--ink);
  transition: transform 160ms ease, background 160ms ease;
}

#refresh-button:hover {
  transform: translateY(-2px);
  color: var(--ink);
  background: var(--acid);
}

#refresh-button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--white);
}

.metric {
  min-height: 188px;
  padding: 24px;
  border-right: 1px solid var(--ink);
}

.metric:last-child {
  border-right: 0;
}

.metric span,
.metric small {
  display: block;
}

.metric span {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.metric strong {
  display: block;
  margin: 28px 0 18px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(40px, 5vw, 72px);
  font-weight: 400;
  letter-spacing: -0.06em;
}

.metric small {
  color: var(--muted);
}

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.badge-ok {
  color: #1d7a4d;
  background: rgba(44, 164, 105, 0.16);
}

.badge-bad {
  color: var(--signal);
  background: rgba(255, 91, 54, 0.14);
}

.metric-ink {
  color: var(--paper);
  background: var(--ink);
}

.metric-ink small {
  color: #bab8ad;
}

.metric-signal {
  background: var(--acid);
}

.workspace {
  display: grid;
  grid-template-columns: 1.5fr 0.7fr;
  gap: 20px;
  margin-top: 20px;
}

.chart-card,
.pipeline-card,
.team-section {
  padding: 28px;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  background: var(--white);
}

.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
}

.section-heading h2 {
  margin-bottom: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(30px, 3vw, 48px);
  font-weight: 400;
  letter-spacing: -0.04em;
}

.section-heading > span,
.section-heading > a {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.section-heading a {
  color: inherit;
}

.month-chart {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 14px;
  align-items: end;
  min-height: 330px;
  padding-top: 36px;
}

.month {
  display: flex;
  flex-direction: column;
  justify-content: end;
  min-height: 260px;
  padding: 18px 12px;
  border: 1px solid var(--ink);
  border-radius: 16px 16px 0 0;
  background:
    linear-gradient(to top, var(--signal) var(--height), transparent var(--height));
}

.month strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(20px, 2vw, 34px);
  font-weight: 400;
}

.month small {
  margin-top: 8px;
}

.run-status {
  padding: 7px 10px;
  border-radius: 999px;
  color: var(--ink) !important;
  background: var(--acid);
}

.pipeline-card {
  color: var(--paper);
  background: var(--ink);
}

.pipeline-card .eyebrow,
.pipeline-card .section-heading > span {
  color: #aaa89e;
}

#pipeline-steps {
  display: grid;
  gap: 0;
  padding: 36px 0 24px;
  list-style: none;
}

#pipeline-steps li {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 14px;
  padding: 17px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.13);
}

#pipeline-steps li > span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: var(--ink);
  background: var(--acid);
  font-size: 11px;
}

#pipeline-steps strong,
#pipeline-steps small {
  display: block;
}

#pipeline-steps small {
  margin-top: 5px;
  color: #aaa89e;
}

#pipeline-steps li.done > span {
  color: white;
  background: #2ca469;
}

.run-meta {
  margin: 0 0 8px;
  color: #aaa89e;
  font-size: 11px;
  letter-spacing: 0.04em;
}

.connector-strip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding-top: 18px;
  color: #aaa89e;
  font-size: 11px;
}

.connector-strip b {
  color: var(--signal);
}

.team-section {
  margin: 20px 0 90px;
}

.team-table {
  margin-top: 32px;
  border-top: 1px solid var(--ink);
}

.team-row {
  display: grid;
  grid-template-columns: 1.2fr repeat(5, 1fr);
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.team-row.header {
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.09em;
}

.team-row strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 20px;
  font-weight: 400;
}

footer {
  display: flex;
  justify-content: space-between;
  padding: 25px 0 38px;
  border-top: 1px solid var(--ink);
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

@media (max-width: 900px) {
  .hero,
  .workspace {
    grid-template-columns: 1fr;
  }

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

  .metric:nth-child(2) {
    border-right: 0;
  }

  .metric:nth-child(-n + 2) {
    border-bottom: 1px solid var(--ink);
  }
}

@media (max-width: 600px) {
  .masthead,
  main,
  footer {
    width: min(100% - 24px, 1400px);
  }

  .status {
    display: none;
  }

  h1 {
    font-size: 54px;
  }

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

  .month-chart {
    grid-template-columns: repeat(2, 1fr);
  }

  .metric {
    border-right: 0;
    border-bottom: 1px solid var(--ink);
  }

  .metric:last-child {
    border-bottom: 0;
  }

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

  .team-row > :nth-child(4),
  .team-row > :nth-child(5),
  .team-row > :nth-child(6) {
    display: none;
  }

  footer {
    gap: 18px;
    flex-direction: column;
  }
}
