/* MELA — reset + base element styles. Loaded after variables.css. */

/* ---- modern reset ---- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  height: 100%;
}

body {
  min-height: 100%;
  background: var(--ink-0);
  color: var(--tx-0);
  font-family: var(--font-ui);
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overscroll-behavior-y: none;
}

img, svg, video {
  display: block;
  max-width: 100%;
}

input, button, textarea, select {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
}

/* iOS Safari auto-zooms the page whenever a focused field's font-size is below
   16px. The UI runs at 14px and inputs get their size from many component
   classes (.st-tinput, search field, etc.), so this is a deliberate blanket
   floor: on phones no text-entry control is smaller than 16px. !important is
   correct here — every input is <=14px, so this only ever RAISES to 16, never
   shrinks anything. Stops the jarring zoom-on-tap in search, targets, profile
   names and the API-key field. Desktop keeps its 14px (no zoom behaviour there). */
@media (max-width: 768px) {
  input, select, textarea { font-size: 16px !important; }
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
}

h1, h2, h3, h4 {
  font-weight: 600;
  line-height: 1.2;
}

/* ---- numbers: mono + tabular, the app's voice ---- */
.num,
data, time, output {
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
  font-weight: 400;
}

/* ---- microlabel: 11px uppercase tracked ---- */
.microlabel {
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--tx-1);
}

/* ---- serif accent voice ---- */
.serif {
  font-family: var(--font-serif);
  font-style: normal;
  font-weight: 400;
}

/* ---- focus ---- */
:focus {
  outline: none;
}

:focus-visible {
  outline: 1px solid var(--acc);
  outline-offset: 2px;
}

/* ---- selection ---- */
::selection {
  background: var(--acc);
  color: var(--ink-0);
}

/* ---- scrollbars: thin hairline ---- */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--line-1) transparent;
}

*::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

*::-webkit-scrollbar-track {
  background: transparent;
}

*::-webkit-scrollbar-thumb {
  background: var(--line-1);
  border-radius: 3px;
}

/* ---- utility ---- */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
