/* luyện nói landing: page CSS only for what sits inside a visual (the product's own screens drawn as live HTML),
   the logo, one --p-h per card group and the tablet/phone screen counts (layout-v4.md section 2). */

:root {
  --role-s: #1a4be0; --role-v: #c8283f; --role-o: #12804a; --role-adv: #b26a00;
}

/* the client's own mark (logo-mark.svg, inlined so its bars take the ground's ink) */
.nav__logo { gap: 10px; }
.ln-mark { width: 28px; height: 28px; flex: none; }
.footer__mark .ln-mark { width: 40px; height: 40px; }

/* ---------------------------------------------------------------- the product's UI, drawn live */
[data-role="s"] { --role: var(--role-s); }
[data-role="v"] { --role: var(--role-v); }
[data-role="o"] { --role: var(--role-o); }
[data-role="adv"] { --role: var(--role-adv); }

.lx-win, .lx-card, .lx-frag, .lx-tr, .lx-lv {
  border: 0;
  --lx-ink: #16181a; --lx-muted: #5d6268; --lx-line: rgb(0 0 0 / .08); --lx-fill: #f5f6f7;
  color: var(--lx-ink); font: 400 13px/1.4 var(--font-text); text-align: left;
}
.lx-tile {
  display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 14px; border-radius: 10px;
  font: 500 16px/1 var(--font-text); white-space: nowrap;
  background: #fff; color: var(--lx-ink); box-shadow: inset 0 0 0 1px rgb(0 0 0 / .14), 0 1px 0 rgb(0 0 0 / .08);
}
.lx-tile[data-role] {
  color: var(--role); background: color-mix(in oklab, var(--role) 9%, #fff);
  box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--role) 38%, transparent), inset 0 -3px 0 color-mix(in oklab, var(--role) 70%, transparent);
}
.lx-tile em { font: 500 12px/1 var(--font-mono); font-style: normal; opacity: .8; }
.lx-tile--ghost { color: transparent; background: var(--lx-fill); box-shadow: inset 0 0 0 1px rgb(0 0 0 / .06); }
.lx-slot { display: inline-block; width: 72px; height: 40px; border-radius: 10px; border: 1.5px dashed rgb(0 0 0 / .2); }
.lx-say { display: inline-grid; place-items: center; width: 32px; height: 32px; flex: none; border-radius: 999px; background: color-mix(in oklab, var(--role-s) 10%, #fff); color: var(--role-s); }
.lx-btn { display: inline-flex; align-items: center; height: 28px; padding: 0 14px; border-radius: 9px; background: var(--lx-ink); color: #fff; font: 500 13px/1 var(--font-text); white-space: nowrap; }
.lx-btn--ghost { background: var(--lx-fill); color: var(--lx-ink); box-shadow: inset 0 0 0 1px var(--lx-line); }
.lx-chip { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 999px; font: 500 12px/1 var(--font-text); white-space: nowrap; background: var(--lx-fill); color: var(--lx-muted); }
.lx-chip--ok { background: #e3f3ea; color: #0f6b3e; }
.lx-chip--no { background: #fbe7ea; color: #a51f33; }
.lx-ctx { display: flex; flex-wrap: wrap; gap: 6px; }
.lx-ctx > span { display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 999px; background: var(--lx-fill); box-shadow: inset 0 0 0 1px var(--lx-line); font-size: 12px; color: var(--lx-muted); white-space: nowrap; }

/* the hero window: the Ghép câu screen, cut by the frame's right and bottom edges */
.lx-win { max-width: none; background: #fff; border-radius: 14px; overflow: hidden; min-height: 760px; box-shadow: 0 0 0 1px rgb(0 0 0 / .07), 0 24px 60px -28px rgb(0 0 0 / .4); }
.lx-win__bar { display: flex; align-items: center; gap: 12px; height: 42px; padding: 0 16px; border-bottom: 1px solid var(--lx-line); background: #fafafa; color: var(--lx-muted); }
.lx-dots { display: flex; gap: 6px; } .lx-dots i { width: 10px; height: 10px; border-radius: 50%; background: #dcdfe2; }
.lx-crumb { white-space: nowrap; overflow: hidden; } .lx-crumb i { font-style: normal; opacity: .6; margin-inline: 2px; } .lx-crumb b { font-weight: 500; color: var(--lx-ink); }
.lx-win__body { display: grid; gap: 16px; align-content: start; padding: 20px var(--ly-cut-room, 48px) 24px 22px; }
.lx-steps { display: flex; gap: 8px; margin: 0; padding: 0; list-style: none; }
.lx-steps li { display: inline-flex; align-items: center; gap: 8px; height: 28px; padding: 0 12px 0 5px; border-radius: 999px; background: var(--lx-fill); color: var(--lx-muted); font-weight: 500; white-space: nowrap; }
.lx-steps li span { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: #fff; font: 500 12px/1 var(--font-mono); box-shadow: inset 0 0 0 1px var(--lx-line); }
.lx-steps li.is-done span { background: #e3f3ea; color: #0f6b3e; box-shadow: none; }
.lx-steps li.is-on { background: var(--lx-ink); color: #fff; } .lx-steps li.is-on span { color: var(--lx-ink); box-shadow: none; }
.lx-prompt { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 12px; background: var(--lx-fill); }
.lx-prompt small { display: block; font-size: 12px; color: var(--lx-muted); }
.lx-prompt p { margin: 2px 0 0; font: 500 18px/1.35 var(--font-text); color: var(--lx-ink); }
.lx-line { display: flex; flex-wrap: wrap; gap: 8px; min-height: 56px; padding: 8px 0 10px; border-bottom: 2px solid var(--lx-ink); }
.lx-tray { display: flex; flex-wrap: wrap; gap: 8px; }
.lx-result { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; background: #e3f3ea; color: #0b5131; }
.lx-result__ok { display: inline-grid; place-items: center; width: 30px; height: 30px; flex: none; border-radius: 50%; background: #12804a; color: #fff; font-weight: 500; }
.lx-result > div { display: grid; gap: 2px; min-width: 0; flex: 1; }
.lx-result b { font: 500 16px/1.2 var(--font-text); }
.lx-result span:not([class]) { font-size: 13px; }
.lx-result .lx-btn { background: #12804a; }
.lx-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--lx-muted); font-size: 12px; }
.lx-legend span { display: inline-flex; align-items: center; gap: 6px; }
.lx-legend span::before { content: ""; width: 10px; height: 10px; border-radius: 3px; background: var(--role); }

/* the small card over the window's lower left: a translation being graded */
.hero__art.mo-cs > .ly-piece { position: absolute; }
.hero__art > .ly-piece--note { left: var(--s-6); bottom: var(--s-6); width: 300px; z-index: 2; }
.lx-card { display: grid; gap: 6px; padding: 14px 16px; border-radius: 14px; background: #fff; box-shadow: 0 0 0 1px rgb(0 0 0 / .07), 0 18px 40px -18px rgb(0 0 0 / .45); }
.lx-card__row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.lx-card__row b { font: 500 14px/1.3 var(--font-text); }
.lx-card p { margin: 0; }
.lx-card__vi { color: var(--lx-muted); font-size: 13px; }
.lx-card__en { font: 500 16px/1.35 var(--font-text); padding: 8px 10px; border-radius: 9px; background: var(--lx-fill); }
.lx-card__note { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #0b5131; }
.lx-card__note i { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: #e3f3ea; font-style: normal; font-size: 12px; }
.lx-card .lx-chip { background: #e3f3ea; color: #0f6b3e; }
@media (max-width: 1023px) { .hero__art > .ly-piece--note { left: var(--s-4); bottom: var(--s-4); width: 270px; } }
@media (max-width: 639px) {
  .lx-win { min-height: 0; }
  .lx-win__body { gap: 10px; padding: 14px var(--ly-cut-room, 48px) 16px 14px; }
  .lx-steps, .lx-tray, .lx-legend { display: none; }
  .lx-prompt { padding: 10px 12px; } .lx-prompt p { font-size: 16px; }
  .lx-tile { height: 34px; padding: 0 10px; font-size: 15px; }
  .lx-line { min-height: 0; gap: 6px; padding: 4px 0 8px; }
  .lx-result { padding: 8px 10px; } .lx-result .lx-btn, .lx-result span:not([class]) { display: none; }
}

/* the step cards' fragments */
#bai-hoc .panel { --p-h: 300px; }
.lx-frag { display: grid; gap: 12px; padding: 16px; border-radius: 12px; background: #fff; box-shadow: 0 0 0 1px rgb(0 0 0 / .07), 0 14px 32px -18px rgb(0 0 0 / .35); }
.lx-frag p { margin: 0; }
.lx-frag__title { font: 500 15px/1.35 var(--font-text); }
.lx-formula { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.lx-formula span { display: inline-flex; align-items: center; height: 30px; padding: 0 10px; border-radius: 8px; font: 500 14px/1 var(--font-mono); color: var(--role); background: color-mix(in oklab, var(--role) 10%, #fff); box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--role) 35%, transparent); }
.lx-formula b { font-weight: 500; color: var(--lx-muted); }
.lx-ex { font-size: 15px; } .lx-ex span { color: var(--role); font-weight: 500; }
.lx-trap { display: grid; gap: 4px; padding: 10px 12px; border-radius: 10px; background: #fff6e8; box-shadow: inset 3px 0 0 var(--role-adv); }
.lx-trap__head { font-weight: 500; color: #7a4800; }
.lx-trap p:not(.lx-trap__head) { display: flex; align-items: center; gap: 8px; }
.lx-trap i { font-style: normal; color: #0f6b3e; width: 14px; } .lx-trap i.no { color: #a51f33; }
.lx-trap s { color: var(--lx-muted); } .lx-trap b { color: var(--role-v); font-weight: 500; }
.lx-trap__why { color: var(--lx-muted); font-size: 12px; }
.lx-line--sm { min-height: 0; gap: 6px; padding: 4px 0 10px; }
.lx-line--sm .lx-tile, .lx-tray--sm .lx-tile { height: 34px; padding: 0 11px; font-size: 14px; }
.lx-line--sm .lx-slot { height: 34px; width: 58px; }
.lx-tray--sm { gap: 6px; }
.lx-hint { color: var(--lx-muted); font-size: 12px; }
.lx-hints { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.lx-hints li { display: flex; align-items: center; gap: 8px; min-height: 32px; padding: 6px 10px; border-radius: 9px; background: var(--lx-fill); color: var(--lx-muted); }
.lx-hints li b { font-weight: 500; color: var(--lx-ink); white-space: nowrap; }
.lx-hints li.is-open { background: color-mix(in oklab, var(--role-s) 7%, #fff); box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--role-s) 22%, transparent); color: var(--lx-ink); }
.lx-hints li:not(.is-open) { border: 1px dashed rgb(0 0 0 / .2); background: #fff; }
/* the band sets its own minimum height (backgrounds.css --g-screen): it follows the section's screens here */
#bai-hoc { --g-screen: calc(var(--h, 1) * 100svh); }
@media (min-width: 1024px) and (max-width: 1279px) {
  #bai-hoc .grid > .card.span-4 { grid-column: auto / span 4; }
  #bai-hoc { padding-block: var(--padt) calc(var(--padb) + var(--bar)); }
  #bai-hoc .panel { --p-h: 200px; }
  /* a small laptop's short screen: the questions sit closer, as on a phone */
  .faq > .faq__item { padding-block: var(--s-4); }
  .faq > .faq__item:first-child { padding-top: 0; }
}
@media (min-width: 640px) and (max-width: 1023px) { #bai-hoc { --h: 2; } #bai-hoc .panel { --p-h: 30svh; } }
@media (max-width: 639px) { #bai-hoc { --hm: 2; --g-screen: calc(2 * 100lvh); } #bai-hoc .panel { --p-h: 270px; } }

/* the app frame (sections-library.md, app-frame: the whole recipe) */
.app.ui { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); margin-top: var(--s-7); background: var(--u-bg); border: 1px solid var(--u-border); border-radius: var(--u-r); box-shadow: var(--u-shadow); }
.app > .app__pane { position: relative; min-width: 0; min-height: 0; overflow: hidden; }
.app > .app__pane + .app__pane { border-left: 1px solid var(--u-line); }
.app > .app__pane > .ui-panel { width: 100%; border: 0; border-radius: 0; box-shadow: none; }
.app > .app__pane::after { content: ""; position: absolute; inset: auto 0 0 0; height: 64px; background: linear-gradient(transparent, var(--u-bg)); pointer-events: none; }
@media (min-width: 1024px) and (max-width: 1279px) { .app.ui { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); } }
@media (max-width: 1023px) {
  .app.ui { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  .app > .app__pane--list { max-height: 252px; }
  .app > .app__pane--list::after { display: none; }
  .app .ui-win__side { display: none; }
  .app .ui-win__body { grid-template-columns: minmax(0, 1fr); }
  .app > .app__pane + .app__pane { border-left: 0; border-top: 1px solid var(--u-line); }
}
@media (max-width: 639px) {
  .app.ui { grid-template-rows: minmax(0, 1fr); }
  .app > .app__pane--list { display: none; }
  .app > .app__pane + .app__pane { border-top: 0; }
}
.lx-lede { font-size: var(--t-lead); line-height: 1.5; }
#luyen-dich .ui-win__row .ui-avatar { font: 500 11px/1 var(--font-mono); }
#luyen-dich .ui-win__cols, #luyen-dich .ui-win__row { grid-template-columns: 24px minmax(0, 1.3fr) minmax(0, 1fr) 84px 0; }
#luyen-dich .ui-win__cols span:first-child { grid-column: auto / span 2; }
.lx-tr { width: 100%; background: #fff; }
.lx-tr__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 44px; padding: 0 20px; border-bottom: 1px solid var(--lx-line); background: #fafafa; color: var(--lx-muted); white-space: nowrap; }
.lx-tr__crumb { overflow: hidden; text-overflow: ellipsis; } .lx-tr__crumb i { font-style: normal; opacity: .6; } .lx-tr__crumb b { font-weight: 500; color: var(--lx-ink); }
.lx-tr__count { font-size: 12px; }
.lx-tr__body { display: grid; gap: 14px; padding: 20px 24px 28px; }
.lx-tr__vi { margin: 0; font: 500 20px/1.35 var(--font-text); }
.lx-tr__vi--next { color: var(--lx-muted); }
.lx-hints--row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.lx-hints--row li { flex-direction: column; align-items: flex-start; gap: 2px; }
.lx-answer { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; padding: 0 14px; border-radius: 10px; box-shadow: inset 0 0 0 1.5px #e3a3ad; font: 400 16px/1.3 var(--font-text); }
.lx-answer mark { background: #fbe7ea; color: #a51f33; border-radius: 4px; padding: 0 3px; }
.lx-ai { display: grid; gap: 6px; padding: 2px 0 2px 14px; border-left: 3px solid var(--role-s); }
.lx-ai p { margin: 0; font-size: 14px; line-height: 1.5; }
.lx-ai__head { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.lx-ai__dot { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; background: var(--role-s); color: #fff; font: 500 11px/1 var(--font-mono); }
.lx-ai b { font-weight: 500; color: var(--role-s); }
.lx-key { display: flex; align-items: center; gap: 12px; }
.lx-key small { display: block; font-size: 12px; color: var(--lx-muted); }
.lx-key > span:last-child { font: 500 16px/1.35 var(--font-text); }
.lx-tr__actions { display: flex; justify-content: flex-end; gap: 8px; padding-bottom: 6px; border-bottom: 1px solid var(--lx-line); }
.lx-ctx--next { margin-top: 4px; }
@media (max-width: 639px) {
  .lx-tr__body { padding: 16px; gap: 12px; }
  .lx-tr__vi { font-size: 17px; }
  .lx-hints--row { grid-template-columns: minmax(0, 1fr); }
  .lx-hints--row li { flex-direction: row; align-items: center; gap: 8px; }
  .lx-tr__count { display: none; }
}

/* the contexts: two screens of open tiles; a tablet crops them 4:3 so each group keeps its screen */
.lx-ctx-grid .tile__media > img { object-position: 50% 40%; }
.lx-ctx-grid .tile__head > h3 { font-size: var(--t-card); }
.lx-ctx-grid .tile > p { margin: 0; margin-top: calc(-1 * var(--s-2)); }
.lx-ctx-grid { row-gap: var(--s-6); }
.lx-ctx-grid .tile__media { --tile-ratio: 1; }
/* a tablet keeps the first three in one row and sets the four two by two, cropped 4:3 */
@media (min-width: 640px) and (max-width: 1023px) {
  #tinh-huong .lx-ctx-grid > .tile.span-4 { grid-column: auto / span 4; }
  #tinh-huong .lx-ctx-grid > .tile.span-3 .tile__media { --tile-ratio: 4 / 3; }
}
/* a phone: two-up 4:3, the odd last one across the row 16:9 */
@media (max-width: 639px) {
  #tinh-huong .lx-ctx-grid .tile__media { --tile-ratio: 4 / 3; }
  #tinh-huong .lx-ctx-grid > .tile:nth-child(odd of .tile):nth-last-child(1 of .tile) .tile__media { --tile-ratio: 16 / 9; }
}

/* the levels: a split with the account's levels on the lit ground */
.lx-facts { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.lx-facts li { padding: var(--s-3) 0; border-top: 1px solid var(--line); }
.lx-facts li:last-child { border-bottom: 1px solid var(--line); }
.lx-lit { border-color: transparent; background-color: var(--ground-bg);
  background-image:
    radial-gradient(70% 90% at 12% 0%, color-mix(in oklab, var(--ground-surface) 92%, white), transparent 70%),
    radial-gradient(60% 80% at 100% 100%, color-mix(in oklab, var(--ground-accent) 34%, var(--ground-bg)), transparent 72%); }
.lx-lv { width: 640px; max-width: none; background: #fff; border-radius: 14px; box-shadow: 0 0 0 1px rgb(0 0 0 / .07), 0 24px 60px -28px rgb(0 0 0 / .4); overflow: hidden; }
.lx-lv__head { display: flex; align-items: center; justify-content: space-between; height: 48px; padding: 0 20px; border-bottom: 1px solid var(--lx-line); }
.lx-lv__head b { font: 500 15px/1 var(--font-text); } .lx-lv__head span { font: 500 12px/1 var(--font-mono); color: var(--lx-muted); }
.lx-lv__rows { margin: 0; padding: 0; list-style: none; }
.lx-lv__rows li { display: grid; grid-template-columns: 44px 150px 84px minmax(0, 1fr); align-items: center; gap: 12px; height: 60px; padding: 0 20px; border-bottom: 1px solid var(--lx-line); color: var(--lx-muted); }
.lx-lv__rows li.is-open { color: var(--lx-ink); }
.lx-lv__rows li.is-now { background: color-mix(in oklab, var(--role-s) 5%, #fff); }
.lx-lv__code { display: inline-grid; place-items: center; width: 40px; height: 28px; border-radius: 8px; font: 500 14px/1 var(--font-mono); background: var(--lx-fill); }
li.is-open .lx-lv__code { background: var(--lx-ink); color: #fff; }
li.is-now .lx-lv__code { background: var(--role-s); }
.lx-lv__name { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lx-lv__bar { height: 6px; border-radius: 99px; background: var(--lx-fill); overflow: hidden; }
.lx-lv__bar i { display: block; height: 100%; width: var(--v, 0); border-radius: inherit; background: var(--lx-ink); }
li.is-now .lx-lv__bar i { background: var(--role-s); }
.lx-lv__rows .lx-chip { justify-self: start; }
.lx-lv__note { margin: 0; padding: 14px 20px 40px; color: var(--lx-muted); font-size: 13px; }
@media (min-width: 640px) and (max-width: 1023px) { #lo-trinh .frame--split { --ratio: 52%; } }
@media (max-width: 639px) {
  #lo-trinh .frame--split { --ratio: 78%; }
  .lx-lv { width: auto; }
  .lx-lv__rows li { grid-template-columns: 40px minmax(0, 1fr) 76px; gap: 10px; padding: 0 14px; height: 54px; }
  .lx-lv__bar { display: none; }
}

/* the footer's three link columns fill a tablet's row */
@media (min-width: 640px) and (max-width: 1023px) { .footer .footer__col { grid-column: auto / span 4; } }
