/* Malaysia Tax Residency Calculator. Uses the Personal Tax Reliefs design tokens; teal primary buttons, rounded inputs, no black buttons. */
.tr-page { --tr-navy:#0b3551; --tr-deep:#08283d; --tr-teal:#087f7b; --tr-teal-dark:#066663; --tr-mint:#dff5f1; --tr-ice:#eef7fb; --tr-line:#d8e5eb; --tr-text:#183343; --tr-muted:#566b78; --tr-white:#fff; --tr-warn:#8a4b00; --tr-warn-bg:#fff4e0; --tr-bad:#9b1c1c; --tr-bad-bg:#fdecec; --tr-radius:12px; --tr-radius-card:14px; --tr-radius-main:20px;
  color:var(--tr-text); background:#f8fbfc; font-family:inherit; }
.tr-page *, .tr-page *::before, .tr-page *::after { box-sizing:border-box; }
.tr-page .container { max-width:1100px; margin:0 auto; padding:0 18px; }

/* hero */
/* The site breadcrumb banner only repeated the page title above the hero (a tall empty band when the theme has no banner
   image), so it is hidden on this page and the hero sits directly under the site header. Scoped to this page (this
   stylesheet only loads here); the header and every other page keep their banner. The template still fills the
   breadcrumb sections. Layouts whose header is absolutely positioned need the banner to clear it, so they keep it. */
body:has(.tr-page):not(:has(.header-area.header-absolute)) .breadcrumb-area { display:none !important; }
.tr-page [hidden] { display:none !important; }
.tr-hero { padding:clamp(22px,3vw,40px) 0 clamp(18px,2.4vw,28px); background:linear-gradient(135deg,#eaf8f6 0%,#f7fbfd 48%,#e8f3f9 100%); border-bottom:1px solid var(--tr-line); }
.tr-eyebrow { margin:0 0 8px; color:var(--tr-teal); font-size:12px; font-weight:800; letter-spacing:.12em; text-transform:uppercase; }
.tr-hero h1 { max-width:820px; margin:0 0 10px; color:var(--tr-navy); font-size:clamp(26px,3.6vw,44px); line-height:1.1; letter-spacing:-.025em; font-weight:800; text-wrap:balance; }
.tr-lead { max-width:760px; margin:0 0 12px; color:var(--tr-muted); font-size:clamp(15px,1.4vw,18px); line-height:1.55; }
.tr-trust { display:flex; flex-wrap:wrap; gap:4px 16px; margin:0; padding:0; list-style:none; color:var(--tr-navy); font-size:13.5px; font-weight:600; }
.tr-trust li::before { content:"✓"; margin-right:6px; color:var(--tr-teal); font-weight:800; }
/* Chinese headings: no letter-spacing, no orphan character on a second line; the size scales so the title fits one line on a phone. */
.tr-page[lang="zh-Hans"] .tr-hero h1 { font-size:clamp(23px,6.2vw,42px); letter-spacing:0; line-height:1.2; word-break:keep-all; line-break:strict; }
.tr-page[lang="zh-Hans"] .tr-lead { line-height:1.65; }

/* app shell */
.tr-shell { padding:20px 0 36px; }
.tr-app { display:grid; grid-template-columns:minmax(0,1fr); gap:20px; }
.tr-step, .tr-card, .tr-cards, .tr-card-body, .tr-method-body, .tr-cal-body { min-width:0; max-width:100%; }
.tr-loading, .tr-noscript { padding:18px; border:1px dashed var(--tr-line); border-radius:var(--tr-radius); background:#fff; color:var(--tr-muted); }
.tr-step { padding:clamp(16px,2.4vw,26px); border:1px solid var(--tr-line); border-radius:18px; background:#fff; box-shadow:0 10px 30px rgba(11,53,81,.05); }
.tr-step h2 { margin:0 0 12px; line-height:1.25; color:var(--tr-navy); font-size:clamp(19px,2.2vw,24px); font-weight:800; letter-spacing:-.02em; text-wrap:balance; }
.tr-page[lang="zh-Hans"] .tr-step h2, .tr-page[lang="zh-Hans"] .tr-step h3 { letter-spacing:0; word-break:keep-all; line-break:strict; }
.tr-today { margin:2px 0 0; color:var(--tr-muted); font-size:13.5px; }
.tr-step h3 { margin:18px 0 10px; line-height:1.3; color:var(--tr-navy); font-size:18px; font-weight:750; }
.tr-others-title { margin-top:24px; }

/* controls */
.tr-field { display:grid; gap:6px; min-width:0; margin:0 0 12px; }
.tr-field > label, .tr-methods legend, .tr-baseline legend, .tr-q legend { color:var(--tr-navy); font-size:14px; font-weight:700; }
.tr-input { width:100%; min-height:48px; padding:10px 14px; border:1.5px solid #b7cbd5; border-radius:var(--tr-radius); background:#fff; color:var(--tr-text); font:inherit; font-size:16px; line-height:1.3; }
.tr-input:hover { border-color:#8fb0be; }
.tr-input:focus-visible, .tr-button:focus-visible, .tr-day:focus-visible, .tr-cal-nav:focus-visible, .tr-card > summary:focus-visible, .tr-disclosure > summary:focus-visible, .tr-radio-input:focus-visible + label, .tr-check-input:focus-visible { outline:3px solid #155eef; outline-offset:2px; }
.tr-select { appearance:auto; }
.tr-help { margin:2px 0 0; color:var(--tr-muted); font-size:13.5px; line-height:1.5; }
.tr-rule { margin:0 0 14px; padding:10px 14px; border-left:4px solid var(--tr-teal); border-radius:0 var(--tr-radius) var(--tr-radius) 0; background:var(--tr-mint); color:var(--tr-navy); font-size:14.5px; line-height:1.5; }
.tr-note { margin:6px 0 0; color:var(--tr-muted); font-size:13.5px; }
.tr-grid2 { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:0 14px; }
.tr-check { position:relative; display:grid; grid-template-columns:auto 1fr; gap:2px 10px; align-items:start; margin:12px 0; padding:12px 14px; border:1.5px solid var(--tr-line); border-radius:var(--tr-radius); background:var(--tr-ice); }
.tr-check-input { width:22px; height:22px; margin-top:2px; accent-color:var(--tr-teal); }
.tr-check label { font-weight:650; line-height:1.45; }
.tr-check .tr-help { grid-column:2; }
.tr-methods, .tr-baseline, .tr-q { margin:0 0 16px; padding:0; border:0; min-width:0; }
.tr-baseline { padding:14px; border:1.5px solid var(--tr-line); border-radius:var(--tr-radius); }
.tr-radio { position:relative; margin:0 0 8px; }
.tr-radio-input { position:absolute; opacity:0; width:44px; height:44px; margin:0; cursor:pointer; }
.tr-radio label { display:grid; gap:2px; padding:12px 14px 12px 48px; border:1.5px solid #b7cbd5; border-radius:var(--tr-radius); background:#fff; cursor:pointer; position:relative; }
.tr-radio label::before { content:""; position:absolute; left:15px; top:50%; width:18px; height:18px; margin-top:-9px; border:2px solid #8fb0be; border-radius:50%; background:#fff; }
.tr-radio-input:checked + label { border-color:var(--tr-teal); background:var(--tr-mint); }
.tr-radio-input:checked + label::before { border-color:var(--tr-teal); background:radial-gradient(circle,var(--tr-teal) 0 45%,#fff 50%); }
.tr-radio label strong { color:var(--tr-navy); }
.tr-radio label span { color:var(--tr-muted); font-size:13.5px; }
.tr-radio-inline { display:inline-block; margin-right:8px; }
.tr-radio-inline label { display:inline-block; padding:10px 14px 10px 44px; }

/* buttons: teal / outlined / quiet, never black */
.tr-button { display:inline-flex; align-items:center; justify-content:center; min-height:48px; padding:11px 20px; border:1.5px solid transparent; border-radius:var(--tr-radius); font:inherit; font-weight:750; font-size:15.5px; line-height:1.2; text-decoration:none; cursor:pointer; transition:background .15s ease, box-shadow .15s ease, transform .15s ease; }
.tr-button-primary { color:#fff; background:var(--tr-teal); box-shadow:0 8px 20px rgba(8,127,123,.2); }
.tr-button-primary:hover { background:var(--tr-teal-dark); color:#fff; }
.tr-button-secondary { color:var(--tr-navy); background:#fff; border-color:#8fb0be; }
.tr-button-secondary:hover { background:var(--tr-ice); color:var(--tr-navy); }
.tr-button-quiet { color:var(--tr-teal-dark); background:transparent; border-color:transparent; text-decoration:underline; text-underline-offset:3px; }
.tr-button-quiet:hover { background:var(--tr-ice); color:var(--tr-teal-dark); }
.tr-actions { display:flex; flex-wrap:wrap; gap:10px; align-items:center; margin:14px 0 0; }
.tr-link { color:var(--tr-teal-dark); font-weight:700; text-underline-offset:3px; }

/* rows and cards */
.tr-row { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:0 14px; margin:0 0 14px; padding:14px; border:1.5px solid var(--tr-line); border-radius:var(--tr-radius); background:#fbfdfe; }
.tr-row-title { grid-column:1 / -1; margin:0 0 8px; color:var(--tr-navy); font-weight:800; }
.tr-row > .tr-field-wide, .tr-row > .tr-check { grid-column:1 / -1; }
.tr-row > .tr-note, .tr-row > .tr-button { grid-column:1 / -1; justify-self:start; }
.tr-row > .tr-check { margin:0 0 12px; }
.tr-cards { display:grid; gap:14px; }
.tr-card { border:1.5px solid var(--tr-line); border-radius:16px; background:#fff; }
.tr-card[open] { border-color:#9fc8c6; }
.tr-card > summary { display:flex; flex-wrap:wrap; align-items:center; gap:8px 14px; padding:14px 18px; cursor:pointer; list-style:none; }
.tr-card > summary::-webkit-details-marker { display:none; }
.tr-card > summary::before { content:"›"; display:inline-block; width:16px; color:var(--tr-teal); font-size:22px; font-weight:800; transition:transform .15s; }
.tr-card[open] > summary::before { transform:rotate(90deg); }
.tr-card-title { flex:1 1 0; min-width:0; color:var(--tr-navy); font-weight:800; font-size:17px; }
.tr-card-badge, .tr-card-counts { flex:none; }
@media (max-width:575.98px) { .tr-card-title { flex:1 1 calc(100% - 40px); } .tr-card-badge, .tr-card-counts { margin-left:30px; } }
.tr-card-counts { color:var(--tr-muted); font-size:13.5px; margin-left:auto; }
.tr-card-body { padding:4px 18px 18px; }
.tr-card-errors:empty { display:none; }
.tr-error { margin:6px 0; padding:9px 12px; border-radius:10px; background:var(--tr-bad-bg); color:var(--tr-bad); font-weight:650; font-size:14.5px; }
.tr-disclosure { margin:14px 0 0; padding:0; border:1.5px solid var(--tr-line); border-radius:var(--tr-radius); background:#fff; }
.tr-disclosure > summary { padding:12px 16px; cursor:pointer; color:var(--tr-navy); font-weight:700; }
.tr-disclosure[open] > summary { border-bottom:1px solid var(--tr-line); }
.tr-disclosure > *:not(summary) { margin-left:16px; margin-right:16px; }
.tr-disclosure > p:first-of-type:not(summary) { margin-top:12px; }
.tr-disclosure > *:last-child { margin-bottom:16px; }
.tr-absences { margin:14px 0; padding:14px; border:1.5px solid #e2c27d; border-radius:var(--tr-radius); background:var(--tr-warn-bg); }
.tr-absences h4 { margin:0 0 6px; color:var(--tr-warn); font-size:16px; }
.tr-add-year { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:10px; align-items:end; margin-bottom:12px; }
.tr-add-year .tr-field { margin:0; }
.tr-qs { display:grid; gap:8px; }

/* chips and status */
.tr-chip, .tr-card-badge.tr-chip { display:inline-block; padding:3px 10px; border-radius:999px; font-size:12.5px; font-weight:750; border:1px solid transparent; }
.tr-chip-RESIDENT { background:var(--tr-mint); color:#075e5b; border-color:#9fd6d1; }
.tr-chip-NOT_RESIDENT { background:#e9eef2; color:#37495a; border-color:#c3d0da; }
.tr-chip-UNDETERMINED { background:#eef2ff; color:#33407a; border-color:#c5cdf0; }
.tr-chip-REVIEW { background:var(--tr-warn-bg); color:var(--tr-warn); border-color:#e2c27d; }
.tr-status { padding:20px; border:1.5px solid var(--tr-line); border-radius:16px; background:var(--tr-ice); }
.tr-status-RESIDENT { background:var(--tr-mint); border-color:#9fd6d1; }
.tr-status-REVIEW { background:var(--tr-warn-bg); border-color:#e2c27d; }
.tr-status-head { display:flex; align-items:center; gap:14px; }
.tr-status-icon { display:inline-grid; place-items:center; width:46px; height:46px; border-radius:50%; background:#fff; color:var(--tr-teal-dark); font-size:24px; font-weight:800; border:2px solid currentColor; flex:none; }
.tr-status-REVIEW .tr-status-icon { color:var(--tr-warn); }
.tr-status-NOT_RESIDENT .tr-status-icon { color:#37495a; }
.tr-status-label { margin:0; color:var(--tr-navy); font-size:clamp(22px,3vw,30px); font-weight:850; line-height:1.15; }
.tr-status-route { margin:3px 0 0; color:var(--tr-muted); font-weight:650; }
.tr-why { margin:14px 0 0; line-height:1.6; }
.tr-review-list { margin:12px 0 0; padding-left:20px; line-height:1.55; color:var(--tr-warn); font-weight:600; }
.tr-counts { display:grid; grid-template-columns:repeat(auto-fit,minmax(130px,1fr)); gap:10px; margin:14px 0 6px; }
.tr-counts > div { padding:10px 12px; border-radius:12px; background:#fff; border:1px solid var(--tr-line); }
.tr-counts dt { color:var(--tr-muted); font-size:12.5px; font-weight:650; }
.tr-counts dd { margin:2px 0 0; color:var(--tr-navy); font-size:18px; font-weight:800; }
.tr-meter-wrap { margin-top:12px; }
.tr-meter-title { margin:0 0 6px; color:var(--tr-navy); font-size:14px; font-weight:700; }
.tr-meter { position:relative; height:12px; border-radius:999px; background:#fff; border:1px solid #b7cbd5; overflow:visible; }
.tr-meter-bar { position:absolute; inset:0 auto 0 0; border-radius:999px; background:repeating-linear-gradient(45deg,var(--tr-teal) 0 8px,#0a9a95 8px 16px); }
.tr-meter-mark { position:absolute; top:-4px; width:2px; height:18px; background:var(--tr-navy); }
.tr-meter-182 { right:0; }
/* Each threshold is named under its own mark. */
.tr-meter-note { margin:6px 0 0; color:var(--tr-muted); font-size:13px; line-height:1.5; }
.tr-meter-labels { position:relative; height:20px; margin-top:8px; color:var(--tr-navy); font-size:12.5px; font-weight:650; }
.tr-meter-labels span { position:absolute; top:0; white-space:nowrap; }
.tr-meter-l90 { transform:translateX(-50%); }
.tr-meter-l182 { right:0; text-align:right; }
@media (max-width:575.98px) { .tr-meter-labels { height:40px; } .tr-meter-labels .tr-meter-l182 { top:20px; } }
.tr-needs, .tr-scenario, .tr-links { margin-top:18px; }
.tr-need-list { margin:8px 0 0; padding:0; list-style:none; display:grid; gap:10px; }
.tr-need-list li { display:flex; flex-wrap:wrap; gap:8px 14px; align-items:center; justify-content:space-between; padding:10px 14px; border:1.5px solid var(--tr-line); border-radius:var(--tr-radius); background:#fff; }
.tr-scenario { padding:16px; border:2px dashed #8fb0be; border-radius:16px; }
.tr-scenario .tr-status { opacity:.96; }
.tr-tax-note { padding:12px 14px; border-radius:var(--tr-radius); background:var(--tr-ice); color:var(--tr-navy); line-height:1.6; font-size:14.5px; }
.tr-waiting { margin:0; color:var(--tr-muted); }
.tr-table-scroll { overflow-x:auto; border:1px solid var(--tr-line); border-radius:var(--tr-radius); }
.tr-table { width:100%; border-collapse:collapse; font-size:14.5px; }
.tr-table th, .tr-table td { padding:10px 12px; text-align:left; border-bottom:1px solid var(--tr-line); }
.tr-table thead th { background:var(--tr-ice); color:var(--tr-navy); font-size:13px; }
.tr-table tbody tr:last-child th, .tr-table tbody tr:last-child td { border-bottom:0; }

@media (max-width:575.98px) {
  /* One card per year: label on the left, value on the right, no sideways scrolling. */
  .tr-table-scroll { overflow:visible; border:0; }
  .tr-table, .tr-table tbody { display:block; }
  .tr-table thead { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); }
  .tr-table tbody tr { display:grid; grid-template-columns:minmax(0,1fr); margin:0 0 10px; border:1.5px solid var(--tr-line); border-radius:var(--tr-radius); background:#fff; overflow:hidden; }
  .tr-table tbody th, .tr-table tbody td { display:flex; justify-content:space-between; align-items:center; gap:14px; padding:9px 14px; border-bottom:1px solid var(--tr-line); text-align:right; }
  .tr-table tbody th { background:var(--tr-ice); color:var(--tr-navy); font-size:16px; }
  .tr-table tbody tr > :last-child { border-bottom:0; }
  .tr-table tbody th::before, .tr-table tbody td::before { content:attr(data-label); flex:none; color:var(--tr-muted); font-size:13px; font-weight:650; text-align:left; }
  .tr-table tbody th::before { color:var(--tr-navy); }
}

/* calendar */
.tr-cal-body { padding-bottom:6px; }
.tr-cal-head { display:flex; align-items:center; justify-content:space-between; gap:10px; margin:6px 0 8px; }
.tr-cal-nav { min-width:44px; min-height:44px; border:1.5px solid #8fb0be; border-radius:var(--tr-radius); background:#fff; color:var(--tr-navy); font-size:22px; line-height:1; cursor:pointer; }
.tr-cal-nav:disabled { opacity:.4; cursor:default; }
.tr-cal-grid { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:4px; max-width:420px; }
.tr-cal-wd { text-align:center; color:var(--tr-muted); font-size:12px; font-weight:700; padding:2px 0; }
.tr-day { width:100%; min-height:44px; padding:0; border:1.5px solid var(--tr-line); border-radius:10px; background:#fff; color:var(--tr-text); font:inherit; font-size:14px; cursor:pointer; position:relative; }
.tr-day-in { background:var(--tr-teal); color:#fff; border-color:var(--tr-teal); font-weight:700; }
.tr-day-out { background:repeating-linear-gradient(135deg,#dbe6ee 0 5px,#fff 5px 10px); color:var(--tr-navy); border-color:#8fb0be; }
.tr-day-unknown { background:#fff; color:var(--tr-muted); border-style:dashed; }
.tr-day-future { background:#f3f6f8; color:#7a8b96; border-color:#e3ebf0; cursor:default; }
.tr-day[aria-disabled="true"] { cursor:default; }
.tr-day-plan-in, .tr-day-plan-out { background:#fff; color:var(--tr-navy); border:2px dashed var(--tr-teal); }
.tr-day-pick { outline:3px solid #155eef; outline-offset:1px; }
.tr-legend { display:flex; flex-wrap:wrap; gap:6px 16px; margin:10px 0 0; padding:0; list-style:none; font-size:13px; color:var(--tr-muted); }
.tr-legend li { display:flex; align-items:center; gap:6px; }
.tr-swatch { display:inline-block; width:18px; height:18px; border-radius:5px; border:1.5px solid var(--tr-line); }
.tr-sr, .sr-only { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }

/* The theme gives every button min-width:48px !important on phones (lawyerr-responsive.css), which pushes day cells out of their 7-column grid.
   Cells stay 44px tall and at least 32px wide (WCAG 2.5.8 asks for 24px). */
.tr-page .tr-day { min-width:0 !important; min-height:44px !important; }

/* Compact contact control. Up to 1279px the site's floating Ask Fong AI, WhatsApp and quick-contact buttons are replaced on this page by one
   24px tab in a right-hand gutter that no content enters (so it cannot cover an input, a calendar day or a result) and a small panel of the
   same ways to get in touch (built by the script from the site's own links). The theme gives every button min-size 48px !important on phones. */
.tr-contact-tab, .tr-contact-panel { display:none; }
@media (max-width:1279.98px) {
  body:has(.tr-page) :is(button.kff-ai-fab, .desktop-whatsapp-float, .mobile-bottom-bar) { display:none !important; }
  .tr-page .container { padding-left:18px; padding-right:24px; }
  body button.tr-contact-tab { display:flex !important; position:fixed; right:0; bottom:120px; z-index:99998; width:24px; height:72px; min-width:0 !important; min-height:0 !important; padding:0; align-items:center; justify-content:center; border:0; border-radius:12px 0 0 12px; background:#087f7b; color:#fff; box-shadow:-2px 4px 14px rgba(11,53,81,.25); cursor:pointer; }
  body button.tr-contact-tab:hover { background:#066663; }
  body button.tr-contact-tab:focus-visible, .tr-contact-item:focus-visible { outline:3px solid #155eef; outline-offset:2px; }
  .tr-contact-panel:not([hidden]) { display:grid; position:fixed; right:34px; bottom:104px; z-index:99998; gap:8px; width:min(240px, calc(100vw - 60px)); padding:10px; border:1.5px solid #d8e5eb; border-radius:16px; background:#fff; box-shadow:0 14px 36px rgba(11,53,81,.3); }
  body .tr-contact-item { display:flex !important; align-items:center; min-height:48px; padding:0 14px; border:1.5px solid #8fb0be; border-radius:13px; background:#fff; color:#0b3551; font:inherit; font-size:15.5px; font-weight:700; text-align:left; text-decoration:none; cursor:pointer; }
  body .tr-contact-item:hover { background:#eef7fb; color:#0b3551; text-decoration:none; }
}
@media print { .tr-contact-tab, .tr-contact-panel { display:none !important; } }

/* static sections */
.tr-bounds { padding:10px 0 60px; }
.tr-bounds h2 { margin:0 0 16px; color:var(--tr-navy); font-size:clamp(22px,2.6vw,28px); font-weight:800; }
.tr-bound-grid, .tr-info-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px; margin-bottom:14px; }
.tr-info-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
.tr-bound, .tr-info { padding:16px 18px; border:1px solid var(--tr-line); border-radius:16px; background:#fff; }
.tr-bound h3, .tr-info h3 { margin:0 0 8px; color:var(--tr-navy); font-size:17px; font-weight:800; }
.tr-bound p, .tr-info p { margin:0 0 8px; color:var(--tr-muted); font-size:14.5px; line-height:1.6; }
.tr-privacy, .tr-disclaimer { max-width:860px; margin:12px 0 0; color:var(--tr-muted); font-size:14px; line-height:1.6; }
.tr-ptr-line { margin:12px 0 0; }

/* responsive */
@media (max-width:991.98px) { .tr-bound-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:767.98px) {
  .tr-counts { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .tr-info-grid { grid-template-columns:1fr; }
}
@media (max-width:575.98px) {
  .tr-hero { padding:12px 0 12px; }
  .tr-eyebrow { display:none; }
  .tr-hero h1 { margin-bottom:6px; }
  .tr-lead { margin-bottom:8px; font-size:14.5px; line-height:1.45; }
  .tr-trust { font-size:12.5px; gap:2px 12px; }
  .tr-shell { padding-top:10px; }
  .tr-step { padding:14px; }
  .tr-grid2, .tr-row { grid-template-columns:1fr; }
  .tr-bound-grid { grid-template-columns:1fr; }
  .tr-add-year { grid-template-columns:1fr; }
  .tr-card-counts { margin-left:0; }
  .tr-cal-grid { max-width:none; gap:2px; }
  /* Give the 7-column month grid the width it needs for day cells of about 40px: pull the calendar out to the card edges. */
  .tr-card-body { padding-left:12px; padding-right:12px; }
  .tr-card-body > .tr-calendar { margin-left:-8px; margin-right:-8px; }
  .tr-card-body > .tr-calendar > *:not(summary) { margin-left:6px; margin-right:6px; }
  .tr-button { width:100%; }
  .tr-actions .tr-button { width:100%; }
  .tr-step, .tr-shell, .tr-bounds { scroll-margin-bottom:150px; }
  /* The site's floating AI, WhatsApp and quick-contact buttons cover the bottom ~150px of a phone screen: a control scrolled or focused into view stops above them. */
  .tr-page .tr-input, .tr-page .tr-button, .tr-page .tr-check, .tr-page .tr-radio, .tr-page .tr-card > summary, .tr-page .tr-disclosure > summary, .tr-page .tr-day, .tr-page .tr-cal-nav { scroll-margin-bottom:150px; }
  .tr-bounds { padding-bottom:170px; }
  .tr-shell { padding-bottom:40px; }
}
@media (prefers-reduced-motion:reduce) { .tr-button, .tr-card > summary::before { transition:none; } }
@media print {
  .tr-no-print, .tr-actions, .tr-cal-nav, .tr-button, .tr-calendar, .tr-card-body > .tr-method-body, .tr-methods, .tr-plans, .tr-add-year, .tr-others { display:none !important; }
  .tr-page { background:#fff; }
  .tr-step, .tr-card { box-shadow:none; border-color:#999; break-inside:avoid; }
  .tr-card:not([open]) { display:block; }
}

/* sticky site header clearance for anchored scrolls */
.tr-step, .tr-card, .tr-result, .tr-need-list li { scroll-margin-top:120px; }

/* ---- Checker refresh (approved EN/ZH proposal): hero action, principal misconceptions, guided questions, content sections ---- */
.tr-step { border-radius:var(--tr-radius-main); }
.tr-radio label { border-radius:var(--tr-radius-card); }
.tr-button-lg { min-height:52px; padding:13px 28px; font-size:17px; }
.tr-button-light { color:var(--tr-navy); background:#fff; box-shadow:none; }
.tr-button-light:hover { background:var(--tr-ice); color:var(--tr-navy); }
.tr-button-outline-light { color:#fff; background:transparent; border-color:#fff; }
.tr-button-outline-light:hover { background:rgba(255,255,255,.14); color:#fff; }
.tr-hero-actions { margin:14px 0 12px; }
.tr-aka { margin:10px 0 0; color:var(--tr-muted); font-size:13.5px; }
.tr-principal { padding:22px 0 4px; }
.tr-section-title { margin:0 0 6px; color:var(--tr-navy); font-size:clamp(22px,2.6vw,30px); line-height:1.25; font-weight:800; letter-spacing:-.015em; text-wrap:balance; }
.tr-section-title-sm { font-size:clamp(18px,2vw,22px); margin-bottom:12px; }
.tr-page[lang="zh-Hans"] .tr-section-title { letter-spacing:0; word-break:keep-all; line-break:strict; }
.tr-section-lead { margin:0 0 16px; max-width:760px; color:var(--tr-muted); }
.tr-card-grid { display:grid; gap:14px; }
.tr-card-grid-2 { grid-template-columns:repeat(2,minmax(0,1fr)); }
.tr-card-grid-3 { grid-template-columns:repeat(3,minmax(0,1fr)); }
.tr-fact-card, .tr-why-card { display:grid; gap:10px; align-content:start; padding:16px; border:1.5px solid var(--tr-line); border-radius:16px; background:#fff; box-shadow:0 8px 24px rgba(11,53,81,.05); }
.tr-fact-card small { display:block; margin-bottom:2px; color:var(--tr-muted); font-size:11.5px; font-weight:800; letter-spacing:.08em; text-transform:uppercase; }
.tr-fact-belief, .tr-fact-answer, .tr-why-card p { margin:0; }
.tr-fact-belief { color:var(--tr-navy); font-weight:700; }
.tr-fact-answer { padding:10px 12px; border-radius:12px; background:var(--tr-mint); font-size:15px; }
.tr-fact-answer small { color:var(--tr-teal-dark); }
.tr-why-card h3 { margin:0; color:var(--tr-navy); font-size:18px; }
.tr-why-note { color:var(--tr-muted); font-size:13.5px; }
.tr-myths, .tr-why, .tr-law { padding:26px 0 2px; }
.tr-acc { margin:0 0 10px; overflow:hidden; border:1.5px solid var(--tr-line); border-radius:var(--tr-radius-card); background:#fff; }
.tr-acc > summary { position:relative; display:flex; align-items:center; min-height:50px; padding:12px 48px 12px 16px; color:var(--tr-navy); font-weight:700; cursor:pointer; list-style:none; }
.tr-acc > summary::-webkit-details-marker { display:none; }
.tr-acc > summary::after { content:""; position:absolute; right:18px; top:50%; width:9px; height:9px; border-right:2.5px solid var(--tr-teal); border-bottom:2.5px solid var(--tr-teal); transform:translateY(-70%) rotate(45deg); transition:transform .2s; }
.tr-acc[open] > summary { background:var(--tr-ice); }
.tr-acc[open] > summary::after { transform:translateY(-30%) rotate(-135deg); }
.tr-acc > summary:focus-visible { outline:3px solid var(--tr-teal); outline-offset:-3px; }
.tr-acc-body { padding:6px 16px 14px; font-size:15.5px; }
.tr-acc-body ul { padding-left:20px; }
.tr-acc-body table { width:100%; margin:8px 0; border-collapse:collapse; font-size:14.5px; }
.tr-acc-body th { padding:8px 10px; background:var(--tr-navy); color:#fff; text-align:left; }
.tr-acc-body td { padding:8px 10px; border-top:1px solid var(--tr-line); vertical-align:top; }
.tr-acc-body a { color:var(--tr-teal-dark); }
.tr-bound-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
.tr-bounds { padding:20px 0 14px; }
.tr-ctaband { padding:14px 0 40px; }
.tr-ctaband-box { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:16px 24px; padding:clamp(18px,3vw,30px); border-radius:var(--tr-radius-main); background-color:var(--tr-navy); background-image:linear-gradient(135deg,var(--tr-navy),#0e4a6c); color:#fff; }
.tr-ctaband-box h2 { margin:0 0 4px; color:#fff; font-size:clamp(20px,2.4vw,26px); font-weight:800; }
.tr-ctaband-box p { margin:0; color:#dcebf3; }
.tr-ctaband-box .tr-actions { display:flex; flex-wrap:wrap; gap:10px; margin:0; }
/* guided questions */
.tr-guided-q { margin:0 0 18px; padding:0; border:0; min-width:0; }
.tr-guided-q > legend { padding:0; color:var(--tr-navy); font-size:17px; font-weight:800; }
.tr-choice-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin-top:10px; }
.tr-choice-grid .tr-choice:last-child { grid-column:1 / -1; }
.tr-choice-row { display:flex; flex-wrap:wrap; gap:10px; margin-top:8px; }
.tr-choice-row .tr-choice { flex:1 1 130px; }
.tr-choice { position:relative; display:flex; align-items:flex-start; gap:10px; min-height:52px; padding:12px 14px; border:1.5px solid #b7cbd5; border-radius:var(--tr-radius-card); background:#fff; cursor:pointer; transition:border-color .15s, background .15s, box-shadow .15s; }
.tr-choice-input { position:absolute; inset:0; width:100%; height:100%; margin:0; opacity:0; cursor:pointer; }
.tr-choice-text strong { display:block; color:var(--tr-navy); }
.tr-choice-text small { display:block; color:var(--tr-muted); font-size:13.5px; }
.tr-choice:hover { border-color:#8fb0be; }
.tr-choice:has(.tr-choice-input:checked) { border-color:var(--tr-teal); background:var(--tr-mint); box-shadow:0 0 0 3px rgba(8,127,123,.15); }
.tr-choice:has(.tr-choice-input:focus-visible) { outline:3px solid var(--tr-teal); outline-offset:2px; }
.tr-guided-actions { margin-top:14px; }
.tr-passport-links { display:flex; flex-wrap:wrap; gap:6px 18px; }
@media (max-width:820px) { .tr-card-grid-3 { grid-template-columns:1fr; } }
@media (max-width:575.98px) {
  .tr-card-grid-2, .tr-bound-grid { grid-template-columns:1fr; }
  .tr-fact-card, .tr-why-card { padding:14px; gap:8px; }
  .tr-principal { padding-top:16px; }
  .tr-myths, .tr-why, .tr-law { padding-top:20px; }
  .tr-choice { min-height:48px; padding:10px 12px; }
  .tr-choice-grid .tr-choice-text small { display:none; }
  .tr-button-lg { width:100%; }
  .tr-ctaband-box .tr-actions { width:100%; }
  .tr-ctaband-box .tr-button-lg { width:100%; }
}
@media (prefers-reduced-motion:reduce) { .tr-choice, .tr-acc > summary::after { transition:none; } }
