:root {
  --bg: #080808;
  --bg2: #0f0f0f;
  --bg3: #161616;
  --bg4: #1e1e1e;
  --border: #2a2a2a;
  --accent: #e8ff47;
  --accent2: #ff4757;
  --accent3: #00d4aa;
  --text: #f0f0f0;
  --muted: #666;
  --muted2: #444;
  --panel-shadow: 0 20px 50px rgba(0, 0, 0, 0.34);
  --soft-shadow: 0 10px 30px rgba(0, 0, 0, 0.24);
  --accent-glow: 0 0 0 1px rgba(232, 255, 71, 0.14), 0 18px 44px rgba(232, 255, 71, 0.08)
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box
}

.hi {
  width: 1em;
  height: 1em;
  min-width: 1em;
  min-height: 1em;
  display: inline-block;
  vertical-align: -0.14em;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.hi-sm {
  width: 0.95em;
  height: 0.95em;
}

.hi-md {
  width: 1.1em;
  height: 1.1em;
}

.hi-lg {
  width: 1.3em;
  height: 1.3em;
}

.sidebar-item .hi {
  margin-right: 8px;
}

html {
  scroll-behavior: auto;
  background: #060606
}

body {
  background: #060606;
  color: var(--text);
  font-family: 'DM Mono', monospace;
  min-height: 100vh;
  overflow-x: hidden
}

::-webkit-scrollbar {
  width: 4px
}

::-webkit-scrollbar-track {
  background: var(--bg)
}

::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 2px
}

nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 28px;
  background: #060606;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5)
}

.logo {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 1.3rem;
  letter-spacing: -0.02em;
  cursor: pointer
}

.logo span {
  color: var(--accent)
}

.nav-links {
  display: flex;
  gap: 6px;
  align-items: center
}

.nav-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 7px 13px;
  border-radius: 8px;
  cursor: pointer;
  font-family: 'DM Mono', monospace;
  font-size: 0.7rem;
  transition: all 0.15s;
  letter-spacing: 0.05em;
}

.nav-btn:hover,
.nav-btn.active {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(232, 255, 71, 0.05);
  transform: translateY(-1px);
}

.nav-btn:active {
  transform: scale(0.96);
}

.nav-btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #000;
  font-weight: 600;
}

.nav-btn.primary:hover {
  background: #d4eb00;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(232, 255, 71, 0.25);
}

.nav-btn.primary:active {
  transform: scale(0.96);
}

.hamburger {
  display: none;
  background: none;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 7px 10px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.15s;
}

.hamburger:hover {
  border-color: var(--accent);
  color: var(--accent);
}

#toast-container {
  position: fixed;
  top: 76px;
  right: 16px;
  z-index: 9998;
  display: flex;
  flex-direction: column;
  gap: 8px
}

.toast {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 11px 16px;
  font-size: 0.76rem;
  display: flex;
  align-items: center;
  gap: 9px;
  animation: slideIn 0.3s ease;
  min-width: 200px
}

.toast.success {
  border-color: var(--accent3)
}

.toast.error {
  border-color: var(--accent2)
}

.toast.info {
  border-color: var(--accent)
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(16px)
  }

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

@keyframes slideOut {
  from {
    opacity: 1
  }

  to {
    opacity: 0;
    transform: translateX(16px)
  }
}

.page {
  display: none;
  padding-top: 70px;
  min-height: 100vh
}

.page.active {
  animation: pageIn 0.3s ease
}

#landing {
  flex-direction: column
}

@keyframes pageIn {
  from {
    opacity: 0;
    transform: translateY(8px)
  }

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

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 900
}

.sidebar-overlay.active {
  display: block
}

.app-layout {
  display: flex;
  min-height: calc(100vh - 70px)
}

.sidebar {
  width: 215px;
  background: var(--bg2);
  border-right: 1px solid var(--border);
  padding: 18px 13px;
  flex-shrink: 0;
  position: sticky;
  top: 70px;
  height: calc(100vh - 70px);
  overflow-y: auto;
  transition: transform 0.3s ease;
  z-index: 950
}

.main-content {
  flex: 1;
  padding: 30px 34px;
  overflow-y: auto
}

.sidebar-section {
  font-size: 0.6rem;
  letter-spacing: 0.15em;
  color: #999;
  text-transform: uppercase;
  margin: 16px 0 5px
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 10px;
  border-radius: 7px;
  cursor: pointer;
  font-size: 0.76rem;
  color: #bcbcbc;
  transition: all 0.15s;
  border: 1px solid transparent;
  user-select: none
}

.sidebar-item:hover {
  background: var(--bg3);
  color: var(--text)
}

.sidebar-item.active {
  background: var(--bg3);
  color: var(--accent);
  border-color: var(--border)
}

.streak-widget {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 13px;
  margin-top: 14px;
  text-align: center
}

.streak-num {
  font-family: 'Syne', sans-serif;
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--accent)
}

.streak-label {
  font-size: 0.65rem;
  color: var(--muted);
  margin-top: 2px
}

.skeleton {
  background: linear-gradient(90deg, var(--bg3) 25%, var(--bg4) 50%, var(--bg3) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 6px
}

@keyframes shimmer {
  0% {
    background-position: 200% 0
  }

  100% {
    background-position: -200% 0
  }
}

.sk-line {
  height: 13px;
  margin-bottom: 10px
}

.sk-line.s {
  width: 35%
}

.sk-line.m {
  width: 65%
}

.sk-line.f {
  width: 100%
}

.sk-block {
  height: 80px;
  border-radius: 10px;
  margin-bottom: 12px
}

.loading-bar {
  width: 100%;
  height: 3px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden
}

.loading-fill {
  height: 100%;
  background: var(--accent);
  animation: loading 1.5s ease-in-out infinite
}

@keyframes loading {
  0% {
    width: 0%;
    margin-left: 0%
  }

  50% {
    width: 60%;
    margin-left: 20%
  }

  100% {
    width: 0%;
    margin-left: 100%
  }
}

.page-title {
  font-family: 'Syne', sans-serif;
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 5px
}

.page-sub {
  font-size: 0.76rem;
  color: var(--muted);
  margin-bottom: 26px
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 9px;
  margin-bottom: 22px
}

.stat-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  transition: border-color 0.2s, transform 0.15s, box-shadow 0.2s;
  box-shadow: var(--soft-shadow)
}

.stat-card:hover {
  border-color: var(--muted2)
}

.stat-label {
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 6px
}

.stat-value {
  font-family: 'Syne', sans-serif;
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.03em
}

.stat-value.green {
  color: var(--accent3)
}

.stat-value.yellow {
  color: var(--accent)
}

.stat-value.red {
  color: var(--accent2)
}

.cards-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
  margin-bottom: 18px
}

.card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  box-shadow: var(--soft-shadow)
}

.card-title {
  font-family: 'Syne', sans-serif;
  font-size: 0.83rem;
  font-weight: 700;
  margin-bottom: 13px;
  display: flex;
  align-items: center;
  justify-content: space-between
}

.badge {
  font-size: 0.6rem;
  background: rgba(30, 30, 30, 0.5);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(232, 255, 71, 0.25);
  padding: 2px 7px;
  border-radius: 6px;
  color: var(--accent);
  font-family: 'DM Mono', monospace;
  font-weight: 600
}

.module-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.74rem;
  gap: 8px
}

.module-item:last-child {
  border-bottom: none
}

.progress-bar {
  width: 65px;
  height: 4px;
  background: var(--bg4);
  border-radius: 2px;
  overflow: hidden;
  flex-shrink: 0
}

.progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 2px
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 7px
}

.qa-btn {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 11px;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s;
  font-family: 'DM Mono', monospace;
  position: relative;
  overflow: hidden;
}

.qa-btn::before {
  content: "";
  position: absolute;
  top: var(--y, 50%);
  left: var(--x, 50%);
  transform: translate(-50%, -50%);
  width: 200px;
  height: 200px;
  background: radial-gradient(circle closest-side, rgba(232, 255, 71, 0.15), transparent);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
  z-index: 0;
}

.qa-btn:hover::before {
  opacity: 1;
}

.qa-btn:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(232, 255, 71, 0.08);
}

.qa-icon {
  font-size: 1rem;
  margin-bottom: 4px;
  position: relative;
  z-index: 1;
}

.qa-label {
  font-size: 0.65rem;
  color: var(--muted);
  position: relative;
  z-index: 1;
}

.qa-title {
  font-size: 0.74rem;
  color: var(--text);
  margin-top: 1px;
  position: relative;
  z-index: 1;
}

.note-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 7px;
  cursor: pointer;
  transition: all 0.15s
}

.note-item:hover {
  border-color: var(--accent)
}

.note-item-title {
  font-size: 0.76rem
}

.note-item-meta {
  font-size: 0.65rem;
  color: var(--muted);
  margin-top: 1px
}

.note-item-actions {
  display: flex;
  gap: 5px
}

.icon-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 4px 8px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 0.68rem;
  transition: all 0.15s;
  font-family: 'DM Mono', monospace
}

.icon-btn:hover {
  border-color: var(--accent2);
  color: var(--accent2)
}

.icon-btn.load:hover {
  border-color: var(--accent3);
  color: var(--accent3)
}

.upload-zone {
  border: 2px dashed var(--border);
  border-radius: 12px;
  padding: 44px 28px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 14px;
  background: var(--bg2)
}

.upload-zone:hover,
.upload-zone.dragging {
  border-color: var(--accent);
  background: rgba(232, 255, 71, 0.02)
}

.upload-icon {
  font-size: 1.8rem;
  margin-bottom: 10px
}

.upload-title {
  font-family: 'Syne', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 5px
}

.upload-sub {
  font-size: 0.72rem;
  color: var(--muted)
}

.or-divider {
  text-align: center;
  color: var(--muted2);
  font-size: 0.7rem;
  margin: 12px 0;
  position: relative
}

.or-divider::before,
.or-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: calc(50% - 22px);
  height: 1px;
  background: var(--border)
}

.or-divider::before {
  left: 0
}

.or-divider::after {
  right: 0
}

textarea.paste-area {
  width: 100%;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 13px;
  color: var(--text);
  font-family: 'DM Mono', monospace;
  font-size: 0.78rem;
  resize: vertical;
  min-height: 130px;
  outline: none;
  transition: border-color 0.2s;
  line-height: 1.75
}

textarea.paste-area:focus {
  border-color: var(--accent)
}

.gen-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 14px 0
}

.gen-select {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 13px;
  color: var(--text);
  font-family: 'DM Mono', monospace;
  font-size: 0.76rem;
  outline: none;
  cursor: pointer;
  transition: border-color 0.2s;
  width: 100%
}

.gen-select:focus {
  border-color: var(--accent)
}

.gen-select option {
  background: var(--bg3)
}

.gen-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 7px;
  margin: 12px 0
}

.gen-option {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 11px 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.76rem;
  transition: all 0.15s;
  font-family: 'DM Mono', monospace;
  color: var(--muted);
  user-select: none
}

.gen-option:hover,
.gen-option.selected {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(232, 255, 71, 0.03)
}

.generate-btn {
  width: 100%;
  padding: 15px;
  background: var(--accent);
  border: none;
  border-radius: 10px;
  color: #000;
  font-family: 'Syne', sans-serif;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: -0.01em;
  margin-top: 5px
}

.generate-btn:hover:not(:disabled) {
  background: #d4eb00;
  transform: translateY(-1px)
}

.generate-btn:disabled {
  background: var(--muted2);
  color: var(--muted);
  cursor: not-allowed
}

.output-section {
  margin-top: 26px;
  display: none
}

.output-section.visible {
  display: block;
  animation: pageIn 0.3s ease
}

.output-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 8px
}

.output-tabs {
  display: flex;
  gap: 3px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 3px
}

.output-tab {
  flex: 1;
  padding: 8px 13px;
  border: none;
  background: none;
  color: var(--muted);
  font-family: 'DM Mono', monospace;
  font-size: 0.7rem;
  cursor: pointer;
  border-radius: 7px;
  transition: all 0.15s;
  letter-spacing: 0.05em;
  white-space: nowrap
}

.output-tab.active {
  background: var(--bg4);
  color: var(--accent);
  border: 1px solid var(--border)
}

.output-actions {
  display: flex;
  gap: 5px
}

.tab-content {
  display: none;
  overflow-y: auto
}

.tab-content.active {
  display: block;
  animation: pageIn 0.25s ease;
  overflow-y: auto
}

.summary-box {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 22px;
  font-size: 0.78rem;
  line-height: 1.85;
  color: var(--text);
  white-space: normal;
  word-break: break-word;
}

.fc-session-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  font-size: 0.72rem;
  color: var(--muted)
}

.fc-score {
  display: flex;
  gap: 12px
}

.know-count {
  color: var(--accent3)
}

.miss-count {
  color: var(--accent2)
}

.flashcard-container {
  perspective: 1000px;
  max-width: 460px;
  margin: 0 auto 18px
}

.flashcard {
  width: 100%;
  height: 210px;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer
}

.flashcard.flipped {
  transform: rotateY(180deg)
}

.card-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 26px;
  text-align: center;
  border: 1px solid var(--border)
}

.card-front {
  background: var(--bg2)
}

.card-back {
  background: var(--bg3);
  transform: rotateY(180deg);
  border-color: var(--accent)
}

.card-label {
  font-size: 0.6rem;
  letter-spacing: 0.15em;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 12px
}

.card-text {
  font-family: 'Syne', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: -0.02em
}

.card-hint {
  font-size: 0.62rem;
  color: var(--muted2);
  margin-top: 12px
}

.fc-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin-bottom: 12px;
  flex-wrap: wrap
}

.fc-btn {
  background: var(--bg2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-family: 'DM Mono', monospace;
  font-size: 0.74rem;
  transition: all 0.15s
}

.fc-btn:hover {
  border-color: var(--muted)
}

.fc-btn.know {
  border-color: var(--accent3);
  color: var(--accent3)
}

.fc-btn.know:hover {
  background: rgba(0, 212, 170, 0.07)
}

.fc-btn.dontknow {
  border-color: var(--accent2);
  color: var(--accent2)
}

.fc-btn.dontknow:hover {
  background: rgba(255, 71, 87, 0.07)
}

.fc-counter {
  font-size: 0.7rem;
  color: var(--muted)
}

.fc-complete {
  text-align: center;
  padding: 38px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px
}

.fc-complete .big {
  font-family: 'Syne', sans-serif;
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--accent)
}

.fc-complete p {
  font-size: 0.78rem;
  color: var(--muted);
  margin: 7px 0 18px
}

.quiz-question {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 22px;
  margin-bottom: 12px;
  animation: pageIn 0.3s ease
}

.q-num {
  font-size: 0.6rem;
  letter-spacing: 0.15em;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 9px
}

.q-text {
  font-family: 'Syne', sans-serif;
  font-size: 0.92rem;
  font-weight: 700;
  margin-bottom: 16px;
  line-height: 1.4;
  letter-spacing: -0.02em
}

.q-options {
  display: flex;
  flex-direction: column;
  gap: 6px
}

.q-option {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 11px 13px;
  cursor: pointer;
  font-size: 0.76rem;
  transition: all 0.15s;
  text-align: left;
  font-family: 'DM Mono', monospace;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 9px
}

.q-option:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent)
}

.q-option.correct {
  border-color: var(--accent3);
  background: rgba(0, 212, 170, 0.07);
  color: var(--accent3)
}

.q-option.wrong {
  border-color: var(--accent2);
  background: rgba(255, 71, 87, 0.07);
  color: var(--accent2)
}

.opt-letter {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  background: var(--bg4);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  flex-shrink: 0
}

.quiz-score {
  text-align: center;
  padding: 32px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-top: 14px;
  animation: pageIn 0.3s ease
}

.score-big {
  font-family: 'Syne', sans-serif;
  font-size: 2.8rem;
  font-weight: 800
}

.quiz-score p {
  font-size: 0.78rem;
  color: var(--muted);
  margin: 7px 0 18px
}

.country-btn {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px 12px;
  cursor: pointer;
  font-size: 0.72rem;
  color: var(--muted);
  transition: all 0.15s;
  text-align: center;
  font-family: 'DM Mono', monospace;
  user-select: none
}

.country-btn:hover {
  border-color: var(--accent);
  color: var(--text)
}

.country-btn.active {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(232, 255, 71, 0.04)
}

.grade-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-bottom: 14px
}

.grade-input-group {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px
}

.grade-label {
  font-size: 0.65rem;
  color: var(--muted);
  letter-spacing: 0.08em;
  margin-bottom: 7px
}

.grade-input {
  width: 100%;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 9px;
  color: var(--text);
  font-family: 'DM Mono', monospace;
  font-size: 0.85rem;
  outline: none;
  transition: border-color 0.2s
}

.grade-input:focus {
  border-color: var(--accent)
}

.grade-result {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 22px;
  text-align: center;
  margin-top: 12px;
  animation: pageIn 0.3s ease
}

.result-num {
  font-family: 'Syne', sans-serif;
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--accent)
}

.result-label {
  font-size: 0.76rem;
  color: var(--muted);
  margin-top: 5px
}

.hero {
  padding: 96px 38px 74px;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
  position: relative
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg3);
  border: 1px solid var(--border);
  padding: 5px 13px;
  border-radius: 100px;
  font-size: 0.66rem;
  color: var(--muted);
  margin-bottom: 34px;
  letter-spacing: 0.1em
}

.hero-badge .dot {
  width: 6px;
  height: 6px;
  background: var(--accent3);
  border-radius: 50%;
  animation: pulse 2s infinite
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
    transform: scale(1)
  }

  50% {
    opacity: 0.5;
    transform: scale(0.8)
  }
}

.hero h1 {
  font-family: 'Syne', sans-serif;
  font-size: clamp(2.6rem, 8vw, 6rem);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.04em;
  margin-bottom: 26px
}

.hero h1 .line2 {
  color: var(--accent)
}

.hero h1 .line3 {
  color: var(--muted2)
}

.hero-sub {
  font-size: 0.86rem;
  color: var(--muted);
  max-width: 450px;
  line-height: 1.75;
  margin-bottom: 40px
}

.hero-actions {
  display: flex;
  gap: 9px;
  flex-wrap: wrap
}

.btn-xl {
  padding: 13px 26px;
  border-radius: 8px;
  font-family: 'DM Mono', monospace;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 0.05em;
  font-weight: 500;
  border: none
}

.btn-xl.accent {
  background: var(--accent);
  color: #000
}

.btn-xl.accent:hover {
  background: #d4eb00;
  transform: translateY(-1px)
}

.btn-xl.ghost {
  background: none;
  border: 1px solid var(--border);
  color: var(--muted)
}

.btn-xl.ghost:hover {
  border-color: var(--text);
  color: var(--text)
}

.section-label {
  font-size: 0.66rem;
  letter-spacing: 0.2em;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 36px;
  display: flex;
  align-items: center;
  gap: 11px
}

.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border)
}

.features {
  padding: 68px 38px;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden
}

@media(max-width:900px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr)
  }
}

@media(max-width:500px) {
  .features-grid {
    grid-template-columns: 1fr
  }
}

.feature-card {
  background: var(--bg2);
  padding: 30px;
  transition: background-color 0.2s, box-shadow 0.2s;
  box-shadow: var(--soft-shadow)
}

.feature-card:hover {
  background: var(--bg3)
}

.feature-icon {
  font-size: 1.3rem;
  margin-bottom: 13px;
  color: var(--accent)
}

.feature-card h3 {
  font-family: 'Syne', sans-serif;
  font-size: 0.92rem;
  font-weight: 700;
  margin-bottom: 8px
}

.feature-card p {
  font-size: 0.74rem;
  color: var(--muted);
  line-height: 1.7
}

.pricing {
  padding: 68px 38px;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 13px;
  margin-top: 14px
}

.price-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 30px;
  position: relative;
  transition: border-color 0.2s, transform 0.15s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
  box-shadow: var(--soft-shadow)
}

.price-card:hover {
  border-color: var(--muted2);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25)
}

.price-card.popular {
  border-color: var(--accent);
  background: #0a0c0e
}

.price-card.popular:hover {
  border-color: var(--accent);
  box-shadow: 0 8px 40px rgba(232, 255, 71, 0.12)
}

.popular-badge {
  position: absolute;
  top: -11px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: #000;
  font-size: 0.58rem;
  font-weight: 800;
  padding: 3px 13px;
  border-radius: 100px;
  letter-spacing: 0.12em;
  white-space: nowrap;
  font-family: 'Syne', sans-serif
}

.price-tier {
  font-family: 'Syne', sans-serif;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px
}

.price-amount {
  font-family: 'Syne', sans-serif;
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--text);
  margin-bottom: 6px;
  line-height: 1
}

.price-amount span {
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 400;
  letter-spacing: 0
}

.price-desc {
  font-size: 0.72rem;
  color: var(--muted);
  margin-bottom: 18px;
  line-height: 1.6
}

.price-features {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1
}

.price-features li {
  font-size: 0.73rem;
  color: var(--muted);
  display: flex;
  align-items: flex-start;
  gap: 6px;
  line-height: 1.5
}

.price-btn {
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.15s;
  margin-top: auto
}

.price-btn.filled {
  background: var(--accent);
  border: none;
  color: #000
}

.price-btn.filled:hover {
  background: #d4eb00;
  transform: translateY(-1px)
}

.price-btn.outline {
  background: none;
  border: 1px solid var(--border);
  color: var(--muted)
}

.price-btn.outline:hover {
  border-color: var(--text);
  color: var(--text)
}

.price-tier {
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 16px
}

.price-amount {
  font-family: 'Syne', sans-serif;
  font-size: 2.6rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  margin-bottom: 3px
}

.price-amount span {
  font-size: 0.88rem;
  color: var(--muted);
  font-weight: 400
}

.price-desc {
  font-size: 0.71rem;
  color: var(--muted);
  margin-bottom: 22px;
  line-height: 1.5
}

.price-features {
  list-style: none;
  margin-bottom: 22px
}

.price-features li {
  font-size: 0.72rem;
  color: var(--muted);
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 7px
}

.price-features li .hi {
  color: var(--accent3);
  flex-shrink: 0
}

.price-btn {
  width: 100%;
  padding: 12px;
  border-radius: 8px;
  font-family: 'DM Mono', monospace;
  font-size: 0.76rem;
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 0.05em
}

.price-btn.outline {
  background: none;
  border: 1px solid var(--border);
  color: var(--muted)
}

.price-btn.outline:hover {
  border-color: var(--text);
  color: var(--text)
}

.price-btn.filled {
  background: var(--accent);
  border: none;
  color: #000;
  font-weight: 500
}

.price-btn.filled:hover {
  background: #d4eb00
}

.site-footer {
  margin-top: 68px;
  border-top: 1px solid var(--border);
  background: var(--bg2);
  padding: 44px 38px 28px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
}

.footer-grid--5 {
  grid-template-columns: 1.6fr repeat(4, 1fr);
  gap: 28px 22px;
}

.footer-block h3 {
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
  font-family: 'DM Mono', monospace;
}

.footer-brand {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 1.2rem;
  margin-bottom: 12px;
}

.footer-brand span {
  color: var(--accent);
}

.footer-text {
  font-size: 0.72rem;
  line-height: 1.8;
  color: var(--muted);
  margin-bottom: 6px;
}

.footer-block a {
  display: block;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.72rem;
  margin-bottom: 9px;
  transition: color 0.15s;
  line-height: 1.5;
}

.footer-block a:hover {
  color: var(--accent);
}

/* Social links */
.footer-socials {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}

.footer-social-link {
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid var(--border);
  color: var(--muted);
  transition: border-color 0.15s, color 0.15s;
  margin-bottom: 0 !important;
}

.footer-social-link:hover {
  border-color: var(--accent) !important;
  color: var(--accent) !important;
}

.footer-social-link .hi {
  width: 0.9em;
  height: 0.9em;
}

/* Email links with icons */
.footer-email-link {
  display: flex !important;
  align-items: center;
  gap: 7px;
  padding: 7px 0;
  color: var(--muted) !important;
  font-size: 0.7rem !important;
}

.footer-email-link .hi {
  color: var(--accent3);
  flex-shrink: 0;
}

.footer-email-link:hover {
  color: var(--accent3) !important;
}

/* Bottom bar */
.footer-bottom {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 0.65rem;
  color: var(--muted2);
}

.footer-bottom a {
  color: var(--muted2);
  text-decoration: none;
  transition: color 0.15s;
}

.footer-bottom a:hover {
  color: var(--accent);
}

.footer-sep {
  color: var(--border);
  margin: 0 2px;
}

.footer-bottom-left,
.footer-bottom-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Status dot */
.footer-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.63rem;
  color: var(--accent3);
}

.footer-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent3);
  box-shadow: 0 0 6px rgba(0, 212, 170, 0.4);
}

/* Responsive */
@media(max-width:1024px) {
  .footer-grid--5 {
    grid-template-columns: 1fr 1fr 1fr;
  }

  .footer-block--brand {
    grid-column: 1 / -1;
  }
}

@media(max-width:640px) {
  .site-footer {
    padding: 28px 18px 22px;
  }

  .footer-grid--5 {
    grid-template-columns: 1fr 1fr;
    gap: 20px 16px;
  }

  .footer-block--brand {
    grid-column: 1 / -1;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .footer-bottom-right {
    flex-wrap: wrap;
  }
}

@media(max-width:768px) {
  nav {
    padding: 13px 18px
  }

  .nav-links {
    gap: 8px
  }

  .nav-btn.primary {
    padding: 7px 11px
  }

  .hamburger {
    padding: 7px 9px
  }

  .nav-links .nav-btn:not(.primary):not(.hamburger) {
    display: none
  }

  .hamburger {
    display: block
  }

  .sidebar {
    position: fixed;
    left: 0;
    top: 70px;
    height: calc(100vh - 70px);
    z-index: 950;
    transform: translateX(-100%)
  }

  .sidebar.open {
    transform: translateX(0)
  }

  .main-content {
    padding: 18px 16px 24px
  }

  .cards-row,
  .grade-grid,
  .gen-row {
    grid-template-columns: 1fr
  }

  .hero {
    padding: 50px 18px 44px
  }

  .features,
  .pricing {
    padding: 44px 18px
  }

  .output-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    mask-image: linear-gradient(to right, black 85%, transparent 100%);
    -webkit-mask-image: -webkit-linear-gradient(left, black 85%, transparent 100%);
    padding-right: 15px;
  }

  .stats-row {
    display: flex;
    overflow-x: auto;
    mask-image: linear-gradient(to right, black 85%, transparent 100%);
    -webkit-mask-image: -webkit-linear-gradient(left, black 85%, transparent 100%);
    padding-right: 15px;
    snap-type: x mandatory;
  }

  .stat-card {
    min-width: 140px;
    scroll-snap-align: start;
  }

  .sidebar-toggle-btn {
    display: flex !important
  }
}

@keyframes fade-slide-up {
  from {
    opacity: 0;
    transform: translateY(15px);
  }

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

.note-item.animate-in {
  animation: fade-slide-up 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  opacity: 0;
}

.note-item-hover-actions {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%) translateX(10px);
  opacity: 0;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex;
  gap: 5px;
}

.note-item:hover .note-item-hover-actions {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

.note-item {
  position: relative;
  overflow: hidden;
}

.sidebar-toggle-btn {
  display: none;
  align-items: center;
  gap: 7px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 13px;
  font-family: 'DM Mono', monospace;
  font-size: 0.72rem;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s;
  position: fixed;
  top: 78px;
  right: 12px;
  z-index: 140
}

.sidebar-toggle-btn:hover {
  border-color: var(--accent);
  color: var(--accent)
}

.pomo-widget {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px;
  margin-top: 14px;
  text-align: center
}

.pomo-ring {
  position: relative;
  width: 90px;
  height: 90px;
  margin: 0 auto 10px
}

.pomo-ring svg {
  transform: rotate(-90deg)
}

.pomo-ring circle {
  fill: none;
  stroke-width: 5
}

.pomo-ring .track {
  stroke: var(--border)
}

.pomo-ring .progress {
  stroke: var(--accent);
  stroke-linecap: round;
  transition: stroke-dashoffset 1s linear
}

.pomo-ring.break .progress {
  stroke: var(--accent3)
}

.pomo-time {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'Syne', sans-serif;
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: -0.02em
}

.pomo-label {
  font-size: 0.6rem;
  letter-spacing: 0.15em;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 8px
}

.pomo-controls {
  display: flex;
  gap: 6px;
  justify-content: center
}

.pomo-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 5px 11px;
  border-radius: 6px;
  cursor: pointer;
  font-family: 'DM Mono', monospace;
  font-size: 0.68rem;
  transition: all 0.15s
}

.pomo-btn:hover {
  border-color: var(--accent);
  color: var(--accent)
}

.pomo-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #000
}

.exam-widget {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 14px
}

.exam-widget-title {
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between
}

.exam-add-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 3px 8px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 0.65rem;
  font-family: 'DM Mono', monospace;
  transition: all 0.15s
}

.exam-add-btn:hover {
  border-color: var(--accent);
  color: var(--accent)
}

.exam-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  background: var(--bg4);
  border-radius: 8px;
  margin-bottom: 6px;
  border: 1px solid var(--border)
}

.exam-name {
  font-size: 0.76rem
}

.exam-days {
  font-family: 'Syne', sans-serif;
  font-size: 1rem;
  font-weight: 800
}

.exam-days.urgent {
  color: var(--accent2)
}

.exam-days.soon {
  color: var(--accent)
}

.exam-days.ok {
  color: var(--accent3)
}

.exam-days-label {
  font-size: 0.6rem;
  color: var(--muted)
}

.exam-form {
  background: var(--bg4);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  margin-top: 8px;
  display: none
}

.exam-form.open {
  display: block
}

.exam-form input {
  width: 100%;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px;
  color: var(--text);
  font-family: 'DM Mono', monospace;
  font-size: 0.76rem;
  outline: none;
  margin-bottom: 7px;
  transition: border-color 0.2s
}

.exam-form input:focus {
  border-color: var(--accent)
}

.exam-form-btns {
  display: flex;
  gap: 6px
}

.exam-form-btns button {
  flex: 1;
  padding: 8px;
  border-radius: 6px;
  font-family: 'DM Mono', monospace;
  font-size: 0.72rem;
  cursor: pointer;
  transition: all 0.15s
}

.exam-save {
  background: var(--accent);
  border: none;
  color: #000;
  font-weight: 500
}

.exam-save:hover {
  background: #d4eb00
}

.exam-cancel {
  background: none;
  border: 1px solid var(--border);
  color: var(--muted)
}

.exam-cancel:hover {
  border-color: var(--accent2);
  color: var(--accent2)
}

.referral-card {
  background: linear-gradient(135deg, rgba(232, 255, 71, 0.06), rgba(0, 212, 170, 0.04));
  border: 1px solid var(--accent);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 14px
}

.referral-title {
  font-family: 'Syne', sans-serif;
  font-size: 0.92rem;
  font-weight: 800;
  margin-bottom: 4px
}

.referral-sub {
  font-size: 0.72rem;
  color: var(--muted);
  margin-bottom: 14px
}

.referral-link-box {
  display: flex;
  gap: 6px;
  align-items: center
}

.referral-link {
  flex: 1;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 9px 11px;
  font-size: 0.72rem;
  color: var(--muted);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-family: 'DM Mono', monospace
}

.referral-copy {
  background: var(--accent);
  border: none;
  color: #000;
  padding: 9px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-family: 'DM Mono', monospace;
  font-size: 0.72rem;
  font-weight: 500;
  white-space: nowrap;
  transition: all 0.15s
}

.referral-copy:hover {
  background: #d4eb00
}

.referral-stats {
  display: flex;
  gap: 16px;
  margin-top: 12px
}

.referral-stat {
  font-size: 0.7rem;
  color: var(--muted)
}

.referral-stat span {
  color: var(--accent);
  font-weight: 700
}

.share-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 4px 9px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 0.68rem;
  transition: all 0.15s;
  font-family: 'DM Mono', monospace
}

.share-btn:hover {
  border-color: var(--accent3);
  color: var(--accent3)
}

.share-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: 300;
  align-items: center;
  justify-content: center;
  padding: 20px
}

.share-modal.open {
  display: flex
}

.share-box {
  background: #0e0e0e;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 28px;
  max-width: 440px;
  width: 100%;
  box-shadow: var(--panel-shadow)
}

.share-box-title {
  font-family: 'Syne', sans-serif;
  font-size: 1.1rem;
  font-weight: 800;
  margin-bottom: 6px
}

.share-box-sub {
  font-size: 0.74rem;
  color: var(--muted);
  margin-bottom: 18px
}

.share-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 16px
}

.share-option {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 14px;
  cursor: pointer;
  text-align: center;
  transition: all 0.15s
}

.share-option:hover {
  border-color: var(--accent);
  transform: translateY(-1px)
}

.share-option .s-icon {
  font-size: 1.4rem;
  margin-bottom: 5px
}

.share-option .s-label {
  font-size: 0.72rem;
  color: var(--muted)
}

.share-close {
  width: 100%;
  padding: 11px;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--muted);
  font-family: 'DM Mono', monospace;
  font-size: 0.78rem;
  cursor: pointer;
  transition: all 0.15s
}

.share-close:hover {
  border-color: var(--accent2);
  color: var(--accent2)
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0)
}

.count-up {
  display: inline-block
}

.stats-bar {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 20px 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 48px;
  flex-wrap: wrap
}

.stats-bar-item {
  text-align: center
}

.stats-bar-num {
  font-family: 'Syne', sans-serif;
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--accent)
}

.stats-bar-label {
  font-size: 0.66rem;
  color: var(--muted);
  letter-spacing: 0.08em;
  margin-top: 2px
}

.scroll-cta {
  text-align: center;
  padding: 70px 38px;
  background: transparent
}

.scroll-cta h2 {
  font-family: 'Syne', sans-serif;
  font-size: clamp(1.8rem, 5vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  margin-bottom: 14px
}

.scroll-cta h2 span {
  color: var(--accent)
}

.hero-feature-card:hover {
  border-color: var(--muted2);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3)
}

@media(max-width:768px) {
  .hero-features {
    grid-template-columns: 1fr !important
  }
}

.scroll-cta p {
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 28px
}

#gmm {
  display: none;
  position: fixed;
  top: 70px;
  left: 0;
  right: 0;
  background: #0a0a0a;
  border-bottom: 1px solid var(--border);
  z-index: 950;
  padding: 10px 14px 14px;
  flex-direction: column;
  gap: 4px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
}

#gmm.open {
  display: flex;
  animation: gmmIn 0.18s cubic-bezier(0.34, 1.3, 0.64, 1);
}

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

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

.gmm-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 13px 14px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 0.82rem;
  color: var(--muted);
  transition: all 0.12s;
  border: 1px solid transparent;
  font-family: "DM Mono", monospace;
  user-select: none;
}

.gmm-item:hover {
  background: var(--bg3);
  color: var(--text);
  border-color: var(--border);
  transform: translateX(2px);
}

.gmm-item:active {
  transform: scale(0.98) translateX(2px);
}

.gmm-item.go {
  background: var(--accent);
  color: #000;
  font-weight: 600;
  margin-top: 6px;
  border-radius: 10px;
  justify-content: center;
}

.gmm-item.go:hover {
  background: #d4eb00;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(232, 255, 71, 0.3);
}

.gmm-item.go:active {
  transform: scale(0.98);
}

#gmm {
  max-height: calc(100vh - 70px);
  overflow-y: auto;
}

#fileInput {
  display: none
}

.tutor-msg {
  display: flex;
  gap: 10px;
  align-items: flex-start
}

.tutor-msg.user {
  flex-direction: row-reverse
}

.tutor-avatar {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--bg3);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  flex-shrink: 0
}

.tutor-msg.user .tutor-avatar {
  background: var(--accent);
  border-color: var(--accent)
}

.tutor-bubble {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 13px 16px;
  font-size: 0.78rem;
  line-height: 1.75;
  max-width: 80%;
  white-space: normal;
  word-break: break-word;
}

.tutor-msg.user .tutor-bubble {
  background: var(--bg3);
  border-color: var(--accent);
  text-align: left
}

.tutor-typing {
  display: flex;
  gap: 4px;
  align-items: center;
  padding: 8px 0
}

.tutor-typing span {
  width: 6px;
  height: 6px;
  background: var(--muted);
  border-radius: 50%;
  animation: typing 1.2s infinite
}

.tutor-typing span:nth-child(2) {
  animation-delay: 0.2s
}

.tutor-typing span:nth-child(3) {
  animation-delay: 0.4s
}

@keyframes typing {

  0%,
  60%,
  100% {
    transform: translateY(0)
  }

  30% {
    transform: translateY(-5px)
  }
}

/* ── AI Tutor ──────────────────────────────────────────── */
.tutor-chip {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 5px 12px;
  color: var(--muted);
  font-family: 'DM Mono', monospace;
  font-size: 0.68rem;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.tutor-chip.locked {
  border-color: rgba(255, 255, 255, 0.15);
}

.tutor-chip-badge {
  margin-left: 7px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.56rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent2);
  opacity: 0.95;
}

.tutor-chip-lock {
  width: 10px;
  height: 10px;
  stroke: currentColor;
  stroke-width: 1.8;
}

.tutor-chip:hover {
  border-color: var(--accent3);
  color: var(--accent3);
  background: rgba(0, 212, 170, 0.05);
}

#tutorMessages {
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

/* Tutor mode active state */
.tutor-mode.active {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(232, 255, 71, 0.06);
}

/* ── Exam Mode ─────────────────────────────────────────── */
.exam-result-box {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 22px;
  font-size: 0.78rem;
  line-height: 1.85;
  color: var(--text);
}

.exam-result-box strong {
  color: var(--text);
}

.exam-result-box br {
  display: block;
  margin-bottom: 2px;
}

.exam-output-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  flex-wrap: wrap;
  gap: 8px;
}

.exam-output-title {
  font-family: 'Syne', sans-serif;
  font-size: 1rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
}

.exam-output-actions {
  display: flex;
  gap: 5px;
}

.exam-action-btns {
  display: none;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 18px;
}

.exam-action-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 16px;
  border-radius: 9px;
  cursor: pointer;
  font-family: 'DM Mono', monospace;
  font-size: 0.73rem;
  font-weight: 600;
  transition: all 0.18s;
  border-width: 1px;
  border-style: solid;
  flex: 1;
  min-width: 200px;
  justify-content: center;
}

.exam-action-btn.yellow {
  background: rgba(232, 255, 71, 0.07);
  border-color: var(--accent);
  color: var(--accent);
}

.exam-action-btn.yellow:hover {
  background: rgba(232, 255, 71, 0.15);
}

.exam-action-btn.green {
  background: rgba(0, 212, 170, 0.07);
  border-color: var(--accent3);
  color: var(--accent3);
}

.exam-action-btn.green:hover {
  background: rgba(0, 212, 170, 0.15);
}

.exam-action-btn.red {
  background: rgba(255, 71, 87, 0.07);
  border-color: var(--accent2);
  color: var(--accent2);
}

.exam-action-btn.red:hover {
  background: rgba(255, 71, 87, 0.15);
}

.exam-char-counter {
  text-align: right;
  font-size: 0.65rem;
  color: var(--muted);
  margin-top: 4px;
  margin-bottom: 10px;
}

@media(max-width: 768px) {
  .exam-action-btn {
    min-width: 100%;
    flex: unset;
    width: 100%;
  }
}

/* ── Advanced Controls Panel ───────────────────────────── */
.adv-panel {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  margin: 10px 0 12px;
  transition: all 0.2s;
}

.adv-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  background: none;
  border: none;
  color: var(--muted);
  font-family: 'DM Mono', monospace;
  font-size: 0.72rem;
  padding: 9px 14px;
  cursor: pointer;
  text-align: left;
  transition: color 0.15s;
}

.adv-toggle:hover {
  color: var(--accent);
}

.adv-toggle .adv-arrow {
  margin-left: auto;
  transition: transform 0.2s;
  font-size: 0.6rem;
}

.adv-toggle.open .adv-arrow {
  transform: rotate(180deg);
}

.adv-toggle.open {
  color: var(--accent);
  border-bottom: 1px solid var(--border);
}

.adv-body {
  display: none;
  padding: 14px;
  gap: 10px;
  flex-wrap: wrap;
}

.adv-body.open {
  display: flex;
}

.adv-ctrl {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
  min-width: 130px;
}

.adv-label {
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  color: var(--muted2);
  text-transform: uppercase;
}

.adv-chips {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.adv-chip {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 5px 10px;
  font-family: 'DM Mono', monospace;
  font-size: 0.7rem;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.adv-chip:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.adv-chip.active {
  background: rgba(232, 255, 71, 0.08);
  border-color: var(--accent);
  color: var(--accent);
}

/* ── Output selector cards ─────────────────────────────────── */
.output-cards {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 12px 0;
}

.output-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.2s;
  box-shadow: var(--soft-shadow);
}

.output-card.selected {
  border-color: var(--accent);
  box-shadow: var(--accent-glow);
  transform: translateY(-1px);
}

.output-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s;
}

.output-card-header:hover {
  background: var(--bg3);
}

.output-card-check {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.15s;
  font-size: 0.7rem;
}

.output-card.selected .output-card-check {
  background: var(--accent);
  border-color: var(--accent);
  color: #000;
}

.output-card-label {
  font-family: 'DM Mono', monospace;
  font-size: 0.76rem;
  color: var(--muted);
  flex: 1;
  transition: color 0.15s;
}

.output-card.selected .output-card-label {
  color: var(--text);
}

.output-card-qty {
  font-size: 0.62rem;
  color: var(--accent3);
  font-family: 'DM Mono', monospace;
  background: rgba(0, 212, 170, 0.08);
  border: 1px solid rgba(0, 212, 170, 0.2);
  border-radius: 100px;
  padding: 2px 8px;
  opacity: 0;
  transition: opacity 0.15s;
  pointer-events: none;
  white-space: nowrap;
}

.output-card.selected .output-card-qty {
  opacity: 1;
}

.output-card-body {
  display: none;
  padding: 0 14px 12px;
  border-top: 1px solid var(--border);
}

.output-card.selected .output-card-body {
  display: block;
}

.output-card-body .adv-chips {
  margin-top: 8px;
}

.balance-msg {
  font-size: 0.68rem;
  color: var(--accent);
  background: rgba(232, 255, 71, 0.05);
  border: 1px solid rgba(232, 255, 71, 0.15);
  border-radius: 7px;
  padding: 7px 11px;
  margin: 8px 0 2px;
  display: none;
}

/* Dim exam advanced ctrl when not applicable */
.adv-ctrl.dimmed {
  opacity: 0.35;
  pointer-events: none;
}

.adv-ctrl.dimmed .adv-label::after {
  content: ' — not used for this output type';
  color: var(--muted2);
  font-size: 0.6rem;
}

/* ═══════════════════════════════════════════════════════════
   UI POLISH — Additions & Refinements
   ═══════════════════════════════════════════════════════════ */

/* ── Generate button glow on hover ──────────────────────── */
.generate-btn:hover:not(:disabled) {
  box-shadow: 0 0 24px rgba(232, 255, 71, 0.25);
}

/* ── Nav — hide redundant Home/Generate on desktop when active ── */
nav {
  gap: 0;
}

.nav-btn {
  white-space: nowrap;
}

/* ── Stats row improvements ────────────────────────────── */
.stat-card {
  transition: border-color 0.2s, transform 0.15s;
}

.stat-card:hover {
  transform: translateY(-1px);
}

/* ── Summary box prose formatting ─────────────────────── */
.summary-box {
  white-space: normal;
}

.summary-box h1,
.summary-box h2,
.summary-box h3 {
  margin-top: 0;
}

/* ── Output tabs — scrollable on mobile ──────────────── */
.output-tabs {
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.output-tabs::-webkit-scrollbar {
  display: none;
}

/* ── Feature cards hover glow ───────────────────────── */
.feature-card {
  transition: background 0.2s, box-shadow 0.2s;
}

.feature-card:hover {
  box-shadow: inset 0 0 0 1px var(--border);
}

/* ── Sidebar item hover — more obvious ──────────────── */
.sidebar-item {
  transition: all 0.12s;
}

.sidebar-item:hover {
  border-color: var(--border);
  padding-left: 13px;
}

.sidebar-item.active {
  padding-left: 13px;
}

/* ── Upload zone — cleaner feedback ─────────────────── */
.upload-zone {
  transition: border-color 0.2s, background 0.2s, transform 0.15s;
}

.upload-zone:hover {
  transform: translateY(-1px);
}

/* ── Grade calculator improvements ──────────────────── */
.grade-input-group {
  transition: border-color 0.2s;
}

.grade-input-group:focus-within {
  border-color: var(--accent);
}

/* ── Toast — max width for readability ──────────────── */
.toast {
  max-width: 320px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

/* ── Flashcard — subtle glow on flip ────────────────── */
.card-back {
  box-shadow: 0 0 0 1px var(--accent), inset 0 0 40px rgba(232, 255, 71, 0.03);
}

/* ── Quiz option — letter badge improvement ─────────── */
.opt-letter {
  color: var(--muted);
  font-weight: 700;
  font-size: 0.62rem;
}

.q-option.correct .opt-letter {
  background: rgba(0, 212, 170, 0.2);
  border-color: var(--accent3);
  color: var(--accent3);
}

.q-option.wrong .opt-letter {
  background: rgba(255, 71, 87, 0.2);
  border-color: var(--accent2);
  color: var(--accent2);
}

/* ── Paywall modal ──────────────────────────────────── */
#paywallModal input {
  transition: border-color 0.2s;
}

#paywallModal input:focus {
  outline: none;
  border-color: var(--accent) !important;
}

/* ── Landing hero — subtle entrance ─────────────────── */
#landing .hero h1 {
  animation: heroSlide 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes heroSlide {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

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

.hero-badge {
  animation: heroSlide 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.hero-sub {
  animation: heroSlide 0.65s 0.1s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.hero-actions {
  animation: heroSlide 0.65s 0.2s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* ── Quick actions grid ─────────────────────────────── */
.qa-btn {
  transition: all 0.15s;
}

.qa-btn:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

/* ── Note items — better spacing ────────────────────── */
.note-item-meta {
  display: flex;
  gap: 6px;
  align-items: center;
}

/* ── Spaced review progress bar animation ───────────── */
#srProgressFill {
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* ── Tutor bubble — line height fix ─────────────────── */
.tutor-bubble {
  white-space: normal;
}

/* ── Share modal options on mobile ──────────────────── */
@media(max-width: 480px) {
  .share-box {
    padding: 20px;
  }

  .share-options {
    grid-template-columns: 1fr 1fr;
  }
}

/* ── Output stats bar — horizontal scroll ───────────── */
#outputStats {
  overflow-x: auto;
  scrollbar-width: none;
}

#outputStats::-webkit-scrollbar {
  display: none;
}

#outputStats span {
  white-space: nowrap;
  flex-shrink: 0;
  background: var(--bg3);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 0.66rem;
}

/* ── Output card body expanded state ────────────────── */
.output-card.selected .output-card-body {
  animation: pageIn 0.2s ease;
}

/* ── Generate page — URL import bar ────────────────── */
#urlInput:focus {
  border-color: var(--accent) !important;
}

/* ── Exam mode result — readable prose ──────────────── */
.exam-result-box h2 {
  color: var(--accent);
  font-family: 'Syne', sans-serif;
  font-size: 0.95rem;
  font-weight: 800;
  margin: 18px 0 8px;
  display: flex;
  align-items: center;
  gap: 7px;
}

.exam-result-box h2:first-child {
  margin-top: 0;
}

/* ── Pomodoro topic input (if exists) ────────────────── */
#pomoTopic {
  width: 100%;
  background: var(--bg4);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 9px;
  color: var(--text);
  font-family: 'DM Mono', monospace;
  font-size: 0.68rem;
  outline: none;
  margin-top: 8px;
  transition: border-color 0.2s;
}

#pomoTopic:focus {
  border-color: var(--accent3);
}

/* ── Loading bar on SR tab ───────────────────────────── */
.sr-progress-fill {
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Weak topic box animation ────────────────────────── */
#weakTopicBox {
  animation: pageIn 0.4s ease;
}

/* ── Input source badge ──────────────────────────────── */
#inputSourceBadge span {
  font-size: 0.65rem;
  letter-spacing: 0.05em;
}

/* ── Exam insight card ───────────────────────────────── */
#examInsightCard {
  animation: pageIn 0.3s ease;
}

/* ── Dashboard progress tracker ─────────────────────── */
#progressCard {
  overflow: hidden;
}

#progressContent>div {
  transition: opacity 0.2s;
}

#progressContent>div:hover {
  opacity: 0.85;
}

/* ── CTA section ─────────────────────────────────────── */
.scroll-cta .btn-xl {
  position: relative;
  overflow: hidden;
}

.scroll-cta .btn-xl::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 30%, rgba(255, 255, 255, 0.1));
  pointer-events: none;
}

/* ── Sidebar toggle button — cleaner ────────────────── */
.sidebar-toggle-btn {
  background: var(--bg2);
}

/* ── Code block styles (renderTutorMarkdown v2) ──────── */
.idgaf-code-block pre {
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.idgaf-code-block pre::-webkit-scrollbar {
  height: 5px;
}

.idgaf-code-block pre::-webkit-scrollbar-track {
  background: transparent;
}

.idgaf-code-block pre::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

/* ── Output prose — consistent spacing ──────────────── */
.summary-box strong,
.exam-result-box strong,
.tutor-bubble strong {
  color: var(--text);
  font-weight: 700;
}

.summary-box em,
.exam-result-box em,
.tutor-bubble em {
  color: var(--muted);
  font-style: italic;
}

/* ── Revision schedule output ───────────────────────── */
#revOutput {
  white-space: normal !important;
  word-break: break-word;
}

/* ── Streaming cursor blink ──────────────────────────────── */
@keyframes blink {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0;
  }
}

/* ── Auth avatar loading pulse ───────────────────────────── */
@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.4;
  }
}

/* ── Assignment Helper ────────────────────────────────────── */
.decode-chip {
  display: inline-block;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0));
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 8px 14px;
  font-size: 0.7rem;
  color: var(--muted);
  font-family: 'DM Mono', monospace;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: all 0.15s;
  font-weight: 600;
}

.decode-chip:hover {
  border-color: var(--accent);
  color: var(--text);
  transform: translateY(-1px);
}

.decode-chip.active-chip {
  background: rgba(232, 255, 71, 0.12);
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 0 1px rgba(232, 255, 71, 0.15) inset;
}

.decode-mode-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.01);
  padding: 10px 12px;
}

.decode-mode-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

#decodeModeToggle {
  background: none;
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: 999px;
  padding: 5px 12px;
  font-family: 'DM Mono', monospace;
  font-size: 0.64rem;
  cursor: pointer;
  transition: all 0.15s;
}

#decodeModeToggle:hover {
  border-color: var(--accent);
  color: var(--text);
}

.decode-mode-current {
  font-family: 'Syne', sans-serif;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.decode-mode-panel {
  display: none;
  flex-wrap: wrap;
  gap: 8px;
}

/* ── Audio/Video Feature ──────────────────────────────────── */
.av-tab {
  flex: 1;
  background: none;
  border: none;
  border-radius: 7px;
  padding: 9px 10px;
  font-family: 'DM Mono', monospace;
  font-size: 0.72rem;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s;
  text-align: center;
  white-space: nowrap;
}

.av-tab.active {
  background: var(--bg);
  color: var(--text);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}

.av-tab:hover:not(.active) {
  color: var(--text);
}

/* Visualiser bars */
.vis-bar {
  width: 4px;
  height: 8px;
  background: var(--border);
  border-radius: 2px;
  transition: height 0.1s, background 0.2s;
  animation-delay: var(--d);
}

.vis-bar.active {
  background: var(--accent2);
  animation: visPulse 0.6s ease-in-out infinite alternate;
  animation-delay: var(--d);
}

@keyframes visPulse {
  from {
    height: 6px;
  }

  to {
    height: 32px;
  }
}

/* TTS voice buttons */
.tts-voice-btn {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 6px 12px;
  font-family: 'DM Mono', monospace;
  font-size: 0.68rem;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s;
}

.tts-voice-btn.active,
.tts-voice-btn:hover {
  border-color: var(--accent3);
  color: var(--accent3);
  background: rgba(0, 212, 170, 0.07);
}

@media (max-width: 600px) {
  .av-tab {
    font-size: 0.62rem;
    padding: 8px 6px;
  }
}

/* ══════════════════════════════════════════════════════════════════════
   NAV — Decode & Audio special buttons
   ══════════════════════════════════════════════════════════════════════ */
.nav-btn--decode {
  border-color: rgba(232, 255, 71, 0.3);
  color: var(--accent);
}

.nav-btn--decode:hover {
  background: rgba(232, 255, 71, 0.08);
  border-color: var(--accent);
  color: var(--accent);
}

.nav-btn--audio {
  border-color: rgba(0, 212, 170, 0.3);
  color: var(--accent3);
}

.nav-btn--audio:hover {
  background: rgba(0, 212, 170, 0.08);
  border-color: var(--accent3);
  color: var(--accent3);
}

/* ══════════════════════════════════════════════════════════════════════
   DECODE PAGE — Full redesign
   ══════════════════════════════════════════════════════════════════════ */

/* Page header */
.decode-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.decode-header-icon {
  font-size: 2rem;
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  background: rgba(232, 255, 71, 0.08);
  border: 1px solid rgba(232, 255, 71, 0.2);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.decode-header-title {
  font-family: 'Syne', sans-serif;
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 3px;
}

.decode-header-sub {
  font-size: 0.74rem;
  color: var(--muted);
  line-height: 1.65;
}

/* Ethics banner */
.decode-ethics {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: linear-gradient(135deg, rgba(232, 255, 71, 0.04), rgba(0, 212, 170, 0.03));
  border: 1px solid rgba(232, 255, 71, 0.18);
  border-radius: 10px;
  padding: 12px 15px;
  margin-bottom: 18px;
  font-size: 0.73rem;
  color: var(--muted);
  line-height: 1.75;
}

.decode-ethics-icon {
  font-size: 1rem;
  flex-shrink: 0;
  margin-top: 1px;
}

.decode-ethics strong {
  color: var(--text);
}

/* Mode toggle pill */
.decode-mode-toggle-wrap {
  margin-bottom: 16px;
}

.decode-mode-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.decode-mode-label {
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  color: var(--muted2);
  text-transform: uppercase;
  flex-shrink: 0;
}

.decode-mode-desc {
  font-size: 0.68rem;
  color: var(--muted);
  font-style: italic;
}

.decode-mode-pill {
  display: flex;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 4px;
  gap: 3px;
}

.decode-pill-btn {
  flex: 1;
  padding: 9px 14px;
  background: none;
  border: none;
  border-radius: 7px;
  color: var(--muted);
  font-family: 'DM Mono', monospace;
  font-size: 0.73rem;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
  text-align: center;
}

.decode-pill-btn:hover {
  color: var(--text);
  background: var(--bg4);
}

.decode-pill-btn.active {
  background: var(--bg);
  color: var(--accent);
  border: 1px solid rgba(232, 255, 71, 0.25);
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.3);
}

/* Input card */
.decode-input-card {
  margin-bottom: 14px;
}

/* Upload zone inside decode */
.decode-upload-zone {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1.5px dashed var(--border);
  border-radius: 10px;
  padding: 14px 18px;
  cursor: pointer;
  transition: all 0.2s;
  background: var(--bg3);
  margin-bottom: 12px;
}

.decode-upload-zone:hover,
.decode-upload-zone.dragging {
  border-color: var(--accent);
  background: rgba(232, 255, 71, 0.02);
}

.decode-upload-icon {
  font-size: 1.3rem;
  flex-shrink: 0;
}

.decode-upload-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.decode-upload-text span:first-child {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text);
}

.decode-upload-hint {
  font-size: 0.66rem;
  color: var(--muted);
}

/* Action row */
.decode-action-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.decode-char-count {
  font-size: 0.62rem;
  color: var(--muted2);
}

.decode-btn-ghost {
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px 16px;
  color: var(--muted);
  font-family: 'DM Mono', monospace;
  font-size: 0.74rem;
  cursor: pointer;
  transition: all 0.15s;
}

.decode-btn-ghost:hover {
  border-color: var(--accent2);
  color: var(--accent2);
}

.decode-btn-primary {
  background: var(--accent);
  border: none;
  border-radius: 8px;
  padding: 9px 22px;
  color: #000;
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.15s;
}

.decode-btn-primary:hover {
  background: #d4eb00;
}

.decode-btn-primary:disabled {
  background: var(--muted2);
  color: var(--muted);
  cursor: not-allowed;
}

/* Loading state */
.decode-loading {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 28px 20px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 14px;
}

.decode-spinner {
  width: 22px;
  height: 22px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.decode-loading-text {
  font-size: 0.8rem;
  font-weight: 600;
}

/* Result sections */
.decode-result-section {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px 20px;
  margin-bottom: 12px;
  animation: pageIn 0.3s ease;
  box-shadow: var(--soft-shadow);
}

.decode-result--yellow {
  border-color: rgba(232, 255, 71, 0.2);
}

.decode-result--green {
  border-color: rgba(0, 212, 170, 0.18);
}

.decode-result--red {
  border-color: rgba(255, 71, 87, 0.18);
}

.decode-result--yellow-soft {
  border-color: rgba(232, 255, 71, 0.12);
}

.decode-result-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.decode-result-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.decode-result-title {
  font-family: 'Syne', sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
}

.decode-result-body {
  font-size: 0.78rem;
  color: var(--text);
  line-height: 1.85;
}

/* Result action buttons */
.decode-result-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 4px;
  margin-bottom: 20px;
}

.decode-result-btn {
  flex: 1;
  min-width: 110px;
  padding: 11px;
  border-radius: 9px;
  cursor: pointer;
  font-family: 'DM Mono', monospace;
  font-size: 0.74rem;
  transition: all 0.15s;
  text-align: center;
}

.decode-result-btn--ghost {
  background: none;
  border: 1px solid var(--border);
  color: var(--muted);
}

.decode-result-btn--ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.decode-result-btn--primary {
  background: var(--accent3);
  border: none;
  color: #000;
  font-family: 'Syne', sans-serif;
  font-weight: 700;
}

.decode-result-btn--primary:hover {
  opacity: 0.88;
}

/* ══════════════════════════════════════════════════════════════════════
   AUDIO PAGE — Full redesign
   ══════════════════════════════════════════════════════════════════════ */

/* Page header */
.audio-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.audio-header-icon {
  font-size: 2rem;
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  background: rgba(0, 212, 170, 0.08);
  border: 1px solid rgba(0, 212, 170, 0.22);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.audio-header-title {
  font-family: 'Syne', sans-serif;
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 3px;
}

.audio-header-sub {
  font-size: 0.74rem;
  color: var(--muted);
  line-height: 1.65;
}

/* 2-tab switcher */
.audio-tabs-wrap {
  display: flex;
  gap: 0;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 20px;
}

.audio-tab-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 11px 16px;
  background: none;
  border: none;
  border-radius: 9px;
  color: var(--muted);
  font-family: 'DM Mono', monospace;
  font-size: 0.74rem;
  cursor: pointer;
  transition: all 0.2s;
}

.audio-tab-btn:hover:not(.active) {
  color: var(--text);
}

.audio-tab-btn.active {
  background: var(--bg);
  color: var(--text);
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.3);
}

.audio-tab-icon {
  font-size: 1rem;
}

.audio-tab-label {
  font-weight: 500;
}

/* Record card */
.audio-record-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px 20px;
  margin-bottom: 12px;
  box-shadow: var(--soft-shadow);
}

.audio-record-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.audio-record-label {
  font-family: 'Syne', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
}

.audio-record-status {
  font-size: 0.68rem;
  color: var(--muted);
  font-family: 'DM Mono', monospace;
}

/* Visualiser */
.audio-visualiser {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 44px;
  margin-bottom: 18px;
}

/* Record buttons */
.audio-record-btns {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.audio-record-btn {
  border: none;
  border-radius: 50px;
  padding: 11px 28px;
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
}

.audio-record-btn--rec {
  background: var(--accent2);
  color: #fff;
}

.audio-record-btn--rec:hover {
  opacity: 0.85;
  transform: translateY(-1px);
}

.audio-record-btn--rec.recording {
  background: var(--bg4);
  color: var(--accent2);
  border: 1px solid var(--accent2);
  animation: recordPulse 1.5s ease-in-out infinite;
}

@keyframes recordPulse {

  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(255, 71, 87, 0.3);
  }

  50% {
    box-shadow: 0 0 0 8px rgba(255, 71, 87, 0);
  }
}

/* Upload zone for audio */
.audio-upload-zone {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1.5px dashed var(--border);
  border-radius: 10px;
  padding: 14px 18px;
  cursor: pointer;
  transition: all 0.2s;
  background: var(--bg3);
  margin-bottom: 14px;
}

.audio-upload-zone:hover,
.audio-upload-zone.dragging {
  border-color: var(--accent3);
  background: rgba(0, 212, 170, 0.02);
}

/* Loading */
.audio-loading {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 0.76rem;
  color: var(--muted);
  margin-bottom: 14px;
}

.audio-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--accent3);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}

/* Result box */
.audio-result-box {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 14px;
}

.audio-result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  flex-wrap: wrap;
  gap: 8px;
}

.audio-result-label {
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  color: var(--muted2);
  text-transform: uppercase;
}

.audio-result-btn-ghost {
  background: none;
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 5px 12px;
  color: var(--muted);
  font-family: 'DM Mono', monospace;
  font-size: 0.68rem;
  cursor: pointer;
  transition: all 0.15s;
}

.audio-result-btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.audio-result-btn-primary {
  background: var(--accent);
  border: none;
  border-radius: 7px;
  padding: 5px 14px;
  color: #000;
  font-family: 'DM Mono', monospace;
  font-size: 0.68rem;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.15s;
}

.audio-result-btn-primary:hover {
  background: #d4eb00;
}

.audio-transcript-box {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 14px;
  font-size: 0.78rem;
  color: var(--text);
  line-height: 1.8;
  white-space: pre-wrap;
  max-height: 240px;
  overflow-y: auto;
}

/* Notice cards */
.audio-notice {
  border-radius: 10px;
  padding: 14px 16px;
  font-size: 0.73rem;
  color: var(--muted);
  line-height: 1.75;
  margin-bottom: 14px;
}

.audio-notice strong {
  color: var(--text);
}

.audio-notice code {
  background: var(--bg3);
  padding: 2px 5px;
  border-radius: 4px;
  font-size: 0.7rem;
}

.audio-notice--yellow {
  background: rgba(232, 255, 71, 0.03);
  border: 1px solid rgba(232, 255, 71, 0.15);
}

.audio-notice--green {
  background: rgba(0, 212, 170, 0.03);
  border: 1px solid rgba(0, 212, 170, 0.15);
}

.audio-notice-title {
  font-size: 0.7rem;
  font-weight: 600;
  margin-bottom: 5px;
  color: var(--text);
}

/* TTS controls */
.audio-ctrl-label {
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  color: var(--muted2);
  text-transform: uppercase;
  margin-bottom: 7px;
}

.tts-source-btn {
  flex: 1;
  min-width: 130px;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px 14px;
  color: var(--muted);
  font-family: 'DM Mono', monospace;
  font-size: 0.72rem;
  cursor: pointer;
  transition: all 0.15s;
}

.tts-play-btn {
  flex: 1;
  background: var(--accent3);
  border: none;
  border-radius: 9px;
  padding: 12px;
  color: #000;
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.15s;
}

.tts-play-btn:hover {
  opacity: 0.88;
}

.tts-ctrl-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 12px 16px;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.82rem;
  transition: all 0.15s;
}

.tts-ctrl-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Mobile responsive */
@media (max-width: 600px) {
  .audio-tab-label {
    display: none;
  }

  .audio-tab-btn {
    padding: 11px;
  }

  .decode-pill-btn {
    font-size: 0.65rem;
    padding: 8px 9px;
  }

  .decode-mode-label-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
  }

  .nav-btn--decode,
  .nav-btn--audio {
    display: none;
  }
}

/* Legacy spinner alias — used by inline app.js loading states */
.spinner {
  width: 22px;
  height: 22px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.page-sub,
.upload-sub,
.hero-sub,
.feature-card p,
.price-desc,
.audio-header-sub,
.decode-header-sub,
.referral-sub {
  color: #8e8e8e;
}

.summary-box,
.exam-result-box,
.audio-result-box,
.grade-result,
.quiz-question,
.quiz-score {
  border-radius: 16px;
  box-shadow: var(--soft-shadow);
}

.logo,
.page-title,
.decode-header-title,
.audio-header-title,
.hero h1,
.card-title,
.price-amount,
.price-tier,
.stat-value {
  text-wrap: balance;
}

button,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.nav-btn:focus-visible,
.output-tab:focus-visible,
.sidebar-item:focus-visible,
.qa-btn:focus-visible,
.price-btn:focus-visible,
.decode-btn-primary:focus-visible,
.decode-btn-ghost:focus-visible,
.audio-record-btn:focus-visible,
.audio-tab-btn:focus-visible {
  outline: 2px solid rgba(232, 255, 71, 0.7);
  outline-offset: 2px;
}

@media(max-width:1024px) {
  .cards-row {
    grid-template-columns: 1fr
  }

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

@media(max-width:640px) {
  .stats-row {
    grid-template-columns: 1fr
  }

  .output-header {
    align-items: stretch
  }

  .output-actions {
    width: 100%;
    justify-content: space-between
  }

  .share-box {
    padding: 22px
  }

  .hero h1 {
    line-height: 1
  }
}

/* Homepage final polish: darker, cleaner cards in "What it does" */
#landing .hero-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
  margin-bottom: 13px;
}

#landing .hero-feature-card {
  background: #0a0a0a !important;
  border: 1px solid #1e1e1e !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  border-radius: 14px;
  padding: 30px;
  cursor: pointer;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
  position: relative;
  overflow: hidden;
  contain: layout paint style;
  content-visibility: auto;
  contain-intrinsic-size: 340px;
}

#landing .hero-feature-card:hover {
  border-color: #2a2a2a !important;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
}

#landing .hero-feature-card h3 {
  color: #e8e8e8 !important;
}

#landing .hero-feature-card p {
  color: #888 !important;
}

#landing .hero-feature-box,
#landing .hero-feature-list-item {
  background: #0e0e0e !important;
  border-color: #1e1e1e !important;
  color: #999 !important;
}

#landing .hero-feature-glow {
  position: absolute;
  top: 0;
  right: 0;
  width: 140px;
  height: 140px;
  pointer-events: none;
}

#landing .hero-feature-card--exam .hero-feature-glow {
  display: none;
}

#landing .hero-feature-card--decode .hero-feature-glow {
  display: none;
}

#landing .hero-feature-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border-radius: 100px;
  padding: 4px 11px;
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  margin-bottom: 18px;
}

#landing .hero-feature-card--exam .hero-feature-pill {
  background: rgba(232, 255, 71, 0.08);
  border: 1px solid rgba(232, 255, 71, 0.25);
  color: var(--accent);
}

#landing .hero-feature-card--decode .hero-feature-pill {
  background: rgba(255, 71, 87, 0.08);
  border: 1px solid rgba(255, 71, 87, 0.25);
  color: var(--accent2);
}

#landing .hero-feature-emoji {
  font-size: 2rem;
  margin-bottom: 12px;
}

#landing .hero-feature-box {
  border: 1px solid;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 20px;
  font-size: 0.72rem;
  line-height: 1.8;
}

#landing .hero-feature-box-title {
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 5px;
}

#landing .hero-feature-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 20px;
}

#landing .hero-feature-list-item {
  font-size: 0.72rem;
  border: 1px solid;
  border-radius: 8px;
  padding: 9px 12px;
}

#landing .hero-feature-list-item strong {
  color: var(--text);
}

#landing .hero-feature-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.76rem;
  font-weight: 600;
}

#landing .hero-feature-cta--exam {
  color: var(--accent);
}

#landing .hero-feature-cta--decode {
  color: var(--accent2);
}

#landing .features-grid {
  gap: 10px;
  background: transparent;
  border: none;
  overflow: visible;
}

#landing .feature-card {
  background: #0a0a0a;
  border: 1px solid #1e1e1e;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
  contain: layout paint style;
  content-visibility: auto;
  contain-intrinsic-size: 250px;
}

#landing .feature-card:hover {
  background: #0e0e0e;
  border-color: #2a2a2a;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.3);
}

#landing .feature-card h3 {
  color: #e0e0e0;
}

#landing .feature-card p {
  color: #888;
}

.back-to-top-btn {
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(232, 255, 71, 0.5);
  background: #080808;
  color: var(--accent);
  font-family: 'Syne', sans-serif;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  z-index: 220;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: all 0.18s ease;
}

.back-to-top-btn.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.cookie-banner {
  position: fixed;
  left: 18px;
  right: 18px;
  bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #0a0a0c;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.34);
  z-index: 230;
  transform: translateY(120%);
  opacity: 0;
  transition: all 0.2s ease;
}

.cookie-banner.show {
  transform: translateY(0);
  opacity: 1;
}

.cookie-banner__text {
  font-size: 0.72rem;
  color: var(--muted);
  line-height: 1.7;
}

.cookie-banner__text a {
  color: var(--accent);
  text-decoration: none;
}

.cookie-banner__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cookie-btn {
  border-radius: 8px;
  padding: 8px 12px;
  font-family: 'DM Mono', monospace;
  font-size: 0.68rem;
  cursor: pointer;
}

.cookie-btn--ghost {
  border: 1px solid var(--border);
  color: var(--muted);
  background: transparent;
}

.cookie-btn--accept {
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #000;
  font-weight: 600;
}

@media(max-width:700px) {
  .cookie-banner {
    flex-direction: column;
    align-items: flex-start;
    left: 12px;
    right: 12px;
  }

  .cookie-banner__actions {
    width: 100%;
  }

  .cookie-btn {
    flex: 1;
    text-align: center;
  }
}

.hero,
.features,
.pricing,
.scroll-cta,
.stats-bar {
  padding-left: clamp(16px, 4vw, 38px);
  padding-right: clamp(16px, 4vw, 38px);
}

.toast {
  min-width: 0;
  max-width: min(92vw, 360px);
}

#landing .hero-feature-card,
#landing .feature-card,
.price-card,
.card {
  min-width: 0;
}

@media (max-width: 900px) {
  body::before {
    display: none;
  }

  nav,
  #gmm {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  #landing .hero-features {
    grid-template-columns: 1fr !important;
    gap: 10px;
  }

  #landing .hero-feature-card {
    padding: 22px;
    contain-intrinsic-size: 300px;
  }

  #landing .features-grid {
    gap: 8px;
  }

  #landing .feature-card {
    padding: 22px;
    contain-intrinsic-size: 220px;
  }

  .stats-bar {
    gap: 20px;
  }

  .referral-link-box {
    flex-wrap: wrap;
  }

  .referral-copy {
    width: 100%;
  }

  #landing .hero-feature-card,
  #landing .feature-card {
    content-visibility: visible;
  }
}

@media (max-width: 600px) {
  .hero {
    padding-top: 42px;
    padding-bottom: 34px;
  }

  .hero h1 {
    font-size: clamp(2rem, 10vw, 3rem);
  }

  .hero-sub {
    max-width: none;
    font-size: 0.8rem;
    line-height: 1.65;
  }

  .hero-actions {
    width: 100%;
  }

  .hero-actions .btn-xl {
    flex: 1 1 100%;
    text-align: center;
  }

  .pricing-grid {
    grid-template-columns: 1fr;
  }

  .price-card {
    padding: 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto !important;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* Performance overrides: avoid broad transition: all on frequently repainted UI */
.nav-btn,
.hamburger,
.sidebar-item,
.qa-btn,
.note-item,
.icon-btn,
.gen-option,
.generate-btn,
.output-tab,
.fc-btn,
.q-option,
.country-btn,
.btn-xl,
.price-card,
.price-btn,
.share-option,
.share-close,
.share-btn,
.gmm-item,
.gmm-item.go,
.sidebar-toggle-btn,
.pomo-btn,
.exam-add-btn,
.exam-form-btns button,
.referral-copy {
  transition-property: color, background-color, border-color, box-shadow, transform, opacity;
}

/* Defer offscreen work for long landing sections */
#landing .features,
#landing .pricing,
#landing .scroll-cta,
#landing .site-footer {
  content-visibility: auto;
  contain-intrinsic-size: 600px;
}

/* ── Compositing layer hints ───────────────────────────── */
/* Promote flashcard to GPU layer — it uses preserve-3d + rotateY */
.flashcard {
  will-change: transform;
}

/* Scroll-reveal elements animate transform+opacity */
.reveal {
  will-change: transform, opacity;
}

/* Nav — solid bg, no blur needed */
/* Pomo ring progress stroke animates via stroke-dashoffset */
.pomo-ring .progress {
  will-change: stroke-dashoffset;
}

/* ── Layout containment for self-contained widgets ─────── */
.stat-card,
.streak-widget,
.pomo-widget,
.exam-widget,
.referral-card {
  contain: layout style;
}

/* Toast container is isolated from page layout */
#toast-container {
  contain: layout style;
}

/* ── Skeleton shimmer: use transform instead of background-position ─ */
@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }

  100% {
    transform: translateX(100%);
  }
}

.skeleton {
  position: relative;
  overflow: hidden;
  background: var(--bg3);
}

.skeleton::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, var(--bg4) 50%, transparent 100%);
  animation: shimmer 1.5s infinite;
  will-change: transform;
}