.ya-gallery-rail {
  position: fixed; z-index: 35; left: 0; top: 64px; bottom: 0; width: 76px;
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  background: var(--ya-surface, var(--card)); border-right: 1px solid var(--ya-line, var(--border)); padding: 14px 6px 20px;
}
.ya-gallery-rail a { width: 62px; min-height: 60px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; border-radius: 18px; color: #6c7b92; font-size: 10px; line-height: 1.2; transition: background .15s, color .15s; }
.ya-gallery-rail svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.ya-gallery-rail a:hover, .ya-gallery-rail a[aria-current="page"] { background: var(--ya-soft, var(--accent)); color: var(--ya-blue, var(--primary)); }
.ya-gallery-rail .ya-rail-doc { margin-top: auto; }
@media (max-width: 767px) {
  .ya-gallery-rail { top: auto; bottom: 0; right: 0; width: auto; height: calc(58px + env(safe-area-inset-bottom)); padding: 3px 6px env(safe-area-inset-bottom); border-right: 0; border-top: 1px solid var(--ya-line, var(--border)); flex-direction: row; justify-content: space-around; }
  .ya-gallery-rail a { min-height: 48px; height: 48px; width: 20%; max-width: 76px; gap: 3px; border-radius: 12px; font-size: 9px; }
  .ya-gallery-rail svg { width: 19px; height: 19px; }
  .ya-gallery-rail .ya-rail-doc { display: none; }
}

/* Shared YDATA AI visual language for the existing React application. */
:root {
  --background: #f6f8fd;
  --foreground: #192a45;
  --card: #ffffff;
  --card-foreground: #192a45;
  --popover: #ffffff;
  --popover-foreground: #192a45;
  --primary: #1765ff;
  --primary-foreground: #ffffff;
  --secondary: #edf3ff;
  --secondary-foreground: #2b528e;
  --muted: #f3f6fb;
  --muted-foreground: #72839b;
  --accent: #eaf1ff;
  --accent-foreground: #145ce5;
  --border: #e4eaf4;
  --input: #e0e7f1;
  --ring: #8db6ff;
  --sidebar: #f6f8fd;
  --sidebar-foreground: #4b607e;
  --sidebar-primary: #1765ff;
  --sidebar-primary-foreground: #ffffff;
  --sidebar-accent: #e5eeff;
  --sidebar-accent-foreground: #155ddc;
  --sidebar-border: #e3eaf5;
  --sidebar-ring: #8db6ff;
  --chart-1: #3479ff;
  --chart-2: #36b6e8;
  --chart-3: #8a7ff5;
  --chart-4: #52c4a6;
  --chart-5: #f3b469;
  --radius: 0.9rem;
  --font-ui-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
  --app-header-height: 64px;
  --font-body: var(--font-ui-sans);
}
html.dark {
  --background: #101929;
  --foreground: #e5edfc;
  --card: #162237;
  --card-foreground: #e5edfc;
  --popover: #1a2840;
  --popover-foreground: #e5edfc;
  --primary: #6196ff;
  --primary-foreground: #0c1930;
  --secondary: #233652;
  --secondary-foreground: #bed4fc;
  --muted: #1d2c43;
  --muted-foreground: #93a8c7;
  --accent: #263c60;
  --accent-foreground: #b8d1ff;
  --border: #2b3d57;
  --input: #324660;
  --ring: #6196ff;
  --sidebar: #111c2e;
  --sidebar-foreground: #abc0de;
  --sidebar-accent: #243b60;
  --sidebar-accent-foreground: #b9d2ff;
  --sidebar-border: #293a54;
}
body {
  color: var(--foreground);
  font-family: var(--font-ui-sans);
  -webkit-font-smoothing: antialiased;
}
[data-slot="sidebar-wrapper"] {
  --app-header-height: 64px;
  --sidebar-width: 236px;
  --sidebar-width-icon: 68px;
  background: var(--background);
}
[data-slot="sidebar-wrapper"] > header {
  height: 64px;
  background: var(--card);
  border-bottom: 1px solid var(--border);
}
[data-slot="sidebar-wrapper"] > header > div { padding-inline: 20px; gap: 12px; }
[data-slot="sidebar-wrapper"] > header a:has(img) { min-height: 40px; gap: 9px; font-size: 20px; font-weight: 780; letter-spacing: -.65px; padding-inline: 2px; }
[data-slot="sidebar-wrapper"] > header a:has(img) > div { width: 30px; height: 30px; border-radius: 0; }
[data-slot="sidebar-wrapper"] > header a:has(img) img { width: 30px; height: 30px; object-fit: contain; border-radius: 0; }
[data-slot="sidebar-wrapper"] > header nav a { color: var(--muted-foreground); font-size: 13px; }
[data-slot="sidebar-wrapper"] > header nav a:hover { color: var(--primary); }
[data-slot="sidebar-wrapper"] > header button:has(kbd) { min-width: 220px; height: 36px; border: 0; border-radius: 20px; background: var(--muted); }
[data-slot="sidebar-container"] { top: 64px; padding: 16px 10px 8px; }
[data-slot="sidebar-inner"] { border: 0; border-radius: 0; box-shadow: none; background: transparent; }
[data-slot="sidebar-group"] { padding: 6px 4px; }
[data-slot="sidebar-group-label"] { padding-left: 13px; color: #9ba9be; font-size: 10px; font-weight: 650; letter-spacing: 1px; }
[data-slot="sidebar-menu"] { gap: 3px; }
[data-slot="sidebar-menu-button"] { min-height: 38px; padding: 9px 12px; border-radius: 11px; gap: 10px; font-size: 13px; font-weight: 500; }
[data-slot="sidebar-menu-button"] > svg { width: 18px; height: 18px; }
[data-slot="sidebar-menu-button"][data-active="true"] {
  background: linear-gradient(110deg, #e0ebff, #ebf2ff);
  color: #155ee3;
  box-shadow: inset 0 0 0 1px #dae6fd;
  font-weight: 700;
}
.dark [data-slot="sidebar-menu-button"][data-active="true"] { background: #243d64; color: #bcd4ff; box-shadow: none; }
[data-slot="sidebar-menu-button"]:hover { background: var(--accent); color: var(--accent-foreground); }
[data-slot="sidebar-inset"] { border: 1px solid var(--border); border-radius: 22px; background: var(--card); box-shadow: 0 4px 24px #1b416104; margin: 16px 16px 16px 0; height: calc(100svh - 96px); }
[data-slot="sidebar-inset"] h2 { font-size: 22px; letter-spacing: -.6px; }
[data-slot="sidebar-inset"] > div > main > div:first-child { padding: 25px 25px 18px; border-bottom: 1px solid var(--border); }
[data-slot="sidebar-inset"] > div > main > div:nth-child(2) { padding-inline: 24px; padding-top: 20px; }
[data-slot="card"] { border-radius: 18px; border-color: var(--border); box-shadow: 0 3px 16px #17386204; }
[data-slot="card-header"] { padding: 22px; }
[data-slot="card-content"] { padding-inline: 22px; }
[data-slot="button"] { border-radius: 10px; font-weight: 600; }
[data-slot="button"][class~="bg-primary"] { box-shadow: 0 4px 12px #1765ff22; }
[data-slot="input"], [data-slot="select-trigger"], [data-slot="textarea"], [data-slot="input-group"] { border-radius: 10px; background-color: var(--card); border-color: var(--input); }
[data-slot="input"]:focus, [data-slot="textarea"]:focus { border-color: #7aa8ff; box-shadow: 0 0 0 3px #3479ff12; }
[data-slot="tabs-list"] { background: var(--muted); border-radius: 12px; padding: 4px; }
[data-slot="tabs-trigger"][data-active], [data-slot="tabs-trigger"][data-state="active"] { color: var(--primary); background: var(--card); border-radius: 9px; }
[data-slot="table-container"] { border-radius: 14px; border-color: var(--border); }
thead, [data-slot="table-header"] { background: var(--muted); }
th, [data-slot="table-head"] { color: var(--muted-foreground); font-size: 12px; font-weight: 600; height: 45px; }
td, [data-slot="table-cell"] { padding-block: 14px; border-color: var(--border); }
[data-slot="table-row"]:hover { background: color-mix(in srgb, var(--accent) 35%, transparent); }
[data-slot="dialog-content"], [data-slot="sheet-content"], [data-slot="popover-content"], [data-slot="dropdown-menu-content"], [data-slot="select-content"] { border-color: var(--border); border-radius: 16px; box-shadow: 0 20px 70px #152e4b1a; }
/* The overview keeps its current live metrics in coordinated blue surfaces. */
[data-slot="sidebar-inset"] [class*="xl:grid-cols-"][class*="19rem"] { border-radius: 18px; overflow: hidden; background: linear-gradient(120deg, var(--card), var(--muted)); }
[data-slot="sidebar-inset"] [class*="bg-amber-50"], [data-slot="sidebar-inset"] [class*="bg-yellow-50"] { background: linear-gradient(135deg, #edf4ff, #e5edff); color: #183f80; }
[data-slot="sidebar-inset"] [class*="bg-amber-50"] a, [data-slot="sidebar-inset"] [class*="bg-yellow-50"] a { background: #1765ff; color: white; }
.dark [data-slot="sidebar-inset"] [class*="bg-amber-50"], .dark [data-slot="sidebar-inset"] [class*="bg-yellow-50"] { background: #243755; color: #c9ddff; }
[data-slot="sidebar-inset"] [class*="xl:grid-cols-"][class*="19rem"] > [class*="bg-warning"] { background: linear-gradient(135deg, #edf4ff, #dfeaff); color: #193e80; border-color: #dce7fa; }
.dark [data-slot="sidebar-inset"] [class*="xl:grid-cols-"][class*="19rem"] > [class*="bg-warning"] { background: #243755; color: #c9ddff; border-color: #344e70; }
/* Auth pages share the homepage's grid, gradient, mark, and three-step cards. */
.ya-auth-layout { display: grid; grid-template-columns: minmax(400px, 1fr) minmax(440px, .95fr); min-height: 100svh; padding: 12px; gap: 12px; position: relative; background: var(--card); }
.ya-auth-brand { position: absolute; top: 52px; left: 54px; z-index: 2; display: inline-flex; align-items: center; }
.ya-auth-brand h1 { margin: 0; }
.ya-auth-brand img { display: block; width: auto; height: 36px; color-scheme: light; }
.dark .ya-auth-brand img { color-scheme: dark; }
.ya-auth-story { grid-column: 1; grid-row: 1; min-height: calc(100svh - 24px); padding: 155px 44px 40px; border: 1px solid #e9effa; border-radius: 30px; background: radial-gradient(ellipse at 85% 6%, #dceaff 0, transparent 43%), linear-gradient(#f7faff, #f5f8fc); display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.ya-auth-story::before { content: ""; position: absolute; inset: 0; pointer-events: none; background-image: linear-gradient(#4b83db06 1px, transparent 1px), linear-gradient(90deg, #4b83db06 1px, transparent 1px); background-size: 44px 44px; mask-image: linear-gradient(#000, transparent 85%); }
.ya-auth-copy { position: relative; margin-block: auto; padding-bottom: 60px; }
.ya-eyebrow { color: #698dbd; font-size: 10px; font-weight: 700; letter-spacing: 2px; }
.ya-auth-copy h2 { font-size: clamp(30px, 3.1vw, 47px); line-height: 1.3; font-weight: 760; letter-spacing: -1.6px; color: #152847; margin: 21px 0 18px; }
.ya-auth-copy > p { color: #6d83a4; font-size: 14px; line-height: 1.9; max-width: 380px; }
.ya-auth-copy ul { display: grid; gap: 12px; margin: 27px 0 0; list-style: none; padding: 0; color: #526d91; font-size: 13px; }
.ya-auth-copy li { position: relative; padding-left: 16px; }
.ya-auth-copy li::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: #3479ff; position: absolute; left: 0; top: .5em; }
.ya-auth-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; position: relative; }
.ya-auth-steps > div { padding: 17px 14px; border: 1px solid #e3ebf7; border-radius: 20px; background: #ffffffdf; }
.ya-step-art { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 14px; margin-bottom: 17px; color: #1765ff; background: linear-gradient(135deg, #eef5ff, #dce9ff); box-shadow: inset 0 0 0 1px #d4e3fe; }
.ya-step-art svg { width: 29px; height: 29px; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.ya-auth-steps strong { color: #243a5d; display: flex; align-items: center; gap: 7px; font-size: 11px; white-space: nowrap; font-weight: 650; }
.ya-auth-steps small { color: #1765ff; font-size: 10px; font-family: ui-monospace, monospace; }
.ya-auth-content { grid-column: 2; grid-row: 1; display: flex; align-items: center; justify-content: center; padding: 40px 30px; }
.ya-auth-form { width: 100%; max-width: 430px; padding: 24px 4px; margin: auto; }
.ya-auth-form h2 { font-size: 28px; text-align: left; letter-spacing: -.7px; color: var(--foreground); }
.ya-auth-form h2 + p { font-size: 14px; line-height: 1.8; }
.ya-auth-form p a { color: var(--primary); text-decoration: none; font-weight: 650; }
.ya-auth-form form { gap: 20px; }
.ya-auth-form [data-slot="form-item"] { gap: 9px; }
.ya-auth-form label { font-size: 13px; color: var(--foreground); font-weight: 600; }
.ya-auth-form input { height: 46px; padding-inline: 14px; border-radius: 11px; background: var(--muted); border: 1px solid var(--input); box-shadow: none; font-size: 14px; }
.ya-auth-form input::placeholder { color: #9aa8bc; }
.ya-auth-form button[type="submit"] { min-height: 46px; font-size: 14px; border-radius: 12px; background: #1765ff; color: white; box-shadow: 0 6px 16px #1765ff24; }
.ya-auth-form button[type="submit"]:hover { background: #1057e2; }
.ya-auth-form button:has(+ input) { min-height: 44px; }
.dark .ya-auth-story { background: radial-gradient(ellipse at 85% 6%, #253f68, transparent 60%), #152239; border-color: #293b58; }
.dark .ya-auth-copy h2, .dark .ya-auth-steps strong { color: #dfebff; }
.dark .ya-auth-copy > p, .dark .ya-auth-copy ul { color: #9eb6d8; }
.dark .ya-auth-steps > div { background: #1a2c46; border-color: #2d4262; }
.dark .ya-step-art { background: #263f64; color: #a9caff; box-shadow: none; }
@media (min-width: 1600px) {
  .ya-auth-story { padding-inline: 64px; }
  .ya-auth-brand { left: 76px; }
}
@media (max-width: 1050px) {
  .ya-auth-layout { grid-template-columns: minmax(340px, 1fr) minmax(380px, 1fr); }
  .ya-auth-story { padding-inline: 28px; }
  .ya-auth-brand { left: 40px; top: 42px; }
  .ya-auth-copy h2 { font-size: 34px; }
  .ya-auth-steps { gap: 7px; }
  .ya-auth-steps > div { padding: 12px 10px; }
  .ya-auth-content { padding-inline: 25px; }
}
@media (max-width: 767px) {
  [data-slot="sidebar-wrapper"] > header > div { padding-inline: 12px; gap: 7px; }
  [data-slot="sidebar-wrapper"] > header a:has(img) { font-size: 17px; }
  [data-slot="sidebar-wrapper"] > header button:has(kbd) { min-width: 0; width: 64px; flex: 0 0 64px; padding-inline: 7px; font-size: 12px; }
  [data-slot="sidebar-wrapper"] > header button:has(kbd) kbd { display: none; }
  [data-slot="sidebar-wrapper"] > header .ms-auto { min-width: 0; gap: 3px; }
  [data-slot="sidebar-inset"] { margin: 10px; border-radius: 17px; height: calc(100svh - 84px); }
  [data-slot="sidebar-inset"] > div > main > div:first-child { padding: 18px 16px 14px; }
  [data-slot="sidebar-inset"] > div > main > div:nth-child(2) { padding-inline: 14px; padding-top: 15px; }
  [data-slot="sidebar-inset"] h2 { font-size: 20px; }
  .ya-auth-layout { display: flex; flex-direction: column; padding: 10px; gap: 0; min-height: 100svh; }
  .ya-auth-brand { top: 28px; left: 29px; }
  .ya-auth-brand img { height: 30px; }
  .ya-auth-story { min-height: 0; padding: 86px 22px 22px; border-radius: 24px; }
  .ya-auth-copy { padding-bottom: 20px; }
  .ya-eyebrow { font-size: 8px; letter-spacing: 1.2px; }
  .ya-auth-copy h2 { font-size: 29px; line-height: 1.28; margin: 13px 0 10px; letter-spacing: -.8px; }
  .ya-auth-copy h2 br { display: none; }
  .ya-auth-copy > p { font-size: 12px; }
  .ya-auth-copy ul { display: none; }
  .ya-auth-steps > div { padding: 10px; border-radius: 13px; display: flex; align-items: center; gap: 6px; }
  .ya-step-art { width: 24px; height: 26px; border-radius: 7px; margin: 0; box-shadow: none; flex: 0 0 24px; }
  .ya-step-art svg { width: 20px; height: 20px; }
  .ya-auth-steps strong { gap: 4px; font-size: 10px; }
  .ya-auth-steps small { display: none; }
  .ya-auth-content { padding: 27px 15px 20px; }
  .ya-auth-form { max-width: 430px; padding: 0; }
  .ya-auth-form h2 { font-size: 24px; }
}
@media (max-width: 359px) {
  [data-slot="sidebar-wrapper"] > header a:has(img) { font-size: 15px; }
  [data-slot="sidebar-wrapper"] > header button:has(kbd) { width: 32px; flex-basis: 32px; font-size: 0; padding-inline: 7px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
/* Public model and ranking pages use the same fixed site navigation as the home. */
.ya-public-layout { min-height: 100svh; background: var(--background); color: var(--foreground); }
.ya-public-layout > header { height: 64px; background: var(--card); border-bottom: 1px solid var(--border); }
.ya-public-layout > header > div { max-width: none; padding: 0 22px; height: 64px; }
.ya-public-layout > header nav { height: 64px; border: 0; border-radius: 0; background: var(--card); box-shadow: none; padding: 0; }
.ya-public-layout > header a[href="/pricing"],
.ya-public-layout > header a[href="/rankings"],
.ya-public-layout > header a[href="/dashboard"],
.ya-public-layout > header a[href="/"]:not(:has(img)) { display: none; }
.ya-public-layout > header a:has(img) { font-size: 20px; font-weight: 780; gap: 9px; letter-spacing: -.6px; }
.ya-public-layout > header a:has(img) span { font-size: inherit; font-weight: inherit; }
.ya-public-layout > header a:has(img) img { width: 32px; height: 32px; object-fit: contain; }
.ya-public-layout > main { width: calc(100% - 76px); margin-left: 76px; max-width: none; padding: 92px 28px 35px; }
.ya-public-layout[data-page="pricing"] .ya-gallery-rail a[href="/pricing"],
.ya-public-layout[data-page="rankings"] .ya-gallery-rail a[href="/rankings"] { background: var(--accent); color: var(--primary); }
.ya-public-layout h1 { color: var(--foreground); letter-spacing: -1px; }
@media (max-width: 767px) {
  .ya-public-layout > header > div { padding-inline: 14px; }
  .ya-public-layout > header a:has(img) { font-size: 18px; }
  .ya-public-layout > main { margin-left: 0; width: 100%; padding: 84px 14px 84px; }
}
.ya-public-layout > div:last-child:not(:first-child) { width: calc(100% - 76px); max-width: none; margin-left: 76px; padding-inline: 28px; }
@media (max-width: 767px) {
  .ya-public-layout > div:last-child:not(:first-child) { width: 100%; margin-left: 0; padding-inline: 14px; padding-bottom: 84px; }
}
