/* ============================================================
   Practice hub  (topic picker -> exercise boxes -> exercise)
   Navy boxes on a light page for strong contrast.
   ============================================================ */
.pr-hero[hidden], .pr-grid[hidden], #pr-topic[hidden], #pr-exercise[hidden],
.pr-passage[hidden], .pr-fb[hidden], .pr-result[hidden], .pr-note[hidden] { display: none !important; }

.pr-hero {
  padding: clamp(96px, 10vw, 128px) 0 clamp(20px, 3vw, 34px);
  text-align: center;
  background: radial-gradient(ellipse 80% 70% at 50% -10%, rgba(30, 58, 138, 0.1) 0%, rgba(255, 122, 0, 0.05) 55%, rgba(255, 255, 255, 0) 100%);
}
.pr-title {
  font-family: var(--font-display);
  font-size: clamp(32px, 4.6vw, 56px);
  font-weight: 900;
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: var(--clr-black);
  margin: 4px auto 14px;
  max-width: 820px;
}
.pr-accent { color: #FF7A00; }
.pr-sub {
  font-size: clamp(16px, 1.3vw, 19px);
  color: var(--clr-text-2);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.6;
}

.pr-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.pr-stage {
  padding: 100px 0 clamp(40px, 5vw, 64px);
  background: linear-gradient(180deg, #FFFFFF 0%, #FAF9F6 100%);
  min-height: 60vh;
}
body.pr-in-topic .pr-stage { padding-top: 84px; }

/* ── Topic picker ── */
.pr-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: clamp(16px, 2vw, 26px);
}
.pr-tile {
  grid-column: span 2;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 300px;
  padding: clamp(24px, 2.6vw, 34px);
  text-align: left;
  color: #FFFFFF;
  font: inherit;
  cursor: pointer;
  border: 1px solid rgba(147, 197, 253, 0.25);
  border-radius: 24px;
  background: linear-gradient(155deg, #1E3A8A 0%, #172554 62%, #0F172A 100%);
  box-shadow: 0 18px 40px rgba(23, 37, 84, 0.28);
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease);
  animation: prRise 0.7s var(--ease) both;
}
.pr-tile:nth-child(n+4) { grid-column: span 3; }
.pr-tile:nth-child(2) { animation-delay: 0.08s; }
.pr-tile:nth-child(3) { animation-delay: 0.16s; }
.pr-tile:nth-child(4) { animation-delay: 0.24s; }
.pr-tile:nth-child(5) { animation-delay: 0.32s; }
.pr-tile::before {
  content: '';
  position: absolute;
  z-index: -1;
  top: -90px; right: -70px;
  width: 280px; height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 122, 0, 0.32) 0%, rgba(255, 122, 0, 0) 68%);
  transition: transform 0.5s var(--ease);
}
.pr-tile::after {
  content: '';
  position: absolute;
  z-index: -1;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.07) 1.2px, transparent 1.4px);
  background-size: 22px 22px;
  mask-image: linear-gradient(135deg, transparent 35%, #000 100%);
  -webkit-mask-image: linear-gradient(135deg, transparent 35%, #000 100%);
}
.pr-tile:hover, .pr-tile:focus-visible {
  transform: translateY(-8px);
  border-color: rgba(255, 122, 0, 0.7);
  box-shadow: 0 28px 56px rgba(23, 37, 84, 0.38), 0 0 0 1px rgba(255, 122, 0, 0.35);
  outline: none;
}
.pr-tile:hover::before { transform: scale(1.35); }
.pr-tile__icon {
  width: 118px; height: 118px;
  display: grid; place-items: center;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
  transition: transform 0.4s var(--ease), background 0.3s ease;
}
.pr-tile:hover .pr-tile__icon { transform: rotate(-5deg) scale(1.08); background: rgba(255, 255, 255, 0.14); }
.pr-ico { width: 84px; height: 84px; display: block; }
.pr-tile__body { display: flex; flex-direction: column; gap: 6px; margin-top: auto; padding-right: 54px; }
.pr-tile__title {
  font-family: var(--font-display);
  font-size: clamp(22px, 2vw, 28px);
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.01em;
}
.pr-tile__desc { font-size: 15px; line-height: 1.5; color: #CBD5E1; }
.pr-tile__count {
  align-self: flex-start;
  margin-top: 8px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #FFC58A;
  background: rgba(255, 122, 0, 0.16);
  border: 1px solid rgba(255, 122, 0, 0.4);
}
.pr-tile__count.is-done { color: #86EFAC; background: rgba(34, 197, 94, 0.15); border-color: rgba(74, 222, 128, 0.45); }
.pr-tile__go {
  position: absolute;
  right: 24px; bottom: 24px;
  width: 46px; height: 46px;
  display: grid; place-items: center;
  border-radius: 50%;
  font-size: 22px; font-weight: 800;
  color: #FFFFFF;
  background: linear-gradient(135deg, #FF7A00, #EA580C);
  box-shadow: 0 8px 20px rgba(255, 122, 0, 0.4);
  transition: transform 0.3s var(--ease);
}
.pr-tile:hover .pr-tile__go { transform: translateX(6px); }

@keyframes prRise {
  from { opacity: 0; transform: translateY(26px) scale(0.97); }
  to   { opacity: 1; transform: none; }
}

/* ── Shared bits ── */
.pr-topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.pr-back {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px;
  font: inherit; font-family: var(--font-display); font-weight: 800; font-size: 14.5px;
  color: #1E3A8A; background: #FFFFFF;
  border: 1.5px solid #1E3A8A; border-radius: 999px;
  cursor: pointer;
  transition: all 0.25s var(--ease);
}
.pr-back:hover { background: #1E3A8A; color: #FFFFFF; transform: translateX(-3px); }
.pr-crumb { font-size: 13.5px; font-weight: 800; color: #475569; }

.pr-banner {
  display: flex; align-items: center; gap: clamp(16px, 2.4vw, 28px); flex-wrap: wrap;
  padding: clamp(14px, 2vw, 22px);
  margin-bottom: 18px;
  color: #FFFFFF;
  background: linear-gradient(135deg, #1E3A8A 0%, #172554 70%, #0F172A 100%);
  border: 1px solid rgba(147, 197, 253, 0.25);
  border-radius: 22px;
  box-shadow: 0 16px 38px rgba(23, 37, 84, 0.26);
  animation: prRise 0.5s var(--ease) both;
}
.pr-banner__icon { width: 76px; height: 76px; flex: none; display: grid; place-items: center; border-radius: 20px; background: rgba(255, 255, 255, 0.09); border: 1px solid rgba(255, 255, 255, 0.16); }
.pr-banner__icon .pr-ico { width: 56px; height: 56px; }
.pr-banner__txt { flex: 1 1 220px; }
.pr-banner__title { font-family: var(--font-display); font-size: clamp(24px, 2.6vw, 34px); font-weight: 900; margin: 0 0 4px; color: #FFFFFF; }
.pr-banner__txt p { margin: 0; color: #CBD5E1; font-size: 15.5px; }
.pr-banner__prog { padding: 8px 16px; border-radius: 999px; font-weight: 800; font-size: 13.5px; color: #FFC58A; background: rgba(255, 122, 0, 0.16); border: 1px solid rgba(255, 122, 0, 0.4); }

/* ── Exercise boxes ── */
.pr-ex-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; }
.pr-ex {
  position: relative;
  display: flex; flex-direction: column; align-items: flex-start; gap: 12px;
  min-height: 200px;
  padding: 24px;
  text-align: left;
  font: inherit; color: #FFFFFF; cursor: pointer;
  background: linear-gradient(160deg, #1E3A8A 0%, #172554 100%);
  border: 1px solid rgba(147, 197, 253, 0.25);
  border-radius: 20px;
  box-shadow: 0 14px 32px rgba(23, 37, 84, 0.24);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
  animation: prRise 0.5s var(--ease) both;
  animation-delay: var(--d, 0ms);
}
.pr-ex:hover, .pr-ex:focus-visible { transform: translateY(-6px); border-color: #FF7A00; box-shadow: 0 22px 44px rgba(23, 37, 84, 0.36), 0 0 0 1px rgba(255, 122, 0, 0.4); outline: none; }
.pr-ex__n {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 8px;
  font-family: var(--font-display); font-size: 12px; font-weight: 900; letter-spacing: 0.08em; text-transform: uppercase;
  color: #FFFFFF; background: linear-gradient(135deg, #FF7A00, #EA580C);
}
.pr-ex__title { font-family: var(--font-display); font-size: 20px; font-weight: 800; line-height: 1.3; color: #FFFFFF; }
.pr-ex__meta { display: flex; flex-wrap: wrap; gap: 8px; }
.pr-ex__meta i { font-style: normal; padding: 4px 10px; font-size: 12px; font-weight: 700; color: #DBE6FF; background: rgba(255, 255, 255, 0.1); border-radius: 6px; }
.pr-ex__cta { margin-top: auto; font-weight: 800; font-size: 14.5px; color: #FFB066; display: inline-flex; gap: 8px; align-items: center; }
.pr-ex__cta b { transition: transform 0.25s var(--ease); }
.pr-ex:hover .pr-ex__cta b { transform: translateX(5px); }
.pr-ex__check { position: absolute; top: 16px; right: 16px; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; font-size: 15px; font-weight: 900; color: #052E16; background: #4ADE80; }
.pr-ex.is-done { border-color: rgba(74, 222, 128, 0.55); }

/* ── Exercise player ── */
.pr-play {
  padding: clamp(16px, 2.2vw, 26px);
  color: #FFFFFF;
  background: linear-gradient(160deg, #1E3A8A 0%, #172554 75%, #0F172A 100%);
  border: 1px solid rgba(147, 197, 253, 0.25);
  border-radius: 24px;
  box-shadow: 0 20px 48px rgba(23, 37, 84, 0.3);
  animation: prRise 0.45s var(--ease) both;
}
.pr-play__head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.pr-play__icon { width: 68px; height: 68px; flex: none; display: grid; place-items: center; border-radius: 18px; background: rgba(255, 255, 255, 0.09); border: 1px solid rgba(255, 255, 255, 0.16); }
.pr-play__icon .pr-ico { width: 50px; height: 50px; }
.pr-play__title { font-family: var(--font-display); font-size: clamp(21px, 2.4vw, 30px); font-weight: 900; line-height: 1.2; margin: 8px 0 0; color: #FFFFFF; }
.pr-bar { height: 8px; border-radius: 99px; background: rgba(255, 255, 255, 0.14); overflow: hidden; margin-bottom: 22px; }
.pr-bar span { display: block; height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, #FF7A00, #FFB066); transition: width 0.4s var(--ease); }

.pr-passage, .pr-tips {
  padding: 18px 20px;
  margin-bottom: 18px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 14px;
}
.pr-passage h3, .pr-tips h3, .pr-sub-h { font-family: var(--font-display); font-size: 13px; font-weight: 900; letter-spacing: 0.08em; text-transform: uppercase; color: #FFB066; margin: 0 0 8px; }
.pr-passage p { margin: 0 0 8px; font-size: 16px; line-height: 1.75; color: #E8EEFF; }
.pr-passage p:last-child { margin-bottom: 0; }
.pr-tips ul { margin: 0; padding-left: 20px; color: #E8EEFF; line-height: 1.7; font-size: 15px; }
.pr-model { border-color: rgba(255, 122, 0, 0.5); background: rgba(255, 122, 0, 0.1); }
.pr-sub-h { margin: 24px 0 14px; font-size: 14px; }
.pr-hint, .pr-note { font-size: 14px; color: #BFD3FF; margin: 0 0 12px; }

/* questions */
.pr-qs { display: flex; flex-direction: column; gap: 16px; }
.pr-q { padding: 18px 20px; background: rgba(255, 255, 255, 0.07); border: 1px solid rgba(255, 255, 255, 0.16); border-radius: 16px; }
.pr-q__t { display: flex; gap: 12px; align-items: flex-start; margin: 0 0 14px; font-size: 16.5px; font-weight: 700; line-height: 1.5; color: #FFFFFF; }
.pr-q__t span { flex: none; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; font-size: 14px; font-weight: 900; background: #FF7A00; color: #FFFFFF; }
.pr-opts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.pr-opt {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  text-align: left; font: inherit; font-size: 15px; font-weight: 600; line-height: 1.4;
  color: #FFFFFF; background: rgba(255, 255, 255, 0.08);
  border: 1.5px solid rgba(255, 255, 255, 0.2); border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.pr-opt b { flex: none; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; font-size: 12.5px; font-weight: 900; color: #172554; background: #DBE6FF; }
.pr-opt:hover:not(:disabled) { border-color: #FF7A00; background: rgba(255, 122, 0, 0.16); transform: translateY(-2px); }
.pr-opt:disabled { cursor: default; opacity: 0.6; }
.pr-opt.is-correct { opacity: 1; background: rgba(34, 197, 94, 0.25); border-color: #4ADE80; }
.pr-opt.is-correct b { background: #4ADE80; color: #052E16; }
.pr-opt.is-wrong { opacity: 1; background: rgba(239, 68, 68, 0.25); border-color: #F87171; animation: prShake 0.35s ease; }
.pr-opt.is-wrong b { background: #F87171; color: #450A0A; }
.pr-fb { margin-top: 12px; padding: 10px 14px; border-radius: 10px; font-size: 14.5px; line-height: 1.55; }
.pr-fb.is-ok { color: #BBF7D0; background: rgba(34, 197, 94, 0.14); }
.pr-fb.is-no { color: #FECACA; background: rgba(239, 68, 68, 0.14); }
@keyframes prShake { 0%, 100% { transform: none; } 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }

/* listening player */
.pr-audio { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 16px 18px; margin-bottom: 12px; background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.18); border-radius: 16px; }
.pr-play-btn { flex: none; width: 58px; height: 58px; display: grid; place-items: center; border: 0; border-radius: 50%; cursor: pointer; color: #FFFFFF; background: linear-gradient(135deg, #FF7A00, #EA580C); box-shadow: 0 8px 22px rgba(255, 122, 0, 0.45); transition: transform 0.2s ease; }
.pr-play-btn:hover { transform: scale(1.08); }
.pr-audio__info { flex: 1 1 160px; display: flex; flex-direction: column; gap: 2px; }
.pr-audio__info strong { font-family: var(--font-display); font-size: 16px; }
.pr-audio__info span:not(.pr-eq) { font-size: 13px; color: #BFD3FF; }
.pr-eq { display: none; gap: 3px; align-items: flex-end; height: 22px; margin-top: 4px; }
.pr-eq i { width: 4px; height: 100%; border-radius: 2px; background: #FF9A3D; transform-origin: bottom; animation: prEq 0.9s ease-in-out infinite; }
.pr-eq i:nth-child(2) { animation-delay: 0.12s; } .pr-eq i:nth-child(3) { animation-delay: 0.24s; }
.pr-eq i:nth-child(4) { animation-delay: 0.36s; } .pr-eq i:nth-child(5) { animation-delay: 0.48s; }
.pr-audio.is-playing .pr-eq { display: flex; }
@keyframes prEq { 0%, 100% { transform: scaleY(0.25); } 50% { transform: scaleY(1); } }
.pr-chip { padding: 9px 16px; font: inherit; font-size: 13.5px; font-weight: 800; color: #FFFFFF; background: rgba(255, 255, 255, 0.1); border: 1.5px solid rgba(255, 255, 255, 0.28); border-radius: 999px; cursor: pointer; transition: all 0.2s ease; }
.pr-chip:hover { border-color: #FF7A00; background: rgba(255, 122, 0, 0.2); }
.pr-link { padding: 0; margin: 0 0 16px; font: inherit; font-size: 14px; font-weight: 800; color: #FFB066; background: none; border: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

/* flashcards */
.pr-flash-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.pr-flash { padding: 0; min-height: 124px; font: inherit; background: none; border: 0; cursor: pointer; perspective: 800px; }
.pr-flash__in { position: relative; display: block; width: 100%; height: 100%; min-height: 124px; transform-style: preserve-3d; transition: transform 0.55s var(--ease); }
.pr-flash.is-flipped .pr-flash__in { transform: rotateY(180deg); }
.pr-flash__f, .pr-flash__b { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 6px; padding: 14px; text-align: center; border-radius: 14px; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.pr-flash__f { background: rgba(255, 255, 255, 0.1); border: 1.5px solid rgba(255, 255, 255, 0.24); color: #FFFFFF; }
.pr-flash__f strong { font-family: var(--font-display); font-size: 18px; font-weight: 800; }
.pr-flash__b { transform: rotateY(180deg); background: linear-gradient(135deg, #FF7A00, #EA580C); color: #FFFFFF; }
.pr-flash__b em { font-style: normal; font-weight: 800; font-size: 14.5px; line-height: 1.35; }
.pr-flash__b small { font-size: 12.5px; line-height: 1.35; color: #FFE7CC; }

/* writing */
.pr-textarea { width: 100%; padding: 14px 16px; font: inherit; font-size: 16px; line-height: 1.65; color: #0F172A; background: #FFFFFF; border: 2px solid transparent; border-radius: 14px; resize: vertical; box-sizing: border-box; transition: border-color 0.2s ease, box-shadow 0.2s ease; }
.pr-textarea:focus { outline: none; border-color: #FF7A00; box-shadow: 0 0 0 4px rgba(255, 122, 0, 0.25); }
.pr-wc { display: flex; justify-content: space-between; gap: 10px; margin: 8px 2px 16px; font-size: 13.5px; font-weight: 700; color: #BFD3FF; }

/* buttons + result */
.pr-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 4px; }
.pr-btn { padding: 13px 24px; font: inherit; font-family: var(--font-display); font-size: 15px; font-weight: 800; color: #FFFFFF; background: linear-gradient(135deg, #FF7A00, #EA580C); border: 1.5px solid transparent; border-radius: 12px; cursor: pointer; box-shadow: 0 8px 22px rgba(255, 122, 0, 0.35); transition: all 0.25s var(--ease); }
.pr-btn:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(255, 122, 0, 0.5); }
.pr-btn--ghost { background: transparent; border-color: rgba(255, 255, 255, 0.45); box-shadow: none; }
.pr-btn--ghost:hover { background: rgba(255, 255, 255, 0.12); box-shadow: none; }
.pr-result { margin-top: 22px; padding: 22px 24px; display: flex; flex-wrap: wrap; align-items: center; gap: 18px 24px; background: rgba(255, 255, 255, 0.1); border: 1.5px solid rgba(255, 122, 0, 0.6); border-radius: 18px; }
.pr-result.is-in { animation: prRise 0.5s var(--ease) both; }
.pr-result__score { display: flex; align-items: baseline; gap: 6px; }
.pr-result__score b { font-family: var(--font-display); font-size: 54px; font-weight: 900; line-height: 1; color: #FFB066; }
.pr-result__score span { font-size: 22px; font-weight: 800; color: #DBE6FF; }
.pr-result__txt { flex: 1 1 200px; display: flex; flex-direction: column; gap: 2px; }
.pr-result__txt strong { font-family: var(--font-display); font-size: 21px; }
.pr-result__txt span { color: #BFD3FF; font-size: 14.5px; }
.pr-result .pr-actions { width: 100%; }

/* CTA */
.pr-cta-wrap { padding: 0 0 clamp(56px, 7vw, 90px); background: #FAF9F6; }
.pr-cta { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding: clamp(24px, 3vw, 38px) clamp(24px, 3.4vw, 46px); background: linear-gradient(135deg, #0F172A 0%, #1E3A8A 60%, #172554 100%); border-radius: 22px; box-shadow: 0 18px 44px rgba(23, 37, 84, 0.28); }
.pr-cta__title { margin: 0; font-family: var(--font-display); font-size: clamp(20px, 2.4vw, 30px); font-weight: 900; color: #FFFFFF; max-width: 560px; }

/* ── Responsive ── */
@media (max-width: 1000px) {
  .pr-grid { grid-template-columns: repeat(2, 1fr); }
  .pr-tile, .pr-tile:nth-child(n+4) { grid-column: span 1; }
  .pr-tile:last-child { grid-column: span 2; }
}
@media (max-width: 680px) {
  .pr-opts { grid-template-columns: 1fr; }
  .pr-banner__icon { width: 74px; height: 74px; }
  .pr-banner__icon .pr-ico { width: 54px; height: 54px; }
}
@media (max-width: 560px) {
  .pr-stage, body.pr-in-topic .pr-stage { padding-top: 78px; }
  .pr-grid { grid-template-columns: 1fr; gap: 14px; }
  .pr-tile, .pr-tile:last-child, .pr-tile:nth-child(n+4) { grid-column: span 1; flex-direction: row; align-items: center; min-height: 0; gap: 16px; padding: 18px; border-radius: 20px; }
  .pr-tile__icon { width: 84px; height: 84px; border-radius: 22px; flex: none; }
  .pr-ico { width: 60px; height: 60px; }
  .pr-tile__body { margin-top: 0; padding-right: 40px; }
  .pr-tile__desc { font-size: 13.5px; }
  .pr-tile__go { right: 14px; bottom: 50%; transform: translateY(50%); width: 38px; height: 38px; font-size: 18px; }
  .pr-tile:hover .pr-tile__go { transform: translateY(50%) translateX(4px); }
  .pr-cta { text-align: center; justify-content: center; }
  .pr-play { padding: 16px; border-radius: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .pr-tile, .pr-ex, .pr-banner, .pr-play, .pr-result.is-in { animation: none; }
  .pr-eq i { animation: none; }
}
