#root {
  min-height: 100vh;
}

.site-shell {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid #d8e0ea;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
}

.header-inner {
  display: flex;
  width: min(1120px, calc(100% - 40px));
  min-height: 80px;
  margin: 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-title {
  margin: 2px 0 0;
  font-size: 1.35rem;
  font-weight: 800;
}

.eyebrow {
  margin: 0;
  color: #1d4ed8;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.nav-list {
  display: flex;
  margin: 0;
  padding: 0;
  gap: 8px;
  list-style: none;
}

.nav-link {
  display: inline-flex;
  min-height: 44px;
  padding: 10px 14px;
  align-items: center;
  border-radius: 8px;
  color: #344054;
  font-weight: 700;
  text-decoration: none;
}

.nav-link:hover {
  background: #edf3ff;
  color: #1d4ed8;
}

.nav-link-active {
  background: #dbe7ff;
  color: #163f9c;
}

.page-container {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 48px 0 64px;
  flex: 1;
}

.site-footer {
  padding: 24px 20px;
  border-top: 1px solid #d8e0ea;
  color: #667085;
  text-align: center;
}

.hero,
.page-heading {
  margin-bottom: 28px;
}

.hero {
  padding: 48px;
  border: 1px solid #cbd9ef;
  border-radius: 18px;
  background:
    linear-gradient(
      135deg,
      rgba(219, 231, 255, 0.95),
      rgba(255, 255, 255, 0.98)
    );
}

.hero h1,
.page-heading h1,
.detail-card h1,
.centered-content h1 {
  margin: 8px 0 14px;
  line-height: 1.15;
}

.hero h1 {
  max-width: 720px;
  font-size: clamp(2.3rem, 6vw, 4.5rem);
}

.hero-text,
.page-heading p {
  max-width: 760px;
  color: #475467;
  font-size: 1.08rem;
  line-height: 1.7;
}

.content-card,
.progress-card,
.filter-card,
.detail-card,
.learning-card {
  border: 1px solid #d8e0ea;
  background: #ffffff;
  box-shadow: 0 12px 32px rgba(28, 45, 75, 0.07);
}

.content-card,
.progress-card,
.filter-card,
.detail-card {
  margin-bottom: 24px;
  padding: 28px;
  border-radius: 14px;
}

.content-card h2,
.progress-card h2 {
  margin-top: 0;
}

.concept-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  padding-left: 20px;
  gap: 12px 24px;
}

.progress-heading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.progress-heading-row h2 {
  margin-bottom: 0;
}

.progress-card p {
  color: #475467;
}

.progress-track {
  height: 14px;
  overflow: hidden;
  border-radius: 999px;
  background: #e4eaf2;
}

.progress-value {
  height: 100%;
  border-radius: inherit;
  background: #1d4ed8;
  transition: width 250ms ease;
}

.filter-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 20px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-field label {
  font-weight: 800;
}

.form-field input,
.form-field select {
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid #aeb9c7;
  border-radius: 8px;
  background: #ffffff;
  color: #172033;
}

.form-field input:hover,
.form-field select:hover {
  border-color: #60748f;
}

.result-count {
  margin: 28px 0 18px;
  color: #475467;
  font-weight: 700;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.learning-card {
  display: flex;
  min-height: 275px;
  padding: 24px;
  flex-direction: column;
  border-radius: 14px;
}

.learning-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 38px rgba(28, 45, 75, 0.12);
}

.learning-card-learned {
  border-color: #86c39b;
  background: #f4fbf6;
}

.learning-card h2 {
  margin: 18px 0 12px;
  font-size: 1.25rem;
  line-height: 1.4;
}

.learning-card .button {
  margin-top: auto;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.badge {
  display: inline-flex;
  min-height: 28px;
  padding: 5px 9px;
  align-items: center;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: capitalize;
}

.badge-category {
  background: #dbe7ff;
  color: #163f9c;
}

.difficulty-leicht {
  background: #e2f6e8;
  color: #22663a;
}

.difficulty-mittel {
  background: #fff2cc;
  color: #795900;
}

.difficulty-schwer {
  background: #fce2e2;
  color: #8c2525;
}

.learning-status {
  color: #667085;
  font-weight: 700;
}

.learning-status.learned {
  color: #267342;
}

.button,
.text-link {
  font-weight: 800;
}

.button {
  display: inline-flex;
  min-height: 44px;
  padding: 10px 16px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  transition:
    background 150ms ease,
    border-color 150ms ease,
    transform 150ms ease;
}

.button:hover:not(:disabled) {
  transform: translateY(-1px);
}

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

.button-primary {
  border-color: #183f9c;
  background: #1d4ed8;
  color: #ffffff;
}

.button-primary:hover {
  background: #173fae;
}

.button-secondary {
  border-color: #8da0b8;
  background: #ffffff;
  color: #253858;
}

.button-secondary:hover:not(:disabled) {
  background: #edf3ff;
  border-color: #1d4ed8;
}

.button-danger {
  border-color: #a52b2b;
  background: #fff6f6;
  color: #902525;
}

.button-danger:hover {
  background: #fce3e3;
}

.text-link {
  color: #1d4ed8;
}

.empty-message {
  padding: 24px;
  border: 1px dashed #9eacc0;
  border-radius: 12px;
  background: #ffffff;
  color: #475467;
}

.detail-card {
  max-width: 850px;
  margin-right: auto;
  margin-left: auto;
  padding: 36px;
}

.detail-card-learned {
  border-color: #86c39b;
}

.detail-top-row {
  display: flex;
  margin-bottom: 28px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: #667085;
}

.answer-area {
  margin: 28px 0;
  padding: 24px;
  border-radius: 12px;
  background: #f3f6fa;
}

.answer-area > p {
  color: #475467;
}

.answer-box {
  margin-bottom: 20px;
  padding: 20px;
  border-left: 5px solid #1d4ed8;
  border-radius: 8px;
  background: #ffffff;
}

.answer-box h2 {
  margin-top: 0;
}

.learning-actions {
  margin-bottom: 28px;
}

.card-navigation,
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.card-navigation {
  justify-content: space-between;
  border-top: 1px solid #d8e0ea;
  padding-top: 24px;
}

.definition-list {
  margin: 0;
}

.definition-list div {
  padding: 18px 0;
  border-bottom: 1px solid #e2e7ee;
}

.definition-list div:last-child {
  border-bottom: 0;
}

.definition-list dt {
  margin-bottom: 6px;
  font-weight: 800;
}

.definition-list dd {
  margin: 0;
  color: #475467;
  line-height: 1.65;
}

.centered-content {
  max-width: 720px;
  margin-right: auto;
  margin-left: auto;
  text-align: center;
}

.centered-content .button-row {
  justify-content: center;
}

.error-code {
  margin: 0;
  color: #1d4ed8;
  font-size: 2rem;
  font-weight: 900;
}

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

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

@media (max-width: 700px) {
  .header-inner {
    width: min(100% - 28px, 1120px);
    padding: 16px 0;
    align-items: flex-start;
    flex-direction: column;
  }

  .nav-list {
    width: 100%;
    flex-wrap: wrap;
  }

  .page-container {
    width: min(100% - 28px, 1120px);
    padding: 32px 0 48px;
  }

  .hero {
    padding: 30px 24px;
  }

  .filter-card,
  .card-grid,
  .concept-list {
    grid-template-columns: 1fr;
  }

  .detail-card {
    padding: 24px;
  }

  .detail-top-row,
  .card-navigation {
    align-items: stretch;
    flex-direction: column;
  }

  .card-navigation .button {
    width: 100%;
  }
}
