/* Compact, directly actionable icon ribbon. All four tiles share the same block size. */
.offline-bar {
  --offline-tile: 42px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  box-sizing: border-box;
  min-height: 52px;
  padding: 5px 4%;
  border-bottom: 1px solid var(--line);
  background: #f7f9fc;
  color: var(--navy);
}
.offline-toolbelt { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; }
.offline-connection, .offline-tool-button {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  height: var(--offline-tile);
  min-height: var(--offline-tile);
  max-height: var(--offline-tile);
  margin: 0;
  border: 1px solid #dbe4ee;
  border-radius: 8px;
  padding: 0;
  background: #fff;
  line-height: 1;
  vertical-align: middle;
}
.offline-connection { gap: 5px; min-width: 68px; padding: 0 8px; cursor: default; }
.offline-connection svg, .offline-tool-button svg {
  display: block;
  flex: none;
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.offline-network-on { color: #249d70; }
.offline-network-off { color: #d69b25; }
.offline-network-error { color: #ba4545; }
.offline-connection .offline-network-off, .offline-connection .offline-network-error { display: none; }
.offline-connection[data-state="offline"] .offline-network-on, .offline-connection[data-state="error"] .offline-network-on { display: none; }
.offline-connection[data-state="offline"] .offline-network-off, .offline-connection[data-state="error"] .offline-network-error { display: block; }
.offline-count { min-width: 17px; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--navy); text-align: center; }
.offline-separator { flex: 0 0 1px; width: 1px; height: 22px; margin: 0 3px; background: #d8e0ea; }
.offline-tool-button { width: var(--offline-tile); min-width: var(--offline-tile); color: #30465d; cursor: pointer; transition: background-color .15s, border-color .15s; }
.offline-tool-button:hover:not(:disabled) { background: #ecf2f9; border-color: #aabed7; }
.offline-tool-button:active:not(:disabled) { background: #dce8f6; }
.offline-tool-practice { color: #fff; background: var(--navy); border-color: var(--navy); }
.offline-tool-practice:hover:not(:disabled) { background: var(--navy-2); border-color: var(--navy-2); }
.offline-tool-save { color: #2b5c9f; }
.offline-tool-clear { color: #9a5257; }
.offline-tool-clear:hover:not(:disabled) { background: #fff0f0; border-color: #d9a4a8; }
.offline-tool-button:disabled { opacity: .38; cursor: not-allowed; }
.offline-tool-button:focus-visible, .offline-connection:focus-visible { outline: 2px solid #5981c8; outline-offset: 2px; }
.offline-sr-only { position: absolute!important; width: 1px!important; height: 1px!important; padding: 0!important; margin: -1px!important; overflow: hidden!important; clip: rect(0,0,0,0)!important; white-space: nowrap!important; border: 0!important; }
.offline-bar > progress { position: absolute; left: 0; bottom: 0; width: 100%; height: 3px; margin: 0; border: 0; accent-color: var(--blue); }
.offline-bar [hidden] { display: none!important; }
@media (max-width: 650px) {
  .offline-dialog { padding: 28px 20px 22px; }
  .offline-counts div { padding: 10px; }
  .offline-counts strong { font-size: 20px; }
  .offline-dialog-actions .button { flex: 1; }
}
@media (max-width: 480px) {
  .offline-bar { padding: 4px 4%; min-height: 50px; }
  .offline-toolbelt { gap: 5px; }
  .offline-separator { margin: 0 1px; }
}
@media (prefers-reduced-motion: reduce) {
  .offline-tool-button { transition: none; }
}
.app-update{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 4%;background:#eaf4ef;border-bottom:1px solid #cce2d5;color:#173e36;font-size:13px;line-height:1.5}
.app-update button{flex:none;border:1px solid #a9cabb;border-radius:7px;background:#fff;color:#175d4d;padding:7px 11px;font:inherit;font-weight:700;cursor:pointer}
@media(max-width:600px){.app-update{align-items:flex-start;flex-direction:column}}
.offline-dialog { width: min(560px, calc(100vw - 32px)); padding: 30px; overflow-y: auto; }
.offline-dialog .eyebrow { color: var(--blue); margin-bottom: 8px; }
.offline-dialog h2 { margin-bottom: 8px; }
.offline-dialog .muted { margin-bottom: 22px; }
.offline-scope-options { border: 0; padding: 0; margin: 0 0 20px; min-width: 0; }
.offline-scope-options legend { padding: 0; margin-bottom: 10px; color: var(--navy); font-size: 13px; font-weight: 700; }
.offline-scope-options label { display: flex; align-items: center; gap: 11px; min-height: 48px; padding: 10px 13px; margin: 0 0 8px; border: 1px solid var(--line); border-radius: 9px; font-weight: 500; cursor: pointer; }
.offline-scope-options label:has(input:checked) { border-color: #7490d7; background: #eef3fc; color: var(--navy); }
.offline-scope-options input { flex: 0 0 auto; accent-color: var(--blue); width: 18px; height: 18px; margin: 0; }
.offline-scope-options span { min-width: 0; overflow-wrap: anywhere; }
.offline-counts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin: 0 0 21px; }
.offline-counts div { min-width: 0; padding: 12px; border-radius: 9px; background: #f3f6fa; }
.offline-counts span { display: block; color: var(--muted); font-size: 12px; }
.offline-counts strong { display: block; margin-top: 3px; font-size: 23px; font-variant-numeric: tabular-nums; color: var(--navy); }
.offline-batch-label { display: block; margin: 0; color: var(--navy); }
.offline-batch-label input { max-width: 150px; }
.offline-dialog .footnote { margin: 8px 0 17px; }
.offline-dialog progress { display: block; width: 100%; height: 9px; margin: 14px 0 6px; accent-color: var(--blue); }
.offline-dialog [hidden] { display: none; }
.offline-download-result { min-height: 20px; margin: 9px 0 0; font-size: 13px; line-height: 1.6; color: var(--navy-2); }
.offline-dialog .form-error { min-height: 0; margin: 8px 0 0; }
.offline-dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.offline-dialog-actions .button { min-height: 44px; }
