:root {
  --bp-bg0: #f4f8fb;
  --bp-bg1: #eef4f8;
  --bp-bg-wave: rgba(49, 128, 182, 0.14);
  --bp-card: #ffffff;
  --bp-card-soft: #f8fcff;
  --bp-ink: #0f2433;
  --bp-muted: #385061;
  --bp-dim: #5d7282;
  --bp-line: rgba(14, 52, 78, 0.14);
  --bp-brand: #0f8ea3;
  --bp-brand-strong: #0b6f80;
  --bp-accent: #de9f3f;
  --bp-danger: #c44545;
  --bp-ok: #1f8a55;

  --bp-radius-lg: 20px;
  --bp-radius-md: 15px;
  --bp-radius-sm: 12px;

  --bp-font-body: "IBM Plex Sans", "Source Sans 3", ui-sans-serif, system-ui, -apple-system, Segoe UI, sans-serif;
  --bp-font-display: "Fraunces", "Iowan Old Style", Georgia, serif;

  --bp-font-scale: 1;
  --bp-bottomnav-h: 76px;
}

html,
body {
  height: 100%;
}

body {
  font-family: var(--bp-font-body);
  color: var(--bp-ink);
  overflow-x: hidden;
  background:
    radial-gradient(1200px 560px at -10% -20%, var(--bp-bg-wave), transparent 62%),
    radial-gradient(900px 540px at 115% -10%, rgba(222, 159, 63, 0.18), transparent 58%),
    linear-gradient(180deg, var(--bp-bg0), var(--bp-bg1));
}

a {
  color: inherit;
}

.bp-shell {
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

.bp-topbar {
  position: sticky;
  top: 0;
  z-index: 70;
  backdrop-filter: blur(10px);
  background: linear-gradient(180deg, rgba(244, 248, 251, 0.98), rgba(244, 248, 251, 0.86));
  border-bottom: 1px solid var(--bp-line);
}

.bp-topbar .container {
  min-width: 0;
}

.bp-topbar-row {
  min-width: 0;
  gap: 0.5rem;
  flex-wrap: nowrap;
}

.bp-topbar-left,
.bp-topbar-right {
  min-width: 0;
}

.bp-topbar-left {
  flex: 1 1 auto;
  overflow: hidden;
}

.bp-topbar-right {
  flex: 0 1 auto;
  max-width: min(62vw, 430px);
}

#bp-lang-btn {
  max-width: min(32vw, 170px);
  min-width: 0;
}

#bp-lang-label {
  display: inline-block;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#bp-user-btn {
  max-width: clamp(88px, 34vw, 170px);
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: inline-flex;
  align-items: center;
}

.bp-brand {
  font-family: var(--bp-font-display);
  letter-spacing: 0.2px;
  color: #17334a;
}

.bp-subtle {
  color: var(--bp-muted);
}

.bp-card {
  background: linear-gradient(180deg, var(--bp-card), var(--bp-card-soft));
  border: 1px solid var(--bp-line);
  border-radius: var(--bp-radius-lg);
  box-shadow:
    0 18px 40px rgba(17, 53, 80, 0.08),
    0 1px 0 rgba(255, 255, 255, 0.86) inset;
}

.bp-card-sm {
  border-radius: var(--bp-radius-md);
}

.bp-card-stack {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.bp-card-main {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}

.bp-card-actions {
  margin-top: auto;
  padding-top: 0.75rem;
  display: flex;
  gap: 0.5rem;
  align-items: stretch;
}

.bp-card-actions--row {
  flex-direction: row;
  flex-wrap: wrap;
}

.bp-card-actions--col {
  flex-direction: column;
}

.bp-card-actions .btn {
  min-height: 2.5rem;
}

.bp-card-actions .bp-iconbtn {
  flex: 0 0 auto;
}

.bp-module-card-actions {
  flex-wrap: nowrap;
}

.bp-module-card-actions .btn.flex-grow-1 {
  min-width: 0;
}

.bp-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.34rem 0.62rem;
  border-radius: 999px;
  border: 1px solid var(--bp-line);
  background: rgba(255, 255, 255, 0.85);
  color: var(--bp-muted);
  font-size: 0.84rem;
}

.bp-progress-chip {
  white-space: nowrap;
  flex-wrap: nowrap;
  text-wrap: nowrap;
  line-height: 1;
  min-height: 2rem;
  align-items: center;
  gap: 0.35rem;
}

.bp-progress-chip > * {
  white-space: nowrap;
}

.bp-progress-chip.bp-chip {
  flex-shrink: 0;
}

.bp-progress-chip.w-100 {
  display: flex;
}

.bp-syncchip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border-radius: 999px;
  border: 1px solid var(--bp-line);
  padding: 0.34rem 0.62rem;
  font-size: 0.78rem;
  max-width: 44vw;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background: #ffffff;
  color: var(--bp-muted);
}

.bp-sync-saving {
  border-color: rgba(15, 142, 163, 0.35);
  color: var(--bp-brand-strong);
}

.bp-sync-saved {
  border-color: rgba(31, 138, 85, 0.35);
  color: var(--bp-ok);
}

.bp-sync-offline,
.bp-sync-error {
  border-color: rgba(196, 69, 69, 0.35);
  color: var(--bp-danger);
}

.bp-btn {
  border-radius: 999px;
  border: 1px solid rgba(14, 52, 78, 0.16);
  background: rgba(255, 255, 255, 0.9);
  color: var(--bp-ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
}

.bp-btn:hover {
  border-color: rgba(14, 52, 78, 0.3);
  background: #ffffff;
}

.bp-btn:disabled,
.bp-btn.disabled {
  opacity: 0.55;
}

.bp-btn-primary {
  border-color: rgba(11, 111, 128, 0.4);
  background: linear-gradient(180deg, rgba(15, 142, 163, 0.2), rgba(15, 142, 163, 0.1));
  color: #0b5260;
}

.bp-btn-primary:hover {
  background: linear-gradient(180deg, rgba(15, 142, 163, 0.26), rgba(15, 142, 163, 0.12));
}

.bp-btn-ghost {
  border-color: transparent;
  background: transparent;
}

.bp-btn-ghost:hover {
  border-color: var(--bp-line);
  background: rgba(255, 255, 255, 0.72);
}

.bp-iconbtn {
  width: 2.2rem;
  height: 2.2rem;
  padding: 0;
}

.bp-btnicon {
  display: inline-flex;
  margin-right: 0.35rem;
}

.bp-icon {
  width: 1.05rem;
  height: 1.05rem;
  flex: 0 0 auto;
}

.bp-input {
  border-radius: 14px;
  border: 1px solid rgba(14, 52, 78, 0.18);
  background: #ffffff;
  color: var(--bp-ink);
}

.bp-input:focus {
  box-shadow: 0 0 0 0.24rem rgba(15, 142, 163, 0.16);
  border-color: rgba(15, 142, 163, 0.55);
}

.bp-page {
  flex: 1;
}

.bp-fade-in {
  animation: bp-rise 460ms ease both;
}

@keyframes bp-rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.bp-bottomnav {
  z-index: 60;
  padding-bottom: env(safe-area-inset-bottom);
  background: rgba(247, 251, 254, 0.96);
  border-top: 1px solid var(--bp-line);
  box-shadow: 0 -8px 28px rgba(11, 51, 77, 0.12);
}

.bp-navbtn {
  appearance: none;
  border: 1px solid transparent;
  background: transparent;
  color: var(--bp-dim);
  padding: 0.48rem 0.4rem;
  border-radius: 12px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.28rem;
  font-size: 0.74rem;
  line-height: 1.2;
}

.bp-navicon {
  display: inline-flex;
  color: #36546a;
}

.bp-navbtn[aria-current="page"] {
  color: #14364b;
  background: rgba(15, 142, 163, 0.11);
  border-color: rgba(15, 142, 163, 0.22);
}

.bp-kicker {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.74rem;
  color: var(--bp-dim);
}

.bp-hero-title {
  font-family: var(--bp-font-display);
  font-size: clamp(2rem, 6vw, 3rem);
  line-height: 1.06;
}

.bp-hero-sub {
  color: var(--bp-muted);
  max-width: 44rem;
}

.bp-next-panel .btn {
  font-weight: 600;
}

.bp-next-copy {
  max-width: min(42rem, 100%);
}

.bp-next-cta .btn {
  min-width: 12rem;
}

.bp-next-meta {
  margin-top: 0.5rem;
  color: var(--bp-dim);
  font-size: 0.84rem;
}

.bp-home-continue-actions {
  justify-content: flex-end;
}

.bp-divider {
  height: 1px;
  background: var(--bp-line);
  width: 100%;
}

.bp-reading {
  font-size: calc(1rem * var(--bp-font-scale));
  line-height: 1.74;
  max-width: 72ch;
  margin: 0 auto;
}

.bp-reading h2,
.bp-reading h3 {
  font-family: var(--bp-font-display);
  letter-spacing: 0.15px;
  margin-top: 1.7rem;
  margin-bottom: 0.8rem;
}

.bp-reading img,
.bp-reading svg {
  max-width: 100%;
  height: auto;
  border-radius: var(--bp-radius-md);
  border: 1px solid rgba(14, 52, 78, 0.16);
  background: #f8fcff;
}

.bp-reading .topbild {
  width: 100%;
  height: auto;
}

.bp-focus .bp-topbar,
.bp-focus .bp-bottomnav {
  opacity: 0.2;
  transition: opacity 220ms ease;
}

.bp-focus .bp-topbar:hover,
.bp-focus .bp-bottomnav:hover {
  opacity: 1;
}

.bp-toast {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(var(--bp-bottomnav-h) + 12px + env(safe-area-inset-bottom));
  z-index: 110;
  padding: 0.6rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(14, 52, 78, 0.2);
  background: rgba(255, 255, 255, 0.95);
  color: var(--bp-ink);
  box-shadow: 0 14px 34px rgba(11, 46, 71, 0.14);
  max-width: min(92vw, 760px);
}

.bp-hotspot {
  position: absolute;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: rgba(222, 159, 63, 0.95);
  box-shadow: 0 0 0 7px rgba(222, 159, 63, 0.2);
  border: 1px solid rgba(11, 51, 77, 0.28);
  cursor: pointer;
}

.bp-hotspot::after {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 999px;
  background: rgba(11, 52, 78, 0.78);
}

.bp-interactive-image {
  position: relative;
}

.bp-answer {
  border: 1px solid rgba(14, 52, 78, 0.16);
  background: rgba(255, 255, 255, 0.78);
  border-radius: var(--bp-radius-md);
  padding: 0.8rem 0.88rem;
  color: var(--bp-ink);
}

.bp-answer:hover {
  background: rgba(255, 255, 255, 0.95);
}

.bp-answer[aria-checked="true"] {
  border-color: rgba(15, 142, 163, 0.48);
  background: rgba(15, 142, 163, 0.11);
}

.bp-answer.bp-correct {
  border-color: rgba(31, 138, 85, 0.48);
  background: rgba(31, 138, 85, 0.12);
}

.bp-answer.bp-wrong {
  border-color: rgba(196, 69, 69, 0.48);
  background: rgba(196, 69, 69, 0.12);
}

.bp-offcanvas {
  background: linear-gradient(180deg, #f6fbff, #ecf4fa);
  color: var(--bp-ink);
  border-right: 1px solid var(--bp-line);
  width: min(88vw, 360px);
}

.bp-menulink {
  width: 100%;
  border: 1px solid rgba(14, 52, 78, 0.14);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--bp-ink);
  padding: 0.62rem 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  text-align: left;
}

.bp-menulink:hover {
  border-color: rgba(15, 142, 163, 0.34);
  background: #ffffff;
}

.bp-menulink-static {
  cursor: default;
}

.bp-menutools {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.accordion-button {
  color: var(--bp-ink);
}

.accordion-button:not(.collapsed) {
  color: #0f3f5c;
  background: rgba(15, 142, 163, 0.09);
}

.accordion-button:focus {
  box-shadow: 0 0 0 0.18rem rgba(15, 142, 163, 0.16);
}

.dropdown-menu {
  border-color: var(--bp-line);
  box-shadow: 0 12px 30px rgba(13, 44, 67, 0.12);
}

@media (max-width: 767.98px) {
  .bp-topbar .container {
    padding-top: 0.74rem;
    padding-bottom: 0.74rem;
  }

  .bp-topbar-right {
    max-width: 52vw;
  }

  #bp-lang-btn {
    max-width: 19vw;
  }

  #bp-user-btn {
    max-width: 32vw;
  }

  .bp-syncchip {
    max-width: 36vw;
    font-size: 0.7rem;
    padding: 0.3rem 0.5rem;
  }

  .bp-progress-chip {
    font-size: 0.75rem;
    padding: 0.28rem 0.5rem;
  }

  .bp-next-cta .btn {
    min-width: 100%;
  }

  .bp-home-continue-actions {
    justify-content: flex-start;
  }

  .bp-home-continue-actions .btn {
    width: 100%;
  }

  .bp-bottomnav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
  }

  .bp-page {
    padding-bottom: calc(var(--bp-bottomnav-h) + env(safe-area-inset-bottom));
  }

  .bp-chapter-actions {
    position: sticky;
    bottom: calc(var(--bp-bottomnav-h) + 8px + env(safe-area-inset-bottom));
    background: rgba(244, 248, 251, 0.95);
    padding: 0.35rem;
    border: 1px solid var(--bp-line);
    border-radius: 14px;
    z-index: 2;
  }
}

@media (max-width: 575.98px) {
  .bp-progress-chip {
    font-size: 0.7rem;
    padding: 0.25rem 0.45rem;
    min-height: 1.8rem;
  }
}

@media (min-width: 768px) {
  .bp-toast {
    bottom: 14px;
  }
}
