[hidden] { display: none !important; }
/* omid-tools-kit / tool.css: the layout shared by every tool (v3).
 *
 * Loads after kit.css. Adds the tool page pattern:
 *   header, mode switch, [inputs | verdict] two-column work area,
 *   checks strip, one supporting chart, actions, settings, details, footer.
 */

.tool-modes { display: inline-flex; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; margin: var(--sp-4) 0 var(--sp-2); }
.tool-modes button { border: none; border-radius: 0; padding: 7px 16px; background: var(--card); color: var(--muted); }
.tool-modes button + button { border-left: 1px solid var(--border); }
.tool-modes button.active { background: var(--accent); color: var(--accent-fg); font-weight: 600; }

.work { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: var(--sp-4); align-items: start; margin-top: var(--sp-3); }
@media (max-width: 820px) { .work { grid-template-columns: minmax(0, 1fr); } }

.panel { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: var(--sp-4); }
.panel h2 { font-family: var(--font-body); font-size: var(--fs-h3); font-weight: 600; margin: 0 0 var(--sp-3); }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: var(--sp-2); margin-bottom: var(--sp-3); }
.panel-head h2 { margin: 0; }

/* Inputs: stacked labels, two columns inside the panel */
.fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--sp-3) var(--sp-3); }
.fields .full { grid-column: 1 / -1; }
.field label { display: block; font-size: var(--fs-small); color: var(--muted); margin-bottom: 3px; }
.field input, .field select { width: 100%; font-size: var(--fs-body); padding: 7px 9px; font-variant-numeric: tabular-nums; }
.field .hint { font-size: var(--fs-caption); color: var(--muted); margin-top: 3px; }
.field.invalid input { border-color: var(--bad); }
.field .err { font-size: var(--fs-caption); color: var(--bad); margin-top: 3px; }
.group-label { grid-column: 1 / -1; font-size: var(--fs-caption); letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); margin: var(--sp-2) 0 -4px; }
.input-wrap { position: relative; }
.input-wrap .unit { position: absolute; right: 9px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: var(--fs-small); pointer-events: none; }
.input-wrap input { padding-right: 2.4em; }
.field.filled input { background: var(--accent-soft); }

.with-unit { display: flex; gap: 6px; }
.with-unit input { flex: 1 1 auto; min-width: 0; width: auto; }
.with-unit select { flex: 0 0 auto; width: auto; }
.panel-head select { max-width: 58%; }

/* Verdict card */
.verdict { border-left: 5px solid var(--neutral); }
.verdict .v-kicker { font-size: var(--fs-caption); letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); margin: 0; }
.verdict .v-title { font-family: var(--font-display); font-size: 1.9rem; font-weight: 700; line-height: 1.15; margin: 4px 0 var(--sp-2); }
.verdict .v-body { font-size: var(--fs-body); line-height: 1.55; margin: 0; color: var(--fg); }
.verdict.v-good { border-left-color: var(--good); } .verdict.v-good .v-title { color: var(--good); }
.verdict.v-bad { border-left-color: var(--bad); } .verdict.v-bad .v-title { color: var(--bad); }
.verdict.v-accent { border-left-color: var(--accent); } .verdict.v-accent .v-title { color: var(--accent); }
.verdict.v-neutral { border-left-color: var(--neutral); }
.verdict.v-warn { border-left-color: var(--series-2); } .verdict.v-warn .v-title { color: var(--series-2); }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(105px, 1fr)); gap: var(--sp-3); margin: var(--sp-4) 0 var(--sp-1); }
.kpi .k-val { display: block; font-size: 1.3rem; white-space: nowrap; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.2; }
.kpi .k-lbl { display: block; font-size: var(--fs-caption); color: var(--muted); }

/* Checks strip: the expert details, as badges */
.checks { display: grid; gap: var(--sp-2); margin-top: var(--sp-4); }
.check { display: grid; grid-template-columns: auto 1fr; gap: var(--sp-2); align-items: start; font-size: var(--fs-small); }
.check .badge { font-size: var(--fs-caption); font-weight: 700; letter-spacing: 0.03em; border-radius: var(--radius-s); padding: 1px 7px; white-space: nowrap; border: 1px solid currentColor; }
.check.is-ok .badge { color: var(--good); } .check.is-warn .badge { color: var(--series-2); } .check.is-fail .badge { color: var(--bad); } .check.is-info .badge { color: var(--muted); }
.check .c-name { font-weight: 600; }
.check .c-text { color: var(--muted); }

/* Charts drawn as inline SVG (no chart library) */
.svgchart { width: 100%; }
.svgchart svg { display: block; width: 100%; height: auto; overflow: visible; }
.svgchart text { font-family: var(--font-body); fill: var(--muted); font-size: 12px; }
.svgchart .title { fill: var(--fg); font-size: 12px; }
.svgchart text.halo { paint-order: stroke; stroke: var(--card); stroke-width: 4px; stroke-linejoin: round; }

/* Actions row */
.actions { display: flex; flex-wrap: wrap; gap: var(--sp-2); align-items: center; margin-top: var(--sp-4); }
.actions .spacer { flex: 1; }
.toast { font-size: var(--fs-small); color: var(--good); min-height: 1.2em; }
select.example { font-size: var(--fs-small); }

/* Collapsible sections under the work area */
.more { margin-top: var(--sp-4); border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); }
.more > summary { padding: var(--sp-3) var(--sp-4); list-style: none; display: flex; flex-wrap: wrap; gap: 0 var(--sp-2); align-items: baseline; }
.more > summary::-webkit-details-marker { display: none; }
.more > summary::after { content: "+"; color: var(--muted); font-weight: 400; font-size: 1.2rem; margin-left: auto; }
.more[open] > summary::after { content: "\2212"; }
.more > .more-body { padding: 0 var(--sp-4) var(--sp-4); }
.more .sub { color: var(--muted); font-weight: 400; font-size: var(--fs-small); }

.formula { font-family: var(--font-mono); font-size: var(--fs-small); background: var(--sunken); padding: var(--sp-2) var(--sp-3); border-radius: var(--radius); overflow-x: auto; white-space: pre; }

/* AI assist panel */
.assist { margin-top: var(--sp-3); border: 1px dashed var(--border); border-radius: var(--radius); padding: var(--sp-3); background: var(--sunken); }
.assist textarea { width: 100%; min-height: 110px; font: inherit; font-size: var(--fs-small); color: var(--fg); background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: var(--sp-2); resize: vertical; }
.assist .row { display: flex; flex-wrap: wrap; gap: var(--sp-2); align-items: end; margin-top: var(--sp-2); }
.assist .row .field { flex: 1 1 140px; }
.assist .note { font-size: var(--fs-caption); color: var(--muted); margin: var(--sp-2) 0 0; }
.assist-result { margin-top: var(--sp-3); }
.as-list { display: grid; gap: 6px; }
.as-item { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 6px 9px; font-size: var(--fs-small); }
.as-item label { display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; font-size: var(--fs-small); }
.as-item label span:first-of-type { font-weight: 600; }
.as-item .quote { margin: 2px 0 0 24px; font-size: var(--fs-caption); }
.assist-result .quote { color: var(--muted); font-style: italic; }
.assist-result .ns { color: var(--series-2); }
.linkish { background: none; border: none; color: var(--accent); padding: 0; text-decoration: underline; cursor: pointer; font-size: var(--fs-small); }

.footnote { font-size: var(--fs-caption); color: var(--muted); }
.page-sub { color: var(--muted); font-size: var(--fs-lede); max-width: 70ch; margin: var(--sp-2) 0 0; }

/* ---- v3: how-to guide, explanations, phone fixes ---- */
.guide { margin: var(--sp-3) 0 0; }
.guide .steps { list-style: none; counter-reset: step; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-3); margin: 0; padding: 0; }
.guide .steps li { counter-increment: step; position: relative; padding-left: 30px; font-size: var(--fs-small); color: var(--muted); line-height: 1.45; }
.guide .steps li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 21px; height: 21px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: var(--fs-caption); display: flex; align-items: center; justify-content: center; }
.guide .steps b { color: var(--fg); font-weight: 600; }
.guide .also { font-size: var(--fs-small); color: var(--muted); margin: var(--sp-2) 0 0; }
.guide .also b { color: var(--fg); font-weight: 600; }
@media (max-width: 720px) { .guide .steps { grid-template-columns: minmax(0, 1fr); gap: var(--sp-2); } }

.tip { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; min-width: 18px; padding: 0; margin-left: 4px; border-radius: 50%; font-size: 11px; font-weight: 700; line-height: 1; color: var(--accent); background: var(--accent-soft); border: 1px solid transparent; vertical-align: 1px; position: relative; }
.tip::after { content: ""; position: absolute; inset: -8px; }  /* bigger touch target, same look */
.tip:hover, .tip[aria-expanded="true"] { border-color: var(--accent); }
.tip-card { position: absolute; z-index: 50; background: var(--card); color: var(--fg); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 6px 24px rgba(0,0,0,.14); padding: var(--sp-3); }
.tip-card .tip-t { font-weight: 600; margin: 0 0 4px; font-size: var(--fs-small); }
.tip-card .tip-d { margin: 0; font-size: var(--fs-small); line-height: 1.5; color: var(--muted); }
.field label .tip, .kpi .tip, h2 .tip, h3 .tip, legend .tip, th .tip { vertical-align: 0; }

.field .hint { line-height: 1.4; }
[role=tabpanel]:focus { outline: none; }
@media (max-width: 600px) {
  .formula { white-space: pre-wrap; word-break: break-word; }
  .tool-modes { display: flex; width: 100%; }
  .tool-modes button { flex: 1 1 0; padding: 9px 8px; }
  .actions button { min-height: 36px; }
}
.nowrap { white-space: nowrap; }
.fields.sg-on { row-gap: 0; }
.fields.sg-on > .field.sg { display: grid; grid-row: span 4; grid-template-rows: subgrid; grid-template-columns: minmax(0, 1fr); row-gap: 0; min-width: 0; }
.fields.sg-on > .field.sg > label { align-self: end; }
.fields.sg-on > .field.sg::after { content: ""; height: var(--sp-3); }
.fields.sg-on > :not(.sg) { margin-bottom: var(--sp-3); }
.fields.sg-on > .group-label { margin: var(--sp-2) 0 6px; }
.field-after:empty { display: none; }
.ex-banner { margin: 0 0 var(--sp-3); padding: 6px 10px; border-radius: var(--radius); background: var(--accent-soft); color: var(--fg); font-size: var(--fs-small); line-height: 1.45; }
.ex-banner .ex-tag { display: inline-block; font-size: var(--fs-caption); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--accent); margin-right: 4px; }
.jump { display: none; }
@media (max-width: 820px) { .jump { display: inline-flex; align-items: center; min-height: 44px; margin: 0 0 var(--sp-2); font-size: var(--fs-small); font-weight: 600; } }
.ctl-grid .ctl-hint { display: block; margin-top: 4px; font-weight: 400; }

/* ---- Error Bars: paste-first single-column structure (2026-11-16) ----
 * This tool's own layout: one column, paste box first, results flowing
 * below, evidence ("Why it matters") as a section at the end of the page.
 * Brand drifts for this tool (two, per brief): panel corner radius 10px
 * (kit default is var(--radius)=4px), and the error-bar strip drawn in
 * the kit's ochre series-2 with an accent centre marker. */
.howto { color: var(--muted); font-size: var(--fs-body); line-height: 1.55; max-width: 72ch; margin: var(--sp-3) 0 0; }
.howto b { color: var(--fg); }
.howto code { font-family: var(--font-mono); font-size: var(--fs-small); }

.eb-jump { display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-5); margin: var(--sp-4) 0 var(--sp-2); font-size: var(--fs-small); }
.eb-jump a { font-weight: 600; }

.eb-flow { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sp-4); margin-top: var(--sp-3); }
.eb-flow .panel, .why .card.panel { border-radius: 10px; }
.eb-flow .actions { margin-top: 0; }

.upload-row { display: flex; flex-wrap: wrap; gap: var(--sp-2); align-items: center; font-size: var(--fs-small); color: var(--muted); margin: var(--sp-2) 0 0; }
.upload-row input[type="file"] { font-size: var(--fs-small); color: var(--fg); max-width: 100%; }

.result-note { font-size: var(--fs-caption); color: var(--muted); line-height: 1.5; border-top: 1px solid var(--border); margin: var(--sp-4) 0 0; padding-top: var(--sp-2); }
.panel > .result-note:first-child { border-top: none; margin-top: 0; }

.why { margin-top: var(--sp-7); }
.why-h { font-family: var(--font-display); font-size: var(--fs-h2); margin: 0 0 var(--sp-2); }
.why-intro { color: var(--muted); max-width: 72ch; margin: 0; }

/* Horizontal error-bar strip + forest rows (drawn by app.js from the
 * verdict's own numbers; no values are computed there). */
.eb-strip { margin-top: var(--sp-3); }
.eb-strip:empty { display: none; }
.eb-strip svg { display: block; width: 100%; height: auto; overflow: visible; }
.eb-strip text { font-family: var(--font-body); fill: var(--muted); font-size: 12px; }
.eb-strip .strip-track { stroke: var(--border); stroke-width: 2; }
.eb-strip .strip-bar { stroke: var(--series-2); stroke-width: 5; stroke-linecap: round; }
.eb-strip .strip-cap { stroke: var(--series-2); stroke-width: 2; }
.eb-strip .strip-dot { fill: var(--accent); }
.eb-strip .strip-zero { stroke: var(--neutral); stroke-width: 1; stroke-dasharray: 4 3; }
.eb-strip .strip-name { fill: var(--fg); font-weight: 600; }
.eb-strip .strip-val { fill: var(--fg); }
