/* Disability employment tool and guide: the site's tokens, plus a timeline, comparison table and checklists. */
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 4px 0; margin: 0 0 18px; padding: 0; list-style: none; font-size: var(--fs-small); color: var(--ink-2); }
.breadcrumbs li + li::before { content: '/'; margin: 0 10px; color: var(--line-strong); }
.breadcrumbs a { display: inline-flex; align-items: center; min-height: 32px; color: var(--ink-2); text-decoration: none; }
.breadcrumbs a:hover { color: var(--accent); text-decoration: underline; }
.breadcrumbs [aria-current] { color: var(--ink); font-weight: 500; }
.answer { max-width: 68ch; }
.not-official { margin-top: 16px; display: inline-block; padding: 8px 14px; border-radius: var(--r-field); background: var(--tint); color: var(--ink-2); font-size: var(--fs-small); }
.cite-line { margin-top: 10px; font-size: var(--fs-micro); line-height: 1.6; color: var(--ink-2); }
.cite-line span { font-weight: 600; margin-right: 4px; }
.cite-line a, .cite { color: var(--accent); }
.plain-bullets { display: grid; gap: 10px; margin: 12px 0 0; padding-left: 1.2em; max-width: 68ch; }
.plain-bullets li::marker { color: var(--accent); }
.note-box { margin-top: 18px; padding: 16px 18px; border-radius: var(--r-card); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-strong); max-width: 68ch; }
.article-section h3 { margin-top: 22px; font-size: 1.1rem; font-weight: 600; }
.article-section h4 { margin-top: 16px; font-size: var(--fs-small); font-weight: 700; }

/* Calculator extras (form and result reuse tax.css) */
.year-facts { margin: 4px 0 12px; font-size: var(--fs-small); color: var(--ink-2); }
.facts-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 18px; padding: 12px 14px; border-radius: var(--r-field); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.facts-grid b { display: block; font-size: var(--fs-micro); font-weight: 600; color: var(--ink-2); }
.flag-inline { display: block; margin-top: 10px; padding: 10px 12px; border-radius: var(--r-field); background: #FBF3E4; color: #6B4A12; font-size: var(--fs-small); }
.branch-row, .period-row { display: grid; gap: 8px 14px; align-items: end; padding: 12px 0; border-bottom: 1px solid var(--line); }
.branch-row { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto; }
.period-row { grid-template-columns: 90px minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr) auto; }
.branch-row .field, .period-row .field { display: grid; grid-template-columns: 1fr; padding: 0; border: 0; }
.branch-row input, .period-row input, .period-row select { width: 100%; min-height: 44px; padding: 8px 12px; font: 500 1rem/1.3 var(--text); color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r-field); }
.period-row select { padding-right: 30px; appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%); background-position: right 17px top 52%, right 12px top 52%; background-size: 5px 5px; background-repeat: no-repeat; }
.branch-row input:focus, .period-row input:focus, .period-row select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-tint); }
.period-row .error { grid-column: 1 / -1; }
.period-row[data-invalid] input { border-color: #A3271A; }
.period-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 14px; }
.dep-form .seg { margin: 8px 0 6px; }
.dep-form input[type='date'] { width: 100%; min-height: 48px; padding: 8px 12px; font: 500 1rem/1.3 var(--text); color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r-field); }
.next-steps { display: grid; gap: 8px; margin: 6px 0 0; padding-left: 1.3em; font-size: var(--fs-small); }
.result-actions { margin-top: 20px; display: grid; gap: 6px; justify-items: start; }
.print-only { display: none; }
.dep-explain { margin-top: clamp(40px, 6vw, 72px); }

/* Guide */
.toc { margin-top: 26px; padding: 16px 20px; border-radius: var(--r-card); background: var(--surface); box-shadow: var(--sh-1); }
.toc ol { columns: 2; column-gap: 28px; margin: 0; padding-left: 1.2em; font-size: var(--fs-small); }
.toc li { break-inside: avoid; padding: 3px 0; }
.toc a { color: var(--ink); text-decoration-color: var(--line-strong); }
.toc a:hover { color: var(--accent); }
.terms { display: grid; gap: 12px; }
.terms > div { padding: 16px 18px; border-radius: var(--r-card); background: var(--surface); box-shadow: var(--sh-1); }
.terms dt { font-weight: 700; }
.terms dd { margin: 6px 0 0; color: var(--ink-2); }
.timeline { position: relative; display: grid; gap: 0; margin: 18px 0 0; padding: 0; list-style: none; }
.timeline::before { content: ''; position: absolute; left: 11px; top: 8px; bottom: 8px; width: 2px; background: var(--accent-tint); }
.timeline li { position: relative; display: grid; grid-template-columns: minmax(0, 150px) minmax(0, 1fr); gap: 4px 18px; padding: 12px 0 12px 36px; }
.timeline li::before { content: ''; position: absolute; left: 4px; top: 17px; width: 16px; height: 16px; border-radius: 50%; background: var(--surface); box-shadow: inset 0 0 0 4px var(--accent); }
.tl-date { font-weight: 700; font-variant-numeric: tabular-nums; }
.timeline .cite-line { grid-column: 2; margin-top: 2px; }
.compare-table { min-width: 760px; }
.compare-table th[scope='row'] { font-weight: 600; background: var(--surface-2); width: 150px; vertical-align: top; }
.compare-table td { vertical-align: top; text-align: left !important; }
.compare-table thead th { color: var(--ink); }
.visually-hidden-cell { color: transparent !important; }
.routes { display: grid; gap: 18px; margin-top: 18px; }
.route { padding: clamp(18px, 2.4vw, 26px); }
.route h3 { margin: 0 0 10px; font-family: var(--display); font-size: 1.35rem; font-weight: 650; letter-spacing: -.01em; }
:lang(th) .route h3 { letter-spacing: 0; font-weight: 600; }
.route-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 20px; margin: 10px 0 0; }
.route-facts dt { font-size: var(--fs-micro); color: var(--ink-2); font-weight: 600; }
.route-facts dd { margin: 2px 0 0; font-size: var(--fs-small); }
.check-list { display: grid; gap: 6px; margin: 8px 0 0; padding: 0; list-style: none; font-size: var(--fs-small); }
.check-list li { position: relative; padding-left: 28px; }
.check-list li::before { content: ''; position: absolute; left: 0; top: 3px; width: 16px; height: 16px; border-radius: 4px; box-shadow: inset 0 0 0 1.5px var(--accent); }
.qa { padding: 14px 0; border-bottom: 1px solid var(--line); }
.qa h3 { margin: 0; font-size: 1.05rem; }
.qa p { margin-top: 6px; color: var(--ink-2); max-width: 68ch; }
.tool-group { margin-top: clamp(28px, 4vw, 48px); }
.tool-group:first-of-type { margin-top: 0; }
.tool-group-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 18px; margin-bottom: 16px; }
.tool-group-head p { color: var(--ink-2); }

@media (max-width: 760px) {
  .period-row { grid-template-columns: 1fr 1fr; }
  .period-row .field:nth-child(2) { grid-column: 1 / -1; order: -1; }
  .branch-row { grid-template-columns: 1fr 1fr; }
  .branch-row .text-button { grid-column: 1 / -1; justify-self: start; }
  .facts-grid, .route-facts { grid-template-columns: 1fr; }
  .toc ol { columns: 1; }
  .timeline li { grid-template-columns: 1fr; }
  .timeline .cite-line { grid-column: 1; }
}

@media print {
  .site-header, .site-footer, .page-head, .dep-form, .dep-explain, .result-actions, .tax-peek, .skip-link { display: none !important; }
  .tax-layout { display: block; }
  .tax-result { position: static; box-shadow: none; padding: 0; }
  .print-only { display: block; margin-top: 18px; font-size: 11pt; }
  .print-only ul { font-size: 9pt; word-break: break-all; }
  body { background: #fff; }
}

/* Long call-to-action labels wrap instead of widening the page; selects show their full text. */
.article-cta .button { white-space: normal; text-align: left; height: auto; min-height: 48px; padding-block: 10px; max-width: 100%; }
.dep-form .step > .field:has(select) { grid-template-columns: 1fr; }
.dep-form .step > .field:has(select) select { width: 100%; }

/* Year facts with their source, examples, overlap warning and the per-place timeline. */
.fact-note { display: block; margin-top: 2px; font-size: var(--fs-micro); line-height: 1.5; color: var(--ink-2); font-weight: 400; }
.fact-note .cite { overflow-wrap: anywhere; }
.examples { margin: 4px 0 12px; }
.examples summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; font-weight: 600; color: var(--accent); }
.examples dl { display: grid; gap: 8px; margin: 4px 0 0; font-size: var(--fs-small); }
.examples dt { font-weight: 600; }
.examples dd { margin: 2px 0 0; color: var(--ink-2); }
.period-row[data-overlaps] { background: #FBF3E4; }
:root { --tl-excused: #E9C67A; --tl-payable: #C2553F; }
.tl-row { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 4px 12px; align-items: center; margin-top: 10px; }
.tl-row small { grid-column: 2; color: var(--ink-2); font-size: var(--fs-micro); }
.tl-name { font-size: var(--fs-small); font-weight: 600; }
.tl-bar { display: block; height: 14px; border-radius: 7px; background: var(--accent); }
.tl-axis { display: flex; justify-content: space-between; margin: 6px 0 0 108px; font-size: var(--fs-micro); color: var(--ink-2); }
.tl-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 8px; font-size: var(--fs-micro); color: var(--ink-2); }
.tl-key { display: inline-block; width: 14px; height: 10px; border-radius: 3px; }
.tl-key--ok { background: var(--accent); } .tl-key--ex { background: var(--tl-excused); } .tl-key--pay { background: var(--tl-payable); }
@media (max-width: 760px) { .tl-row { grid-template-columns: 1fr; } .tl-row small { grid-column: 1; } .tl-axis { margin-left: 0; } }
.flag-inline[hidden] { display: none; }

/* Monthly SSO table, reconciliation and month-by-month tracking. */
.sso-details { margin-top: 8px; }
.sso-details summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; font-weight: 600; color: var(--accent); }
.sso-table { min-width: 900px; }
.sso-table th, .sso-table td { padding: 6px 8px; vertical-align: middle; }
.sso-table thead th { text-align: left; line-height: 1.3; }
.sso-table .cell { width: 100%; min-width: 84px; min-height: 40px; padding: 6px 8px; font: 500 0.95rem/1.2 var(--text); color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r-field); }
.sso-table input[type='date'].cell { min-width: 150px; }
.sso-table .cell[aria-invalid] { border-color: #A3271A; }
.sso-table td.num { text-align: right; white-space: nowrap; }
.cell-flag { display: block; color: #8A5A12; font-size: var(--fs-micro); white-space: normal; }
.unknown { color: #8A5A12; }
.sso-h { margin: 20px 0 4px; font-size: 1.05rem; }
.adj-row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 0.8fr) minmax(0, 0.8fr) minmax(0, 1.6fr) auto; gap: 8px; align-items: center; margin-top: 8px; }
.adj-row select, .adj-row input { min-height: 44px; padding: 6px 10px; font: 500 0.95rem/1.2 var(--text); color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r-field); min-width: 0; width: 100%; }
.recon-line { margin-top: 12px; font-size: var(--fs-small); font-weight: 600; }
.track-table { min-width: 520px; font-size: var(--fs-small); }
.track-table th, .track-table td { padding: 6px 10px; }
.track-table tr.has-empty td:last-child { color: #A3271A; font-weight: 600; }
@media (max-width: 760px) { .adj-row { grid-template-columns: 1fr 1fr; } .adj-row input[data-adj$=':note'] { grid-column: 1 / -1; } }
/* Fieldsets default to min-content width; let wide tables scroll inside them instead of widening the form. */
.dep-form fieldset, .tax-form { min-width: 0; min-inline-size: 0; }

/* ---------- Shared components (2026-11-04 cleanup): timeline, calculation basis, status, citations, disclosures ---------- */
.status { display: inline-flex; align-items: center; min-height: 24px; padding: 0 10px; border-radius: 999px; font-size: var(--fs-micro); font-weight: 600; white-space: nowrap; vertical-align: middle; }
.status--ok { background: var(--accent-tint); color: var(--accent); }
.status--warn { background: #FBF3E4; color: #6B4A12; }
.refs { display: flex; flex-wrap: wrap; gap: 2px 12px; margin-top: 4px; }
.ref { font-size: var(--fs-micro); }
.ref > summary { display: inline-flex; align-items: center; min-height: 28px; color: var(--accent); cursor: pointer; list-style: none; text-decoration: underline; text-decoration-color: var(--accent-tint); text-underline-offset: 3px; }
.ref > summary::-webkit-details-marker { display: none; }
.ref > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.ref[open] { flex-basis: 100%; }
.ref-body { display: block; margin: 2px 0 6px; padding: 8px 10px; border-radius: var(--r-field); background: var(--surface-2); color: var(--ink-2); line-height: 1.55; overflow-wrap: anywhere; }
.ref-body a { color: var(--accent); }
.mini-disclose { margin-top: 10px; }
.mini-disclose > summary { display: inline-flex; align-items: center; min-height: 40px; color: var(--accent); font-weight: 600; font-size: var(--fs-small); cursor: pointer; }
.mini-disclose > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.mini-disclose[open] > summary { margin-bottom: 6px; }
.disclose-r { margin-top: 14px; border-top: 1px solid var(--line); }
.disclose-r > summary { display: flex; align-items: center; min-height: 48px; font-weight: 600; cursor: pointer; list-style: none; }
.disclose-r > summary::-webkit-details-marker { display: none; }
.disclose-r > summary::after { content: '+'; margin-left: auto; color: var(--accent); font-size: 1.25rem; }
.disclose-r[open] > summary::after { content: '−'; }
.disclose-r > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.ref-list { margin: 0; padding-left: 1.6em; display: grid; gap: 6px; font-size: var(--fs-small); overflow-wrap: anywhere; }
.ref-list a { color: var(--accent); }

/* Year box: timeline then calculation basis, separated by a divider, not by more cards. */
.cal { margin: 4px 0 8px; }
.cal-tl { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
.cal-group-label { margin: 0 0 6px; font-size: var(--fs-micro); font-weight: 700; color: var(--ink-2); }
.cal-year .cal-group-label { color: var(--accent); }
.cal-group > ol { position: relative; display: grid; gap: 10px; margin: 0; padding: 0 0 0 22px; list-style: none; }
.cal-group > ol::before { content: ''; position: absolute; left: 5px; top: 8px; bottom: 8px; width: 2px; background: var(--line-strong); }
.cal-year > ol::before { background: var(--accent-tint); }
.cal-group > ol > li { position: relative; display: grid; gap: 1px; }
.cal-group > ol > li::before { content: ''; position: absolute; left: -22px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); box-shadow: inset 0 0 0 3px var(--ink-2); }
.cal-year > ol > li::before { box-shadow: inset 0 0 0 3px var(--accent); }
.cal-date { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ink); }
.cal-label { font-size: var(--fs-small); font-weight: 600; }
.cal-line { font-size: var(--fs-small); color: var(--ink-2); }
.basis { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.basis-label { margin: 0; font-size: var(--fs-micro); font-weight: 700; color: var(--ink-2); }
.basis-figure { margin: 4px 0 0; font-variant-numeric: tabular-nums; line-height: 1.6; }
.basis-figure strong { font-size: 1.1rem; }
.basis-line { margin: 2px 0 0; font-size: var(--fs-small); color: var(--ink-2); }

/* Places: one answer per place; dated rows only for part of the year. */
.place { padding: 12px 0; border-bottom: 1px solid var(--line); }
.place .field { display: grid; grid-template-columns: 1fr; gap: 6px; padding: 0; border: 0; }
.place select { width: 100%; min-height: 48px; }
.place .field + .field { margin-top: 10px; }
.place-periods { margin-top: 10px; padding-left: 14px; border-left: 2px solid var(--accent-tint); }
.period-row--place { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr) auto; }
.examples-dl { display: grid; gap: 8px; margin: 0; font-size: var(--fs-small); }
.examples-dl dt { font-weight: 600; }
.examples-dl dd { margin: 2px 0 0; color: var(--ink-2); }

/* Monthly headcount: three columns that fit a phone. */
.month-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; table-layout: fixed; }
.month-table th, .month-table td { padding: 6px 6px 6px 0; text-align: left; vertical-align: middle; border-bottom: 1px solid var(--line); }
.month-table thead th { font-size: var(--fs-micro); font-weight: 600; color: var(--ink-2); line-height: 1.35; vertical-align: bottom; }
.month-table thead th:first-child { width: 34%; }
.month-table tbody th { font-weight: 600; font-size: var(--fs-small); }
.month-table tbody th span { display: block; }
.copy-prev { min-height: 28px; padding: 0; font-size: var(--fs-micro); font-weight: 500; }
.month-table .cell { width: 100%; min-height: 44px; padding: 6px 10px; text-align: right; font: 500 1rem/1.2 var(--text); color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r-field); }
.month-table .cell:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-tint); }
.month-table .cell[aria-invalid] { border-color: #A3271A; }
.fill-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 16px; }
.fill-grid .field { display: grid; grid-template-columns: 1fr; padding: 0; border: 0; }
.dep-form .month-chips { margin: 8px 0 10px; }

/* Result panel order: answer, qualifications, next steps, supporting views, then working and sources on request. */
.result-status { margin: 6px 0 0; }
.result-note { margin-top: 10px; font-size: var(--fs-small); color: var(--ink-2); }
.track-table { width: 100%; min-width: 0; border-collapse: collapse; font-size: var(--fs-small); font-variant-numeric: tabular-nums; }
.track-table th, .track-table td { padding: 6px 4px; text-align: right; border-bottom: 1px solid var(--line); }
.track-table th:first-child { text-align: left; }
.track-table thead th { font-size: var(--fs-micro); color: var(--ink-2); font-weight: 600; }
@media (max-width: 760px) {
  .period-row--place { grid-template-columns: 1fr 1fr; }
  .period-row--place .field:first-child { grid-column: 1 / -1; }
  .fill-grid { grid-template-columns: 1fr; }
  .month-table thead th:first-child { width: 30%; }
}
