/* ============================================================
   Super Resume · Design System v2 · Atlas
   ────────────────────────────────────────────────────────────
   Direction: Mercury × Linear × Apple Liquid Glass
   Mood: precise · trustworthy · cool · frosted · rounded
   Source of truth for tokens + components.
   ============================================================ */

/* ─────────────────────────  TOKENS  ───────────────────────── */

:root {
  /* color · base bg layers */
  --bg-base:   #EEF2F8;
  --bg-base-2: #E5EAF2;
  --bg-tint-1: #DCE5F2;   /* radial blob — top right */
  --bg-tint-2: #E8DEF2;   /* radial blob — bottom left, subtle violet shift */

  /* color · frosted glass */
  --frosted:        rgba(255, 255, 255, 0.72);
  --frosted-soft:   rgba(255, 255, 255, 0.55);
  --frosted-strong: rgba(255, 255, 255, 0.85);
  --frosted-border: rgba(255, 255, 255, 0.60);
  --frosted-rule:   rgba(15, 22, 38, 0.08);
  --frosted-rule-2: rgba(15, 22, 38, 0.04);

  /* color · ink */
  --ink:    #0F1626;   /* primary text — deep cool navy */
  --ink-2:  #4D5A75;   /* secondary text */
  --ink-3:  #8896A8;   /* mercury silver — labels */
  --ink-4:  #B4BFCD;   /* placeholder / disabled */

  /* color · accent */
  --cobalt:        #1A47E5;
  --cobalt-hover:  #1638B5;
  --cobalt-soft:   #DCE3FB;
  --cobalt-tint:   rgba(26, 71, 229, 0.08);
  --cobalt-glow:   rgba(26, 71, 229, 0.25);

  /* color · status */
  --emerald:      #00A87E;
  --emerald-soft: #D4F0E5;
  --amber:        #C77700;
  --amber-soft:   #FAEBD0;
  --red:          #C8324F;
  --red-soft:     #FBDDE3;

  /* color · misc */
  --white: #FFFFFF;
  --black: #000000;

  /* type · families */
  --font-display: 'Inter Display', 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-mono:    'IBM Plex Mono', 'JetBrains Mono', SFMono-Regular, Menlo, monospace;

  /* type · weights */
  --fw-regular:  400;
  --fw-medium:   500;
  --fw-semibold: 600;
  --fw-bold:     700;

  /* type · scale */
  --fs-2xs: 0.6875rem;  /* 11px */
  --fs-xs:  0.75rem;    /* 12px */
  --fs-sm:  0.8125rem;  /* 13px */
  --fs-base: 0.9375rem; /* 15px */
  --fs-md:  1rem;       /* 16px */
  --fs-lg:  1.125rem;   /* 18px */
  --fs-xl:  1.375rem;   /* 22px */
  --fs-2xl: 1.75rem;    /* 28px */
  --fs-3xl: 2.25rem;    /* 36px */
  --fs-4xl: 3rem;       /* 48px */
  --fs-5xl: 4rem;       /* 64px */

  /* type · line-height */
  --lh-tight:   1.04;
  --lh-snug:    1.2;
  --lh-normal:  1.5;
  --lh-relaxed: 1.6;

  /* type · tracking */
  --ls-tight:   -0.025em;
  --ls-snug:    -0.015em;
  --ls-normal:  0;
  --ls-wide:    0.04em;
  --ls-widest:  0.12em;

  /* space · 4px baseline */
  --sp-1:  0.25rem;
  --sp-2:  0.5rem;
  --sp-3:  0.75rem;
  --sp-4:  1rem;
  --sp-5:  1.25rem;
  --sp-6:  1.5rem;
  --sp-8:  2rem;
  --sp-10: 2.5rem;
  --sp-12: 3rem;
  --sp-16: 4rem;
  --sp-20: 5rem;
  --sp-24: 6rem;

  /* radius · rounded everywhere */
  --r-sm:  6px;
  --r-md:  10px;
  --r-lg:  12px;
  --r-xl:  16px;
  --r-2xl: 20px;
  --r-3xl: 24px;
  --r-full: 9999px;

  /* shadow · soft layered */
  --shadow-sm:
    0 1px 2px rgba(15, 22, 38, 0.04);
  --shadow-md:
    0 1px 2px rgba(15, 22, 38, 0.04),
    0 4px 12px rgba(15, 22, 38, 0.06);
  --shadow-lg:
    0 1px 2px rgba(15, 22, 38, 0.04),
    0 8px 24px rgba(15, 22, 38, 0.06),
    0 24px 60px rgba(15, 22, 38, 0.04);
  --shadow-frosted:
    0 1px 0 rgba(255, 255, 255, 0.7) inset,
    0 1px 2px rgba(15, 22, 38, 0.04),
    0 8px 32px rgba(15, 22, 38, 0.06),
    0 24px 64px rgba(15, 22, 38, 0.04);
  --shadow-cobalt:
    0 4px 16px rgba(26, 71, 229, 0.25),
    0 1px 0 rgba(255, 255, 255, 0.4) inset;

  /* motion */
  --ease:        cubic-bezier(0.32, 0.72, 0.21, 1);
  --ease-out:    cubic-bezier(0.2, 0.8, 0.2, 1);
  --t-fast:    150ms;
  --t-base:    220ms;
  --t-slow:    400ms;

  /* layout */
  --max-w:        1280px;
  --max-w-narrow: 720px;
  --nav-h:        72px;

  /* z */
  --z-nav:    50;
  --z-modal:  100;
  --z-toast:  200;
}

/* ───────────────────────  RESET / BASE  ───────────────────── */

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

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: 'cv11', 'ss01', 'liga';
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: var(--lh-normal);
  color: var(--ink);
  background: var(--bg-base);
  position: relative;
  min-height: 100vh;
  letter-spacing: -0.005em;
}

/* page bg with frosted blob layers */
body::before,
body::after {
  content: '';
  position: fixed;
  pointer-events: none;
  z-index: -1;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.85;
}
body::before {
  top: -240px;
  right: -240px;
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, var(--bg-tint-1) 0%, transparent 65%);
}
body::after {
  bottom: -180px;
  left: -180px;
  width: 720px;
  height: 720px;
  background: radial-gradient(circle, var(--bg-tint-2) 0%, transparent 60%);
}

/* base bg gradient */
body {
  background:
    linear-gradient(180deg, var(--bg-base) 0%, var(--bg-base-2) 100%);
  background-attachment: fixed;
}

a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: transparent; border: 0; }
img, svg { display: block; max-width: 100%; }

::selection { background: var(--cobalt-soft); color: var(--ink); }

/* ────────────────────────  TYPOGRAPHY  ────────────────────── */

.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  font-weight: var(--fw-medium);
  text-transform: uppercase;
  letter-spacing: var(--ls-widest);
  color: var(--ink-3);
}

.display {
  font-family: var(--font-display);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-tight);
  line-height: var(--lh-tight);
}

.h1 { font-family: var(--font-display); font-size: var(--fs-5xl); font-weight: var(--fw-semibold); letter-spacing: var(--ls-tight); line-height: var(--lh-tight); }
.h2 { font-family: var(--font-display); font-size: var(--fs-4xl); font-weight: var(--fw-semibold); letter-spacing: var(--ls-tight); line-height: 1.08; }
.h3 { font-family: var(--font-display); font-size: var(--fs-3xl); font-weight: var(--fw-semibold); letter-spacing: var(--ls-snug); line-height: 1.15; }
.h4 { font-family: var(--font-display); font-size: var(--fs-2xl); font-weight: var(--fw-semibold); letter-spacing: var(--ls-snug); line-height: 1.25; }
.h5 { font-family: var(--font-body); font-size: var(--fs-lg); font-weight: var(--fw-semibold); letter-spacing: var(--ls-snug); }

.text-lead { font-size: var(--fs-lg); color: var(--ink-2); line-height: var(--lh-relaxed); }
.text-mono { font-family: var(--font-mono); font-feature-settings: 'tnum'; }
.text-tabular { font-variant-numeric: tabular-nums; }

.muted { color: var(--ink-2); }
.subtle { color: var(--ink-3); }

/* ───────────────────────  FROSTED PANEL  ──────────────────── */

.frosted {
  background: var(--frosted);
  -webkit-backdrop-filter: blur(28px) saturate(1.4);
  backdrop-filter: blur(28px) saturate(1.4);
  border: 1px solid var(--frosted-border);
  border-radius: var(--r-2xl);
  box-shadow: var(--shadow-frosted);
}

.frosted-soft {
  background: var(--frosted-soft);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  backdrop-filter: blur(20px) saturate(1.2);
  border: 1px solid var(--frosted-border);
  border-radius: var(--r-xl);
}

.frosted-nested {
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid var(--frosted-rule);
  border-radius: var(--r-lg);
}

/* ─────────────────────────  LAYOUT  ───────────────────────── */

.container { max-width: var(--max-w); margin: 0 auto; padding: 0 var(--sp-6); }
.container-narrow { max-width: var(--max-w-narrow); margin: 0 auto; padding: 0 var(--sp-6); }
.section { padding: var(--sp-16) 0; }
.section-lg { padding: var(--sp-24) 0; }

/* ──────────────────────────  BUTTONS  ─────────────────────── */

.btn,
.app-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  line-height: 1;
  letter-spacing: -0.005em;
  padding: var(--sp-3) var(--sp-5);
  border-radius: var(--r-md);
  border: 1px solid transparent;
  background: var(--ink);
  color: var(--white);
  cursor: pointer;
  transition: transform var(--t-fast) var(--ease),
              box-shadow var(--t-fast) var(--ease),
              background var(--t-fast) var(--ease);
  white-space: nowrap;
}
.btn:hover,
.app-btn:hover { transform: translateY(-1px); }
.btn:active,
.app-btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--cobalt);
  color: var(--white);
  box-shadow: var(--shadow-cobalt);
}
.btn-primary:hover { background: var(--cobalt-hover); }

.app-btn { background: var(--cobalt); color: var(--white); box-shadow: var(--shadow-cobalt); padding: var(--sp-3) var(--sp-6); font-size: var(--fs-base); border-radius: var(--r-md); }
.app-btn:hover { background: var(--cobalt-hover); }
.app-btn:disabled { background: var(--ink-3); cursor: not-allowed; box-shadow: none; transform: none; }

.app-btn-ghost,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  font-weight: var(--fw-medium);
  line-height: 1;
  letter-spacing: -0.005em;
  padding: var(--sp-3) var(--sp-6);
  border-radius: var(--r-md);
  background: var(--frosted-strong);
  color: var(--ink);
  border: 1px solid var(--frosted-rule);
  box-shadow: var(--shadow-sm);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  cursor: pointer;
  transition: all var(--t-fast) var(--ease);
  white-space: nowrap;
}
.app-btn-ghost:hover,
.btn-ghost:hover { background: var(--white); transform: translateY(-1px); }
.app-btn-ghost:active,
.btn-ghost:active { transform: translateY(0); }

.btn-sm,
.app-btn-sm { padding: var(--sp-2) var(--sp-4); font-size: var(--fs-xs); border-radius: var(--r-sm); }

.btn-feedback {
  background: transparent;
  border: 1px solid var(--frosted-rule);
  border-radius: var(--r-md);
  padding: var(--sp-2) var(--sp-4);
  font-size: var(--fs-md);
  color: var(--ink-2);
  transition: all var(--t-fast) var(--ease);
}
.btn-feedback:hover { background: var(--frosted-strong); border-color: var(--cobalt); color: var(--cobalt); }

/* ───────────────────────  PUBLIC NAV / HEADER  ────────────── */

.pub { background: transparent; min-height: 100vh; color: var(--ink); }

.pub-header {
  position: sticky;
  top: var(--sp-3);
  z-index: var(--z-nav);
  margin: 0 auto;
  max-width: calc(var(--max-w) - var(--sp-8));
  padding: 0 var(--sp-4);
  transition: padding var(--t-base) var(--ease);
}

.pub-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  padding: 0 var(--sp-5);
  background: var(--frosted);
  -webkit-backdrop-filter: blur(28px) saturate(1.4);
  backdrop-filter: blur(28px) saturate(1.4);
  border: 1px solid var(--frosted-border);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-frosted);
}

.pub-header.scrolled .pub-nav-inner {
  background: var(--frosted-strong);
}

.pub-brand {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: var(--fw-semibold);
  font-size: var(--fs-base);
  letter-spacing: var(--ls-snug);
}

.pub-brand-dot {
  width: 10px;
  height: 10px;
  background: var(--cobalt);
  border-radius: 3px;
  box-shadow: 0 0 0 3px var(--cobalt-tint);
}
.pub-brand-dot--sm { width: 8px; height: 8px; box-shadow: 0 0 0 2px var(--cobalt-tint); }

.pub-nav-links {
  display: flex;
  align-items: center;
  gap: var(--sp-8);
}

.pub-nav-link {
  font-size: var(--fs-sm);
  color: var(--ink-2);
  font-weight: var(--fw-medium);
  transition: color var(--t-fast) var(--ease);
}
.pub-nav-link:hover { color: var(--ink); }

.pub-controls {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
}

.pub-lang {
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  font-weight: var(--fw-medium);
  color: var(--ink-3);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  cursor: pointer;
  padding: var(--sp-1) var(--sp-2);
  border-radius: var(--r-sm);
  transition: all var(--t-fast) var(--ease);
  background: transparent;
  border: 0;
}
.pub-lang:hover { color: var(--ink); background: var(--frosted-rule-2); }
.pub-lang.active { color: var(--cobalt); background: var(--cobalt-soft); }

.pub-lang-sep { color: var(--ink-4); font-size: var(--fs-2xs); }

/* main + footer */
.pub-main {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: var(--sp-12) var(--sp-6) var(--sp-16);
}

.pub-footer {
  border-top: 1px solid var(--frosted-rule);
  padding: var(--sp-8) 0;
  margin-top: var(--sp-16);
}
.pub-footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--sp-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-6);
}
.pub-footer-brand {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  color: var(--ink-2);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
}
.pub-footer-name { color: var(--ink); font-weight: var(--fw-semibold); }
.pub-footer-copy {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--ink-3);
  letter-spacing: var(--ls-wide);
}

/* hero overline (legacy) */
.pub-hero-overline {
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  font-weight: var(--fw-medium);
  text-transform: uppercase;
  letter-spacing: var(--ls-widest);
  color: var(--cobalt);
  display: inline-block;
  padding: var(--sp-1) var(--sp-3);
  background: var(--cobalt-soft);
  border-radius: var(--r-full);
}

/* legacy compat: vars used by inline styles in templates */
:root {
  --pub-text:    var(--ink);
  --pub-text-2:  var(--ink-2);
  --pub-text-3:  var(--ink-2);
  --pub-text-4:  var(--ink-3);
  --pub-text-5:  var(--ink-4);
  --pub-bg:      transparent;
  --pub-card:    var(--frosted);
  --pub-border:  var(--frosted-rule);
  --pub-accent:  var(--cobalt);
  --pub-accent-2: var(--cobalt-hover);
}

/* ───────────────────────  APP SHELL (cabinet/analyze)  ─────── */

/* When body has an app-sidebar sibling of main, use a 2-col grid */
body.pub:has(> .app-sidebar) {
  display: grid;
  grid-template-columns: 240px 1fr;
  align-items: start;
  min-height: 100vh;
}

.app-main { min-height: 100vh; }

.app-sidebar {
  background: var(--frosted);
  -webkit-backdrop-filter: blur(28px) saturate(1.4);
  backdrop-filter: blur(28px) saturate(1.4);
  border-right: 1px solid var(--frosted-rule);
  padding: var(--sp-6) var(--sp-4);
  display: flex;
  flex-direction: column;
  gap: var(--sp-6);
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.app-sidebar-brand {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: var(--fw-semibold);
  font-size: var(--fs-base);
  padding: 0 var(--sp-2);
}

.app-sidebar-nav { display: flex; flex-direction: column; gap: var(--sp-1); flex: 1; }

.app-nav-link {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--r-md);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--ink-2);
  transition: all var(--t-fast) var(--ease);
}
.app-nav-link:hover { background: var(--frosted-soft); color: var(--ink); }
.app-nav-link.active {
  background: var(--cobalt-soft);
  color: var(--cobalt);
  font-weight: var(--fw-semibold);
}

.app-nav-divider {
  height: 1px;
  background: var(--frosted-rule);
  margin: var(--sp-2) var(--sp-2);
}

.app-sidebar-foot { margin-top: auto; padding-top: var(--sp-4); border-top: 1px solid var(--frosted-rule); }

.app-sidebar-user {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-2) var(--sp-3);
}
.app-sidebar-avatar {
  width: 32px;
  height: 32px;
  border-radius: var(--r-md);
  background: var(--cobalt-soft);
  color: var(--cobalt);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
}
.app-sidebar-user-info { flex: 1; min-width: 0; }
.app-sidebar-name { font-size: var(--fs-sm); font-weight: var(--fw-medium); color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-sidebar-email { font-size: var(--fs-2xs); color: var(--ink-3); font-family: var(--font-mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-sidebar-logout {
  font-size: var(--fs-2xs);
  color: var(--ink-3);
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: var(--ls-wide);
  padding: var(--sp-1) var(--sp-2);
  border-radius: var(--r-sm);
  margin-top: var(--sp-2);
  display: inline-block;
}
.app-sidebar-logout:hover { background: var(--red-soft); color: var(--red); }

/* page header inside app */
.app-page-header {
  padding: var(--sp-8) var(--sp-10) var(--sp-4);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--sp-6);
}
.app-page-header-text h1 {
  font-family: var(--font-display);
  font-size: var(--fs-3xl);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-tight);
  margin-bottom: var(--sp-2);
}
.app-page-header-text p {
  color: var(--ink-2);
  font-size: var(--fs-base);
  max-width: 540px;
}

.app-content {
  padding: 0 var(--sp-10) var(--sp-16);
  max-width: 920px;
  margin: 0 auto;
}
.app-content-wide { max-width: 1200px; }

/* ─────────────────────  CARDS & FORMS  ────────────────────── */

.app-card {
  background: var(--frosted);
  -webkit-backdrop-filter: blur(28px) saturate(1.4);
  backdrop-filter: blur(28px) saturate(1.4);
  border: 1px solid var(--frosted-border);
  border-radius: var(--r-2xl);
  box-shadow: var(--shadow-frosted);
  padding: var(--sp-8);
}

.app-card-title {
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-snug);
  color: var(--ink);
  margin-bottom: var(--sp-4);
}

.app-field { margin-bottom: var(--sp-5); }
.app-field:last-child { margin-bottom: 0; }

.app-label {
  display: block;
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  color: var(--ink-2);
  text-transform: uppercase;
  letter-spacing: var(--ls-wide);
  margin-bottom: var(--sp-2);
  font-family: var(--font-mono);
}

.app-input,
.app-textarea {
  width: 100%;
  padding: var(--sp-3) var(--sp-4);
  background: var(--frosted-strong);
  border: 1px solid var(--frosted-rule);
  border-radius: var(--r-md);
  color: var(--ink);
  font-size: var(--fs-base);
  font-family: var(--font-body);
  line-height: var(--lh-normal);
  transition: all var(--t-fast) var(--ease);
}
.app-input::placeholder,
.app-textarea::placeholder { color: var(--ink-3); }
.app-input:focus,
.app-textarea:focus {
  outline: none;
  border-color: var(--cobalt);
  box-shadow: 0 0 0 4px var(--cobalt-tint);
  background: var(--white);
}

.app-textarea { resize: vertical; min-height: 120px; }

.field-divider {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin: var(--sp-4) 0;
}
.field-divider-line { flex: 1; height: 1px; background: var(--frosted-rule); }
.field-divider-text {
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  text-transform: uppercase;
  letter-spacing: var(--ls-wide);
  color: var(--ink-3);
}

.form-error {
  background: var(--red-soft);
  color: var(--red);
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--r-md);
  font-size: var(--fs-sm);
  border: 1px solid rgba(200, 50, 79, 0.2);
}

/* ───────────────────────  DROP ZONE  ───────────────────────── */

.drop-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: var(--sp-8) var(--sp-6);
  border: 2px dashed var(--frosted-rule);
  border-radius: var(--r-lg);
  background: var(--frosted-soft);
  text-align: center;
  transition: all var(--t-base) var(--ease);
  position: relative;
}
.drop-zone svg {
  width: 36px;
  height: 36px;
  stroke: var(--ink-3);
  stroke-width: 1.5;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.drop-zone:hover,
.drop-zone.dragover {
  border-color: var(--cobalt);
  background: var(--cobalt-tint);
}
.drop-zone:hover svg,
.drop-zone.dragover svg { stroke: var(--cobalt); }

.drop-zone-label {
  font-size: var(--fs-base);
  font-weight: var(--fw-medium);
  color: var(--ink);
}
.drop-zone-hint {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: var(--ls-wide);
}

.file-name {
  margin-top: var(--sp-3);
  padding: var(--sp-2) var(--sp-4);
  background: var(--cobalt-soft);
  color: var(--cobalt);
  border-radius: var(--r-md);
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  display: inline-block;
}

/* batch file list */
.batch-file-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  margin-top: var(--sp-3);
}
.batch-file-item {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  background: var(--frosted-soft);
  border: 1px solid var(--frosted-rule);
  border-radius: var(--r-md);
  font-size: var(--fs-sm);
}
.batch-file-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--cobalt); flex-shrink: 0; }
.batch-file-name { flex: 1; color: var(--ink); font-family: var(--font-mono); font-size: var(--fs-sm); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.batch-file-remove {
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: var(--ls-wide);
  padding: var(--sp-1) var(--sp-2);
  border-radius: var(--r-sm);
  cursor: pointer;
}
.batch-file-remove:hover { background: var(--red-soft); color: var(--red); }

/* ──────────────────────  CABINET LIST  ─────────────────────── */

.cabinet-light-list,
.app-sessions {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.cabinet-light-item,
.app-session-item {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: var(--sp-4);
  padding: var(--sp-4) var(--sp-5);
  background: var(--frosted);
  -webkit-backdrop-filter: blur(20px) saturate(1.3);
  backdrop-filter: blur(20px) saturate(1.3);
  border: 1px solid var(--frosted-border);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-sm);
  color: var(--ink);
  transition: all var(--t-base) var(--ease);
}
.cabinet-light-item:hover,
.app-session-item:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  border-color: var(--cobalt-soft);
}

.cabinet-light-icon,
.app-session-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--r-md);
  background: var(--cobalt-soft);
  color: var(--cobalt);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.cabinet-light-icon svg,
.app-session-icon svg {
  width: 18px; height: 18px;
  stroke: currentColor;
  stroke-width: 1.75;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cabinet-light-body,
.app-session-body { min-width: 0; }
.cabinet-light-position,
.app-session-position {
  font-size: var(--fs-base);
  font-weight: var(--fw-semibold);
  color: var(--ink);
  margin-bottom: 2px;
  letter-spacing: var(--ls-snug);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cabinet-light-meta,
.app-session-meta {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--ink-3);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
}

.cabinet-light-score-wrap,
.app-session-score-wrap {
  text-align: right;
  flex-shrink: 0;
}
.cabinet-light-score,
.app-session-score {
  font-family: var(--font-display);
  font-size: var(--fs-2xl);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-tight);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.cabinet-light-score-hi,
.app-session-score-hi { color: var(--cobalt); }
.cabinet-light-score-mid,
.app-session-score-mid { color: var(--amber); }
.cabinet-light-score-lo,
.app-session-score-lo { color: var(--ink-3); }

.cabinet-light-score-label,
.app-session-score-label {
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: var(--ls-wide);
  margin-top: 2px;
}

.cabinet-light-arrow,
.app-session-arrow {
  width: 16px;
  height: 16px;
  stroke: var(--ink-3);
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform var(--t-base) var(--ease);
}
.cabinet-light-item:hover .cabinet-light-arrow,
.app-session-item:hover .app-session-arrow { transform: translateX(2px); stroke: var(--cobalt); }

/* ───────────────────────  STATUS PILLS  ────────────────────── */

.app-status-done,
.app-status-analyzing,
.app-status-draft,
.app-status-stopped {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  padding: 2px var(--sp-2);
  border-radius: var(--r-full);
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  font-weight: var(--fw-medium);
  text-transform: uppercase;
  letter-spacing: var(--ls-wide);
}
.app-status-done { background: var(--emerald-soft); color: var(--emerald); }
.app-status-analyzing { background: var(--cobalt-soft); color: var(--cobalt); }
.app-status-draft { background: var(--frosted-rule-2); color: var(--ink-3); }
.app-status-stopped { background: var(--amber-soft); color: var(--amber); }

/* ───────────────────  SCORE TEXT COLORS  ───────────────────── */

.score-high { color: var(--cobalt); font-weight: var(--fw-semibold); }
.score-mid  { color: var(--amber); font-weight: var(--fw-semibold); }
.score-low  { color: var(--ink-3); font-weight: var(--fw-semibold); }

/* ──────────────────────  EMPTY STATE  ──────────────────────── */

.app-empty {
  text-align: center;
  padding: var(--sp-16) var(--sp-6);
}
.app-empty-icon {
  width: 56px;
  height: 56px;
  background: var(--frosted-soft);
  border: 1px solid var(--frosted-rule);
  border-radius: var(--r-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--sp-4);
  color: var(--ink-3);
}
.app-empty h2 {
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-snug);
  margin-bottom: var(--sp-2);
}
.app-empty p {
  color: var(--ink-2);
  font-size: var(--fs-base);
  margin-bottom: var(--sp-6);
}

/* ────────────────────────  ALERTS  ─────────────────────────── */

.app-alert {
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--r-md);
  font-size: var(--fs-sm);
  border: 1px solid;
}
.app-alert-success { background: var(--emerald-soft); color: var(--emerald); border-color: rgba(0, 168, 126, 0.2); }
.app-alert-error   { background: var(--red-soft); color: var(--red); border-color: rgba(200, 50, 79, 0.2); }

/* ───────────────────  STREAM (analyze result)  ─────────────── */

.stream-container {
  position: relative;
  background: var(--frosted);
  -webkit-backdrop-filter: blur(28px) saturate(1.4);
  backdrop-filter: blur(28px) saturate(1.4);
  border: 1px solid var(--frosted-border);
  border-radius: var(--r-2xl);
  box-shadow: var(--shadow-frosted);
  padding: var(--sp-8);
  min-height: 320px;
}
.stream-text {
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: var(--lh-relaxed);
  color: var(--ink);
}
.stream-text h1 { font-family: var(--font-display); font-size: var(--fs-2xl); font-weight: var(--fw-semibold); letter-spacing: var(--ls-tight); margin: 0 0 var(--sp-3); }
.stream-text h2 { font-family: var(--font-display); font-size: var(--fs-xl); font-weight: var(--fw-semibold); letter-spacing: var(--ls-snug); margin: var(--sp-6) 0 var(--sp-3); }
.stream-text h3 { font-family: var(--font-display); font-size: var(--fs-lg); font-weight: var(--fw-semibold); margin: var(--sp-5) 0 var(--sp-2); }
.stream-text p { margin-bottom: var(--sp-4); }
.stream-text strong { color: var(--ink); font-weight: var(--fw-semibold); }
.stream-text ul, .stream-text ol { padding-left: var(--sp-5); margin-bottom: var(--sp-4); }
.stream-text li { margin-bottom: var(--sp-2); }
.stream-text code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--frosted-rule-2);
  padding: 2px 6px;
  border-radius: 4px;
}

.stream-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--frosted);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-radius: var(--r-2xl);
  text-align: center;
}
.stream-overlay-label {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--ink-2);
  text-transform: uppercase;
  letter-spacing: var(--ls-wide);
  margin-top: var(--sp-3);
}

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--frosted-rule);
  border-top-color: var(--cobalt);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

.result-actions {
  display: flex;
  gap: var(--sp-2);
  flex-wrap: wrap;
}
.feedback-buttons { display: inline-flex; gap: var(--sp-2); margin-left: auto; }

/* ────────────────────────  CHIPS / TAGS  ───────────────────── */

.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  padding: 4px var(--sp-3);
  background: var(--cobalt-soft);
  color: var(--cobalt);
  border-radius: var(--r-full);
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  font-weight: var(--fw-medium);
  text-transform: uppercase;
  letter-spacing: var(--ls-wide);
}
.chip-neutral { background: var(--frosted-soft); color: var(--ink-2); border: 1px solid var(--frosted-rule); }
.chip-emerald { background: var(--emerald-soft); color: var(--emerald); }
.chip-amber   { background: var(--amber-soft); color: var(--amber); }
.chip-red     { background: var(--red-soft); color: var(--red); }

/* ─────────────────────  SCORE BAR  ─────────────────────────── */

.score-bar {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  font-size: var(--fs-sm);
}
.score-bar-label {
  color: var(--ink-2);
  flex-shrink: 0;
  width: 110px;
}
.score-bar-track {
  flex: 1;
  height: 8px;
  background: var(--frosted-rule-2);
  border-radius: var(--r-full);
  overflow: hidden;
}
.score-bar-fill {
  height: 100%;
  background: var(--cobalt);
  border-radius: var(--r-full);
  transition: width var(--t-slow) var(--ease);
}
.score-bar-fill.mid { background: var(--amber); }
.score-bar-fill.lo  { background: var(--ink-3); }
.score-bar-value {
  font-family: var(--font-display);
  font-weight: var(--fw-semibold);
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  width: 32px;
  text-align: right;
  flex-shrink: 0;
}

/* ─────────────────────────  ANIMATIONS  ────────────────────── */

@keyframes pub-fade-up {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.5; }
}

.animate-pulse-dot { animation: pulse-dot 2s ease-in-out infinite; }
.fade-up { animation: pub-fade-up 0.6s var(--ease) both; }

/* fade-on-scroll utility */
.fade-in-scroll {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity var(--t-slow) var(--ease),
              transform var(--t-slow) var(--ease);
}
.fade-in-scroll.visible { opacity: 1; transform: translateY(0); }

/* ────────────────  PUBLIC ANALYZE FORM (analyze.html)  ─────── */

.pub-hero {
  text-align: center;
  padding: var(--sp-12) 0 var(--sp-8);
  max-width: 720px;
  margin: 0 auto;
}
.pub-hero h1 {
  font-family: var(--font-display);
  font-size: var(--fs-3xl);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-tight);
  line-height: var(--lh-tight);
  color: var(--ink);
  margin-bottom: var(--sp-3);
}
.pub-hero p {
  color: var(--ink-2);
  font-size: var(--fs-lg);
  line-height: var(--lh-relaxed);
  max-width: 520px;
  margin: 0 auto;
}

/* mode tabs */
.mode-tabs {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  padding: var(--sp-1);
  background: var(--frosted);
  -webkit-backdrop-filter: blur(20px) saturate(1.3);
  backdrop-filter: blur(20px) saturate(1.3);
  border: 1px solid var(--frosted-rule);
  border-radius: var(--r-full);
  margin: 0 auto var(--sp-6);
}
.mode-tab {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-5);
  border-radius: var(--r-full);
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--ink-2);
  background: transparent;
  border: 0;
  cursor: pointer;
  transition: all var(--t-fast) var(--ease);
  white-space: nowrap;
}
.mode-tab:hover { color: var(--ink); }
.mode-tab.active {
  background: var(--white);
  color: var(--cobalt);
  box-shadow: var(--shadow-sm);
}

/* form-card alias for app-card */
.form-card {
  background: var(--frosted);
  -webkit-backdrop-filter: blur(28px) saturate(1.4);
  backdrop-filter: blur(28px) saturate(1.4);
  border: 1px solid var(--frosted-border);
  border-radius: var(--r-2xl);
  box-shadow: var(--shadow-frosted);
  padding: var(--sp-8);
  margin: 0 auto;
  max-width: 640px;
}

/* field / field-input / field-label / field-textarea — used in analyze.html */
.field { margin-bottom: var(--sp-5); }
.field:last-child { margin-bottom: 0; }
.field-label {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  font-weight: var(--fw-medium);
  color: var(--ink-2);
  text-transform: uppercase;
  letter-spacing: var(--ls-wide);
  margin-bottom: var(--sp-2);
}
.field-input,
.field-textarea,
.form-textarea {
  width: 100%;
  padding: var(--sp-3) var(--sp-4);
  background: var(--frosted-strong);
  border: 1px solid var(--frosted-rule);
  border-radius: var(--r-md);
  color: var(--ink);
  font-size: var(--fs-base);
  font-family: var(--font-body);
  line-height: var(--lh-normal);
  transition: all var(--t-fast) var(--ease);
}
.field-input::placeholder,
.field-textarea::placeholder,
.form-textarea::placeholder { color: var(--ink-3); }
.field-input:focus,
.field-textarea:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--cobalt);
  box-shadow: 0 0 0 4px var(--cobalt-tint);
  background: var(--white);
}
.field-textarea,
.form-textarea {
  resize: vertical;
  min-height: 120px;
}

/* email section divider */
.email-section {
  margin-top: var(--sp-5);
  padding-top: var(--sp-5);
  border-top: 1px solid var(--frosted-rule);
}

/* magic CTA — main analyze button */
.cta-magic {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  width: 100%;
  padding: var(--sp-4) var(--sp-6);
  margin-top: var(--sp-6);
  background: var(--cobalt);
  color: var(--white);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  font-weight: var(--fw-semibold);
  letter-spacing: -0.005em;
  border: 0;
  border-radius: var(--r-md);
  cursor: pointer;
  box-shadow: var(--shadow-cobalt);
  transition: all var(--t-fast) var(--ease);
}
.cta-magic:hover {
  background: var(--cobalt-hover);
  transform: translateY(-1px);
  box-shadow:
    0 8px 24px rgba(26, 71, 229, 0.30),
    0 1px 0 rgba(255, 255, 255, 0.4) inset;
}
.cta-magic:active { transform: translateY(0); }
.cta-magic:disabled {
  background: var(--ink-3);
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

/* usage counter (free quota) */
.usage-counter {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-4);
  margin: 0 auto var(--sp-4);
  background: var(--cobalt-soft);
  border-radius: var(--r-full);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--cobalt);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
}
.usage-dots { display: inline-flex; gap: 4px; }
.usage-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cobalt);
}
.usage-dots span.spent { background: var(--ink-4); }
.usage-text { font-weight: var(--fw-medium); }

/* promo (telegram bot link) */
.pub-promo {
  margin-top: var(--sp-6);
  padding: var(--sp-5);
  background: var(--frosted-soft);
  border: 1px solid var(--frosted-rule);
  border-radius: var(--r-xl);
  text-align: center;
  font-size: var(--fs-sm);
  color: var(--ink-2);
}
.pub-promo a {
  color: var(--cobalt);
  font-weight: var(--fw-medium);
  text-decoration: underline;
  text-decoration-color: var(--cobalt-soft);
  text-underline-offset: 3px;
}
.pub-promo a:hover { text-decoration-color: var(--cobalt); }

/* bento-error / inline error block */
.bento-error {
  margin-top: var(--sp-4);
  padding: var(--sp-4) var(--sp-5);
  background: var(--red-soft);
  border: 1px solid rgba(200, 50, 79, 0.2);
  border-radius: var(--r-md);
  color: var(--red);
  font-size: var(--fs-sm);
}

/* analysis history — section wrapper */
#history-section {
  max-width: 640px;
  margin: 0 auto var(--sp-4);
}

/* analysis history — pills variant (≤3 items) */
.history-pills {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin-bottom: var(--sp-4);
}
.history-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-4);
  background: var(--frosted);
  -webkit-backdrop-filter: blur(20px) saturate(1.3);
  backdrop-filter: blur(20px) saturate(1.3);
  border: 1px solid var(--frosted-border);
  border-radius: var(--r-full);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--ink);
  cursor: pointer;
  transition: all var(--t-fast) var(--ease);
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}
.history-pill:hover {
  border-color: var(--cobalt);
  background: var(--frosted-strong);
  transform: translateY(-1px);
}
.history-pill-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cobalt);
  flex-shrink: 0;
}
.history-pill-date {
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: var(--ls-wide);
  margin-left: var(--sp-2);
  padding-left: var(--sp-2);
  border-left: 1px solid var(--frosted-rule);
}

/* analysis history — collapsible variant (>3 items) */
.history-collapse {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  margin-bottom: var(--sp-4);
}
.history-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  align-self: flex-start;
  padding: var(--sp-2) var(--sp-3);
  background: transparent;
  border: 0;
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  text-transform: uppercase;
  letter-spacing: var(--ls-wide);
  color: var(--ink-2);
  cursor: pointer;
  border-radius: var(--r-sm);
  transition: all var(--t-fast) var(--ease);
}
.history-toggle-btn:hover { background: var(--frosted-rule-2); color: var(--ink); }
.history-toggle-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  background: var(--cobalt-soft);
  color: var(--cobalt);
  border-radius: var(--r-full);
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  font-weight: var(--fw-semibold);
}
.history-toggle-arrow {
  font-size: 9px;
  transition: transform var(--t-base) var(--ease);
  color: var(--ink-3);
}
.history-toggle-btn.open .history-toggle-arrow { transform: rotate(180deg); }

.history-more-btn {
  align-self: flex-start;
  padding: var(--sp-2) var(--sp-3);
  background: transparent;
  border: 0;
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  text-transform: uppercase;
  letter-spacing: var(--ls-wide);
  color: var(--cobalt);
  cursor: pointer;
  border-radius: var(--r-sm);
  transition: all var(--t-fast) var(--ease);
}
.history-more-btn:hover { background: var(--cobalt-soft); }

/* analysis history list */
.history-clist {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  margin-bottom: var(--sp-2);
}
.history-citem.hidden { display: none; }
.history-citem {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  background: var(--frosted-soft);
  border: 1px solid var(--frosted-rule);
  border-radius: var(--r-md);
  font-size: var(--fs-sm);
  text-decoration: none;
  color: var(--ink);
  transition: all var(--t-fast) var(--ease);
}
.history-citem:hover {
  background: var(--frosted-strong);
  border-color: var(--cobalt-soft);
  transform: translateY(-1px);
}
.history-citem-left { display: flex; align-items: center; gap: var(--sp-3); flex: 1; min-width: 0; }
.history-citem-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cobalt);
  flex-shrink: 0;
}
.history-citem-name {
  flex: 1;
  font-weight: var(--fw-medium);
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.history-citem-date {
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: var(--ls-wide);
}
.history-citem-view {
  color: var(--cobalt);
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  text-transform: uppercase;
  letter-spacing: var(--ls-wide);
  font-weight: var(--fw-medium);
}
.history-clear-link {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: var(--ls-wide);
  cursor: pointer;
  padding: var(--sp-1) var(--sp-2);
  border-radius: var(--r-sm);
}
.history-clear-link:hover { background: var(--red-soft); color: var(--red); }

/* feedback inline */
.feedback-form-inline {
  margin-top: var(--sp-4);
  padding: var(--sp-4);
  background: var(--frosted-soft);
  border: 1px solid var(--frosted-rule);
  border-radius: var(--r-md);
}

/* ─────────────────────  MOBILE / RESPONSIVE  ──────────────── */

@media (max-width: 960px) {
  body.pub:has(> .app-sidebar) { grid-template-columns: 1fr; }
  .app-sidebar { position: static; height: auto; flex-direction: row; gap: var(--sp-4); align-items: center; padding: var(--sp-3) var(--sp-4); border-right: 0; border-bottom: 1px solid var(--frosted-rule); }
  .app-sidebar-nav { flex-direction: row; flex: 1; }
  .app-sidebar-foot { margin-top: 0; padding: 0; border: 0; }
  .app-page-header { padding: var(--sp-6) var(--sp-4) var(--sp-3); }
  .app-content { padding: 0 var(--sp-4) var(--sp-12); }
  .pub-nav-links { display: none; }
}

@media (max-width: 640px) {
  :root {
    --fs-5xl: 2.75rem;
    --fs-4xl: 2.25rem;
    --fs-3xl: 1.875rem;
  }
  .pub-main { padding: var(--sp-8) var(--sp-4) var(--sp-12); }
  .cabinet-light-item, .app-session-item { grid-template-columns: auto 1fr auto; }
  .cabinet-light-arrow, .app-session-arrow { display: none; }
}

/* ─────────────────────  ACCESSIBILITY  ─────────────────────── */

:focus-visible {
  outline: 2px solid var(--cobalt);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
