:root {
  color-scheme: light;
  --ink: #16201f;
  --paper: #f7f7f2;
  --mint: #d6f2e1;
  --spruce: #1b5e51;
  --amber: #f3b23f;
  --coral: #e66d54;
  --steel: #58708a;
  --line: rgba(22, 32, 31, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

.topbar {
  align-items: center;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 20px;
  justify-content: space-between;
  padding: 16px max(16px, calc((100vw - 1180px) / 2));
}

.brand {
  font-size: 18px;
  font-weight: 700;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

nav a {
  border-radius: 6px;
  color: rgba(22, 32, 31, 0.72);
  font-size: 14px;
  font-weight: 650;
  padding: 8px 10px;
}

nav a:hover {
  background: var(--mint);
  color: var(--ink);
}

.shell {
  margin: 0 auto;
  max-width: 1180px;
  padding: 24px 16px;
}

.footer {
  color: rgba(22, 32, 31, 0.6);
  font-size: 14px;
  line-height: 1.55;
  margin: 0 auto;
  max-width: 1180px;
  padding: 24px 16px 40px;
}

.grid {
  display: grid;
  gap: 16px;
}

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

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

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

.card,
.metric,
.table-wrap,
.filters {
  background: white;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.metric,
.card,
.filters {
  padding: 16px;
}

.eyebrow {
  color: rgba(22, 32, 31, 0.52);
  font-size: 12px;
  font-weight: 750;
  text-transform: uppercase;
}

.metric strong {
  display: block;
  font-size: 18px;
  margin-top: 8px;
}

.section-head {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin: 24px 0 12px;
}

h1,
h2 {
  margin: 0;
}

h1 {
  font-size: 24px;
}

h2 {
  font-size: 18px;
}

.muted {
  color: rgba(22, 32, 31, 0.62);
}

.theme-tile {
  border-radius: 6px;
  display: block;
  min-height: 116px;
  padding: 14px;
}

.tile-score {
  float: right;
  font-size: 24px;
  font-weight: 800;
}

.tone-strong {
  background: var(--spruce);
  color: white;
}

.tone-good {
  background: var(--mint);
  color: var(--spruce);
}

.tone-neutral {
  background: rgba(88, 112, 138, 0.15);
  color: var(--steel);
}

.tone-weak {
  background: rgba(243, 178, 63, 0.25);
  color: var(--ink);
}

.tone-bad {
  background: rgba(230, 109, 84, 0.18);
  color: var(--coral);
}

.score {
  border-radius: 6px;
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  justify-content: center;
  min-width: 48px;
  padding: 5px 8px;
}

.table-wrap {
  overflow-x: auto;
}

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

th {
  background: rgba(22, 32, 31, 0.04);
  color: rgba(22, 32, 31, 0.56);
  font-size: 12px;
  padding: 12px;
  text-transform: uppercase;
}

td {
  border-top: 1px solid var(--line);
  padding: 12px;
  vertical-align: top;
}

tr:hover td {
  background: rgba(214, 242, 225, 0.3);
}

.filters {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-bottom: 16px;
}

label {
  color: rgba(22, 32, 31, 0.56);
  font-size: 12px;
  font-weight: 750;
  text-transform: uppercase;
}

input,
select,
button {
  border: 1px solid rgba(22, 32, 31, 0.16);
  border-radius: 6px;
  color: var(--ink);
  display: block;
  font: inherit;
  margin-top: 6px;
  padding: 9px 10px;
  width: 100%;
}

button {
  background: var(--spruce);
  border-color: var(--spruce);
  color: white;
  cursor: pointer;
  font-weight: 750;
}

.link {
  color: var(--spruce);
  font-weight: 750;
}

.empty,
.error {
  background: white;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: rgba(22, 32, 31, 0.62);
  padding: 20px;
}

.error {
  border-color: rgba(230, 109, 84, 0.35);
  color: var(--coral);
}

@media (max-width: 900px) {
  .grid-4,
  .grid-2,
  .heatmap,
  .filters {
    grid-template-columns: 1fr;
  }

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