/* Dot 269 (L2) - trang cong khai hocve.rart.vn. Mau 16-20 (story thien nhien, khung kinh mo, chu dam + chu viet tay).
   Mau thuong hieu: xam than - luc - cam. Khong style noi dong (CSP): anh nen / diem neo / do toi bang lop dinh san. */
:root {
  --ink: #2E2E33; --ink-2: #4A4A52; --leaf: #4F5E4B; --leaf-2: #7F8F74; --leaf-soft: #ECEEE8; --clay: #B8734D; --clay-2: #D9A07A; /* dot 272: ha do bao hoa (chu du an 25/10: "mau hoi chua, lui xuong trung tinh") - van xam than / luc / cam */
  --cream: #F6F2EA; --paper: #FFFDF9; --line: rgba(46,46,51,.12); --glass: rgba(30,34,30,.42); --glass-line: rgba(255,255,255,.28);
  --sans: 'Be Vietnam Pro', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif; --script: 'Dancing Script', 'Be Vietnam Pro', cursive;
  --top: 60px; --cta: 72px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body.st { font-family: var(--sans); color: var(--ink); background: var(--cream); -webkit-font-smoothing: antialiased; line-height: 1.55; }
a { color: inherit; }
img { max-width: 100%; display: block; }
.st-skip { position: absolute; left: -9999px; top: 0; z-index: 99; background: #fff; padding: 8px 12px; } .st-skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--clay-2); outline-offset: 2px; }

/* ---- Thanh tren ---- */
.st-top { position: fixed; inset: 0 0 auto 0; height: var(--top); z-index: 40; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 max(14px, env(safe-area-inset-left)); color: #fff; background: linear-gradient(180deg, rgba(20,22,20,.55), rgba(20,22,20,0)); }
.st-page .st-top { position: sticky; background: var(--ink); }
.st-brand { display: flex; align-items: center; gap: 9px; text-decoration: none; }
.st-brand img { width: 34px; height: 34px; border-radius: 10px; background: #fff; padding: 3px; }
.st-brand b { display: block; font-size: 14px; font-weight: 800; letter-spacing: .01em; } .st-brand i { display: block; font-family: var(--script); font-style: normal; font-size: 15px; color: var(--clay-2); line-height: 1; }
.st-topnav { display: flex; gap: 6px; align-items: center; font-size: 12.5px; }
.st-topnav a { text-decoration: none; padding: 6px 11px; border-radius: 99px; border: 1px solid var(--glass-line); backdrop-filter: blur(6px); background: rgba(255,255,255,.08); white-space: nowrap; }
.st-topnav a.st-login { background: rgba(255,255,255,.92); color: var(--ink); font-weight: 700; }
@media (max-width: 560px) { .st-topnav a:not(.st-login) { display: none; } }

/* ---- Thanh tien do kieu Stories + so slide ---- */
.st-prog { position: fixed; z-index: 41; top: 6px; left: 12px; right: 12px; display: flex; gap: 4px; pointer-events: none; }
.st-prog i { flex: 1; height: 3px; border-radius: 3px; background: rgba(255,255,255,.32); overflow: hidden; } .st-prog i.on { background: #fff; } .st-prog i.cur { background: var(--clay-2); }
.st-count { position: fixed; z-index: 41; right: 18px; top: calc(var(--top) + 8px); color: #fff; font-size: 12px; letter-spacing: .08em; opacity: .85; text-shadow: 0 1px 4px rgba(0,0,0,.35); } .st-count b { font-size: 18px; }

/* ---- Duong truot ngang ---- */
.st-track { display: flex; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scroll-behavior: smooth; height: 100svh; scrollbar-width: none; overscroll-behavior-x: contain; }
.st-track::-webkit-scrollbar { display: none; }
.st-slide { position: relative; flex: 0 0 100%; height: 100%; scroll-snap-align: start; scroll-snap-stop: always; overflow: hidden; color: #fff; background: var(--leaf); display: flex; }
.st-slide.st-group { background: radial-gradient(120% 90% at 85% 10%, var(--leaf-2) 0%, var(--leaf) 45%, #26302A 100%); }
.st-slide.st-final { background: radial-gradient(120% 90% at 10% 90%, #4A3A2E 0%, var(--ink) 60%); }
.st-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.st-dim { position: absolute; inset: 0; background: #0E120E; pointer-events: none; }
.dim-0{opacity:0}.dim-5{opacity:.05}.dim-10{opacity:.1}.dim-15{opacity:.15}.dim-20{opacity:.2}.dim-25{opacity:.25}.dim-30{opacity:.3}.dim-35{opacity:.35}.dim-40{opacity:.4}.dim-45{opacity:.45}.dim-50{opacity:.5}.dim-55{opacity:.55}.dim-60{opacity:.6}.dim-65{opacity:.65}.dim-70{opacity:.7}.dim-75{opacity:.75}.dim-80{opacity:.8}
.pos-center { object-position: center; } .pos-top { object-position: center top; } .pos-bottom { object-position: center bottom; } .pos-left { object-position: left center; } .pos-right { object-position: right center; }

/* ---- Noi dung slide: khung kinh mo + chu tap chi ---- */
.st-body { position: relative; z-index: 2; width: 100%; max-width: 1180px; margin: 0 auto; padding: calc(var(--top) + 26px) 22px calc(var(--cta) + 34px); display: flex; align-items: flex-end; gap: 28px; }
.st-body.col { flex-direction: column; align-items: flex-start; justify-content: flex-end; }
.st-text { max-width: 560px; padding: 22px 22px 20px; border-radius: 26px; background: var(--glass); border: 1px solid var(--glass-line); backdrop-filter: blur(3px); }
.st-eb { margin: 0 0 6px; font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; opacity: .85; } .st-eb a { text-decoration: none; }
.st-h { margin: 0; font-weight: 800; font-size: clamp(30px, 7.4vw, 58px); line-height: 1.04; letter-spacing: -.02em; }
.st-acc { margin: 4px 0 6px; font-family: var(--script); font-size: clamp(22px, 5vw, 34px); color: var(--clay-2); line-height: 1.15; }
.st-p { margin: 8px 0 0; font-size: 15px; max-width: 46ch; opacity: .95; }
.st-frame { margin: 0; flex: 0 0 34%; max-width: 380px; aspect-ratio: 4/5; border-radius: 26px; overflow: hidden; border: 2px solid rgba(255,255,255,.75); box-shadow: 0 30px 60px rgba(0,0,0,.35); transform: rotate(2deg); align-self: center; }
.st-frame img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 760px) {
  .st-body { flex-direction: column-reverse; align-items: stretch; justify-content: flex-end; gap: 16px; padding-left: 16px; padding-right: 16px; }
  .st-frame { flex: none; width: 58%; max-width: 260px; align-self: flex-end; transform: rotate(3deg); }
  .st-text { padding: 18px 18px 16px; }
}
@media (max-height: 640px) and (max-width: 760px) { .st-frame { display: none; } }

/* ---- The khoa hoc (vuot ngang trong slide) ---- */
.st-cards { list-style: none; margin: 0; padding: 4px 2px 6px; display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x proximity; width: 100%; scrollbar-width: thin; }
.st-cards li { flex: 0 0 auto; scroll-snap-align: start; }
.st-card { display: flex; flex-direction: column; width: 190px; text-decoration: none; border-radius: 22px; overflow: hidden; background: rgba(255,255,255,.1); border: 1px solid var(--glass-line); backdrop-filter: blur(4px); }
.st-card img, .st-card-ph { width: 100%; aspect-ratio: 4/3; object-fit: cover; background: linear-gradient(135deg, var(--leaf-2), var(--leaf)); }
.st-card b { padding: 10px 12px 0; font-size: 15px; line-height: 1.25; } .st-card span { padding: 4px 12px 12px; font-size: 12px; opacity: .85; }
.st-card:hover { background: rgba(255,255,255,.18); }
.st-corners { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; width: 100%; }
.st-corners li { padding: 14px 16px; border-radius: 20px; background: rgba(255,255,255,.1); border: 1px solid var(--glass-line); display: flex; flex-direction: column; gap: 3px; font-size: 13.5px; }
.st-corners b { font-size: 15px; } .st-corners a { color: var(--clay-2); font-weight: 700; }

/* ---- Mui ten (chay ca khi khong co JS) ---- */
.st-nav { position: absolute; z-index: 3; left: 0; right: 0; top: 50%; transform: translateY(-50%); display: flex; justify-content: space-between; padding: 0 8px; pointer-events: none; }
.st-nav .st-arrow { opacity: .7; } .st-nav .st-arrow:hover { opacity: 1; }
@media (max-width: 760px) and (hover: none) { .st-nav { display: none; } } /* dien thoai: vuot / cham nua man hinh */
.st-arrow { pointer-events: auto; width: 44px; height: 44px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; font-size: 26px; color: #fff; background: rgba(255,255,255,.14); border: 1px solid var(--glass-line); }
.st-arrow.next { margin-left: auto; } .st-arrow:hover { background: rgba(255,255,255,.28); }

/* ---- Nut + thanh dang ky noi ---- */
.st-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 46px; padding: 0 20px; border-radius: 99px; font-weight: 700; font-size: 14.5px; text-decoration: none; border: 1px solid var(--glass-line); color: #fff; background: rgba(255,255,255,.12); cursor: pointer; font-family: inherit; }
.st-btn.pri { background: var(--clay); border-color: var(--clay); color: #fff; box-shadow: 0 8px 20px rgba(120,80,55,.22); }
.st-btn.pri:hover { background: #A5643F; } .st-btn.wide { width: 100%; }
.st-text .st-btn { margin-top: 14px; } .st-two { display: flex; gap: 8px; flex-wrap: wrap; } .st-two .st-btn { margin-top: 14px; }
.st-cta { position: fixed; z-index: 45; left: 50%; transform: translateX(-50%); bottom: calc(12px + env(safe-area-inset-bottom)); display: flex; gap: 8px; padding: 6px; border-radius: 99px; background: rgba(30,32,30,.72); border: 1px solid var(--glass-line); backdrop-filter: blur(10px); max-width: calc(100% - 24px); }
.st-cta .st-btn { min-height: 44px; white-space: nowrap; }
.st-page .st-cta { background: rgba(46,46,51,.92); }

/* ---- Form truot tu day len (:target) ---- */
.st-sheet { position: fixed; inset: 0; z-index: 60; display: none; }
.st-sheet:target, .st-sheet.open { display: block; }
.st-sheet-bg { position: absolute; inset: 0; background: rgba(14,18,14,.55); }
.st-sheet-in { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); width: min(560px, 100%); max-height: 92svh; overflow: auto; background: var(--paper); color: var(--ink); border-radius: 26px 26px 0 0; padding: 22px 20px calc(22px + env(safe-area-inset-bottom)); animation: st-up .28s ease-out; }
@keyframes st-up { from { transform: translate(-50%, 30px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }
.st-sheet h2 { margin: 0 34px 12px 0; font-size: 20px; line-height: 1.25; }
.st-x { position: absolute; right: 14px; top: 10px; font-size: 28px; text-decoration: none; color: var(--ink-2); }
.st-sheet form { display: flex; flex-direction: column; gap: 10px; }
.st-sheet label { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); flex: 1; }
.st-sheet input:not([type=checkbox]), .st-sheet select { font: inherit; font-size: 16px; padding: 11px 12px; border-radius: 14px; border: 1px solid var(--line); background: #fff; color: var(--ink); }
.st-row { display: flex; gap: 10px; } @media (max-width: 420px) { .st-row { flex-direction: column; } }
.st-check { flex-direction: row !important; align-items: flex-start; font-weight: 400 !important; line-height: 1.45; } .st-check input { margin-top: 3px; }
.st-msg { padding: 10px 12px; border-radius: 14px; font-size: 13.5px; margin-bottom: 10px; } .st-msg.ok { background: var(--leaf-soft); color: var(--leaf); } .st-msg.err { background: #F7E3E0; color: #9B3A2A; }

/* ---- Trang doc doc (khoa hoc / bai viet / goi video) ---- */
.st-page .st-hero { position: relative; min-height: 78svh; display: flex; color: #fff; background: var(--leaf); overflow: hidden; }
.st-page .st-hero .st-body { padding-top: 40px; }
.st-article { max-width: 760px; margin: 0 auto; padding: 34px 20px calc(var(--cta) + 50px); font-size: 16.5px; }
.st-article h1 { font-size: 34px; line-height: 1.15; } .st-article h2 { font-size: 22px; margin: 30px 0 10px; } .st-article p { margin: 0 0 14px; }
.st-article section { margin-bottom: 20px; } .st-article ul a { color: var(--leaf); font-weight: 600; }
.st-anchor { position: absolute; left: 0; top: 0; }
.st-same { padding-left: 20px; } .st-same li { margin: 4px 0; }
.st-levels { padding-left: 22px; } .st-levels li { margin: 6px 0; }
.st-note { font-size: 14px; color: var(--ink-2); background: var(--leaf-soft); padding: 10px 14px; border-radius: 14px; }
.st-faq { border-bottom: 1px solid var(--line); padding: 10px 0; } .st-faq summary { cursor: pointer; font-weight: 700; } .st-faq p { margin: 8px 0 0; }
.st-video { position: relative; aspect-ratio: 16/9; border-radius: 20px; overflow: hidden; background: #000; } .st-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.st-foot { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 16px 20px calc(var(--cta) + 30px); font-size: 12.5px; color: var(--ink-2); }
.st-home .st-foot { display: none; }

@media (prefers-reduced-motion: reduce) { .st-track { scroll-behavior: auto; } .st-sheet-in { animation: none; } }

/* ---- Dot 272: nut tu van "Hoi R'art" + khung tro chuyen (moi trang cong khai) ---- */
.st-ask { position: fixed; z-index: 46; right: 16px; bottom: calc(var(--cta) + 22px + env(safe-area-inset-bottom)); display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px 8px 8px; border-radius: 99px; background: #fff; color: var(--ink); text-decoration: none; box-shadow: 0 10px 26px rgba(0,0,0,.28); font-size: 13.5px; }
.st-ask span { width: 30px; height: 30px; border-radius: 50%; background: var(--leaf); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 17px; }
.st-ask:hover { background: var(--cream); }
.st-chat { position: fixed; z-index: 50; right: 16px; bottom: calc(var(--cta) + 76px + env(safe-area-inset-bottom)); width: min(380px, calc(100vw - 24px)); height: min(520px, calc(100svh - var(--cta) - 120px)); display: flex; flex-direction: column; background: var(--paper); color: var(--ink); border-radius: 22px; box-shadow: 0 24px 60px rgba(0,0,0,.4); overflow: hidden; }
.st-chat[hidden] { display: none; }
.st-chat-h { display: flex; flex-direction: column; padding: 12px 44px 10px 16px; background: var(--leaf); color: #fff; position: relative; }
.st-chat-h span { font-size: 11.5px; opacity: .85; }
.st-chat-x { position: absolute; right: 10px; top: 6px; border: 0; background: none; color: #fff; font-size: 26px; cursor: pointer; }
.st-chat-log { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 8px; background: #fff; }
.st-chat-log p { margin: 0; max-width: 88%; padding: 9px 12px; border-radius: 16px; font-size: 14px; line-height: 1.5; white-space: pre-line; }
.st-chat-log p.bot { align-self: flex-start; background: var(--leaf-soft); border-bottom-left-radius: 4px; }
.st-chat-log p.bot.q { font-weight: 700; background: var(--cream); }
.st-chat-log p.me { align-self: flex-end; background: #EFE8E0; color: var(--ink); border-bottom-right-radius: 4px; }
.bot-list { align-self: flex-start; margin: 0; padding: 8px 12px 8px 28px; background: #fff; border: 1px solid #E8E4DE; border-radius: 14px; font-size: 13.5px; line-height: 1.55; color: #3A3A3F; max-width: 92%; } /* dot 282: danh sach khoa / co so trong khung tu van (tong trung tinh) */
.bot-list a { color: #3A3A3F; font-weight: 600; } .bot-list span { color: #6B6B70; }
.bot-act { display: flex; flex-wrap: wrap; gap: 6px; } .bot-act.col { flex-direction: column; align-items: flex-start; }
.bot-act .st-btn { min-height: 38px; font-size: 13.5px; }
.ask-opt, .ask-yes, .ask-no { font: inherit; font-size: 13px; text-align: left; padding: 7px 12px; border-radius: 14px; border: 1px solid var(--line); background: #fff; color: var(--ink); cursor: pointer; }
.ask-yes { background: var(--leaf); color: #fff; border-color: var(--leaf); }
.ask-opt:hover, .ask-no:hover { border-color: var(--clay); }
.st-chat-f { display: flex; gap: 6px; padding: 10px; border-top: 1px solid var(--line); background: var(--paper); }
.st-chat-f input { flex: 1; font: inherit; font-size: 16px; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--line); }
.st-chat-f button { width: 44px; border: 0; border-radius: 14px; background: var(--leaf); color: #fff; font-size: 18px; cursor: pointer; }
.ask-r { background: var(--leaf-soft); border-radius: 18px; padding: 14px 16px; margin: 14px 0; } .ask-r ul { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-direction: column; gap: 6px; }
.ask-form { display: flex; gap: 8px; align-items: flex-end; margin-top: 18px; } .ask-form label { flex: 1; display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 600; }
.ask-form input { font: inherit; font-size: 16px; padding: 11px 12px; border-radius: 14px; border: 1px solid var(--line); }
@media (max-width: 560px) { .st-ask b { display: none; } .st-ask { padding: 8px; } .st-chat { right: 12px; } }
/* Dot 272 (chu du an 25/10: "khung hoi thoai uu tien lui mau xuong trung tinh - tam ly hanh vi, khong hop lang nghe khi gap mau nhu vay"):
   khung tro chuyen toan tong trung tinh (giay sang, xam am, chu than); khong khoi mau cam / luc trong luc phu huynh doc. */
.st-chat { background: #FAF9F7; border: 1px solid #E4E0DA; box-shadow: 0 18px 44px rgba(40,38,34,.22); }
.st-chat-h { background: #F3F1EE; color: var(--ink); border-bottom: 1px solid #E4E0DA; }
.st-chat-h span { color: #77736C; opacity: 1; }
.st-chat-x { color: #77736C; }
.st-chat-log { background: #FAF9F7; }
.st-chat-log p.bot { background: #fff; border: 1px solid #E8E4DE; color: #3A3A3F; }
.st-chat-log p.bot.q { background: #F3F1EE; border-color: #E8E4DE; }
.st-chat-log p.me { background: #ECE8E3; color: var(--ink); }
.st-chat .bot-act .st-btn, .st-chat .bot-act .st-btn.pri { background: #fff; color: var(--ink); border: 1px solid #BDB7AF; box-shadow: none; font-weight: 600; }
.st-chat .bot-act .st-btn:hover { background: #F3F1EE; }
.st-chat .ask-yes { background: #F3F1EE; color: var(--ink); border-color: #BDB7AF; }
.st-chat .ask-opt, .st-chat .ask-no { border-color: #DDD8D1; }
.st-chat .ask-opt:hover, .st-chat .ask-no:hover, .st-chat .ask-yes:hover { border-color: #8E8880; }
.st-chat-f { background: #FAF9F7; border-top-color: #E4E0DA; }
.st-chat-f input { border-color: #DDD8D1; background: #fff; }
.st-chat-f button { background: #5A5A60; }
.st-ask span { background: #5A5A60; }
.ask-r { background: #F3F1EE; border: 1px solid #E4E0DA; }

/* Dot 275: ban xem truoc (nguoi co quyen Trang hocve) - dai bao + nhan "Cho duyet" */
.st-pv { position: fixed; z-index: 70; left: 50%; transform: translateX(-50%); top: calc(var(--top) + 6px); display: flex; align-items: center; gap: 10px; max-width: calc(100% - 24px); padding: 7px 8px 7px 14px; border-radius: 99px; background: #FFF4D6; color: #4A3B12; border: 1px solid #E8D39A; box-shadow: 0 8px 20px rgba(0,0,0,.18); font-size: 12.5px; }
.st-pv b { white-space: nowrap; } .st-pv span { opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; } .st-pv a { margin-left: 4px; padding: 4px 12px; border-radius: 99px; background: #4A3B12; color: #fff; text-decoration: none; font-weight: 700; white-space: nowrap; }
@media (max-width: 560px) { .st-pv span { display: none; } }
.sc-pend { position: absolute; z-index: 6; right: 4cqw; bottom: calc(var(--sb) + 14cqw); padding: 1cqw 3cqw; border-radius: 99px; background: #FFF4D6; color: #4A3B12; border: 1px solid #E8D39A; font-size: 2.8cqw; font-weight: 700; }

.sc-pend.draft { background: #EEF0F3; color: #3D4250; border-color: #C9CED8; }

/* Dot 364 (chu du an 30/10): logo that cua R'art (ban chu trang, dau trang nen toi) - khong ve lai */
.st-brand img.st-logo { width: auto; height: 54px; border-radius: 0; background: none; padding: 0; filter: drop-shadow(0 2px 6px rgba(0,0,0,.35)); }
/* Dot 429: video gioi thieu chuong trinh - Shorts doc 9:16 */
.st-video.v { aspect-ratio: 9 / 16; max-width: 360px; margin: 0 auto; }
