/* SmartReminder - design tokens, reset and typography.
   Light is the base palette; dark is redefined both by system preference and
   by an explicit [data-theme] stamp so a Telegram/user override always wins.

   The palette is deliberately neutral - warm paper in light, graphite in dark -
   so the only saturated colour on a screen is a payment's status. That keeps
   "red means overdue" legible instead of competing with the interface. */

:root {
  --bg: #f4f4f2;
  --surface: #ffffff;
  --surface-2: #f0efec;
  --surface-3: #e6e5e1;
  --text: #14161a;
  --text-2: #3d424b;
  --muted: #6f7681;
  --border: #e6e4df;
  --border-strong: #d2cfc8;
  --accent: #4f46e5;
  --accent-soft: rgba(79, 70, 229, 0.09);
  --accent-contrast: #ffffff;
  --danger: #c8352b;
  --danger-soft: rgba(200, 53, 43, 0.09);

  --st-paid: #17803d;
  --st-upcoming: #2563eb;
  --st-due: #b45309;
  --st-overdue: #c8352b;
  --st-cancelled: #79808c;
  --st-skipped: #79808c;

  --shadow-1: 0 1px 2px rgba(20, 22, 26, 0.04);
  --shadow-2: 0 18px 44px rgba(20, 22, 26, 0.12);
  --shadow-3: 0 -12px 40px rgba(20, 22, 26, 0.14);

  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --r-pill: 999px;

  /* Spacing steps. Screens read as calm mostly because of how much room the
     blocks are given, so the scale is coarse on purpose. */
  --s-1: 6px;
  --s-2: 10px;
  --s-3: 16px;
  --s-4: 24px;
  --s-5: 36px;

  --tap: 44px;
  --sidebar-w: 252px;
  --maxw: 1180px;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, "Noto Sans", sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d0f12;
    --surface: #15181d;
    --surface-2: #1d2127;
    --surface-3: #272c34;
    --text: #f2f4f7;
    --text-2: #c2c8d2;
    --muted: #89909d;
    --border: #232830;
    --border-strong: #343a45;
    --accent: #8b90ff;
    --accent-soft: rgba(139, 144, 255, 0.14);
    --accent-contrast: #0d0f12;
    --danger: #f4776b;
    --danger-soft: rgba(244, 119, 107, 0.13);

    --st-paid: #3ecf7c;
    --st-upcoming: #6aa8ff;
    --st-due: #f5b53d;
    --st-overdue: #f4776b;
    --st-cancelled: #98a0ad;
    --st-skipped: #98a0ad;

    --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.5);
    --shadow-2: 0 22px 50px rgba(0, 0, 0, 0.55);
    --shadow-3: 0 -14px 44px rgba(0, 0, 0, 0.6);
  }
}

:root[data-theme="dark"] {
  --bg: #0d0f12;
  --surface: #15181d;
  --surface-2: #1d2127;
  --surface-3: #272c34;
  --text: #f2f4f7;
  --text-2: #c2c8d2;
  --muted: #89909d;
  --border: #232830;
  --border-strong: #343a45;
  --accent: #8b90ff;
  --accent-soft: rgba(139, 144, 255, 0.14);
  --accent-contrast: #0d0f12;
  --danger: #f4776b;
  --danger-soft: rgba(244, 119, 107, 0.13);

  --st-paid: #3ecf7c;
  --st-upcoming: #6aa8ff;
  --st-due: #f5b53d;
  --st-overdue: #f4776b;
  --st-cancelled: #98a0ad;
  --st-skipped: #98a0ad;

  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.5);
  --shadow-2: 0 22px 50px rgba(0, 0, 0, 0.55);
  --shadow-3: 0 -14px 44px rgba(0, 0, 0, 0.6);
}

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

/* Components below set an explicit `display`, which would otherwise win over
   the user-agent [hidden] rule and leave "hidden" nodes on screen. */
[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}

/* Size contrast does most of the work: a large, tightly tracked heading against
   a small, widely tracked label is what makes a screen read as composed rather
   than as a list of controls. */
h1, h2, h3, h4 {
  margin: 0;
  font-weight: 660;
  letter-spacing: -0.022em;
  line-height: 1.15;
}

h1 { font-size: 1.75rem; }
h2 { font-size: 1.15rem; }
h3 { font-size: 0.98rem; }

@media (min-width: 720px) {
  h1 { font-size: 2.1rem; }
}

/* Small caps label: "MUDDATI O'TGAN", "OUR SERVICES". */
.eyebrow {
  font-size: 11px;
  font-weight: 620;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

p { margin: 0 0 0.6em; }

a {
  color: var(--accent);
  text-decoration: none;
}

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

button {
  cursor: pointer;
}

ul, ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

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

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

.num {
  font-variant-numeric: tabular-nums;
}

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