:root {
  --bg: #f4f1ea;
  --panel: #ffffff;
  --line: #d8d1c5;
  --text: #1f2328;
  --muted: #66707b;
  --accent: #14324d;
  --good: #1f6b45;
  --warn: #7a4d12;
  --bad: #a33a2b;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  background:
    radial-gradient(circle at top right, rgba(20, 50, 77, 0.06), transparent 26%),
    linear-gradient(180deg, #f8f5ef 0%, #f2ede4 100%);
  color: var(--text);
}

.shell {
  max-width: 1080px;
  margin: 0 auto;
  padding: 40px 24px 64px;
}

.hero {
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  color: var(--muted);
}

h1, h2 {
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2.2rem, 5vw, 4rem);
  color: var(--accent);
}

.lead {
  max-width: 48rem;
  margin: 12px 0 0;
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--muted);
}

.status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  margin-bottom: 20px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--line);
  border-radius: 16px;
}

.status-bar h2 {
  margin-top: 4px;
  font-size: 1.15rem;
  color: var(--text);
}

.status-bar .pill {
  margin-left: auto;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.88rem;
}

.meta-row span {
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
}

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

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px;
  box-shadow: 0 10px 24px rgba(31, 35, 40, 0.05);
}

.stats,
.list {
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
}

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

.stats li {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fcfbf8;
}

.stats span {
  display: block;
  margin-bottom: 8px;
  font-size: 0.84rem;
  color: var(--muted);
}

.stats strong {
  font-size: 1.05rem;
}

.stats small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
}

.list li + li {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.service-list,
.integration-list,
.backup-list,
.incident-list {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
}

.service-list li,
.integration-list li,
.backup-list li,
.incident-list li {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.service-list li:first-child,
.integration-list li:first-child,
.backup-list li:first-child,
.incident-list li:first-child {
  border-top: 0;
  padding-top: 0;
}

.service-name,
.backup-name,
.incident-name {
  font-weight: 700;
}

.service-copy {
  min-width: 0;
}

.service-meta,
.backup-meta,
.incident-meta {
  color: var(--muted);
  font-size: 0.88rem;
  margin-top: 4px;
}

.service-note {
  margin-top: 8px;
  padding: 8px 10px;
  border-left: 3px solid var(--accent);
  background: #f7f4ee;
  color: var(--text);
  font-size: 0.88rem;
}

.service-note strong {
  color: var(--accent);
}

.service-steps {
  margin: 8px 0 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.45;
}

.service-steps li + li {
  margin-top: 4px;
}

.service-action {
  margin-top: 10px;
}

.service-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 13px;
  border: 1px solid var(--accent);
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 700;
}

.service-button:hover {
  opacity: 0.92;
}

.service-button-secondary {
  background: #f7f4ee;
  color: var(--accent);
}

.service-link {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.service-link:hover {
  opacity: 0.85;
}

.service-link-inline {
  margin-left: 10px;
}

.service-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.service-facts span {
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fcfbf8;
  color: var(--muted);
  font-size: 0.78rem;
}

.help-dialog {
  max-width: 620px;
  width: calc(100% - 32px);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 0;
  background: var(--panel);
  color: var(--text);
  box-shadow: 0 18px 40px rgba(31, 35, 40, 0.16);
}

.help-dialog::backdrop {
  background: rgba(31, 35, 40, 0.38);
}

.help-dialog-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px 12px;
  border-bottom: 1px solid var(--line);
}

.help-dialog-body,
.help-page {
  padding: 20px 22px 22px;
}

.help-close {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #faf8f3;
  color: var(--accent);
  padding: 8px 12px;
  font: inherit;
}

.help-steps {
  margin: 14px 0 0;
  padding-left: 18px;
  color: var(--text);
  line-height: 1.55;
}

.help-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
  align-items: center;
}

.help-upload {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fcfbf8;
}

.help-upload h3 {
  margin: 0 0 6px;
  font-size: 1rem;
}

.upload-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 12px;
}

.upload-form input[type="file"] {
  max-width: 100%;
  font: inherit;
}

.monday-backup-summary {
  display: grid;
  gap: 6px;
  margin-top: 14px;
}

.monday-feed-head {
  display: grid;
  gap: 6px;
  margin-top: 14px;
}

.table-wrap {
  margin-top: 14px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.report-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 520px;
  background: #fff;
}

.report-table th,
.report-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  font-size: 0.88rem;
}

.report-table th {
  background: #faf8f3;
  color: var(--accent);
  font-weight: 700;
}

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

.service-list .pill,
.backup-list .pill,
.incident-list .pill {
  margin-left: auto;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 0.82rem;
  white-space: nowrap;
  border: 1px solid var(--line);
}

.pill::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: currentColor;
}

.pill.good {
  color: var(--good);
  background: rgba(31, 107, 69, 0.08);
}

.pill.warn {
  color: var(--warn);
  background: rgba(122, 77, 18, 0.08);
}

.pill.bad {
  color: var(--bad);
  background: rgba(163, 58, 43, 0.08);
}

.pill.healthy {
  color: var(--good);
  background: rgba(31, 107, 69, 0.08);
}

.pill.degraded {
  color: var(--warn);
  background: rgba(122, 77, 18, 0.08);
}

.pill.down {
  color: var(--bad);
  background: rgba(163, 58, 43, 0.08);
}

.panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 6px;
}

.panel-head p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

@media (max-width: 760px) {
  .grid,
  .stats {
    grid-template-columns: 1fr;
  }

  .status-bar {
    align-items: flex-start;
    flex-direction: column;
  }

  .service-list li,
  .backup-list li,
  .incident-list li {
    flex-direction: column;
    align-items: flex-start;
  }

  .service-copy {
    width: 100%;
  }

  .service-facts {
    width: 100%;
  }

  .service-list .pill,
  .backup-list .pill,
  .incident-list .pill,
  .status-bar .pill {
    margin-left: 0;
  }

  .shell {
    padding: 24px 16px 48px;
  }
}
