* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family:
    Inter,
    system-ui,
    -apple-system,
    sans-serif;
  background: #f6f7f9;
  color: #1f2937;
}

.app {
  width: min(720px, calc(100% - 32px));
  margin: 56px auto;
}

header {
  margin-bottom: 28px;
}

h1 {
  margin-bottom: 6px;
}

header p,
.hint,
#meta {
  color: #6b7280;
}

.card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 24px;
}

label {
  display: block;
  margin: 16px 0;
}

input,
select,
textarea {
  width: 100%;
  margin-top: 6px;
  padding: 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font: inherit;
}

textarea {
  resize: vertical;
}

button {
  border: 0;
  border-radius: 8px;
  padding: 10px 16px;
  font: inherit;
  cursor: pointer;
  background: #111827;
  color: white;
}

button.secondary {
  background: #e5e7eb;
  color: #111827;
}

.toolbar,
.actions,
.stats {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.actions {
  margin-top: 16px;
  justify-content: flex-start;
}

.result {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #e5e7eb;
}

.stats {
  margin-top: 16px;
  justify-content: flex-start;
  flex-wrap: wrap;
  color: #4b5563;
}

.hidden {
  display: none;
}

code {
  background: #f3f4f6;
  padding: 2px 5px;
  border-radius: 4px;
}

#account { margin-bottom: 20px; }
#error { color: #b42318; }
button:disabled { opacity: .5; cursor: default; }
.actions, .toolbar { flex-wrap: wrap; }

.session-grid,
.summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 16px;
}

.session-note {
  min-height: 24px;
  color: #b42318;
}

.summary-grid {
  margin: 20px 0;
  gap: 12px;
}

.summary-grid span {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px;
  background: #f6f7f9;
  border-radius: 8px;
  color: #6b7280;
}

.summary-grid strong {
  color: #111827;
  font-size: 1.1rem;
}

#session-progress {
  white-space: nowrap;
}

@media (max-width: 560px) {
  .session-grid,
  .summary-grid {
    grid-template-columns: 1fr;
  }
}

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

.main-nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.main-nav a,
.button-link {
  display: inline-block;
  padding: 8px 12px;
  border-radius: 8px;
  color: #4b5563;
  text-decoration: none;
}

.main-nav a:hover,
.main-nav a.active {
  background: #e5e7eb;
  color: #111827;
}

.button-link {
  margin-top: 8px;
  background: #e5e7eb;
  color: #111827;
}

.profile-message {
  min-height: 24px;
}

.profile-message.success {
  color: #166534;
}

.profile-message.error {
  color: #b42318;
}

@media (max-width: 560px) {
  .header-row {
    flex-direction: column;
  }
}

.statistics-summary {
  margin-bottom: 20px;
}

.statistics-breakdowns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.statistics-breakdowns h3 {
  margin: 0 0 8px;
  font-size: 1rem;
}

.statistics-list {
  border-top: 1px solid #e5e7eb;
}

.statistics-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 0;
  border-bottom: 1px solid #e5e7eb;
}

@media (max-width: 560px) {
  .statistics-breakdowns {
    grid-template-columns: 1fr;
  }
}
