.tn-study-card,
.tn-study-lessons,
.tn-study-reopen,
.tn-study-pick {
  --study-ink: #122d32;
  --study-paper: #f9f6eb;
  --study-green: #1e574f;
  --study-mint: #c9e6d9;
  color: var(--study-ink);
}

.tn-study-card {
  padding: clamp(16px, 2vw, 24px);
  background: var(--study-paper);
  border: 1px solid #d4dfd5;
  border-top: 4px solid var(--study-green);
  border-radius: 10px;
}

.tn-study-card h2,
.tn-study-lessons h2 { margin: 0 0 14px; font-size: 1.25rem; line-height: 1.25; }
.tn-study-book,
.tn-study-pick-product { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; align-items: center; }
.tn-study-book img,
.tn-study-pick-product img { display: block; height: auto; aspect-ratio: 3 / 4; object-fit: contain; border-radius: 4px; background: #e8eee5; }
.tn-study-book h3 { margin: 0; font-size: 1rem; line-height: 1.4; overflow-wrap: anywhere; }
.tn-study-book h3 a,
.tn-study-links a { color: #194e46; text-decoration: underline; text-underline-offset: 3px; }
.tn-study-book p { margin: 8px 0 0; font-size: .88rem; }
.tn-study-book strong { display: inline-block; margin-inline-start: 5px; }
.tn-study-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin-top: 14px;
  padding: 7px 12px;
  border-radius: 6px;
  background: var(--study-green);
  color: #fff;
  font-size: .95rem;
  font-weight: 700;
  text-align: center;
}
.tn-study-cta:hover,
.tn-study-cta:focus-visible { background: #123c36; color: #fff; text-decoration: underline; }
.tn-study-links { list-style: none; padding: 0; margin: 12px 0 0; }
.tn-study-links li { padding: 9px 0; border-top: 1px solid #d4dfd5; line-height: 1.45; }
.tn-study-lessons { padding: 20px 0 0; }

.tn-study-reopen {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  margin-top: 12px;
  padding: 8px 14px;
  border: 1px solid var(--study-green);
  border-radius: 6px;
  background: var(--study-paper);
  color: var(--study-green);
  font: inherit;
  font-weight: 700;
  line-height: 1.4;
  cursor: pointer;
}
.tn-study-reopen:hover:not(:disabled) { background: var(--study-mint); }
.tn-study-reopen:focus-visible { outline: 3px solid var(--study-green); outline-offset: 3px; }
.tn-study-reopen:disabled { cursor: not-allowed; opacity: .6; }
.tn-pilot-books > .tn-study-reopen { grid-column: 1 / -1; justify-self: start; margin: 0 0 10px; }
.tn-study-pick[hidden],
.tn-study-reopen[hidden] { display: none !important; }
.tn-study-pick {
  position: fixed;
  z-index: 950;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(20px, env(safe-area-inset-bottom));
  box-sizing: border-box;
  width: min(350px, calc(100% - 32px));
  max-height: calc(100dvh - 40px);
  overflow: auto;
  background: var(--study-paper);
  border: 1px solid #cad9cb;
  border-radius: 12px;
  box-shadow: 0 14px 40px #102c3733;
}
.tn-study-pick:not([hidden]) { animation: tn-study-arrive .26s ease-out both; }
@keyframes tn-study-arrive { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.tn-study-pick-intro {
  padding: 16px 52px 15px 16px;
  color: #fff;
  background-color: #183f3b;
  background-image: linear-gradient(#ffffff0b 1px, transparent 1px), linear-gradient(90deg, #ffffff0b 1px, transparent 1px);
  background-size: 19px 19px;
}
.tn-study-pick-intro p { margin: 0 0 4px; color: var(--study-mint); font-size: .8rem; font-weight: 700; }
.tn-study-pick-intro h2 { margin: 0; color: #fff; font-size: 1.32rem; line-height: 1.17; }
.tn-study-pick-product { padding: 14px; gap: 11px; }
.tn-study-pick-product strong { display: block; line-height: 1.26; overflow-wrap: anywhere; }
.tn-study-pick-product span { display: block; margin-top: 4px; font-size: .82rem; }
.tn-study-pick-product .tn-study-cta { margin-top: 8px; }
.tn-study-close {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: #10312f;
  color: #fff;
  font-size: 1.45rem;
  cursor: pointer;
}
.tn-study-close:focus-visible { outline: 2px solid #fff; outline-offset: -4px; }
@media (max-width: 600px) {
  .tn-study-pick { right: max(8px, env(safe-area-inset-right)); bottom: max(8px, env(safe-area-inset-bottom)); width: min(350px, calc(100% - 16px)); }
  .tn-study-pick-intro { padding: 11px 51px 10px 12px; }
  .tn-study-pick-intro p { display: none; }
  .tn-study-pick-intro h2 { font-size: 1.06rem; }
  .tn-study-pick-product { padding: 9px 12px; }
  .tn-study-pick-product img { width: 50px; }
  .tn-study-pick-product strong { font-size: .9rem; }
  .tn-study-close { top: 0; }
}
@media (prefers-reduced-motion: reduce) { .tn-study-pick:not([hidden]) { animation: none; } }
