.polar-warmup {
  min-height: 100%;
  overflow: auto;
  max-width: 100%;
  padding: 24px;
  color: var(--color-text-primary);
}

.polar-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 0 18px;
  border-bottom: 1px solid color-mix(in srgb, var(--midground-base) 18%, transparent);
}

.polar-hero h1 {
  margin: 0;
  max-width: 760px;
  font-size: 1.75rem;
  line-height: 1.16;
  letter-spacing: 0;
}

.polar-hero p {
  margin: 8px 0 0;
  max-width: 720px;
  overflow-wrap: anywhere;
  color: var(--color-text-secondary);
}

.polar-eyebrow {
  margin: 0 0 6px;
  color: color-mix(in srgb, #ffbd38 86%, var(--midground-base));
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.polar-selector {
  display: grid;
  gap: 7px;
  min-width: 210px;
  color: var(--color-text-secondary);
  font-size: 0.82rem;
}

.polar-selector select {
  min-height: 40px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: color-mix(in srgb, var(--midground-base) 8%, var(--background-base));
  color: var(--color-text-primary);
  padding: 0 12px;
}

.polar-admin-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.92fr) minmax(360px, 1.35fr);
  gap: 14px;
  margin: 18px 0;
}

.polar-manager {
  display: grid;
  gap: 12px;
  align-content: start;
}

.polar-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  min-width: 0;
}

.polar-field {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: var(--color-text-secondary);
  font-size: 0.78rem;
  font-weight: 650;
}

.polar-field input,
.polar-field select,
.polar-field textarea {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: color-mix(in srgb, var(--midground-base) 8%, var(--background-base));
  color: var(--color-text-primary);
  padding: 8px 10px;
  font: inherit;
  font-weight: 500;
}

.polar-field textarea {
  resize: vertical;
}

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

.polar-actions button,
.polar-record-row button,
.polar-error button,
.polar-notice button {
  min-height: 34px;
  border: 1px solid color-mix(in srgb, #ffbd38 44%, var(--color-border));
  border-radius: 8px;
  background: color-mix(in srgb, #ffbd38 24%, var(--background-base));
  color: var(--color-text-primary);
  padding: 0 12px;
  font-weight: 700;
  line-height: 1.25;
  cursor: pointer;
}

.polar-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.polar-actions .polar-secondary,
.polar-record-row .polar-secondary {
  border-color: var(--color-border);
  background: color-mix(in srgb, var(--midground-base) 9%, var(--background-base));
}

.polar-actions .polar-danger,
.polar-record-row .polar-danger {
  border-color: color-mix(in srgb, #fb7185 42%, transparent);
  background: color-mix(in srgb, #fb7185 13%, var(--background-base));
}

.polar-record-list {
  display: grid;
  gap: 8px;
}

.polar-record-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid color-mix(in srgb, var(--midground-base) 12%, transparent);
  border-radius: 8px;
  padding: 10px;
}

.polar-record-row > div {
  display: flex;
  gap: 6px;
}

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

.polar-kpi,
.polar-panel {
  min-width: 0;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: color-mix(in srgb, var(--midground-base) 5%, var(--background-base));
}

.polar-kpi {
  padding: 14px;
}

.polar-kpi span,
.polar-profile-grid dt,
.polar-exam-targets dt {
  display: block;
  color: var(--color-text-secondary);
  font-size: 0.78rem;
}

.polar-kpi strong {
  display: block;
  margin-top: 8px;
  font-size: 1.18rem;
}

.polar-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 390px);
  gap: 14px;
}

.polar-main {
  display: grid;
  gap: 14px;
}

.polar-panel {
  padding: 16px;
}

.polar-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.polar-panel h2,
.polar-panel h3 {
  margin: 0;
  letter-spacing: 0;
}

.polar-panel h2 {
  font-size: 1.05rem;
}

.polar-panel h3 {
  color: var(--color-text-secondary);
  font-size: 0.86rem;
  font-weight: 650;
}

.polar-chart-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.polar-bars {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.polar-bar-row {
  display: grid;
  grid-template-columns: 48px 1fr 52px;
  align-items: center;
  gap: 10px;
  font-size: 0.82rem;
}

.polar-bar-track {
  height: 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--midground-base) 10%, transparent);
  overflow: hidden;
}

.polar-bar-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: color-mix(in srgb, #ffbd38 78%, var(--midground-base));
}

.polar-scatter {
  position: relative;
  height: 178px;
  margin-top: 16px;
  border: 1px solid color-mix(in srgb, var(--midground-base) 14%, transparent);
  border-radius: 8px;
  background:
    linear-gradient(color-mix(in srgb, var(--midground-base) 9%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--midground-base) 9%, transparent) 1px, transparent 1px);
  background-size: 25% 25%;
}

.polar-scatter span {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: color-mix(in srgb, #4ade80 76%, var(--midground-base));
  transform: translate(-50%, 50%);
  box-shadow: 0 0 0 3px color-mix(in srgb, #4ade80 20%, transparent);
}

.polar-axis {
  position: absolute;
  color: var(--color-text-tertiary);
  font-size: 0.7rem;
  font-style: normal;
}

.polar-axis-x {
  right: 10px;
  bottom: 8px;
}

.polar-axis-y {
  left: 10px;
  top: 8px;
}

.polar-profile-grid,
.polar-exam-targets {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 0;
}

.polar-profile-grid dd,
.polar-exam-targets dd {
  margin: 5px 0 0;
  font-weight: 700;
}

.polar-notes {
  margin: 16px 0 0;
  padding-left: 18px;
  color: var(--color-text-secondary);
}

.polar-pill {
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
}

.polar-pill-high {
  background: color-mix(in srgb, #4ade80 18%, transparent);
  color: #86efac;
}

.polar-pill-medium {
  background: color-mix(in srgb, #ffbd38 18%, transparent);
  color: #f8d07a;
}

.polar-pill-low {
  background: color-mix(in srgb, #fb7185 18%, transparent);
  color: #fda4af;
}

.polar-exam ol {
  margin: 16px 0 0;
  padding-left: 20px;
}

.polar-exam li + li {
  margin-top: 8px;
}

.polar-routines {
  display: grid;
  gap: 8px;
  margin-top: 16px;
  color: var(--color-text-secondary);
}

.polar-routines p {
  margin: 0;
}

.polar-error,
.polar-notice,
.polar-loading,
.polar-empty,
.polar-disclaimer {
  margin: 14px 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  color: var(--color-text-secondary);
}

.polar-error {
  border: 1px solid color-mix(in srgb, #fb7185 42%, transparent);
  border-radius: 8px;
  padding: 12px 14px;
  color: #fda4af;
}

.polar-error,
.polar-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.polar-notice {
  border: 1px solid color-mix(in srgb, #4ade80 34%, transparent);
  border-radius: 8px;
  padding: 12px 14px;
  color: #86efac;
}

@media (max-width: 980px) {
  .polar-warmup {
    width: min(100vw, 390px);
    max-width: min(100vw, 390px);
    padding: 16px;
    overflow-x: hidden;
  }

  .polar-admin-grid,
  .polar-layout,
  .polar-main,
  .polar-panel,
  .polar-kpis {
    width: 100%;
    max-width: calc(min(100vw, 390px) - 32px);
  }

  .polar-hero,
  .polar-layout,
  .polar-chart-grid,
  .polar-admin-grid {
    grid-template-columns: 1fr;
  }

  .polar-hero {
    display: grid;
    align-items: start;
  }

  .polar-hero p {
    overflow-wrap: anywhere;
  }

  .polar-kpis {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 620px) {
  .polar-kpis,
  .polar-profile-grid,
  .polar-exam-targets,
  .polar-form-grid {
    grid-template-columns: 1fr;
  }

  .polar-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .polar-actions button,
  .polar-record-row button,
  .polar-error button,
  .polar-notice button {
    width: 100%;
    min-height: 38px;
    white-space: normal;
    padding: 8px 10px;
  }

  .polar-record-row {
    align-items: stretch;
    flex-direction: column;
  }

  .polar-record-row > div {
    display: grid;
    grid-template-columns: 1fr;
  }

  .polar-hero h1 {
    font-size: 1.35rem;
  }
}
