/* =====================================================================
 * TeachBuddy — compiled stylesheet (Dark Theme)
 * ===================================================================== */

/* ===================== 1. PREFLIGHT ================================= */
*, *::before, *::after { box-sizing: border-box; border: 0 solid rgba(255, 255, 255, 0.08); }
html { -webkit-text-size-adjust: 100%; tab-size: 4; line-height: 1.5; }
body { margin: 0; line-height: inherit; }
hr { height: 0; color: inherit; border-top-width: 1px; }
h1, h2, h3, h4, h5, h6 { font-size: inherit; font-weight: inherit; margin: 0; }
p, figure, blockquote, dl, dd, pre { margin: 0; }
ol, ul, menu { list-style: none; margin: 0; padding: 0; }
a { color: inherit; text-decoration: inherit; }
b, strong { font-weight: bolder; }
code, kbd, samp, pre { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 1em; }
small { font-size: 80%; }
table { text-indent: 0; border-color: inherit; border-collapse: collapse; }
button, input, optgroup, select, textarea {
  font-family: inherit; font-size: 100%; font-weight: inherit; line-height: inherit;
  color: inherit; margin: 0; padding: 0;
}
button, select { text-transform: none; }
button, [type="button"], [type="submit"] { -webkit-appearance: button; background-color: transparent; background-image: none; }
:-moz-focusring { outline: auto; }
progress { vertical-align: baseline; }
summary { display: list-item; }
img, svg, video, canvas, iframe, embed, object { display: block; vertical-align: middle; max-width: 100%; height: auto; }
[hidden] { display: none; }
input::placeholder, textarea::placeholder { opacity: 1; color: #64748b; }
button, [role="button"] { cursor: pointer; }
:disabled { cursor: default; }
mark { background-color: transparent; color: inherit; }

/* ===================== 2. TOKENS + BASE ============================= */
:root {
  --tb-bg-base: #0a0a0f;
  --tb-bg-card: #13131a;
  --tb-bg-surface: #181822;
  --tb-bg-elevated: #22222e;
  --tb-surface: #181822;
  --tb-surface-2: #1e1e2b;
  --tb-surface-alt: #121219;

  --tb-ink: #f0f2f6;
  --tb-ink-soft: #94a0b4;

  --tb-accent: #3db8a0;
  --tb-accent-dim: #2a9882;
  --tb-accent-glow: rgba(61, 184, 160, 0.25);
  --tb-secondary: #5a7ea8;

  --tb-amber: #e0a030;
  --tb-emerald: #34b87a;
  --tb-sky: #4aa8d8;
  --tb-rose: #e06070;

  --tb-border: rgba(255, 255, 255, 0.08);
  --tb-border-hover: rgba(255, 255, 255, 0.16);

  --tb-nav-h: 4.25rem;

  --tb-font-display: "Fredoka", "Baloo 2", ui-rounded, "Segoe UI", system-ui, sans-serif;
  --tb-font-sans: "Plus Jakarta Sans", ui-sans-serif, system-ui, "Segoe UI", Roboto, sans-serif;

  --tb-shadow-soft: 0 8px 30px -10px rgba(0, 0, 0, 0.6);
  --tb-shadow-lift: 0 16px 40px -12px rgba(0, 0, 0, 0.8);
}

html { scroll-behavior: smooth; scroll-padding-top: 6rem; }

body {
  font-family: var(--tb-font-sans);
  color: var(--tb-ink);
  background-color: var(--tb-bg-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, .tb-display { font-family: var(--tb-font-display); letter-spacing: -0.01em; color: var(--tb-ink); }

::selection { background: var(--tb-accent); color: #0a0a0f; }

a { color: var(--tb-accent); transition: color .2s ease; }
a:hover { color: #5ce0c6; }

:focus-visible {
  outline: 2px solid var(--tb-accent);
  outline-offset: 2px;
  border-radius: 8px;
}

/* Scrollbars */
html::-webkit-scrollbar { width: 10px; height: 10px; }
html::-webkit-scrollbar-track { background: var(--tb-bg-base); }
html::-webkit-scrollbar-thumb {
  background: var(--tb-bg-elevated);
  border-radius: 8px; border: 2px solid var(--tb-bg-base);
}
.tb-drawer-body::-webkit-scrollbar, #chatBox::-webkit-scrollbar { width: 6px; height: 6px; }
.tb-drawer-body::-webkit-scrollbar-track, #chatBox::-webkit-scrollbar-track { background: transparent; }
.tb-drawer-body::-webkit-scrollbar-thumb, #chatBox::-webkit-scrollbar-thumb {
  background: var(--tb-bg-elevated); border-radius: 6px;
}

/* ===================== 3. KEYFRAMES ================================= */
@keyframes tb-drift {
  0%   { transform: translate3d(0,0,0) scale(1); }
  33%  { transform: translate3d(4%,-6%,0) scale(1.08); }
  66%  { transform: translate3d(-5%,4%,0) scale(.95); }
  100% { transform: translate3d(0,0,0) scale(1); }
}
@keyframes tb-float-up {
  0%   { transform: translateY(0) rotate(0deg); opacity: 0; }
  10%  { opacity: .2; }
  90%  { opacity: .1; }
  100% { transform: translateY(-115vh) rotate(260deg); opacity: 0; }
}
@keyframes tb-gradient-pan {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}
@keyframes tb-pop-in {
  0%   { opacity: 0; transform: translateY(14px) scale(.97); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes tb-bob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}
@keyframes tb-ring {
  0%   { transform: scale(.9); opacity: .6; }
  70%, 100% { transform: scale(1.4); opacity: 0; }
}
@keyframes tb-shine {
  0%   { transform: translateX(-120%) skewX(-18deg); }
  60%, 100% { transform: translateX(240%) skewX(-18deg); }
}
@keyframes tb-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(5px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(2px); }
}
@keyframes tb-cheer {
  0%   { transform: scale(.7) rotate(-4deg); opacity: 0; }
  60%  { transform: scale(1.05) rotate(2deg); opacity: 1; }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}
@keyframes tb-confetti-fall {
  0%   { transform: translate3d(0,-12vh,0) rotate(0deg); opacity: 1; }
  100% { transform: translate3d(var(--tb-x,0px),108vh,0) rotate(var(--tb-r,720deg)); opacity: 0; }
}
@keyframes tb-dots {
  0%, 80%, 100% { transform: scale(.6); opacity: .35; }
  40% { transform: scale(1); opacity: 1; }
}
@keyframes tb-slide-in {
  from { opacity: 0; transform: translateX(20px) scale(.98); }
  to   { opacity: 1; transform: translateX(0) scale(1); }
}
@keyframes tb-sheen {
  0%   { background-position: -220% 0; }
  100% { background-position: 220% 0; }
}

/* ===================== 4. COMPONENTS ================================ */

/* ---- shell + background ---- */
.tb-shell { position: relative; min-height: 100vh; padding-top: var(--tb-nav-h); }

.tb-aurora { pointer-events: none; position: fixed; inset: 0; z-index: -10; overflow: hidden; }
.tb-aurora span { position: absolute; display: block; border-radius: 9999px; filter: blur(90px); opacity: .14; animation: tb-drift 28s ease-in-out infinite; }
.tb-aurora .tb-b1 { width: 44rem; height: 44rem; top: -14rem; left: -12rem; background: radial-gradient(circle at 30% 30%, #3db8a0, transparent 70%); }
.tb-aurora .tb-b2 { width: 40rem; height: 40rem; top: 18%; right: -14rem; background: radial-gradient(circle at 60% 40%, #5a7ea8, transparent 70%); animation-duration: 34s; animation-delay: -6s; }
.tb-aurora .tb-b3 { width: 36rem; height: 36rem; bottom: -12rem; left: 22%; background: radial-gradient(circle at 50% 50%, #258c77, transparent 70%); animation-duration: 40s; animation-delay: -14s; }
.tb-aurora .tb-b4 { width: 28rem; height: 28rem; bottom: 12%; right: 10%; background: radial-gradient(circle at 50% 50%, #4aa8d8, transparent 70%); opacity: .08; animation-duration: 32s; animation-delay: -20s; }

.tb-grid-lines {
  pointer-events: none; position: fixed; inset: 0; z-index: -10;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 100% 60% at 50% 0%, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse 100% 60% at 50% 0%, #000 30%, transparent 75%);
}

.tb-letters { pointer-events: none; position: fixed; inset: 0; z-index: -10; overflow: hidden; }
.tb-letters i {
  position: absolute; bottom: -10vh; display: block; font-style: normal; font-weight: 800;
  font-family: var(--tb-font-display); color: rgba(255, 255, 255, 0.04);
  animation: tb-float-up linear infinite;
}

.tb-container { position: relative; margin: 0 auto; width: 100%; max-width: 72rem; padding: 2.5rem 1rem; }
.tb-container-narrow { position: relative; margin: 0 auto; width: 100%; max-width: 48rem; padding: 2.5rem 1rem; }
@media (min-width: 640px) {
  .tb-container { padding: 3.5rem 1.5rem; }
  .tb-container-narrow { padding: 3.5rem 1.5rem; }
}

/* ---- navbar ---- */
.tb-nav {
  position: fixed; left: 0; right: 0; top: 0; z-index: 40;
  height: var(--tb-nav-h);
  border-bottom: 1px solid var(--tb-border);
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: background .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.tb-nav.tb-nav-scrolled {
  background: rgba(10, 10, 15, 0.96);
  border-bottom-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 12px 30px -15px rgba(0, 0, 0, 0.8);
}
.tb-nav-inner { margin: 0 auto; display: flex; height: 100%; width: 100%; max-width: 72rem; align-items: center; justify-content: space-between; gap: .75rem; padding: 0 1rem; }
@media (min-width: 640px) { .tb-nav-inner { padding: 0 1.5rem; } }

.tb-logo { display: flex; flex-shrink: 0; align-items: center; gap: .625rem; color: var(--tb-ink); text-decoration: none; }
.tb-logo:hover { color: var(--tb-ink); }
.tb-logo-mark {
  display: grid; place-items: center; height: 2.5rem; width: 2.5rem; border-radius: 8px;
  font-family: var(--tb-font-display); font-size: 1.125rem; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, #3db8a0, #258c77);
  box-shadow: 0 6px 18px -4px rgba(61, 184, 160, 0.4);
  transition: transform .3s ease;
}
.tb-logo:hover .tb-logo-mark { transform: scale(1.06); }
.tb-logo-text { display: block; font-family: var(--tb-font-display); font-size: 1.125rem; font-weight: 800; line-height: 1; }
.tb-logo-sub { margin-top: .125rem; display: block; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .18em; color: var(--tb-accent); }

.tb-nav-links { display: none; align-items: center; gap: .35rem; }
.tb-nav-link {
  position: relative; border-radius: 8px; padding: .45rem .85rem;
  font-size: .875rem; font-weight: 600; color: var(--tb-ink-soft); text-decoration: none;
  transition: all .2s ease;
}
.tb-nav-link:hover { background: rgba(255, 255, 255, 0.06); color: var(--tb-ink); }
.tb-nav-link.is-active {
  color: var(--tb-accent);
  background: rgba(61, 184, 160, 0.12);
  border: 1px solid rgba(61, 184, 160, 0.28);
}
.tb-nav .tb-nav-cta { display: none; }
.tb-nav-toggle {
  display: grid; place-items: center; height: 2.5rem; width: 2.5rem; flex-shrink: 0;
  border-radius: 8px; border: 1px solid var(--tb-border); background: var(--tb-bg-card);
  font-size: 1.15rem; color: var(--tb-ink); transition: all .2s ease;
}
.tb-nav-toggle:hover { border-color: var(--tb-border-hover); background: var(--tb-bg-surface); }

@media (min-width: 1024px) {
  .tb-nav-links { display: flex; }
  .tb-nav .tb-nav-cta { display: inline-flex; }
  .tb-nav-toggle { display: none; }
  .tb-mobile-menu { display: none; }
}

.tb-mobile-menu {
  position: fixed; left: 0; right: 0; top: var(--tb-nav-h); z-index: 30;
  transform-origin: top; overflow: hidden;
  border-bottom: 1px solid var(--tb-border);
  padding: .75rem 1rem 1.25rem;
  background: rgba(19, 19, 26, 0.98);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  max-height: 0; opacity: 0; transform: translateY(-8px); pointer-events: none;
  transition: max-height .3s ease, opacity .3s ease, transform .3s ease;
}
.tb-mobile-menu.is-open {
  max-height: 32rem; opacity: 1; transform: translateY(0); pointer-events: auto;
  box-shadow: 0 24px 40px -20px rgba(0, 0, 0, 0.8);
}
.tb-mobile-menu a {
  margin-top: .375rem; display: flex; align-items: center; gap: .75rem;
  border-radius: 8px; padding: .75rem 1rem; font-size: .875rem; font-weight: 600;
  color: var(--tb-ink-soft); text-decoration: none; transition: all .2s ease;
}
.tb-mobile-menu a:hover { background: rgba(255, 255, 255, 0.06); color: var(--tb-ink); }
.tb-mobile-menu a.is-active { color: var(--tb-accent); background: rgba(61, 184, 160, 0.12); border: 1px solid rgba(61, 184, 160, 0.25); }

/* ---- typography helpers ---- */
.tb-badge {
  display: inline-flex; width: fit-content; align-items: center; gap: .5rem;
  border: 1px solid rgba(61, 184, 160, 0.3); border-radius: 6px; padding: .3rem .75rem;
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; color: var(--tb-accent);
  background: rgba(61, 184, 160, 0.12);
}
.tb-badge-soft {
  display: inline-flex; width: fit-content; align-items: center; gap: .5rem;
  border: 1px solid var(--tb-border); border-radius: 6px; background: rgba(255, 255, 255, 0.05); padding: .25rem .65rem;
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; color: var(--tb-ink-soft);
}
.tb-title { font-size: 2.25rem; line-height: 1.08; font-weight: 800; letter-spacing: -.025em; color: #fff; }
.tb-title-sm { font-size: 1.875rem; line-height: 1.15; font-weight: 800; letter-spacing: -.025em; color: #fff; }
@media (min-width: 640px) { .tb-title { font-size: 3rem; } .tb-title-sm { font-size: 2.25rem; } }
@media (min-width: 1024px) { .tb-title { font-size: 3.75rem; } }

.tb-subtitle { margin-top: 1rem; max-width: 42rem; font-size: 1rem; line-height: 1.7; color: var(--tb-ink-soft); }
@media (min-width: 640px) { .tb-subtitle { font-size: 1.125rem; } }

.tb-gradient-text {
  background: linear-gradient(100deg, #3db8a0 0%, #4aa8d8 50%, #6880a0 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: tb-gradient-pan 8s ease-in-out infinite;
}
.tb-eyebrow { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .2em; color: var(--tb-accent); }
.tb-muted { font-size: .875rem; line-height: 1.7; color: var(--tb-ink-soft); }
.tb-section-head { margin-bottom: 2rem; display: flex; flex-direction: column; gap: .75rem; }
@media (min-width: 640px) { .tb-section-head { margin-bottom: 2.5rem; } }

/* ---- hero ---- */
.tb-hero {
  position: relative; overflow: hidden; border-radius: 16px;
  border: 1px solid var(--tb-border); padding: 3rem 1.5rem; color: #fff;
  background: linear-gradient(135deg, #12131c 0%, #161824 50%, #0e121a 100%);
  box-shadow: 0 20px 50px -16px rgba(0, 0, 0, 0.8);
}
@media (min-width: 640px) { .tb-hero { border-radius: 18px; padding: 4rem 3rem; } }
.tb-hero::after {
  content: ""; pointer-events: none; position: absolute; inset: 0;
  background:
    radial-gradient(50rem 25rem at 85% -10%, rgba(61, 184, 160, 0.12), transparent 60%),
    radial-gradient(35rem 22rem at 5% 110%, rgba(74, 168, 216, 0.1), transparent 60%);
}
.tb-hero > * { position: relative; z-index: 10; }
.tb-hero .tb-subtitle { color: var(--tb-ink-soft); }
.tb-hero-orb { pointer-events: none; position: absolute; border-radius: 9999px; filter: blur(60px); animation: tb-drift 24s ease-in-out infinite; }

/* ---- panels + cards ---- */
.tb-panel {
  position: relative; overflow: hidden; border-radius: 14px;
  border: 1px solid var(--tb-border); background: var(--tb-bg-card);
  padding: 1.5rem;
  box-shadow: var(--tb-shadow-soft);
}
@media (min-width: 640px) { .tb-panel { padding: 2rem; } }

.tb-card {
  position: relative; overflow: hidden; border-radius: 12px;
  border: 1px solid var(--tb-border); background: var(--tb-bg-card);
  padding: 1.5rem;
  box-shadow: var(--tb-shadow-soft);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
  will-change: transform;
}
.tb-card:hover { transform: translateY(-4px); border-color: var(--tb-border-hover); box-shadow: var(--tb-shadow-lift); }
.tb-card-title { font-size: 1.125rem; font-weight: 700; color: var(--tb-ink); }

.tb-card-glow::before {
  content: ""; pointer-events: none; position: absolute; inset: 0; border-radius: inherit;
  opacity: 0; transition: opacity .3s ease; padding: 1px;
  background: linear-gradient(135deg, rgba(61, 184, 160, 0.5), rgba(74, 168, 216, 0.3));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
}
.tb-card-glow:hover::before { opacity: 1; }

/* ---- topic tiles ---- */
.tb-tile {
  position: relative; display: flex; height: 100%; flex-direction: column; overflow: hidden;
  cursor: pointer; border-radius: 12px; border: 1px solid var(--tb-border);
  background: var(--tb-bg-card); padding: 1.25rem; text-align: left; text-decoration: none;
  color: var(--tb-ink);
  box-shadow: var(--tb-shadow-soft);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.tb-tile:hover { transform: translateY(-5px); border-color: rgba(61, 184, 160, 0.35); box-shadow: var(--tb-shadow-lift); }
.tb-tile::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px;
  transform: scaleX(0); transform-origin: left; transition: transform .3s ease;
  background: linear-gradient(90deg, #3db8a0, #4aa8d8, #6880a0);
}
.tb-tile:hover::after { transform: scaleX(1); }
.tb-tile-icon {
  display: grid; place-items: center; height: 3rem; width: 3rem; flex-shrink: 0;
  border-radius: 8px; font-size: 1.25rem; background: var(--tb-bg-surface);
  border: 1px solid var(--tb-border);
  transition: transform .3s ease;
}
.tb-tile:hover .tb-tile-icon { transform: scale(1.05); }
.tb-tile-title { font-family: var(--tb-font-display); font-size: 1.125rem; font-weight: 800; line-height: 1.25; color: var(--tb-ink); }
.tb-tile-desc { margin-top: .375rem; font-size: .875rem; line-height: 1.65; color: var(--tb-ink-soft); }
.tb-tile-foot {
  margin-top: 1rem; display: flex; align-items: center; justify-content: space-between; gap: .5rem;
  padding-top: .75rem; font-size: .875rem; font-weight: 700; color: var(--tb-accent);
  border-top: 1px dashed var(--tb-border);
}
.tb-tile-arrow { display: inline-block; transition: transform .3s ease; }
.tb-tile:hover .tb-tile-arrow { transform: translateX(4px); }

.tb-i-violet, .tb-i-pink, .tb-i-amber, .tb-i-emerald, .tb-i-sky,
.tb-i-rose, .tb-i-lime, .tb-i-orange, .tb-i-cyan, .tb-i-indigo, .tb-i-fuchsia {
  background: var(--tb-bg-surface);
  border: 1px solid var(--tb-border);
  color: var(--tb-ink);
}

/* ---- buttons ---- */
.tb-btn {
  position: relative; display: inline-flex; cursor: pointer; align-items: center; justify-content: center;
  gap: .5rem; overflow: hidden; border-radius: 8px; padding: .7rem 1.25rem;
  font-size: .875rem; font-weight: 700; color: #fff; text-decoration: none;
  background: linear-gradient(135deg, #3db8a0, #258c77);
  box-shadow: 0 6px 20px -6px rgba(61, 184, 160, 0.4);
  transition: transform .2s ease, box-shadow .2s ease, opacity .2s ease;
}
.tb-btn:hover { transform: translateY(-2px); color: #fff; box-shadow: 0 10px 24px -6px rgba(61, 184, 160, 0.55); }
.tb-btn:active { transform: translateY(0); }
.tb-btn::after {
  content: ""; pointer-events: none; position: absolute; top: 0; bottom: 0; left: 0; width: 33%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
  transform: translateX(-120%) skewX(-18deg);
}
.tb-btn:hover::after { animation: tb-shine .8s ease-out; }
.tb-btn:disabled { cursor: not-allowed; opacity: .45; box-shadow: none; transform: none; }
.tb-btn-lg { padding: .9rem 1.6rem; font-size: .95rem; }

.tb-btn-secondary {
  display: inline-flex; cursor: pointer; align-items: center; justify-content: center; gap: .5rem;
  border-radius: 8px; border: 1px solid var(--tb-border); background: var(--tb-bg-surface); padding: .7rem 1.25rem;
  font-size: .875rem; font-weight: 700; color: var(--tb-ink); text-decoration: none;
  box-shadow: var(--tb-shadow-soft); transition: all .2s ease;
}
.tb-btn-secondary:hover { transform: translateY(-2px); border-color: var(--tb-border-hover); background: var(--tb-bg-elevated); color: #fff; }

.tb-btn-ghost {
  display: inline-flex; cursor: pointer; align-items: center; justify-content: center; gap: .5rem;
  border-radius: 8px; border: 1px solid var(--tb-border); background: rgba(255, 255, 255, 0.05);
  padding: .7rem 1.25rem; font-size: .875rem; font-weight: 700; color: var(--tb-ink); text-decoration: none;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); transition: all .2s ease;
}
.tb-btn-ghost:hover { transform: translateY(-2px); background: rgba(255, 255, 255, 0.1); color: #fff; border-color: var(--tb-border-hover); }

.tb-btn-soft {
  display: inline-flex; cursor: pointer; align-items: center; justify-content: center; gap: .5rem;
  border-radius: 8px; background: rgba(61, 184, 160, 0.1); border: 1px solid rgba(61, 184, 160, 0.22); padding: .6rem 1rem;
  font-size: .875rem; font-weight: 700; color: var(--tb-accent); text-decoration: none; transition: all .2s ease;
}
.tb-btn-soft:hover { transform: translateY(-2px); background: rgba(61, 184, 160, 0.18); border-color: rgba(61, 184, 160, 0.4); }

.tb-back {
  display: inline-flex; flex-shrink: 0; cursor: pointer; align-items: center; gap: .5rem;
  border-radius: 8px; border: 1px solid var(--tb-border); background: var(--tb-bg-card);
  padding: .6rem 1rem; font-size: .875rem; font-weight: 700; color: var(--tb-ink-soft); text-decoration: none;
  transition: all .2s ease;
}
.tb-back:hover { transform: translateX(-2px); border-color: var(--tb-border-hover); color: var(--tb-ink); }

/* ---- inputs ---- */
.tb-input {
  width: 100%; border-radius: 8px; border: 1px solid var(--tb-border); background: rgba(255, 255, 255, 0.04);
  padding: .75rem 1rem; font-size: .875rem; font-weight: 500; color: var(--tb-ink);
  outline: none; transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}
.tb-input::placeholder { color: #64748b; }
.tb-input:focus { border-color: var(--tb-accent); background: rgba(255, 255, 255, 0.06); box-shadow: 0 0 0 3px var(--tb-accent-glow); }

/* ---- stats + chips ---- */
.tb-stat {
  border-radius: 10px; border: 1px solid var(--tb-border); background: var(--tb-bg-card);
  padding: 1rem 1.25rem; text-align: center;
  box-shadow: var(--tb-shadow-soft); transition: transform .25s ease;
}
.tb-stat:hover { transform: translateY(-3px); }
.tb-stat-num { font-family: var(--tb-font-display); font-size: 1.875rem; font-weight: 800; color: var(--tb-accent); }
.tb-stat-label { margin-top: .25rem; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .14em; color: var(--tb-ink-soft); }

.tb-chip {
  display: inline-flex; align-items: center; gap: .375rem; border-radius: 6px;
  border: 1px solid var(--tb-border); background: var(--tb-bg-surface); padding: .35rem .75rem;
  font-size: .75rem; font-weight: 700; color: var(--tb-ink-soft);
}

/* ---- progress ---- */
.tb-progress { height: .5rem; width: 100%; overflow: hidden; border-radius: 6px; background: rgba(255, 255, 255, 0.08); }
.tb-progress > span { display: block; height: 100%; border-radius: 6px; transition: width .6s ease; background: linear-gradient(90deg, #3db8a0, #4aa8d8); }

.tb-readbar {
  position: fixed; left: 0; right: 0; top: var(--tb-nav-h); z-index: 50; height: 3px;
  transform-origin: left; transform: scaleX(0);
  background: linear-gradient(90deg, #3db8a0, #4aa8d8, #5a7ea8);
}

/* ---- reveal ---- */
.tb-reveal { opacity: 0; transform: translateY(20px); transition: opacity .5s ease, transform .5s ease; }
.tb-reveal.tb-in { opacity: 1; transform: translateY(0); }

html.tb-no-anim .tb-reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
html.tb-no-anim .tb-mobile-menu,
html.tb-no-anim .tb-drawer,
html.tb-no-anim .tb-drawer-backdrop { transition: none !important; }
html.tb-no-anim .tb-mobile-menu.is-open { max-height: 32rem !important; opacity: 1 !important; transform: none !important; }
html.tb-no-anim .tb-drawer.is-open { opacity: 1 !important; transform: none !important; }
html.tb-no-anim .tb-drawer-backdrop.is-open { opacity: 1 !important; }
.tb-pop { animation: tb-pop-in .4s ease both; }

/* ---- floating AI launcher ---- */
.tb-fab {
  position: fixed; bottom: 1.25rem; right: 1.25rem; z-index: 40;
  display: grid; place-items: center; height: 3.5rem; width: 3.5rem; cursor: pointer;
  border-radius: 10px; border: 1px solid rgba(61, 184, 160, 0.4); font-size: 1.25rem; color: #fff;
  background: linear-gradient(135deg, #3db8a0, #258c77);
  box-shadow: 0 10px 25px -6px rgba(61, 184, 160, 0.45);
  animation: tb-bob 4s ease-in-out infinite;
  transition: transform .25s ease, opacity .25s ease;
}
@media (min-width: 640px) { .tb-fab { bottom: 1.75rem; right: 1.75rem; } }
.tb-fab:hover { transform: scale(1.08); }
.tb-fab::before {
  content: ""; position: absolute; inset: -3px; border-radius: 12px;
  border: 1px solid rgba(61, 184, 160, 0.4); animation: tb-ring 2.6s ease-out infinite;
}
.tb-fab-tip {
  pointer-events: none; position: absolute; right: 110%; top: 50%; transform: translateY(-50%);
  display: none; white-space: nowrap; border-radius: 6px; background: var(--tb-bg-elevated);
  border: 1px solid var(--tb-border); padding: .45rem .75rem; font-size: .75rem; font-weight: 700; color: #fff;
  opacity: 0; box-shadow: var(--tb-shadow-soft); transition: opacity .2s ease;
}
@media (min-width: 640px) { .tb-fab-tip { display: block; } }
.tb-fab:hover .tb-fab-tip { opacity: 1; }

/* ---- AI drawer ---- */
.tb-drawer-backdrop {
  position: fixed; inset: 0; z-index: 40; opacity: 0; pointer-events: none;
  background: rgba(0, 0, 0, 0.65); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  transition: opacity .3s ease;
}
.tb-drawer-backdrop.is-open { opacity: 1; pointer-events: auto; }

.tb-drawer {
  position: fixed; bottom: 0; right: 0; z-index: 50; display: flex; width: 100%; max-width: 26rem;
  flex-direction: column; overflow: hidden; height: min(34rem, 88vh);
  border: 1px solid var(--tb-border); background: var(--tb-bg-card);
  box-shadow: 0 24px 60px -15px rgba(0, 0, 0, 0.85);
  opacity: 0; transform: translateY(20px) scale(.98); pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
}
@media (min-width: 640px) { .tb-drawer { bottom: 1.25rem; right: 1.25rem; border-radius: 12px; } }
.tb-drawer.is-open { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }

.tb-drawer-head {
  display: flex; flex-shrink: 0; align-items: center; gap: .75rem; padding: .875rem 1rem; color: #fff;
  background: var(--tb-bg-surface); border-bottom: 1px solid var(--tb-border);
}
.tb-drawer-body { flex: 1 1 0%; overflow-y: auto; overflow-x: hidden; padding: 1rem; background: var(--tb-bg-base); }
.tb-drawer-foot { display: flex; flex-shrink: 0; align-items: center; gap: .5rem; border-top: 1px solid var(--tb-border); background: var(--tb-bg-surface); padding: .75rem; }

.tb-starter-row {
  display: flex; flex-shrink: 0; flex-wrap: nowrap; gap: .375rem;
  overflow-x: auto; overflow-y: hidden;
  border-top: 1px solid var(--tb-border); background: var(--tb-bg-surface); padding: .5rem .75rem;
  scrollbar-width: none;
}
.tb-starter-row::-webkit-scrollbar { display: none; }
.tb-starter-row .tb-suggest { flex-shrink: 0; }

.tb-iconbtn {
  display: inline-flex; align-items: center; justify-content: center; gap: .15rem;
  height: 2rem; min-width: 2rem; padding: 0 .5rem; flex-shrink: 0;
  cursor: pointer; border-radius: 6px; border: 1px solid var(--tb-border); background: rgba(255, 255, 255, 0.06);
  font-size: .875rem; line-height: 1; color: var(--tb-ink); white-space: nowrap;
  transition: background-color .2s ease, border-color .2s ease;
}
.tb-iconbtn:hover { background: rgba(255, 255, 255, 0.12); border-color: var(--tb-border-hover); }

/* ---- chat bubbles ---- */
.tb-chat .message, .tb-drawer .message {
  margin-bottom: .75rem; width: fit-content; max-width: 86%; border-radius: 10px;
  padding: .625rem 1rem; font-size: .875rem; line-height: 1.65;
  white-space: pre-wrap; overflow-wrap: anywhere;
  animation: tb-slide-in .3s ease both;
}
.tb-chat .message.ai, .tb-drawer .message.ai {
  border: 1px solid var(--tb-border); background: var(--tb-bg-surface);
  color: var(--tb-ink); border-bottom-left-radius: 2px;
}
.tb-chat .message.user, .tb-drawer .message.user {
  margin-left: auto; color: #fff; border-bottom-right-radius: 2px;
  background: linear-gradient(135deg, #3db8a0, #258c77);
}
.tb-chat .message.correction, .tb-drawer .message.correction {
  border: 1px solid rgba(224, 160, 48, 0.3); background: rgba(224, 160, 48, 0.1);
  font-weight: 600; color: #f59e0b;
}
.tb-chat .message.system, .tb-drawer .message.system {
  margin-left: auto; margin-right: auto; border: 1px solid var(--tb-border);
  background: var(--tb-bg-surface); text-align: center; font-size: .75rem; font-weight: 600; color: var(--tb-ink-soft);
}

.tb-typing {
  margin-bottom: .75rem; display: flex; width: fit-content; align-items: center; gap: .375rem;
  border-radius: 10px; border-bottom-left-radius: 2px; border: 1px solid var(--tb-border);
  background: var(--tb-bg-surface); padding: .75rem 1rem;
}
.tb-typing i { display: block; height: .45rem; width: .45rem; border-radius: 9999px; background: var(--tb-accent); animation: tb-dots 1.2s infinite ease-in-out; }
.tb-typing i:nth-child(2) { animation-delay: .16s; }
.tb-typing i:nth-child(3) { animation-delay: .32s; }

.tb-suggest {
  cursor: pointer; border-radius: 6px; border: 1px solid var(--tb-border);
  background: var(--tb-bg-surface); padding: .35rem .75rem; font-size: .75rem; font-weight: 600;
  color: var(--tb-ink); transition: all .2s ease;
}
.tb-suggest:hover { transform: translateY(-1px); border-color: rgba(61, 184, 160, 0.4); color: var(--tb-accent); background: rgba(61, 184, 160, 0.08); }

/* ---- quiz ---- */
.tb-option {
  display: flex; width: 100%; cursor: pointer; align-items: center; gap: .75rem;
  border-radius: 10px; border: 1px solid var(--tb-border); background: var(--tb-bg-card); padding: .875rem 1rem;
  text-align: left; font-size: .875rem; font-weight: 600; color: var(--tb-ink);
  transition: all .2s ease;
}
.tb-option:hover:not(.is-locked) { transform: translateY(-2px); border-color: rgba(61, 184, 160, 0.4); background: var(--tb-bg-surface); }
.tb-option-key {
  display: grid; place-items: center; height: 1.85rem; width: 1.85rem; flex-shrink: 0;
  border-radius: 6px; background: rgba(255, 255, 255, 0.06); font-size: .75rem; font-weight: 800;
  color: var(--tb-ink-soft); transition: all .2s ease;
}
.tb-option.is-correct { border-color: #34d399; background: rgba(16, 185, 129, 0.12); color: #6ee7b7; }
.tb-option.is-correct .tb-option-key { background: #10b981; color: #fff; }
.tb-option.is-wrong { border-color: #fb7185; background: rgba(244, 63, 94, 0.12); color: #fda4af; animation: tb-shake .45s ease-in-out; }
.tb-option.is-wrong .tb-option-key { background: #f43f5e; color: #fff; }
.tb-option.is-locked { cursor: default; }

.tb-explain {
  margin-top: 1rem; border-radius: 10px; border-left: 4px solid var(--tb-accent);
  background: var(--tb-bg-surface); padding: .75rem 1rem; font-size: .875rem; line-height: 1.7;
  color: var(--tb-ink-soft); animation: tb-pop-in .35s ease-out both;
}

.tb-result-ring { position: relative; margin: 0 auto; display: grid; place-items: center; height: 9rem; width: 9rem; border-radius: 9999px; }
.tb-cheer { animation: tb-cheer .5s ease both; }

.tb-confetti { pointer-events: none; position: fixed; inset: 0; z-index: 60; overflow: hidden; }
.tb-confetti i { position: absolute; display: block; width: 8px; height: 12px; border-radius: 2px; animation: tb-confetti-fall linear forwards; }

/* ---- word chips ---- */
.tb-rearrange .word, .tb-word {
  display: inline-flex; cursor: pointer; user-select: none; align-items: center;
  border-radius: 8px; border: 1px solid var(--tb-border); background: var(--tb-bg-card); padding: .6rem 1rem;
  font-size: .875rem; font-weight: 700; color: var(--tb-ink); text-decoration: none;
  transition: all .2s ease;
}
.tb-rearrange .word:hover, .tb-word:hover { transform: translateY(-3px); border-color: rgba(61, 184, 160, 0.4); color: var(--tb-accent); }
.tb-rearrange .word.is-used, .tb-word.is-used { pointer-events: none; border-style: dashed; border-color: var(--tb-border); background: rgba(255, 255, 255, 0.02); color: #475569; transform: none; }

.tb-dropzone {
  display: flex; min-height: 4.5rem; flex-wrap: wrap; align-items: center; gap: .5rem;
  border-radius: 10px; border: 2px dashed var(--tb-border); background: rgba(255, 255, 255, 0.02);
  padding: .75rem 1rem; font-size: .875rem;
}

.tb-feedback-ok {
  margin-top: 1rem; border-radius: 8px; border: 1px solid rgba(52, 211, 153, 0.3);
  background: rgba(16, 185, 129, 0.1); padding: .75rem 1rem; font-size: .875rem; font-weight: 700;
  color: #34d399; animation: tb-pop-in .3s ease-out both;
}
.tb-feedback-bad {
  margin-top: 1rem; border-radius: 8px; border: 1px solid rgba(251, 113, 133, 0.3);
  background: rgba(244, 63, 94, 0.1); padding: .75rem 1rem; font-size: .875rem; font-weight: 700;
  color: #fda4af; animation: tb-shake .4s ease-in-out;
}

.tb-shimmer {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.03) 25%, rgba(255, 255, 255, 0.08) 50%, rgba(255, 255, 255, 0.03) 75%);
  background-size: 220% 100%; animation: tb-sheen 1.4s linear infinite;
}

/* ---- footer ---- */
.tb-footer {
  position: relative; margin-top: 4rem; border-top: 1px solid var(--tb-border);
  background: var(--tb-bg-base);
}
.tb-footer-inner {
  margin: 0 auto; display: flex; width: 100%; max-width: 72rem; flex-direction: column;
  align-items: center; gap: .75rem; padding: 2rem 1rem; text-align: center;
}
@media (min-width: 640px) { .tb-footer-inner { padding: 2rem 1.5rem; } }

/* ===================== 5. NOTES PAGES =============================== */
.tb-notes .container {
  position: relative; margin: 0 auto 2.5rem; width: 100%; max-width: 48rem;
  padding: 2.5rem 1.25rem 3rem;
  border-radius: 14px; border: 1px solid var(--tb-border);
  background: var(--tb-bg-card);
  box-shadow: var(--tb-shadow-soft);
}
@media (min-width: 640px) { .tb-notes .container { padding-left: 2.5rem; padding-right: 2.5rem; } }
@media (max-width: 560px) { .tb-notes .container { border-radius: 12px; } }

.tb-notes .container > h1 {
  margin-bottom: 2rem; text-align: center; font-size: 1.875rem; line-height: 1.2;
  font-weight: 800; letter-spacing: -.025em; color: #fff;
}
@media (min-width: 640px) { .tb-notes .container > h1 { font-size: 2.25rem; } }

.tb-notes h2 { position: relative; margin-top: 3rem; scroll-margin-top: 7rem; padding-left: 1rem; font-size: 1.25rem; font-weight: 800; color: var(--tb-ink); }
@media (min-width: 640px) { .tb-notes h2 { font-size: 1.5rem; } }
.tb-notes h2::before { content: ""; position: absolute; left: 0; top: .25rem; height: 1.35em; width: 4px; border-radius: 4px; background: var(--tb-accent); }

.tb-notes h3 { margin-top: 1.75rem; font-size: 1rem; font-weight: 800; color: var(--tb-accent); }
@media (min-width: 640px) { .tb-notes h3 { font-size: 1.125rem; } }

.tb-notes p { margin-top: .75rem; line-height: 1.75; color: var(--tb-ink-soft); }
.tb-notes strong { font-weight: 700; color: var(--tb-ink); }

.tb-notes ul { margin-top: .75rem; list-style: none; padding-left: .25rem; }
.tb-notes ul > li { position: relative; margin-top: .5rem; padding-left: 1.5rem; line-height: 1.75; color: var(--tb-ink-soft); }
.tb-notes ul > li::before { content: ""; position: absolute; left: 0; top: .62em; height: .45rem; width: .45rem; border-radius: 2px; background: var(--tb-accent); }

.tb-notes ol { margin-top: .75rem; list-style: decimal; padding-left: 1.5rem; line-height: 1.75; color: var(--tb-ink-soft); }
.tb-notes ol > li { margin-top: .5rem; }
.tb-notes ol > li::marker { font-weight: 700; color: var(--tb-accent); }

.tb-notes hr { margin: 2.5rem 0; height: 1px; border: 0; background: var(--tb-border); }

.tb-notes .card { margin-top: 1.5rem; border-radius: 12px; border: 1px solid var(--tb-border); background: var(--tb-bg-surface); padding: 1.5rem; }

.tb-notes .example, .tb-notes .note, .tb-notes .rule { position: relative; margin-top: 1.25rem; border-radius: 10px; padding: 1.75rem 1.25rem 1.25rem; }
.tb-notes .example { border: 1px solid rgba(74, 168, 216, 0.25); background: rgba(74, 168, 216, 0.06); }
.tb-notes .note    { border: 1px solid rgba(224, 160, 48, 0.25); background: rgba(224, 160, 48, 0.06); }
.tb-notes .rule    { border: 1px solid rgba(61, 184, 160, 0.25); background: rgba(61, 184, 160, 0.06); }

.tb-notes .example::before, .tb-notes .note::before, .tb-notes .rule::before {
  position: absolute; top: -.75rem; left: 1rem; border-radius: 6px;
  padding: .25rem .75rem; font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .14em; color: #fff;
}
.tb-notes .example::before { content: "Example"; background: #2f6890; }
.tb-notes .note::before    { content: "Note";    background: #a37218; }
.tb-notes .rule::before    { content: "Rule";    background: #1e7561; }

.tb-notes .example > :first-child,
.tb-notes .note > :first-child,
.tb-notes .rule > :first-child { margin-top: 0; }

.tb-notes table {
  margin-top: 1.25rem; display: block; width: 100%; overflow-x: auto; border-radius: 10px;
  border: 1px solid var(--tb-border); background: var(--tb-bg-surface); text-align: left;
  border-collapse: separate; border-spacing: 0;
}
.tb-notes thead { background: var(--tb-bg-elevated); }
.tb-notes th { white-space: nowrap; padding: .75rem 1rem; font-size: .75rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--tb-accent); }
.tb-notes td { padding: .75rem 1rem; vertical-align: top; font-size: .875rem; color: var(--tb-ink-soft); border-top: 1px solid var(--tb-border); }
.tb-notes tbody tr { transition: background-color .2s ease; }
.tb-notes tbody tr:hover { background: rgba(255, 255, 255, 0.03); }

/* the "Go to Quiz" button shipped inside every notes page */
.tb-notes > button {
  margin: 0 auto 4rem; display: flex; cursor: pointer; align-items: center; justify-content: center;
  gap: .5rem; border-radius: 8px; border: 0; padding: 1rem 1.75rem;
  font-family: var(--tb-font-display); font-size: 1rem; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, #3db8a0, #258c77);
  box-shadow: 0 10px 25px -6px rgba(61, 184, 160, 0.4);
  transition: transform .2s ease, box-shadow .2s ease;
}
.tb-notes > button:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -6px rgba(61, 184, 160, 0.55); }

.tb-notes-bar { position: relative; margin: 0 auto .5rem; display: flex; width: 100%; max-width: 48rem; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; padding: 2rem 1rem 0; }
@media (min-width: 640px) { .tb-notes-bar { padding-left: 1.5rem; padding-right: 1.5rem; } }

/* ===================== 6. UTILITIES ================================= */

/* display */
.block { display: block; }
.inline-block { display: inline-block; }
.flex { display: flex; }
.grid { display: grid; }
.hidden { display: none; }

/* position */
.relative { position: relative; }
.absolute { position: absolute; }
.pointer-events-none { pointer-events: none; }

.left-4 { left: 1rem; }
.right-10 { right: 2.5rem; }
.-right-10 { right: -2.5rem; }
.-left-16 { left: -4rem; }
.-top-12 { top: -3rem; }
.-top-16 { top: -4rem; }
.-bottom-24 { bottom: -6rem; }
.top-1\/2 { top: 50%; }

/* flex + grid */
.flex-1 { flex: 1 1 0%; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.shrink-0 { flex-shrink: 0; }
.items-start { align-items: flex-start; }
.items-center { align-items: center; }
.justify-start { justify-content: flex-start; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.place-items-center { place-items: center; }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* gap */
.gap-1\.5 { gap: .375rem; }
.gap-2 { gap: .5rem; }
.gap-2\.5 { gap: .625rem; }
.gap-3 { gap: .75rem; }
.gap-5 { gap: 1.25rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }
.gap-x-8 { column-gap: 2rem; }
.gap-y-4 { row-gap: 1rem; }

/* space-y */
.space-y-1\.5 > :not([hidden]) ~ :not([hidden]) { margin-top: .375rem; }
.space-y-2\.5 > :not([hidden]) ~ :not([hidden]) { margin-top: .625rem; }
.space-y-3 > :not([hidden]) ~ :not([hidden]) { margin-top: .75rem; }

/* sizing */
.h-2 { height: .5rem; }
.h-6 { height: 1.5rem; }
.h-8 { height: 2rem; }
.h-10 { height: 2.5rem; }
.h-11 { height: 2.75rem; }
.h-14 { height: 3.5rem; }
.h-28 { height: 7rem; }
.h-64 { height: 16rem; }
.h-72 { height: 18rem; }
.h-80 { height: 20rem; }
.w-2 { width: .5rem; }
.w-10 { width: 2.5rem; }
.w-11 { width: 2.75rem; }
.w-28 { width: 7rem; }
.w-64 { width: 16rem; }
.w-72 { width: 18rem; }
.w-80 { width: 20rem; }
.w-full { width: 100%; }
.w-fit { width: fit-content; }
.w-px { width: 1px; }
.w-3\/4 { width: 75%; }
.max-w-md { max-width: 28rem; }
.max-w-xl { max-width: 36rem; }
.max-w-3xl { max-width: 48rem; }
.max-w-\[90\%\] { max-width: 90%; }
.max-w-\[95\%\] { max-width: 95%; }

/* margins + padding */
.m-0 { margin: 0; }
.mx-auto { margin-left: auto; margin-right: auto; }
.ml-auto { margin-left: auto; }
.mr-2 { margin-right: .5rem; }
.mt-1 { margin-top: .25rem; }
.mt-1\.5 { margin-top: .375rem; }
.mt-2 { margin-top: .5rem; }
.mt-3 { margin-top: .75rem; }
.mt-4 { margin-top: 1rem; }
.mt-5 { margin-top: 1.25rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-7 { margin-top: 1.75rem; }
.mt-8 { margin-top: 2rem; }
.mt-9 { margin-top: 2.25rem; }
.mt-10 { margin-top: 2.5rem; }
.mt-auto { margin-top: auto; }
.mb-3 { margin-bottom: .75rem; }
.mb-6 { margin-bottom: 1.5rem; }

.p-0 { padding: 0; }
.p-4 { padding: 1rem; }
.px-1 { padding-left: .25rem; padding-right: .25rem; }
.px-1\.5 { padding-left: .375rem; padding-right: .375rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-5 { padding-left: 1.25rem; padding-right: 1.25rem; }
.py-0\.5 { padding-top: .125rem; padding-bottom: .125rem; }
.py-2\.5 { padding-top: .625rem; padding-bottom: .625rem; }
.py-3\.5 { padding-top: .875rem; padding-bottom: .875rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-5 { padding-top: 1.25rem; padding-bottom: 1.25rem; }
.pl-11 { padding-left: 2.75rem; }
.pt-0 { padding-top: 0; }
.pt-5 { padding-top: 1.25rem; }

/* borders + radius */
.border { border-width: 1px; border-style: solid; border-color: var(--tb-border); }
.border-t { border-top-width: 1px; border-top-style: solid; border-color: var(--tb-border); }
.border-b { border-bottom-width: 1px; border-bottom-style: solid; border-color: var(--tb-border); }
.rounded-sm { border-radius: .25rem; }
.rounded-md { border-radius: .375rem; }
.rounded-lg { border-radius: .5rem; }
.rounded-xl { border-radius: .75rem; }
.rounded-2xl { border-radius: 1rem; }
.rounded-\[12px\] { border-radius: 12px; }
.rounded-\[14px\] { border-radius: 14px; }
.rounded-full { border-radius: 9999px; }
.rounded-bl-sm { border-bottom-left-radius: .25rem; }
.rounded-br-sm { border-bottom-right-radius: .25rem; }

/* backgrounds */
.bg-white { background-color: var(--tb-bg-surface); }
.bg-white\/5 { background-color: rgba(255, 255, 255, 0.05); }
.bg-white\/8 { background-color: rgba(255, 255, 255, 0.08); }
.bg-white\/10 { background-color: rgba(255, 255, 255, 0.1); }
.bg-white\/20 { background-color: rgba(255, 255, 255, 0.2); }
.bg-emerald-300, .bg-emerald-400 { background-color: #34d399; }
.bg-sky-400\/10 { background-color: rgba(74, 168, 216, 0.1); }
.bg-emerald-500\/10 { background-color: rgba(61, 184, 160, 0.1); }

/* text */
.text-center { text-align: center; }
.uppercase { text-transform: uppercase; }
.no-underline { text-decoration-line: none; }
.text-\[10px\] { font-size: 10px; line-height: 1.4; }
.text-\[11px\] { font-size: 11px; line-height: 1.4; }
.text-xs { font-size: .75rem; line-height: 1rem; }
.text-sm { font-size: .875rem; line-height: 1.25rem; }
.text-base { font-size: 1rem; line-height: 1.5rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-extrabold { font-weight: 800; }
.leading-tight { line-height: 1.25; }
.leading-snug { line-height: 1.375; }
.tracking-\[0\.12em\] { letter-spacing: .12em; }
.tracking-\[0\.14em\] { letter-spacing: .14em; }

.text-white { color: #fff; }
.text-white\/60 { color: rgba(255, 255, 255, 0.6); }
.text-white\/75 { color: rgba(255, 255, 255, 0.75); }
.text-slate-400 { color: var(--tb-ink-soft); }
.text-emerald-400 { color: #34d399; }
.text-teal-400 { color: #2dd4bf; }
.text-rose-400 { color: #fb7185; }
.text-\[color\:var\(--tb-ink\)\] { color: var(--tb-ink); }
.text-\[color\:var\(--tb-ink-soft\)\] { color: var(--tb-ink-soft); }

/* effects */
.overflow-hidden { overflow: hidden; }
.overflow-y-auto { overflow-y: auto; }
.opacity-60 { opacity: .6; }
.backdrop-blur { backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.shadow-inner { box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.3); }
.-translate-y-1\/2 { transform: translateY(-50%); }

/* ---- responsive: sm (>=640px) ---- */
@media (min-width: 640px) {
  .sm\:block { display: block; }
  .sm\:flex-row { flex-direction: row; }
  .sm\:flex-wrap { flex-wrap: wrap; }
  .sm\:items-center { align-items: center; }
  .sm\:items-end { align-items: flex-end; }
  .sm\:justify-between { justify-content: space-between; }
  .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sm\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sm\:col-span-2 { grid-column: span 2 / span 2; }
  .sm\:text-2xl { font-size: 1.5rem; line-height: 2rem; }
  .sm\:text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
  .sm\:text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
}

/* ---- responsive: md (>=768px) ---- */
@media (min-width: 768px) {
  .md\:flex-row { flex-direction: row; }
  .md\:items-center { align-items: center; }
  .md\:justify-between { justify-content: space-between; }
  .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ---- responsive: lg (>=1024px) ---- */
@media (min-width: 1024px) {
  .lg\:flex { display: flex; }
  .lg\:flex-row { flex-direction: row; }
  .lg\:items-center { align-items: center; }
  .lg\:justify-between { justify-content: space-between; }
  .lg\:w-56 { width: 14rem; }
  .lg\:w-80 { width: 20rem; }
  .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lg\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .lg\:grid-cols-\[1\.4fr_1fr\] { grid-template-columns: 1.4fr 1fr; }
  .lg\:grid-cols-\[1fr_20rem\] { grid-template-columns: 1fr 20rem; }
}

/* ===================== 7. REDUCED MOTION ============================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .tb-reveal { opacity: 1; transform: none; }
  .tb-letters, .tb-confetti { display: none; }
}
