/* Long-form pages in the Grand Slam theme: the blog index (blog.html, main.floor), the
   articles (blog/*.html, blog-tw/*.html, main.art) and the legal pages (privacy.html,
   terms.html, main.legal, plus the Taiwan fragments legal-tw/*.html that build-langs.py
   swaps inside main.legal on the Chinese tree).
   Linked AFTER theme.css by reskin.py. The article markup is hand-written and kept as it
   was (art__* / fl-* / legal__* / tg-* classes); this file gives it the new look:
   a readable 720px measure, rounded colour rooms instead of rules, real tappable buttons.
   No new tokens: everything comes from theme.css :root. */

/* ---------- shared ---------- */
.wrap--narrow{max-width:calc(720px + 32px)}
.floor,.art,.legal{display:block}
.tg-kicker,.art__kick,.art__quick__k{font-family:var(--mono);font-size:12px;letter-spacing:.14em;text-transform:uppercase;color:var(--teal-deep);font-weight:600;margin:0}
.tg-met{font-family:var(--mono);font-size:12px;letter-spacing:.1em;text-transform:uppercase;color:var(--tx-3)}
body[data-lang="th"] .tg-kicker,body[data-lang="th"] .art__kick,body[data-lang="th"] .art__quick__k,body[data-lang="th"] .tg-met{font-family:var(--font);letter-spacing:.02em;font-size:13px;text-transform:none}
body[data-lang="zh"] .tg-kicker,body[data-lang="zh"] .art__kick,body[data-lang="zh"] .art__quick__k,body[data-lang="zh"] .tg-met{letter-spacing:.06em}
.tg-stamp{display:inline-grid;place-items:center;min-width:30px;height:26px;padding:0 8px;border-radius:999px;background:var(--ink);color:var(--on-ink);font-family:var(--mono);font-size:12px;font-weight:700;letter-spacing:.06em}
.tg-stamp--ghost{background:var(--paper);color:var(--tx);box-shadow:inset 0 0 0 1.5px var(--ink)}
.cta-char{width:120px;height:120px;flex:none}

/* ---------- article: the head ---------- */
.art__mast{margin:20px 0 0;padding:22px 18px 24px;border-radius:var(--r);background:var(--teal-soft)}
.art__crumb{display:flex;flex-wrap:wrap;align-items:center;gap:4px 6px;font-size:13.5px;color:var(--tx-3)}
.art__crumb a{color:var(--teal-deep);font-weight:700;text-decoration:none}
.art__crumb a:hover{text-decoration:underline;text-underline-offset:3px}
.art__rubric{display:flex;flex-wrap:wrap;align-items:center;gap:6px 14px;margin-top:14px}
.art__meta{font-size:14px;color:var(--tx-2);margin:0}
.art__h1{font-size:clamp(30px,6.6vw,46px);line-height:1.22;letter-spacing:-.015em;margin:12px 0 12px}
body[data-lang="th"] .art__h1,body[data-lang="zh"] .art__h1{letter-spacing:0;line-height:1.35}
body[data-lang="zh"] .art__h1{word-break:keep-all;overflow-wrap:anywhere}
.art__lead{font-size:clamp(17px,2.2vw,19px);line-height:1.7;color:var(--tx-2);margin:0}

/* ---------- article: the text ---------- */
.art__body{margin-top:28px;font-size:17px;line-height:1.85;color:var(--tx)}
body[data-lang="th"] .art__body{line-height:1.9}
.art__body>*+*{margin-top:1.05em}
/* country blocks (<market>, .mk-th-b / .mk-tw-b) keep the same rhythm inside */
.art__body market{display:block}
.art__body market>*+*,.art__body market>div>*+*{margin-top:1.05em}
.art__body>:first-child{margin-top:0}
.art__body h2{font-size:clamp(23px,4.4vw,30px);line-height:1.3;margin:1.9em 0 .1em;max-width:none;scroll-margin-top:80px}
.art__body h3{font-size:20px;line-height:1.4;margin:1.6em 0 0}
.art__body h4{font-size:17px;margin:1.4em 0 0}
.art__body h2+*,.art__body h3+*,.art__body h4+*{margin-top:.55em}
body[data-lang="zh"] .art__body h2,body[data-lang="zh"] .art__body h3{word-break:keep-all;overflow-wrap:anywhere}
.art__body p,.art__body li{color:var(--tx-2)}
.art__body a:not(.btn){color:var(--teal-deep);font-weight:600;text-underline-offset:3px;overflow-wrap:anywhere}
.art__body ul,.art__body ol{padding-left:1.3em;margin-bottom:0}
.art__body li+li{margin-top:.45em}
.art__body li ul{margin-top:.45em}
.art__body strong,.art__body b{color:var(--tx)}
.art__body blockquote{margin:1.6em 0;padding:18px 20px;border-radius:var(--r);background:var(--teal-soft);color:var(--tx);font-weight:600;line-height:1.75}
.art__body blockquote p{color:var(--tx)}
.art__body hr{border:0;border-top:1px solid var(--hair);margin:2em 0}

/* key takeaways ("the short answer") */
.art__quick{border-radius:var(--r);background:var(--paper-2);padding:20px 18px}
.art__quick ul{list-style:none;padding:0;margin:10px 0 0}
.art__quick li{position:relative;padding-left:26px;font-size:16px;line-height:1.75}
.art__quick li::before{content:"";position:absolute;left:2px;top:.62em;width:12px;height:7px;border-left:2.5px solid var(--teal-deep);border-bottom:2.5px solid var(--teal-deep);transform:rotate(-45deg)}
.art__quick__src{font-size:13px;color:var(--tx-3)!important;margin-top:12px;line-height:1.6}

/* notes, asides, lists */
.art__note{font-size:14px!important;line-height:1.65;color:var(--tx-3)!important;padding:12px 14px;border-radius:var(--r-sm);background:var(--paper-2)}
.art__aside{margin-top:1.6em;border-radius:var(--r);background:var(--amb-soft);padding:20px 18px}
.art__aside h3{margin:0 0 6px;font-size:19px}
.art__aside p+p{margin-top:8px}
.art__list{list-style:none;padding:0!important}
.art__list li{position:relative;padding-left:22px}
.art__list li::before{content:"";position:absolute;left:3px;top:.72em;width:8px;height:8px;border-radius:50%;background:var(--teal)}

/* tables: the .tbl-wrap look */
.art__tablewrap,div.art__table{overflow-x:auto;-webkit-overflow-scrolling:touch;border-radius:14px;border:1.5px solid var(--hair-2);background:var(--paper)}
table.art__table,div.art__table table{width:100%;border-collapse:collapse;font-size:15px;line-height:1.6}
/* two columns fit a phone; three or more scroll inside their room, never the page */
table.art__table:has(tr>:nth-child(3)),div.art__table table:has(tr>:nth-child(3)){min-width:520px}
.art__body table th,.art__body table td{text-align:left;vertical-align:top;padding:12px 14px;border-bottom:1px solid var(--hair);color:var(--tx-2)}
.art__body table thead th{background:var(--paper-2);font-size:14px;color:var(--tx)}
.art__body table tbody th{font-weight:700;color:var(--tx)}
.art__body table tr:last-child>*{border-bottom:0}
.art__body table strong{font-variant-numeric:tabular-nums}
.art__table tr.is-workco>*{background:var(--teal-soft)}
.art__table tr.is-workco th{color:var(--teal-deep)}

/* a real screen beside its legend */
.art__shot{display:grid;gap:16px;align-items:center;margin:1.8em 0;border-radius:var(--r);background:var(--paper-2);padding:22px 18px}
.tg-plate{margin:0}
.art__shot .tg-plate{justify-self:center;width:min(100%,260px)}
.art__shot .tg-plate img{width:100%;border:7px solid #14181C;border-radius:28px;box-shadow:0 16px 36px rgba(15,17,21,.16);background:#14181C}
.tg-plate__cap{display:flex;align-items:center;justify-content:center;gap:8px;margin-top:12px;font-size:13px;font-weight:700;color:var(--tx-2)}
.art__shot__legend p{font-size:15.5px;line-height:1.75}
.art__shot__legend p+p{margin-top:8px}
.art__shot__legend .tg-kicker{margin-bottom:6px}

/* FAQ: the .faq look on the article's own <details> */
.art__faq{border-top:2px solid var(--ink)}
.art__faq details{border-bottom:1px solid var(--hair)}
.art__faq summary{list-style:none;cursor:pointer;display:flex;justify-content:space-between;gap:14px;align-items:center;padding:16px 2px;font-weight:700;font-size:17px;line-height:1.5;min-height:56px;color:var(--tx)}
.art__faq summary::-webkit-details-marker{display:none}
.art__faq summary::after{content:"+";font-family:var(--mono);font-size:24px;color:var(--teal-deep);transition:transform .2s var(--ease);flex:none}
.art__faq details[open] summary::after{transform:rotate(45deg)}
.art__faq summary svg{display:none}
.art__faq details>p,.art__faq details>div{padding:0 2px 18px;margin:0;font-size:16px;line-height:1.8}
.art__faq details>p+p{margin-top:-8px}

/* the overtime calculators */
.calc{border-radius:var(--r);background:var(--paper-2);padding:20px 18px;margin-top:1.2em}
.calc__pay{display:flex;flex-wrap:wrap;gap:8px;border:0;padding:0;margin:0 0 16px}
.calc__pay label{display:inline-flex;align-items:center;gap:8px;min-height:44px;padding:8px 14px;border-radius:999px;border:1.5px solid var(--ink);background:var(--paper);font-weight:700;font-size:15px;cursor:pointer;box-shadow:0 3px 0 var(--ink)}
.calc__pay input{accent-color:var(--teal-deep);width:18px;height:18px;margin:0}
.calc__grid{display:grid;grid-template-columns:1fr;gap:12px}
.calc__f{display:flex;flex-direction:column;gap:6px;font-size:14.5px;font-weight:700;color:var(--tx)}
.calc__f input{min-height:48px;border:1.5px solid var(--hair-2);border-radius:12px;background:var(--paper);color:var(--tx);font:inherit;font-size:16px;font-weight:600;padding:10px 12px;width:100%}
.calc__f input:focus{outline:3px solid var(--teal);outline-offset:1px;border-color:var(--teal)}
.calc__out{margin-top:18px;border-radius:14px;background:var(--paper);padding:6px 16px}
.calc__row{display:flex;justify-content:space-between;align-items:baseline;gap:14px;padding:11px 0;border-bottom:1px dashed var(--hair-2);font-size:15.5px;color:var(--tx-2)!important;margin:0!important}
.calc__row output{font-family:var(--mono);font-weight:700;color:var(--tx);font-variant-numeric:tabular-nums;white-space:nowrap}
.calc__row--total{border-bottom:0;color:var(--tx)!important;font-weight:700}
.calc__row--total output{color:var(--teal-deep);font-size:20px}
.calc__warn{margin-top:12px!important;padding:12px 14px;border-radius:var(--r-sm);background:var(--amb-soft);color:var(--amb)!important;font-size:14.5px;font-weight:600}
.calc__note{margin-top:12px!important;font-size:13.5px;line-height:1.6;color:var(--tx-3)!important}

/* the article's last call */
.art__cta{margin:44px 0 0;border-radius:var(--r);background:var(--teal-soft);padding:24px 18px;display:grid;gap:10px}
.art__cta .cta-char{justify-self:end;width:104px;height:104px;margin:-8px -4px -6px 0;order:-1}
.art__cta h2{font-size:clamp(24px,4.6vw,32px);margin:0;max-width:none}
.art__cta p{color:var(--tx-2);font-size:16.5px;line-height:1.75}
.art__cta-btns{display:flex;flex-direction:column;gap:10px;margin-top:8px}
.art__cta-btns .btn{width:100%}
.art__cta-btns .btn svg.i{width:18px;height:18px}

/* ---------- blog index (The Floor) ---------- */
.fl-mast{margin-top:20px;border-radius:var(--r);background:var(--teal-soft);padding:24px 18px 26px}
.fl-mast__rubric{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:6px 14px}
.fl-mast__name{font-size:clamp(44px,12vw,92px);line-height:1;letter-spacing:-.03em;margin:16px 0 14px}
.fl-mast__tag{font-size:clamp(17px,2.2vw,19px);line-height:1.7;color:var(--tx-2);max-width:36em}
.fl-mast__colophon{display:flex;flex-wrap:wrap;align-items:center;gap:8px 12px;margin-top:18px}
.edition{padding-top:52px;scroll-margin-top:72px}
.tg-sec{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px}
.fl-open{display:grid;gap:16px;align-items:center;margin-bottom:18px}
.fl-open__h{font-size:clamp(28px,6vw,40px);line-height:1.2;margin:0 0 8px}
.fl-open__note{font-size:16.5px;line-height:1.7;color:var(--tx-2);max-width:32em}
.fl-open__plate{border-radius:var(--r);overflow:hidden;position:relative;margin:0}
.fl-open__plate img{width:100%;aspect-ratio:16/8;object-fit:cover}
.fl-open__plate .tg-plate__cap{position:absolute;left:12px;bottom:12px;margin:0;background:var(--paper);color:var(--tx);border-radius:10px;padding:5px 10px 5px 6px;font-size:13px;justify-content:flex-start}
.fl-list{list-style:none;margin:0;padding:0;display:grid;gap:14px}
.fl-list>li{display:flex}
.fl-entry{flex:1;display:grid;grid-template-columns:auto 1fr;grid-template-rows:auto auto 1fr auto;gap:10px 14px;align-items:start;border-radius:var(--r);background:var(--paper-2);padding:20px 18px;text-decoration:none;color:var(--tx);transition:transform .2s var(--ease),box-shadow .2s var(--ease)}
.fl-entry:hover{transform:translateY(-3px);box-shadow:0 10px 26px rgba(15,17,21,.08)}
.fl-entry--lead{background:var(--teal-soft)}
.fl-entry__no{grid-row:1;grid-column:1;display:grid;place-items:center;width:34px;height:34px;border-radius:50%;background:var(--ink);color:var(--on-ink);font-family:var(--mono);font-weight:700;font-size:13px}
.fl-entry__body{display:contents}
.fl-entry__rub{grid-row:1;grid-column:2;align-self:center;font-size:13px;font-weight:600;color:var(--tx-3);margin:0}
.fl-entry__date{font-family:var(--mono);font-size:12px}
.fl-entry__h{grid-column:1 / -1;font-size:19px;line-height:1.4;margin:2px 0 0}
body[data-lang="zh"] .fl-entry__h{word-break:keep-all;overflow-wrap:anywhere}
.fl-entry__ex{grid-column:1 / -1;font-size:15px;line-height:1.65;color:var(--tx-2);margin:0}
.fl-entry__read{grid-column:1 / -1;display:inline-flex;align-items:center;gap:6px;font-weight:700;font-size:14.5px;color:var(--teal-deep);margin-top:2px}
.fl-entry__read::after{content:"\2192";font-weight:700}
.fl-end{margin-top:56px;border-radius:var(--r);background:var(--paper-2);padding:26px 18px;display:grid;gap:14px;align-items:center}
.fl-end__h{font-size:clamp(26px,5.4vw,38px);line-height:1.25;margin:0 0 8px}
.fl-end__p{font-size:17px;line-height:1.7;color:var(--tx-2)}
.fl-end .btn{width:100%}
.fl-end .cta-char{justify-self:center}

/* ---------- legal ---------- */
.legal__head{margin-top:20px;border-radius:var(--r);background:var(--paper-2);padding:22px 18px 24px}
.legal__updated{display:inline-flex;font-size:13.5px;font-weight:600;color:var(--tx-2);background:var(--paper);border-radius:8px;padding:4px 10px}
.legal__h{font-size:clamp(30px,6.4vw,44px);line-height:1.22;margin:12px 0 12px}
body[data-lang="th"] .legal__h,body[data-lang="zh"] .legal__h{line-height:1.35}
.legal__intro{font-size:16.5px;line-height:1.8;color:var(--tx-2)}
.legal .toc{margin-top:16px;display:grid;gap:2px;padding:12px 10px}
.legal .toc a{display:flex;align-items:center;min-height:44px;padding:6px 10px;border-radius:10px;font-size:15px;font-weight:600;color:var(--tx-2);text-decoration:none}
.legal .toc a:hover{background:var(--paper);color:var(--teal-deep);text-decoration:none}
.legal__body{margin-top:12px;font-size:16.5px;line-height:1.85;color:var(--tx-2)}
.legal__body section{scroll-margin-top:80px;padding-top:2px}
.legal__body h2{font-size:clamp(21px,3.8vw,26px);line-height:1.35;margin:1.8em 0 .5em;color:var(--tx);max-width:none}
.legal__body h3{font-size:18px;margin:1.4em 0 .4em;color:var(--tx)}
.legal__body p+p,.legal__body p+ul,.legal__body ul+p,.legal__body p+ol,.legal__body ol+p,.legal__body p+table,.legal__body table+p{margin-top:.9em}
.legal__body ul,.legal__body ol{padding-left:1.3em;margin:.6em 0 0}
.legal__body li+li{margin-top:.4em}
.legal__body strong,.legal__body b{color:var(--tx)}
.legal__body a{color:var(--teal-deep);font-weight:600;text-underline-offset:3px;overflow-wrap:anywhere}
.legal__body table{width:100%;border-collapse:collapse;font-size:14.5px;display:block;overflow-x:auto;border-radius:12px;border:1.5px solid var(--hair-2);margin-top:.9em}
.legal__body th,.legal__body td{text-align:left;vertical-align:top;padding:10px 12px;border-bottom:1px solid var(--hair)}
.legal__body thead th{background:var(--paper-2);color:var(--tx)}
.legal__body tr:last-child>*{border-bottom:0}
.legal>.wrap,.art>.wrap,.floor>.wrap{padding-bottom:56px}
/* Thailand | Taiwan switch on the English legal pages (Dan 2026-10-18): each
   country has its own terms and privacy policy; English shows both. */
.legal-country{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:0 0 14px}
.legal-country__lbl{flex-basis:100%;font-size:13.5px;font-weight:600;color:var(--tx-2)}
.legal-country a{display:inline-flex;align-items:center;min-height:44px;padding:0 20px;border-radius:999px;border:1.5px solid var(--hair-2);background:var(--paper);color:var(--tx);font-size:15px;font-weight:700;text-decoration:none}
.legal-country a:hover{border-color:var(--ink);text-decoration:none}
.legal-country a[aria-current="page"]{background:var(--ink);border-color:var(--ink);color:var(--on-ink)}
.legal-xlate{margin-top:12px;font-size:14px;line-height:1.6;color:var(--tx-2)}
.legal-xlate a{color:var(--teal-deep);font-weight:600}
/* Grand Slam DRAFT legal text (2026-10-18): not lawyer-checked, preview only.
   .legal-draft = the amber notice at the top of each new part; .legal-new = the
   new text itself (dashed amber edge); .ph-legal = a [square bracket] item Dan
   has not decided yet. check-claims.py warns on any page carrying .legal-draft. */
.legal-draft{position:relative;margin:1em 0 .2em;padding:12px 16px 12px 44px;border-radius:14px;background:var(--amb-soft);border:1.5px solid rgba(154,74,8,.3);color:var(--amb);font-size:15px;font-weight:700;line-height:1.6}
.legal-draft::before{content:"!";position:absolute;left:14px;top:14px;width:20px;height:20px;border-radius:50%;background:var(--amb);color:#fff;font-size:13px;line-height:20px;text-align:center;font-weight:800}
.legal__body p+.legal-draft,.legal__body ul+.legal-draft{margin-top:1em}
.legal-new{border-left:3px dashed rgba(154,74,8,.45);padding-left:14px;margin-top:1em}
.legal__body section.legal-new{margin-top:2.4em;padding-top:2px}
.legal__body section.legal-new>h2{margin-top:.4em}
.legal-new>.legal-draft:first-child{margin-top:0}
.legal__body li.legal-new{border-left:0;padding:4px 10px;margin-top:0;border-radius:10px;background:var(--amb-soft)}
.legal__body li.legal-new+li{margin-top:.6em}
.ph-legal{background:var(--amb-soft);color:var(--amb);font-weight:700;border:1.5px dashed var(--amb);border-radius:5px;padding:0 .3em;-webkit-box-decoration-break:clone;box-decoration-break:clone}
.legal__body h4{font-size:16.5px;line-height:1.5;margin:1.2em 0 .3em;color:var(--tx)}
.legal__body p.clause{margin-top:.55em}
.legal__body h3+p.clause,.legal__body h4+p.clause{margin-top:.2em}
.clause__n{margin-right:.3em;font-variant-numeric:tabular-nums}
.legal-new__upd{font-size:14px;font-weight:600}
.legal__body .legal-new__note{margin-top:.4em;font-size:15px;color:var(--amb)}

/* ---------- tablet and desktop ---------- */
@media (min-width:640px){
  .art__mast,.fl-mast,.legal__head{padding:32px 30px 34px}
  .art__quick,.art__aside,.calc{padding:24px 26px}
  .art__shot{grid-template-columns:220px 1fr;gap:28px;padding:26px}
  .art__shot .tg-plate{width:100%}
  .calc__grid{grid-template-columns:1fr 1fr}
  .art__cta{grid-template-columns:1fr auto;padding:30px 30px;column-gap:24px}
  .art__cta>*{grid-column:1}
  .art__cta .cta-char{grid-column:2;grid-row:1 / span 4;order:0;align-self:end;width:140px;height:140px;margin:0 -6px -10px 0}
  .art__cta-btns{flex-direction:row;flex-wrap:wrap}
  .art__cta-btns .btn{width:auto}
  .fl-list{grid-template-columns:1fr 1fr}
  .fl-end{grid-template-columns:1fr auto;padding:36px 34px}
  .fl-end .btn{width:auto;justify-self:start;margin-top:4px}
  .fl-end .cta-char{grid-column:2;grid-row:1 / span 2;width:150px;height:150px}
  .legal .toc{grid-template-columns:1fr 1fr;column-gap:8px}
}
@media (min-width:900px){
  .art__mast{margin-top:32px}
  .fl-mast{margin-top:32px;padding:44px 44px 46px}
  .fl-open{grid-template-columns:1fr 1.1fr;gap:36px}
  .fl-list{grid-template-columns:repeat(3,1fr)}
  .edition{padding-top:72px}
}
/* design check 2026-10-20: reading measure for the legal intro */
.legal__intro{max-width:36em}
