/* ===========================================================================
   base.css — reset, RTL, document basics. Imported by every page after tokens.
   =========================================================================== */

*,
*::before,
*::after { box-sizing: border-box; }

* { margin: 0; }

html, body { height: 100%; }

body {
  font-family: var(--font-body);
  font-size: var(--t-body);
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* RTL is the default for the whole app (Hebrew). */
html[dir="rtl"] { direction: rtl; }

h1, h2, h3 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.2;
  color: var(--ink);
}

p { color: var(--ink); }

button { font-family: inherit; cursor: pointer; }

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

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

:focus-visible {
  outline: 2px solid var(--coral);
  outline-offset: 2px;
  border-radius: 6px;
}

/* The mobile-first app column, centred on wide screens. */
.app {
  width: 100%;
  max-width: var(--app-max);
  min-height: 100dvh;
  margin-inline: auto;
  background: var(--bg);
  display: flex;
  flex-direction: column;
}

/* Phone scrollbars: overlay, not window chrome.
   A desktop OS bar renders inside our scrollers as a stubby 15px column with
   arrow buttons, floating between the header and the CTA — it reads as a resized
   desktop window, not a phone. It also eats 15px of layout width, so a screen
   that scrolls sits narrower than one that doesn't and the content jumps sideways
   between steps. Phones show an overlay bar that fades out; match that. Content
   stays scrollable by touch, wheel and keyboard. */
.app, .app * {
  scrollbar-width: none;              /* Firefox */
  -ms-overflow-style: none;           /* legacy Edge */
}
.app::-webkit-scrollbar,
.app *::-webkit-scrollbar { width: 0; height: 0; }

/* Generic vertical screen padding. */
.screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: var(--s5);
}

/* Respect users who prefer less motion. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
  }
}
