:root {
  background: #f5f5f7;
  color: #1d1d1f;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #f5f5f7;
}

button,
input,
select,
textarea {
  font: inherit;
}

.shell {
  margin: 0 auto;
  max-width: 960px;
  padding: 64px 32px;
}

.topbar {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
}

.language-switch {
  background: #e8e8ed;
  border-radius: 8px;
  display: inline-flex;
  gap: 2px;
  padding: 2px;
}

.language-switch button {
  background: transparent;
  color: #424245;
  min-height: 32px;
  padding: 0 10px;
}

.language-switch button[aria-pressed="true"] {
  background: #ffffff;
  color: #1d1d1f;
}

.eyebrow {
  color: #6e6e73;
  margin: 0;
}

h1 {
  font-size: 44px;
  letter-spacing: 0;
  margin: 12px 0;
}

.lede {
  color: #424245;
  font-size: 18px;
  line-height: 1.5;
  margin: 0 0 32px;
}

.panel {
  display: grid;
  gap: 18px;
  max-width: 640px;
}

label {
  color: #424245;
  display: grid;
  gap: 8px;
}

select,
input,
textarea {
  background: #ffffff;
  border: 1px solid #d2d2d7;
  border-radius: 8px;
  color: #1d1d1f;
  padding: 0 12px;
}

select,
input {
  min-height: 44px;
}

textarea {
  line-height: 1.5;
  min-height: 112px;
  padding: 12px;
  resize: vertical;
}

button {
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  min-height: 44px;
  padding: 0 16px;
}

button:disabled {
  cursor: default;
  opacity: 0.6;
}

.primary {
  background: #0071e3;
  color: #ffffff;
  justify-self: start;
}

.secondary {
  background: #e8e8ed;
  color: #1d1d1f;
  justify-self: start;
}

.permission-row,
.task-row,
.phrase-row,
.summary,
.baseline,
.focus-grid,
.active-task {
  border-top: 1px solid #d2d2d7;
}

.permission-row,
.task-row,
.phrase-row {
  align-items: center;
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr auto;
  padding: 18px 0;
}

.permission-row span,
.task-row span,
.phrase-row span,
.summary span,
.baseline span {
  color: #6e6e73;
  display: block;
  margin-top: 4px;
}

.section-heading {
  align-items: baseline;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-top: 28px;
}

.section-heading span,
.empty-state {
  color: #6e6e73;
}

.phrase-row p {
  color: #424245;
  line-height: 1.45;
  margin: 6px 0 0;
}

.result-panel {
  border-top: 1px solid #d2d2d7;
  margin-bottom: 24px;
  padding: 18px 0;
}

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

.result-grid span {
  color: #6e6e73;
  display: block;
  margin-bottom: 6px;
}

.trend-bars {
  align-items: end;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  margin-top: 18px;
  max-width: 420px;
}

.trend-day {
  align-items: center;
  display: grid;
  gap: 6px;
  justify-items: center;
}

.trend-day span {
  background: #0071e3;
  border-radius: 999px;
  display: block;
  min-height: 8px;
  width: 10px;
}

.trend-day small {
  color: #6e6e73;
}

.summary,
.baseline,
.focus-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  margin-bottom: 24px;
  padding: 18px 0;
}

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

.focus-grid span,
.active-task span {
  color: #6e6e73;
  display: block;
  margin-bottom: 4px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.active-task {
  margin-top: 28px;
  max-width: 640px;
  padding-top: 18px;
}

.active-task p {
  color: #424245;
  line-height: 1.5;
  margin: 8px 0 16px;
}

.recall-box {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

.diagnosis-list {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.diagnosis-item {
  border-top: 1px solid #d2d2d7;
  padding-top: 14px;
}

.diagnosis-item strong {
  display: block;
  line-height: 1.4;
}

.score-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.score-grid div {
  border: 1px solid #d2d2d7;
  border-radius: 8px;
  padding: 12px;
}

.score-grid span {
  color: #6e6e73;
  display: block;
  font-size: 13px;
  margin-bottom: 6px;
}

.score-grid strong {
  font-size: 24px;
}

@media (max-width: 720px) {
  .shell {
    padding: 40px 20px;
  }

  .permission-row,
  .task-row,
  .phrase-row,
  .summary,
  .baseline {
    grid-template-columns: 1fr;
  }

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

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