* { box-sizing: border-box; }
html, body { 
  height: 100%; 
  margin: 0;
  padding: 0;
}

/* Accessibility - screen reader only */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
body {
  font-family: Inter, var(--font-sans);
  color: var(--text);
  background: linear-gradient(180deg, var(--page-start), var(--page-end));
  min-height: 100vh;
  background-attachment: fixed;
  background-size: 100% 100%;
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--spacing-4) var(--spacing-6);
  background: transparent;
  position: sticky;
  top: 0;
  z-index: 10;
}
.brand { display: flex; align-items: center; gap: var(--spacing-3); }
.brand .logo-img { display: inline-block; width: clamp(72px, 12vw, 140px); height: auto; border-radius: 24px; filter: drop-shadow(0 4px 10px rgba(0,0,0,0.18)); }
.brand .name { font-weight: 700; letter-spacing: 0.2px; }
.brand .tagline { color: var(--muted); font-size: 0.9rem; }
.icon-btn { 
  background: transparent;
  border: none;
  color: var(--icon-color);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 22px;
  cursor: pointer;
  transition: transform .15s ease, opacity .15s ease, color .15s ease;
}
.icon-btn:focus { outline: 2px solid var(--accent); outline-offset: 2px; }
.icon-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.icon-btn:hover { transform: translateY(-1px); opacity: .9; }
.icon-btn.active { 
  background: rgba(0,0,0,0.08); 
  transform: scale(1.05);
}
.controls { display: flex; align-items: center; gap: var(--spacing-3); }
.controls .icon-btn i { font-weight: 900; }
/* stealth mode removed */

.app-main {
  max-width: 560px;
  margin: 0 auto;
  padding: var(--spacing-8) var(--spacing-4);
}

.trainer {
  display: grid;
  place-items: center;
  gap: var(--spacing-6);
  margin: var(--spacing-8) 0;
}
.phase-top { font-size: 1.8rem; font-weight: 900; letter-spacing: 2px; color: var(--phase-color); transition: opacity 200ms cubic-bezier(0.4, 0, 0.2, 1); }
.ring {
  width: 360px;
  height: 360px;
  position: relative;
}
.ring-svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-bg {
  fill: none;
  stroke: var(--ring-track-color);
  stroke-width: 18;
}
.ring-progress {
  fill: none;
  stroke: var(--ring-progress-color);
  stroke-width: 18;
  stroke-linecap: round;
  stroke-dasharray: 427; /* approx for r=68 */
  stroke-dashoffset: 427;
  opacity: 1;
  transition: opacity 200ms ease;
}
.ring-progress-ghost {
  fill: none;
  stroke: var(--ring-progress-color);
  stroke-width: 18;
  stroke-linecap: round;
  stroke-dasharray: 427;
  stroke-dashoffset: 427;
  opacity: 0;
  transition: opacity 200ms ease;
  pointer-events: none;
}
.ring-center {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: var(--spacing-2);
}
.phase { color: var(--phase-color); font-size: 1.4rem; font-weight: 700; }
.seconds { color: var(--number-color); font-size: 6.5rem; font-weight: 900; letter-spacing: 1px; }
.rep-set { color: var(--counter-color); font-size: 1.6rem; font-weight: 900; display: inline-flex; align-items: center; gap: 14px; text-transform: uppercase; }
.rep-set .of { font-weight: 700; opacity: 0.7; }
.rep-set .sep { opacity: 0.5; }

.controls-row { display: flex; gap: var(--spacing-3); }
.primary, .secondary, .ghost {
  padding: 14px 22px;
  border-radius: 14px;
  border: 1px solid transparent;
  cursor: pointer;
  font-weight: 900;
  text-transform: uppercase;
  transition: box-shadow .2s ease, transform .1s ease, background-color .2s ease, color .2s ease;
  font-size: 1.15rem;
}
.primary { background: var(--primary); color: #0b1220; }
html[data-theme="male"] .primary { color: #3B4A5A; background: #5aa0e0; box-shadow: 0 6px 20px rgba(90,160,224,0.35); }
html[data-theme="female"] .primary { color: #ffffff; background: #e24275; box-shadow: 0 6px 20px rgba(226,66,117,0.35); }
html[data-theme="middle"] .primary { color: #2b164b; background: #8b5cf6; box-shadow: 0 6px 20px rgba(139,92,246,0.35); }
.primary:hover { transform: translateY(-1px); box-shadow: 0 10px 26px rgba(0,0,0,0.18); }
.primary:active { transform: translateY(0); box-shadow: 0 4px 16px rgba(0,0,0,0.18) inset; }
.secondary { background: #111827; color: var(--text); border-color: var(--ring-track); }
.ghost { background: rgba(255,255,255,0.6); color: #111827; border-color: rgba(0,0,0,0.15); }
.primary:disabled, .secondary:disabled, .ghost:disabled { opacity: 0.5; cursor: not-allowed; }

/* Sticky action on mobile */
@media (max-width: 600px) {
  .controls-row { position: sticky; bottom: 12px; justify-content: center; }
}
.settings-row { display: flex; justify-content: center; align-items: center; margin-top: 24px; gap: 16px; flex-wrap: wrap; }
.settings-row .ghost { 
  background: rgba(255,255,255,0.5); 
  color: var(--phase-color); 
  font-weight: 800; 
  border: 2px solid rgba(255,255,255,0.3); 
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  font-size: 0.95rem;
  padding: 12px 28px;
  transition: all 0.2s ease;
}
.settings-row .ghost:hover {
  background: rgba(255,255,255,0.7);
  border-color: rgba(255,255,255,0.5);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Haptic Toggle */
.haptics-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(255,255,255,0.5);
  border: 2px solid rgba(255,255,255,0.3);
  transition: all 0.2s ease;
}

.haptics-toggle:hover {
  background: rgba(255,255,255,0.7);
  border-color: rgba(255,255,255,0.5);
}

.haptics-toggle input[type="checkbox"] {
  appearance: none;
  width: 48px;
  height: 28px;
  background: rgba(0,0,0,0.15);
  border-radius: 999px;
  position: relative;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 2px solid transparent;
}

.haptics-toggle input[type="checkbox"]:checked {
  background: var(--primary);
}

.haptics-toggle input[type="checkbox"]::before {
  content: '';
  position: absolute;
  width: 22px;
  height: 22px;
  background: white;
  border-radius: 50%;
  top: 1px;
  left: 1px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.haptics-toggle input[type="checkbox"]:checked::before {
  left: 21px;
}

.haptics-label {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--phase-color);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  user-select: none;
}

@media (max-width: 600px) {
  .haptics-toggle {
    order: -1;
    width: 100%;
    justify-content: space-between;
    padding: 12px 20px;
  }
}

.presets { 
  border: 1px solid rgba(255,255,255,0.3); 
  border-radius: 32px; 
  padding: 28px 24px; 
  background: rgba(255,255,255,0.25); 
  backdrop-filter: blur(30px); 
  box-shadow: 0 8px 32px rgba(0,0,0,0.06), 
              0 2px 8px rgba(255,255,255,0.4) inset;
  margin-top: 32px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: top center;
}

.presets[hidden] {
  display: block;
  opacity: 0;
  transform: translateY(-20px) scale(0.95);
  pointer-events: none;
  max-height: 0;
  overflow: hidden;
  margin-top: 0;
  padding-top: 0;
  padding-bottom: 0;
}

.presets:not([hidden]) {
  animation: slideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
.preset-chips { 
  display: flex; 
  flex-wrap: wrap; 
  gap: 28px 12px; /* vertical gap, horizontal gap */
  margin-bottom: 32px; 
  justify-content: center; 
}
.chip { 
  border: 2px solid rgba(255,255,255,0.4); 
  background: rgba(255,255,255,0.7); 
  color: var(--phase-color); 
  border-radius: 999px; 
  padding: 12px 20px; 
  cursor: pointer; 
  font-weight: 800; 
  font-size: 0.95rem;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1); 
  box-shadow: 0 3px 8px rgba(0,0,0,0.06),
              0 1px 3px rgba(255,255,255,0.5) inset;
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.chip::after {
  content: attr(data-timeline);
  font-size: 0.7rem;
  font-weight: 600;
  opacity: 0;
  color: var(--phase-color);
  transition: opacity 0.2s ease;
  position: absolute;
  bottom: -20px;
  white-space: nowrap;
  pointer-events: none;
}

.chip:hover::after {
  opacity: 0.6;
}
.chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.chip.active { 
  background: var(--primary); 
  color: var(--primary-contrast); 
  border-color: transparent; 
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  transform: translateY(-1px);
}
.chip:hover:not(.active) { 
  box-shadow: 0 4px 12px rgba(0,0,0,0.1),
              0 1px 3px rgba(255,255,255,0.6) inset; 
  transform: translateY(-2px);
  background: rgba(255,255,255,0.85);
  border-color: rgba(255,255,255,0.6);
}
html[data-theme="male"] .chip.active, html[data-theme="female"] .chip.active { color: #ffffff; }
.presets input { 
  background: rgba(255,255,255,0.8); 
  color: var(--phase-color); 
  border: 2px solid rgba(255,255,255,0.4); 
  border-radius: 20px; 
  padding: 16px 20px; 
  font-weight: 900; 
  text-align: center; 
  font-size: 1.5rem; 
  box-shadow: 0 4px 12px rgba(0,0,0,0.06),
              0 1px 3px rgba(255,255,255,0.5) inset;
  min-width: 100px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Remove number input spinners for clean centered look */
.presets input::-webkit-outer-spin-button,
.presets input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.presets input[type=number] {
  -moz-appearance: textfield;
  appearance: textfield;
}

.presets input:focus {
  outline: none;
  background: rgba(255,255,255,0.95);
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(59, 130, 196, 0.15), 
              0 4px 16px rgba(0,0,0,0.1),
              0 1px 3px rgba(255,255,255,0.8) inset;
  transform: scale(1.05);
}

.presets input:hover {
  background: rgba(255,255,255,0.9);
  border-color: rgba(255,255,255,0.6);
  transform: translateY(-1px);
}
.custom-fields { 
  display: grid; 
  grid-template-columns: repeat(3, minmax(0, 1fr)); 
  gap: 16px; 
  margin-top: 18px; 
  align-items: start; 
}

.presets label { 
  color: var(--phase-color); 
  font-weight: 800; 
  font-size: 0.75rem; 
  opacity: 0.7;
  text-transform: uppercase;
  letter-spacing: 1px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}

.two-col { display: grid; gap: var(--spacing-6); grid-template-columns: 1fr; }
@media (min-width: 900px) { .two-col { grid-template-columns: 1fr 1fr; } }
/* Mobile polish */
@supports(padding: max(0px)) {
  body { padding-left: max(0px, env(safe-area-inset-left)); padding-right: max(0px, env(safe-area-inset-right)); }
}
@media (max-width: 480px) {
  .seconds { font-size: clamp(4rem, 16vw, 6rem); }
  .phase-top { font-size: clamp(1.2rem, 5vw, 1.6rem); }
  .controls-row .primary { padding: 14px 18px; font-size: 1.1rem; border-radius: 14px; }
}

/* old .md styles removed - now using .learn-content */

/* Rainbow primary for middle theme accents */
html[data-theme="middle"] .ring-progress {
  stroke: url(#gradientStroke);
}

/* Celebration overlay */
.celebration-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  animation: celebrationFadeIn 0.4s ease;
}

.celebration-overlay.fade-out {
  animation: celebrationFadeOut 0.5s ease forwards;
}

@keyframes celebrationFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes celebrationFadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

.celebration-overlay canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.celebration-content {
  position: relative;
  z-index: 1;
  text-align: center;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(20px);
  border-radius: 28px;
  padding: 40px 48px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2),
              0 0 0 1px rgba(255,255,255,0.5) inset;
  animation: celebrationPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes celebrationPop {
  0% { 
    transform: scale(0.8);
    opacity: 0;
  }
  100% { 
    transform: scale(1);
    opacity: 1;
  }
}

.celebration-icon {
  font-size: 4rem;
  font-weight: 900;
  color: var(--primary);
  margin-bottom: 16px;
  animation: checkPulse 0.6s ease;
}

@keyframes checkPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

.celebration-message {
  font-size: 1.5rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: 0.5px;
}

/* Stats Modal */
.stats-dialog {
  max-width: 640px;
}

.stats-title {
  font-size: 1.75rem;
  font-weight: 900;
  color: #0f172a;
  margin: 0;
  letter-spacing: -0.02em;
}

.stats-content {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.streak-banner {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 24px;
  padding: 32px;
  display: flex;
  align-items: center;
  gap: 24px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.streak-icon {
  font-size: 4rem;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.2));
}

.streak-info {
  flex: 1;
  color: white;
}

.streak-number {
  font-size: 3.5rem;
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.streak-label {
  font-size: 1.1rem;
  font-weight: 700;
  opacity: 0.95;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 8px;
}

.stats-section h3 {
  font-size: 1.1rem;
  font-weight: 800;
  color: #374151;
  margin: 0 0 16px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.week-calendar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
}

.week-day {
  aspect-ratio: 1;
  border-radius: 12px;
  background: rgba(0,0,0,0.04);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 12px 4px;
  transition: all 0.2s ease;
}

.week-day-name {
  font-size: 0.7rem;
  font-weight: 700;
  color: #6b7280;
  text-transform: uppercase;
}

.week-day-date {
  font-size: 1.1rem;
  font-weight: 900;
  color: #374151;
}

.week-day.completed {
  background: var(--primary);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  transform: scale(1.05);
}

.week-day.completed .week-day-name,
.week-day.completed .week-day-date {
  color: white;
}

.week-day.today {
  border: 2px solid var(--primary);
}

.session-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 300px;
  overflow-y: auto;
}

.session-item {
  background: rgba(0,0,0,0.03);
  border-radius: 12px;
  padding: 14px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.session-date {
  font-size: 0.9rem;
  font-weight: 700;
  color: #6b7280;
}

.session-details {
  display: flex;
  gap: 16px;
  align-items: center;
}

.session-preset {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--primary);
  text-transform: capitalize;
  background: rgba(255,255,255,0.7);
  padding: 4px 12px;
  border-radius: 999px;
}

.session-duration {
  font-size: 0.85rem;
  font-weight: 700;
  color: #9ca3af;
}

.stats-empty {
  text-align: center;
  padding: 48px 24px;
  color: #9ca3af;
  font-size: 1rem;
}

.stats-empty-icon {
  font-size: 3rem;
  margin-bottom: 16px;
  opacity: 0.3;
}

/* Theme backgrounds per selection */
html[data-theme="male"] body { --page-start: #dbeafe; --page-end: #93c5fd; }
html[data-theme="female"] body { --page-start: #ffd1e8; --page-end: #f9a8d4; }
html[data-theme="middle"] body { --page-start: #ffecd2; --page-end: #fcb69f; }

/* Phase tint (slightly darker for relax to mimic mock) */
body[data-phase="relax"] { filter: saturate(0.95) brightness(0.97); }
body[data-phase="squeeze"] { filter: saturate(1.05) brightness(1.02); }

/* Modal Footer */
.modal-footer {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 2px solid rgba(0,0,0,0.06);
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-text {
  font-size: 0.875rem;
  font-weight: 600;
  color: #6b7280;
}

.footer-link {
  color: var(--primary);
  text-decoration: none;
  font-weight: 700;
  transition: opacity 0.2s ease;
}

.footer-link:hover {
  opacity: 0.7;
  text-decoration: underline;
}

.footer-copyright {
  font-size: 0.75rem;
  font-weight: 600;
  color: #9ca3af;
  letter-spacing: 0.3px;
}

/* Learn Modal */
.modal { 
  position: fixed; 
  inset: 0; 
  display: none; 
  z-index: 1000;
  animation: fadeIn 0.3s ease;
}
.modal[aria-hidden="false"] { display: flex; align-items: center; justify-content: center; }
.modal-backdrop { 
  position: absolute; 
  inset: 0; 
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(8px);
  cursor: pointer;
}
.modal-dialog { 
  position: relative; 
  margin: 24px;
  max-width: 900px; 
  width: 100%;
  max-height: calc(100vh - 48px);
  background: rgba(255,255,255,0.96); 
  color: #111827; 
  border-radius: 32px; 
  padding: 32px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.25), 
              0 8px 24px rgba(0,0,0,0.15),
              0 0 0 1px rgba(255,255,255,0.5) inset; 
  backdrop-filter: blur(40px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { 
    opacity: 0;
    transform: translateY(40px) scale(0.95); 
  }
  to { 
    opacity: 1;
    transform: translateY(0) scale(1); 
  }
}

.modal-header { 
  display: flex; 
  align-items: center; 
  justify-content: space-between; 
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 2px solid rgba(0,0,0,0.06);
  flex-shrink: 0;
}

.modal-header .icon-btn {
  background: rgba(0,0,0,0.04);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.modal-header .icon-btn:hover {
  background: rgba(0,0,0,0.08);
}

.learn-tabs { 
  display: flex; 
  gap: 10px; 
  flex: 1;
}

.learn-tab { 
  appearance: none;
  background: rgba(0,0,0,0.03); 
  color: #6b7280; 
  border: 2px solid transparent; 
  padding: 12px 24px; 
  border-radius: 999px; 
  cursor: pointer; 
  font-weight: 800;
  font-size: 1rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.learn-tab:hover:not(.active) {
  background: rgba(0,0,0,0.06);
  color: #374151;
  transform: translateY(-1px);
}

.learn-tab:focus-visible { 
  outline: 2px solid var(--primary); 
  outline-offset: 2px; 
}

.learn-tab.active { 
  background: var(--primary); 
  color: #ffffff; 
  border-color: var(--primary);
  box-shadow: 0 4px 16px rgba(0,0,0,0.12), 
              0 8px 24px rgba(0,0,0,0.08);
  transform: translateY(-1px);
}

html[data-theme="male"] .learn-tab.active { background: #3B82C4; }
html[data-theme="female"] .learn-tab.active { background: #E24275; }
html[data-theme="middle"] .learn-tab.active { background: #8b5cf6; }

.modal-body {
  overflow-y: auto;
  flex: 1;
  margin: 0 -8px;
  padding: 0 8px;
}

/* Custom scrollbar for modal */
.modal-body::-webkit-scrollbar {
  width: 8px;
}

.modal-body::-webkit-scrollbar-track {
  background: rgba(0,0,0,0.03);
  border-radius: 8px;
}

.modal-body::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.15);
  border-radius: 8px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
  background: rgba(0,0,0,0.25);
}

.learn-content { 
  background: transparent; 
  border: none; 
  border-radius: 0; 
  padding: 4px 0; 
  animation: fadeIn 0.3s ease;
}

.learn-content h1, .learn-content h2, .learn-content h3 { 
  margin: 2rem 0 0.875rem; 
  color: #0f172a; 
  font-weight: 900; 
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.learn-content h1:first-child,
.learn-content h2:first-child,
.learn-content h3:first-child { margin-top: 0; }

.learn-content h1 { font-size: 1.75rem; }
.learn-content h2 { 
  font-size: 1.5rem; 
  padding-bottom: 0.5rem;
  border-bottom: 2px solid rgba(0,0,0,0.06);
}
.learn-content h3 { 
  font-size: 1.25rem;
  color: #1e293b;
}

.learn-content p { 
  line-height: 1.75; 
  color: #475569; 
  font-size: 1.0625rem; 
  margin: 0.875rem 0;
  font-weight: 400;
}

.learn-content ul { 
  padding-left: 0; 
  margin: 1rem 0;
  list-style: none;
}

.learn-content li {
  margin: 0.625rem 0;
  padding-left: 1.75rem;
  color: #475569;
  line-height: 1.7;
  position: relative;
}

.learn-content li::before {
  content: "•";
  position: absolute;
  left: 0.5rem;
  color: var(--primary);
  font-weight: 900;
  font-size: 1.25rem;
}

.learn-content strong {
  font-weight: 900;
  color: #0f172a;
}

.learn-content em {
  font-style: italic;
  color: #334155;
}

.learn-content code {
  background: rgba(0,0,0,0.06);
  padding: 3px 8px;
  border-radius: 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.9em;
  color: #be123c;
  border: 1px solid rgba(0,0,0,0.08);
}

.learn-content a {
  color: var(--primary);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  transition: all 0.2s ease;
  font-weight: 600;
}

.learn-content a:hover {
  text-decoration-thickness: 3px;
  text-underline-offset: 2px;
}

/* Mobile modal adjustments */
@media (max-width: 600px) {
  .modal[aria-hidden="false"] { align-items: flex-end; }
  .modal-dialog { 
    margin: 0; 
    max-height: 92vh;
    border-radius: 32px 32px 0 0; 
    padding: 24px;
    animation: slideUpMobile 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  }
  
  @keyframes slideUpMobile {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
  }
  
  .modal-header {
    padding-bottom: 16px;
    margin-bottom: 20px;
  }
  
  .learn-tabs {
    gap: 8px;
  }
  
  .learn-tab {
    padding: 10px 16px;
    font-size: 0.9rem;
  }
  
  .learn-content h1 { font-size: 1.5rem; }
  .learn-content h2 { font-size: 1.3rem; }
  .learn-content h3 { font-size: 1.15rem; }
  .learn-content p { font-size: 1rem; }
}


