/* Generated tools (developer tools, calculators, PDF tools): assets/js/kit/*.js build the page inside .kit */
.kit { display: grid; gap: 1rem; }
.kit-opts { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; padding: .7rem .9rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.kit-opts .select, .kit-opts .input { width: auto; min-width: 7rem; min-height: 38px; padding-block: .3rem; }
.kit-opts label { display: inline-flex; align-items: center; gap: .45rem; font-size: .9rem; font-weight: 550; }
.kit-opts input[type="checkbox"] { width: 17px; height: 17px; accent-color: var(--primary); }
.kit-io { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.kit-io.is-single { grid-template-columns: minmax(0, 1fr); }
.kit-pane { display: flex; flex-direction: column; min-width: 0; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.kit-pane-head { display: flex; align-items: center; gap: .35rem; flex-wrap: wrap; min-height: 46px; padding: .35rem .5rem .35rem .9rem; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.kit-pane-head h2 { margin: 0 auto 0 0; font-size: .85rem; font-weight: 650; color: var(--text-soft); }
.kit-text { flex: 1; width: 100%; min-height: min(56vh, 460px); margin: 0; padding: .85rem 1rem; border: 0; resize: vertical; background: transparent; color: var(--text); font: 13.5px/1.55 var(--font-mono); tab-size: 2; white-space: pre; overflow-wrap: normal; overflow: auto; }
.kit-text:focus { outline: none; box-shadow: inset 0 0 0 2px var(--focus); }
.kit-text.is-wrap { white-space: pre-wrap; overflow-wrap: anywhere; }
.kit-status { margin: 0; min-height: 1.4em; font-size: .9rem; color: var(--text-soft); }
.kit-status.is-ok { color: var(--success); }
.kit-status.is-err { color: var(--danger); }
.kit-status.is-ok::before { content: "✓ "; font-weight: 700; }
.kit-status.is-err::before { content: "✕ "; font-weight: 700; }
.kit-panel { padding: 1rem 1.1rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.kit-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1rem; align-items: start; }
.kit-fields { display: grid; gap: .9rem; }
.kit-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.kit-row3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: .75rem; }
.kit-big { margin: 0; font: 700 clamp(1.6rem, 1.2rem + 1.6vw, 2.4rem)/1.15 var(--font-display); color: var(--primary); overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.kit-big-label { margin: 0 0 .2rem; font-size: .85rem; font-weight: 600; color: var(--text-soft); }
.kit-table { width: 100%; border-collapse: collapse; font-size: .92rem; font-variant-numeric: tabular-nums; }
.kit-table th, .kit-table td { padding: .5rem .4rem; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.kit-table th { font-weight: 550; color: var(--text-soft); width: 45%; }
.kit-table td { font-weight: 600; overflow-wrap: anywhere; }
.kit-table .mono { font-family: var(--font-mono); font-size: .88rem; font-weight: 500; }
.kit-scroll { max-height: 420px; overflow: auto; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.kit-scroll .kit-table th { width: auto; position: sticky; top: 0; background: var(--surface-2); }
.kit-copy { display: inline-grid; place-items: center; width: 30px; height: 30px; margin-left: .25rem; padding: 0; border: 0; border-radius: 7px; background: transparent; color: var(--text-faint); cursor: pointer; vertical-align: middle; }
.kit-copy:hover { background: var(--bg-soft); color: var(--primary); }
.kit-copy .icon { width: 15px; height: 15px; }
.kit-tree { font: 13.5px/1.6 var(--font-mono); overflow: auto; max-height: min(64vh, 620px); padding: .6rem .9rem; }
.kit-tree details { margin-left: 1.1rem; }
.kit-tree > details { margin-left: 0; }
.kit-tree summary { cursor: pointer; list-style: revert; }
.kit-tree .k { color: #7c3aed; } .kit-tree .s { color: #16a34a; } .kit-tree .n { color: #2563eb; } .kit-tree .b { color: #db2777; } .kit-tree .z { color: var(--text-faint); }
.kit-tree .c { color: var(--text-faint); font-size: .85em; }
.kit-tree .leaf { margin-left: 1.1rem; }
:root[data-theme="dark"] .kit-tree .k { color: #c4b5fd; } :root[data-theme="dark"] .kit-tree .s { color: #86efac; } :root[data-theme="dark"] .kit-tree .n { color: #93c5fd; } :root[data-theme="dark"] .kit-tree .b { color: #f9a8d4; }
.kit-hl { margin: 0; padding: .85rem 1rem; font: 13.5px/1.6 var(--font-mono); white-space: pre-wrap; overflow-wrap: anywhere; max-height: 360px; overflow: auto; }
.kit-hl mark { padding: 0 1px; border-radius: 3px; background: color-mix(in srgb, #f59e0b 45%, transparent); color: inherit; }
.kit-hl mark:nth-of-type(even) { background: color-mix(in srgb, #3b82f6 35%, transparent); }
.kit-out { display: flex; align-items: center; gap: .5rem; padding: .8rem .9rem; border-radius: var(--radius-sm); background: var(--surface-sunken); font: 600 1.05rem/1.4 var(--font-mono); overflow-wrap: anywhere; }
.kit-out span { flex: 1; min-width: 0; }
.kit-list { display: grid; gap: .4rem; margin: 0; padding: 0; list-style: none; }
.kit-note { margin: 0; font-size: .86rem; color: var(--text-faint); }
.kit-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.kit-bar { height: 10px; border-radius: 5px; overflow: hidden; background: var(--surface-sunken); display: flex; }
.kit-bar i { display: block; height: 100%; background: var(--primary); }
.kit-bar i + i { background: #f59e0b; }
@media (max-width: 860px) {
  .kit-io, .kit-grid { grid-template-columns: minmax(0, 1fr); }
  .kit-text { min-height: 38vh; }
}
@media (max-width: 520px) {
  .kit-row3 { grid-template-columns: 1fr 1fr; }
  .kit-opts { gap: .5rem .8rem; }
}
/* calculators */
.kit-modes { margin-bottom: .25rem; }
.kit-segbtn { flex: 1; min-height: 36px; padding: 0 .8rem; border: 0; border-radius: 8px; background: transparent; color: var(--text-soft); font: 600 .86rem var(--font-sans); cursor: pointer; white-space: nowrap; }
.kit-segbtn[aria-pressed="true"], .kit-segbtn[aria-selected="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.kit-segbtn:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--focus); }
.kit-big-row { display: flex; align-items: center; gap: .25rem; }
.kit-result { position: sticky; top: calc(var(--header-h) + 12px); }
.kit-rows { display: grid; gap: .4rem; }
.kit-rowline { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr) auto; gap: .4rem; align-items: center; }
.kit-rowline:has(> :nth-child(3):last-child) { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) auto; }
.kit-legend { margin-top: .35rem; }
.kit-cron { flex: 1; font-size: 1.15rem; border: 0; background: transparent; }
@media (max-width: 860px) { .kit-result { position: static; } }
/* PDF tools */
.pdfk-file { display: flex; align-items: center; flex-wrap: wrap; gap: .4rem; margin: 0; font-size: .95rem; }
.pdfk-file .icon { width: 18px; height: 18px; color: var(--tool-fg); }
.pdfk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: .75rem; max-height: min(70vh, 760px); overflow-y: auto; padding: .25rem; }
.pdfk-page { position: relative; display: grid; place-items: center; aspect-ratio: 3 / 4; padding: 8px; border: 2px solid transparent; border-radius: var(--radius-sm); background: var(--surface-sunken); cursor: pointer; }
.pdfk-page[tabindex="-1"] { cursor: default; }
.pdfk-paper { display: grid; place-items: center; max-width: 100%; max-height: 100%; transition: transform .2s var(--ease); }
.pdfk-paper canvas { display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; background: #fff; box-shadow: 0 1px 4px rgb(0 0 0 / .18); }
.pdfk-num { position: absolute; bottom: 4px; right: 6px; padding: 0 6px; border-radius: 99px; background: rgb(0 0 0 / .55); color: #fff; font-size: .72rem; font-weight: 700; }
.pdfk-page.is-picked { border-color: var(--primary); background: var(--primary-soft); }
.pdfk-page.is-picked .pdfk-num { background: var(--primary); }
.pdfk-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
/* phones: nothing may be wider than the screen */
.kit-grid > *, .kit-io > *, .kit-row2 > *, .kit-row3 > * { min-width: 0; }
.kit-opts label { flex-wrap: wrap; max-width: 100%; }
.kit-opts .select { max-width: 100%; min-width: 0; }
.kit-opts > .input { flex: 1 1 12rem; min-width: 0; }
.kit-table { table-layout: fixed; }
.kit-scroll .kit-table { table-layout: auto; }
.kit-row2 .input, .kit-row2 .select { width: 100%; min-width: 0; }
@media (max-width: 520px) { .kit-row2 { grid-template-columns: minmax(0, 1fr); } .kit-table th { width: 40%; } }
