/* Reset — Tailwind CSS v3.4 Preflight (MIT, Copyright (c) Tailwind Labs, Inc.), resolved against this app's theme and kept
 * as plain CSS. The app's rules are written against it: `border: 0 solid` on everything means a bare `border-width` or
 * `border-top: 1px` is enough, images/svg are block, form controls inherit the font, `[hidden]` hides.
 * Cascade position matters: components-early.css sits before this file, components.css and later after it (the order
 * Tailwind's `@tailwind base` produced; see the file list in Layout.kt). No `@layer`: a layer would flip specificity contests.
 *
 * Dropped from Preflight 3.4 (no emitter in view/**, ts/**; user text is escaped, so none can appear): abbr, small, sub/sup,
 * samp, blockquote (margin), optgroup, audio/embed/iframe/object (display block). Dropped as build artefacts: the autoprefixer
 * copies (-moz-tab-size, -o-tab-size, -webkit-text-decoration, ::-moz-placeholder, -moz-text-size-adjust) and the
 * `--tw-*` utility defaults nothing reads. */

/* The `--tw-*` defaults our own transform/shadow/ring rules read (components.css COMPAT, residue in app.css). */
*, ::before, ::after {
  --tw-translate-x: 0;
  --tw-translate-y: 0;
  --tw-rotate: 0;
  --tw-skew-x: 0;
  --tw-skew-y: 0;
  --tw-scale-x: 1;
  --tw-scale-y: 1;
  --tw-ring-offset-shadow: 0 0 #0000;
  --tw-ring-shadow: 0 0 #0000;
  --tw-shadow: 0 0 #0000;
}

*, ::before, ::after {
  box-sizing: border-box;
  border-width: 0;
  border-style: solid;
  border-color: #e5e7eb;
}
::before, ::after { --tw-content: ''; }
html, :host {
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  tab-size: 4;
  font-family: IBM Plex Sans, ui-sans-serif, system-ui, sans-serif;
  font-feature-settings: normal;
  font-variation-settings: normal;
  -webkit-tap-highlight-color: transparent;
}
body { margin: 0; line-height: inherit; }
hr { height: 0; color: inherit; border-top-width: 1px; }
h1, h2, h3, h4, h5, h6 { font-size: inherit; font-weight: inherit; }
a { color: inherit; text-decoration: inherit; }
b, strong { font-weight: bolder; }
code, kbd, pre { font-family: ui-monospace, SFMono-Regular, monospace; font-feature-settings: normal; font-variation-settings: normal; font-size: 1em; }
table { text-indent: 0; border-color: inherit; border-collapse: collapse; }
button, input, select, textarea {
  font-family: inherit;
  font-feature-settings: inherit;
  font-variation-settings: inherit;
  font-size: 100%;
  font-weight: inherit;
  line-height: inherit;
  letter-spacing: inherit;
  color: inherit;
  margin: 0;
  padding: 0;
}
button, select { text-transform: none; }
button, input:where([type='button']), input:where([type='reset']), input:where([type='submit']) {
  -webkit-appearance: button;
  background-color: transparent;
  background-image: none;
}
:-moz-focusring { outline: auto; }
:-moz-ui-invalid { box-shadow: none; }
progress { vertical-align: baseline; }
::-webkit-inner-spin-button, ::-webkit-outer-spin-button { height: auto; }
[type='search'] { -webkit-appearance: textfield; outline-offset: -2px; }
::-webkit-search-decoration { -webkit-appearance: none; }
::-webkit-file-upload-button { -webkit-appearance: button; font: inherit; }
summary { display: list-item; }
dl, dd, figure, h1, h2, h3, h4, h5, h6, hr, p, pre { margin: 0; }
fieldset { margin: 0; padding: 0; }
legend { padding: 0; }
ol, ul, menu { list-style: none; margin: 0; padding: 0; }
dialog { padding: 0; }
textarea { resize: vertical; }
input::placeholder, textarea::placeholder { opacity: 1; color: #9ca3af; }
button, [role="button"] { cursor: pointer; }
:disabled { cursor: default; }
img, svg, video, canvas { display: block; vertical-align: middle; }
img, video { max-width: 100%; height: auto; }
[hidden]:where(:not([hidden="until-found"])) { display: none; }

/* ── base rules (formerly `@layer base` in tailwind.css) ── */
/* ── Touch polish ── */
html {
    min-height: 100%;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    /* html is the vertical scroll container — no inner element caps the
       height or sets overflow-y, so the document scrolls. scroll-padding
       must live here (not on .app-main, which never scrolls) for native
       anchor jumps (href="#id") to clear the fixed mobile top bar. */
    scroll-padding-top: var(--mobile-topbar-live-strip);
    /* M27: a sticky bar never covers the focused field — bar strip is the bottom nav's
       when a page renders one, plain safe area otherwise (pre-auth login). */
    scroll-padding-bottom: calc(var(--mobile-chrome-bottom-strip) + 1.5rem);
}

body {
    min-height: 100vh;
    min-height: 100dvh;
    overscroll-behavior-y: none;
}

@supports not (min-height: 100dvh) {
    body {
        min-height: var(--visual-viewport-height, 100vh);
    }
}

a, button, input, select, textarea, label, [role="button"], summary {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
