/* Be Vietnam Pro (SIL Open Font License 1.1), tự lưu trữ */
@font-face{font-family:'Be Vietnam Pro';font-style:normal;font-weight:400;font-display:swap;src:url(../fonts/be-vietnam-pro-vietnamese-400-normal.woff2) format('woff2');unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB;}
@font-face{font-family:'Be Vietnam Pro';font-style:normal;font-weight:500;font-display:swap;src:url(../fonts/be-vietnam-pro-vietnamese-500-normal.woff2) format('woff2');unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB;}
@font-face{font-family:'Be Vietnam Pro';font-style:normal;font-weight:600;font-display:swap;src:url(../fonts/be-vietnam-pro-vietnamese-600-normal.woff2) format('woff2');unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB;}
@font-face{font-family:'Be Vietnam Pro';font-style:normal;font-weight:700;font-display:swap;src:url(../fonts/be-vietnam-pro-vietnamese-700-normal.woff2) format('woff2');unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB;}
@font-face{font-family:'Be Vietnam Pro';font-style:normal;font-weight:800;font-display:swap;src:url(../fonts/be-vietnam-pro-vietnamese-800-normal.woff2) format('woff2');unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB;}
@font-face{font-family:'Be Vietnam Pro';font-style:normal;font-weight:400;font-display:swap;src:url(../fonts/be-vietnam-pro-latin-ext-400-normal.woff2) format('woff2');unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;}
@font-face{font-family:'Be Vietnam Pro';font-style:normal;font-weight:500;font-display:swap;src:url(../fonts/be-vietnam-pro-latin-ext-500-normal.woff2) format('woff2');unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;}
@font-face{font-family:'Be Vietnam Pro';font-style:normal;font-weight:600;font-display:swap;src:url(../fonts/be-vietnam-pro-latin-ext-600-normal.woff2) format('woff2');unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;}
@font-face{font-family:'Be Vietnam Pro';font-style:normal;font-weight:700;font-display:swap;src:url(../fonts/be-vietnam-pro-latin-ext-700-normal.woff2) format('woff2');unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;}
@font-face{font-family:'Be Vietnam Pro';font-style:normal;font-weight:800;font-display:swap;src:url(../fonts/be-vietnam-pro-latin-ext-800-normal.woff2) format('woff2');unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;}
@font-face{font-family:'Be Vietnam Pro';font-style:normal;font-weight:400;font-display:swap;src:url(../fonts/be-vietnam-pro-latin-400-normal.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;}
@font-face{font-family:'Be Vietnam Pro';font-style:normal;font-weight:500;font-display:swap;src:url(../fonts/be-vietnam-pro-latin-500-normal.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;}
@font-face{font-family:'Be Vietnam Pro';font-style:normal;font-weight:600;font-display:swap;src:url(../fonts/be-vietnam-pro-latin-600-normal.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;}
@font-face{font-family:'Be Vietnam Pro';font-style:normal;font-weight:700;font-display:swap;src:url(../fonts/be-vietnam-pro-latin-700-normal.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;}
@font-face{font-family:'Be Vietnam Pro';font-style:normal;font-weight:800;font-display:swap;src:url(../fonts/be-vietnam-pro-latin-800-normal.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;}
/* ============================================================
   TT.EDU.VN - Design system
   Font: Plus Jakarta Sans | Palette: slate + blue/violet
   ============================================================ */
:root {
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  --bg: #f8fafc;
  --bg-2: #ffffff;
  --bg-3: #f1f5f9;
  --text: #0f172a;
  --text-2: #334155;
  --muted: #64748b;
  --line: #e2e8f0;
  --line-2: #cbd5e1;
  --primary: #2563eb;
  --primary-2: #1d4ed8;
  --primary-soft: #dbeafe;
  --violet: #7c3aed;
  --violet-soft: #ede9fe;
  --green: #16a34a;
  --green-soft: #dcfce7;
  --orange: #ea580c;
  --orange-soft: #ffedd5;
  --red: #dc2626;
  --red-soft: #fee2e2;
  --cyan: #0891b2;
  --amber: #f59e0b;
  --shadow-sm: 0 1px 2px rgba(15,23,42,.06), 0 1px 3px rgba(15,23,42,.08);
  --shadow: 0 10px 30px -10px rgba(15,23,42,.18);
  --shadow-lg: 0 25px 50px -12px rgba(15,23,42,.28);
  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 24px;
  --header-h: 72px;
  --grad: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
  --grad-text: linear-gradient(90deg, #2563eb, #7c3aed 60%, #db2777);
}
[data-theme="dark"] {
  --bg: #0b1220;
  --bg-2: #111a2e;
  --bg-3: #172238;
  --text: #e2e8f0;
  --text-2: #cbd5e1;
  --muted: #94a3b8;
  --line: #1e293b;
  --line-2: #334155;
  --primary: #3b82f6;
  --primary-2: #60a5fa;
  --primary-soft: #1e3a8a;
  --violet-soft: #3b1d7a;
  --green-soft: #14532d;
  --orange-soft: #7c2d12;
  --red-soft: #7f1d1d;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
  --shadow: 0 10px 30px -10px rgba(0,0,0,.6);
  --shadow-lg: 0 25px 50px -12px rgba(0,0,0,.7);
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--text); background: var(--bg); line-height: 1.6; font-size: 16px; -webkit-font-smoothing: antialiased; transition: background .3s, color .3s; }
img { max-width: 100%; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-2); }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; font-weight: 800; letter-spacing: -.02em; }
h1 { font-size: clamp(2rem, 4.5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); }
h3 { font-size: 1.25rem; }
h4 { font-size: 1rem; }
p { margin: 0 0 1em; }
.container { width: min(1200px, 100% - 2rem); margin-inline: auto; }
.container-narrow { width: min(820px, 100% - 2rem); margin-inline: auto; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.xs { font-size: .78rem; }
.center { text-align: center; }
.mt-1{margin-top:.5rem}.mt-2{margin-top:1rem}.mt-3{margin-top:1.5rem}.mt-4{margin-top:2.5rem}.mb-2{margin-bottom:1rem}.mb-3{margin-bottom:1.5rem}.mb-4{margin-bottom:2.5rem}
.flex { display: flex; gap: .75rem; align-items: center; }
.flex-wrap { flex-wrap: wrap; }
.between { justify-content: space-between; }
.grid { display: grid; gap: 1.5rem; }
.grid-2 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--primary); color: #fff; padding: .5rem 1rem; z-index: 9999; }
.skip-link:focus { left: 1rem; top: 1rem; }
.gradient-text { background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; padding: .8rem 1.4rem; border-radius: 999px; font-weight: 700; font-size: .95rem; border: 1.5px solid transparent; cursor: pointer; transition: transform .15s, box-shadow .2s, background .2s, color .2s; font-family: inherit; line-height: 1.2; white-space: nowrap; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 8px 20px -8px rgba(37,99,235,.6); }
.btn-primary:hover { color: #fff; box-shadow: 0 12px 28px -8px rgba(124,58,237,.6); }
.btn-dark { background: var(--text); color: var(--bg); }
.btn-dark:hover { color: var(--bg); }
.btn-outline { border-color: var(--line-2); color: var(--text); background: transparent; }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-soft { background: var(--primary-soft); color: var(--primary-2); }
[data-theme="dark"] .btn-soft { color: #bfdbfe; }
.btn-success { background: var(--green); color: #fff; }
.btn-danger { background: var(--red-soft); color: var(--red); }
.btn-ghost { background: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--bg-3); }
.btn-sm { padding: .55rem 1rem; font-size: .85rem; }
.btn-lg { padding: 1rem 2rem; font-size: 1.05rem; }
.btn-block { width: 100%; }
.btn-google { background: #fff; color: #0f172a; border-color: var(--line-2); box-shadow: var(--shadow-sm); }
.btn-google:hover { color: #0f172a; border-color: #94a3b8; }
.btn svg { width: 18px; height: 18px; }
.icon-btn { width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg-2); color: var(--text-2); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transition: .2s; }
.icon-btn:hover { border-color: var(--primary); color: var(--primary); }
.icon-btn svg { width: 20px; height: 20px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 100; background: color-mix(in srgb, var(--bg-2) 82%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); transition: box-shadow .3s; }
.site-header.scrolled { box-shadow: var(--shadow-sm); }
.nav-wrap { display: flex; align-items: center; gap: 1.25rem; height: var(--header-h); }
.brand { display: flex; align-items: center; gap: .65rem; color: var(--text); }
.brand-mark { width: 42px; height: 42px; flex: none; }
.brand-mark svg { width: 100%; height: 100%; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong { font-size: 1.15rem; letter-spacing: -.02em; }
.brand-text .accent { color: var(--primary); }
.brand-text small { white-space: nowrap; font-size: .62rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font-weight: 600; }
.main-nav { display: flex; gap: .25rem; margin-left: 1rem; }
.nav-link { position: relative; white-space: nowrap; padding: .55rem .85rem; border-radius: 10px; color: var(--text-2); font-weight: 600; font-size: .92rem; }
.nav-link:hover, .nav-link.active { color: var(--primary); background: var(--bg-3); }
.has-menu { position: relative; }
.has-menu .mega { position: absolute; top: calc(100% + 10px); left: 0; width: 320px; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: .5rem; opacity: 0; visibility: hidden; transform: translateY(8px); transition: .2s; }
.has-menu:hover .mega, .has-menu:focus-within .mega { opacity: 1; visibility: visible; transform: translateY(0); }
.mega a { display: flex; gap: .75rem; align-items: center; padding: .7rem .8rem; border-radius: 10px; color: var(--text); }
.mega a:hover { background: var(--bg-3); }
.mega strong { display: block; font-size: .9rem; }
.mega small { color: var(--muted); font-size: .78rem; }
.ico { width: 36px; height: 36px; border-radius: 10px; background: var(--primary-soft); flex: none; display: grid; place-items: center; position: relative; }
.ico::after { content: ''; width: 16px; height: 16px; background: var(--primary); mask-size: contain; -webkit-mask-size: contain; mask-repeat: no-repeat; -webkit-mask-repeat: no-repeat; }
.ico-heart::after { mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3E%3Cpath d='M12 21s-7-4.5-9.5-9A5.5 5.5 0 0 1 12 6a5.5 5.5 0 0 1 9.5 6c-2.5 4.5-9.5 9-9.5 9z'/%3E%3C/svg%3E"); -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3E%3Cpath d='M12 21s-7-4.5-9.5-9A5.5 5.5 0 0 1 12 6a5.5 5.5 0 0 1 9.5 6c-2.5 4.5-9.5 9-9.5 9z'/%3E%3C/svg%3E"); }
.ico-rocket::after { mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3E%3Cpath d='M5 13l-2 6 6-2 9-9-4-4-9 9zm9-11l4 4 2-2-4-4-2 2zM4 20l1.5-1.5'/%3E%3C/svg%3E"); -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3E%3Cpath d='M5 13l-2 6 6-2 9-9-4-4-9 9zm9-11l4 4 2-2-4-4-2 2zM4 20l1.5-1.5'/%3E%3C/svg%3E"); }
.ico-grid::after { mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3E%3Cpath d='M3 3h8v8H3zM13 3h8v8h-8zM3 13h8v8H3zM13 13h8v8h-8z'/%3E%3C/svg%3E"); -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3E%3Cpath d='M3 3h8v8H3zM13 3h8v8h-8zM3 13h8v8H3zM13 13h8v8h-8z'/%3E%3C/svg%3E"); }
.nav-actions { margin-left: auto; display: flex; align-items: center; gap: .6rem; }
.nav-search { display: flex; align-items: center; background: var(--bg-3); border: 1px solid var(--line); border-radius: 12px; padding: 0 .25rem 0 .9rem; height: 42px; width: 230px; transition: .2s; }
.nav-search:focus-within { border-color: var(--primary); width: 280px; background: var(--bg-2); }
.nav-search input { border: 0; background: transparent; outline: 0; font: inherit; font-size: .88rem; color: var(--text); width: 100%; }
.nav-search button { border: 0; background: transparent; color: var(--muted); width: 34px; height: 34px; cursor: pointer; display: grid; place-items: center; }
.nav-search svg { width: 18px; height: 18px; }
.theme-toggle .moon, [data-theme="dark"] .theme-toggle .sun { display: none; }
#themeToggle .moon { display: none; }
[data-theme="dark"] #themeToggle .moon { display: block; }
[data-theme="dark"] #themeToggle .sun { display: none; }
.user-menu { position: relative; }
.user-btn { display: flex; align-items: center; gap: .5rem; border: 1px solid var(--line); background: var(--bg-2); border-radius: 999px; padding: 4px 12px 4px 4px; cursor: pointer; font: inherit; color: var(--text); font-weight: 600; font-size: .88rem; }
.user-btn img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.dropdown { position: absolute; right: 0; top: calc(100% + 8px); min-width: 200px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); padding: .4rem; opacity: 0; visibility: hidden; transform: translateY(6px); transition: .2s; z-index: 50; }
.user-menu:hover .dropdown, .user-menu:focus-within .dropdown, .user-menu.open .dropdown { opacity: 1; visibility: visible; transform: none; }
.dropdown a, .dropdown button { display: block; width: 100%; text-align: left; padding: .6rem .8rem; border-radius: 9px; color: var(--text); font: inherit; font-size: .9rem; background: none; border: 0; cursor: pointer; }
.dropdown a:hover, .dropdown button:hover { background: var(--bg-3); }
.dropdown .admin-link { color: var(--violet); font-weight: 700; }
.nav-toggle { display: none; flex-direction: column; gap: 4px; }
.nav-toggle span { width: 18px; height: 2px; background: currentColor; border-radius: 2px; transition: .2s; }
@media (max-width: 1200px) { .nav-search { width: 180px; } .brand-text small { display: none; } }
@media (max-width: 1024px) {
  .nav-search { display: none; }
  .main-nav { position: fixed; inset: var(--header-h) 0 auto 0; background: var(--bg-2); flex-direction: column; padding: 1rem; border-bottom: 1px solid var(--line); box-shadow: var(--shadow-lg); display: none; margin: 0; }
  .main-nav.open { display: flex; }
  .nav-toggle { display: flex; }
  .has-menu .mega { position: static; opacity: 1; visibility: visible; transform: none; width: 100%; box-shadow: none; border: 0; padding: .25rem 0 0 .5rem; }
  .user-btn span { display: none; }
}

/* Flash */
.flash-stack { position: fixed; top: calc(var(--header-h) + 12px); right: 16px; z-index: 200; display: flex; flex-direction: column; gap: .5rem; max-width: 380px; }
.flash { background: var(--bg-2); border: 1px solid var(--line); border-left: 4px solid var(--primary); padding: .8rem 2.4rem .8rem 1rem; border-radius: 12px; box-shadow: var(--shadow-lg); font-size: .9rem; position: relative; animation: slideIn .35s ease; }
.flash-success { border-left-color: var(--green); }
.flash-error { border-left-color: var(--red); }
.flash-info { border-left-color: var(--amber); }
.flash button { position: absolute; right: 8px; top: 6px; border: 0; background: none; font-size: 1.2rem; cursor: pointer; color: var(--muted); }
@keyframes slideIn { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: none; } }

/* Hero */
.hero { position: relative; overflow: hidden; padding: 4rem 0 3rem; }
.hero::before, .hero::after { content: ''; position: absolute; border-radius: 50%; filter: blur(80px); opacity: .35; z-index: 0; animation: float 14s ease-in-out infinite; }
.hero::before { width: 520px; height: 520px; background: #2563eb; top: -160px; left: -120px; }
.hero::after { width: 460px; height: 460px; background: #7c3aed; bottom: -200px; right: -100px; animation-delay: -7s; }
[data-theme="dark"] .hero::before, [data-theme="dark"] .hero::after { opacity: .25; }
@keyframes float { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(30px, -30px); } }
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.15fr .85fr; gap: 3rem; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: .5rem; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .14em; color: var(--primary); background: var(--primary-soft); padding: .45rem .9rem; border-radius: 999px; }
[data-theme="dark"] .eyebrow { color: #bfdbfe; }
.eyebrow::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 30%, transparent); animation: pulse 2s infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 30%, transparent); } 50% { box-shadow: 0 0 0 8px transparent; } }
.hero h1 { margin: 1rem 0; font-size: clamp(2.4rem, 5.2vw, 4rem); }
.hero .lead { font-size: 1.15rem; color: var(--text-2); max-width: 560px; }
.hero-cta { display: flex; gap: .8rem; flex-wrap: wrap; margin-top: 1.6rem; }
.hero-stats { display: flex; gap: 2rem; margin-top: 2.2rem; flex-wrap: wrap; }
.hero-stats div strong { display: block; font-size: 1.6rem; font-weight: 800; letter-spacing: -.03em; }
.hero-stats div span { font-size: .82rem; color: var(--muted); }
.hero-visual { position: relative; }
.hero-card { position: relative; border-radius: 28px; overflow: hidden; box-shadow: var(--shadow-lg); aspect-ratio: 4/5; max-width: 440px; margin-left: auto; background: var(--bg-3); }
.hero-card img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.hero-card::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(15,23,42,.85) 0%, transparent 55%); }
.hero-card .caption { position: absolute; left: 1.4rem; right: 1.4rem; bottom: 1.4rem; color: #fff; z-index: 2; }
.hero-card .caption strong { display: block; font-size: 1.25rem; }
.hero-card .caption span { font-size: .8rem; opacity: .85; text-transform: uppercase; letter-spacing: .1em; }
.float-badge { position: absolute; background: var(--bg-2); border: 1px solid var(--line); border-radius: 16px; padding: .7rem .9rem; box-shadow: var(--shadow); display: flex; align-items: center; gap: .6rem; font-size: .82rem; font-weight: 700; animation: bob 6s ease-in-out infinite; z-index: 3; }
.float-badge.b1 { top: 8%; left: -30px; }
.float-badge.b2 { bottom: 20%; left: -50px; animation-delay: -3s; }
.float-badge.b3 { top: 40%; right: -24px; animation-delay: -1.5s; }
.float-badge .dot { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: #fff; font-size: 1rem; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } .hero-card { margin: 0 auto; max-width: 360px; } .float-badge.b1, .float-badge.b2 { left: 0; } .float-badge.b3 { right: 0; } }

/* Marquee */
.marquee { overflow: hidden; border-block: 1px solid var(--line); background: var(--bg-2); padding: 1.1rem 0; }
.marquee-track { display: flex; gap: 3rem; width: max-content; animation: marquee 30s linear infinite; }
.marquee-track span { white-space: nowrap; font-weight: 700; color: var(--muted); font-size: .9rem; letter-spacing: .06em; text-transform: uppercase; display: flex; align-items: center; gap: .6rem; }
.marquee-track span::before { content: '◆'; color: var(--primary); font-size: .6rem; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* Sections */
.section { padding: 4.5rem 0; }
.section-alt { background: var(--bg-2); border-block: 1px solid var(--line); }
.section-dark { background: #0f172a; color: #e2e8f0; }
.section-dark .muted { color: #94a3b8; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 2.2rem; flex-wrap: wrap; }
.section-head h2 { margin-bottom: .3rem; }
.section-head p { margin: 0; color: var(--muted); max-width: 560px; }
.section-head .eyebrow { margin-bottom: .8rem; }

/* Cards */
.card { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); transition: transform .25s, box-shadow .25s, border-color .25s; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--line-2); }
.card-body { padding: 1.25rem; }
.course-card { display: flex; flex-direction: column; overflow: hidden; height: 100%; }
.course-card .thumb { position: relative; aspect-ratio: 16/10; overflow: hidden; background: var(--bg-3); }
.course-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.course-card:hover .thumb img { transform: scale(1.06); }
.course-card .thumb .badges { position: absolute; top: .8rem; left: .8rem; right: .8rem; display: flex; justify-content: space-between; gap: .4rem; }
.badge { display: inline-flex; align-items: center; gap: .3rem; font-size: .7rem; font-weight: 700; padding: .3rem .65rem; border-radius: 999px; text-transform: uppercase; letter-spacing: .06em; background: var(--bg-3); color: var(--text-2); line-height: 1.2; }
.badge-primary { background: var(--primary); color: #fff; }
.badge-free { background: var(--green); color: #fff; }
.badge-pro { background: linear-gradient(135deg, #f59e0b, #ea580c); color: #fff; }
.badge-soft { background: var(--primary-soft); color: var(--primary-2); }
[data-theme="dark"] .badge-soft { color: #bfdbfe; }
.badge-outline { border: 1px solid var(--line-2); background: transparent; }
.badge-cat { color: #fff; }
.course-card .card-body { display: flex; flex-direction: column; flex: 1; gap: .5rem; }
.course-card h3 { font-size: 1.05rem; margin: .2rem 0; }
.course-card h3 a { color: var(--text); }
.course-card h3 a:hover { color: var(--primary); }
.course-card .summary { color: var(--muted); font-size: .88rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin: 0; }
.course-meta { display: flex; gap: .9rem; font-size: .78rem; color: var(--muted); flex-wrap: wrap; }
.course-meta span { display: inline-flex; align-items: center; gap: .3rem; }
.course-meta svg { width: 14px; height: 14px; }
.course-foot { margin-top: auto; display: flex; justify-content: space-between; align-items: center; padding-top: .8rem; border-top: 1px dashed var(--line); }
.price { font-weight: 800; font-size: 1.05rem; }
.price .old { color: var(--muted); text-decoration: line-through; font-weight: 500; font-size: .8rem; margin-right: .3rem; }
.price.free { color: var(--green); }
.stars { color: var(--amber); font-size: .85rem; letter-spacing: 1px; }
.instructor-mini { display: flex; align-items: center; gap: .5rem; font-size: .8rem; color: var(--text-2); }
.instructor-mini img { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; }

/* Post cards */
.post-card { overflow: hidden; display: flex; flex-direction: column; height: 100%; }
.post-card .thumb { aspect-ratio: 16/9; overflow: hidden; background: var(--bg-3); }
.post-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.post-card:hover .thumb img { transform: scale(1.05); }
.post-card h3 { font-size: 1.1rem; }
.post-card h3 a { color: var(--text); }
.post-card h3 a:hover { color: var(--primary); }
.post-card .excerpt { color: var(--muted); font-size: .9rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.post-meta { display: flex; align-items: center; gap: .6rem; font-size: .8rem; color: var(--muted); margin-top: auto; padding-top: .8rem; }
.post-meta img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.post-featured { display: grid; grid-template-columns: 1.2fr 1fr; overflow: hidden; }
.post-featured .thumb { aspect-ratio: auto; min-height: 320px; }
.post-featured .thumb img { width: 100%; height: 100%; object-fit: cover; }
.post-featured .card-body { padding: 2rem; display: flex; flex-direction: column; justify-content: center; }
.post-featured h2 { font-size: 1.7rem; }
.post-featured h2 a { color: var(--text); }
@media (max-width: 800px) { .post-featured { grid-template-columns: 1fr; } }

/* Stats band */
.stats-band { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.stat-tile { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem; text-align: center; position: relative; overflow: hidden; }
.stat-tile::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--grad); }
.stat-tile strong { display: block; font-size: 2.2rem; font-weight: 800; letter-spacing: -.03em; background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat-tile span { color: var(--muted); font-size: .85rem; font-weight: 600; }
@media (max-width: 800px) { .stats-band { grid-template-columns: repeat(2, 1fr); } }

/* Founder */
.founder { display: grid; grid-template-columns: 1fr 1.3fr; gap: 3rem; align-items: center; }
.founder-photo { position: relative; }
.founder-photo img { border-radius: var(--radius-lg); aspect-ratio: 4/5; object-fit: cover; object-position: top; box-shadow: var(--shadow-lg); width: 100%; }
.founder-photo::before { content: ''; position: absolute; inset: 14px -14px -14px 14px; border-radius: var(--radius-lg); background: var(--grad); z-index: -1; opacity: .8; }
.founder-card { position: absolute; bottom: -18px; left: -18px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 16px; padding: .9rem 1.1rem; box-shadow: var(--shadow-lg); }
.founder-card strong { display: block; }
.founder-card span { font-size: .78rem; color: var(--muted); }
.checklist { list-style: none; padding: 0; margin: 1.2rem 0; display: grid; gap: .7rem; }
.checklist li { display: flex; gap: .7rem; align-items: start; color: var(--text-2); }
.checklist li::before { content: '✓'; flex: none; width: 24px; height: 24px; border-radius: 8px; background: var(--green-soft); color: var(--green); display: grid; place-items: center; font-weight: 800; font-size: .8rem; margin-top: 2px; }
@media (max-width: 900px) { .founder { grid-template-columns: 1fr; } .founder-photo { max-width: 420px; } }

/* Gallery */
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.gallery-item { position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4/3; background: var(--bg-3); cursor: zoom-in; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.gallery-item:hover img { transform: scale(1.05); }
.gallery-item figcaption { position: absolute; inset: auto 0 0 0; padding: 2rem 1rem .9rem; background: linear-gradient(to top, rgba(15,23,42,.9), transparent); color: #fff; font-size: .85rem; font-weight: 600; }
.gallery-item.tall { grid-row: span 2; aspect-ratio: auto; }
@media (max-width: 800px) { .gallery-grid { grid-template-columns: repeat(2, 1fr); } .gallery-item.tall { grid-row: auto; aspect-ratio: 4/3; } }
.lightbox { position: fixed; inset: 0; background: rgba(2,6,23,.92); z-index: 500; display: none; align-items: center; justify-content: center; padding: 2rem; }
.lightbox.open { display: flex; }
.lightbox img { max-width: 100%; max-height: 85vh; border-radius: 12px; box-shadow: var(--shadow-lg); }
.lightbox figcaption { position: absolute; bottom: 1.5rem; left: 0; right: 0; text-align: center; color: #fff; }
.lightbox button { position: absolute; top: 1rem; right: 1rem; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255,255,255,.15); color: #fff; font-size: 1.4rem; cursor: pointer; }

/* Credentials */
.cred-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1rem; }
.cred { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; text-align: center; }
.cred img { aspect-ratio: 1; object-fit: cover; width: 100%; height: auto; display: block; }
.cred { margin: 0; }
.cred span { display: block; padding: .7rem .6rem; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--text-2); }
@media (max-width: 900px) { .cred-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 600px) { .cred-grid { grid-template-columns: repeat(2, 1fr); } }

/* Partners */
.partner-logos { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; }
.partner-logo { background: var(--bg-2); border: 1px solid var(--line); border-radius: 14px; padding: .8rem 1.2rem; display: flex; align-items: center; gap: .7rem; font-weight: 700; font-size: .85rem; color: var(--text-2); }
.partner-logo img { height: 36px; width: 54px; object-fit: cover; border-radius: 8px; }

/* Testimonials */
.testimonial { padding: 1.6rem; position: relative; }
.testimonial::before { content: '“'; position: absolute; top: .4rem; right: 1.2rem; font-size: 4rem; color: var(--primary-soft); font-family: Georgia, serif; line-height: 1; }
.testimonial p { color: var(--text-2); font-size: .95rem; }
.testimonial .who { display: flex; align-items: center; gap: .7rem; }
.testimonial .who img { width: 42px; height: 42px; border-radius: 50%; }
.testimonial .who strong { display: block; font-size: .9rem; }
.testimonial .who span { font-size: .78rem; color: var(--muted); }

/* CTA */
.cta-box { background: var(--grad); color: #fff; border-radius: var(--radius-lg); padding: 3rem; display: grid; grid-template-columns: 1.3fr 1fr; gap: 2rem; align-items: center; position: relative; overflow: hidden; }
.cta-box::after { content: ''; position: absolute; width: 400px; height: 400px; border-radius: 50%; background: rgba(255,255,255,.12); right: -120px; top: -120px; }
.cta-box h2 { color: #fff; }
.cta-box p { color: rgba(255,255,255,.85); }
.cta-box .btn-light { background: #fff; color: var(--primary-2); }
.cta-box .btn-light:hover { color: var(--primary-2); }
.cta-box .video-embed { position: relative; z-index: 1; }
@media (max-width: 800px) { .cta-box { grid-template-columns: 1fr; padding: 2rem; } }

/* Video */
.video-embed { position: relative; aspect-ratio: 16/9; border-radius: var(--radius); overflow: hidden; background: #000; box-shadow: var(--shadow); }
.video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-embed.lite { cursor: pointer; }
.video-embed.lite img { width: 100%; height: 100%; object-fit: cover; opacity: .9; }
.video-embed.lite .play { position: absolute; inset: 0; display: grid; place-items: center; }
.video-embed.lite .play span { width: 72px; height: 72px; border-radius: 50%; background: rgba(255,0,0,.9); display: grid; place-items: center; box-shadow: 0 10px 30px rgba(0,0,0,.4); transition: transform .2s; }
.video-embed.lite:hover .play span { transform: scale(1.08); }
.video-embed.lite .play svg { width: 30px; height: 30px; fill: #fff; margin-left: 4px; }

/* Page hero */
.page-hero { background: var(--bg-2); border-bottom: 1px solid var(--line); padding: 3rem 0 2.2rem; position: relative; overflow: hidden; }
.page-hero::after { content: ''; position: absolute; width: 400px; height: 400px; border-radius: 50%; background: var(--primary); filter: blur(120px); opacity: .12; right: -100px; top: -150px; }
.page-hero h1 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); }
.page-hero p { color: var(--muted); max-width: 640px; margin: 0; }
.breadcrumb { display: flex; gap: .4rem; font-size: .8rem; color: var(--muted); margin-bottom: .8rem; flex-wrap: wrap; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--primary); }

/* Filters */
.filters { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; margin: 1.2rem 0 2rem; }
.chip { padding: .45rem .95rem; border-radius: 999px; border: 1px solid var(--line-2); background: var(--bg-2); font-size: .85rem; font-weight: 600; color: var(--text-2); cursor: pointer; transition: .2s; }
.chip:hover { border-color: var(--primary); color: var(--primary); }
.chip.active { background: var(--text); color: var(--bg); border-color: var(--text); }
.layout-sidebar { display: grid; grid-template-columns: 260px 1fr; gap: 2rem; align-items: start; }
.layout-sidebar-r { display: grid; grid-template-columns: 1fr 320px; gap: 2.5rem; align-items: start; }
.sidebar { position: sticky; top: calc(var(--header-h) + 1rem); display: grid; gap: 1.2rem; }
.sidebar-box { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem; }
.sidebar-box h4 { margin-bottom: .7rem; font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.sidebar-box a.item { display: flex; justify-content: space-between; padding: .45rem 0; color: var(--text-2); font-size: .9rem; border-bottom: 1px dashed var(--line); }
.sidebar-box a.item:last-child { border: 0; }
.sidebar-box a.item:hover, .sidebar-box a.item.active { color: var(--primary); }
.sidebar-box a.item .count { color: var(--muted); font-size: .78rem; }
@media (max-width: 900px) { .layout-sidebar, .layout-sidebar-r { grid-template-columns: 1fr; } .sidebar { position: static; } }

/* Forms */
.form-group { margin-bottom: 1.1rem; }
label { display: block; font-weight: 600; font-size: .88rem; margin-bottom: .35rem; color: var(--text-2); }
.input, input[type=text], input[type=email], input[type=url], input[type=search], input[type=number], input[type=tel], input[type=password], select, textarea { width: 100%; padding: .75rem .95rem; border: 1.5px solid var(--line-2); border-radius: 12px; background: var(--bg-2); color: var(--text); font: inherit; font-size: .95rem; transition: .2s; }
input:focus, select:focus, textarea:focus { outline: 0; border-color: var(--primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 18%, transparent); }
textarea { min-height: 140px; resize: vertical; line-height: 1.6; }
textarea.code { font-family: var(--mono); font-size: .88rem; min-height: 320px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-hint { font-size: .78rem; color: var(--muted); margin-top: .3rem; }
.checkbox { display: flex; align-items: center; gap: .5rem; font-weight: 500; cursor: pointer; }
.checkbox input { width: 18px; height: 18px; accent-color: var(--primary); }
@media (max-width: 640px) { .form-row { grid-template-columns: 1fr; } }

/* Pagination */
.pagination { display: flex; gap: .4rem; justify-content: center; margin: 2.5rem 0 0; flex-wrap: wrap; }
.pagination a { min-width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--line); background: var(--bg-2); color: var(--text-2); font-weight: 600; font-size: .9rem; }
.pagination a.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* Prose */
.prose { font-size: 1.05rem; line-height: 1.8; color: var(--text-2); }
.prose h2, .prose h3, .prose h4 { color: var(--text); margin-top: 2em; }
.prose h2 { font-size: 1.6rem; padding-bottom: .3em; border-bottom: 1px solid var(--line); }
.prose h3 { font-size: 1.25rem; }
.prose p { margin-bottom: 1.2em; }
.prose img { border-radius: var(--radius); margin: 1.5em auto; }
.prose blockquote { border-left: 4px solid var(--primary); background: var(--bg-3); padding: 1rem 1.4rem; border-radius: 0 12px 12px 0; margin: 1.5em 0; font-style: italic; }
.prose blockquote p:last-child { margin: 0; }
.prose pre { background: #0f172a; color: #e2e8f0; padding: 1.2rem; border-radius: 12px; overflow-x: auto; font-family: var(--mono); font-size: .88rem; line-height: 1.6; }
.prose code { font-family: var(--mono); background: var(--bg-3); padding: .15em .4em; border-radius: 6px; font-size: .9em; color: var(--violet); }
.prose pre code { background: none; padding: 0; color: inherit; }
.prose ul, .prose ol { padding-left: 1.4em; margin-bottom: 1.2em; }
.prose li { margin: .4em 0; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.5em 0; }
.prose .video-embed { margin: 1.8em 0; }
.prose a { text-decoration: underline; text-underline-offset: 3px; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.5em 0; font-size: .92rem; }
.prose th, .prose td { border: 1px solid var(--line); padding: .6rem .8rem; }
.prose th { background: var(--bg-3); }

/* Article */
.article-head { padding: 3rem 0 2rem; }
.article-head h1 { font-size: clamp(1.8rem, 3.8vw, 2.8rem); max-width: 900px; }
.article-meta { display: flex; align-items: center; gap: .8rem; color: var(--muted); font-size: .88rem; flex-wrap: wrap; }
.article-meta img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.article-meta strong { color: var(--text); display: block; }
.article-cover { border-radius: var(--radius-lg); overflow: hidden; margin: 1.5rem 0 2.5rem; aspect-ratio: 21/9; box-shadow: var(--shadow); }
.article-cover img { width: 100%; height: 100%; object-fit: cover; }
.tags { display: flex; gap: .4rem; flex-wrap: wrap; }
.tags a { font-size: .78rem; padding: .3rem .7rem; border-radius: 999px; background: var(--bg-3); color: var(--text-2); font-weight: 600; }
.tags a:hover { background: var(--primary-soft); color: var(--primary-2); }
.share-bar { display: flex; gap: .5rem; align-items: center; margin: 2rem 0; padding: 1rem 0; border-block: 1px solid var(--line); flex-wrap: wrap; }
.research-box { background: var(--bg-3); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem 1.4rem; margin-bottom: 2rem; font-size: .92rem; display: grid; gap: .4rem; }
.research-box strong { color: var(--text); }
.author-box { display: flex; gap: 1.2rem; padding: 1.5rem; margin-top: 2.5rem; align-items: start; }
.author-box img { width: 72px; height: 72px; border-radius: 50%; flex: none; object-fit: cover; }
.author-box h4 { margin-bottom: .2rem; }
.author-box p { font-size: .9rem; color: var(--muted); margin: .4rem 0 0; }

/* Comments */
.comments { margin-top: 3rem; }
.comment { display: flex; gap: .9rem; padding: 1.1rem 0; border-bottom: 1px solid var(--line); }
.comment img { width: 42px; height: 42px; border-radius: 50%; flex: none; object-fit: cover; }
.comment .who { display: flex; gap: .5rem; align-items: center; font-size: .85rem; margin-bottom: .3rem; }
.comment .who strong { color: var(--text); }
.comment .who time { color: var(--muted); }
.comment p { margin: 0; white-space: pre-line; color: var(--text-2); font-size: .95rem; }
.role-tag { font-size: .65rem; font-weight: 800; padding: .15rem .45rem; border-radius: 6px; text-transform: uppercase; letter-spacing: .05em; }
.role-admin { background: var(--violet-soft); color: var(--violet); }
.role-instructor { background: var(--primary-soft); color: var(--primary-2); }
[data-theme="dark"] .role-admin { color: #ddd6fe; } [data-theme="dark"] .role-instructor { color: #bfdbfe; }
.login-prompt { background: var(--bg-3); border: 1px dashed var(--line-2); border-radius: var(--radius); padding: 1.4rem; text-align: center; }

/* Course detail */
.course-hero { background: #0f172a; color: #e2e8f0; padding: 3rem 0; position: relative; overflow: hidden; }
.course-hero::before { content: ''; position: absolute; inset: 0; background: radial-gradient(600px 300px at 20% 20%, rgba(37,99,235,.35), transparent), radial-gradient(500px 300px at 80% 80%, rgba(124,58,237,.3), transparent); }
.course-hero .container { position: relative; z-index: 1; }
.course-hero-grid { display: grid; grid-template-columns: 1fr 380px; gap: 3rem; align-items: start; }
.course-hero h1 { color: #fff; font-size: clamp(1.8rem, 3.5vw, 2.6rem); }
.course-hero .lead { color: #cbd5e1; font-size: 1.05rem; }
.course-hero .breadcrumb, .course-hero .breadcrumb a { color: #94a3b8; }
.course-hero .course-meta { color: #cbd5e1; font-size: .88rem; }
.course-hero .instructor-mini { color: #e2e8f0; }
.course-hero .instructor-mini img { width: 36px; height: 36px; }
.buy-box { background: var(--bg-2); color: var(--text); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg); position: sticky; top: calc(var(--header-h) + 1rem); }
.buy-box .video-embed { border-radius: 0; box-shadow: none; }
.buy-box .thumb { aspect-ratio: 16/9; overflow: hidden; }
.buy-box .thumb img { width: 100%; height: 100%; object-fit: cover; }
.buy-box .inner { padding: 1.4rem; display: grid; gap: .9rem; }
.buy-box .price { font-size: 1.8rem; }
.buy-box ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; font-size: .88rem; color: var(--text-2); }
.buy-box li { display: flex; gap: .5rem; align-items: center; }
.buy-box li svg { width: 16px; height: 16px; color: var(--green); flex: none; }
.progress { height: 8px; background: var(--bg-3); border-radius: 999px; overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--grad); border-radius: inherit; transition: width .6s; }
.course-body { display: grid; grid-template-columns: 1fr 380px; gap: 3rem; }
.course-body > aside { visibility: hidden; }
.tabs { display: flex; gap: .25rem; border-bottom: 1px solid var(--line); margin-bottom: 1.6rem; overflow-x: auto; }
.tab { padding: .75rem 1.1rem; font-weight: 700; color: var(--muted); border-bottom: 2px solid transparent; cursor: pointer; font-size: .92rem; white-space: nowrap; background: none; border-top: 0; border-left: 0; border-right: 0; font-family: inherit; }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab-pane { display: none; }
.tab-pane.active { display: block; animation: fadeUp .35s ease; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.outcomes { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; padding: 1.4rem; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 2rem; }
.outcomes div { display: flex; gap: .6rem; font-size: .92rem; color: var(--text-2); }
.outcomes div::before { content: '✓'; color: var(--green); font-weight: 800; }
@media (max-width: 640px) { .outcomes { grid-template-columns: 1fr; } }
.curriculum { display: grid; gap: .8rem; }
.curriculum details { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.curriculum summary { padding: 1rem 1.2rem; font-weight: 700; cursor: pointer; display: flex; justify-content: space-between; align-items: center; list-style: none; }
.curriculum summary::-webkit-details-marker { display: none; }
.curriculum summary::after { content: '+'; font-size: 1.3rem; color: var(--muted); transition: .2s; }
.curriculum details[open] summary::after { transform: rotate(45deg); }
.curriculum summary small { color: var(--muted); font-weight: 500; font-size: .8rem; }
.lesson-row { display: flex; align-items: center; gap: .8rem; padding: .75rem 1.2rem; border-top: 1px solid var(--line); font-size: .92rem; color: var(--text-2); }
.lesson-row:hover { background: var(--bg-3); }
.lesson-row .num { width: 28px; height: 28px; border-radius: 8px; background: var(--bg-3); display: grid; place-items: center; font-size: .75rem; font-weight: 700; color: var(--muted); flex: none; }
.lesson-row.done .num { background: var(--green-soft); color: var(--green); }
.lesson-row .ttl { flex: 1; color: inherit; }
.lesson-row .ttl:hover { color: var(--primary); }
.lesson-row .dur { color: var(--muted); font-size: .78rem; }
.lesson-row .lock { color: var(--muted); }
.lesson-row .lock svg, .lesson-row .play svg { width: 16px; height: 16px; }
.lesson-row .play { color: var(--primary); }
.review { display: flex; gap: .9rem; padding: 1rem 0; border-bottom: 1px solid var(--line); }
.review img { width: 44px; height: 44px; border-radius: 50%; }
.rating-input { display: flex; flex-direction: row-reverse; justify-content: flex-end; gap: .2rem; }
.rating-input input { display: none; }
.rating-input label { font-size: 1.6rem; color: var(--line-2); cursor: pointer; margin: 0; }
.rating-input input:checked ~ label, .rating-input label:hover, .rating-input label:hover ~ label { color: var(--amber); }
@media (max-width: 960px) { .course-hero-grid, .course-body { grid-template-columns: 1fr; } .buy-box { position: static; } .course-body > aside { display: none; } }

/* Learn layout */
.learn { display: grid; grid-template-columns: 1fr 360px; min-height: calc(100vh - var(--header-h)); }
.learn-main { padding: 1.5rem 2rem 3rem; min-width: 0; }
.learn-side { background: var(--bg-2); border-left: 1px solid var(--line); position: sticky; top: var(--header-h); height: calc(100vh - var(--header-h)); overflow-y: auto; }
.learn-side .head { padding: 1.1rem 1.2rem; border-bottom: 1px solid var(--line); }
.learn-side .head strong { display: block; font-size: .95rem; }
.learn-side .section-title { padding: .7rem 1.2rem .4rem; font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 700; }
.learn-side .lesson-row { padding: .7rem 1.2rem; border-top: 0; }
.learn-side .lesson-row.current { background: var(--primary-soft); color: var(--primary-2); font-weight: 700; }
[data-theme="dark"] .learn-side .lesson-row.current { color: #bfdbfe; }
.learn-nav { display: flex; justify-content: space-between; gap: 1rem; margin-top: 2rem; flex-wrap: wrap; }
.locked-box { aspect-ratio: 16/9; border-radius: var(--radius); background: #0f172a; color: #fff; display: grid; place-items: center; text-align: center; padding: 2rem; }
.locked-box svg { width: 48px; height: 48px; margin-bottom: .8rem; }
.learn-head { display: flex; justify-content: space-between; gap: 1rem; align-items: center; margin-bottom: 1.2rem; flex-wrap: wrap; }
.learn-head h1 { font-size: 1.5rem; margin: 0; }
.learn-side-toggle { display: none; }
@media (max-width: 960px) { .learn { grid-template-columns: 1fr; } .learn-side { position: static; height: auto; border-left: 0; border-top: 1px solid var(--line); max-height: 60vh; } .learn-main { padding: 1.2rem 1rem; } }

/* Forum */
.forum-cat { display: flex; gap: 1rem; align-items: center; padding: 1.1rem 1.2rem; }
.forum-cat .icon { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 1.1rem; flex: none; }
.forum-cat h3 { font-size: 1rem; margin: 0 0 .15rem; }
.forum-cat h3 a { color: var(--text); }
.forum-cat p { margin: 0; font-size: .85rem; color: var(--muted); }
.forum-cat .nums { margin-left: auto; text-align: right; font-size: .8rem; color: var(--muted); white-space: nowrap; }
.forum-cat .nums strong { display: block; color: var(--text); font-size: 1rem; }
.thread-list { display: grid; gap: .6rem; }
.thread { display: flex; gap: 1rem; align-items: center; padding: 1rem 1.2rem; }
.thread img { width: 44px; height: 44px; border-radius: 50%; flex: none; object-fit: cover; }
.thread .body { flex: 1; min-width: 0; }
.thread h3 { font-size: 1rem; margin: 0 0 .2rem; display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.thread h3 a { color: var(--text); }
.thread h3 a:hover { color: var(--primary); }
.thread .sub { font-size: .8rem; color: var(--muted); display: flex; gap: .6rem; flex-wrap: wrap; }
.thread .nums { display: flex; gap: 1.2rem; font-size: .8rem; color: var(--muted); text-align: center; }
.thread .nums strong { display: block; color: var(--text); font-size: 1rem; }
.pin { color: var(--orange); }
.solved { color: var(--green); }
.thread-post { padding: 1.6rem; }
.thread-post .who { display: flex; gap: .8rem; align-items: center; margin-bottom: 1rem; }
.thread-post .who img { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; }
.thread-post .who strong { display: block; }
.thread-post .who span { font-size: .8rem; color: var(--muted); }
.thread-post .content { color: var(--text-2); }
.thread-post.answer { border-color: var(--green); background: color-mix(in srgb, var(--green-soft) 40%, var(--bg-2)); }
.answer-tag { background: var(--green); color: #fff; font-size: .7rem; font-weight: 800; padding: .25rem .6rem; border-radius: 999px; text-transform: uppercase; }
.top-member { display: flex; align-items: center; gap: .6rem; padding: .5rem 0; font-size: .88rem; }
.top-member img { width: 32px; height: 32px; border-radius: 50%; }
.top-member .pts { margin-left: auto; font-weight: 700; color: var(--primary); font-size: .8rem; }

/* Dashboard */
.dash-head { background: var(--grad); color: #fff; border-radius: var(--radius-lg); padding: 2rem; display: flex; gap: 1.5rem; align-items: center; flex-wrap: wrap; }
.dash-head img { width: 84px; height: 84px; border-radius: 50%; border: 4px solid rgba(255,255,255,.4); object-fit: cover; }
.dash-head h1 { color: #fff; font-size: 1.8rem; margin: 0; }
.dash-head p { margin: .2rem 0 0; color: rgba(255,255,255,.85); }
.dash-head .stats { margin-left: auto; display: flex; gap: 1.5rem; }
.dash-head .stats div { text-align: center; }
.dash-head .stats strong { display: block; font-size: 1.6rem; }
.dash-head .stats span { font-size: .78rem; opacity: .85; }
.enroll-card { display: grid; grid-template-columns: 140px 1fr; gap: 1rem; overflow: hidden; }
.enroll-card .thumb { background: var(--bg-3); }
.enroll-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.enroll-card .card-body { padding: 1rem 1rem 1rem 0; }
.enroll-card h3 { font-size: 1rem; }
.enroll-card h3 a { color: var(--text); }
.status-pill { font-size: .7rem; font-weight: 800; padding: .25rem .6rem; border-radius: 999px; text-transform: uppercase; }
.status-active { background: var(--primary-soft); color: var(--primary-2); }
.status-pending { background: var(--orange-soft); color: var(--orange); }
.status-completed { background: var(--green-soft); color: var(--green); }
.status-published { background: var(--green-soft); color: var(--green); }
.status-draft { background: var(--bg-3); color: var(--muted); }
[data-theme="dark"] .status-active { color: #bfdbfe; }

/* Tables */
.table-wrap { overflow-x: auto; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); }
table.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th, .table td { padding: .8rem 1rem; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table th { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); background: var(--bg-3); }
.table tr:last-child td { border-bottom: 0; }
.table tr:hover td { background: var(--bg-3); }
.table .actions { display: flex; gap: .4rem; flex-wrap: wrap; }
.table form { display: inline; }

/* Auth */
.auth-wrap { min-height: calc(100vh - var(--header-h)); display: grid; grid-template-columns: 1fr 1fr; }
.auth-side { background: var(--grad); color: #fff; padding: 4rem; display: flex; flex-direction: column; justify-content: center; position: relative; overflow: hidden; }
.auth-side::after { content: ''; position: absolute; width: 500px; height: 500px; border-radius: 50%; background: rgba(255,255,255,.1); bottom: -200px; right: -200px; }
.auth-side h2 { color: #fff; font-size: 2.2rem; }
.auth-side p { color: rgba(255,255,255,.85); }
.auth-side ul { list-style: none; padding: 0; display: grid; gap: .8rem; }
.auth-side li { display: flex; gap: .7rem; align-items: center; }
.auth-side li::before { content: '✓'; width: 26px; height: 26px; border-radius: 8px; background: rgba(255,255,255,.2); display: grid; place-items: center; font-weight: 800; flex: none; }
.auth-form { display: flex; align-items: center; justify-content: center; padding: 3rem 1.5rem; }
.auth-card { width: 100%; max-width: 420px; }
.auth-card h1 { font-size: 1.8rem; }
.auth-divider { display: flex; align-items: center; gap: 1rem; color: var(--muted); font-size: .8rem; margin: 1.5rem 0; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.auth-note { font-size: .8rem; color: var(--muted); margin-top: 1.5rem; }
.auth-error { background: var(--red-soft); color: var(--red); padding: .8rem 1rem; border-radius: 10px; font-size: .88rem; display: none; margin-top: 1rem; }
@media (max-width: 900px) { .auth-wrap { grid-template-columns: 1fr; } .auth-side { padding: 2.5rem 1.5rem; } }

/* Misc */
.empty { text-align: center; padding: 3rem 1rem; color: var(--muted); background: var(--bg-2); border: 1px dashed var(--line-2); border-radius: var(--radius); }
.empty svg { width: 48px; height: 48px; margin-bottom: .8rem; opacity: .5; }
.back-top { position: fixed; right: 20px; bottom: 20px; width: 46px; height: 46px; border-radius: 50%; border: 0; background: var(--text); color: var(--bg); font-size: 1.2rem; cursor: pointer; opacity: 0; visibility: hidden; transition: .3s; z-index: 90; box-shadow: var(--shadow-lg); }
.back-top.show { opacity: 1; visibility: visible; }
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
.reveal-delay-1 { transition-delay: .1s; } .reveal-delay-2 { transition-delay: .2s; } .reveal-delay-3 { transition-delay: .3s; }
.feature { padding: 1.6rem; }
.feature .icon { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 1rem; font-size: 1.4rem; color: #fff; }
.feature h3 { font-size: 1.1rem; }
.feature p { color: var(--muted); font-size: .92rem; margin: 0; }
.timeline { position: relative; padding-left: 2rem; display: grid; gap: 1.6rem; }
.timeline::before { content: ''; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px; background: var(--line-2); }
.timeline li { list-style: none; position: relative; }
.timeline li::before { content: ''; position: absolute; left: -2rem; top: 6px; width: 16px; height: 16px; border-radius: 50%; background: var(--primary); border: 3px solid var(--bg); box-shadow: 0 0 0 2px var(--primary); }
.timeline strong { display: block; }
.timeline span { color: var(--muted); font-size: .9rem; }
.contact-grid { display: grid; grid-template-columns: 1fr 1.3fr; gap: 3rem; }
.contact-item { display: flex; gap: 1rem; align-items: start; margin-bottom: 1.4rem; }
.contact-item .icon { width: 46px; height: 46px; border-radius: 12px; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; flex: none; }
.contact-item .icon svg { width: 22px; height: 22px; }
.contact-item strong { display: block; }
.contact-item a, .contact-item span { color: var(--text-2); font-size: .95rem; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }
.search-section h2 { font-size: 1.3rem; margin: 2rem 0 1rem; }

/* Footer */
.site-footer { background: #0f172a; color: #cbd5e1; padding: 4rem 0 2rem; margin-top: 4rem; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 2.5rem; }
.footer-brand .brand { color: #fff; margin-bottom: 1rem; }
.footer-brand .brand small { color: #94a3b8; }
.footer-brand p { font-size: .9rem; color: #94a3b8; }
.site-footer h4 { color: #fff; font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; margin-bottom: 1rem; }
.site-footer .footer-grid > div > a:not(.brand) { display: block; color: #cbd5e1; font-size: .92rem; padding: .3rem 0; }
.site-footer a:hover { color: #fff; }
.social { display: flex; gap: .6rem; margin-top: 1rem; }
.social a { width: 40px; height: 40px; border-radius: 12px; background: rgba(255,255,255,.08); display: grid; place-items: center; color: #fff; transition: .2s; }
.social a:hover { background: var(--primary); transform: translateY(-2px); }
.social svg { width: 18px; height: 18px; }
.newsletter { display: flex; gap: .5rem; margin-top: 1rem; }
.newsletter input { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.12); color: #fff; }
.newsletter input::placeholder { color: #64748b; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); margin-top: 3rem; padding-top: 1.5rem; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: .82rem; color: #94a3b8; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }

/* Admin */
.admin { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; background: linear-gradient(90deg, var(--ink) 250px, transparent 250px); }
.admin-side { background: #0f172a; color: #cbd5e1; padding: 1.2rem; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.admin-side .brand { color: #fff; margin-bottom: 1.5rem; }
.admin-side .brand small { color: #94a3b8; }
.admin-side nav { display: grid; gap: .2rem; }
.admin-side nav a { display: flex; align-items: center; gap: .7rem; padding: .7rem .9rem; border-radius: 10px; color: #cbd5e1; font-weight: 600; font-size: .9rem; }
.admin-side nav a:hover, .admin-side nav a.active { background: rgba(255,255,255,.08); color: #fff; }
.admin-side nav a.active { background: var(--primary); }
.admin-side nav .sep { font-size: .68rem; text-transform: uppercase; letter-spacing: .12em; color: #64748b; padding: 1rem .9rem .3rem; font-weight: 700; }
.admin-main { padding: 1.5rem 2rem 3rem; min-width: 0; }
.admin-top { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1.8rem; flex-wrap: wrap; }
.admin-top h1 { font-size: 1.6rem; margin: 0; }
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.kpi { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem; }
.kpi span { font-size: .78rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.kpi strong { display: block; font-size: 1.9rem; font-weight: 800; letter-spacing: -.03em; }
.kpi small { color: var(--primary); font-weight: 600; }
.panel { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.3rem 1.4rem; margin-bottom: 1.5rem; }
.panel h3 { font-size: 1rem; margin-bottom: 1rem; display: flex; justify-content: space-between; align-items: center; }
.admin-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.admin-toggle { display: none; }
@media (max-width: 960px) { .admin { grid-template-columns: 1fr; background: none; } .admin-side { position: static; height: auto; } .admin-grid-2 { grid-template-columns: 1fr; } .admin-main { padding: 1.2rem 1rem; } }
.bars { display: flex; align-items: end; gap: 6px; height: 120px; }
.bars div { flex: 1; background: var(--grad); border-radius: 6px 6px 0 0; min-height: 4px; position: relative; }
.bars div::after { content: attr(data-n); position: absolute; top: -18px; left: 0; right: 0; text-align: center; font-size: .7rem; color: var(--muted); }
.thumb-sm { width: 64px; height: 42px; object-fit: cover; border-radius: 8px; }
.gallery-admin { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 1rem; }
.gallery-admin figure { margin: 0; background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.gallery-admin img { aspect-ratio: 4/3; object-fit: cover; width: 100%; }
.gallery-admin figcaption { padding: .6rem; font-size: .78rem; }

@media print { .site-header, .site-footer, .back-top, .flash-stack { display: none; } }

/* Mobile header tweaks */
@media (max-width: 560px) {
  .nav-wrap { gap: .5rem; }
  .brand-mark { width: 36px; height: 36px; }
  .brand-text strong { font-size: 1rem; }
  .nav-actions { gap: .4rem; }
  .nav-actions .btn-primary { padding: .5rem .8rem; font-size: .8rem; }
  .icon-btn { width: 38px; height: 38px; }
  .hero { padding: 2.5rem 0 2rem; }
  .hero-stats { gap: 1.2rem; }
  .hero-stats div strong { font-size: 1.3rem; }
  .section { padding: 3rem 0; }
  .cta-box { padding: 1.5rem; }
}

/* Icons, focus, motion */
.i { width: 1em; height: 1em; vertical-align: -0.15em; flex: none; }
.i-lg { width: 22px; height: 22px; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--primary) 55%, transparent); outline-offset: 2px; border-radius: 6px; }
.btn:focus-visible { outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } .reveal { opacity: 1; transform: none; } }
.nav-link::after { content: ''; position: absolute; left: .85rem; right: .85rem; bottom: 4px; height: 2px; border-radius: 2px; background: var(--primary); transform: scaleX(0); transition: transform .2s; transform-origin: left; }
.nav-link:hover::after, .nav-link.active::after { transform: scaleX(1); }
.nav-link.active { background: transparent; }
.mobile-search { display: none; }
@media (max-width: 1024px) { .mobile-search { display: flex; margin: 0 0 .6rem; width: 100%; } }
.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; }
.feature { padding: 1.6rem; position: relative; overflow: hidden; }
.feature::after { content: ''; position: absolute; width: 140px; height: 140px; border-radius: 50%; right: -50px; bottom: -60px; background: var(--primary-soft); opacity: .5; transition: transform .4s; }
.feature:hover::after { transform: scale(1.4); }
.feature > * { position: relative; z-index: 1; }
.feature .icon svg { width: 24px; height: 24px; }
@media (max-width: 960px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .features { grid-template-columns: 1fr; } }
.faq { display: grid; gap: .7rem; max-width: 820px; margin: 0 auto; }
.faq details { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 0 1.3rem; transition: border-color .2s; }
.faq details[open] { border-color: var(--primary); }
.faq summary { padding: 1.1rem 0; font-weight: 700; cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-size: 1.4rem; color: var(--primary); font-weight: 400; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq p { color: var(--muted); padding-bottom: 1.1rem; margin: 0; }
.roadmap { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; counter-reset: step; }
.roadmap-step { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem; position: relative; }
.roadmap-step::before { counter-increment: step; content: counter(step, decimal-leading-zero); font-size: 2.4rem; font-weight: 800; background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; line-height: 1; display: block; margin-bottom: .6rem; }
.roadmap-step h3 { font-size: 1.05rem; }
.roadmap-step p { margin: 0; font-size: .9rem; color: var(--muted); }
.roadmap-step .tag { display: inline-block; margin-top: .8rem; font-size: .72rem; font-weight: 700; color: var(--primary); }
@media (max-width: 960px) { .roadmap { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .roadmap { grid-template-columns: 1fr; } }
.pagination a.nav { padding: 0 .9rem; }
.course-meta .i, .post-meta .i, .article-meta .i { opacity: .7; }
.hero-card img { transition: transform 1.2s; }
.hero-visual:hover .hero-card img { transform: scale(1.03); }
.section-head h2 { position: relative; }
.toc { background: var(--bg-3); border-radius: var(--radius); padding: 1rem 1.3rem; margin-bottom: 1.8rem; font-size: .92rem; }
.toc strong { display: block; margin-bottom: .4rem; font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.toc a { display: block; padding: .2rem 0; color: var(--text-2); }
.toc a.l3 { padding-left: 1rem; font-size: .88rem; }

/* ===================== Bright theme ===================== */
:root { --pink: #f43f5e; --sky: #0ea5e9; --amber-soft: #fef3c7; }
body.theme-bright { --bg: #ffffff; --bg-2: #ffffff; --bg-3: #f5f7ff; --line: #e8ecf5; --line-2: #d6dcec; --text: #0f172a; --text-2: #3b4a66; --muted: #6b7a99; --shadow-sm: 0 1px 2px rgba(37,99,235,.05), 0 2px 8px rgba(37,99,235,.06); --shadow: 0 14px 34px -14px rgba(37,99,235,.28); --shadow-lg: 0 28px 60px -20px rgba(79,70,229,.35); }
body.theme-bright[data-theme="dark"], [data-theme="dark"] body.theme-bright { --bg: #0b1220; --bg-2: #111a2e; --bg-3: #172238; --line: #1e293b; --line-2: #334155; --text: #e2e8f0; --text-2: #cbd5e1; --muted: #94a3b8; }
.theme-bright .hero { background: radial-gradient(900px 500px at 10% -10%, color-mix(in srgb, var(--primary) 18%, transparent), transparent 60%), radial-gradient(700px 400px at 95% 10%, color-mix(in srgb, var(--violet) 18%, transparent), transparent 60%), radial-gradient(600px 400px at 60% 110%, color-mix(in srgb, var(--pink) 14%, transparent), transparent 60%); }
.theme-bright .hero::before { background: var(--sky); opacity: .22; }
.theme-bright .hero::after { background: var(--pink); opacity: .18; }
.theme-bright .section-alt { background: linear-gradient(180deg, #f7f9ff 0%, #fdf7fb 100%); border-color: transparent; }
[data-theme="dark"] .theme-bright .section-alt, .theme-bright[data-theme="dark"] .section-alt { background: var(--bg-2); }
.theme-bright .card { border-color: var(--line); }
.theme-bright .card:hover { border-color: color-mix(in srgb, var(--primary) 35%, var(--line)); box-shadow: 0 18px 40px -16px color-mix(in srgb, var(--primary) 35%, transparent); }
.theme-bright .eyebrow { background: linear-gradient(90deg, color-mix(in srgb, var(--primary) 14%, #fff), color-mix(in srgb, var(--violet) 14%, #fff)); color: var(--primary); }
.theme-bright .stat-tile { background: linear-gradient(160deg, #fff, #f7f9ff); }
.theme-bright .marquee { background: linear-gradient(90deg, #eff6ff, #f5f3ff, #fdf2f8); border-color: transparent; }
.theme-bright .marquee-track span { color: var(--text-2); }
.theme-bright .feature .icon { box-shadow: 0 10px 20px -8px rgba(37,99,235,.5); }
.theme-bright .roadmap-step { background: linear-gradient(160deg, #fff, #f7f9ff); }
.theme-bright .roadmap-step:nth-child(2) { background: linear-gradient(160deg, #fff, #f5f3ff); }
.theme-bright .roadmap-step:nth-child(3) { background: linear-gradient(160deg, #fff, #fff1f2); }
.theme-bright .roadmap-step:nth-child(4) { background: linear-gradient(160deg, #fff, #ecfeff); }
.theme-bright .btn-outline { border-color: color-mix(in srgb, var(--primary) 40%, var(--line-2)); color: var(--primary); background: #fff; }
.theme-bright .btn-outline:hover { background: color-mix(in srgb, var(--primary) 8%, #fff); }
.theme-bright .page-hero { background: linear-gradient(135deg, #eef4ff 0%, #f5f0ff 55%, #fff1f5 100%); border-color: transparent; }
.theme-bright .page-hero::after { opacity: .18; }
.theme-bright .site-footer { background: linear-gradient(160deg, #0f172a, #1e1b4b); }
.theme-bright .cta-box { background: linear-gradient(135deg, var(--primary) 0%, var(--violet) 55%, var(--pink) 130%); }
.theme-bright .course-card .thumb::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(15,23,42,.25), transparent 50%); pointer-events: none; }
.theme-bright .section-dark { background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%); }
.theme-bright .sidebar-box, .theme-bright .forum-cat { background: #fff; }
.theme-bright .faq details[open] { background: linear-gradient(160deg, #fff, #f7f9ff); }
.theme-bright .dash-head { background: linear-gradient(135deg, var(--primary), var(--violet) 60%, var(--pink)); }
.theme-bright .float-badge { border-color: transparent; box-shadow: 0 14px 30px -12px rgba(37,99,235,.35); }
.theme-bright h2 .gradient-text, .theme-bright .gradient-text { background: var(--grad-text); -webkit-background-clip: text; background-clip: text; }
.theme-bright .badge-cat { box-shadow: 0 4px 10px -4px rgba(0,0,0,.3); }
.theme-bright .section-head h2::after { content: ''; display: block; width: 56px; height: 4px; border-radius: 4px; background: var(--grad-text); margin-top: .6rem; }
.theme-bright .section-head[style*="center"] h2::after { margin-inline: auto; }

/* Press */
.press-card { display: flex; flex-direction: column; overflow: hidden; color: var(--text); height: 100%; }
.press-card .thumb { aspect-ratio: 16/9; overflow: hidden; background: var(--bg-3); }
.press-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.press-card:hover .thumb img { transform: scale(1.05); }
.press-card .card-body { display: flex; flex-direction: column; gap: .5rem; flex: 1; }
.press-card .outlet { display: flex; flex-direction: column; gap: .15rem; }
.press-card .outlet-name { font-weight: 800; color: var(--pink); font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; }
.press-card .agency { font-size: .75rem; color: var(--muted); }
.press-card h3 { font-size: 1.02rem; margin: 0; line-height: 1.4; }
.press-card p { font-size: .88rem; color: var(--muted); margin: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.press-meta { margin-top: auto; padding-top: .7rem; border-top: 1px dashed var(--line); display: flex; gap: .4rem; font-size: .78rem; color: var(--muted); align-items: center; }
.press-meta .read { margin-left: auto; color: var(--primary); font-weight: 700; }
.press-table td a { color: var(--text); }
.press-table td a:hover { color: var(--primary); }

/* Social */
.social-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .9rem; }
.social-grid.compact { grid-template-columns: repeat(auto-fit, minmax(130px, max-content)); gap: .5rem; }
.social-card { display: flex; align-items: center; gap: .8rem; padding: .9rem 1rem; border-radius: 16px; background: var(--bg-2); border: 1px solid var(--line); color: var(--text); transition: .2s; box-shadow: var(--shadow-sm); }
.social-card:hover { transform: translateY(-3px); border-color: var(--sc); box-shadow: 0 16px 30px -14px var(--sc); color: var(--text); }
.social-card .ic { width: 44px; height: 44px; border-radius: 12px; background: var(--sc); color: #fff; display: grid; place-items: center; flex: none; }
.social-card .ic svg { width: 22px; height: 22px; }
.social-card .txt { display: flex; flex-direction: column; line-height: 1.2; }
.social-card .txt strong { font-size: .92rem; }
.social-card .txt small { color: var(--muted); font-size: .75rem; margin-top: .15rem; }
.social-grid.compact .social-card { padding: .5rem .8rem .5rem .5rem; border-radius: 12px; }
.social-grid.compact .ic { width: 34px; height: 34px; border-radius: 9px; }
.social-grid.compact .ic svg { width: 17px; height: 17px; }
.section-social { background: linear-gradient(180deg, #fff, #f5f7ff); }
[data-theme="dark"] .section-social { background: var(--bg-2); }

/* Platforms */
.platform-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 1.1rem; }
.platform-card { padding: 1.3rem; color: var(--text); display: flex; flex-direction: column; gap: .7rem; }
.platform-card:hover { color: var(--text); }
.pf-head { display: flex; align-items: center; gap: .8rem; }
.pf-head img, .pf-mark { width: 46px; height: 46px; border-radius: 12px; object-fit: cover; flex: none; }
.pf-mark { display: grid; place-items: center; background: var(--grad); color: #fff; font-weight: 800; font-size: .9rem; letter-spacing: .05em; }
.pf-head strong { display: block; font-size: 1rem; }
.pf-head small { color: var(--muted); font-size: .78rem; }
.platform-card p { margin: 0; font-size: .9rem; color: var(--muted); flex: 1; }
.pf-link { font-weight: 700; color: var(--primary); font-size: .85rem; }
.price.contact { color: var(--violet); font-size: .95rem; }

/* =====================================================================
   TT.EDU.VN design v3 — "Lớp học sáng"
   Be Vietnam Pro, xanh TT + vàng hoa mai, nền trắng, nhịp chữ 1.25
   ===================================================================== */
:root {
  --font: 'Be Vietnam Pro', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --ink: #0e1b3d;
  --primary: #1f4fe0;
  --primary-2: #1739b0;
  --primary-soft: #e6edff;
  --sun: #ffc83d;
  --sun-soft: #fff4d6;
  --leaf: #0e9f6e;
  --leaf-soft: #def7ec;
  --sky: #eef3ff;
  --bg: #ffffff;
  --bg-2: #ffffff;
  --bg-3: #f5f7fc;
  --text: #0e1b3d;
  --text-2: #33415e;
  --muted: #5d6a85;
  --line: #e3e8f2;
  --line-2: #cfd7e6;
  --green: #0e9f6e;
  --green-soft: #def7ec;
  --violet: #1f4fe0;
  --violet-soft: #e6edff;
  --pink: #0e9f6e;
  --grad: var(--primary);
  --grad-text: linear-gradient(var(--ink), var(--ink));
  --radius: 14px;
  --radius-sm: 10px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(14,27,61,.06);
  --shadow: 0 12px 28px -18px rgba(14,27,61,.35);
  --shadow-lg: 0 30px 60px -30px rgba(14,27,61,.45);
}
[data-theme="dark"] {
  --ink: #e8eeff; --text: #e8eeff; --text-2: #c3cde6; --muted: #91a0bf;
  --bg: #0b1328; --bg-2: #101a33; --bg-3: #15213f; --line: #22304f; --line-2: #2f4066;
  --primary: #6f94ff; --primary-2: #9ab4ff; --primary-soft: #1a2a57; --sky: #111d3a;
  --sun-soft: #3a2f10; --leaf-soft: #0f3a2d;
}
body { font-family: var(--font); font-size: 1rem; line-height: 1.65; letter-spacing: -.003em; }
h1, h2, h3, h4 { font-family: var(--font); color: var(--ink); text-wrap: balance; }
h1 { font-weight: 800; letter-spacing: -.035em; line-height: 1.08; }
h2 { font-size: clamp(1.75rem, 3vw, 2.45rem); font-weight: 800; letter-spacing: -.03em; line-height: 1.15; }
h3 { font-weight: 700; letter-spacing: -.015em; }
p { text-wrap: pretty; }
::selection { background: var(--sun); color: var(--ink); }

/* Calm the chrome: sentence-case labels, no pulsing pills, no decorative bars */
.eyebrow { display: inline-block; background: none !important; padding: 0; border-radius: 0; text-transform: none; letter-spacing: 0; font-size: .95rem; font-weight: 700; color: var(--primary) !important; }
.eyebrow::before { display: none; }
.section-head h2::after { display: none !important; }
.section-head { margin-bottom: 2rem; align-items: flex-end; }
.section-head p { font-size: 1.02rem; max-width: 62ch; }
.badge { text-transform: none; letter-spacing: 0; font-size: .75rem; font-weight: 600; padding: .28rem .6rem; }
.badge-free { background: var(--leaf); }
.badge-pro { background: var(--ink); color: #fff; }
.badge-cat { box-shadow: none !important; }
.site-footer h4, .sidebar-box h4, .learn-side .section-title, .table th, .kpi span { text-transform: none; letter-spacing: 0; }
.reveal, .reveal.in { opacity: 1 !important; transform: none !important; transition: none !important; }
.gradient-text { background: none !important; color: inherit !important; -webkit-text-fill-color: currentColor; }

/* Buttons */
.btn { border-radius: 12px; font-weight: 700; letter-spacing: -.005em; }
.btn:hover { transform: none; }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 1px 0 rgba(255,255,255,.25) inset, 0 8px 18px -10px var(--primary); }
.btn-primary:hover { background: var(--primary-2); color: #fff; }
.btn-outline { background: #fff; border-color: var(--line-2); color: var(--ink); }
[data-theme="dark"] .btn-outline { background: transparent; color: var(--text); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-ghost-strong { background: var(--sun-soft); color: var(--ink); border: 1.5px solid transparent; }
.btn-ghost-strong:hover { background: var(--sun); color: var(--ink); }
.btn-soft { background: var(--primary-soft); color: var(--primary-2); }
.btn-lg { padding: .95rem 1.6rem; }

/* Header */
.site-header { background: rgba(255,255,255,.92); border-bottom-color: var(--line); }
[data-theme="dark"] .site-header { background: rgba(11,19,40,.9); }
.brand-mark svg rect { fill: var(--primary); }
.brand-text .accent { color: var(--primary); }
.brand-text small { text-transform: none; letter-spacing: 0; font-size: .7rem; font-weight: 500; }
.nav-link { font-weight: 600; color: var(--text-2); }
.nav-link::after { background: var(--sun); height: 3px; bottom: 2px; }
.nav-link:hover, .nav-link.active { background: transparent; color: var(--ink); }
.nav-search { border-radius: 12px; background: var(--bg-3); }

/* Hero */
.hero { padding: 4.5rem 0 3.5rem; background: linear-gradient(180deg, var(--sky) 0%, #fff 78%); }
[data-theme="dark"] .hero { background: linear-gradient(180deg, var(--sky), var(--bg) 78%); }
.hero::before, .hero::after { display: none; }
.hero-grid { grid-template-columns: 1.1fr .9fr; gap: 4rem; align-items: center; }
.hero-kicker { font-weight: 700; color: var(--primary); margin: 0 0 1rem; font-size: 1rem; }
.hero h1 { font-size: clamp(2.6rem, 5.4vw, 4.4rem); margin: 0 0 1.25rem; max-width: 14ch; }
.hero .lead { font-size: 1.18rem; line-height: 1.6; color: var(--text-2); max-width: 54ch; }
.hero-cta { margin-top: 2rem; gap: .75rem; }
.hero-facts { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; gap: .55rem; color: var(--text-2); font-size: .95rem; }
.hero-facts li { display: flex; gap: .6rem; align-items: center; }
.hero-facts .i { color: var(--leaf); width: 18px; height: 18px; }
.hero-figure { margin: 0; position: relative; justify-self: end; width: min(100%, 460px); }
.hero-figure img { width: 100%; aspect-ratio: 4/5; object-fit: cover; object-position: 50% 20%; border-radius: 26px; box-shadow: var(--shadow-lg); animation: heroIn .9s cubic-bezier(.2,.7,.2,1) both; }
.hero-figure::before { content: ''; position: absolute; width: 58%; aspect-ratio: 1; right: -7%; top: -6%; border-radius: 50%; background: var(--sun); z-index: -1; }
.hero-figure figcaption { position: absolute; left: -2.2rem; bottom: 1.6rem; max-width: 300px; background: #fff; border-radius: 16px; padding: 1rem 1.15rem; box-shadow: var(--shadow); border-left: 5px solid var(--sun); animation: heroIn .9s .25s cubic-bezier(.2,.7,.2,1) both; }
[data-theme="dark"] .hero-figure figcaption { background: var(--bg-2); }
.hero-figure figcaption strong { display: block; font-size: 1.05rem; color: var(--ink); }
.hero-figure figcaption span { display: block; font-size: .82rem; color: var(--muted); line-height: 1.45; margin-top: .2rem; }
.hero-copy > * { animation: heroIn .8s cubic-bezier(.2,.7,.2,1) both; }
.hero-copy > *:nth-child(2) { animation-delay: .06s; } .hero-copy > *:nth-child(3) { animation-delay: .12s; } .hero-copy > *:nth-child(4) { animation-delay: .18s; } .hero-copy > *:nth-child(5) { animation-delay: .24s; }
@keyframes heroIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@media (max-width: 960px) { .hero-grid { grid-template-columns: 1fr; gap: 2.5rem; } .hero-figure { justify-self: center; } .hero-figure figcaption { left: 1rem; right: 1rem; max-width: none; } .hero h1 { max-width: none; } }

/* Press strip: the one memorable element */
.press-strip { background: var(--ink); color: #fff; padding: 1.6rem 0; }
.press-strip .container { display: grid; grid-template-columns: auto 1fr auto; gap: 1.5rem; align-items: center; }
.press-strip-title { margin: 0; font-weight: 700; color: var(--sun); font-size: .95rem; white-space: nowrap; }
.press-strip ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem 1.75rem; }
.press-strip li a { display: flex; flex-direction: column; color: #fff; line-height: 1.25; }
.press-strip li a strong { font-size: 1rem; font-weight: 700; letter-spacing: -.01em; }
.press-strip li a small { font-size: .7rem; color: #a9b6d6; max-width: 26ch; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.press-strip li a:hover strong { color: var(--sun); }
.press-strip-more { color: #fff; font-weight: 700; font-size: .9rem; border: 1.5px solid rgba(255,255,255,.3); padding: .55rem 1rem; border-radius: 10px; white-space: nowrap; }
.press-strip-more:hover { border-color: var(--sun); color: var(--sun); }
@media (max-width: 960px) { .press-strip .container { grid-template-columns: 1fr; } }

/* Sections */
.section { padding: 5rem 0; }
.section-alt, .theme-clean .section-alt { background: var(--bg-3); border: 0; }
.section-dark { background: var(--ink); }
.section-social { background: var(--sky); }
.page-hero { background: var(--sky); border: 0; padding: 3.5rem 0 2.5rem; }
.page-hero::after { display: none; }
.page-hero h1 { font-size: clamp(2rem, 3.8vw, 2.9rem); }

/* Features as an editorial list, not cards */
.features { gap: 0; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); }
.feature { padding: 1.6rem 1.5rem 0 0; background: none; border: 0; box-shadow: none; }
.feature + .feature { padding-left: 1.5rem; border-left: 1px solid var(--line); }
.feature::after { display: none; }
.feature .icon { width: 40px; height: 40px; border-radius: 10px; background: var(--sun-soft); color: var(--ink); box-shadow: none !important; margin-bottom: .9rem; }
.feature .icon svg { width: 20px; height: 20px; }
.feature h3 { font-size: 1.05rem; margin-bottom: .4rem; }
.feature p { font-size: .93rem; }
@media (max-width: 960px) { .features { grid-template-columns: 1fr 1fr; } .feature:nth-child(3) { border-left: 0; padding-left: 0; } }
@media (max-width: 560px) { .features { grid-template-columns: 1fr; } .feature + .feature { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); margin-top: 1.2rem; } }

/* Cards: quieter, hierarchy by content not shadow */
.card { border-radius: var(--radius); box-shadow: none; border-color: var(--line); }
.card:hover { transform: none; box-shadow: var(--shadow); border-color: var(--line-2); }
.course-card .thumb { aspect-ratio: 16/9; }
.course-card .thumb::after { display: none; }
.course-card:hover .thumb img, .post-card:hover .thumb img, .press-card:hover .thumb img { transform: scale(1.03); }
.course-card h3 { font-size: 1.08rem; line-height: 1.35; }
.price { font-weight: 700; }
.price.free { color: var(--leaf); }
.price.contact { color: var(--ink); font-weight: 600; font-size: .9rem; }
.course-foot { border-top-style: solid; }
.stars { color: #e7a700; }

/* Roadmap is a real sequence: keep numbers, drop the gradient */
.roadmap-step, .theme-bright .roadmap-step { background: var(--bg-2) !important; border-radius: var(--radius); }
.roadmap-step::before { background: none; -webkit-text-fill-color: var(--primary); color: var(--primary); font-size: 2rem; }
.roadmap-step .tag { color: var(--muted); font-weight: 600; }

/* Founder */
.founder-photo::before { background: var(--sun); opacity: 1; inset: 18px -18px -18px 18px; border-radius: 26px; }
.founder-photo img { border-radius: 26px; object-position: 50% 15%; }
.founder-card { border-left: 5px solid var(--primary); }
.checklist li::before { background: var(--leaf-soft); color: var(--leaf); border-radius: 50%; }

/* Press cards */
.press-card .outlet-name { text-transform: none; letter-spacing: -.005em; color: var(--ink); font-size: 1rem; }
.press-card .agency { color: var(--muted); }
.press-card .read { color: var(--primary); }

/* Dark CTA band */
.cta-box h2 { color: #fff; }
.cta-box .btn-light { background: var(--sun); color: var(--ink); }
.cta-box .btn-light:hover { background: #fff; color: var(--ink); }

/* Gallery */
.gallery-item { border-radius: 16px; }
.gallery-item figcaption { font-weight: 600; background: linear-gradient(to top, rgba(14,27,61,.88), transparent); }

/* Partners */
.partner-logo { border-radius: 12px; font-weight: 600; color: var(--text-2); }

/* FAQ */
.faq summary::after { color: var(--ink); }
.faq details[open] { border-color: var(--ink); background: var(--bg-2) !important; }

/* Social & platforms */
.social-card { border-radius: 14px; box-shadow: none; }
.social-card:hover { transform: none; box-shadow: var(--shadow); }
.pf-mark { background: var(--ink); color: var(--sun); }
.platform-card:hover { box-shadow: var(--shadow); }

/* Forum, dashboard */
.dash-head, .theme-bright .dash-head { background: var(--ink); }
.dash-head img { border-color: var(--sun); }
.forum-cat .icon { border-radius: 12px; }

/* Footer */
.site-footer, .theme-bright .site-footer { background: var(--ink); margin-top: 0; }
.site-footer h4 { font-size: .95rem; color: var(--sun); }
.social a:hover { background: var(--sun); color: var(--ink); }

/* Focus */
:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; }
.main-nav { align-items: center; }
.has-menu { display: flex; align-items: center; }
@media (max-width: 1024px) { .has-menu { flex-direction: column; align-items: stretch; } }
.btn-on-dark { background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,.35); }
.btn-on-dark:hover { border-color: var(--sun); color: var(--sun); }
.post-meta { flex-wrap: wrap; row-gap: .2rem; }
.post-meta span, .post-meta time { white-space: nowrap; }
.cred span { text-transform: none; letter-spacing: 0; font-size: .8rem; font-weight: 600; line-height: 1.35; }
.marquee { display: none; }
.admin-side nav a .i { width: 18px; height: 18px; opacity: .85; }
.admin-side { background: var(--ink); }
.admin-side nav a.active { background: var(--primary); }
.kpi strong { color: var(--ink); }
.kpi small { color: var(--primary); }
.bars div { background: var(--primary); }

/* Logo TT.EDU.VN */
.brand-mark { width: 48px; height: 48px; display: grid; place-items: center; }
.brand-mark img { width: 100%; height: 100%; object-fit: contain; display: block; }
.site-footer .brand-mark, .admin-side .brand-mark { background: #fff; border-radius: 50%; padding: 4px; }
@media (max-width: 720px) { .brand-mark { width: 40px; height: 40px; } }

/* Fanpage embed */
.social-wrap.with-fb { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 420px); gap: 28px; align-items: start; }
.social-wrap.with-fb .social-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.fb-page-box { background: #fff; border: 1px solid var(--border, #e3e8f4); border-radius: 18px; overflow: hidden; box-shadow: 0 10px 30px -18px rgba(14, 27, 61, .35); }
.fb-page-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--border, #e3e8f4); }
.fb-page-head img { width: 40px; height: 40px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 1px #e3e8f4; }
.fb-page-head div { flex: 1; min-width: 0; line-height: 1.25; }
.fb-page-head strong { display: block; font-size: .95rem; color: var(--ink, #0e1b3d); }
.fb-page-head small { color: var(--muted, #5b6785); font-size: .8rem; }
.fb-page-frame { padding: 10px; background: #f6f8fd; }
.fb-page-frame iframe { display: block; width: 100%; max-width: 500px; margin: 0 auto; border: 0; border-radius: 10px; background: #fff; }
@media (max-width: 900px) { .social-wrap.with-fb { grid-template-columns: 1fr; } }
.fb-page-frame { position: relative; min-height: 300px; }
.fb-page-frame iframe { position: relative; z-index: 1; background: transparent; }
.fb-page-fallback { position: absolute; inset: 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; color: var(--primary, #1f4fe0); font-weight: 600; text-decoration: none; }
.fb-page-fallback img { width: 150px; height: 150px; opacity: .9; }
.social-wrap.with-fb .social-card:last-child:nth-child(odd) { grid-column: 1 / -1; }
.site-header .brand-mark { width: 50px; height: 50px; }

/* Dải báo chí: hiện đầy đủ tên cơ quan chủ quản */
.press-strip ul { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1rem 2rem; align-items: start; }
.press-strip li a { gap: .2rem; }
.press-strip li a small { max-width: none; white-space: normal; overflow: visible; text-overflow: clip; font-size: .78rem; line-height: 1.4; }

/* ==========================================================================
   v4: rà soát giao diện
   ========================================================================== */

/* Lưới cố định số cột, không để thừa ô trống */
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1080px) { .grid-4 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-2 { grid-template-columns: 1fr; } }
@media (max-width: 580px) { .grid-3, .grid-4 { grid-template-columns: 1fr; } }
.grid > * { min-width: 0; }

/* Ô tìm kiếm trên thanh điều hướng: bỏ khung lồng nhau */
.nav-search input, .nav-search input[type=search] { border: 0 !important; box-shadow: none !important; padding: 0 !important; height: auto !important; min-height: 0; background: transparent !important; border-radius: 0; }
.nav-search input::-webkit-search-cancel-button { display: none; }

/* Khối ghi chú (tư vấn, cộng đồng): nền sáng, viền mảnh, không dùng gradient */
.note-card { background: var(--bg-2, #fff); border: 1px solid var(--line); border-radius: 16px; padding: 1.75rem; display: flex; flex-direction: column; align-items: flex-start; gap: .75rem; color: var(--text); box-shadow: none; }
.note-card h3, .note-card h4 { margin: 0; color: var(--ink, #0e1b3d); font-size: 1.15rem; letter-spacing: -.01em; text-transform: none; }
.note-card h4 { font-size: 1rem; }
.note-card p { margin: 0; color: var(--muted); font-size: .94rem; line-height: 1.6; }
.note-card p a { color: var(--ink, #0e1b3d); }
.note-card .btn { margin-top: .35rem; }
.note-card-phone { display: flex; align-items: center; gap: .45rem; font-weight: 700; }
.note-card-phone svg { width: 18px; height: 18px; color: var(--primary); }
.note-card-phone a { color: var(--ink, #0e1b3d) !important; font-size: 1.05rem; }
.grid > .note-card { height: 100%; border-top: 4px solid var(--sun, #ffc83d); }
[data-theme="dark"] .note-card { background: var(--bg-2); }
[data-theme="dark"] .note-card h3, [data-theme="dark"] .note-card h4, [data-theme="dark"] .note-card p a, [data-theme="dark"] .note-card-phone a { color: var(--text) !important; }

/* Thẻ bài viết: tác giả và ngày trên hai dòng gọn */
.post-meta { flex-wrap: nowrap; gap: .65rem; align-items: center; padding-top: 1rem; border-top: 1px solid var(--line); margin-top: auto; }
.post-meta img { width: 32px; height: 32px; flex: none; }
.post-meta .who { display: flex; flex-direction: column; line-height: 1.3; font-weight: 600; color: var(--text-2, var(--text)); min-width: 0; white-space: normal; }
.post-meta .who time { font-weight: 400; color: var(--muted); font-size: .78rem; white-space: normal; }
.post-card .card-body { display: flex; flex-direction: column; flex: 1; }
.post-card .excerpt { margin-bottom: 1rem; }

/* Thẻ báo chí */
.press-card .card-body { padding-bottom: 1.1rem; }
.press-meta { margin-top: auto; padding-top: .9rem; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: .75rem; font-size: .78rem; color: var(--muted); }
.press-meta .src { min-width: 0; overflow-wrap: anywhere; }
.press-meta .read { flex: none; font-weight: 700; color: var(--primary); white-space: nowrap; }
.press-card:hover .press-meta .read { text-decoration: underline; text-underline-offset: 3px; }

/* Thư viện ảnh: figure mặc định có margin làm ảnh co lại */
.gallery-grid { gap: 1rem; }
.gallery-grid > figure, .gallery-item { margin: 0; }
.gallery-item { aspect-ratio: 4/3; }
.gallery-item.tall { grid-row: span 2; aspect-ratio: auto; min-height: 100%; }
.gallery-item figcaption { padding: 2.5rem 1rem .9rem; line-height: 1.4; }

/* Đối tác: cùng kích thước, chỉ chữ */
.partner-logos { gap: .75rem; }
.partner-logo { min-height: 48px; padding: .7rem 1.15rem; justify-content: center; text-align: center; background: var(--bg-2, #fff); }
.partner-logo-lg { text-align: left; justify-content: flex-start; align-items: flex-start; min-width: 230px; max-width: 320px; flex: 1 1 230px; }
.partner-logo-lg small { display: block; margin-top: .2rem; line-height: 1.4; }

/* Liên kết nền tảng */
.pf-link { font-weight: 700; }

/* Trang khoá học: tab không đẩy rộng trang trên di động */
.course-body > * { min-width: 0; }
.tabs { scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: none; }

/* Trang giới thiệu: hai cột tiểu sử dùng hết chiều ngang */
.section-alt .grid-2 { gap: 3rem; }

/* Dải báo chí: tiêu đề và nút căn với hàng đầu */
.press-strip .container { align-items: start; }
.press-strip-title { padding-top: .1rem; }
@media (max-width: 960px) { .press-strip ul { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .press-strip ul { grid-template-columns: 1fr; } }

/* Không để phần tử tràn ngang */
html, body { overflow-x: clip; }
img, video, iframe { max-width: 100%; }

/* Nhãn trên ảnh khoá học: xếp dọc bên trái, không chồng lên nhau */
.course-card .thumb .badges { right: auto; flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: .35rem; max-width: calc(100% - 1.6rem); }
.course-card .thumb .badges .badge { white-space: normal; line-height: 1.25; text-align: left; }

/* Danh mục ở cột bên: số đếm không đè chữ */
.sidebar-box .item { display: flex; align-items: flex-start; justify-content: space-between; gap: .75rem; }
.sidebar-box .item > span:first-child { min-width: 0; }
.sidebar-box .item .count { flex: none; }

/* ==========================================================================
   v5: phòng thí nghiệm số (khoa học, công nghệ, AI, giáo dục)
   ========================================================================== */
:root { --lab: #071027; --lab-2: #0b1838; --cyan: #22d3ee; --cyan-soft: rgba(34,211,238,.14); --glow: 0 0 0 1px rgba(34,211,238,.35), 0 18px 40px -18px rgba(34,211,238,.45); }

/* Đầu trang tối với mạng nơ-ron */
.hero.hero-lab { position: relative; isolation: isolate; overflow: hidden; color: #e8eeff; padding: 5.5rem 0 4.5rem;
  background: radial-gradient(900px 520px at 78% 30%, rgba(47,107,255,.32), transparent 62%), radial-gradient(700px 420px at 8% 0%, rgba(34,211,238,.16), transparent 60%), linear-gradient(180deg, var(--lab) 0%, var(--lab-2) 100%); }
[data-theme="dark"] .hero.hero-lab { background: radial-gradient(900px 520px at 78% 30%, rgba(47,107,255,.32), transparent 62%), radial-gradient(700px 420px at 8% 0%, rgba(34,211,238,.16), transparent 60%), linear-gradient(180deg, var(--lab) 0%, var(--lab-2) 100%); }
.hero-net { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.hero-grid-bg { position: absolute; inset: 0; z-index: -2; pointer-events: none;
  background-image: linear-gradient(rgba(140,170,255,.07) 1px, transparent 1px), linear-gradient(90deg, rgba(140,170,255,.07) 1px, transparent 1px);
  background-size: 56px 56px; -webkit-mask-image: radial-gradient(ellipse 80% 70% at 60% 40%, #000 30%, transparent 75%); mask-image: radial-gradient(ellipse 80% 70% at 60% 40%, #000 30%, transparent 75%); }
.hero-lab h1 { color: #fff; text-shadow: 0 2px 30px rgba(47,107,255,.35); }
.hero-lab .lead { color: #c3cde6; }
.hero-lab .hero-facts { color: #c3cde6; }
.hero-lab .hero-facts .i { color: var(--cyan); }
.hero-lab .btn-primary { box-shadow: 0 10px 30px -10px rgba(47,107,255,.8); }
.hero-lab .btn-ghost-strong { background: rgba(255,255,255,.06); color: #fff; border: 1.5px solid rgba(255,255,255,.22); backdrop-filter: blur(6px); }
.hero-lab .btn-ghost-strong:hover { background: var(--sun); color: var(--ink); border-color: var(--sun); }

/* Dòng chủ đề luân phiên */
.hero-lab .hero-kicker { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .75rem; color: #9fb3e6; font-weight: 600; font-size: .98rem; }
.hero-topic { display: inline-flex; align-items: center; gap: .55rem; padding: .32rem .8rem .32rem .65rem; border-radius: 999px; background: var(--cyan-soft); border: 1px solid rgba(34,211,238,.35); color: #a5f3fc; font-weight: 700; }
.hero-topic::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 0 0 rgba(34,211,238,.7); animation: labPulse 2s infinite; }
.ticker { display: inline-block; min-width: 9ch; transition: opacity .3s, transform .3s, filter .3s; }
.ticker.out { opacity: 0; transform: translateY(-6px); filter: blur(3px); }
.ticker.in { animation: tickIn .45s cubic-bezier(.2,.7,.2,1); }
@keyframes tickIn { from { opacity: 0; transform: translateY(8px); filter: blur(3px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes labPulse { 0% { box-shadow: 0 0 0 0 rgba(34,211,238,.6); } 70% { box-shadow: 0 0 0 9px rgba(34,211,238,0); } 100% { box-shadow: 0 0 0 0 rgba(34,211,238,0); } }

/* Chân dung với quỹ đạo */
.hero-lab .hero-figure::before { display: none; }
.hero-orbit { position: absolute; inset: -9%; width: 118%; height: 118%; z-index: -1; pointer-events: none; animation: orbitSpin 60s linear infinite; }
.hero-orbit circle { fill: none; }
.hero-orbit .o1 { stroke: rgba(34,211,238,.35); stroke-width: 1.2; stroke-dasharray: 2 10; }
.hero-orbit .o2 { stroke: rgba(255,200,61,.45); stroke-width: 1.2; stroke-dasharray: 60 14 4 14; }
.hero-orbit .o-dots circle { fill: var(--cyan); filter: drop-shadow(0 0 6px rgba(34,211,238,.9)); }
.hero-orbit .o-dots circle:nth-child(2) { fill: var(--sun); filter: drop-shadow(0 0 6px rgba(255,200,61,.9)); }
@keyframes orbitSpin { to { transform: rotate(360deg); } }
.hero-lab .hero-figure img { border: 1px solid rgba(140,170,255,.25); box-shadow: 0 30px 80px -30px rgba(0,0,0,.8), 0 0 0 6px rgba(255,255,255,.03); }
.hero-lab .hero-figure figcaption { background: rgba(10,22,52,.72); border: 1px solid rgba(140,170,255,.22); border-left: 3px solid var(--sun); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: 0 20px 40px -20px rgba(0,0,0,.6); }
.hero-lab .hero-figure figcaption strong { color: #fff; }
.hero-lab .hero-figure figcaption span { color: #b8c4e3; }

/* Dải báo chí nối liền đầu trang */
.press-strip { background: #050c1f; border-top: 1px solid rgba(140,170,255,.12); }

/* Nền chấm lưới cho các mục xen kẽ */
.section-alt { background-color: #f6f8fe; background-image: radial-gradient(rgba(31,79,224,.10) 1px, transparent 1.2px); background-size: 22px 22px; }
[data-theme="dark"] .section-alt { background-color: var(--bg-2); background-image: radial-gradient(rgba(140,170,255,.08) 1px, transparent 1.2px); }

/* Tiêu đề mục: vạch tín hiệu nhỏ trước dòng giới thiệu */
.section-head .eyebrow { display: inline-flex; align-items: center; gap: .55rem; }
.section-head .eyebrow::before { content: ''; width: 22px; height: 2px; border-radius: 2px; background: linear-gradient(90deg, var(--cyan), var(--primary)); }
.section-head[style*="center"] .eyebrow::before { display: none; }

/* Thẻ: nhấc nhẹ và viền phát sáng khi rê chuột */
.course-card, .post-card, .press-card, .pf-card, .roadmap-step, .social-card, .note-card { transition: transform .35s cubic-bezier(.2,.7,.2,1), box-shadow .35s, border-color .35s; }
@media (hover: hover) {
  .course-card:hover, .post-card:hover, .press-card:hover, .pf-card:hover, .roadmap-step:hover { transform: translateY(-4px); box-shadow: var(--glow); border-color: transparent; }
}

/* Lộ trình: đường dẫn tín hiệu chạy qua các bước */
.roadmap { position: relative; }
.roadmap::before { content: ''; position: absolute; left: 1.4rem; right: 1.4rem; top: 2.15rem; height: 2px; background: linear-gradient(90deg, rgba(34,211,238,.15), rgba(47,107,255,.35), rgba(255,200,61,.35)); z-index: 0; }
.roadmap::after { content: ''; position: absolute; top: calc(2.15rem - 3px); left: 1.4rem; width: 8px; height: 8px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 12px 3px rgba(34,211,238,.7); animation: roadRun 6s cubic-bezier(.45,0,.55,1) infinite; z-index: 1; }
@keyframes roadRun { 0% { left: 1.4rem; opacity: 0; } 8% { opacity: 1; } 92% { opacity: 1; } 100% { left: calc(100% - 1.4rem); opacity: 0; } }
.roadmap-step { z-index: 2; }
.roadmap-step::before { background: none; -webkit-text-fill-color: currentColor; color: var(--primary); display: inline-grid; place-items: center; width: 2.6rem; height: 2.6rem; border-radius: 12px; font-size: 1rem; background-color: var(--bg-2, #fff); border: 1.5px solid rgba(47,107,255,.35); box-shadow: 0 0 0 5px var(--bg-2, #fff); }
@media (max-width: 960px) { .roadmap::before, .roadmap::after { display: none; } }

/* Khối video tối: lưới mạch */
.section-dark { position: relative; overflow: hidden; background: radial-gradient(700px 400px at 85% 50%, rgba(47,107,255,.28), transparent 60%), linear-gradient(135deg, var(--lab) 0%, #0d1f4d 100%); }
.section-dark::before { content: ''; position: absolute; inset: 0; pointer-events: none; background-image: linear-gradient(rgba(140,170,255,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(140,170,255,.06) 1px, transparent 1px); background-size: 40px 40px; -webkit-mask-image: linear-gradient(90deg, transparent, #000 40%, #000 60%, transparent); mask-image: linear-gradient(90deg, transparent, #000 40%, #000 60%, transparent); }
.section-dark > .container { position: relative; }
.section-dark .video-embed { box-shadow: 0 0 0 1px rgba(140,170,255,.25), 0 30px 60px -25px rgba(0,0,0,.8), 0 0 60px -20px rgba(34,211,238,.45); }

/* Chân trang */
.site-footer { position: relative; background: radial-gradient(800px 300px at 15% 0%, rgba(47,107,255,.18), transparent 60%), var(--lab) !important; border-top: 1px solid rgba(140,170,255,.12); }
.site-footer::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: linear-gradient(90deg, transparent, var(--cyan), var(--sun), transparent); opacity: .6; }

/* Đầu trang các trang con: nền lưới mảnh */
.page-hero { position: relative; overflow: hidden; background: radial-gradient(700px 300px at 85% 0%, rgba(47,107,255,.14), transparent 65%), var(--sky); }
.page-hero::before { content: ''; position: absolute; inset: 0; pointer-events: none; background-image: linear-gradient(rgba(31,79,224,.07) 1px, transparent 1px), linear-gradient(90deg, rgba(31,79,224,.07) 1px, transparent 1px); background-size: 44px 44px; -webkit-mask-image: linear-gradient(90deg, transparent 30%, #000 100%); mask-image: linear-gradient(90deg, transparent 30%, #000 100%); }
.page-hero > .container { position: relative; }

/* Nút chính: ánh sáng quét nhẹ khi rê chuột */
.btn-primary { position: relative; overflow: hidden; }
.btn-primary::after { content: ''; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%; background: linear-gradient(100deg, transparent, rgba(255,255,255,.35), transparent); transform: skewX(-20deg); transition: left .6s; }
.btn-primary:hover::after { left: 120%; }

@media (max-width: 960px) {
  .hero.hero-lab { padding: 3rem 0 3rem; }
  .hero-orbit { inset: -6%; width: 112%; height: 112%; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-orbit, .roadmap::after, .hero-topic::before { animation: none !important; }
  .btn-primary::after { display: none; }
}

/* Lộ trình: đường tín hiệu nằm trên mép trên của các thẻ, số bước nằm trên đường */
.roadmap { padding-top: 1.4rem; }
.roadmap::before { top: 1.4rem; z-index: 1; left: 2.6rem; right: 2.6rem; }
.roadmap::after { top: calc(1.4rem - 3px); z-index: 2; }
.roadmap-step { z-index: auto; padding-top: 2.2rem; }
.roadmap-step::before { position: absolute; top: -1.3rem; left: 1.4rem; z-index: 3; margin: 0; }
@keyframes roadRun { 0% { left: 2.6rem; opacity: 0; } 8% { opacity: 1; } 92% { opacity: 1; } 100% { left: calc(100% - 2.6rem); opacity: 0; } }
@media (max-width: 960px) { .roadmap { padding-top: 1.4rem; row-gap: 2.2rem; } }

/* Quỹ đạo quanh chân dung rõ hơn */
.hero-orbit { inset: -12%; width: 124%; height: 124%; }
.hero-orbit .o1 { stroke: rgba(34,211,238,.5); }
.hero-orbit .o2 { stroke: rgba(255,200,61,.6); }
.hero-orbit .o1 { stroke: rgba(34,211,238,.7); stroke-width: 1.6; }
.hero-orbit .o2 { stroke: rgba(255,200,61,.8); stroke-width: 1.8; }
.section-dark .eyebrow, .section-dark .hero-kicker { color: var(--cyan) !important; }

/* ==========================================================================
   v6: năm mảng công nghệ (AI, Blockchain, Chữ ký số, PKI, Robotics)
   ========================================================================== */
.techlab { background: #fff; }
[data-theme="dark"] .techlab { background: var(--bg); }
.tl-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1rem; }
.tl-tile { position: relative; display: flex; flex-direction: column; gap: .5rem; padding: 1rem 1rem 1.25rem; border-radius: 18px; color: #dbe4ff; overflow: hidden; isolation: isolate;
  background: radial-gradient(260px 160px at 50% 0%, rgba(47,107,255,.35), transparent 70%), linear-gradient(180deg, #0b1838, var(--lab)); border: 1px solid rgba(140,170,255,.18);
  transition: transform .4s cubic-bezier(.2,.7,.2,1), box-shadow .4s, border-color .4s; }
.tl-tile::before { content: ''; position: absolute; inset: 0; z-index: -1; background-image: linear-gradient(rgba(140,170,255,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(140,170,255,.06) 1px, transparent 1px); background-size: 18px 18px; -webkit-mask-image: linear-gradient(180deg, #000, transparent 70%); mask-image: linear-gradient(180deg, #000, transparent 70%); }
.tl-tile::after { content: ''; position: absolute; left: -40%; top: 0; width: 40%; height: 100%; background: linear-gradient(100deg, transparent, rgba(34,211,238,.12), transparent); transform: skewX(-18deg); transition: left .9s; z-index: -1; }
.tl-tile:hover { transform: translateY(-6px); border-color: rgba(34,211,238,.55); box-shadow: 0 0 0 1px rgba(34,211,238,.25), 0 24px 50px -24px rgba(34,211,238,.6); color: #fff; }
.tl-tile:hover::after { left: 120%; }
.tl-tile h3 { color: #fff; font-size: 1.02rem; margin: .25rem 0 0; line-height: 1.3; }
.tl-tile p { margin: 0; font-size: .84rem; line-height: 1.55; color: #a9b6d6; }
.tl-more { margin-top: auto; padding-top: .5rem; font-size: .8rem; font-weight: 700; color: var(--cyan); }
.tl-viz { height: 118px; margin: 0 -.25rem; }
.tl-viz svg { width: 100%; height: 100%; overflow: visible; }

/* AI */
.tl-ai .ln line { stroke: rgba(140,170,255,.22); stroke-width: 1; }
.tl-ai .nd { fill: #0b1838; stroke: #6f94ff; stroke-width: 2; animation: ndPulse 2.4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes ndPulse { 0%,100% { stroke: #6f94ff; fill: #0b1838; } 45% { stroke: var(--cyan); fill: rgba(34,211,238,.45); } }
.techlab .sig { fill: var(--cyan); filter: drop-shadow(0 0 5px rgba(34,211,238,.95)); }
.techlab .sig.s2 { fill: var(--sun); filter: drop-shadow(0 0 5px rgba(255,200,61,.95)); }
.techlab .sig.s3 { fill: #a78bfa; filter: drop-shadow(0 0 5px rgba(167,139,250,.95)); }

/* Blockchain */
.tl-chain .chain-track { animation: chainSlide 3.2s cubic-bezier(.6,0,.3,1) infinite; }
@keyframes chainSlide { 0%, 25% { transform: translateX(0); } 70%, 100% { transform: translateX(-52px); } }
.tl-chain .blk rect { fill: rgba(47,107,255,.14); stroke: #6f94ff; stroke-width: 1.5; }
.tl-chain .blk line { stroke: rgba(200,215,255,.55); stroke-width: 2; stroke-linecap: round; }
.tl-chain .blk:nth-child(1) rect { stroke: var(--sun); fill: rgba(255,200,61,.12); }
.tl-chain .blk:last-of-type rect { animation: blkMint 3.2s infinite; }
@keyframes blkMint { 0%, 55% { stroke: #6f94ff; fill: rgba(47,107,255,.14); } 70% { stroke: var(--cyan); fill: rgba(34,211,238,.4); } 100% { stroke: #6f94ff; fill: rgba(47,107,255,.14); } }
.tl-chain .lnk { stroke: var(--cyan); stroke-width: 2; stroke-dasharray: 3 3; animation: dashRun 1s linear infinite; }
@keyframes dashRun { to { stroke-dashoffset: -12; } }
.tl-chain .hash { fill: #7fe7f7; font-size: 11px; font-weight: 700; letter-spacing: .04em; animation: hashFlick 3.2s infinite; }
.tl-chain .hash.h2 { fill: var(--sun); animation-delay: .4s; }
@keyframes hashFlick { 0%, 60% { opacity: .35; } 70%, 90% { opacity: 1; } 100% { opacity: .35; } }

/* Chữ ký số */
.tl-sign .doc { fill: #f4f7ff; stroke: rgba(140,170,255,.4); }
.tl-sign .tx { stroke: #b9c6e8; stroke-width: 4; stroke-linecap: round; }
.tl-sign .sigpath { fill: none; stroke: #1f4fe0; stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 120; stroke-dashoffset: 120; animation: signDraw 4s ease-in-out infinite; }
@keyframes signDraw { 0%, 8% { stroke-dashoffset: 120; } 45%, 85% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: 0; opacity: 0; } }
.tl-sign .stamp { transform-box: fill-box; transform-origin: center; animation: stampIn 4s ease-out infinite; }
.tl-sign .stamp circle { fill: rgba(14,159,110,.2); stroke: #34d399; stroke-width: 2.5; }
.tl-sign .stamp path { fill: none; stroke: #34d399; stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; }
@keyframes stampIn { 0%, 45% { opacity: 0; transform: scale(1.8) rotate(-15deg); } 55% { opacity: 1; transform: scale(.92) rotate(0); } 60%, 88% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(1); } }

/* PKI */
.tl-pki .ln line { stroke: rgba(140,170,255,.4); stroke-width: 1.5; stroke-dasharray: 4 3; animation: dashRun 1.4s linear infinite; }
.tl-pki .ca rect { fill: rgba(47,107,255,.18); stroke: #6f94ff; stroke-width: 1.5; }
.tl-pki .ca.root rect { fill: rgba(255,200,61,.16); stroke: var(--sun); }
.tl-pki .ca text { fill: #e6ecff; font-size: 10px; font-weight: 700; }
.tl-pki .leaf rect { fill: rgba(34,211,238,.1); stroke: rgba(34,211,238,.6); stroke-width: 1.3; }
.tl-pki .leaf path { fill: none; stroke: #7fe7f7; stroke-width: 1.6; }
.tl-pki .leaf .lk { fill: #7fe7f7; stroke: none; }
.tl-pki .leaf { animation: leafOk 2.2s infinite; }
@keyframes leafOk { 0%, 70%, 100% { opacity: .55; } 80% { opacity: 1; } }

/* Robotics */
.tl-robot .base { fill: #1a2a57; stroke: #6f94ff; stroke-width: 1.5; }
.tl-robot .arm1 { transform-origin: 100px 104px; animation: arm1 4s ease-in-out infinite; }
.tl-robot .arm2 { transform-origin: 100px 56px; animation: arm2 4s ease-in-out infinite; }
.tl-robot .arm1 > rect, .tl-robot .arm2 > rect { fill: #2f6bff; }
.tl-robot .joint { fill: var(--lab); stroke: var(--sun); stroke-width: 2.5; }
.tl-robot .claw { stroke: var(--cyan); stroke-width: 3; stroke-linecap: round; fill: none; }
.tl-robot .eye { fill: var(--cyan); animation: hashFlick 1.6s infinite; }
@keyframes arm1 { 0%, 100% { transform: rotate(-18deg); } 50% { transform: rotate(14deg); } }
@keyframes arm2 { 0%, 100% { transform: rotate(-25deg); } 50% { transform: rotate(30deg); } }
.tl-robot .gear { animation: gearSpin 6s linear infinite; }
.tl-robot .gear circle, .tl-robot .gear rect { fill: rgba(255,200,61,.25); stroke: var(--sun); stroke-width: 1.2; }
.tl-robot .gear .hub { fill: var(--lab); }
@keyframes gearSpin { from { transform: translate(178px, 30px) rotate(0); } to { transform: translate(178px, 30px) rotate(360deg); } }

@media (max-width: 1180px) { .tl-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) { .tl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 460px) { .tl-grid { grid-template-columns: 1fr; } .tl-viz { height: 130px; } }

/* Nhãn công nghệ bay quanh chân dung */
.hero-chips { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
.hero-chip { position: absolute; display: inline-flex; align-items: center; gap: .45rem; padding: .45rem .75rem; border-radius: 12px; font-size: .78rem; font-weight: 700; color: #e8eeff; white-space: nowrap;
  background: rgba(10,22,52,.66); border: 1px solid rgba(140,170,255,.28); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: 0 12px 30px -14px rgba(0,0,0,.7);
  animation: chipFloat 6s ease-in-out infinite; }
.hero-chip svg { width: 16px; height: 16px; flex: none; }
.hero-chip.c-ai { top: 6%; left: -12%; color: #a5f3fc; }
.hero-chip.c-chain { top: 30%; right: -14%; color: #c7d2fe; animation-delay: -1.5s; }
.hero-chip.c-sign { top: 52%; left: -16%; color: #a7f3d0; animation-delay: -3s; }
.hero-chip.c-pki { top: 70%; right: -10%; color: #fde68a; animation-delay: -4.5s; }
.hero-chip.c-robot { top: -4%; right: 4%; color: #fbcfe8; animation-delay: -2.2s; }
@keyframes chipFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@media (max-width: 1200px) { .hero-chip.c-ai, .hero-chip.c-sign { left: -4%; } .hero-chip.c-chain, .hero-chip.c-pki { right: -4%; } }
@media (max-width: 960px) { .hero-chip { font-size: .7rem; padding: .35rem .6rem; } .hero-chip.c-sign, .hero-chip.c-robot { display: none; } }

@media (prefers-reduced-motion: reduce) {
  .techlab *, .hero-chip { animation: none !important; }
  .tl-sign .sigpath { stroke-dashoffset: 0; }
  .tl-sign .stamp { opacity: 1; }
}

/* ==========================================================================
   v7: hiệu ứng toàn trang
   ========================================================================== */
.scroll-bar { position: fixed; left: 0; top: 0; height: 3px; width: 100%; z-index: 9999; transform-origin: 0 50%; transform: scaleX(0); pointer-events: none;
  background: linear-gradient(90deg, var(--cyan), var(--primary) 50%, var(--sun)); box-shadow: 0 0 10px rgba(34,211,238,.6); }

/* Xuất hiện khi cuộn tới (chỉ bật khi có JS) */
.fx-on .fx { opacity: 0; transform: translateY(22px) scale(.985); filter: blur(4px); transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1), filter .7s; transition-delay: var(--fx-d, 0ms); }
.fx-on .fx.fx-in { opacity: 1; transform: none; filter: none; }
.fx-on .section-head.fx h2 { background-image: linear-gradient(90deg, var(--cyan), var(--primary)); background-repeat: no-repeat; background-size: 0% 3px; background-position: 0 100%; padding-bottom: .25rem; transition: background-size 1s .35s cubic-bezier(.2,.7,.2,1); }
.fx-on .section-head.fx-in h2 { background-size: 64px 3px; }
.fx-on .section-head[style*="center"].fx-in h2 { background-position: 50% 100%; }
/* thẻ có hiệu ứng hover riêng: không để transition-delay làm chậm hover */
.fx-on .fx.fx-in { transition-delay: 0ms; }

/* Vệt sáng theo con trỏ */
.spot { position: absolute; inset: 0; pointer-events: none; border-radius: inherit; opacity: 0; transition: opacity .35s; z-index: 1;
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), rgba(34,211,238,.16), transparent 65%); }
.tl-tile .spot { background: radial-gradient(240px circle at var(--mx, 50%) var(--my, 50%), rgba(34,211,238,.28), transparent 60%); mix-blend-mode: screen; }
.course-card, .post-card, .press-card, .note-card, .pf-card, .roadmap-step, .social-card, .feature { position: relative; }
.course-card:hover > .spot, .post-card:hover > .spot, .press-card:hover > .spot, .note-card:hover > .spot, .pf-card:hover > .spot, .roadmap-step:hover > .spot, .social-card:hover > .spot, .feature:hover > .spot, .tl-tile:hover > .spot { opacity: 1; }
.feature .spot { inset: .6rem -.4rem -.4rem .6rem; border-radius: 14px; }

/* Nghiêng 3D: transform do JS đặt, cần chuyển động mượt */
.tl-tile { transform-style: preserve-3d; will-change: transform; transition: transform .25s ease-out, box-shadow .4s, border-color .4s; }
.hero-figure { transition: transform .35s ease-out; will-change: transform; }

/* Câu hỏi thường gặp: mở mượt, biểu tượng xoay */
.faq details { transition: border-color .3s, box-shadow .3s, background-color .3s; }
.faq details[open] { border-color: rgba(47,107,255,.45); box-shadow: 0 0 0 1px rgba(34,211,238,.18), 0 18px 40px -26px rgba(31,79,224,.55); }
.faq details[open] p { animation: faqOpen .45s cubic-bezier(.2,.7,.2,1); }
@keyframes faqOpen { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.faq summary::after { content: ''; width: 22px; height: 22px; flex: none; border-radius: 50%; background: var(--primary-soft, #e8efff) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231f4fe0' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M12 6v12M6 12h12'/%3E%3C/svg%3E") center/14px no-repeat; transition: transform .35s cubic-bezier(.2,.7,.2,1), background-color .3s; }
.faq details[open] summary::after { transform: rotate(135deg); background-color: var(--cyan-soft); }
.faq summary:hover { color: var(--primary); }

/* Nút: phản hồi khi bấm */
.btn { transition: transform .15s, box-shadow .25s, background-color .25s, color .25s, border-color .25s; }
.btn:active { transform: translateY(1px) scale(.98); }

/* Logo đầu trang: quả địa cầu xoay nhẹ khi rê chuột */
.brand-mark img { transition: transform .8s cubic-bezier(.2,.7,.2,1); }
.brand:hover .brand-mark img { transform: rotate(-12deg) scale(1.06); }

/* Thanh điều hướng: gạch chân chạy khi rê chuột */
.nav-links > a, .nav-links .has-menu > a { position: relative; }
.nav-links > a::after { content: ''; position: absolute; left: 50%; right: 50%; bottom: -6px; height: 2px; border-radius: 2px; background: linear-gradient(90deg, var(--cyan), var(--primary)); transition: left .3s, right .3s; }
.nav-links > a:hover::after { left: 12%; right: 12%; }

/* Dải báo chí: tên báo sáng lên khi rê chuột */
.press-strip li a { transition: transform .3s; }
.press-strip li a:hover { transform: translateX(4px); }

/* Ảnh hoạt động: khung sáng khi rê */
.gallery-item { transition: box-shadow .4s, transform .4s; }
.gallery-item:hover { box-shadow: 0 0 0 1px rgba(34,211,238,.4), 0 24px 50px -24px rgba(31,79,224,.6); transform: translateY(-3px); }

@media (prefers-reduced-motion: reduce) {
  .fx-on .fx { opacity: 1 !important; transform: none !important; filter: none !important; }
  .scroll-bar { display: none; }
}

/* Đầu trang các trang con: cùng phong cách phòng thí nghiệm số với trang chủ */
.page-hero { color: #e8eeff; border-bottom: 1px solid rgba(140,170,255,.14);
  background: radial-gradient(700px 320px at 85% 10%, rgba(47,107,255,.35), transparent 65%), radial-gradient(500px 260px at 0% 0%, rgba(34,211,238,.14), transparent 60%), linear-gradient(180deg, var(--lab), var(--lab-2)) !important; }
[data-theme="dark"] .page-hero { background: radial-gradient(700px 320px at 85% 10%, rgba(47,107,255,.35), transparent 65%), linear-gradient(180deg, var(--lab), var(--lab-2)) !important; }
.page-hero::before { background-image: linear-gradient(rgba(140,170,255,.08) 1px, transparent 1px), linear-gradient(90deg, rgba(140,170,255,.08) 1px, transparent 1px); background-size: 44px 44px; -webkit-mask-image: radial-gradient(ellipse 70% 90% at 80% 30%, #000 20%, transparent 75%); mask-image: radial-gradient(ellipse 70% 90% at 80% 30%, #000 20%, transparent 75%); }
.page-hero::after { content: ''; position: absolute; right: 6%; top: 50%; width: 260px; height: 260px; margin-top: -130px; border-radius: 50%; pointer-events: none;
  border: 1px dashed rgba(34,211,238,.35); box-shadow: inset 0 0 0 30px rgba(47,107,255,.04), 0 0 0 40px rgba(255,200,61,.03); animation: orbitSpin 50s linear infinite; }
.page-hero h1 { color: #fff; }
.page-hero p, .page-hero .lead { color: #c3cde6; }
.page-hero .breadcrumb, .page-hero .breadcrumb a, .page-hero .breadcrumb span { color: #9fb3e6; }
.page-hero .breadcrumb a:hover { color: var(--cyan); }
.page-hero a:not(.btn):not(.chip) { color: #a5f3fc; }
.page-hero .chip, .page-hero .filter-chip { background: rgba(255,255,255,.06); color: #dbe4ff; border-color: rgba(140,170,255,.28); }
.page-hero .chip.active, .page-hero .filter-chip.active { background: #fff; color: var(--ink); border-color: #fff; }
.page-hero select { background-color: rgba(255,255,255,.06); color: #e8eeff; border-color: rgba(140,170,255,.28); }
.page-hero select option { color: #0e1b3d; }
.page-hero .badge { box-shadow: 0 0 0 1px rgba(255,255,255,.12); }
@media (max-width: 760px) { .page-hero::after { display: none; } }

/* ==========================================================================
   v8: bo góc, mượt mà, đáp ứng
   ========================================================================== */
/* Hiện dần: chỉ mờ và trượt, không làm mờ nhoè trên thẻ để cuộn mượt hơn */
.fx-on .fx { filter: none; transform: translateY(18px); transition: opacity .65s cubic-bezier(.2,.7,.2,1), transform .65s cubic-bezier(.2,.7,.2,1); transition-delay: var(--fx-d, 0ms); will-change: opacity, transform; }
.fx-on .fx.fx-in { transition-delay: var(--fx-d, 0ms); }
.fx-on .section-head.fx { filter: blur(3px); transition: opacity .65s, transform .65s, filter .65s; }
.fx-on .section-head.fx-in { filter: none; }

/* Bo góc những chỗ còn vuông */
.site-footer .brand-mark img, .admin-side .brand-mark img, .brand-mark img { border-radius: 50%; }
.tabs { gap: .35rem; }
.tab { border-radius: 10px 10px 0 0; transition: background-color .25s, color .25s, border-color .25s; }
.tab:hover { background: var(--primary-soft, #eef3ff); color: var(--primary); }
.share-bar { border: 1px solid var(--line) !important; border-radius: 16px; padding: .9rem 1.1rem !important; background: var(--bg-2, #fff); }
.learn-side .lesson-row { border-radius: 12px; margin: 2px 8px; }
.prose blockquote, .lesson-content blockquote, article blockquote { border-radius: 0 12px 12px 0; }
.prose img, .article-body img, .lesson-content img { border-radius: 14px; }
.prose pre, .article-body pre, .lesson-content pre { border-radius: 12px; }
.prose table, .article-body table { border-radius: 12px; overflow: hidden; }
.table-wrap { border-radius: 14px; overflow: auto; }
.video-embed, .video-embed iframe { border-radius: 16px; overflow: hidden; }
input, select, textarea { border-radius: 12px; }
.badge { border-radius: 999px; }
.sidebar-box, .panel, .card, .buy-box, .contact-item .icon, .pagination a, .pagination span { border-radius: 16px; }
.pagination a, .pagination span { border-radius: 10px; }
.lightbox img { border-radius: 14px; }
.toast { border-radius: 12px; }
.mega { border-radius: 16px; }
.mega a { border-radius: 12px; }
.mobile-menu, .nav-mobile { border-radius: 0 0 18px 18px; }

/* Chuyển động mượt cho thẻ */
.course-card, .post-card, .press-card, .pf-card, .roadmap-step, .social-card, .note-card, .gallery-item, .partner-logo { backface-visibility: hidden; }
.course-card .thumb img, .post-card .thumb img, .press-card .thumb img, .gallery-item img { transition: transform .8s cubic-bezier(.2,.7,.2,1); will-change: transform; }
.partner-logo { transition: border-color .3s, box-shadow .3s, transform .3s; }
.partner-logo:hover { border-color: rgba(34,211,238,.5); box-shadow: 0 10px 24px -16px rgba(31,79,224,.6); transform: translateY(-2px); }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Đáp ứng: tinh chỉnh khoảng cách và cỡ chữ */
@media (max-width: 1024px) {
  .hero-grid { gap: 2.5rem; }
  .section { padding-block: 4rem; }
}
@media (max-width: 760px) {
  .section { padding-block: 3.25rem; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 1rem; }
  .section-head h2 { font-size: clamp(1.6rem, 6.5vw, 2.1rem); }
  .hero.hero-lab { padding: 2.5rem 0 3rem; }
  .hero h1 { font-size: clamp(2.2rem, 10vw, 2.9rem); }
  .hero-cta .btn { flex: 1 1 100%; justify-content: center; }
  .hero-figure { width: min(100%, 360px); }
  .tl-tile { padding: .9rem .9rem 1.1rem; }
  .press-strip .container { gap: 1rem; }
  .note-card { padding: 1.4rem; }
  .faq summary { font-size: .95rem; }
  .page-hero h1 { font-size: clamp(1.8rem, 8vw, 2.4rem); }
}
@media (max-width: 380px) {
  .container { padding-inline: 1rem; }
  .hero-chip { display: none; }
}

/* Lưới năm mảng công nghệ: không để thẻ lẻ hàng ở máy tính bảng */
@media (max-width: 1180px) and (min-width: 761px) {
  .tl-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .tl-grid > * { grid-column: span 2; }
  .tl-grid > *:nth-child(4), .tl-grid > *:nth-child(5) { grid-column: span 3; }
}
@media (max-width: 760px) and (min-width: 461px) {
  .tl-grid > *:last-child { grid-column: 1 / -1; }
}
/* Ô tư vấn đứng một mình ở hàng cuối: trải hết chiều ngang */
@media (max-width: 900px) and (min-width: 581px) {
  .grid-3 > .note-card:last-child:nth-child(odd) { grid-column: 1 / -1; }
}

/* Nền tảng liên kết: 5 thẻ chia 3 trên 2 dưới cân đối */
@media (min-width: 901px) {
  .platform-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 1rem; }
  .platform-grid > * { grid-column: span 2; }
  .platform-grid > *:nth-child(4):nth-last-child(2), .platform-grid > *:nth-child(5):last-child { grid-column: span 3; }
}

/* Đầu trang trên màn hình rất hẹp: không để nút menu tràn ra ngoài */
.btn-login svg { display: none; width: 18px; height: 18px; }
@media (max-width: 420px) {
  .site-header .container { gap: .5rem; }
  .brand { gap: .45rem; min-width: 0; }
  .brand-mark { width: 38px; height: 38px; }
  .brand-text strong { font-size: 1.05rem; }
  .nav-actions { gap: .35rem; }
  .btn-login { padding: 0; width: 40px; height: 40px; justify-content: center; border-radius: 12px; }
  .btn-login svg { display: block; }
  .btn-login span { display: none; }
  .icon-btn { width: 40px; height: 40px; }
}
@media (max-width: 340px) {
  .brand-text small { display: none; }
  #themeToggle { display: none; }
}
