/* Moffice UI details v1 (owner 2026-12-06, from "9 UI details that beat AI slop" reel).
   Six of the nine were already fine (hairlines, focus, empty states, concentric radius, optical centre, icon strokes).
   This file adds the other three: balanced text, tabular digits, one primary action per screen. */

/* 1. Balanced text: headings split into even lines, paragraphs avoid a lone last word, buttons never break 1 word onto line 2 */
:where(h1,h2,h3,h4,.home-course-featured span,.home-master-grid span){text-wrap:balance}
:where(p,li,figcaption,blockquote,summary){text-wrap:pretty}
:where(a,button)[class]{text-wrap:balance}

/* 2. Tabular digits: every digit the same width, so prices/scores line up and rolling numbers don't wobble */
:where(.conversion-proof-score,.conversion-proof-chip,.package-cost,.home-course-featured strong,.home-master-grid strong,
 .sales-mobile-buy,.package-buy,.sp-score-ring,.sp-subscores,.score-report-snapshot,.checkpoint-score,mf-num,[data-mf-roll]),
:where(.conversion-proof) button strong{font-variant-numeric:tabular-nums}

/* 3a. Master course cards on phones: price moves under the text instead of squeezing it to 2 words a line */
@media (max-width:640px){
 .home-master-grid>a{grid-template-columns:58px minmax(0,1fr)}
 .home-master-grid>a>.home-master-icon{grid-column:1;grid-row:1/span 2;align-self:start}
 .home-master-grid>a>span:not(.home-master-icon){grid-row:1}
 .home-master-grid>a>p{grid-row:2}
 .home-master-grid>a>strong{grid-column:2;grid-row:3;align-self:start;text-align:left;margin-top:6px;font-size:19px}
 .home-master-grid>a>b{grid-column:2;grid-row:4;margin-top:6px}
 .home-master-grid p{min-height:0;margin:4px 0 0}
}

/* 3b. "Learn in steps" cards: the two trial buttons become the same quiet outline button (the green
   "วัดระดับฟรี" above stays the one main action); "ดูแลตลอดคอร์ส" is a fact, so it looks like a label, not a button */
.course-learning-overview .learning-step-cta{background:#fff!important;color:#163a70!important;border:1.5px solid #163a70!important;box-shadow:none!important}
.course-learning-overview .learning-step-cta:hover{background:#eef4fb!important}
.course-learning-overview .learning-step-status{background:transparent;padding-inline:0;color:#725500;min-height:0}
.course-learning-overview .learning-step-status::before{content:"✓";margin-right:6px;color:#168447;font-weight:900}

/* 3c. FULL TOEIC bonus block: picture large under the title, button on one line (phones and desktop) */
@media all{
 .sales-mobile-v4 .course-bonus-compact{grid-template-columns:1fr!important;text-align:center}
 .sales-mobile-v4 .course-bonus-compact .cbo-heading{text-align:center}
 .sales-mobile-v4 .course-bonus-compact .cbo-heading p{display:block;margin:0;color:#5a6d62}
 .sales-mobile-v4 .cbo-compact-image{height:auto;max-height:260px;max-width:460px;margin:8px auto 0}
 .sales-mobile-v4 .course-bonus-compact .cbo-open-label{display:inline-block;font-size:14px;padding:10px 18px;white-space:nowrap}
}
