:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #1c1c1b;
  background: #f4f4f1;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

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

button {
  font: inherit;
  letter-spacing: 0;
}

.app-header,
main {
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
}

.app-header {
  min-height: 96px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid #d8d8d3;
}

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

h1 {
  margin-bottom: 0;
  font-size: 1.7rem;
  line-height: 1.15;
}

h2 {
  margin-bottom: 0;
  font-size: 1.1rem;
  line-height: 1.25;
}

.eyebrow {
  margin-bottom: 5px;
  color: #74746d;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.language-control {
  display: inline-grid;
  grid-template-columns: repeat(2, 44px);
  padding: 3px;
  border: 1px solid #d4d4cf;
  border-radius: 6px;
  background: #ffffff;
}

.language-control button {
  min-height: 34px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #555550;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
}

.language-control button[aria-pressed="true"] {
  background: #20201f;
  color: #ffffff;
}

main {
  padding-block: 28px 80px;
}

.status-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 24px;
}

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

.button {
  min-height: 42px;
  padding: 9px 14px;
  border-radius: 5px;
  font-weight: 750;
  cursor: pointer;
}

.button-primary {
  border: 1px solid #da552c;
  background: #da552c;
  color: #ffffff;
}

.button-secondary {
  border: 1px solid #cecec8;
  background: #ffffff;
  color: #242423;
}

.button:focus-visible,
.language-control button:focus-visible {
  outline: 3px solid rgba(218, 85, 44, 0.28);
  outline-offset: 2px;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-block: 1px solid #d8d8d3;
}

.metric {
  min-width: 0;
  min-height: 108px;
  padding: 22px;
  border-right: 1px solid #d8d8d3;
}

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

.metric span,
.metric strong {
  display: block;
  overflow-wrap: anywhere;
}

.metric span {
  margin-bottom: 8px;
  color: #74746d;
  font-size: 0.76rem;
}

.metric strong {
  font-size: 0.93rem;
  line-height: 1.35;
}

.tracker-loaded {
  color: #217347;
}

.workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
  padding-block: 28px;
}

.panel {
  min-width: 0;
  border: 1px solid #d8d8d3;
  border-radius: 7px;
  background: #ffffff;
}

.panel-heading {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border-bottom: 1px solid #e1e1dd;
}

.badge {
  flex: none;
  padding: 5px 7px;
  border: 1px solid #ddddda;
  border-radius: 4px;
  color: #666660;
  background: #f7f7f4;
  font-size: 0.7rem;
  font-weight: 800;
}

pre,
.event-log {
  height: 300px;
  margin: 0;
  overflow: auto;
  padding: 18px;
  color: #353532;
  font: 0.76rem/1.6 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.event-log {
  list-style-position: inside;
}

.event-log li + li {
  margin-top: 8px;
}

.privacy-note {
  max-width: 780px;
  padding-top: 20px;
  border-top: 1px solid #d8d8d3;
}

.privacy-note p {
  margin: 10px 0 0;
  color: #5e5e59;
  line-height: 1.6;
}

@media (max-width: 820px) {
  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

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

@media (max-width: 560px) {
  .app-header,
  main {
    width: min(100% - 24px, 1180px);
  }

  .app-header {
    min-height: 82px;
  }

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

  .actions,
  .button {
    width: 100%;
  }

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

  .metric,
  .metric:nth-child(2) {
    min-height: 88px;
    border-right: 0;
    border-bottom: 1px solid #d8d8d3;
  }

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