/* referalo v2.0 — Design Tokens (T-Bank Light/Dark)
 * Контракт v2.1, раздел 3
 * НЕ менять без согласования с контрактом.
 */

/* === 3.1 Цветовая система (T-Bank Light — default) === */
:root {
  --bg:            #FFFFFF;
  --bg-secondary:  #F5F6F7;
  --bg-tertiary:   #ECEEF0;
  --text:          #1C1F26;
  --text-muted:    #6F7785;
  --text-disabled: #B5BCC7;
  --border:        #E7E9EE;
  --accent:        #FFDD2D;
  --accent-hover:  #FFD000;
  --success:       #2D7C3E;
  --warning:       #D87C00;
  --danger:        #D02E2E;
  --info:          #0E6FE3;
  --shadow:        0 1px 3px rgba(0, 0, 0, 0.08);
}

/* === 3.1 Тёмная тема (prefers-color-scheme: dark) === */
@media (prefers-color-scheme: dark) {
  :root {
    --bg:            #0F1115;
    --bg-secondary:  #181B22;
    --bg-tertiary:   #232730;
    --text:          #F1F3F5;
    --text-muted:    #9098A8;
    --text-disabled: #5F6878;
    --border:        #2A2F3A;
    --accent:        #FFDD2D;
    --accent-hover:  #FFE558;
    --success:       #4DC465;
    --warning:       #FFB13E;
    --danger:        #FF5252;
    --info:          #4DA8FF;
    --shadow:        0 1px 3px rgba(0, 0, 0, 0.4);
  }
}

/* === 3.2 Типографика === */
:root {
  --font-family:        -apple-system, BlinkMacSystemFont, "SF Pro", system-ui, sans-serif;
  --font-size-xs:       12px;
  --font-size-sm:       14px;
  --font-size-md:       16px;
  --font-size-lg:       18px;
  --font-size-xl:       24px;
  --font-size-display:  32px;
  --line-height-tight:  1.2;
  --line-height-normal: 1.5;
  --font-weight-regular:  400;
  --font-weight-medium:   500;
  --font-weight-semibold: 600;
  --font-weight-bold:     700;
}

/* === 3.3 Отступы и сетка === */
:root {
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-8: 48px;
  --radius-sm:   6px;
  --radius-md:   12px;
  --radius-lg:   16px;
  --radius-full: 999px;
  --container-padding: var(--space-4);
  --container-max: 480px;
}

/* === 3.4 Тач-зоны === */
button,
a,
[role="button"] {
  min-height: 44px;
  min-width: 44px;
}

/* === 7.2 iOS auto-fill override === */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--text);
  -webkit-box-shadow: 0 0 0px 1000px var(--bg-secondary) inset;
  transition: background-color 5000s ease-in-out 0s;
}
