[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; }

/* ---- GPU dashboard: this tool's structural signature ----
 * A collapsible settings rail on the left; the dashboard (verdict line,
 * four KPI tiles, cost chart, plan comparison) in the main column.
 * Brand drifts for this tool (2): 10px corner radius on the dashboard
 * surfaces, and tighter density (sp-3 gaps, compact tiles). */
.dash-intro { margin-top: var(--sp-4); }
.dash { display: grid; grid-template-columns: 21rem minmax(0, 1fr); gap: var(--sp-3); align-items: start; margin-top: var(--sp-3); }
@media (max-width: 820px) { .dash { grid-template-columns: minmax(0, 1fr); } }

.rail { border: 1px solid var(--border); border-radius: 10px; background: var(--card); }
.rail > summary { padding: var(--sp-3) var(--sp-4); list-style: none; display: flex; flex-wrap: wrap; gap: 0 var(--sp-2); align-items: baseline; cursor: pointer; font-weight: 600; }
.rail > summary::-webkit-details-marker { display: none; }
.rail > summary::after { content: "\2212"; color: var(--muted); font-weight: 400; font-size: 1.2rem; margin-left: auto; }
.rail:not([open]) > summary::after { content: "+"; }
.rail > summary .sub { color: var(--muted); font-weight: 400; font-size: var(--fs-small); }
.rail-form { border: none; border-radius: 0; background: transparent; padding: 0 var(--sp-4) var(--sp-4); }
.rail-form .fields { grid-template-columns: minmax(0, 1fr); }

.dash-main { display: grid; gap: var(--sp-3); min-width: 0; }
.dash-main .verdict { border-radius: 10px; }
.dash-main .chart-panel { border-radius: 10px; }
.dash-main .actions { margin-top: 0; }
.dash-main .more { margin-top: 0; }

/* KPI tiles: the tiles ARE the verdict */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--sp-3); margin: var(--sp-4) 0 var(--sp-1); }
@media (max-width: 1080px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.kpi-tile { background: var(--sunken); border: 1px solid var(--border); border-radius: 10px; padding: var(--sp-3); min-width: 0; }
.kpi-tile .k-val { display: block; font-size: 1.35rem; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.2; white-space: nowrap; }
.kpi-tile .k-val.range { font-size: 1.02rem; white-space: normal; }
.kpi-tile .k-lbl { display: block; font-size: var(--fs-caption); color: var(--muted); margin-top: 2px; }

/* Guide: "Start here" strip, situations and the when-to-use table (added 2026-11). */
.start-here { margin: 12px 0 14px; padding: 12px 14px; border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: var(--radius); background: var(--card); font-size: var(--fs-small); }
.start-here p { margin: 0 0 6px; }
.start-here ol { margin: 0; padding-left: 1.3em; }
.start-here li { margin: 2px 0; }
.guide .fit-table { width: 100%; border-collapse: collapse; margin: 6px 0 10px; }
.guide .fit-table th, .guide .fit-table td { text-align: left; vertical-align: top; padding: 6px 8px; border-top: 1px solid var(--border); }
.guide .fit-table th { font-weight: 600; }
@media (max-width: 560px) {
  .guide .fit-table thead { display: none; }
  .guide .fit-table tr { display: block; border-top: 1px solid var(--border); padding: 6px 0; }
  .guide .fit-table td { display: block; border: 0; padding: 2px 0; }
  .guide .fit-table td:first-child { font-weight: 600; }
}
