/* UPUPG Units v5 — always-visible five-option scrollable listboxes. */
.uc {
  box-sizing:border-box; width:100%; max-width:100%; min-width:0;
  margin:10px auto 32px; padding:0; color:var(--up-ink,#edf3ff);
  font:12px/1.6 Tahoma,Arial,sans-serif;
}
.uc *, .uc *::before, .uc *::after {box-sizing:border-box}
.uc h2 {font-size:14px; margin:0; font-weight:700}
.uc p {color:var(--up-muted,#aebdd5); line-height:1.7; margin:5px 0}

/* Navigation is the first thing on the page — no heading/hero container. */
.uc-tabs {display:flex; flex-wrap:wrap; gap:8px; justify-content:flex-start; margin:0 0 13px}
.uc-tabs button,.uc-btn {
  font:inherit; font-size:12px; cursor:pointer; background:#203250;
  color:var(--up-ink,#edf3ff); border:1px solid var(--up-border,#354562);
  border-radius:9px; padding:8px 13px; min-height:36px;
}
.uc-tabs button.active {
  background:var(--up-gold,#f0bc5b); color:#18243a;
  border-color:var(--up-gold,#f0bc5b); font-weight:bold;
}
.uc-tabs button:focus-visible,.uc-btn:focus-visible {outline:2px solid var(--up-gold,#f0bc5b);outline-offset:2px}

/* The shared site's #main-content owns the outer width; no extra frame. */
.uc-panel {background:transparent; border:0; border-radius:0; padding:0; min-height:0; overflow:visible}
.uc-panel[hidden] {display:none}

/* Centered compact numeric input; label above in its own line. */
.uc-value-section {width:min(360px,100%); margin:6px auto 12px; padding:0; background:transparent; border:0; text-align:center}
.uc .uc-value-label {
  display:block; color:var(--up-gold,#f0bc5b); font-size:15px;
  font-weight:700; margin:0 0 7px;
}
.uc .uc-value-input {
  display:block; width:100%; height:52px; min-height:52px;
  background:#0d192e; border:1.5px solid #b89554; border-radius:10px;
  color:#fff4cb; text-align:center; direction:ltr;
  font:700 25px/1.25 Tahoma,Arial,sans-serif; padding:7px 12px;
}
.uc .uc-value-input::placeholder {color:#91a7c8; font-size:14px; font-weight:400; opacity:1}
.uc .uc-value-input:focus {border-color:var(--up-gold,#f0bc5b); box-shadow:0 0 0 2px rgba(240,188,91,.14)}

/* Single compact row, with no duplicate input container. */
.uc-toolbar {display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; margin:0 0 10px}
.uc-units-toolbar {grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px}
.uc label,.uc-field {display:flex; flex-direction:column; min-width:0; gap:4px; color:#c9d8ee; font-size:11px}
.uc-field-label {display:block; color:#c9d8ee; font-size:11px}
.uc input:not(.uc-value-input),.uc select {
  width:100%; min-width:0; min-height:37px; height:37px;
  background:#101e34; border:1px solid #536783; border-radius:8px;
  padding:7px 10px; color:#f1f5ff; font:inherit; font-size:12px;
}
.uc input:focus,.uc select:focus {outline:2px solid var(--up-gold,#f0bc5b);outline-offset:1px}
.uc input[type="number"] {font-variant-numeric:tabular-nums}

/* 5 visible native entries on first page load, remainder scrolls internally.
   The native select size=5 attribute controls row count; unlike the v3
   popup, no click is required. These rules override generic site selects. */
.uc .uc-units-toolbar select.uc-listbox {
  display:block; width:100%; min-width:0;
  height:auto; min-height:0; max-height:none;
  padding:2px 3px; overflow-y:auto;
  background:#101e34; color:#f1f5ff;
  border:1px solid #536783; border-radius:8px;
  font:12px/1.3 Tahoma,Arial,sans-serif;
  scrollbar-width:auto; scrollbar-color:#8190aa #101e34;
  scrollbar-gutter:stable; cursor:default;
}
.uc .uc-units-toolbar select.uc-listbox option {
  display:block; padding:5px 8px; min-height:26px;
  font:12px/1.3 Tahoma,Arial,sans-serif;
  background:#101e34; color:#f1f5ff;
}
.uc .uc-units-toolbar select.uc-listbox option:checked {
  background:#354c70 linear-gradient(#354c70,#354c70);
  color:#ffe1a3; font-weight:bold;
}
.uc .uc-units-toolbar select.uc-listbox:focus-visible {
  outline:2px solid var(--up-gold,#f0bc5b); outline-offset:2px;
}
.uc .uc-units-toolbar select.uc-listbox::-webkit-scrollbar {width:10px}
.uc .uc-units-toolbar select.uc-listbox::-webkit-scrollbar-track {background:#14233c}
.uc .uc-units-toolbar select.uc-listbox::-webkit-scrollbar-thumb {
  background:#7286a6; border:2px solid #14233c; border-radius:7px;
}

/* Inline note, compact result heading and short result cards. */
.uc-note {color:var(--up-muted,#aebdd5); font-size:10.5px; line-height:1.55; margin:7px 0 12px}
.uc-results-head {display:flex; justify-content:space-between; align-items:center; gap:8px; margin:13px 0 9px}
.uc-results {display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:9px; font-size:12px}
.uc-result {background:#223453; border:1px solid #425a7d; border-radius:9px; padding:10px 12px; min-width:0}
.uc-result small {display:block; color:#bbcae0; font-size:11px; margin-bottom:4px}
.uc-result strong {display:block; font-size:17px; line-height:1.45; overflow-wrap:anywhere; direction:ltr; text-align:right; font-variant-numeric:tabular-nums}
.uc-result button {margin-top:5px; padding:1px 0; background:transparent; color:var(--up-gold,#f0bc5b); border:0; cursor:pointer; font:inherit; font-size:11px}
.uc-result.featured {border-color:#c89c4f}
.uc-error {color:#ffbcab}
#tab-tools > h2 {margin:2px 0 10px}

@media (max-width:900px) {
  .uc-results {grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width:700px) {
  .uc-toolbar:not(.uc-units-toolbar) {grid-template-columns:repeat(2,minmax(0,1fr))}
  .uc-units-toolbar {gap:8px}
}
@media (max-width:560px) {
  .uc {margin-top:8px}
  .uc-tabs {gap:5px; margin-bottom:11px}
  .uc-tabs button {flex:1 1 auto; min-width:0; padding:6px 7px; font-size:10.5px}
  .uc-value-section {width:min(340px,100%)}
  .uc .uc-value-input {height:49px; min-height:49px; font-size:22px}
  .uc-units-toolbar {grid-template-columns:1fr; gap:8px}
  .uc-results {grid-template-columns:1fr}
}
@media (max-width:380px) {
  .uc-toolbar:not(.uc-units-toolbar) {grid-template-columns:1fr}
}

/* v5: compact, standards-accurate comparison for the data-capacity section. */
.uc-data-explain {margin:0 0 10px; border:1px solid var(--up-border,#354562); border-radius:9px;
  background:rgba(28,45,73,.68); padding:9px 12px; color:var(--up-ink,#edf3ff);}
.uc-data-explain[hidden],.uc-data-live[hidden] {display:none}
.uc-data-head {display:flex; gap:8px; align-items:baseline; flex-wrap:wrap;
  font-size:12px; font-weight:bold; margin-bottom:7px; color:var(--up-gold,#f0bc5b)}
.uc-data-head span {font-size:10px; font-weight:normal; color:var(--up-muted,#aebdd5)}
.uc-data-pairs {display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px}
.uc-data-pair {display:flex; gap:4px 10px; flex-wrap:wrap; align-items:baseline;
  border:1px solid var(--up-border,#354562); border-radius:7px; background:#172840; padding:6px 9px;}
.uc-data-pair span {font-size:11px; color:#c9d8ee}
.uc-data-pair strong {font-size:14px; font-weight:bold; color:#fff1c6; unicode-bidi:isolate}
.uc .uc-data-live {margin:8px 0 0; padding:6px 9px; border-inline-start:2px solid var(--up-gold,#f0bc5b);
  background:rgba(10,22,43,.45); font-size:11.5px; color:#edf3ff; overflow-wrap:anywhere}
.uc .uc-data-foot {margin:7px 0 0; font-size:10.5px; line-height:1.6; color:var(--up-muted,#aebdd5)}
.uc-data-foot a {color:var(--up-gold,#f0bc5b); text-decoration:underline}
@media (max-width:560px) {
  .uc-data-pairs {grid-template-columns:1fr}
  .uc-data-pair strong {font-size:13px}
}
