/* tablo.css — CSV ↔ Excel (+ JSON) (js/local/tablo-page.js): the options in the side panel (output, reading and saving
   groups), the chosen file with the detected settings and the preview table (first 50 rows; the table scrolls inside
   its own frame, never the page), and the result summary. Builds on tool.css + local.css (W3 TABLO, 2026-09-29). */
.tb__grp { display: grid; gap: 12px; }
.tb__grp[hidden], .inst[data-local] [data-tb-in][hidden], .inst[data-local] [data-tb-out][hidden], .inst[data-local] [data-tb-types][hidden] { display: none; }
.tb__grp > .side__k { margin: 2px 0 -4px; }
.tb__out .seg__o { min-height: 64px; }
.tb__out .seg__n { font: 600 17px/1 var(--f-mono); letter-spacing: .02em; }
.tb__honest { padding-top: 12px; border-top: 1px solid var(--rule); }
.tb__honest b { font-weight: 600; color: var(--ink); }
.seg__o:has(input:disabled) { cursor: default; }
.inst[data-local] .lcheck small.lnote { display: block; margin-top: 2px; }
.inst[data-local] .lcheck { min-height: 44px; }

/* selection area: file row, detected settings, sheet, preview */
.tb-f { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 20px; align-items: center; padding: 18px 14px 18px 18px; border: 1px solid var(--ink); background: var(--paper); }
.tb-f__m { min-width: 0; }
.tb-f .chip__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tb-st { display: grid; gap: 4px; min-height: 1.4em; }
.tb-st__m { font-size: 15px; font-weight: 560; font-variant-numeric: tabular-nums; }
.tb-st__n { font-size: var(--t-meta); line-height: 1.45; padding-inline-start: 12px; border-inline-start: 3px solid var(--rule); }
.tb-st__n.is-ok { border-color: var(--ok); }
.tb-st__n.is-warn { border-color: var(--signal); }
.tb-st.is-bad .tb-st__m { color: var(--signal-ink); }
.tb-sheets:empty { display: none; }
.tb-sheet { max-width: 360px; }
.tb-pv { display: grid; gap: 8px; min-width: 0; }
.tb-pv:empty { display: none; }
.tb-pv__w { max-width: 100%; max-height: 420px; overflow: auto; border: 1px solid var(--ink); background: var(--paper); overscroll-behavior: contain; }
.tb-pv__w:focus-visible { outline: 2px solid var(--signal-strong); outline-offset: 2px; }
.tb-tb { border-collapse: separate; border-spacing: 0; font-size: 13.5px; line-height: 1.35; min-width: 100%; }
.tb-tb th, .tb-tb td { padding: 6px 10px; border-bottom: 1px solid var(--rule); border-inline-end: 1px solid var(--rule); white-space: nowrap; max-width: 260px; overflow: hidden; text-overflow: ellipsis; text-align: start; }
.tb-tb thead th { position: sticky; top: 0; z-index: 1; background: var(--paper-2); font-size: 12px; font-weight: 600; color: var(--ink-2); text-align: center; }
.tb-tb .tb-tb__n { position: sticky; inset-inline-start: 0; width: 1%; background: var(--paper-2); color: var(--ink-3); font-size: 12px; text-align: end; min-width: 2.6em; }
.tb-tb thead .tb-tb__n { z-index: 2; }
.tb-tb tbody tr { transition: background .2s; }
.tb-tb tbody tr:hover td:not(.tb-tb__n) { background: var(--paper-2); }
.tb-tb tr.is-head td:not(.tb-tb__n) { font-weight: 650; background: var(--paper-2); border-bottom-color: var(--ink); }
.tb-tb td.is-n { text-align: end; font-variant-numeric: tabular-nums; }
.tb-tb td.is-z { font-variant-numeric: tabular-nums; box-shadow: inset 2px 0 0 var(--ok); }

/* result */
.res--local .lbox:has(.tb-res), .tb-res { display: contents; }
.tb-sum { grid-column: 1 / -1; margin: 26px 0 0; display: grid; grid-template-columns: max-content minmax(0, 1fr); border-top: 1px solid var(--ink); font-size: 15px; }
.tb-sum dt, .tb-sum dd { margin: 0; padding: 8px 0; border-bottom: 1px solid var(--rule); }
.tb-sum dt { padding-inline-end: 18px; font: 500 12.5px/1.9 var(--f-mono); letter-spacing: .04em; text-transform: uppercase; color: var(--ink-2); }
.tb-sum dd { overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.tb-notes { grid-column: 1 / -1; display: grid; gap: 8px; margin-top: 18px; }
.tb-notes .is-warn { padding-inline-start: 10px; border-inline-start: 3px solid var(--signal); }
.tb-kept { display: grid; gap: 6px; }
.tb-kept__l li { display: flex; gap: 10px; padding: 3px 0; font-size: var(--t-meta); }
.tb-kept__l .mono { flex: none; min-width: 2.5em; color: var(--ink-3); }
.tb-also { grid-column: 1 / -1; display: grid; justify-items: start; gap: 6px; margin-top: 22px; padding-top: 14px; border-top: 1px solid var(--rule); }

@media (max-width: 719.98px) {
  .tb-f { gap: 14px; padding: 14px 10px 14px 14px; }
  .tb-pv__w { max-height: 340px; }
  .tb-tb th, .tb-tb td { max-width: 180px; }
  .tb-sum { grid-column: 1; margin-top: 16px; }
  .tb-notes, .tb-also { grid-column: 1; }
}
