/*
 * Curs valutar, base styles: tokens, fonts, reset, typography, grid, header, footer, app block, menu sheet,
 * buttons and links. Spec: docs/web-spec.md sections 2, 3, 4.1, 4.2, 4.5, 4.8 and docs/app-spec.md section 2.
 *
 * Colors exist only as custom properties in the token blocks below. Everything else, here and in
 * components.css and pages/*.css, uses var(--token), never a raw color value.
 */

/* ======================================================================================================== */
/* Tokens                                                                                                   */
/* ======================================================================================================== */

/* tokens:start */
:root {
  /* Same in both themes (app-spec 2: the cobalt block stays #1F44E0 in dark). */
  --surface-hero: #1F44E0;
  --on-hero: #FFFFFF;
  --on-hero-label: rgba(255, 255, 255, 0.82);
  --on-hero-note: rgba(255, 255, 255, 0.88);
  --on-hero-computed: rgba(255, 255, 255, 0.72);
  --hero-control: rgba(255, 255, 255, 0.16);
  --hero-control-hover: rgba(255, 255, 255, 0.24);
  --hero-control-pressed: rgba(255, 255, 255, 0.32);
  --hero-divider: rgba(255, 255, 255, 0.28);
  --swap-surface: #FFFFFF;
  --swap-icon: #1F44E0;
  --on-accent: #FFFFFF;
  --focus-ring-hero: #FFFFFF;
  --flag-blue: #3B66F5;
  --flag-gold: #FFD43B;
  --flag-red: #D7263D;
  --shadow-swap: 0 6px 16px rgba(10, 20, 80, 0.25);
  --shadow-segment: 0 1px 3px rgba(10, 20, 80, 0.12);
  --shadow-sheet: 0 -8px 24px rgba(10, 20, 80, 0.12);
  --store-badge: #000000; /* official store badges are black in both themes (W08 adds a border in dark) */
  --on-store-badge: #FFFFFF;

  /* Light theme. */
  --bg: #FFFFFF;
  --sheet: #FFFFFF;
  --ink: #121520;
  --text-secondary: #5F6475;
  --surface-muted: #EEF1F8;
  --on-surface-muted: #1F2433;
  --segment-selected: #FFFFFF;
  --accent: #1F44E0;
  --accent-pressed: #1633B0;
  --accent-text: #1F44E0;
  --accent-text-pressed: #1633B0;
  --tab-inactive: #3B4050;
  --glass: rgba(255, 255, 255, 0.74);
  --glass-opaque: #FFFFFF;
  --glass-border: rgba(18, 21, 32, 0.08);
  --shadow-nav: rgba(10, 20, 80, 0.16);
  --warn-surface: #FFF1C2;
  --on-warn: #5A4300;
  --danger: #C81E34;
  --scrim: rgba(10, 20, 80, 0.4);
  --grabber: #D3D6DE;
  /* Web additions (web-spec 2). */
  --line: #EEF1F8;
  --row-hover: #EEF1F8;
  --focus-ring: #1F44E0;
  --tooltip-bg: #121520;
  --tooltip-text: #FFFFFF;
  --chart-line: #1F44E0;
  --footer-bg: #EEF1F8;
  /* Web additions taken from the artboards (W01, W03, W08). */
  --sheet-border: #EEF1F8; /* 1 px border of the bank list sheet; none in dark */
  --footer-line: #D3D6DE; /* line above the bottom row of the footer */
  --footer-segment: #FFFFFF; /* theme switch track on footer-bg */
  --footer-segment-selected: #EEF1F8; /* selected theme on that track */
  --phone-frame: #121520; /* phone bezel in the app block */
  --surface-muted-hover: #E3E8F6; /* hover of surface-muted tiles (W03 "Alte valute"); dark value derived */
  --store-badge-border: transparent;

  color-scheme: light;
}

:root[data-theme='dark'] {
  --bg: #0B0D14;
  --sheet: #121520;
  --ink: #EEF1F8;
  --text-secondary: #9AA0B0;
  --surface-muted: #1F2433;
  --on-surface-muted: #EEF1F8;
  --segment-selected: #3B4050;
  --accent: #3B66F5;
  --accent-pressed: #1F44E0;
  --accent-text: #879EFF;
  --accent-text-pressed: #B3C1FF;
  --tab-inactive: #D3D6DE;
  --glass: rgba(31, 36, 51, 0.74);
  --glass-opaque: #1C202E;
  --glass-border: rgba(238, 241, 248, 0.12);
  --shadow-nav: rgba(0, 0, 0, 0.4);
  --warn-surface: #3A2F0B;
  --on-warn: #FFD978;
  --danger: #FF8A94;
  --scrim: rgba(0, 0, 0, 0.6);
  --grabber: #3B4050;
  --line: #1F2433;
  --row-hover: #1F2433;
  --focus-ring: #879EFF;
  --tooltip-bg: #EEF1F8;
  --tooltip-text: #121520;
  --chart-line: #879EFF;
  --footer-bg: #121520;
  --sheet-border: transparent;
  --footer-line: #1F2433;
  --footer-segment: #1F2433;
  --footer-segment-selected: #3B4050;
  --phone-frame: #0B0D14;
  --surface-muted-hover: #262C3D;
  --store-badge-border: #3B4050;

  color-scheme: dark;
}

/* Theme "Automată": the same dark values when the system is dark. Keep identical to the block above (a test checks). */
@media (prefers-color-scheme: dark) {
  :root[data-theme='auto'] {
    --bg: #0B0D14;
    --sheet: #121520;
    --ink: #EEF1F8;
    --text-secondary: #9AA0B0;
    --surface-muted: #1F2433;
    --on-surface-muted: #EEF1F8;
    --segment-selected: #3B4050;
    --accent: #3B66F5;
    --accent-pressed: #1F44E0;
    --accent-text: #879EFF;
    --accent-text-pressed: #B3C1FF;
    --tab-inactive: #D3D6DE;
    --glass: rgba(31, 36, 51, 0.74);
    --glass-opaque: #1C202E;
    --glass-border: rgba(238, 241, 248, 0.12);
    --shadow-nav: rgba(0, 0, 0, 0.4);
    --warn-surface: #3A2F0B;
    --on-warn: #FFD978;
    --danger: #FF8A94;
    --scrim: rgba(0, 0, 0, 0.6);
    --grabber: #3B4050;
    --line: #1F2433;
    --row-hover: #1F2433;
    --focus-ring: #879EFF;
    --tooltip-bg: #EEF1F8;
    --tooltip-text: #121520;
    --chart-line: #879EFF;
    --footer-bg: #121520;
    --sheet-border: transparent;
    --footer-line: #1F2433;
    --footer-segment: #1F2433;
    --footer-segment-selected: #3B4050;
    --phone-frame: #0B0D14;
    --surface-muted-hover: #262C3D;
    --store-badge-border: #3B4050;

    color-scheme: dark;
  }
}
/* tokens:end */

/* Layout and motion values (not colors). */
:root {
  --font: 'Onest', 'Onest Fallback', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --container: 1200px;
  --page-margin: 32px; /* 1024 and wider; at 1440 the auto margin adds up to 120 (web-spec 3) */
  --grid-columns: 12;
  --grid-gap: 24px;
  --section-gap: 64px;
  --radius-card: 32px;
  --transition: 120ms ease-out;
  --focus-color: var(--focus-ring);
  /* Pressed accent button: accent-pressed 8% darker (spec 4.8). */
  --accent-active: color-mix(in srgb, var(--accent-pressed) 92%, #000000);
}

@media (max-width: 1023px) {
  :root {
    --page-margin: 24px;
    --grid-columns: 8;
    --grid-gap: 16px;
  }
}

@media (max-width: 767px) {
  :root {
    --page-margin: 16px;
    --grid-columns: 4;
    --grid-gap: 16px;
    --section-gap: 40px;
  }
}

/* ======================================================================================================== */
/* Fonts                                                                                                    */
/* ======================================================================================================== */

/* fonts:start (generated by scripts/assets/fonts.py) */
@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/onest-400-latin.woff2') format('woff2');
  unicode-range: U+000D, U+0020-007E, U+00A0-00A3, U+00A5, U+00A7-00AB, U+00AE-00B4, U+00B6-00FF, U+0102-0103, U+0131, U+0152-0153, U+015E-015F, U+0162-0163, U+0218-021B, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2009, U+2013-2014, U+2018-201A, U+201C-201E, U+2022, U+2026, U+202F-2030, U+2039-203A, U+2044, U+20AC, U+2122, U+2190-2193, U+2196-2199, U+2212, U+2248, U+2260, U+2264-2265;
}
@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/onest-400-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-0101, U+0104-0130, U+0132-0151, U+0154-015D, U+0160-0161, U+0164-017F, U+0181, U+0186-018A, U+018E-0194, U+0196-0199, U+019D, U+01A0-01A1, U+01A4-01A5, U+01AC-01AD, U+01AF-01B0, U+01B2-01B4, U+01B7, U+01CD-01DD, U+01E6-01E7, U+01F0, U+01F8-01F9, U+0237, U+0244-0245, U+024C-024D, U+0259, U+0300-0303, U+0306-0307, U+0309-030C, U+0312, U+031B, U+0323, U+0326-0328, U+0331, U+1E04-1E05, U+1E0C-1E0D, U+1E24-1E25, U+1E32-1E3B, U+1E3E-1E3F, U+1E42-1E47, U+1E56-1E57, U+1E5A-1E5D, U+1E62-1E63, U+1E6C-1E6D, U+1E80-1E85, U+1E90-1E93, U+1E9E, U+1EA0-1EF9, U+20B4, U+20B8, U+20BA, U+20BC-20BD, U+2153-215E, U+A78B-A78C;
}
@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/onest-400-cyrillic.woff2') format('woff2');
  unicode-range: U+0401-040C, U+040E-044F, U+0451-045C, U+045E-045F, U+0490-049D, U+04A0-04A5, U+04AA-04AB, U+04AE-04B3, U+04B6-04BB, U+04C0-04C2, U+04CF-04D9, U+04DC-04DF, U+04E2-04EB, U+04EE-04F5, U+2116;
}
@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/assets/fonts/onest-500-latin.woff2') format('woff2');
  unicode-range: U+000D, U+0020-007E, U+00A0-00A3, U+00A5, U+00A7-00AB, U+00AE-00B4, U+00B6-00FF, U+0102-0103, U+0131, U+0152-0153, U+015E-015F, U+0162-0163, U+0218-021B, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2009, U+2013-2014, U+2018-201A, U+201C-201E, U+2022, U+2026, U+202F-2030, U+2039-203A, U+2044, U+20AC, U+2122, U+2190-2193, U+2196-2199, U+2212, U+2248, U+2260, U+2264-2265;
}
@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/assets/fonts/onest-500-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-0101, U+0104-0130, U+0132-0151, U+0154-015D, U+0160-0161, U+0164-017F, U+0181, U+0186-018A, U+018E-0194, U+0196-0199, U+019D, U+01A0-01A1, U+01A4-01A5, U+01AC-01AD, U+01AF-01B0, U+01B2-01B4, U+01B7, U+01CD-01DD, U+01E6-01E7, U+01F0, U+01F8-01F9, U+0237, U+0244-0245, U+024C-024D, U+0259, U+0300-0303, U+0306-0307, U+0309-030C, U+0312, U+031B, U+0323, U+0326-0328, U+0331, U+1E04-1E05, U+1E0C-1E0D, U+1E24-1E25, U+1E32-1E3B, U+1E3E-1E3F, U+1E42-1E47, U+1E56-1E57, U+1E5A-1E5D, U+1E62-1E63, U+1E6C-1E6D, U+1E80-1E85, U+1E90-1E93, U+1E9E, U+1EA0-1EF9, U+20B4, U+20B8, U+20BA, U+20BC-20BD, U+2153-215E, U+A78B-A78C;
}
@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/assets/fonts/onest-500-cyrillic.woff2') format('woff2');
  unicode-range: U+0401-040C, U+040E-044F, U+0451-045C, U+045E-045F, U+0490-049D, U+04A0-04A5, U+04AA-04AB, U+04AE-04B3, U+04B6-04BB, U+04C0-04C2, U+04CF-04D9, U+04DC-04DF, U+04E2-04EB, U+04EE-04F5, U+2116;
}
@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/assets/fonts/onest-600-latin.woff2') format('woff2');
  unicode-range: U+000D, U+0020-007E, U+00A0-00A3, U+00A5, U+00A7-00AB, U+00AE-00B4, U+00B6-00FF, U+0102-0103, U+0131, U+0152-0153, U+015E-015F, U+0162-0163, U+0218-021B, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2009, U+2013-2014, U+2018-201A, U+201C-201E, U+2022, U+2026, U+202F-2030, U+2039-203A, U+2044, U+20AC, U+2122, U+2190-2193, U+2196-2199, U+2212, U+2248, U+2260, U+2264-2265;
}
@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/assets/fonts/onest-600-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-0101, U+0104-0130, U+0132-0151, U+0154-015D, U+0160-0161, U+0164-017F, U+0181, U+0186-018A, U+018E-0194, U+0196-0199, U+019D, U+01A0-01A1, U+01A4-01A5, U+01AC-01AD, U+01AF-01B0, U+01B2-01B4, U+01B7, U+01CD-01DD, U+01E6-01E7, U+01F0, U+01F8-01F9, U+0237, U+0244-0245, U+024C-024D, U+0259, U+0300-0303, U+0306-0307, U+0309-030C, U+0312, U+031B, U+0323, U+0326-0328, U+0331, U+1E04-1E05, U+1E0C-1E0D, U+1E24-1E25, U+1E32-1E3B, U+1E3E-1E3F, U+1E42-1E47, U+1E56-1E57, U+1E5A-1E5D, U+1E62-1E63, U+1E6C-1E6D, U+1E80-1E85, U+1E90-1E93, U+1E9E, U+1EA0-1EF9, U+20B4, U+20B8, U+20BA, U+20BC-20BD, U+2153-215E, U+A78B-A78C;
}
@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/assets/fonts/onest-600-cyrillic.woff2') format('woff2');
  unicode-range: U+0401-040C, U+040E-044F, U+0451-045C, U+045E-045F, U+0490-049D, U+04A0-04A5, U+04AA-04AB, U+04AE-04B3, U+04B6-04BB, U+04C0-04C2, U+04CF-04D9, U+04DC-04DF, U+04E2-04EB, U+04EE-04F5, U+2116;
}
@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/assets/fonts/onest-700-latin.woff2') format('woff2');
  unicode-range: U+000D, U+0020-007E, U+00A0-00A3, U+00A5, U+00A7-00AB, U+00AE-00B4, U+00B6-00FF, U+0102-0103, U+0131, U+0152-0153, U+015E-015F, U+0162-0163, U+0218-021B, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2009, U+2013-2014, U+2018-201A, U+201C-201E, U+2022, U+2026, U+202F-2030, U+2039-203A, U+2044, U+20AC, U+2122, U+2190-2193, U+2196-2199, U+2212, U+2248, U+2260, U+2264-2265;
}
@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/assets/fonts/onest-700-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-0101, U+0104-0130, U+0132-0151, U+0154-015D, U+0160-0161, U+0164-017F, U+0181, U+0186-018A, U+018E-0194, U+0196-0199, U+019D, U+01A0-01A1, U+01A4-01A5, U+01AC-01AD, U+01AF-01B0, U+01B2-01B4, U+01B7, U+01CD-01DD, U+01E6-01E7, U+01F0, U+01F8-01F9, U+0237, U+0244-0245, U+024C-024D, U+0259, U+0300-0303, U+0306-0307, U+0309-030C, U+0312, U+031B, U+0323, U+0326-0328, U+0331, U+1E04-1E05, U+1E0C-1E0D, U+1E24-1E25, U+1E32-1E3B, U+1E3E-1E3F, U+1E42-1E47, U+1E56-1E57, U+1E5A-1E5D, U+1E62-1E63, U+1E6C-1E6D, U+1E80-1E85, U+1E90-1E93, U+1E9E, U+1EA0-1EF9, U+20B4, U+20B8, U+20BA, U+20BC-20BD, U+2153-215E, U+A78B-A78C;
}
@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/assets/fonts/onest-700-cyrillic.woff2') format('woff2');
  unicode-range: U+0401-040C, U+040E-044F, U+0451-045C, U+045E-045F, U+0490-049D, U+04A0-04A5, U+04AA-04AB, U+04AE-04B3, U+04B6-04BB, U+04C0-04C2, U+04CF-04D9, U+04DC-04DF, U+04E2-04EB, U+04EE-04F5, U+2116;
}
@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('/assets/fonts/onest-800-latin.woff2') format('woff2');
  unicode-range: U+000D, U+0020-007E, U+00A0-00A3, U+00A5, U+00A7-00AB, U+00AE-00B4, U+00B6-00FF, U+0102-0103, U+0131, U+0152-0153, U+015E-015F, U+0162-0163, U+0218-021B, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2009, U+2013-2014, U+2018-201A, U+201C-201E, U+2022, U+2026, U+202F-2030, U+2039-203A, U+2044, U+20AC, U+2122, U+2190-2193, U+2196-2199, U+2212, U+2248, U+2260, U+2264-2265;
}
@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('/assets/fonts/onest-800-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-0101, U+0104-0130, U+0132-0151, U+0154-015D, U+0160-0161, U+0164-017F, U+0181, U+0186-018A, U+018E-0194, U+0196-0199, U+019D, U+01A0-01A1, U+01A4-01A5, U+01AC-01AD, U+01AF-01B0, U+01B2-01B4, U+01B7, U+01CD-01DD, U+01E6-01E7, U+01F0, U+01F8-01F9, U+0237, U+0244-0245, U+024C-024D, U+0259, U+0300-0303, U+0306-0307, U+0309-030C, U+0312, U+031B, U+0323, U+0326-0328, U+0331, U+1E04-1E05, U+1E0C-1E0D, U+1E24-1E25, U+1E32-1E3B, U+1E3E-1E3F, U+1E42-1E47, U+1E56-1E57, U+1E5A-1E5D, U+1E62-1E63, U+1E6C-1E6D, U+1E80-1E85, U+1E90-1E93, U+1E9E, U+1EA0-1EF9, U+20B4, U+20B8, U+20BA, U+20BC-20BD, U+2153-215E, U+A78B-A78C;
}
@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('/assets/fonts/onest-800-cyrillic.woff2') format('woff2');
  unicode-range: U+0401-040C, U+040E-044F, U+0451-045C, U+045E-045F, U+0490-049D, U+04A0-04A5, U+04AA-04AB, U+04AE-04B3, U+04B6-04BB, U+04C0-04C2, U+04CF-04D9, U+04DC-04DF, U+04E2-04EB, U+04EE-04F5, U+2116;
}
/* Arial scaled to Onest metrics: the swap to Onest does not move the text. */
@font-face {
  font-family: 'Onest Fallback';
  src: local('Arial'), local('ArialMT');
  size-adjust: 106.35%;
  ascent-override: 91.21%;
  descent-override: 28.68%;
  line-gap-override: 0.00%;
}
/* fonts:end */

/* ======================================================================================================== */
/* Reset and document                                                                                       */
/* ======================================================================================================== */

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

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

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 24px;
  font-weight: 400;
  /* Digits are always tabular (spec 2). */
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum' 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
h4,
h5,
h6,
p,
figure,
blockquote,
dl,
dd {
  margin: 0;
}

h1,
h2,
h3,
h4 {
  font-weight: 800;
}

/*
 * Lists with a class are UI lists; plain lists in running text keep their markers. :where() keeps this reset at zero
 * specificity, so the list's own class (.legal-list indent, .site-footer__links offset) always wins over it.
 */
:where(ul[class], ol[class]) {
  margin: 0;
  padding: 0;
  list-style: none;
}

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

svg {
  flex-shrink: 0;
}

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

button {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
}

a,
button,
summary,
select,
label[for],
[role='button'] {
  cursor: pointer;
}

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

/* Focus (spec 4.8): 2 px ring with offset 2. On cobalt areas --focus-color is the white focus-ring-hero. */
:focus-visible {
  outline: 2px solid var(--focus-color);
  outline-offset: 2px;
}

:focus:not(:focus-visible) {
  outline: none;
}

[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Spec 4.8: transitions 120 ms ease-out, none with reduced motion. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
}

/* ======================================================================================================== */
/* Typography (spec 2)                                                                                      */
/* ======================================================================================================== */

/* H1 of content pages: 40/800, mobile 28/800. */
.page-title {
  font-size: 40px;
  line-height: 48px;
  font-weight: 800;
  letter-spacing: -0.035em;
}

/* H2 of sections: 22/800. */
.section-title {
  font-size: 22px;
  line-height: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

/* Long text (legal pages): 17/400, line 28. */
.text-long {
  font-size: 17px;
  line-height: 28px;
}

/* SEO text, FAQ answers, paragraphs on a sheet: 15/400, line 24. */
.text-body {
  font-size: 15px;
  line-height: 24px;
}

/* Section label on a sheet: 13/700 ink. */
.label {
  font-size: 13px;
  line-height: 18px;
  font-weight: 700;
}

/* Secondary small text: 13/400 text-secondary. */
.note {
  font-size: 13px;
  line-height: 18px;
  color: var(--text-secondary);
}

/* Time stamp next to a title: 13/500 text-secondary. */
.stamp {
  font-size: 13px;
  line-height: 18px;
  font-weight: 500;
  color: var(--text-secondary);
}

@media (max-width: 767px) {
  .page-title {
    font-size: 28px;
    line-height: 34px;
  }
}

/* ======================================================================================================== */
/* Grid (spec 3)                                                                                            */
/* ======================================================================================================== */

/* Content width 1200, centered. Margins 32 / 24 / 16; at 1440 the auto margin gives 120. */
.container {
  width: 100%;
  max-width: calc(var(--container) + 2 * var(--page-margin));
  margin-inline: auto;
  padding-inline: var(--page-margin);
}

/* 12 columns of 78 (gap 24) from 1024, 8 columns (gap 16) from 768, 4 columns (gap 16) below. */
.grid {
  display: grid;
  grid-template-columns: repeat(var(--grid-columns), minmax(0, 1fr));
  column-gap: var(--grid-gap);
  align-items: start;
}

.span-3 { grid-column: span 3; }
.span-4 { grid-column: span 4; }
.span-5 { grid-column: span 5; }
.span-6 { grid-column: span 6; }
.span-7 { grid-column: span 7; }
.span-8 { grid-column: span 8; }
.span-12 { grid-column: 1 / -1; }

/* Below 1024 the columns stack (converter and list, panel halves, sidebars). */
@media (max-width: 1023px) {
  .span-3,
  .span-4,
  .span-5,
  .span-6,
  .span-7,
  .span-8 {
    grid-column: 1 / -1;
  }
}

/* Sticky column (converter card, TOC, contact card): only with two columns (spec 3: top 24). */
@media (min-width: 1024px) {
  .sticky-desktop {
    position: sticky;
    top: 24px;
  }
}

/* Vertical rhythm between page sections: 64 desktop, 40 mobile. */
.section {
  margin-top: var(--section-gap);
}

/* Full-bleed on phones: a cobalt block or a sheet that goes edge to edge below 768 (W02, W09). */
@media (max-width: 767px) {
  .bleed-mobile {
    margin-inline: calc(-1 * var(--page-margin));
    border-radius: 0;
  }
}

/* Cobalt surface (cards, panels, the mobile header): white text and the white focus ring. */
.surface-hero {
  background: var(--surface-hero);
  color: var(--on-hero);
  --focus-color: var(--focus-ring-hero);
}

/* Cobalt panel that opens content pages (web-spec 1.4, W03-W05): full container width, radius 32, padding 32.
   On phones it continues the cobalt header edge to edge. */
.panel-hero {
  padding: 32px;
  border-radius: var(--radius-card);
  background: var(--surface-hero);
  color: var(--on-hero);
  --focus-color: var(--focus-ring-hero);
}

@media (max-width: 767px) {
  .panel-hero {
    margin-inline: calc(-1 * var(--page-margin));
    padding: 12px var(--page-margin) 32px;
    border-radius: 0;
  }
}

/* ======================================================================================================== */
/* Buttons and links (spec 4.8)                                                                             */
/* ======================================================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 22px;
  font-size: 15px;
  line-height: 20px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color var(--transition), color var(--transition);
}

/* Main button: accent 52, radius 26, 17/700 (W07 "Scrie un e-mail"). */
.btn--accent {
  min-height: 52px;
  padding: 0 24px;
  border-radius: 26px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 17px;
  line-height: 22px;
}

.btn--accent:hover {
  background: var(--accent-pressed);
}

.btn--accent:active {
  background: var(--accent-active);
}

/* Text button 48: accent-text 15/600 (W07 "Copiază adresa"). */
.btn--text {
  min-height: 48px;
  padding: 0 12px;
  color: var(--accent-text);
  font-weight: 600;
}

.btn--text:hover,
.btn--text:active {
  color: var(--accent-text-pressed);
}

/* Pill or button on cobalt: hero-control fill (spec 4.8: hover .24, pressed .32). */
.btn--hero {
  background: var(--hero-control);
  color: var(--on-hero);
  --focus-color: var(--focus-ring-hero);
}

.btn--hero:hover {
  background: var(--hero-control-hover);
}

.btn--hero:active {
  background: var(--hero-control-pressed);
}

/* White button on cobalt with cobalt text (W09 "Mergi la curs valutar"). */
.btn--on-hero {
  min-height: 48px;
  border-radius: 24px;
  background: var(--on-hero);
  color: var(--surface-hero);
  --focus-color: var(--focus-ring-hero);
}

.btn--on-hero:hover {
  background: var(--on-hero-note);
}

.btn--on-hero:active {
  background: var(--on-hero-label);
}

.btn--block {
  display: flex;
  width: 100%;
}

/* Round icon button, 44. */
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: var(--text-secondary);
  transition: background-color var(--transition), color var(--transition);
}

.icon-btn:hover {
  background: var(--row-hover);
  color: var(--ink);
}

.icon-btn:active {
  background: var(--line);
}

/* Text link (spec 4.8): accent-text; hover and press accent-text-pressed with a 1 px underline, offset 3. */
.link {
  color: var(--accent-text);
  text-decoration: none;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: color var(--transition);
}

.link:hover,
.link:active {
  color: var(--accent-text-pressed);
  text-decoration-line: underline;
}

/* Link inside running text: always underlined (W06). */
.link--inline {
  text-decoration-line: underline;
}

/* Link in secondary text that keeps the text color (source lines). */
.link--quiet {
  color: inherit;
  text-decoration-line: underline;
}

/* ======================================================================================================== */
/* Skip link (spec 4.1)                                                                                     */
/* ======================================================================================================== */

.skip-link {
  position: absolute;
  left: 16px;
  top: -80px;
  z-index: 100;
  display: flex;
  align-items: center;
  height: 44px;
  padding: 0 16px;
  border-radius: 22px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 15px;
  line-height: 20px;
  font-weight: 700;
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
}

/* ======================================================================================================== */
/* Header (spec 4.1): desktop 72 on bg; below 1024 a menu button replaces the navigation; below 768 48 on cobalt */
/* ======================================================================================================== */

.site-header {
  background: var(--bg);
}

.site-header__bar {
  display: flex;
  align-items: center;
  height: 72px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--ink);
  font-size: 20px;
  line-height: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-decoration: none;
  white-space: nowrap;
}

.site-nav {
  display: flex;
  gap: 4px;
  margin-left: 48px;
}

.site-nav__link {
  position: relative;
  display: flex;
  align-items: center;
  height: 40px;
  padding: 0 16px;
  border-radius: 20px;
  color: var(--tab-inactive);
  font-size: 15px;
  line-height: 20px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color var(--transition), color var(--transition);
}

/* The item is 40 high; the hit area is 44. */
.site-nav__link::after {
  content: '';
  position: absolute;
  inset: -2px 0;
}

.site-nav__link:hover {
  background: var(--row-hover);
}

.site-nav__link:active {
  background: var(--line);
}

.site-nav__link[aria-current] {
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 700;
}

/* Two-position and three-position switches of the header and footer (spec 4.1, 4.2): track 36, radius 18,
   padding 2, items 32 with a 44 hit area. */
.lang-switch,
.theme-switch {
  display: flex;
  flex-shrink: 0;
  height: 36px;
  padding: 2px;
  border-radius: 18px;
  background: var(--surface-muted);
}

.lang-switch {
  margin-left: auto;
}

.lang-switch__item,
.theme-switch__item {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  margin: -6px 0;
  text-decoration: none;
}

.lang-switch__item > span,
.theme-switch__item > span {
  display: block;
  height: 32px;
  padding: 0 12px;
  border-radius: 16px;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 32px;
  font-weight: 600;
  white-space: nowrap;
  transition: background-color var(--transition), color var(--transition);
}

.lang-switch__item:hover > span,
.theme-switch__item:hover > span {
  color: var(--ink);
}

.lang-switch__item[aria-current] > span {
  background: var(--segment-selected);
  box-shadow: var(--shadow-segment);
  color: var(--ink);
  font-weight: 700;
}

/* Focus ring around the item, not the 44 hit area. */
.lang-switch__item:focus-visible,
.theme-switch__item:focus-visible {
  outline: none;
}

.lang-switch__item:focus-visible > span,
.theme-switch__item:focus-visible > span {
  outline: 2px solid var(--focus-color);
  outline-offset: 2px;
}

.menu-button {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-left: 8px;
  border-radius: 50%;
  background: var(--surface-muted);
  color: var(--ink);
  transition: background-color var(--transition);
}

.menu-button:hover {
  background: var(--row-hover);
}

@media (max-width: 1023px) {
  .site-nav {
    display: none;
  }

  .menu-button {
    display: inline-flex;
  }
}

@media (max-width: 767px) {
  .site-header {
    background: var(--surface-hero);
    color: var(--on-hero);
    --focus-color: var(--focus-ring-hero);
  }

  .site-header__bar {
    height: 48px;
    gap: 8px;
  }

  .site-header .wordmark {
    margin-right: auto;
    color: var(--on-hero);
    font-size: 17px;
    line-height: 22px;
  }

  .site-header .lang-switch {
    margin-left: 0;
    background: var(--hero-control);
  }

  .site-header .lang-switch__item > span {
    padding: 0 10px;
    color: var(--on-hero);
  }

  .site-header .lang-switch__item:hover > span {
    background: var(--hero-control-hover);
  }

  .site-header .lang-switch__item[aria-current] > span {
    background: var(--on-hero);
    box-shadow: none;
    color: var(--surface-hero);
  }

  .site-header .menu-button {
    margin-left: 0;
    background: var(--hero-control);
    color: var(--on-hero);
  }

  .site-header .menu-button:hover {
    background: var(--hero-control-hover);
  }

  .site-header .menu-button:active {
    background: var(--hero-control-pressed);
  }

  .skip-link:focus {
    top: 8px;
  }
}

/* ======================================================================================================== */
/* Main                                                                                                     */
/* ======================================================================================================== */

/* The main element is the 1200 container. Below 768 a cobalt block starts right under the cobalt header. */
.site-main {
  display: block;
  flex: 1 0 auto;
  padding-top: 24px;
}

.site-main:focus {
  outline: none;
}

@media (max-width: 767px) {
  .site-main {
    padding-top: 0;
  }
}

/* ======================================================================================================== */
/* App block (spec 4.5, W01, W02)                                                                           */
/* ======================================================================================================== */

.app-block {
  position: relative;
  height: 320px;
  margin-top: var(--section-gap);
  padding: 48px;
  overflow: hidden;
  border-radius: var(--radius-card);
  background: var(--surface-muted);
}

.app-block__text {
  position: relative;
  z-index: 1;
  max-width: 560px;
}

.app-block__title {
  font-size: 28px;
  line-height: 34px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.app-block__sub {
  margin-top: 8px;
  color: var(--text-secondary);
  font-size: 17px;
  line-height: 24px;
  font-weight: 500;
}

.app-block__soon {
  margin-top: 32px;
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 20px;
  font-weight: 600;
}

.app-block__badges {
  display: flex;
  gap: 8px;
  margin-top: 32px;
}

/* Placeholder store badge (spec 4.2: the official SVGs come with the brandbook). */
.store-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 144px;
  height: 48px;
  border: 1px solid var(--store-badge-border);
  border-radius: 8px;
  background: var(--store-badge);
  color: var(--on-store-badge);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}

/* Phone frame 260 with the E01 screen, cut by the bottom edge of the block. */
/* content-visibility: the screen picture is fetched only when the phone comes near the viewport (fixed size, so no
   layout shift). */
.app-block__phone {
  position: absolute;
  right: 96px;
  top: 40px;
  width: 260px;
  height: 540px;
  padding: 10px;
  border-radius: 44px;
  background: var(--phone-frame);
  content-visibility: auto;
  contain-intrinsic-size: 260px 540px;
}

/* The app's screen: E01 in the light theme, E05 in the dark one (W08); only the matching picture is downloaded.
   Linked by plain name like the fonts (immutable cache): give a regenerated picture a new file name. */
.app-block__screen {
  width: 240px;
  height: 520px;
  overflow: hidden;
  border-radius: 34px;
  background: var(--sheet) url('/assets/img/app-e01.webp') center top / 240px auto no-repeat;
}

:root[data-theme='dark'] .app-block__screen {
  background-image: url('/assets/img/app-e05-dark.webp');
}

@media (prefers-color-scheme: dark) {
  :root[data-theme='auto'] .app-block__screen {
    background-image: url('/assets/img/app-e05-dark.webp');
  }
}

@media (max-width: 1023px) {
  .app-block__text {
    max-width: calc(100% - 260px - 48px);
  }

  .app-block__phone {
    right: 48px;
  }
}

@media (max-width: 767px) {
  .app-block {
    height: auto;
    padding: 20px;
  }

  .app-block__text {
    max-width: none;
  }

  .app-block__title {
    font-size: 22px;
    line-height: 28px;
  }

  .app-block__soon,
  .app-block__badges {
    margin-top: 24px;
  }

  .app-block__badges {
    gap: 12px;
  }

  .app-block__badges .store-badge {
    flex: 1;
    width: auto;
    height: 52px;
  }

  .app-block__phone {
    display: none;
  }
}

/* ======================================================================================================== */
/* Footer (spec 4.2, W01, W02, W06)                                                                         */
/* ======================================================================================================== */

.site-footer {
  margin-top: 64px;
  padding: 64px 0 48px;
  border-radius: var(--radius-card) var(--radius-card) 0 0;
  background: var(--footer-bg);
  color: var(--ink);
}

.site-footer__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}

.site-footer .wordmark {
  min-height: 0;
}

.site-footer__text {
  margin-top: 8px;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 18px;
}

.site-footer__title {
  margin-bottom: 8px;
  font-size: 13px;
  line-height: 18px;
  font-weight: 700;
  letter-spacing: 0;
}

.site-footer__title + .site-footer__text {
  margin-top: 0;
}

.site-footer__text + .site-footer__text {
  margin-top: 4px;
}

/* Links 44 high; the first one starts 12 higher so its text lines up with the other columns. */
.site-footer__links {
  display: flex;
  flex-direction: column;
  margin-top: -12px;
}

.site-footer__links a,
.site-footer__links button {
  display: flex;
  align-items: center;
  height: 44px;
  font-size: 15px;
  line-height: 20px;
  font-weight: 600;
}

.site-footer__apps {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.site-footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--footer-line);
}

.site-footer__legal {
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 18px;
}

.site-footer__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 18px;
  font-weight: 500;
}

.site-footer__copy {
  margin-left: 12px;
}

/* Theme switch on footer-bg: the track and the selected item swap roles (W01, W08). */
.theme-switch {
  background: var(--footer-segment);
}

/* The selected item follows html[data-theme] before the script runs; aria-pressed follows after. */
:root[data-theme='auto'] .theme-switch__item[data-theme-value='auto'] > span,
:root[data-theme='light'] .theme-switch__item[data-theme-value='light'] > span,
:root[data-theme='dark'] .theme-switch__item[data-theme-value='dark'] > span {
  background: var(--footer-segment-selected);
  color: var(--ink);
  font-weight: 700;
}

@media (max-width: 1023px) {
  .site-footer__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 32px;
  }
}

@media (max-width: 767px) {
  .site-footer {
    margin-top: 40px;
    padding: 40px 0 32px;
  }

  .site-footer__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .site-footer__col + .site-footer__col {
    margin-top: 24px;
  }

  /* W02: links and store badges follow 16 below the sources. */
  .site-footer__col + .site-footer__col--links,
  .site-footer__col + .site-footer__col--apps {
    margin-top: 16px;
  }

  .site-footer__links {
    margin-top: 0;
  }

  .site-footer__links a,
  .site-footer__links button {
    height: 48px;
  }

  .site-footer__bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    margin-top: 24px;
  }

  .site-footer__meta {
    margin-top: 16px;
  }

  .site-footer__copy {
    flex-basis: 100%;
    margin-left: 0;
  }
}

/* ======================================================================================================== */
/* Menu sheet (spec 4.1 mobile): modal sheet with scrim, radius 32, grabber 36x5, rows 56                    */
/* ======================================================================================================== */

.menu-sheet {
  width: 100%;
  max-width: 100%;
  max-height: 100%;
  margin: auto 0 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  transform: translateY(100%);
  transition:
    transform 220ms cubic-bezier(0.32, 0, 0.67, 0),
    overlay 220ms allow-discrete,
    display 220ms allow-discrete;
}

.menu-sheet[open] {
  transform: none;
  transition:
    transform 320ms cubic-bezier(0.33, 1, 0.68, 1),
    overlay 320ms allow-discrete,
    display 320ms allow-discrete;
}

@starting-style {
  .menu-sheet[open] {
    transform: translateY(100%);
  }
}

.menu-sheet::backdrop {
  background: var(--scrim);
  opacity: 0;
  transition:
    opacity 220ms ease-in,
    overlay 220ms allow-discrete,
    display 220ms allow-discrete;
}

.menu-sheet[open]::backdrop {
  opacity: 1;
  transition:
    opacity 320ms ease-out,
    overlay 320ms allow-discrete,
    display 320ms allow-discrete;
}

@starting-style {
  .menu-sheet[open]::backdrop {
    opacity: 0;
  }
}

.menu-sheet__panel {
  padding: 0 16px max(16px, env(safe-area-inset-bottom));
  border-radius: var(--radius-card) var(--radius-card) 0 0;
  background: var(--sheet);
}

.menu-sheet__grabber {
  width: 36px;
  height: 5px;
  margin: 0 auto;
  border-radius: 3px;
  background: var(--grabber);
  transform: translateY(8px);
}

.menu-sheet__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 60px;
  padding-top: 13px;
}

.menu-sheet__title {
  font-size: 17px;
  line-height: 22px;
  font-weight: 700;
}

.menu-sheet__close {
  margin-right: -10px;
}

.menu-sheet__link {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 56px;
  margin: 0 -12px;
  padding: 0 12px;
  border-radius: 16px;
  color: var(--ink);
  font-size: 17px;
  line-height: 22px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color var(--transition);
}

.menu-sheet__link > span {
  flex-grow: 1;
}

.menu-sheet__link > svg {
  color: var(--text-secondary);
}

.menu-sheet__link:hover {
  background: var(--row-hover);
}

.menu-sheet__link:active {
  background: var(--line);
}

.menu-sheet__link[aria-current] {
  color: var(--accent-text);
  font-weight: 700;
}

/* No page scroll behind an open modal. */
html:has(.menu-sheet[open]) {
  overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
  .menu-sheet,
  .menu-sheet[open],
  .menu-sheet::backdrop,
  .menu-sheet[open]::backdrop {
    transition: none;
  }
}
