/* Design tokens. Every color, size and font in the app comes from here. */
@font-face {
  font-family: 'DM Sans';
  font-weight: 100 1000;
  font-display: swap;
  src: url('../fonts/dm-sans-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'DM Sans';
  font-weight: 100 1000;
  font-display: swap;
  src: url('../fonts/dm-sans-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face { font-family: 'Gelasio'; font-weight: 400; font-display: swap; src: url('../fonts/gelasio-400.woff2') format('woff2'); }
@font-face { font-family: 'Gelasio'; font-weight: 700; font-display: swap; src: url('../fonts/gelasio-700.woff2') format('woff2'); }

:root {
  color-scheme: light;

  /* Palette */
  --bg: #FAF9F6;
  --surface: #FFFEFB;
  --surface-muted: #E8E8E2;
  --line: #E8E8E2;
  --line-strong: #D9DBD6;
  --ink: #152438;
  --ink-soft: #2B3A4D;
  --muted: #788293;
  --placeholder: #858E9D;
  --primary: #4A6554;
  --primary-ink: #FFFFFF;
  --primary-hover: #405A4A;
  --primary-disabled: #9BAEA1;
  --green-50: #EBF0E9;
  --green-100: #DEE6DB;
  --danger: #A93A40;
  --danger-bg: #F9E9E9;
  --overlay: rgba(84, 92, 86, 0.42);
  --night: #192C36;
  --moon: #F3EDDD;

  /* Type */
  --font-serif: Georgia, 'Gelasio', 'Times New Roman', serif;
  --font-sans: 'DM Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --fs-xs: 11px;
  --fs-sm: 12px;
  --fs-md: 13px;
  --fs-base: 14px;
  --fs-input: 16px;
  --fs-title: 24px;
  --fs-display: 32px;

  /* Shape and spacing */
  --gutter: 22px;
  --radius-sm: 8px;
  --radius: 10px;
  --radius-lg: 14px;
  --radius-xl: 18px;
  --control-h: 44px;
  --tabbar-h: 68px;
  --shadow-card: 0 1px 2px rgba(21, 36, 56, 0.04);
  --shadow-modal: 0 18px 50px rgba(21, 36, 56, 0.18);
  /* Capacitor (SystemBars) injects --safe-area-inset-* with the inset the web content really needs: 0 when Android already padded the WebView natively, so env() is only the fallback. */
  --safe-top: var(--safe-area-inset-top, env(safe-area-inset-top, 0px));
  --safe-bottom: var(--safe-area-inset-bottom, env(safe-area-inset-bottom, 0px));
  --ease: cubic-bezier(.2, .7, .2, 1);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0F1A20;
  --surface: #15232B;
  --surface-muted: #1E2E37;
  --line: #233540;
  --line-strong: #2E4250;
  --ink: #EEF1EC;
  --ink-soft: #D5DCD6;
  --muted: #9AA6AE;
  --placeholder: #7F8B93;
  --primary: #5C7D68;
  --primary-hover: #6A8C76;
  --primary-disabled: #3C4F44;
  --green-50: #1A2C27;
  --green-100: #22382F;
  --danger: #E58A8F;
  --danger-bg: #3A1F23;
  --overlay: rgba(4, 10, 14, 0.6);
}
