/*
 * Akademia Olimpijska — Centrum Darmowej Wiedzy.
 * Extends the editorial system in styles.css without changing app logic.
 */

.app-main,
.quizpage {
  position: relative;
  overflow: clip;
}

.app-section {
  padding-block: clamp(54px, 8vw, 108px);
}

/* Breadcrumb */
.app-crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  max-width: 100%;
  margin-bottom: clamp(32px, 5vw, 56px);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.app-crumbs a {
  color: var(--muted);
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 4px;
  transition: color 180ms ease, text-decoration-color 180ms ease;
}

.app-crumbs a:hover {
  color: var(--ink);
  text-decoration-color: var(--brand);
}

.app-crumbs span[aria-current] {
  color: var(--ink);
}

.app-crumbs .sep {
  color: var(--brand-dark);
}

/* Shared introduction */
.app-intro {
  display: grid;
  max-width: 1010px;
  margin-bottom: clamp(46px, 7vw, 78px);
  gap: 22px;
}

.app-kicker {
  margin: 0;
  color: var(--brand-dark);
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.quiz-brand {
  margin-bottom: 22px;
}

.app-title {
  max-width: 11ch;
  margin: 0;
  font-family: var(--display);
  font-size: clamp(3.35rem, 9vw, 5.75rem);
  font-weight: 800;
  line-height: 0.88;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

.app-title .hl {
  color: var(--brand-dark);
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  font-style: normal;
  letter-spacing: inherit;
}

.app-lead {
  max-width: 63ch;
  margin: 0;
  color: var(--muted);
  font-size: clamp(1.02rem, 2vw, 1.2rem);
}

/* Low-pressure bridge from the free resources to the first-stage course. */
.app-course-prompt {
  position: relative;
  isolation: isolate;
  display: grid;
  padding: clamp(20px, 3vw, 28px) clamp(18px, 3vw, 30px);
  border: 2px solid var(--ink);
  border-radius: 18px;
  background: linear-gradient(130deg, var(--white) 0%, #fff9df 100%);
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px clamp(24px, 5vw, 54px);
  overflow: hidden;
  box-shadow: 5px 6px 0 rgba(1, 169, 224, 0.18);
}

.app-course-prompt::before {
  position: absolute;
  z-index: -1;
  top: -86px;
  right: -34px;
  width: 190px;
  height: 190px;
  border: 1px solid rgba(16, 36, 45, 0.16);
  border-radius: 50%;
  content: "";
}

.app-course-prompt::after {
  position: absolute;
  z-index: -1;
  top: 28px;
  right: 54px;
  width: 12px;
  height: 12px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--sun);
  content: "";
}

.app-course-prompt--materials,
.app-course-prompt--quizzes,
.app-course-prompt--youtube {
  margin-top: clamp(30px, 5vw, 50px);
}

.app-course-prompt--result {
  margin-top: clamp(24px, 4vw, 36px);
}

.app-course-prompt__copy {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.app-course-prompt__eyebrow {
  margin: 0 0 5px;
  color: var(--brand-dark);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.app-course-prompt__title {
  max-width: 28ch;
  margin: 0 0 5px;
  font-family: var(--display);
  font-size: clamp(1.18rem, 2.4vw, 1.5rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.app-course-prompt__text {
  max-width: 64ch;
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.app-course-prompt__link {
  position: relative;
  z-index: 1;
  display: inline-flex;
  min-height: 58px;
  padding: 13px 20px;
  border: 3px solid var(--ink);
  border-radius: 999px;
  color: var(--ink);
  background: var(--white);
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-size: 0.92rem;
  font-weight: 700;
  text-align: left;
  transition: color 180ms ease, background 180ms ease, transform 180ms var(--ease-out), box-shadow 180ms var(--ease-out);
}

.app-course-prompt__link-price {
  font-size: 1.14rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  white-space: nowrap;
}

.app-course-prompt__link-arrow {
  font-size: 1.12rem;
  transition: transform 180ms var(--ease-out);
}

/* Olympiad picker */
.olimp-grid {
  display: grid;
  gap: 14px;
}

.olimp-card {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 245px;
  padding: clamp(22px, 3vw, 30px);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  color: var(--ink);
  background: var(--paper-deep);
  flex-direction: column;
  overflow: hidden;
}

a.olimp-card {
  min-height: clamp(310px, 42vw, 430px);
  color: var(--white);
  background: var(--ink);
  transition: transform 200ms var(--ease-out), box-shadow 200ms var(--ease-out);
}

a.olimp-card::before {
  position: absolute;
  right: clamp(22px, 4vw, 38px);
  bottom: clamp(24px, 4vw, 38px);
  width: clamp(126px, 24vw, 220px);
  aspect-ratio: 1;
  border: 2px solid rgba(255, 255, 255, 0.32);
  border-radius: 50%;
  content: "";
  box-shadow:
    inset 0 0 0 clamp(16px, 3vw, 28px) var(--ink),
    inset 0 0 0 clamp(18px, 3.2vw, 31px) var(--brand);
  pointer-events: none;
}

a.olimp-card::after {
  position: absolute;
  right: clamp(68px, 12vw, 120px);
  bottom: clamp(75px, 13vw, 132px);
  width: 24px;
  height: 24px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--sun);
  content: "";
  pointer-events: none;
}

.olimp-card__abbr {
  position: relative;
  z-index: 1;
  max-width: 80%;
  margin-bottom: 10px;
  color: var(--ink);
  font-family: var(--display);
  font-size: clamp(2.35rem, 5vw, 3.75rem);
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -0.04em;
  overflow-wrap: anywhere;
}

a.olimp-card .olimp-card__abbr {
  color: var(--brand);
  font-size: clamp(4rem, 10vw, 6.6rem);
}

.olimp-card__name {
  position: relative;
  z-index: 1;
  max-width: 22ch;
  margin-bottom: 12px;
  font-family: var(--display);
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.025em;
}

a.olimp-card .olimp-card__name {
  max-width: 25ch;
  font-size: clamp(1.35rem, 2.7vw, 2rem);
}

.olimp-card__desc {
  position: relative;
  z-index: 1;
  max-width: 42ch;
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

a.olimp-card .olimp-card__desc {
  max-width: 39ch;
  color: rgba(255, 255, 255, 0.7);
  font-size: clamp(0.93rem, 1.7vw, 1.04rem);
}

.olimp-card__cta {
  position: relative;
  z-index: 1;
  display: flex;
  width: min(100%, 260px);
  padding-top: 16px;
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.34);
  align-items: center;
  justify-content: space-between;
  font-size: 0.84rem;
  font-weight: 700;
}

.olimp-card__cta i {
  font-size: 1.15rem;
  font-style: normal;
  transition: transform 180ms var(--ease-out);
}

.olimp-card.is-soon {
  cursor: default;
}

.olimp-card__badge {
  position: absolute;
  z-index: 2;
  top: 19px;
  right: 19px;
  padding: 5px 10px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  color: var(--ink);
  background: var(--sun);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* OWE hub navigation */
.tabs {
  min-width: 0;
}

.tablist {
  display: flex;
  max-width: 100%;
  padding-bottom: 6px;
  margin-bottom: clamp(44px, 7vw, 76px);
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}

.tab {
  display: inline-flex;
  min-width: max-content;
  min-height: 58px;
  padding: 8px 18px 8px 9px;
  border: 2px solid var(--ink);
  border-radius: 16px;
  color: var(--ink);
  background: var(--paper);
  align-items: center;
  gap: 11px;
  font-family: var(--display);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: color 180ms ease, background 180ms ease, transform 180ms var(--ease-out);
}

.tab:hover {
  background: var(--white);
}

.tab[aria-selected="true"] {
  color: var(--white);
  background: var(--ink);
}

.tab-ico {
  display: grid;
  width: 38px;
  height: 38px;
  border: 1px solid currentColor;
  border-radius: 10px;
  color: inherit;
  background: transparent;
  place-items: center;
}

.tab[aria-selected="true"] .tab-ico {
  border-color: var(--brand);
  color: var(--ink);
  background: var(--brand);
}

.tab-ico svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tabpanel {
  animation: app-fade 300ms var(--ease-out) both;
}

.tabpanel:focus-visible {
  outline-offset: 10px;
}

@keyframes app-fade {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

.tabpanel__head {
  display: grid;
  padding-bottom: 24px;
  margin-bottom: 24px;
  border-bottom: 2px solid var(--ink);
  gap: 10px;
}

.tabpanel__title {
  max-width: 12ch;
  margin: 0;
  font-family: var(--display);
  font-size: clamp(2.25rem, 6vw, 4rem);
  font-weight: 700;
  line-height: 0.94;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

.tabpanel__desc {
  max-width: 60ch;
  margin: 0;
  color: var(--muted);
}

/* Materials */
.mat-note {
  margin-bottom: 22px;
  color: var(--muted);
  font-size: 0.86rem;
}

.mat-note a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--brand-dark);
  text-underline-offset: 3px;
}

.mat-grid {
  display: grid;
  gap: 12px;
}

.mat-card {
  display: grid;
  min-height: 112px;
  padding: 16px;
  border: 2px solid var(--ink);
  border-radius: 16px;
  color: var(--ink);
  background: var(--white);
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 15px;
  transition: transform 180ms var(--ease-out), box-shadow 180ms var(--ease-out), background 180ms ease;
}

.mat-card__ico {
  display: grid;
  width: 50px;
  height: 58px;
  border: 2px solid var(--ink);
  border-radius: 9px;
  color: var(--white);
  background: var(--ink);
  place-items: center;
  font-family: var(--display);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.mat-card__label {
  display: block;
  font-family: var(--display);
  font-size: 1.06rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.mat-card__meta {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.78rem;
}

.mat-card__arrow {
  font-size: 1.2rem;
  font-style: normal;
  transition: transform 180ms var(--ease-out);
}

/* Quiz catalogue */
.quiz-block {
  margin-bottom: clamp(42px, 6vw, 68px);
}

.quiz-block:last-child {
  margin-bottom: 0;
}

.quiz-block__title {
  display: flex;
  margin-bottom: 18px;
  color: var(--ink);
  align-items: center;
  gap: 14px;
  font-family: var(--display);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.quiz-block__title::after {
  height: 1px;
  background: var(--line);
  content: "";
  flex: 1;
}

.quiz-btns {
  display: grid;
  gap: 10px;
}

.quiz-btn {
  display: flex;
  min-height: 82px;
  padding: 13px 18px 13px 13px;
  border: 2px solid var(--ink);
  border-radius: 16px;
  color: var(--white);
  background: var(--ink);
  align-items: center;
  gap: 14px;
  transition: transform 180ms var(--ease-out), box-shadow 180ms var(--ease-out);
}

.quiz-btn .number {
  display: grid;
  width: 52px;
  height: 52px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.09);
  flex: 0 0 auto;
  place-items: center;
  font-family: var(--display);
  font-size: 1.3rem;
  font-weight: 800;
}

.quiz-btn .text {
  font-family: var(--display);
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.025em;
}

.quiz-btn.is-brand {
  color: var(--ink);
  background: var(--sun);
}

.quiz-btn.is-brand .number {
  border-color: var(--ink);
  background: var(--white);
}

.quiz-btn.is-accent {
  color: var(--ink);
  background: var(--brand);
}

.quiz-btn.is-accent .number {
  border-color: var(--ink);
  background: rgba(255, 255, 255, 0.42);
}

.archive {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.archive-row {
  display: grid;
  padding: 16px;
  border: 2px solid var(--ink);
  border-radius: 16px;
  background: var(--white);
  gap: 15px;
}

.archive-year {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.archive-edition {
  font-family: var(--display);
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.025em;
}

.archive-dates {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.78rem;
}

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

.archive-btn {
  display: flex;
  min-width: 0;
  min-height: 46px;
  padding: 8px 10px;
  border: 1px solid var(--ink);
  border-radius: 10px;
  color: var(--ink);
  background: var(--paper);
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: var(--display);
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
  transition: color 180ms ease, background 180ms ease, transform 180ms var(--ease-out);
}

.archive-btn .num {
  font-weight: 800;
}

/* YouTube */
.yt-card {
  display: grid;
  padding: clamp(24px, 5vw, 44px);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  color: var(--white);
  background: var(--ink);
  align-items: center;
  gap: 22px;
}

.yt-card__play {
  display: grid;
  width: 74px;
  height: 74px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  color: var(--ink);
  background: var(--sun);
  place-items: center;
}

.yt-card__play svg {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.yt-card__body {
  min-width: 0;
}

.yt-card__title {
  max-width: 18ch;
  margin: 0 0 8px;
  font-family: var(--display);
  font-size: clamp(1.55rem, 3vw, 2.2rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.035em;
}

.yt-card__desc {
  max-width: 44ch;
  margin: 0;
  color: rgba(255, 255, 255, 0.7);
}

.yt-card__cta {
  display: inline-flex;
  min-height: 50px;
  padding: 12px 18px;
  border: 2px solid var(--ink);
  border-radius: 14px;
  color: var(--ink);
  background: var(--brand);
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  font-family: var(--display);
  font-size: 0.88rem;
  font-weight: 700;
  transition: background 180ms ease, transform 180ms var(--ease-out);
}

/* Progressive reveal: content remains visible when JavaScript is unavailable. */
html.has-js [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 560ms var(--ease-out), transform 560ms var(--ease-out);
}

html.has-js [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

html.has-js [data-reveal][data-reveal-delay="1"] { transition-delay: 60ms; }
html.has-js [data-reveal][data-reveal-delay="2"] { transition-delay: 120ms; }
html.has-js [data-reveal][data-reveal-delay="3"] { transition-delay: 180ms; }

/* Quiz flow */
.quizpage {
  min-height: 72vh;
  padding-block: clamp(42px, 7vw, 88px) clamp(58px, 9vw, 108px);
}

.quiz-shell {
  width: min(calc(100% - 32px), 820px);
  margin-inline: auto;
}

.quiz-loading {
  padding-block: clamp(68px, 12vw, 118px);
  color: var(--muted);
  text-align: center;
}

.quiz-loading h1 {
  margin-bottom: 10px;
  font-family: var(--display);
  font-size: clamp(1.65rem, 4vw, 2.4rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
}

.quiz-back {
  display: inline-flex;
  padding-bottom: 4px;
  margin-bottom: 24px;
  border-bottom: 1px solid transparent;
  color: var(--muted);
  align-items: center;
  gap: 8px;
  font-family: var(--display);
  font-size: 0.83rem;
  font-weight: 700;
  transition: color 180ms ease, border-color 180ms ease;
}

.quiz-back:hover {
  border-color: var(--brand);
  color: var(--ink);
}

.quiz-card {
  padding: clamp(22px, 5vw, 42px);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: 8px 10px 26px rgba(16, 36, 45, 0.13);
}

.quiz-meta {
  display: flex;
  padding-bottom: 17px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--line);
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.quiz-qno {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.quiz-points {
  padding: 5px 10px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  color: var(--ink);
  background: var(--sun);
  font-family: var(--display);
  font-size: 0.78rem;
  font-weight: 800;
}

.quiz-question {
  max-width: 36ch;
  margin: 0 0 26px;
  font-family: var(--display);
  font-size: clamp(1.3rem, 3vw, 1.72rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.025em;
}

.quiz-options {
  display: flex;
  margin-bottom: 26px;
  flex-direction: column;
  gap: 10px;
}

.quiz-option {
  display: flex;
  min-height: 58px;
  padding: 14px 16px;
  border: 2px solid var(--line);
  border-radius: 13px;
  background: var(--paper);
  align-items: flex-start;
  gap: 13px;
  cursor: pointer;
  transition: border-color 180ms ease, background 180ms ease, transform 180ms var(--ease-out);
}

.quiz-option:hover {
  border-color: var(--ink);
}

.quiz-option:focus-within {
  outline: 3px solid var(--brand);
  outline-offset: 3px;
}

.quiz-option:has(input:checked) {
  border-color: var(--ink);
  background: rgba(1, 169, 224, 0.14);
}

.quiz-option input {
  width: 21px;
  height: 21px;
  margin: 1px 0 0;
  accent-color: var(--brand-dark);
  flex: 0 0 auto;
}

.quiz-option input:focus-visible {
  outline: none;
}

.quiz-option .odp {
  font-size: 0.98rem;
  line-height: 1.45;
}

.quiz-option .odp.is-correct {
  color: #126b39;
  font-weight: 700;
}

.quiz-option .odp.is-wrong {
  color: #a51f1f;
  font-weight: 700;
}

.quiz-btn-primary,
.quiz-btn-next,
.copy-wrong-answers-button {
  display: inline-flex;
  min-height: 50px;
  padding: 12px 22px;
  border: 2px solid var(--ink);
  border-radius: 13px;
  color: var(--ink);
  background: var(--brand);
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--display);
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 180ms ease, transform 180ms var(--ease-out), box-shadow 180ms var(--ease-out);
}

.quiz-btn-next {
  color: var(--white);
  background: var(--ink);
}

.quiz-btn-primary:disabled,
.quiz-btn-next:disabled,
.copy-wrong-answers-button:disabled {
  opacity: 0.52;
  cursor: not-allowed;
}

.quiz-comment {
  margin: 18px 0 0;
  font-family: var(--display);
  font-size: 1.02rem;
  font-weight: 700;
}

.quiz-expl,
.quiz-summary,
.quiz-links {
  padding: clamp(20px, 4vw, 30px);
  margin-top: 16px;
  border: 2px solid var(--ink);
  border-radius: 18px;
  background: var(--paper-deep);
}

.quiz-expl .faq-toggle {
  display: flex;
  width: 100%;
  min-height: 44px;
  padding: 0;
  border: 0;
  color: var(--ink);
  background: transparent;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.quiz-expl .faq-toggle .arrow {
  transition: transform 220ms var(--ease-out);
}

.quiz-expl .faq-toggle[aria-expanded="true"] .arrow {
  transform: rotate(180deg);
}

.quiz-expl .faq-content {
  max-height: 0;
  overflow: hidden;
}

.quiz-expl .faq-content.is-open {
  max-height: 1600px;
  margin-top: 16px;
}

.quiz-expl .faq-content p {
  max-width: 68ch;
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.65;
}

.quiz-summary,
.quiz-links {
  background: var(--white);
}

.quiz-summary h2 {
  margin: 0 0 10px;
  font-family: var(--display);
  font-size: clamp(1.35rem, 3vw, 1.8rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
}

.wrong-answer-item {
  padding-block: 18px;
  border-top: 1px solid var(--line);
}

.wrong-answer-item h3 {
  margin: 0 0 8px;
  font-family: var(--display);
  font-size: 1rem;
}

.wrong-answer-item p {
  margin: 0 0 6px;
  line-height: 1.5;
}

.wrong-answer-details {
  margin-top: 8px;
}

.wrong-answer-details summary {
  color: var(--ink);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: var(--brand-dark);
  text-underline-offset: 3px;
  cursor: pointer;
}

.wrong-answer-explanation {
  margin-top: 8px;
  color: var(--ink-soft);
  line-height: 1.6;
}

.copy-wrong-answers-button {
  min-height: 44px;
  padding: 9px 15px;
  margin: 12px 0 4px;
  background: var(--sun);
  font-size: 0.82rem;
}

.copy-wrong-answers-status {
  margin: 5px 0 0;
  font-size: 0.84rem;
}

.quiz-links h3 {
  margin: 0 0 14px;
  font-family: var(--display);
  font-weight: 700;
}

.quiz-links ul {
  padding-left: 20px;
  margin: 0;
}

.quiz-links li {
  margin-bottom: 7px;
}

.quiz-links a {
  color: var(--ink);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--brand-dark);
  text-underline-offset: 3px;
}

@media (hover: hover) {
  a.olimp-card:hover,
  .mat-card:hover,
  .quiz-btn:hover {
    box-shadow: 6px 7px 18px rgba(16, 36, 45, 0.2);
    transform: translate(-2px, -2px);
  }

  a.olimp-card:hover .olimp-card__cta i,
  .mat-card:hover .mat-card__arrow {
    transform: translate(3px, -3px);
  }

  .mat-card:hover {
    background: var(--paper-deep);
  }

  .app-course-prompt__link:hover {
    color: var(--ink);
    background: var(--sun);
    transform: translateY(-2px);
    box-shadow: 3px 3px 0 var(--ink);
  }

  .app-course-prompt__link:hover .app-course-prompt__link-arrow {
    transform: translate(2px, -2px);
  }

  .tab:hover,
  .archive-btn:hover,
  .quiz-btn-primary:hover:not(:disabled),
  .quiz-btn-next:hover:not(:disabled),
  .copy-wrong-answers-button:hover:not(:disabled),
  .yt-card__cta:hover {
    transform: translateY(-2px);
  }

  .archive-btn:hover {
    color: var(--white);
    background: var(--ink);
  }

  .quiz-btn-primary:hover:not(:disabled),
  .yt-card__cta:hover {
    background: var(--sun);
  }

  .quiz-btn-next:hover:not(:disabled) {
    background: var(--ink-soft);
  }

  .quiz-option:hover {
    transform: translateX(2px);
  }
}

@media (min-width: 620px) {
  .quiz-btns {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .quiz-btns:has(.quiz-btn:only-child) {
    grid-template-columns: minmax(240px, 0.5fr);
  }

  .yt-card {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .yt-card__cta {
    grid-column: 1 / -1;
  }
}

@media (min-width: 700px) {
  .olimp-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  a.olimp-card {
    grid-column: 1 / -1;
  }

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

  .archive-row {
    grid-template-columns: 130px minmax(0, 1fr);
    align-items: center;
  }
}

@media (min-width: 800px) {
  .app-intro {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 22px;
  }

  .tabpanel__head {
    grid-template-columns: minmax(0, 0.7fr) minmax(320px, 0.55fr);
    align-items: end;
    gap: 50px;
  }

  .yt-card {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .yt-card__cta {
    grid-column: auto;
  }
}

@media (min-width: 980px) {
  .olimp-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  a.olimp-card {
    grid-column: span 2;
  }

  .tablist {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding-bottom: 0;
  }

  .tab {
    min-width: 0;
  }
}

@media (max-width: 620px) {
  .app-course-prompt {
    grid-template-columns: 1fr;
  }

  .app-course-prompt__link {
    justify-self: start;
  }
}

@media (max-width: 430px) {
  .archive-btns {
    grid-template-columns: 1fr;
  }

  .archive-btn {
    justify-content: flex-start;
  }

  .quiz-btn-primary,
  .quiz-btn-next {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  html.has-js [data-reveal],
  .tabpanel {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
    transition: none !important;
  }
}

/* Optional "Konto" entry inserted inside the centrum header. */
.nav-account {
  display: none;
}

@media (min-width: 1080px) {
  .nav-account {
    display: inline-flex;
    flex: 0 0 auto;
    padding: 10px 18px;
    border: 2px solid var(--ink);
    border-radius: 999px;
    color: var(--ink);
    background: transparent;
    align-items: center;
    gap: 6px;
    font-size: 0.95rem;
    font-weight: 600;
    transition: background 200ms ease, color 200ms ease;
  }

  .nav-account:hover {
    color: var(--paper);
    background: var(--ink);
  }
}
