/* ==========================================================================
   Scoraline Design System v2 — Core Tokens & Typography
   Clean borderless fintech hierarchy (Gazprombank + Banki.ru + FNS)
   Typography: TT Commons · Regular 400 body · Strict floor 15px
   ========================================================================== */

@font-face {
  font-family: "TT Commons";
  src: url("/account/assets/fonts/tt-commons/TTCommons-Regular.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "TT Commons";
  src: url("/account/assets/fonts/tt-commons/TTCommons-Medium.woff") format("woff");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "TT Commons";
  src: url("/account/assets/fonts/tt-commons/TTCommons-DemiBold.woff") format("woff");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "TT Commons";
  src: url("/account/assets/fonts/tt-commons/TTCommons-DemiBold.woff") format("woff");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "TT Commons";
  src: url("/account/assets/fonts/tt-commons/TTCommons-Black.woff") format("woff");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

:root {
  /* ── Brand & Core Neutrals (WCAG AA/AAA) ───────────────────────────────── */
  --sw-brand: #C01E1E;
  --sw-brand-hover: #A31616;
  --sw-brand-vivid: #E40211;
  --sw-brand-bg: #FDEEEE;
  --sw-brand-tint: rgba(192, 30, 30, 0.085);

  --sw-ink: #11161D;
  --sw-ink-2: #333D4B;
  --sw-ink-3: #556070;
  --sw-ink-inv: #FFFFFF;

  --sw-canvas: #F3F5F8;
  --sw-surface: #FFFFFF;
  --sw-surface-2: #EDF1F6;
  --sw-surface-3: #E3E9F1;
  --sw-surface-hover: #F7F9FC;

  /* Subtle internal hairlines ONLY (for table rows & list dividers, never card borders) */
  --sw-divider: rgba(17, 22, 29, 0.07);
  --sw-divider-strong: rgba(17, 22, 29, 0.12);

  /* ── Semantic Status Tokens (AA+ text on soft borderless fills) ────────── */
  --sw-ok: #167936;
  --sw-ok-vivid: #1FA34A;
  --sw-ok-bg: #E9F7EE;

  --sw-info: #0A60C2;
  --sw-info-vivid: #1D72E8;
  --sw-info-bg: #EBF3FF;

  --sw-warn: #945B00;
  --sw-warn-vivid: #D97706;
  --sw-warn-bg: #FFF5DF;

  --sw-err: #B51A1A;
  --sw-err-vivid: #DC2626;
  --sw-err-bg: #FDEEEE;

  --sw-ai: #6336B8;
  --sw-ai-vivid: #7C3AED;
  --sw-ai-bg: #F3EDFD;

  /* ── Typography Scale (TT Commons · Strict floor: 15px · Body weight 400) */
  --sw-font: "TT Commons", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --sw-mono: ui-monospace, "SF Mono", Menlo, Monaco, Consolas, monospace;

  --fs-xs: 15px;
  --fs-sm: 15px;
  --fs-base: 16px;
  --fs-md: 18px;
  --fs-lg: 22px;
  --fs-xl: 28px;
  --fs-kpi: 32px;

  --lh-xs: 1.4;
  --lh-sm: 1.45;
  --lh-base: 1.5;
  --lh-md: 1.35;
  --lh-lg: 1.25;
  --lh-xl: 1.2;
  --lh-kpi: 1.1;

  /* ── Radii & Soft Surface Elevation ────────────────────────────────────── */
  --r-xs: 10px;
  --r-sm: 12px;
  --r-md: 16px;
  --r-lg: 20px;
  --r-xl: 24px;
  --r-pill: 999px;

  --shadow-xs: 0 1px 3px rgba(17, 22, 29, 0.035);
  --shadow-sm: 0 2px 10px rgba(17, 22, 29, 0.04);
  --shadow-md: 0 10px 28px rgba(17, 22, 29, 0.07);
  --shadow-lg: 0 28px 64px rgba(17, 22, 29, 0.22), 0 8px 20px rgba(17, 22, 29, 0.08);

  --focus-ring: 0 0 0 2.5px rgba(192, 30, 30, 0.26);

  /* ── Layout Dimensions ─────────────────────────────────────────────────── */
  --sw-sidebar-w: 268px;
  --sw-topbar-h: 68px;
  --sw-max-w: 1480px;

  /* ── Backward-Compatible Aliases ───────────────────────────────────────── */
  --bg: var(--sw-canvas);
  --panel: var(--sw-surface);
  --panel2: var(--sw-surface-2);
  --border: var(--sw-divider);
  --border-strong: var(--sw-divider-strong);
  --fg: var(--sw-ink);
  --fg-2: var(--sw-ink-2);
  --mut: var(--sw-ink-3);
  --red: var(--sw-brand);
  --red-hover: var(--sw-brand-hover);
  --red-tint: var(--sw-brand-tint);
  --grn: var(--sw-ok);
  --amb: var(--sw-warn);
  --blu: var(--sw-info);
  --font: var(--sw-font);
  --mono: var(--sw-mono);
}

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

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

body {
  margin: 0;
  background: var(--sw-canvas);
  color: var(--sw-ink);
  font-family: var(--sw-font);
  font-size: var(--fs-base);
  font-weight: 400;
  line-height: var(--lh-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
h4,
h5,
h6,
b,
strong {
  font-weight: 600;
}

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

a:hover {
  color: var(--sw-brand);
  text-decoration: underline;
  text-underline-offset: 3px;
}

code {
  background: transparent;
  color: inherit;
  border: 0;
  padding: 0;
  border-radius: 0;
  font-size: inherit;
  font-weight: inherit;
  font-family: var(--sw-font);
  font-variant-numeric: tabular-nums lining-nums;
}

.gone {
  display: none !important;
}

.sp {
  flex: 1;
}

.dim,
.mut {
  color: var(--sw-ink-3);
  font-size: var(--fs-sm);
  font-weight: 400;
  line-height: var(--lh-sm);
}

.hi {
  color: var(--sw-err);
  font-weight: 600;
}

.ok {
  color: var(--sw-ok);
  font-weight: 400;
}

.amb {
  color: var(--sw-warn);
  font-weight: 400;
}

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

.sw-mono {
  font-family: var(--sw-font);
  font-size: var(--fs-xs);
  font-variant-numeric: tabular-nums lining-nums;
}

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