* { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 100%; }
html, body { height: 100%; }
[hidden] { display: none !important; }
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  font-size: var(--text-md);
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
h1, h2, h3 { line-height: 1.25; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Inline icons share one stroke language. */
.btn svg,
.modal-close svg,
.detail-back svg,
.p-src svg,
.btn-remove svg,
.cost-warning svg,
.toast-action svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Keyboard focus: visible everywhere, suppressed only where a control draws
   its own ring (inputs below use border + box-shadow instead). */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

::selection { background: color-mix(in srgb, var(--accent) 30%, transparent); }

/* Thin, theme-aware scrollbars */
* { scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 999px;
  border: 2px solid var(--bg);
}
