/* Local AI: the sizing calculator (#sizing). Loaded on /local-ai/ only; colours follow the
   page tokens so it sits inside the light and dark themes like the comparison table above it. */
.sizer { --sz-panel: #fff; --sz-field: #f0f1f2; --sz-field-line: #d6deeb; --sz-label: #7485a0; --sz-weights: #2457e6; --sz-kv: #d9822b; --sz-runtime: #a9b1bf; --sz-track: #eceef2; --sz-good: #2e7957; --sz-bad: #b42318; --sz-good-soft: #e6f3ec;
  display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 28px; max-width: 980px; margin-top: 10px; }
html[data-theme="dark"] .sizer { --sz-panel: #1d2024; --sz-field: #202020; --sz-field-line: var(--border, #383838); --sz-label: #93a3bd; --sz-weights: #91b5ff; --sz-kv: #e8a565; --sz-runtime: #59606b; --sz-track: #2a2d32; --sz-good: #7fd1a4; --sz-bad: #f0776c; --sz-good-soft: #12301f; }

.sizer-form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 12px; align-content: start; }
.sizer-wide { grid-column: 1 / -1; }
.sizer-custom { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.sizer-custom[hidden] { display: none; }
.sizer-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; font-size: 13px; color: var(--sz-label); }
.sizer-field select, .sizer-field input { font: inherit; font-size: 14px; color: var(--ink); background: var(--sz-field); border: 1px solid var(--sz-field-line); border-radius: 10px; padding: 10px 12px; width: 100%; min-width: 0; font-variant-numeric: tabular-nums; }
.sizer-field select:focus-visible, .sizer-field input:focus-visible { outline: none; border-color: var(--cobalt, #2457e6); box-shadow: 0 0 0 4px #2457e61a; }
.sizer-field small { font-size: 12px; line-height: 1.5; color: var(--sz-label); }

.sizer-out { display: grid; gap: 12px; min-width: 0; align-content: start; }
.sizer-answers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0; }
.sizer-answers > div { border: 1px solid var(--line); border-radius: 14px; background: var(--sz-panel); padding: 14px 16px; min-width: 0; }
.sizer-answers dt { font-size: 13px; color: var(--sz-label); }
.sizer-answers dd { margin: 4px 0 0; font-size: 30px; font-weight: 500; letter-spacing: -.03em; line-height: 1.15; color: var(--ink); font-variant-numeric: tabular-nums; }
.sizer-answers small { display: block; margin-top: 2px; font-size: 12.5px; color: var(--sz-label); font-variant-numeric: tabular-nums; }
.sizer-verdict { color: var(--sz-good) !important; }
.sizer-verdict[data-fit="no"] { color: var(--sz-bad) !important; }
.sizer-measured { display: inline-block; margin-top: 8px; padding: 2px 8px; border-radius: 6px; font-size: 12px; font-weight: 600; background: var(--sz-good-soft); color: var(--sz-good); font-variant-numeric: tabular-nums; }
.sizer-measured[hidden] { display: none; }
.sizer-more { border: 1px solid var(--line); border-radius: 12px; background: var(--sz-panel); padding: 10px 14px; }
.sizer-more summary { cursor: pointer; font-size: 14px; color: var(--ink); }
.sizer-more[open] summary { margin-bottom: 10px; }
.sizer-line { margin: 0; font-size: 14px; line-height: 1.65; color: var(--muted); font-variant-numeric: tabular-nums; }
.sizer-bar { display: flex; height: 10px; margin: 4px 0 10px; border-radius: 99px; overflow: hidden; background: var(--sz-track); }
.sizer-bar i { display: block; height: 100%; }
.sizer-bar [data-bar="weights"] { background: var(--sz-weights); }
.sizer-bar [data-bar="kv"] { background: var(--sz-kv); }
.sizer-bar [data-bar="runtime"] { background: var(--sz-runtime); }
.sizer-legend { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px 14px; margin: 0; font-size: 13px; }
.sizer-legend div { display: flex; flex-direction: column; }
.sizer-legend dt { display: flex; align-items: center; gap: 6px; color: var(--sz-label); }
.sizer-legend dd { margin: 0; color: var(--ink); font-variant-numeric: tabular-nums; }
.sizer-legend b { width: 9px; height: 9px; border-radius: 3px; flex-shrink: 0; }
.k-weights { background: var(--sz-weights); } .k-kv { background: var(--sz-kv); } .k-runtime { background: var(--sz-runtime); } .k-capacity { background: var(--sz-track); box-shadow: inset 0 0 0 1px var(--sz-field-line); }
.sizer-plan { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; align-items: end; }

.sizer-method { max-width: 980px; margin-top: 18px; border-top: 1px solid var(--line); padding-top: 14px; }
.sizer-method summary { cursor: pointer; font-size: 15px; color: var(--ink); }
.sizer-method p { font-size: 14px; line-height: 1.75; color: var(--muted); max-width: 760px; margin: 12px 0 0; }
.sizer-method b { font-weight: 500; color: var(--ink); }
.sizer-sources { columns: 2; gap: 24px; margin: 14px 0 0; padding: 0; list-style: none; font-size: 12.5px; line-height: 1.8; color: var(--sz-label); }
.sizer-sources a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }

@media (max-width: 900px) {
  .sizer { grid-template-columns: 1fr; }
  .sizer-plan { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .sizer-legend, .sizer-plan { grid-template-columns: 1fr 1fr; }
  .sizer-answers dd { font-size: 26px; }
  .sizer-sources { columns: 1; }
}

/* ⓘ explanations: a small round button after the label, and one floating card placed by sizing.js. */
.sz-label { display: inline; }
.sz-tip { display: inline-grid; place-items: center; width: 18px; height: 18px; margin-left: 6px; padding: 0; vertical-align: 1px; border: 1px solid var(--sz-field-line, #d6deeb); border-radius: 50%; background: transparent; color: var(--sz-label, #7485a0); font: italic 600 11px/1 Georgia, serif; cursor: pointer; }
.sz-tip:hover, .sz-tip[aria-expanded="true"] { border-color: var(--cobalt, #2457e6); color: var(--cobalt, #2457e6); }
.sz-tip:focus-visible { outline: 2px solid var(--cobalt, #2457e6); outline-offset: 2px; }
@media (pointer: coarse) { .sz-tip { width: 24px; height: 24px; font-size: 12px; } }
.sz-tipcard { position: fixed; z-index: 200; padding: 14px 16px; border: 1px solid var(--line, #e1e1e1); border-radius: 12px; background: #fff; color: var(--ink, #202020); box-shadow: 0 18px 40px -16px #16181b40; font-size: 13.5px; line-height: 1.6; }
.sz-tipcard[hidden] { display: none; }
.sz-tipcard strong { display: block; margin-bottom: 4px; font-size: 14px; font-weight: 600; }
.sz-tipcard p { margin: 0; color: var(--muted, #626872); }
.sz-tipcard .sz-tip-example { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line, #e1e1e1); color: var(--ink, #202020); }
html[data-theme="dark"] .sz-tipcard { background: #1d2024; border-color: #383838; box-shadow: 0 18px 40px -16px #000a; }
.sizer-notes { display: grid; gap: 12px; }
.sizer-notes strong { display: block; font-size: 14px; font-weight: 600; color: var(--ink); }
.sizer-notes p { margin: 2px 0 0; font-size: 14px; line-height: 1.65; color: var(--muted); }
