:root {
  --tm-blue: #0b4daf;
  --tm-blue-dark: #062865;
  --tm-cyan: #19d3d1;
  --tm-teal: #059b9a;
  --tm-sky: #38bdf8;
  --tm-violet: #7360f2;
  --tm-orange: #ff8a00;
  --tm-green: #22c55e;
  --tm-magenta: #ec4899;
  --tm-ink: #06152f;
  --tm-muted: #66728a;
  --tm-soft: #eef8ff;
  --tm-white: #ffffff;
  --tm-border: rgba(11, 77, 175, 0.14);
  --tm-shadow: 0 24px 80px rgba(6, 21, 47, 0.14);
  --tm-radius: 28px;
  --tm-max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 10% 5%, rgba(255,138,0,.12), transparent 26%),
    radial-gradient(circle at 90% 16%, rgba(236,72,153,.11), transparent 24%),
    radial-gradient(circle at 86% 82%, rgba(34,197,94,.1), transparent 24%),
    linear-gradient(180deg, #f8fcff 0%, #ffffff 42%, #f4fbff 100%);
  color: var(--tm-ink);
  line-height: 1.65;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--tm-blue); }
button, input, textarea, select { font: inherit; }
.skip-link { position:absolute; left:-999px; top:auto; width:1px; height:1px; overflow:hidden; }
.skip-link:focus { left:16px; top:16px; width:auto; height:auto; padding:10px 14px; background:#fff; z-index:9999; border-radius:10px; }
.tm-container { width: min(var(--tm-max), calc(100% - 40px)); margin-inline: auto; }
.tm-site-main { min-height: 60vh; }

.tm-site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 14px 0;
  background: rgba(248, 252, 255, 0.84);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(11, 77, 175, 0.08);
}
.tm-header-inner { display: flex; align-items: center; gap: 22px; }
.tm-brand { display: inline-flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.tm-brand img, .tm-custom-logo { width: 56px; height: 56px; border-radius: 999px; object-fit: cover; box-shadow: 0 8px 28px rgba(11,77,175,.14); }
.tm-main-nav { flex: 1; }
.tm-menu, .tm-footer-menu { list-style: none; display: flex; align-items: center; gap: 24px; padding: 0; margin: 0; }
.tm-menu a { color: #15345f; font-weight: 700; font-size: 0.96rem; }
.tm-auth-actions { display: flex; align-items: center; gap: 10px; }
.tm-menu-toggle { display: none; border: 0; background: #fff; border-radius: 12px; padding: 9px 12px; box-shadow: 0 8px 22px rgba(6,21,47,.08); }

.tm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 800;
  transition: transform .35s cubic-bezier(.2,.8,.2,1), box-shadow .35s ease, background .35s ease;
}
.tm-btn:hover { transform: translateY(-2px); }
.tm-btn-primary { color: #fff; background: linear-gradient(135deg, var(--tm-blue), var(--tm-teal)); box-shadow: 0 18px 34px rgba(11,77,175,.24); }
.tm-btn-primary:hover { color: #fff; box-shadow: 0 22px 40px rgba(11,77,175,.32); }
.tm-btn-ghost { background: rgba(255,255,255,.72); border-color: var(--tm-border); color: var(--tm-blue); }
.tm-btn-soft { background: #eaf8fb; color: var(--tm-blue-dark); border-color: rgba(25,211,209,.28); }
.tm-btn-large { min-height: 52px; padding-inline: 26px; }
.tm-text-link { color: var(--tm-blue); font-weight: 800; }

.tm-hero { position: relative; padding: 86px 0 76px; overflow: hidden; }
.tm-home-hero { position: relative; padding: 88px 0 72px; overflow: hidden; }
.tm-gradient-orb { position: absolute; width: 420px; height: 420px; border-radius: 50%; filter: blur(14px); opacity: .38; pointer-events: none; }
.tm-orb-one { background: radial-gradient(circle, rgba(255,138,0,.3), rgba(25,211,209,.22) 42%, transparent 66%); top: 60px; left: -120px; }
.tm-orb-two { background: radial-gradient(circle, rgba(236,72,153,.22), rgba(34,197,94,.16) 45%, transparent 66%); bottom: -120px; right: -60px; }
.tm-hero-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(380px, 1.1fr); gap: 58px; align-items: center; }
.tm-home-hero-grid { display: grid; grid-template-columns: minmax(0, .95fr) minmax(440px, 1.05fr); gap: 48px; align-items: center; }
.tm-eyebrow { display: inline-flex; align-items: center; gap: 8px; color: var(--tm-teal); font-weight: 900; letter-spacing: .12em; text-transform: uppercase; font-size: .76rem; }
.tm-eyebrow::before { content: ""; width: 28px; height: 2px; background: currentColor; border-radius: 99px; }
.tm-hero h1, .tm-home-hero h1, .tm-page-hero h1, .tm-section-heading h2, .tm-showcase-copy h2, .tm-code-preview h2, .tm-band-copy h2, .tm-home-cta h2 {
  margin: 14px 0 18px;
  font-weight: 950;
  letter-spacing: -0.035em;
  line-height: 1.04;
  color: var(--tm-blue-dark);
}
.tm-hero h1 { font-size: clamp(3rem, 7vw, 6.7rem); max-width: 780px; }
.tm-home-hero h1 { font-size: clamp(2.85rem, 5.4vw, 5.2rem); max-width: 900px; letter-spacing: -0.026em; line-height: 1.08; }
.tm-hero-lead { font-size: clamp(1.05rem, 1.5vw, 1.25rem); color: #40506b; max-width: 640px; }
.tm-hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin: 32px 0 24px; }
.tm-hero-points { display: flex; flex-wrap: wrap; gap: 12px; }
.tm-hero-points span { background: rgba(255,255,255,.78); border: 1px solid var(--tm-border); color: #184070; border-radius: 999px; padding: 9px 14px; font-weight: 800; box-shadow: 0 10px 30px rgba(6,21,47,.06); }

.tm-home-visual { display: grid; gap: 18px; }
.tm-home-info-card {
  position: relative;
  overflow: hidden;
  padding: clamp(26px, 4vw, 42px);
  border: 1px solid rgba(11,77,175,.14);
  border-radius: 36px;
  background:
    radial-gradient(circle at 100% 0%, rgba(255,138,0,.22), transparent 34%),
    radial-gradient(circle at 0% 100%, rgba(236,72,153,.14), transparent 38%),
    radial-gradient(circle at 92% 88%, rgba(34,197,94,.13), transparent 34%),
    rgba(255,255,255,.86);
  box-shadow: var(--tm-shadow);
  backdrop-filter: blur(18px);
}
.tm-home-info-card::before {
  content: "";
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(255,255,255,.72);
  border-radius: 28px;
  pointer-events: none;
}
.tm-home-logo-mark {
  width: 108px;
  height: 108px;
  display: grid;
  place-items: center;
  margin-bottom: 22px;
  border-radius: 30px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(11,77,175,.14);
}
.tm-home-logo-mark img { width: 82px; height: 82px; object-fit: cover; border-radius: 999px; }
.tm-info-label {
  display: inline-flex;
  margin-bottom: 12px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(25,211,209,.14);
  color: var(--tm-teal);
  font-size: .76rem;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.tm-home-info-card h2 { margin: 0 0 18px; font-size: clamp(1.7rem, 3vw, 2.55rem); line-height: 1.05; color: var(--tm-blue-dark); }
.tm-info-list { display: grid; gap: 14px; padding: 0; margin: 0; list-style: none; }
.tm-info-list li {
  display: grid;
  gap: 4px;
  padding: 16px 18px;
  border: 1px solid rgba(11,77,175,.1);
  border-radius: 20px;
  background: rgba(255,255,255,.72);
}
.tm-info-list strong { color: var(--tm-blue-dark); font-size: 1.02rem; }
.tm-info-list span { color: var(--tm-muted); }
.tm-student-gallery {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 16px;
}
.tm-student-card {
  min-height: 188px;
  margin: 0;
  overflow: hidden;
  border: 8px solid rgba(255,255,255,.88);
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(6,21,47,.13);
}
.tm-student-card-large { grid-row: span 2; min-height: 392px; }
.tm-student-card img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.01); transition: transform 1.2s cubic-bezier(.16,1,.3,1); }
.tm-student-card:hover img { transform: scale(1.06); }

.tm-hero-visual { position: relative; min-height: 640px; }
.tm-hero-image, .tm-mini-image, .tm-phone-card { position: absolute; will-change: transform; }
.tm-main-image { inset: 82px 0 auto 40px; border-radius: 36px; overflow: hidden; box-shadow: var(--tm-shadow); transform: rotate(-1deg); }
.tm-main-image img { height: 430px; width: 100%; object-fit: cover; }
.tm-mini-image { overflow: hidden; border: 9px solid #fff; border-radius: 28px; box-shadow: 0 28px 70px rgba(6,21,47,.18); }
.tm-mini-image img { width: 250px; height: 188px; object-fit: cover; }
.tm-mini-one { left: -8px; bottom: 24px; transform: rotate(4deg); }
.tm-mini-two { right: -10px; top: 16px; transform: rotate(5deg); }
.tm-phone-card {
  right: 80px;
  bottom: 30px;
  z-index: 4;
  width: 190px;
  padding: 18px;
  border: 1px solid rgba(255,255,255,.72);
  background: rgba(255,255,255,.78);
  backdrop-filter: blur(18px);
  border-radius: 24px;
  box-shadow: 0 20px 60px rgba(11,77,175,.22);
  display: grid;
  gap: 10px;
  justify-items: center;
  text-align: center;
  font-weight: 900;
  color: var(--tm-blue-dark);
  animation: tmFloat 6s ease-in-out infinite;
}
.tm-phone-card img { width: 82px; height: 82px; object-fit: cover; border-radius: 999px; }
@keyframes tmFloat { 0%,100%{ transform: translateY(0) rotate(-2deg);} 50%{ transform: translateY(-16px) rotate(2deg);} }

.tm-section { padding: 82px 0; }
.tm-strip { padding: 28px 0; }
.tm-strip-inner { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.tm-strip-inner div { padding: 20px; border-radius: 22px; background: rgba(255,255,255,.76); border: 1px solid var(--tm-border); box-shadow: 0 14px 38px rgba(6,21,47,.06); display: grid; gap: 4px; }
.tm-strip-inner strong { color: var(--tm-blue); font-size: 1.35rem; }
.tm-strip-inner span { font-weight: 850; color: #17385f; }
.tm-section-heading { max-width: 760px; margin-bottom: 34px; }
.tm-section-heading h2, .tm-showcase-copy h2, .tm-code-preview h2, .tm-band-copy h2, .tm-home-cta h2 { font-size: clamp(2.1rem, 3.5vw, 3.7rem); letter-spacing: -0.025em; line-height: 1.08; }
.tm-section-heading p, .tm-showcase-copy p { color: var(--tm-muted); font-size: 1.05rem; }
.tm-feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.tm-learning-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.tm-feature-card, .tm-learning-card, .tm-preview-panel, .tm-home-cta, .tm-chapter-card, .tm-list-card, .tm-empty-card, .tm-article, .tm-sidebar-card, .tm-lesson-row, .tm-auth-card, .tm-code-preview {
  background: rgba(255,255,255,.82);
  border: 1px solid var(--tm-border);
  border-radius: var(--tm-radius);
  box-shadow: 0 18px 50px rgba(6,21,47,.07);
}
.tm-learning-card {
  position: relative;
  overflow: hidden;
  min-height: 238px;
  padding: 28px;
  transition: transform .45s cubic-bezier(.2,.8,.2,1), box-shadow .45s;
}
.tm-learning-card::before {
  content: "";
  position: absolute;
  inset: auto -42px -58px auto;
  width: 150px;
  height: 150px;
  border-radius: 999px;
  background: var(--tm-card-glow, rgba(25,211,209,.16));
}
.tm-learning-card:hover { transform: translateY(-8px); box-shadow: 0 30px 80px rgba(6,21,47,.12); }
.tm-step-number {
  display: inline-flex;
  margin-bottom: 22px;
  color: var(--tm-card-color, var(--tm-blue));
  font-size: 2.9rem;
  font-weight: 950;
  line-height: 1;
}
.tm-learning-card h3 { margin: 0 0 10px; color: var(--tm-blue-dark); font-size: 1.35rem; line-height: 1.15; }
.tm-learning-card p { margin: 0; color: var(--tm-muted); }
.tm-accent-blue { --tm-card-color: var(--tm-blue); --tm-card-glow: rgba(11,77,175,.15); }
.tm-accent-cyan { --tm-card-color: var(--tm-sky); --tm-card-glow: rgba(56,189,248,.2); }
.tm-accent-violet { --tm-card-color: var(--tm-violet); --tm-card-glow: rgba(115,96,242,.18); }
.tm-accent-teal { --tm-card-color: var(--tm-teal); --tm-card-glow: rgba(5,155,154,.18); }
.tm-accent-orange { --tm-card-color: var(--tm-orange); --tm-card-glow: rgba(255,138,0,.2); }
.tm-accent-green { --tm-card-color: var(--tm-green); --tm-card-glow: rgba(34,197,94,.18); }
.tm-accent-magenta { --tm-card-color: var(--tm-magenta); --tm-card-glow: rgba(236,72,153,.18); }
.tm-feature-card { padding: 28px; transition: transform .4s cubic-bezier(.2,.8,.2,1), box-shadow .4s; }
.tm-feature-card:hover { transform: translateY(-8px); box-shadow: 0 28px 80px rgba(6,21,47,.12); }
.tm-feature-icon { width: 54px; height: 54px; display: inline-grid; place-items: center; border-radius: 16px; background: linear-gradient(135deg, var(--tm-blue), var(--tm-cyan)); color: #fff; font-weight: 900; font-size: 1.35rem; }
.tm-feature-card h3 { font-size: 1.35rem; margin: 18px 0 8px; color: var(--tm-blue-dark); }
.tm-feature-card p { color: var(--tm-muted); margin: 0; }

.tm-showcase, .tm-home-band { background: linear-gradient(135deg, #061b44, #0b4daf 38%, #ec4899 72%, #ff8a00); color: #fff; overflow: hidden; }
.tm-showcase-grid { display: grid; grid-template-columns: minmax(0,.82fr) minmax(420px,1.18fr); gap: 50px; align-items: center; }
.tm-band-grid { display: grid; grid-template-columns: minmax(0, .92fr) minmax(360px, .78fr); gap: 42px; align-items: center; }
.tm-showcase-copy h2, .tm-showcase-copy p, .tm-band-copy h2, .tm-band-copy p { color: #fff; }
.tm-showcase-copy .tm-eyebrow, .tm-band-copy .tm-eyebrow { color: #89fffb; }
.tm-showcase-stack { position: relative; min-height: 470px; }
.tm-showcase-stack img { position: absolute; border-radius: 32px; border: 10px solid rgba(255,255,255,.9); object-fit: cover; box-shadow: 0 28px 100px rgba(0,0,0,.25); }
.tm-stack-one { right: 0; top: 16px; width: 74%; height: 320px; }
.tm-stack-two { left: 0; bottom: 16px; width: 58%; height: 250px; }

.tm-code-preview { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: center; padding: 34px; }
.tm-code-preview pre { background: #06152f; color: #dffaff; border-radius: 20px; padding: 24px; overflow: auto; margin: 0; font-size: .95rem; }
.tm-preview-panel {
  overflow: hidden;
  background: rgba(255,255,255,.92);
  color: var(--tm-ink);
  box-shadow: 0 30px 90px rgba(0,0,0,.2);
}
.tm-preview-header {
  display: flex;
  gap: 8px;
  padding: 16px 18px;
  background: #f0f7ff;
  border-bottom: 1px solid rgba(11,77,175,.1);
}
.tm-preview-header span { width: 12px; height: 12px; border-radius: 999px; background: var(--tm-orange); }
.tm-preview-header span:nth-child(2) { background: var(--tm-green); }
.tm-preview-header span:nth-child(3) { background: var(--tm-magenta); }
.tm-preview-body { padding: clamp(24px, 4vw, 38px); }
.tm-preview-body h3 { margin: 14px 0 10px; font-size: clamp(1.6rem, 3vw, 2.25rem); line-height: 1.08; color: var(--tm-blue-dark); }
.tm-preview-body p { color: #334868; }
.tm-preview-line { height: 14px; margin-top: 20px; border-radius: 999px; background: linear-gradient(90deg, rgba(255,138,0,.3), rgba(34,197,94,.22), rgba(236,72,153,.18)); }
.tm-preview-line.short { width: 68%; }
.tm-preview-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.tm-preview-actions span { padding: 8px 12px; border-radius: 999px; background: #eef8ff; color: var(--tm-blue); font-weight: 850; font-size: .86rem; }
.tm-home-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 26px;
  padding: clamp(28px, 5vw, 44px);
  margin-bottom: 82px;
  background:
    radial-gradient(circle at 92% 18%, rgba(25,211,209,.22), transparent 32%),
    rgba(255,255,255,.86);
}
.tm-home-cta h2 { margin-bottom: 10px; }
.tm-home-cta p { margin: 0; color: var(--tm-muted); }

.tm-page-hero { padding: 74px 0 30px; }
.tm-page-hero h1 { font-size: clamp(2.8rem, 5vw, 5.5rem); }
.tm-page-hero p { color: var(--tm-muted); max-width: 780px; }
.tm-content-shell { margin-bottom: 80px; }
.tm-article { padding: clamp(24px, 4vw, 50px); }
.entry-content { font-size: 1.05rem; }
.entry-content h2, .entry-content h3 { color: var(--tm-blue-dark); line-height: 1.15; }
.entry-content h2 { font-size: clamp(1.9rem, 3vw, 2.7rem); margin-top: 1.4em; }
.entry-content h3 { font-size: 1.45rem; margin-top: 1.2em; }
.entry-content table { width: 100%; border-collapse: collapse; overflow: hidden; border-radius: 16px; margin: 22px 0; }
.entry-content th, .entry-content td { border: 1px solid rgba(11,77,175,.14); padding: 12px 14px; vertical-align: top; }
.entry-content th { background: #eff9ff; color: var(--tm-blue-dark); }
.entry-content code { background: #eef8ff; padding: 2px 6px; border-radius: 8px; }
.entry-content pre code { background: transparent; padding: 0; }
.entry-content ol.main-list,
.entry-content ol.sub-list {
  list-style: none;
  padding-left: 0;
}
.entry-content ol.main-list {
  counter-reset: tm-list-level-1;
  display: grid;
  gap: 1.65rem;
}
.entry-content ol.main-list > li {
  counter-increment: tm-list-level-1;
  position: relative;
  padding-left: 3.25rem;
}
.entry-content ol.main-list > li::before {
  content: counter(tm-list-level-1) ".";
  position: absolute;
  left: 0;
  top: 0;
  min-width: 2.4rem;
  color: var(--tm-blue-dark);
  font-weight: 850;
  font-size: 1.18em;
  line-height: 1.35;
}
.entry-content ol.main-list > li > ol.sub-list {
  counter-reset: tm-list-level-2;
  display: grid;
  gap: .85rem;
  margin-top: .85rem;
}
.entry-content ol.main-list > li > ol.sub-list > li {
  counter-increment: tm-list-level-2;
  position: relative;
  padding-left: 3.65rem;
}
.entry-content ol.main-list > li > ol.sub-list > li::before {
  content: "(" counter(tm-list-level-2, lower-alpha) ")";
  position: absolute;
  left: 0;
  top: .08em;
  min-width: 2.9rem;
  color: var(--tm-blue);
  font-weight: 850;
}
.entry-content ol.main-list > li > ol.sub-list > li > ol.sub-list {
  counter-reset: tm-list-level-3;
  display: grid;
  gap: .7rem;
  margin-top: .7rem;
}
.entry-content ol.main-list > li > ol.sub-list > li > ol.sub-list > li {
  counter-increment: tm-list-level-3;
  position: relative;
  padding-left: 3.65rem;
}
.entry-content ol.main-list > li > ol.sub-list > li > ol.sub-list > li::before {
  content: "(" counter(tm-list-level-3, lower-roman) ")";
  position: absolute;
  left: 0;
  top: .08em;
  min-width: 2.9rem;
  color: var(--tm-magenta);
  font-weight: 850;
}
.entry-content .question-text {
  font-weight: 850;
  color: var(--tm-blue-dark);
  min-width: 0;
  max-width: 100%;
  line-height: 2.1;
  overflow-x: auto;
  overflow-y: visible;
  padding-bottom: .12rem;
}
.entry-content .math-wrap {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  min-height: 0;
  line-height: 1.45;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  padding: .7rem 0 .95rem;
  scrollbar-gutter: auto;
  -webkit-overflow-scrolling: touch;
}
.entry-content .math-wrap .katex,
.entry-content .math-wrap .cp-lex-math {
  display: inline-block;
  max-width: max-content;
  line-height: 1.55;
  padding: .08rem 0;
}
.entry-content .katex-display {
  max-width: 100%;
  height: auto;
  min-height: 0;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  padding: .7rem 0 .95rem;
  scrollbar-gutter: auto;
}
.entry-content .math-wrap::-webkit-scrollbar,
.entry-content .katex-display::-webkit-scrollbar,
.entry-content .question-text::-webkit-scrollbar {
  height: 8px;
  width: 0;
}
.entry-content .math-wrap,
.entry-content .katex-display,
.entry-content .question-text {
  scrollbar-width: thin;
}
.entry-content .katex {
  max-width: 100%;
  line-height: 1.55;
}
.entry-content .katex-html {
  padding-block: .08rem;
}
.tm-post-image { border-radius: 28px; overflow: hidden; margin-bottom: 24px; }

.tm-card-list { display: grid; gap: 18px; margin-bottom: 80px; }
.tm-list-card { display: grid; grid-template-columns: 280px 1fr; gap: 24px; padding: 18px; }
.tm-list-thumb { overflow: hidden; border-radius: 22px; }
.tm-list-thumb img { width: 100%; height: 200px; object-fit: cover; }
.tm-chapter-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 90px; }
.tm-chapter-card { padding: 28px; position: relative; overflow: hidden; }
.tm-chapter-card::after { content:""; position:absolute; width:160px; height:160px; border-radius:999px; background:rgba(25,211,209,.14); right:-60px; top:-60px; }
.tm-chapter-number { color: var(--tm-cyan); font-size: 3rem; font-weight: 950; line-height: 1; }
.tm-chapter-card h2 { font-size: 1.5rem; color: var(--tm-blue-dark); }
.tm-lesson-list { display: grid; gap: 14px; }
.tm-lesson-row { display: flex; align-items: center; justify-content: space-between; gap: 22px; padding: 22px; }
.tm-lesson-row h3 { margin: 8px 0 4px; font-size: 1.35rem; }
.tm-lesson-row p { margin: 0; color: var(--tm-muted); }
.tm-pill { display: inline-flex; border-radius: 999px; padding: 5px 10px; background: #e8fbfb; color: var(--tm-teal); font-weight: 900; font-size: .75rem; }
.tm-empty-card { padding: 34px; }

.tm-lesson-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 24px; align-items: start; margin-bottom: 90px; }
.tm-lesson-sidebar { position: sticky; top: 100px; display: grid; gap: 14px; }
.tm-sidebar-card { padding: 18px; display: grid; gap: 10px; }
.tm-sidebar-card strong { color: var(--tm-blue-dark); }
.tm-sidebar-card a { color: var(--tm-blue); font-weight: 800; }
.tm-interactive-shell { margin-top: 36px; border-top: 1px solid var(--tm-border); padding-top: 28px; }
.tm-interactive-output { border: 1px solid rgba(25,211,209,.34); background: linear-gradient(180deg, #f6ffff, #fff); border-radius: 24px; padding: 22px; overflow: auto; }
.tm-imported-lesson {
  display: block;
  font-size: clamp(1.05rem, 1.2vw, 1.16rem);
  line-height: 2.05;
  letter-spacing: .005em;
  word-spacing: .04em;
}
.tm-imported-lesson > * + * { margin-top: 1.15rem; }
.tm-imported-lesson p,
.tm-imported-lesson li,
.tm-imported-lesson div {
  line-height: 2.05;
}
.tm-imported-lesson h2,
.tm-imported-lesson h3 {
  margin: 1.7rem 0 .8rem;
  line-height: 1.18;
}
.tm-imported-lesson .tm-import-source {
  margin: .4rem 0 1.4rem;
  padding: 12px 16px;
  border-radius: 16px;
  background: #f5fbff;
  border: 1px solid var(--tm-border);
  line-height: 1.5;
}
.tm-imported-lesson .katex {
  line-height: 1.75;
}
.tm-imported-lesson .katex-display,
.tm-imported-lesson mjx-container {
  display: block;
  margin: 1.05rem 0 !important;
  padding: .7rem 0 .95rem;
  height: auto;
  min-height: 0;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  scrollbar-gutter: auto;
}
.tm-imported-lesson mjx-container[jax="CHTML"] {
  line-height: 1.75;
}
.tm-imported-lesson br {
  display: block;
  content: "";
  margin-top: .42rem;
}

.tm-comments { margin-top: 44px; padding-top: 30px; border-top: 1px solid var(--tm-border); }
.tm-comment-list { padding-left: 22px; }
.tm-comment-list .comment { margin: 16px 0; padding: 16px; border-radius: 18px; background: #f5fbff; border: 1px solid var(--tm-border); }
.comment-form-comment textarea, .comment-form input[type="text"], .comment-form input[type="email"], .tm-form input, .tm-form textarea, .tm-form select {
  width: 100%; border: 1px solid rgba(11,77,175,.18); border-radius: 16px; padding: 12px 14px; background: #fff; color: var(--tm-ink);
}
.form-submit input, .tm-form button { cursor: pointer; border: 0; }
.tm-login-note { background: #eef8ff; border: 1px solid var(--tm-border); border-radius: 16px; padding: 14px 16px; }

.tm-auth-wrap { min-height: 70vh; display: grid; place-items: center; padding: 70px 0; }
.tm-auth-card { width: min(520px, calc(100vw - 40px)); padding: 34px; }
.tm-auth-card h1 { margin: 0 0 12px; line-height: 1; font-size: 2.35rem; color: var(--tm-blue-dark); }
.tm-form { display: grid; gap: 14px; margin-top: 22px; }
.tm-form label { display: grid; gap: 6px; font-weight: 800; color: #17385f; }
.tm-alert { border-radius: 16px; padding: 12px 14px; margin: 14px 0; font-weight: 750; }
.tm-alert-success { background: #e9fff7; color: #05674c; border: 1px solid #aaead8; }
.tm-alert-error { background: #fff0f0; color: #a01818; border: 1px solid #f2b5b5; }
.tm-google-btn { width: 100%; margin-top: 12px; background: #fff; border: 1px solid var(--tm-border); color: #14315a; }
.tm-form-footer { margin-top: 18px; color: var(--tm-muted); }

.tm-site-footer { background: #06152f; color: #d8e9ff; padding: 48px 0 22px; }
.tm-footer-inner { display: flex; justify-content: space-between; gap: 30px; align-items: center; }
.tm-footer-brand { display: flex; gap: 16px; align-items: center; max-width: 620px; }
.tm-footer-logo img { width: 58px; height: 58px; border-radius: 999px; object-fit: cover; }
.tm-footer-brand p { margin: 0; }
.tm-footer-links, .tm-footer-menu { display: flex; flex-wrap: wrap; gap: 18px; }
.tm-footer-links a, .tm-footer-menu a { color: #e9f9ff; font-weight: 800; }
.tm-footer-bottom { margin-top: 28px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.12); display: flex; justify-content: space-between; gap: 16px; color: #9fb4d5; }

[data-reveal] { opacity: 0; transform: translateY(42px); transition: opacity 1.05s ease, transform 1.05s cubic-bezier(.16,1,.3,1); transition-delay: var(--tm-reveal-delay, 0ms); will-change: opacity, transform; }
[data-card-motion="left"] { transform: translateX(-72px) rotate(-2deg) scale(.96); }
[data-card-motion="right"] { transform: translateX(72px) rotate(2deg) scale(.96); }
[data-card-motion="rise"] { transform: translateY(76px) scale(.94); }
[data-card-motion="tilt-left"] { transform: translateY(56px) rotate(-5deg) scale(.94); }
[data-card-motion="tilt-right"] { transform: translateY(56px) rotate(5deg) scale(.94); }
[data-reveal].is-visible { opacity: 1; transform: translateY(0); }
.tm-motion-card.is-visible, .tm-learning-card.is-visible, .tm-student-card.is-visible, .tm-preview-panel.is-visible {
  animation: tmCardSettle 1.25s cubic-bezier(.16,1,.3,1) both;
}
@keyframes tmCardSettle {
  0% { filter: blur(10px); }
  62% { transform: translateY(-8px) rotate(.5deg) scale(1.015); filter: blur(0); }
  100% { transform: translateY(0) rotate(0deg) scale(1); filter: blur(0); }
}
[data-typewriter] { position: relative; }
[data-typewriter].tm-typewriter-active::after {
  content: "";
  display: inline-block;
  width: .08em;
  height: .86em;
  margin-left: .08em;
  background: currentColor;
  border-radius: 999px;
  transform: translateY(.08em);
  animation: tmCursorBlink 1.1s steps(2, start) infinite;
}
[data-typewriter].tm-typewriter-done::after { display: none; }
@keyframes tmCursorBlink { 50% { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  [data-reveal] { opacity: 1; transform: none; }
}

@media (max-width: 980px) {
  .tm-menu-toggle { display: inline-flex; }
  .tm-main-nav { position: fixed; inset: 86px 20px auto 20px; background: rgba(255,255,255,.96); border: 1px solid var(--tm-border); border-radius: 24px; padding: 18px; box-shadow: var(--tm-shadow); transform: translateY(-12px); opacity: 0; pointer-events: none; transition: .25s; }
  .tm-main-nav.is-open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .tm-menu { display: grid; gap: 12px; }
  .tm-auth-actions { margin-left: auto; }
  .tm-hero-grid, .tm-home-hero-grid, .tm-showcase-grid, .tm-band-grid, .tm-code-preview, .tm-lesson-layout { grid-template-columns: 1fr; }
  .tm-hero-visual { min-height: 520px; }
  .tm-feature-grid, .tm-learning-grid, .tm-strip-inner, .tm-chapter-grid { grid-template-columns: repeat(2, 1fr); }
  .tm-lesson-sidebar { position: static; }
  .tm-showcase-stack { min-height: 420px; }
}

@media (max-width: 680px) {
  .tm-container { width: min(100% - 28px, var(--tm-max)); }
  .tm-site-header { padding: 10px 0; }
  .tm-header-inner { gap: 10px; }
  .tm-brand img { width: 46px; height: 46px; }
  .tm-auth-actions .tm-btn { padding: 8px 12px; min-height: 38px; font-size: .86rem; }
  .tm-hero, .tm-home-hero { padding-top: 56px; }
  .tm-hero h1, .tm-home-hero h1 { font-size: clamp(2.35rem, 10.5vw, 4rem); line-height: 1.1; }
  .tm-hero-visual { min-height: 440px; }
  .tm-main-image { inset: 50px 0 auto 0; }
  .tm-main-image img { height: 290px; }
  .tm-mini-image img { width: 155px; height: 116px; }
  .tm-mini-one { bottom: 8px; left: 4px; }
  .tm-mini-two { right: 0; top: 8px; }
  .tm-phone-card { width: 150px; right: 24px; bottom: 8px; }
  .tm-student-gallery { grid-template-columns: 1fr; }
  .tm-student-card, .tm-student-card-large { min-height: 220px; grid-row: auto; }
  .tm-strip-inner, .tm-feature-grid, .tm-learning-grid, .tm-chapter-grid { grid-template-columns: 1fr; }
  .tm-showcase-stack { min-height: 340px; }
  .tm-stack-one { width: 86%; height: 220px; }
  .tm-stack-two { width: 68%; height: 170px; }
  .tm-list-card, .tm-lesson-row, .tm-home-cta, .tm-footer-inner, .tm-footer-brand, .tm-footer-bottom { display: grid; grid-template-columns: 1fr; }
}
