/* ============== Hero card stage (flashcard flip) ============== */
.hero-card-stage {
  position: relative;
  height: 460px;
  perspective: 1400px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-card-bg-1 { position: absolute; top: -20px; right: -10px; width: 120px; height: 120px; border-radius: 28px; background: var(--sun); opacity: .25; transform: rotate(18deg); z-index: 0; animation: float 6s ease-in-out infinite; }
.hero-card-bg-2 { position: absolute; bottom: 0; left: -10px; width: 90px; height: 90px; border-radius: 50%; background: var(--lime); opacity: .25; z-index: 0; animation: float 7s ease-in-out infinite reverse; }
@keyframes float { 0%, 100% { transform: translateY(0) rotate(18deg); } 50% { transform: translateY(-12px) rotate(22deg); } }

.hero-streak-chip, .hero-coin-chip {
  position: absolute; z-index: 5;
  background: #fff; border-radius: 14px; padding: 10px 14px;
  box-shadow: 0 8px 28px rgba(43,16,32,.12), 0 2px 0 rgba(43,16,32,.05);
  display: flex; align-items: center; gap: 8px;
  font-weight: 800; font-size: 14px;
  border: 2px solid var(--border);
}
.hero-streak-chip { top: 24px; left: 8px; transform: rotate(-4deg); animation: float 5s ease-in-out infinite; }
.hero-streak-chip .flame { font-size: 18px; }
.hero-streak-chip .lbl { color: var(--ink-soft); font-weight: 700; font-size: 12px; }
.hero-coin-chip { bottom: 30px; right: 12px; transform: rotate(3deg); animation: float 5.5s ease-in-out infinite reverse; }
.hero-coin-chip .coin { color: var(--sun); font-size: 18px; }

.flashcard {
  position: relative; z-index: 2;
  width: 380px; height: 380px;
  transform-style: preserve-3d;
  transition: transform .9s cubic-bezier(.5,.05,.2,1);
}
.flashcard.flipped { transform: rotateY(180deg); }
.flashcard .face {
  position: absolute; inset: 0;
  background: #fff;
  border-radius: 24px;
  padding: 28px;
  border: 2px solid var(--border);
  box-shadow: 0 24px 60px rgba(43,16,32,.18), 0 6px 0 var(--berry-light);
  display: flex; flex-direction: column;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.flashcard .back { transform: rotateY(180deg); }
.card-meta { display: flex; justify-content: space-between; align-items: center; margin-bottom: 22px; }
.card-meta .card-num { font-family: 'JetBrains Mono', monospace; font-size: 12px; color: var(--ink-soft); font-weight: 700; }
.card-q { font-size: 24px; font-weight: 800; line-height: 1.25; color: var(--ink); flex: 1; }
.card-q em { font-style: italic; color: var(--berry); }
.card-a { font-size: 17px; line-height: 1.5; color: var(--ink); flex: 1; font-weight: 600; }
.card-a b { color: var(--berry); }
.tap-hint {
  margin-top: auto; text-align: center; padding: 10px;
  border-radius: 10px; background: var(--cream);
  font-size: 13px; font-weight: 700; color: var(--ink-soft);
  cursor: pointer;
  border: 2px dashed var(--border);
}
.tap-hint:hover { color: var(--berry); border-color: var(--berry); }

.grade-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin-top: 18px; }
.grade {
  padding: 12px 10px; border-radius: 12px;
  font-weight: 800; font-size: 13px;
  cursor: pointer; transition: transform .15s ease;
}
.grade:hover { transform: translateY(-2px); }
.grade.forgot { background: #fde2e2; color: #b03333; box-shadow: 0 3px 0 #e8b1b1; }
.grade.almost { background: #fff3d4; color: #b76d00; box-shadow: 0 3px 0 #e8c889; }
.grade.got    { background: #d6f4d4; color: var(--lime-deep); box-shadow: 0 3px 0 #aedba9; }

.confetti { position: absolute; inset: -20px; pointer-events: none; z-index: 6; overflow: hidden; }
.confetti .c {
  position: absolute; top: 50%; width: 8px; height: 14px;
  border-radius: 2px;
  animation: fall 1.5s cubic-bezier(.6,.05,.4,1) forwards;
}
.confetti .c0 { background: var(--berry); }
.confetti .c1 { background: var(--sun); }
.confetti .c2 { background: var(--lime); }
.confetti .c3 { background: var(--juice); }
.confetti .c4 { background: var(--navy); }
@keyframes fall {
  0% { transform: translateY(-20px) rotate(0); opacity: 1; }
  100% { transform: translateY(280px) rotate(540deg); opacity: 0; }
}
.celebration {
  position: absolute; left: 50%; top: 30%; transform: translateX(-50%);
  background: var(--lime-deep); color: #fff;
  padding: 10px 18px; border-radius: 12px;
  font-weight: 800; font-size: 14px;
  box-shadow: 0 4px 0 #3a7a39;
  animation: pop .5s cubic-bezier(.6,.0,.3,1.4);
}
@keyframes pop { 0% { transform: translateX(-50%) scale(0); } 80% { transform: translateX(-50%) scale(1.1); } 100% { transform: translateX(-50%) scale(1); } }

@media (max-width: 900px) {
  .hero-card-stage { height: 440px; }
  .flashcard { width: 320px; height: 360px; }
}

/* ============== Phone frames + screens ============== */
.phone-frame { position: relative; flex-shrink: 0; }
.phone-body {
  width: 100%; height: 100%;
  background: var(--frame, #1f1430);
  border-radius: 36px;
  padding: 12px;
  position: relative;
  box-shadow: 0 24px 60px rgba(0,0,0,.22), 0 8px 0 rgba(0,0,0,.1), inset 0 0 0 2px rgba(255,255,255,.08);
}
.phone-notch {
  position: absolute; top: 8px; left: 50%; transform: translateX(-50%);
  width: 90px; height: 22px;
  background: #000; border-radius: 0 0 14px 14px;
  z-index: 3;
}
.phone-home {
  position: absolute; bottom: 6px; left: 50%; transform: translateX(-50%);
  width: 110px; height: 4px; border-radius: 2px;
  background: rgba(255,255,255,.5);
}
.phone-screen {
  width: 100%; height: 100%;
  background: var(--cream);
  border-radius: 26px;
  overflow: hidden;
  position: relative;
}
.phone-label {
  position: absolute; bottom: -32px; left: 50%; transform: translateX(-50%);
  font-size: 11px; font-weight: 800; color: var(--ink-soft);
  text-transform: uppercase; letter-spacing: .1em;
  white-space: nowrap;
}

/* Study screen contents */
.ss { padding: 28px 14px 8px; height: 100%; display: flex; flex-direction: column; font-size: 11px; }
.ss-status { display: flex; justify-content: space-between; padding: 0 4px 10px; font-weight: 800; font-size: 9px; color: var(--ink); }
.ss-top { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.ss-back { width: 24px; height: 24px; border-radius: 8px; background: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 13px; }
.ss-title { flex: 1; }
.ss-subj { font-size: 8px; font-weight: 800; color: var(--berry); text-transform: uppercase; letter-spacing: .08em; }
.ss-topic { font-size: 14px; font-weight: 900; }
.ss-flame, .ss-coin { background: #fff; padding: 5px 9px; border-radius: 10px; font-size: 11px; font-weight: 800; display: flex; align-items: center; gap: 4px; }
.ss-coin { color: var(--sun); }
.ss-progress { display: flex; align-items: center; gap: 8px; padding: 0 4px 14px; }
.ss-bar { flex: 1; height: 6px; background: var(--berry-light); border-radius: 3px; overflow: hidden; }
.ss-bar span { display: block; height: 100%; background: var(--berry); border-radius: 3px; }
.ss-pcount { font-family: 'JetBrains Mono', monospace; font-size: 9px; font-weight: 700; color: var(--ink-soft); }
.ss-card {
  background: #fff; border-radius: 16px; padding: 16px;
  border: 2px solid var(--border);
  box-shadow: 0 4px 0 var(--berry-light);
  flex: 1; display: flex; flex-direction: column; min-height: 140px;
}
.ss-card-head { display: flex; justify-content: space-between; margin-bottom: 12px; }
.ss-pill { background: var(--berry-light); color: var(--berry); padding: 3px 8px; border-radius: 99px; font-size: 8px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.ss-num { font-family: 'JetBrains Mono', monospace; font-size: 9px; color: var(--ink-soft); font-weight: 700; }
.ss-q { font-size: 13px; font-weight: 800; line-height: 1.3; flex: 1; }
.ss-flip { margin-top: 10px; padding: 8px; border: 1.5px dashed var(--border); border-radius: 8px; text-align: center; font-size: 10px; color: var(--ink-soft); font-weight: 700; }
.ss-actions { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 5px; margin-top: 10px; }
.ss-btn { padding: 9px 4px; border-radius: 9px; font-size: 10px; font-weight: 800; }
.ss-forgot { background: #fde2e2; color: #b03333; box-shadow: 0 2px 0 #e8b1b1; }
.ss-almost { background: #fff3d4; color: #b76d00; box-shadow: 0 2px 0 #e8c889; }
.ss-got { background: #d6f4d4; color: var(--lime-deep); box-shadow: 0 2px 0 #aedba9; }
.ss-tabs { display: flex; justify-content: space-around; padding: 12px 0 4px; margin-top: 8px; border-top: 1px solid var(--border); }
.ss-tabs .t { font-size: 14px; opacity: .4; }
.ss-tabs .t.on { opacity: 1; }

/* Insights screen */
.ss-insights .ss-stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 10px; }
.ss-stat { padding: 12px; border-radius: 12px; }
.ss-stat-n { font-size: 22px; font-weight: 900; }
.ss-stat-l { font-size: 9px; font-weight: 800; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .06em; margin-top: 2px; }
.ss-heat { background: #fff; padding: 10px; border-radius: 12px; border: 2px solid var(--border); margin-bottom: 8px; }
.ss-heat-label { font-size: 9px; font-weight: 800; color: var(--ink); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 6px; }
.ss-heat-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; }
.ss-heat-grid .cell { aspect-ratio: 1; border-radius: 2px; background: var(--berry-light); }
.ss-insight-card { background: linear-gradient(135deg, var(--berry-light), #fff3d4); border-radius: 12px; padding: 10px; display: flex; gap: 8px; align-items: flex-start; flex: 1; }
.ss-insight-icon { font-size: 18px; }
.ss-insight-card b { font-size: 10px; font-weight: 800; display: block; margin-bottom: 2px; }
.ss-insight-card span { font-size: 9px; color: var(--ink-soft); font-weight: 600; }

/* Web screen (laptop card) */
.ws {
  width: 460px; height: 300px;
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  border: 2px solid var(--border);
  box-shadow: 0 24px 60px rgba(43,16,32,.16), 0 8px 0 var(--berry-light);
  display: flex; flex-direction: column;
}
.ws-chrome { display: flex; align-items: center; gap: 6px; padding: 8px 10px; background: var(--cream); border-bottom: 1px solid var(--border); }
.ws-chrome > span { width: 10px; height: 10px; border-radius: 50%; background: #ddd; }
.ws-chrome > span:nth-child(1) { background: #ff6058; }
.ws-chrome > span:nth-child(2) { background: #ffbd2e; }
.ws-chrome > span:nth-child(3) { background: #28c941; }
.ws-url { flex: 1; text-align: center; font-family: 'JetBrains Mono', monospace; font-size: 10px; color: var(--ink-soft); }
.ws-body { flex: 1; display: flex; }
.ws-side { width: 110px; background: var(--cream); padding: 12px 8px; border-right: 1px solid var(--border); }
.ws-logo { font-size: 10px; font-weight: 900; margin-bottom: 12px; }
.ws-nav { font-size: 10px; padding: 5px 8px; border-radius: 8px; color: var(--ink-soft); margin-bottom: 2px; font-weight: 700; }
.ws-nav.on { background: var(--berry); color: #fff; box-shadow: 0 2px 0 var(--berry-deep); }
.ws-main { flex: 1; padding: 14px; }
.ws-eyebrow { font-size: 8px; font-weight: 800; color: var(--berry); letter-spacing: .08em; }
.ws-main h4 { font-size: 16px; font-weight: 900; margin: 4px 0 8px; }
.ws-bar { height: 5px; background: var(--berry-light); border-radius: 3px; overflow: hidden; margin-bottom: 12px; }
.ws-bar span { display: block; height: 100%; background: var(--berry); }
.ws-card { background: var(--cream); border-radius: 10px; padding: 12px; border: 1.5px solid var(--border); margin-bottom: 10px; }
.ws-q { font-size: 12px; font-weight: 800; margin-bottom: 6px; }
.ws-a { font-size: 11px; color: var(--ink-soft); font-weight: 600; }
.ws-acts { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 5px; }
.ws-act { padding: 6px 4px; border-radius: 7px; font-size: 9px; font-weight: 800; text-align: center; }
.ws-act.forgot { background: #fde2e2; color: #b03333; }
.ws-act.almost { background: #fff3d4; color: #b76d00; }
.ws-act.got { background: #d6f4d4; color: var(--lime-deep); }

/* Devices stage layout */
.devices-stage {
  position: relative;
  height: 540px;
  display: flex; align-items: center; justify-content: center;
}
.device { position: absolute; }
.device-tag {
  position: absolute; bottom: -24px; left: 12px;
  font-size: 11px; font-weight: 800; color: #b76d00;
  text-transform: uppercase; letter-spacing: .1em;
}
.device-web { top: 60px; left: -20px; transform: rotate(-4deg); z-index: 1; }
.device-ios { top: 0; right: 80px; z-index: 3; }
.device-android { bottom: 0; right: -10px; z-index: 2; }

.sync-orbit { position: absolute; inset: 0; pointer-events: none; }
.orbit-dot { position: absolute; width: 10px; height: 10px; border-radius: 50%; background: var(--berry); box-shadow: 0 0 16px rgba(195,25,93,.6); }
.orbit-dot.d1 { top: 30%; left: 40%; animation: orbit 4s linear infinite; }
.orbit-dot.d2 { top: 60%; left: 60%; background: var(--sun); animation: orbit 5s linear infinite reverse; }
.orbit-dot.d3 { top: 50%; left: 50%; background: var(--lime-deep); animation: orbit 6s linear infinite; }
@keyframes orbit { 0% { transform: translate(0,0); } 25% { transform: translate(40px,-20px); } 50% { transform: translate(0,-40px); } 75% { transform: translate(-40px,-20px); } 100% { transform: translate(0,0); } }

@media (max-width: 1100px) {
  .devices-stage { height: 480px; }
  .device-web { left: -40px; transform: scale(.85) rotate(-4deg); }
}
@media (max-width: 900px) {
  .devices-stage { height: 520px; transform: scale(.9); transform-origin: center top; }
}


/* ============== Cookie banner ============== */
@keyframes cookieIn {
  from { transform: translateY(40px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
.cookie-banner {
  position: fixed; left: 24px; right: 24px; bottom: 24px;
  z-index: 1000; pointer-events: none;
  display: flex; justify-content: center;
  animation: cookieIn .45s cubic-bezier(.4,0,.2,1) both;
}
.cookie-card {
  pointer-events: auto;
  display: grid; grid-template-columns: auto 1fr auto; gap: 24px;
  align-items: center;
  background: var(--paper);
  border: 2px solid var(--border);
  border-radius: 22px;
  padding: 22px 26px;
  box-shadow: 0 24px 60px rgba(43,16,32,.18), 0 4px 0 rgba(0,0,0,.04);
  max-width: 1100px; width: 100%;
}
.cookie-icon {
  width: 56px; height: 56px; border-radius: 18px;
  background: linear-gradient(135deg, #fff3d4, #ffd581);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
  box-shadow: 0 4px 0 rgba(0,0,0,.08);
}
.cookie-body h3 { font-size: 17px; margin: 0 0 4px; color: var(--ink); }
.cookie-body p  { font-size: 14px; color: var(--ink-soft); margin: 0; line-height: 1.5; }
.cookie-body a  { color: var(--berry); font-weight: 800; }
.cookie-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.cookie-btn-sm { padding: 11px 18px !important; font-size: 14px !important; }
.cookie-toggles { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.cookie-row {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 12px 14px; border-radius: 12px;
  background: var(--cream); border: 1.5px solid var(--border);
}
.cookie-row span { display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.cookie-row b { font-weight: 800; color: var(--ink); font-size: 13px; }
.cookie-row em { font-style: normal; font-size: 12px; color: var(--ink-soft); font-weight: 600; }
.cookie-switch {
  width: 42px; height: 24px; border-radius: 99px;
  background: #d9d3cd; border: 0; padding: 0; cursor: pointer;
  position: relative; transition: background .2s; flex-shrink: 0;
}
.cookie-switch span {
  position: absolute; left: 3px; top: 3px;
  width: 18px; height: 18px; border-radius: 50%;
  background: #fff; transition: transform .2s;
  box-shadow: 0 2px 4px rgba(0,0,0,.2);
}
.cookie-switch.on { background: var(--berry); }
.cookie-switch.on span { transform: translateX(18px); }
.cookie-switch.locked { background: var(--lime-deep); cursor: not-allowed; opacity: .85; }
.cookie-switch.locked span { transform: translateX(18px); }
@media (max-width: 900px) {
  .cookie-banner { left: 12px; right: 12px; bottom: 12px; }
  .cookie-card { grid-template-columns: 1fr; gap: 14px; padding: 18px; }
  .cookie-icon { width: 44px; height: 44px; font-size: 22px; }
  .cookie-actions { justify-content: stretch; }
  .cookie-actions .cookie-btn-sm { flex: 1; justify-content: center; }
}


/* ============== Public Q-Banks intro ============== */
.qbank-intro {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 64px;
  align-items: center;
  margin-bottom: 56px;
}
.qbank-intro .section-title { line-height: 1.05; }
.qbank-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 26px;
}
.qbank-stat {
  background: #fff;
  border: 2px solid var(--border);
  border-radius: 16px;
  padding: 14px 12px;
  text-align: center;
  transition: transform .25s, border-color .25s;
}
.qbank-stat:hover { transform: translateY(-3px); border-color: var(--berry); }
.qbank-stat b {
  display: block;
  font-size: 22px;
  font-weight: 900;
  color: var(--ink);
  line-height: 1;
  margin-bottom: 4px;
}
.qbank-stat span {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: .5px;
}
.qbank-stat-free b { color: var(--lime-deep); }
.qbank-stat-free { background: var(--lime); border-color: var(--lime-deep); }

.qbank-boards {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.qbank-boards-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: .8px;
  margin-right: 4px;
}
.qbank-board-chip {
  padding: 7px 14px;
  border-radius: 999px;
  background: #fff;
  border: 2px solid var(--border);
  font-size: 12px;
  font-weight: 800;
  color: var(--ink);
  cursor: pointer;
  transition: all .2s;
}
.qbank-board-chip:hover {
  background: var(--berry);
  border-color: var(--berry);
  color: #fff;
  transform: translateY(-2px);
}

.qbank-stack {
  position: relative;
  height: 340px;
}
.qbank-card {
  position: absolute;
  width: 280px;
  padding: 22px;
  border-radius: 20px;
  color: #fff;
  box-shadow: 0 16px 40px rgba(20,8,30,.18);
  transition: transform .3s ease;
}
.qbank-card-1 {
  left: 50%; top: 60px;
  transform: translateX(-50%) rotate(-2deg);
  z-index: 3;
}
.qbank-card-2 {
  left: 8%; top: 20px;
  transform: rotate(-7deg);
  z-index: 2;
}
.qbank-card-3 {
  right: 4%; top: 100px;
  transform: rotate(5deg);
  z-index: 1;
}
.qbank-stack:hover .qbank-card-1 { transform: translateX(-50%) rotate(-2deg) translateY(-6px); }
.qbank-stack:hover .qbank-card-2 { transform: rotate(-9deg) translate(-8px,-4px); }
.qbank-stack:hover .qbank-card-3 { transform: rotate(7deg) translate(8px,-4px); }
.qbank-card-subj {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: .85;
  margin-bottom: 8px;
}
.qbank-card-title {
  font-size: 18px;
  font-weight: 900;
  line-height: 1.2;
  margin-bottom: 18px;
}
.qbank-card-foot {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 700;
  opacity: .9;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,.2);
}
.qbank-card-tag {
  position: absolute;
  top: -10px;
  right: 16px;
  background: var(--lime);
  color: var(--lime-deep);
  font-size: 10px;
  font-weight: 800;
  padding: 5px 10px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: .5px;
  box-shadow: 0 4px 0 var(--lime-deep);
}
@media (max-width: 900px) {
  .qbank-intro { grid-template-columns: 1fr; gap: 40px; }
  .qbank-stats { grid-template-columns: repeat(2, 1fr); }
  .qbank-stack { height: 280px; }
  .qbank-card { width: 240px; padding: 18px; }
  .qbank-card-1 { top: 40px; }
  .qbank-card-2 { left: 0; top: 10px; }
  .qbank-card-3 { right: 0; top: 70px; }
}


/* ============== 404 page ============== */
.not-found {
  width: 100%;
  display: flex;
  justify-content: center;
}
.not-found-card {
  max-width: 720px;
  width: 100%;
  padding: 56px 40px 48px;
  background: #fff;
  border: 2px solid var(--border);
  border-radius: 32px;
  text-align: center;
  position: relative;
  box-shadow: 0 30px 60px -30px rgba(195,25,93,.18);
}
.not-found-emoji {
  position: relative;
  font-size: 96px;
  line-height: 1;
  margin: 0 auto 22px;
  width: 140px;
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--berry-light), #fff5ef);
  border-radius: 50%;
  border: 3px dashed var(--berry-light);
}
.berry-bounce {
  display: inline-block;
  animation: nfBounce 2s ease-in-out infinite;
  filter: drop-shadow(0 6px 0 rgba(195,25,93,.25));
}
.qmark {
  position: absolute;
  top: 6px;
  right: 14px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 32px;
  font-weight: 900;
  color: var(--berry);
  background: #fff;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--berry);
  transform: rotate(15deg);
  animation: nfWiggle 3s ease-in-out infinite;
}
@keyframes nfBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}
@keyframes nfWiggle {
  0%, 100% { transform: rotate(15deg); }
  50% { transform: rotate(-8deg); }
}
.not-found-title {
  font-size: clamp(32px, 4.4vw, 48px);
  line-height: 1.05;
  margin: 14px 0 12px;
  letter-spacing: -0.02em;
}
.not-found-sub {
  font-size: 17px;
  color: var(--ink-soft);
  margin: 0 0 28px;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}
.not-found-card-flip {
  background: var(--paper);
  border: 2px solid var(--border);
  border-radius: 18px;
  padding: 20px 24px;
  margin: 0 auto 28px;
  max-width: 420px;
  text-align: left;
}
.nf-flashcard-q {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 12px;
}
.nf-flashcard-divider {
  height: 1px;
  background: var(--border);
  margin: 12px 0;
}
.nf-flashcard-a {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  font-weight: 700;
  color: var(--berry);
}
.not-found-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 28px;
}
.not-found-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--paper);
  border: 2px solid var(--border);
  border-radius: 16px;
  text-decoration: none;
  color: var(--ink);
  text-align: left;
  transition: all .2s;
}
.not-found-link:hover {
  border-color: var(--berry);
  transform: translateY(-2px);
  background: #fff;
}
.not-found-link .nf-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--berry-light);
  color: var(--berry);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.not-found-link > div {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.not-found-link b {
  font-size: 15px;
  font-weight: 800;
}
.not-found-link span {
  font-size: 12px;
  color: var(--ink-soft);
  font-weight: 600;
}
.not-found-cta {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
@media (max-width: 700px) {
  .not-found-card { padding: 40px 22px; }
  .not-found-emoji { width: 110px; height: 110px; font-size: 72px; }
  .not-found-grid { grid-template-columns: 1fr; }
}


/* ============== Footer socials (v2) ============== */
.footer-social {
  display: flex;
  gap: 10px;
  margin-top: 22px;
  flex-wrap: wrap;
}
.footer-social a {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.75);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .2s, color .2s, transform .2s;
}
.footer-social a:hover {
  background: var(--berry);
  color: #fff;
  transform: translateY(-2px);
}
