/* ============================================================
   FakturaGO landing - aligned with the real app design system.
   Inter + JetBrains Mono, indigo (#4f46e5) on surface-50 bg,
   hairline borders, soft multi-layer shadows, rounded-xl.
   ============================================================ */

:root {
  /* Surface (neutrals) - matches app's surface scale */
  --surface-0:   #ffffff;
  --surface-50:  #f4f6f9;
  --surface-100: #eef1f5;
  --surface-200: #e2e6ec;
  --surface-300: #cbd2dc;
  --surface-400: #99a1b0;
  --surface-500: #6b7280;
  --surface-600: #4b5563;
  --surface-700: #1f2636;
  --surface-800: #161b28;
  --surface-900: #0f1524;
  --surface-950: #0a0e1a;

  /* Primary (indigo) - the app's accent */
  --primary-50:  #eef2ff;
  --primary-100: #e0e7ff;
  --primary-200: #c7d2fe;
  --primary-400: #818cf8;
  --primary-500: #6366f1;
  --primary-600: #4f46e5;
  --primary-700: #4338ca;
  --primary-800: #3730a3;

  /* Semantic */
  --success-50: #ecfdf5;  --success-500: #10b981; --success-700: #047857;
  --warning-50: #fffbeb;  --warning-500: #f59e0b; --warning-700: #b45309;
  --danger-50:  #fef2f2;  --danger-500:  #ef4444; --danger-700:  #b91c1c;
  --info-50:    #eff6ff;  --info-500:    #3b82f6; --info-700:    #1d4ed8;

  /* Shadows - layered, soft, matches app .card */
  --shadow-xs:   0 1px 2px rgba(15, 21, 36, 0.04);
  --shadow-sm:   0 1px 3px rgba(15, 21, 36, 0.05), 0 1px 2px rgba(15, 21, 36, 0.04);
  --shadow-card: 0 1px 2px rgba(15, 21, 36, 0.04), 0 2px 8px rgba(15, 21, 36, 0.04), 0 0 0 1px rgba(15, 21, 36, 0.03);
  --shadow-hi:   0 10px 20px -8px rgba(15, 21, 36, 0.12), 0 4px 10px rgba(15, 21, 36, 0.05);
  --shadow-xl:   0 30px 60px -20px rgba(15, 21, 36, 0.25), 0 10px 30px rgba(15, 21, 36, 0.08);

  /* Radii */
  --r-sm:  0.375rem;
  --r:     0.5rem;
  --r-md:  0.625rem;
  --r-lg:  0.75rem;
  --r-xl:  1rem;
  --r-2xl: 1.25rem;

  /* Fonts */
  --font:   'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --mono:   'JetBrains Mono', ui-monospace, 'SF Mono', 'Courier New', monospace;

  /* Layout */
  --container: 1180px;
  --gutter: clamp(20px, 4vw, 36px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  color: var(--surface-700);
  background: var(--surface-50);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'cv11','ss01','ss03';
}

::selection { background: var(--primary-100); color: var(--primary-700); }

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; background: none; border: none; color: inherit; padding: 0; }
h1,h2,h3,h4,h5 { margin: 0; font-weight: 700; color: var(--surface-900); letter-spacing: -0.02em; }
p { margin: 0; }
code { font-family: var(--mono); font-size: 0.92em; padding: 2px 6px; background: var(--surface-100); border-radius: 4px; color: var(--surface-900); }

.container { max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.mono { font-family: var(--mono); }
.nums { font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------------
   BUTTONS
   --------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 16px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  border-radius: var(--r);
  transition: background 0.18s cubic-bezier(0.22, 0.61, 0.36, 1),
              box-shadow 0.18s, color 0.18s, transform 0.18s;
  position: relative;
  border: 1px solid transparent;
}
.btn .arrow { transition: transform 0.2s cubic-bezier(0.22, 0.61, 0.36, 1); }
.btn:hover .arrow { transform: translateX(3px); }
.btn .ico { width: 16px; height: 16px; display: inline-flex; }
.btn .ico::before { content: ''; display: block; width: 100%; height: 100%;
  background-image: var(--ico-img);
}

.btn-primary {
  background: var(--primary-600);
  color: #fff;
  box-shadow: 0 1px 2px rgba(79, 70, 229, 0.18), inset 0 1px 0 rgba(255,255,255,0.12);
}
.btn-primary:hover {
  background: var(--primary-700);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.32), inset 0 1px 0 rgba(255,255,255,0.12);
}
.btn-primary:active { background: var(--primary-800); }

.btn-secondary {
  background: var(--surface-0);
  color: var(--surface-700);
  border-color: var(--surface-200);
  box-shadow: var(--shadow-xs);
}
.btn-secondary:hover { background: var(--surface-50); border-color: var(--surface-300); }

.btn-ghost {
  background: transparent;
  color: var(--surface-700);
}
.btn-ghost:hover { background: var(--surface-100); color: var(--surface-900); }

.btn-success {
  background: var(--success-500);
  color: #fff;
  box-shadow: 0 1px 2px rgba(16, 185, 129, 0.18);
}
.btn-success:hover { background: #0d9e6d; }

.btn-sm  { padding: 6px 12px; font-size: 13px; }
.btn-lg  { padding: 12px 22px; font-size: 15px; }
.btn-xl  { padding: 16px 28px; font-size: 16px; border-radius: var(--r-md); }
.btn.full { width: 100%; }

/* ---------------------------------------------------------------------
   NAV
   --------------------------------------------------------------------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(244, 246, 249, 0.8);
  backdrop-filter: saturate(1.8) blur(12px);
  -webkit-backdrop-filter: saturate(1.8) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s, background 0.2s;
  overflow: visible;
}
.brand { overflow: visible; }
.nav.scrolled {
  background: rgba(255, 255, 255, 0.85);
  border-bottom-color: var(--surface-200);
}
.nav-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 10px var(--gutter);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  min-height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 16px;
  color: var(--surface-900);
  letter-spacing: -0.01em;
  line-height: 1;
}
.brand-logo {
  /* The visual logo is 90px tall. Negative block margins shrink its flex
     box back to ~40px so the nav-inner stays compact (~64px) while the
     logo itself still looks large. */
  height: 90px;
  width: auto;
  display: block;
  user-select: none;
  max-width: 300px;
  object-fit: contain;
  margin-top: -25px;
  margin-bottom: -25px;
}
.brand-logo.foot-logo {
  /* No need to collapse in footer - let it breathe. */
  height: 120px;
  max-width: 340px;
  margin-top: 0;
  margin-bottom: 0;
}

/* Clean wordmark used inside the demo sidebar (no raster logo there) */
.side-wordmark {
  font-family: var(--font);
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.025em;
  color: #fff;
  line-height: 1;
  display: inline-block;
  padding: 4px 2px;
}
.side-wordmark em {
  font-style: normal;
  font-weight: 600;
  color: var(--primary-400);
  letter-spacing: -0.015em;
}
.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: linear-gradient(135deg, var(--primary-500) 0%, var(--primary-700) 100%);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: -0.02em;
  box-shadow: 0 1px 2px rgba(79, 70, 229, 0.25), inset 0 1px 0 rgba(255,255,255,0.25);
}
.brand-mark.small { width: 22px; height: 22px; font-size: 12px; border-radius: 5px; }

.nav-links {
  display: flex;
  gap: 28px;
}
.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--surface-600);
  transition: color 0.15s;
}
.nav-links a:hover { color: var(--surface-900); }

.nav-cta { display: flex; gap: 8px; align-items: center; }

@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-cta .btn-ghost { display: none; }
}

/* ---------------------------------------------------------------------
   PILL / EYEBROW
   --------------------------------------------------------------------- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: var(--surface-0);
  border: 1px solid var(--surface-200);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  color: var(--surface-700);
  box-shadow: var(--shadow-xs);
}
.pill-dot {
  width: 7px; height: 7px;
  background: var(--success-500);
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: 0.55; } }

.eyebrow {
  display: inline-block;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--primary-600);
  font-weight: 600;
  margin-bottom: 16px;
}

/* ---------------------------------------------------------------------
   HERO
   --------------------------------------------------------------------- */
.hero {
  position: relative;
  padding: 56px 0 80px;
  overflow: hidden;
}
.hero-demo-wrap {
  margin-top: 56px;
  position: relative;
  z-index: 1;
}
.hero-demo-wrap .app-window {
  max-width: 100%;
  margin: 0 auto;
}
.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 40% at 50% 0%, rgba(99, 102, 241, 0.08) 0%, transparent 60%),
    radial-gradient(circle at 90% 20%, rgba(16, 185, 129, 0.04), transparent 50%);
}
.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(15, 21, 36, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 21, 36, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, #000 0%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, #000 0%, transparent 70%);
}

.hero-inner {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 100%;
  margin: 0 auto;
}
.hero-inner .hero-title,
.hero-inner .hero-sub { max-width: 820px; margin-left: auto; margin-right: auto; }

.hero-title {
  font-size: clamp(36px, 5vw, 58px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--surface-900);
  margin: 16px 0 18px;
  text-wrap: balance;
  /* Protect descenders (ogonki) from being clipped by any ancestor overflow */
  padding-bottom: 0.14em;
}
.hero-title .ink {
  background: linear-gradient(135deg, var(--primary-600), var(--primary-500) 50%, var(--primary-700));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-style: italic;
  font-weight: 700;
  /* Italic slant extends past the normal character box AND descenders
     (ogonki on ą, ę) extend below the baseline - protect both axes with
     inline-block + padding so nothing gets clipped by neighbours. */
  display: inline-block;
  padding-right: 0.12em;
  padding-bottom: 0.16em;
  line-height: 1.2;
  overflow: visible;
}

.hero-sub {
  font-size: 17px;
  color: var(--surface-500);
  max-width: 620px;
  margin: 0 auto 32px;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.hero-meta {
  display: flex;
  justify-content: center;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--surface-500);
}
.hero-meta strong { color: var(--surface-900); font-weight: 600; }
.dot-sep { color: var(--surface-300); }

.hero-shot {
  position: relative;
  z-index: 1;
  max-width: 1080px;
  margin: 60px auto 0;
  transform: perspective(1800px) rotateX(3deg);
  transform-origin: top center;
}

/* ---------------------------------------------------------------------
   APP WINDOW - the realistic mockup
   --------------------------------------------------------------------- */
.app-window {
  background: var(--surface-0);
  border: 1px solid var(--surface-200);
  border-radius: var(--r-xl);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
}
.app-window-wide { max-width: 100%; margin: 0 auto; }

.win-chrome {
  height: 38px;
  display: flex;
  align-items: center;
  padding: 0 14px;
  gap: 10px;
  background: var(--surface-50);
  border-bottom: 1px solid var(--surface-200);
}
.tl-dots { display: inline-flex; gap: 6px; }
.tl-dots i {
  width: 11px; height: 11px; border-radius: 50%; display: inline-block;
  background: var(--surface-300);
}
.tl-dots i:nth-child(1) { background: #ff5f57; }
.tl-dots i:nth-child(2) { background: #febc2e; }
.tl-dots i:nth-child(3) { background: #28c840; }
.win-title {
  margin-left: 8px;
  font-size: 12px;
  font-weight: 500;
  color: var(--surface-500);
  letter-spacing: -0.01em;
}

.win-body {
  display: grid;
  grid-template-columns: 230px 1fr;
  height: 680px;
}

/* --- Sidebar (dark, mirrors the real app) --- */
.app-side {
  background: var(--surface-900);
  color: rgba(255, 255, 255, 0.65);
  padding: 14px 0 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow: hidden;
}
.side-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 18px 24px;
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: -0.01em;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  margin-bottom: 8px;
}

.side-section {
  display: flex;
  flex-direction: column;
  padding: 8px 0;
}
.side-section + .side-section { border-top: 1px solid rgba(255,255,255,0.04); margin-top: 6px; padding-top: 12px; }

.side-label {
  padding: 4px 18px 8px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.3);
  font-weight: 600;
}

.app-side a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 18px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.65);
  border-left: 2px solid transparent;
  font-weight: 500;
  transition: all 0.18s;
  position: relative;
}
.app-side a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.04);
}
.app-side a.active {
  color: #fff;
  background: rgba(99, 102, 241, 0.15);
  border-left-color: var(--primary-400);
}
.app-side a .ico {
  width: 16px; height: 16px;
  display: inline-flex;
  color: currentColor;
  opacity: 0.9;
}

.badge-mini {
  margin-left: auto;
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.7);
  font-family: var(--mono);
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 999px;
}
.dot-live {
  margin-left: auto;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--success-500);
  box-shadow: 0 0 0 3px rgba(16,185,129,0.2);
  animation: pulse 1.8s ease-in-out infinite;
}

.side-foot {
  margin-top: auto;
  padding: 14px 18px;
  border-top: 1px solid rgba(255,255,255,0.05);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.firma-name { color: #fff; font-size: 12px; font-weight: 600; }
.firma-nip  { color: rgba(255,255,255,0.4); font-size: 10.5px; letter-spacing: 0.04em; }
.lic {
  margin-top: 6px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  color: rgba(255,255,255,0.55);
}
.lic-dot { width: 6px; height: 6px; background: var(--success-500); border-radius: 50%; }

/* --- Main content pane --- */
.app-main {
  background: var(--surface-50);
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}
.topbar, .page-header { flex-shrink: 0; }

.topbar {
  height: 44px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255,255,255,0.7);
  border-bottom: 1px solid var(--surface-200);
  backdrop-filter: blur(8px);
}
.crumbs {
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--surface-500);
  text-transform: uppercase;
}
.top-actions { display: flex; align-items: center; gap: 14px; }
.help { font-size: 13px; color: var(--surface-500); }
.avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-500), var(--primary-700));
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
}

.live-ind {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--success-700);
  font-weight: 600;
}
.live-dot {
  width: 6px; height: 6px;
  background: var(--success-500);
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(16,185,129,0.18);
  animation: pulse 1.5s ease-in-out infinite;
}

/* Page header */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px 16px;
  gap: 16px;
}
.ph-title-wrap { display: flex; align-items: center; gap: 12px; }
.ph-icon {
  width: 40px; height: 40px;
  background: var(--primary-50);
  color: var(--primary-600);
  border-radius: var(--r);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.ph-icon .ico,
.ph-icon { }
.ph-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--surface-900);
  line-height: 1.15;
}
.ph-sub {
  font-size: 12.5px;
  color: var(--surface-500);
  margin-top: 2px;
}
.ph-actions { display: flex; gap: 8px; }

/* Filter tabs */
.tabs {
  display: flex;
  gap: 4px;
  padding: 4px 24px;
  flex-wrap: wrap;
}
.tab {
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 500;
  color: var(--surface-500);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.15s;
}
.tab em {
  font-style: normal;
  font-family: var(--mono);
  font-size: 10.5px;
  margin-left: 6px;
  color: var(--surface-400);
}
.tab:hover { background: var(--surface-0); border-color: var(--surface-200); color: var(--surface-700); }
.tab.active {
  background: var(--primary-50);
  color: var(--primary-700);
  border-color: var(--primary-200);
}
.tab.active em { color: var(--primary-600); }

/* Toolbar (search + filter) */
.toolbar {
  display: flex;
  gap: 10px;
  padding: 10px 24px;
  align-items: center;
}
.search {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  background: var(--surface-0);
  border: 1px solid var(--surface-200);
  border-radius: var(--r);
  box-shadow: var(--shadow-xs);
}
.search .ico { width: 16px; height: 16px; color: var(--surface-400); flex-shrink: 0; }
.search input {
  flex: 1;
  border: none;
  outline: none;
  font-family: inherit;
  font-size: 13px;
  padding: 8px 0;
  background: transparent;
  color: var(--surface-700);
}
.search input::placeholder { color: var(--surface-400); }

/* Data table */
.data-table {
  margin: 8px 24px 16px;
  background: var(--surface-0);
  border: 1px solid var(--surface-200);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.data-table.small { margin: 0; box-shadow: none; border-radius: var(--r); }

.tr {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr 1.6fr 0.8fr 0.9fr 1fr 1fr;
  gap: 12px;
  padding: 11px 16px;
  font-size: 12.5px;
  align-items: center;
  border-bottom: 1px solid var(--surface-100);
  color: var(--surface-700);
  transition: background 0.14s;
}
.tr:last-child { border-bottom: none; }
.tr:not(.head):hover { background: rgba(99, 102, 241, 0.04); }
.tr .r { text-align: right; }
.tr .bold { font-weight: 600; color: var(--surface-900); }
.tr.head {
  background: var(--surface-50);
  color: var(--surface-500);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  padding: 10px 16px;
}
.tr.total {
  background: var(--surface-50);
  font-weight: 700;
  border-top: 1px solid var(--surface-200);
}
.num { color: var(--primary-700); font-weight: 500; }
.accent { color: var(--primary-700); }

.data-table.small .tr {
  grid-template-columns: 0.3fr 2.4fr 0.7fr 0.9fr 0.5fr 1fr;
  padding: 8px 12px;
  font-size: 12px;
}
.data-table.small .tr.head { padding: 8px 12px; font-size: 9.5px; }

.tiny { font-size: 10px; }
.quiet { color: var(--surface-400); font-style: italic; }

/* Status badges - exact visual match to the real app */
.bdg {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 9px;
  font-family: var(--font);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.01em;
  font-style: normal;
  border-radius: 999px;
  border: 1px solid transparent;
  white-space: nowrap;
}
.bdg i {
  width: 6px; height: 6px; border-radius: 50%;
  flex-shrink: 0;
}
.bdg-success { background: var(--success-50); color: var(--success-700); border-color: rgba(16,185,129,0.25); }
.bdg-success i { background: var(--success-500); }
.bdg-warning { background: var(--warning-50); color: var(--warning-700); border-color: rgba(245,158,11,0.25); }
.bdg-warning i { background: var(--warning-500); }
.bdg-danger  { background: var(--danger-50);  color: var(--danger-700);  border-color: rgba(239,68,68,0.25); }
.bdg-danger i { background: var(--danger-500); }
.bdg-info    { background: var(--info-50);    color: var(--info-700);    border-color: rgba(59,130,246,0.25); }
.bdg-info i { background: var(--info-500); }
.bdg-neutral { background: var(--surface-100); color: var(--surface-700); border-color: var(--surface-200); }
.bdg-neutral i { background: var(--surface-400); }

.table-foot {
  padding: 10px 24px 18px;
  display: flex;
  gap: 24px;
  font-size: 11.5px;
  color: var(--surface-500);
  flex-wrap: wrap;
}
.table-foot strong { color: var(--surface-900); font-weight: 600; }
.table-foot .accent { color: var(--primary-700); }

/* ---------------------------------------------------------------------
   FORM (Faktury form showcase)
   --------------------------------------------------------------------- */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 20px;
  padding: 0 24px 20px;
  overflow: auto;
}
.form-section {
  background: var(--surface-0);
  border: 1px solid var(--surface-200);
  border-radius: var(--r-lg);
  padding: 16px 18px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-xs);
}
.form-section h4 {
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--surface-500);
  font-weight: 600;
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
}
.form-section h4 .hint { color: var(--primary-600); font-weight: 500; text-transform: none; letter-spacing: 0; font-size: 11px; }

.fg { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.field { display: flex; flex-direction: column; gap: 4px; }
.field.wide { grid-column: span 2; }
.field label {
  font-size: 10.5px;
  color: var(--surface-500);
  letter-spacing: 0.03em;
  font-weight: 500;
  text-transform: uppercase;
}
.input {
  padding: 7px 10px;
  background: var(--surface-0);
  border: 1px solid var(--surface-200);
  border-radius: var(--r-sm);
  font-size: 13px;
  color: var(--surface-900);
}
.input.select::after { content: '▾'; float: right; color: var(--surface-400); }
.input.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }

.summary-card {
  position: sticky;
  top: 0;
  align-self: start;
  background: linear-gradient(180deg, var(--primary-50) 0%, #ffffff 60%);
  border: 1px solid var(--primary-200);
  border-radius: var(--r-lg);
  padding: 18px;
  box-shadow: var(--shadow-sm);
}
.sum-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--primary-700);
  text-transform: uppercase;
  display: block;
  margin-bottom: 12px;
}
.sum-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  padding: 5px 0;
  color: var(--surface-600);
}
.sum-row.total {
  border-top: 1px solid var(--primary-200);
  margin-top: 8px;
  padding-top: 12px;
  font-size: 18px;
  font-weight: 700;
  color: var(--surface-900);
}
.sum-row.total small { font-size: 11px; color: var(--surface-500); font-weight: 500; margin-left: 2px; }

.sum-sub {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--surface-200);
}
.sub-h { font-size: 10.5px; color: var(--surface-500); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; }
.sub-row { display: grid; grid-template-columns: 0.5fr 1fr 1fr 1fr; font-size: 11px; padding: 6px 0; color: var(--surface-700); }

.chip {
  display: inline-block;
  margin-top: 14px;
  padding: 3px 9px;
  background: var(--surface-0);
  border: 1px solid var(--surface-200);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  color: var(--primary-700);
}

/* ---------------------------------------------------------------------
   KSeF panel
   --------------------------------------------------------------------- */
.env-tabs {
  display: flex;
  gap: 6px;
  padding: 0 24px 10px;
  align-items: center;
  font-size: 13px;
}
.env {
  padding: 5px 14px;
  background: var(--surface-0);
  border: 1px solid var(--surface-200);
  border-radius: var(--r-sm);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--surface-500);
  font-weight: 600;
}
.env.active {
  background: var(--primary-600);
  color: #fff;
  border-color: var(--primary-600);
  box-shadow: 0 1px 2px rgba(79,70,229,0.2);
}
.env-desc { color: var(--surface-500); font-size: 12px; margin-left: 10px; }

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  padding: 6px 24px 14px;
}
.stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  background: var(--surface-0);
  border: 1px solid var(--surface-200);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}
.stat-ico {
  width: 28px; height: 28px;
  background: var(--primary-50);
  color: var(--primary-600);
  border-radius: var(--r-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
}
.stat-val {
  font-size: 22px;
  font-weight: 700;
  color: var(--surface-900);
  letter-spacing: -0.02em;
  line-height: 1;
}
.stat-lbl {
  font-size: 11px;
  color: var(--surface-500);
  font-weight: 500;
}

.card {
  background: var(--surface-0);
  border: 1px solid var(--surface-200);
  border-radius: var(--r-lg);
  padding: 16px 20px;
  box-shadow: var(--shadow-sm);
}
.auth-card {
  margin: 0 24px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.auth-h { font-weight: 600; font-size: 14px; color: var(--surface-900); display: block; }
.auth-sub { font-size: 12px; color: var(--surface-500); }
.auth-right { display: flex; gap: 10px; align-items: center; }

.sect-h {
  padding: 4px 24px 8px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--surface-500);
  font-weight: 600;
}

/* KSeF sent rows use different columns */
.ksef-table .tr {
  grid-template-columns: 1.4fr 1.8fr 0.8fr 1.7fr 0.9fr 1fr;
}

/* Kontrahenci columns */
.kontr-table .tr {
  grid-template-columns: 1.6fr 1fr 1.4fr 1.2fr 0.7fr 0.7fr;
}

/* Produkty columns */
.prod-table .tr {
  grid-template-columns: 0.7fr 1.8fr 0.8fr 0.5fr 0.9fr 0.6fr 1fr;
}

/* ---------------------------------------------------------------------
   Interactive page switching - sidebar drives page-view swap
   --------------------------------------------------------------------- */
.interactive .app-side a[data-page] { cursor: pointer; user-select: none; }
.interactive .app-side a[data-page]:active { transform: scale(0.98); }

.page-view {
  display: none;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  animation: pageIn 0.32s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.page-view.active { display: flex; overflow-y: auto; }
.page-view.active::-webkit-scrollbar { width: 8px; }
.page-view.active::-webkit-scrollbar-track { background: transparent; }
.page-view.active::-webkit-scrollbar-thumb { background: var(--surface-200); border-radius: 4px; }
.page-view.active::-webkit-scrollbar-thumb:hover { background: var(--surface-300); }
@keyframes pageIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------------------------------------------------------------------
   Dashboard (2-column: stats+table left, quick actions right)
   --------------------------------------------------------------------- */
.dash-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 14px;
  padding: 4px 24px 20px;
}
.dash-col-main { display: flex; flex-direction: column; gap: 14px; }

.dash-stats {
  padding: 0 !important;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.dash-stats .stat { position: relative; padding: 14px 14px 12px; }
.dash-stats .stat-val { font-size: 20px; }
.dash-stats .stat-hint {
  font-size: 10.5px;
  color: var(--surface-400);
  margin-top: 2px;
}
.stat.tone-success .stat-ico { background: var(--success-50); color: var(--success-700); }
.stat.tone-warning .stat-ico { background: var(--warning-50); color: var(--warning-700); }
.stat.tone-danger  .stat-ico { background: var(--danger-50);  color: var(--danger-700); }

.dash-card {
  padding: 0;
  overflow: hidden;
}
.dash-card-head {
  padding: 16px 18px 12px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  border-bottom: 1px solid var(--surface-100);
}
.dash-card-head h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--surface-900);
  margin-bottom: 2px;
}
.dash-card-head p {
  font-size: 11.5px;
  color: var(--surface-500);
}
.dash-link {
  font-size: 12px;
  font-weight: 600;
  color: var(--primary-700);
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s;
}
.dash-link:hover { color: var(--primary-800); }
.dash-card .data-table {
  margin: 0;
  border: none;
  border-radius: 0;
  box-shadow: none;
}
.dash-card .tr {
  grid-template-columns: 1.3fr 0.8fr 1.6fr 0.9fr 1fr 1fr;
}

.dash-col-side { display: flex; flex-direction: column; gap: 14px; }
.quick-actions-card {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.quick-actions-card h4 { font-size: 14px; font-weight: 700; color: var(--surface-900); margin-bottom: 2px; }
.quick-actions-card p  { font-size: 11.5px; color: var(--surface-500); margin-bottom: 10px; }
.quick-action {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--surface-0);
  border: 1px solid var(--surface-200);
  border-radius: var(--r);
  cursor: pointer;
  transition: all 0.18s;
}
.quick-action:hover {
  border-color: var(--primary-200);
  background: var(--primary-50);
  transform: translateX(2px);
}
.quick-action .qa-ico {
  width: 30px; height: 30px;
  background: var(--primary-50);
  color: var(--primary-600);
  border-radius: var(--r-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.quick-action:hover .qa-ico { background: #fff; }
.quick-action strong {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--surface-900);
}
.quick-action em {
  display: block;
  font-size: 11px;
  font-style: normal;
  color: var(--surface-500);
  margin-top: 1px;
}

@media (max-width: 960px) {
  .dash-grid { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------------------
   Ustawienia - tabs + sticky save bar
   --------------------------------------------------------------------- */
.set-tabs {
  display: flex;
  gap: 4px;
  padding: 0 24px;
  border-bottom: 1px solid var(--surface-200);
  margin-bottom: 14px;
  overflow-x: auto;
}
.set-tab {
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--surface-500);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.set-tab:hover { color: var(--surface-900); }
.set-tab.active {
  color: var(--primary-700);
  border-bottom-color: var(--primary-600);
}

.set-save-bar {
  margin-top: auto;
  padding: 12px 24px;
  border-top: 1px solid var(--surface-200);
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(6px);
  font-size: 11.5px;
  color: var(--success-700);
  font-weight: 600;
  letter-spacing: 0.04em;
}

.set-panel { display: none !important; }
.set-panel.active {
  display: block !important;
  animation: panelFade 0.28s cubic-bezier(0.22,0.61,0.36,1);
}
@keyframes panelFade {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.settings-single { grid-template-columns: 1fr !important; }
.settings-single .set-card { max-width: 560px; }

.set-note {
  font-size: 12.5px;
  color: var(--surface-500);
  line-height: 1.55;
  margin-top: 10px;
  padding: 10px 12px;
  background: var(--surface-50);
  border-radius: var(--r-sm);
}
.set-note code {
  font-size: 11.5px;
  background: #fff;
  padding: 1px 5px;
  border: 1px solid var(--surface-200);
}

.field-hint {
  color: var(--surface-400);
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  font-size: 11px;
  margin-left: 6px;
}

.set-tool-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-top: 1px solid var(--surface-100);
}
.set-tool-row > div { display: flex; flex-direction: column; gap: 2px; }
.set-tool-row strong { font-size: 13px; color: var(--surface-900); font-weight: 600; }
.set-tool-row span { font-size: 12px; color: var(--surface-500); }

/* ---------------------------------------------------------------------
   Ustawienia - 1:1 with real app
   --------------------------------------------------------------------- */
.page-view[data-page="ustawienia"] {
  overflow-y: auto;
}
.page-view[data-page="ustawienia"] > .set-panel,
.page-view[data-page="ustawienia"] > .set-tabs,
.page-view[data-page="ustawienia"] > .set-action-bar {
  max-width: 880px;
  margin-left: auto;
  margin-right: auto;
  width: calc(100% - 48px);
}

/* Hard-guarantee the settings tab bar renders - was collapsing under flex. */
.page-view[data-page="ustawienia"] > .set-tabs {
  display: flex !important;
  flex-shrink: 0 !important;
  min-height: 46px;
  padding: 0 !important;
  gap: 4px;
  border-bottom: 1px solid var(--surface-200);
  margin-top: 8px;
  margin-bottom: 18px;
}
.page-view[data-page="ustawienia"] .set-tabs .set-tab {
  display: inline-flex !important;
  align-items: center;
  padding: 10px 14px !important;
  font-size: 13.5px !important;
  font-weight: 500;
  color: var(--surface-500) !important;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
  transition: color 0.15s, border-color 0.15s;
}
.page-view[data-page="ustawienia"] .set-tabs .set-tab:hover { color: var(--surface-900) !important; }
.page-view[data-page="ustawienia"] .set-tabs .set-tab.active {
  color: var(--primary-700) !important;
  border-bottom-color: var(--primary-600);
}

.set-tabs.underline {
  display: flex;
  gap: 4px;
  padding: 0;
  border-bottom: 1px solid var(--surface-200);
  margin-top: 8px;
  margin-bottom: 18px;
  overflow-x: auto;
  background: transparent;
}
.set-tabs.underline .set-tab {
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--surface-500);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s, border-color 0.15s;
}
.set-tabs.underline .set-tab:hover { color: var(--surface-900); }
.set-tabs.underline .set-tab.active {
  color: var(--primary-700);
  border-bottom-color: var(--primary-600);
}

.set-card2 {
  padding: 0;
  background: var(--surface-0);
  border: 1px solid var(--surface-200);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  margin-bottom: 16px;
  overflow: hidden;
}
.set-card2 .set-card-head {
  padding: 16px 20px 12px;
  border-bottom: 1px solid var(--surface-100);
  margin: 0;
}
.set-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--surface-900);
  letter-spacing: -0.01em;
  margin: 0;
}
.set-sub {
  font-size: 12.5px;
  color: var(--surface-500);
  margin-top: 2px;
}
.set-body { padding: 18px 20px; }

/* Form fields v2 - match the app's Field + Input look */
.fg-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.fg-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 18px; }
.field2 {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.field2.span-2 { grid-column: span 2; }
.field2 label {
  font-size: 12px;
  font-weight: 600;
  color: var(--surface-700);
  letter-spacing: 0;
  text-transform: none;
}
.field2 label .req { color: var(--danger-500); font-weight: 700; }
.field2 .hint {
  font-size: 11.5px;
  color: var(--surface-500);
  line-height: 1.5;
}
.field2 .hint code { font-size: 11px; padding: 1px 5px; background: var(--surface-100); }

.input2 {
  padding: 9px 12px;
  background: var(--surface-0);
  border: 1px solid var(--surface-200);
  border-radius: var(--r-sm);
  font-size: 13.5px;
  color: var(--surface-900);
  transition: border-color 0.15s, box-shadow 0.15s;
  line-height: 1.4;
  box-shadow: var(--shadow-xs);
}
.input2:hover { border-color: var(--surface-300); }
.input2.tiny { font-size: 11.5px; }
.input2.select {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24'><path d='M6 9l6 6 6-6' fill='none' stroke='%236b7280' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}
.input2.textarea {
  min-height: 72px;
  white-space: pre-wrap;
  word-break: break-all;
  line-height: 1.55;
}
.input2.with-ico {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-left: 10px;
}
.input2.with-ico .ico { width: 15px; height: 15px; color: var(--surface-400); flex-shrink: 0; }
.input2.with-ico > span:last-child { flex: 1; min-width: 0; }

/* Blue info banner (Info icon + strong + description) */
.info-banner2 {
  margin-top: 18px;
  padding: 14px 16px;
  background: var(--info-50);
  border: 1px solid rgba(59,130,246,0.22);
  border-radius: var(--r-lg);
  color: var(--info-700);
  font-size: 13.5px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.info-banner2 > .ico { width: 16px; height: 16px; color: var(--info-500); flex-shrink: 0; margin-top: 2px; }
.info-banner2 strong {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--info-700);
  letter-spacing: -0.005em;
}
.info-banner2 > div > span {
  display: block;
  font-size: 12px;
  color: var(--info-700);
  opacity: 0.85;
  line-height: 1.55;
  margin-top: 2px;
}

/* Narzedzia danger box */
.danger-box {
  display: flex;
  gap: 14px;
  padding: 20px;
  background: rgba(239, 68, 68, 0.05);
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: var(--r-xl);
  align-items: flex-start;
}
.danger-ico {
  width: 36px; height: 36px; flex-shrink: 0;
  border-radius: var(--r);
  background: rgba(239, 68, 68, 0.15);
  color: var(--danger-500);
  display: flex;
  align-items: center;
  justify-content: center;
}
.danger-body h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--danger-700);
  margin: 0 0 6px;
  letter-spacing: -0.005em;
}
.danger-body p {
  font-size: 12.5px;
  color: rgba(185, 28, 28, 0.85);
  line-height: 1.55;
  margin: 0 0 14px;
}
.danger-body p strong { color: var(--danger-700); font-weight: 700; }

.btn-danger {
  background: var(--danger-500);
  color: #fff;
}
.btn-danger:hover { background: #dc2626; }

/* O programie - info grid */
.app-info {
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 32px;
}
.ai-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--surface-100);
  gap: 12px;
}
.ai-row dt { font-size: 13px; color: var(--surface-500); margin: 0; }
.ai-row dd { font-size: 13px; color: var(--surface-900); font-weight: 600; margin: 0; }
.ai-hwid dd {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.ai-hwid dd code {
  font-size: 11px;
  color: var(--surface-700);
  background: transparent;
  padding: 0;
  border: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 180px;
}
.btn-xs { padding: 4px 8px; font-size: 11px; letter-spacing: 0.06em; }

.app-info-actions { margin-top: 20px; }

/* Kontrahent form specifics */
.page-view[data-page="kontrahent-form"],
.page-view[data-page="faktury-form"] {
  overflow-y: auto;
}
.kform-wrap {
  max-width: 880px;
  margin: 0 auto;
  width: calc(100% - 48px);
  padding-bottom: 10px;
}

.input2.with-suffix {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-right: 4px;
}
.nip-lookup {
  font-size: 11px;
  font-weight: 600;
  color: var(--primary-700);
  background: var(--primary-50);
  border: 1px solid var(--primary-200);
  padding: 3px 9px;
  border-radius: var(--r-sm);
  cursor: pointer;
  letter-spacing: 0.02em;
}
.nip-lookup:hover { background: var(--primary-100); }

.flag-row {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}
.flag-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--surface-700);
  cursor: pointer;
}
.flag-check .checkbox {
  width: 16px; height: 16px;
  border: 1.5px solid var(--surface-300);
  border-radius: 4px;
  background: var(--surface-0);
  position: relative;
  flex-shrink: 0;
}
.flag-check .checkbox.checked {
  background: var(--primary-600);
  border-color: var(--primary-600);
}
.flag-check .checkbox.checked::after {
  content: '';
  position: absolute;
  left: 4px; top: 1px;
  width: 4px; height: 8px;
  border-right: 1.8px solid #fff;
  border-bottom: 1.8px solid #fff;
  transform: rotate(45deg);
}

/* Sticky settings action bar */
.set-action-bar {
  position: sticky;
  bottom: 14px;
  margin-top: 20px;
  margin-bottom: 14px;
  padding: 12px 18px;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(10px);
  border: 1px solid var(--surface-200);
  border-radius: var(--r-xl);
  box-shadow: 0 8px 24px -12px rgba(15,21,36,0.18), var(--shadow-sm);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  z-index: 10;
  transition: opacity 220ms ease, transform 220ms ease;
}
/* Acknowledge state - briefly fade the "unsaved changes" bar so the
   user sees that Anuluj / Zapisz zmiany actually did something. */
.set-action-bar.ack {
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
}
.set-status {
  font-size: 12px;
  color: var(--surface-500);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.set-status-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--warning-500);
}
.set-action-buttons { display: flex; gap: 8px; }

@media (max-width: 780px) {
  .fg-2, .fg-3 { grid-template-columns: 1fr; }
  .field2.span-2 { grid-column: auto; }
  .app-info { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------------------
   KSeF settings tab - real app parity
   --------------------------------------------------------------------- */
.set-card-head { margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--surface-100); }
.set-card-head .set-h { border: none; padding: 0; margin: 0; color: var(--surface-900); font-size: 14px; font-weight: 700; letter-spacing: -0.01em; text-transform: none; }
.set-card-sub { font-size: 12.5px; color: var(--surface-500); margin-top: 4px; }

.field-hint-small {
  font-size: 11.5px;
  color: var(--surface-500);
  margin-top: 6px;
  line-height: 1.5;
}

.input.textarea {
  min-height: 66px;
  padding: 10px 12px;
  white-space: pre-wrap;
  word-break: break-all;
  line-height: 1.5;
}
.input.quiet { color: var(--surface-400); font-style: italic; }

.info-banner {
  margin-top: 18px;
  padding: 14px 16px;
  background: var(--info-50);
  border: 1px solid rgba(59,130,246,0.22);
  border-radius: var(--r);
  color: var(--info-700);
}
.info-banner strong {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--info-700);
  margin-bottom: 4px;
  letter-spacing: -0.005em;
}
.info-banner p {
  font-size: 12.5px;
  color: var(--info-700);
  line-height: 1.55;
  margin: 0;
}

/* ---------------------------------------------------------------------
   Faktura form page-view
   --------------------------------------------------------------------- */
.page-view[data-page="faktury-form"] .form-grid {
  padding: 0 24px 20px;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 20px;
}
.page-view[data-page="faktury-form"] .form-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.kontrahent-card {
  margin-top: 12px;
  padding: 12px 14px;
  background: var(--surface-50);
  border: 1px solid var(--surface-200);
  border-radius: var(--r-sm);
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
}
.kontrahent-card > div:first-child {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}
.kontrahent-card strong { color: var(--surface-900); font-weight: 600; }
.kontrahent-card .mono { font-size: 11px; color: var(--surface-500); }
.kontrahent-card .small { font-size: 12px; }
.kontrahent-card .quiet { color: var(--surface-500); }

.form-items .tr { grid-template-columns: 0.3fr 2.2fr 0.6fr 0.6fr 0.9fr 0.5fr 0.9fr 1fr; font-size: 11.5px; gap: 8px; padding: 8px 10px; }
.form-items .tr.head { font-size: 9.5px; padding: 8px 10px; }

.items-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.form-actions-bar {
  margin-top: auto;
  padding: 12px 24px;
  border-top: 1px solid var(--surface-200);
  background: rgba(255,255,255,0.75);
  backdrop-filter: blur(8px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}
.form-status {
  font-size: 11.5px;
  color: var(--success-700);
  font-weight: 600;
  letter-spacing: 0.02em;
}
.form-actions-right { display: flex; gap: 8px; }

.sub-row.head {
  font-size: 9.5px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--surface-400);
  padding-bottom: 4px;
  border-bottom: 1px dashed var(--surface-200);
  margin-bottom: 4px;
}

/* Advanced filters (toggled by "Wiecej filtrow") */
.adv-filters {
  display: none;
  gap: 6px;
  padding: 0 24px 10px;
  flex-wrap: wrap;
}
.adv-filters.open { display: flex; animation: panelFade 0.25s; }
.adv-f {
  padding: 6px 10px;
  font-size: 11.5px;
  color: var(--surface-700);
  background: var(--surface-0);
  border: 1px solid var(--surface-200);
  border-radius: var(--r-sm);
}
.adv-f .mono { color: var(--surface-500); margin-right: 4px; font-size: 10px; letter-spacing: 0.04em; text-transform: uppercase; }

/* Toast for inert button clicks */
.demo-toast {
  position: absolute;
  bottom: 14px;
  right: 18px;
  padding: 8px 14px;
  background: var(--surface-900);
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  border-radius: var(--r);
  box-shadow: 0 8px 20px rgba(0,0,0,0.25);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.25s, transform 0.25s;
  pointer-events: none;
  z-index: 100;
  max-width: 280px;
}
.demo-toast.show { opacity: 1; transform: translateY(0); }
.demo-toast .t-check {
  display: inline-block;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--success-500);
  position: relative;
  margin-right: 8px;
  vertical-align: middle;
}
.demo-toast .t-check::after {
  content: '';
  position: absolute;
  left: 4px; top: 3px;
  width: 4px; height: 7px;
  border-right: 1.5px solid #fff;
  border-bottom: 1.5px solid #fff;
  transform: rotate(45deg);
}

/* Settings grid (4 cards) */
.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  padding: 4px 24px 20px;
}
.set-card { padding: 18px 20px; }
.set-h {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--surface-500);
  font-weight: 600;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--surface-100);
}
.set-card .field { margin-bottom: 10px; }
.set-card .field:last-child { margin-bottom: 0; }
.set-card .field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.kv {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 12px;
  padding: 7px 0;
  font-size: 12.5px;
  align-items: center;
  border-bottom: 1px dashed var(--surface-100);
}
.kv:last-of-type { border-bottom: none; }
.kv > span:first-child {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--surface-500);
  font-weight: 600;
}
.kv > span:last-child { color: var(--surface-900); font-weight: 500; }
.kv .tiny { font-size: 10.5px; }
.kv .quiet { color: var(--surface-400); letter-spacing: 0.1em; }

.env-inline {
  display: inline-flex;
  gap: 4px;
  padding: 3px;
  background: var(--surface-100);
  border-radius: var(--r-sm);
}
.env-inline em {
  font-style: normal;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  padding: 3px 8px;
  border-radius: 3px;
  color: var(--surface-500);
  font-weight: 600;
}
.env-inline em.on {
  background: var(--primary-600);
  color: #fff;
  box-shadow: 0 1px 2px rgba(79,70,229,0.3);
}

/* ---------------------------------------------------------------------
   3.4.x feature additions - keep these grouped at the bottom so they're
   easy to spot when reviewing what shipped after the initial demo.
   --------------------------------------------------------------------- */

/* Multi-firma switcher card on Kontrahenci list */
.firma-switch {
  margin: 4px 24px 14px;
  padding: 14px 16px;
  background: linear-gradient(180deg, var(--primary-50), var(--surface-0));
  border: 1px solid var(--primary-100);
  border-radius: var(--r-lg);
  display: flex;
  gap: 14px;
  align-items: flex-start;
  box-shadow: var(--shadow-sm);
}
.firma-switch-ico {
  width: 32px; height: 32px;
  border-radius: var(--r);
  background: var(--primary-100);
  color: var(--primary-700);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.firma-switch-body { flex: 1; min-width: 0; }
.firma-switch-label {
  display: block;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary-700);
  font-weight: 600;
  margin-bottom: 6px;
}
.firma-switch-row {
  display: grid;
  grid-template-columns: minmax(280px, 1fr);
  gap: 6px;
}
.firma-switch-select {
  font-size: 13px;
  font-weight: 500;
  color: var(--surface-900);
}
.firma-switch-hint {
  font-size: 11.5px;
  color: var(--surface-500);
  line-height: 1.5;
}

/* Bulk action bar (Faktury list) */
.bulk-bar {
  margin: 0 24px 10px;
  padding: 9px 14px;
  background: var(--info-50);
  border: 1px solid rgba(59,130,246,0.2);
  border-radius: var(--r-lg);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 12.5px;
  color: var(--info-700);
}
.bulk-left { display: flex; align-items: center; gap: 12px; }
.bulk-count { font-weight: 600; }
.bulk-num {
  display: inline-flex;
  min-width: 22px;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--info-500);
  color: #fff;
  font-weight: 700;
  font-size: 11.5px;
  margin-right: 4px;
  justify-content: center;
}
.btn-xs {
  padding: 3px 8px;
  font-size: 11px;
  letter-spacing: 0.04em;
  font-weight: 600;
}

/* MF 2026 templates info banner (Produkty list) */
.mf-banner {
  margin: 0 24px 12px;
  padding: 12px 14px;
  background: linear-gradient(180deg, #fef3c7, #fffbeb);
  border: 1px solid rgba(245,158,11,0.3);
  border-radius: var(--r-lg);
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.mf-eyebrow {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--warning-700);
  background: rgba(245,158,11,0.18);
  padding: 4px 8px;
  border-radius: 999px;
  flex-shrink: 0;
  white-space: nowrap;
}
.mf-body { flex: 1; min-width: 0; }
.mf-body strong {
  display: block;
  font-size: 13px;
  color: var(--warning-700);
  font-weight: 600;
  letter-spacing: -0.005em;
  margin-bottom: 2px;
}
.mf-body span {
  display: block;
  font-size: 12px;
  color: var(--surface-600);
  line-height: 1.55;
}

/* GTU mini badge in product table */
.bdg.bdg-mini {
  font-size: 10px;
  font-family: var(--mono);
  letter-spacing: 0.04em;
  padding: 2px 7px;
}

/* Update Produkty grid to make room for GTU column */
.prod-table .tr {
  grid-template-columns: 0.7fr 1.6fr 0.8fr 0.5fr 0.9fr 0.6fr 1fr 0.8fr;
}

/* KSeF regulatory banner (top of KSeF page) */
.ksef-reg-banner {
  margin: 4px 24px 14px;
  padding: 12px 14px;
  background: linear-gradient(180deg, #fef3c7, #fffbeb);
  border: 1px solid rgba(245,158,11,0.3);
  border-radius: var(--r-lg);
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.ksef-reg-banner > .ico {
  width: 18px; height: 18px;
  color: var(--warning-700);
  flex-shrink: 0;
  margin-top: 1px;
}
.ksef-reg-banner strong {
  display: block;
  font-size: 13px;
  color: var(--warning-700);
  font-weight: 600;
  letter-spacing: -0.005em;
  margin-bottom: 2px;
}
.ksef-reg-banner > div > span {
  display: block;
  font-size: 12px;
  color: var(--surface-600);
  line-height: 1.55;
}

/* Backup card (Ustawienia → O programie) */
.backup-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}
.backup-hint {
  padding: 12px 14px;
  background: var(--info-50);
  border: 1px solid rgba(59,130,246,0.18);
  border-radius: var(--r-lg);
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.backup-hint > .ico {
  width: 16px; height: 16px;
  color: var(--info-500);
  flex-shrink: 0;
  margin-top: 2px;
}
.backup-hint strong {
  display: block;
  font-size: 12.5px;
  color: var(--info-700);
  font-weight: 600;
  letter-spacing: -0.005em;
  margin-bottom: 2px;
}
.backup-hint > div > span {
  display: block;
  font-size: 11.5px;
  color: var(--info-700);
  opacity: 0.85;
  line-height: 1.55;
}
.backup-hint code {
  font-size: 10.5px;
  background: rgba(59,130,246,0.12);
  padding: 1px 5px;
  border-radius: 3px;
}

@media (max-width: 780px) {
  .settings-grid { grid-template-columns: 1fr; }
  .kontr-table .tr,
  .prod-table .tr,
  .ksef-table .tr { grid-template-columns: 1fr 1fr; gap: 4px; }
  .kontr-table .tr span:nth-child(n+3),
  .prod-table .tr span:nth-child(n+4),
  .ksef-table .tr span:nth-child(n+4) { display: none; }
}

/* Reports grid */
.reports-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  padding: 6px 24px 14px;
}
.r-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px;
  background: var(--surface-0);
  border: 1px solid var(--surface-200);
  border-radius: var(--r-lg);
  cursor: pointer;
  transition: all 0.18s;
  box-shadow: var(--shadow-xs);
}
.r-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); border-color: var(--primary-200); }
.r-card.active {
  background: var(--primary-50);
  border-color: var(--primary-200);
}
.r-ico {
  width: 28px; height: 28px;
  background: var(--surface-100);
  color: var(--primary-600);
  border-radius: var(--r-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
}
.r-card.active .r-ico { background: rgba(255,255,255,0.7); }
.r-name { font-weight: 600; font-size: 13px; color: var(--surface-900); }
.r-desc { font-size: 11px; color: var(--surface-500); line-height: 1.4; }

.vat-summary { margin: 0 24px 20px; }
.vat-summary h4 { font-size: 13px; margin-bottom: 12px; }

.report-panel { display: none; }
.report-panel.active {
  display: block;
  animation: panelFade 0.28s cubic-bezier(0.22,0.61,0.36,1);
}

/* Custom column layouts per report */
.rep-sprzedaz .tr { grid-template-columns: 2fr 0.5fr 1fr 1fr 1fr; }
.rep-nieoplacone .tr { grid-template-columns: 1.3fr 1.8fr 0.9fr 0.9fr 0.7fr; }
.rep-kontrahenci .tr { grid-template-columns: 0.3fr 2fr 0.5fr 1fr 1fr; }

/* MTD dashboard tiles */
.mtd-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.mtd-tile {
  padding: 14px 16px;
  background: var(--surface-0);
  border: 1px solid var(--surface-200);
  border-radius: var(--r);
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.mtd-lbl {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--surface-500);
  font-weight: 600;
}
.mtd-val {
  font-size: 20px;
  font-weight: 700;
  color: var(--surface-900);
  letter-spacing: -0.02em;
  margin-top: 2px;
}
.mtd-delta {
  font-size: 11px;
  color: var(--surface-500);
}
.mtd-delta.up { color: var(--success-700); font-weight: 600; }
@media (max-width: 900px) { .mtd-grid { grid-template-columns: 1fr 1fr; } }

@media (max-width: 960px) {
  .win-body { grid-template-columns: 180px 1fr; min-height: 560px; }
  .tr { grid-template-columns: 1.2fr 0.8fr 1.4fr 0.7fr 0.8fr 0.9fr 0.9fr; font-size: 11.5px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .reports-grid { grid-template-columns: repeat(2, 1fr); }
  .form-grid { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .win-body { grid-template-columns: 1fr; }
  .app-side { display: none; }
  .hero-shot { transform: none; }
  .tr { grid-template-columns: 1fr 1fr; gap: 4px; }
  .tr.head { display: none; }
  .tr span:nth-child(2) { display: none; }
}

/* ---------------------------------------------------------------------
   TRUST STRIP
   --------------------------------------------------------------------- */
.strip {
  padding: 44px 0;
  background: var(--surface-0);
  border-top: 1px solid var(--surface-200);
  border-bottom: 1px solid var(--surface-200);
}

/* Dedicated "We help you set up KSeF" callout - between trust strip and features. */
.ksef-help { padding: 52px 0 16px; }
.ksef-help-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 28px 32px;
  background: linear-gradient(135deg, rgba(79,70,229,0.06), rgba(16,185,129,0.05));
  border: 1px solid rgba(79,70,229,0.18);
  border-radius: 18px;
  box-shadow: 0 10px 40px -22px rgba(79,70,229,0.28);
}
.ksef-help-ico {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: rgba(79,70,229,0.12);
  color: var(--indigo-500, #4f46e5);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.ksef-help-ico::before {
  content: "";
  width: 28px;
  height: 28px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M7 18a5 5 0 010-10 6 6 0 0111.7 2 4 4 0 01-1.2 8H7z' fill='none' stroke='black' stroke-width='1.8' stroke-linejoin='round'/></svg>") center/contain no-repeat;
          mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M7 18a5 5 0 010-10 6 6 0 0111.7 2 4 4 0 01-1.2 8H7z' fill='none' stroke='black' stroke-width='1.8' stroke-linejoin='round'/></svg>") center/contain no-repeat;
}
.ksef-help-body { flex: 1; min-width: 0; }
.ksef-help-eyebrow {
  display: inline-block;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-weight: 700;
  color: var(--indigo-500, #4f46e5);
  margin-bottom: 6px;
}
.ksef-help-body h3 {
  margin: 0 0 6px 0;
  font-size: 20px;
  line-height: 1.25;
  color: var(--ink, #0f1524);
}
.ksef-help-body p {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--surface-600, #475569);
}
@media (max-width: 780px) {
  .ksef-help-inner { flex-direction: column; align-items: flex-start; gap: 18px; padding: 22px; }
  .ksef-help-body h3 { font-size: 18px; }
}
.strip-inner {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
}
.strip-label {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--surface-400);
  font-weight: 600;
}
.strip-item {
  font-size: 13px;
  color: var(--surface-600);
  font-weight: 500;
  position: relative;
  padding-left: 28px;
}
.strip-item::before {
  content: '';
  position: absolute;
  left: 0; top: 50%;
  width: 16px; height: 16px;
  transform: translateY(-50%);
  border-radius: 50%;
  background: var(--success-50);
  border: 1px solid rgba(16, 185, 129, 0.25);
}
.strip-item::after {
  content: '';
  position: absolute;
  left: 4px; top: 50%;
  width: 8px; height: 8px;
  transform: translateY(-50%) rotate(45deg);
  border-right: 1.5px solid var(--success-500);
  border-bottom: 1.5px solid var(--success-500);
  margin-top: -2px;
}

/* ---------------------------------------------------------------------
   SECTION HEAD
   --------------------------------------------------------------------- */
.section-head {
  max-width: 780px;
  margin-bottom: 48px;
}
.section-head.center { text-align: center; margin-left: auto; margin-right: auto; }

.section-title {
  font-size: clamp(28px, 3.6vw, 44px);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.12;
  color: var(--surface-900);
  margin-bottom: 14px;
}
.section-sub {
  font-size: 16px;
  color: var(--surface-500);
  max-width: 640px;
}
.section-head.center .section-sub { margin: 0 auto; }

/* ---------------------------------------------------------------------
   FEATURES
   --------------------------------------------------------------------- */
.features { padding: 100px 0; }
.feat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 960px) { .feat-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .feat-grid { grid-template-columns: 1fr; } }

.feat {
  background: var(--surface-0);
  border: 1px solid var(--surface-200);
  border-radius: var(--r-xl);
  padding: 24px 22px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s cubic-bezier(0.22,0.61,0.36,1),
              box-shadow 0.25s, border-color 0.25s;
}
.feat:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hi);
  border-color: var(--primary-200);
}
.feat-icon {
  width: 40px; height: 40px;
  background: linear-gradient(135deg, var(--primary-50), var(--primary-100));
  border-radius: var(--r);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-600);
  margin-bottom: 16px;
}
.feat h3 {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--surface-900);
  margin-bottom: 8px;
  line-height: 1.3;
}
.feat p {
  font-size: 14px;
  color: var(--surface-600);
  line-height: 1.55;
  margin-bottom: 16px;
}
.feat p em { color: var(--primary-700); font-style: normal; font-weight: 600; }
.feat p code { font-size: 12px; background: var(--surface-100); color: var(--surface-700); padding: 1px 5px; }
.feat-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-top: 1px solid var(--surface-100);
  padding-top: 14px;
}
.feat-list li {
  font-size: 12.5px;
  color: var(--surface-500);
  padding-left: 18px;
  position: relative;
}
.feat-list li::before {
  content: '';
  position: absolute;
  left: 2px; top: 6px;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--primary-500);
}

/* ---------------------------------------------------------------------
   SHOWCASE (tabbed)
   --------------------------------------------------------------------- */
.showcase { padding: 80px 0 100px; }
.tab-bar {
  display: flex;
  gap: 4px;
  justify-content: center;
  margin-bottom: 32px;
  padding: 4px;
  background: var(--surface-0);
  border: 1px solid var(--surface-200);
  border-radius: 999px;
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
  box-shadow: var(--shadow-xs);
}
.tabnav {
  padding: 8px 20px;
  font-size: 13px;
  font-weight: 600;
  color: var(--surface-500);
  border-radius: 999px;
  transition: all 0.2s;
}
.tabnav:hover { color: var(--surface-900); }
.tabnav.active {
  background: var(--primary-600);
  color: #fff;
  box-shadow: 0 1px 2px rgba(79,70,229,0.25);
}

.tab-panel { display: none; }
.tab-panel.active {
  display: block;
  animation: panelIn 0.4s cubic-bezier(0.22,0.61,0.36,1);
}
@keyframes panelIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------------------------------------------------------------------
   SPEC STRIP
   --------------------------------------------------------------------- */
.spec {
  padding: 64px 0;
  background: var(--surface-900);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.spec::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 50%, rgba(99, 102, 241, 0.15), transparent 50%),
    radial-gradient(circle at 80% 50%, rgba(99, 102, 241, 0.08), transparent 50%);
  pointer-events: none;
}
.spec-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 24px;
  position: relative;
  z-index: 1;
}
.spec-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-left: 2px solid var(--primary-500);
  padding-left: 14px;
}
.spec-num {
  font-size: clamp(32px, 3.4vw, 44px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  color: #fff;
}
.spec-lbl {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
}
@media (max-width: 900px) { .spec-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 520px) { .spec-grid { grid-template-columns: repeat(2, 1fr); } }

/* ---------------------------------------------------------------------
   PRICING
   --------------------------------------------------------------------- */
.pricing { padding: 100px 0; }
.price-wrap { max-width: 900px; margin: 0 auto; }
.price-card {
  background: var(--surface-0);
  border: 1px solid var(--surface-200);
  border-radius: var(--r-2xl);
  overflow: hidden;
  box-shadow: var(--shadow-hi);
  position: relative;
}
.price-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-500), var(--primary-700));
}
.price-head {
  padding: 22px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  border-bottom: 1px solid var(--surface-100);
  background: var(--surface-50);
  flex-wrap: wrap;
}

.period-toggle {
  display: inline-flex;
  padding: 4px;
  background: var(--surface-100);
  border: 1px solid var(--surface-200);
  border-radius: 999px;
  gap: 2px;
}
.period-toggle .pt {
  padding: 7px 16px;
  font-family: var(--font);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--surface-500);
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.22,0.61,0.36,1);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.period-toggle .pt em {
  font-style: normal;
  font-size: 10.5px;
  padding: 2px 6px;
  background: var(--success-50);
  color: var(--success-700);
  border-radius: 999px;
  letter-spacing: 0.03em;
}
.period-toggle .pt:hover { color: var(--surface-900); }
.period-toggle .pt.active {
  background: #fff;
  color: var(--primary-700);
  box-shadow: 0 1px 3px rgba(15, 21, 36, 0.08), 0 0 0 1px var(--surface-200);
}
.period-toggle .pt.active em { background: var(--primary-50); color: var(--primary-700); }
.price-plan {
  font-size: 15px;
  font-weight: 700;
  color: var(--surface-900);
  letter-spacing: -0.01em;
}
.price-tag {
  font-size: 10.5px;
  letter-spacing: 0.2em;
  color: var(--surface-400);
  text-transform: uppercase;
}
.price-body {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 0;
}
.price-left {
  padding: 28px 32px;
  border-right: 1px solid var(--surface-100);
}
.price-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.price-list li { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; color: var(--surface-700); }
.chk {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--success-50);
  display: inline-flex;
  flex-shrink: 0;
  margin-top: 1px;
  position: relative;
}
.chk::after {
  content: '';
  position: absolute;
  left: 5px; top: 3px;
  width: 5px; height: 9px;
  border-right: 1.6px solid var(--success-500);
  border-bottom: 1.6px solid var(--success-500);
  transform: rotate(45deg);
}
.price-right {
  padding: 28px 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
  background: linear-gradient(180deg, var(--primary-50) 0%, #ffffff 50%);
}
.price-num {
  display: flex;
  flex-direction: column;
  gap: 4px;
  animation: priceFade 0.3s cubic-bezier(0.22,0.61,0.36,1);
}
.price-num.hidden { display: none; }
@keyframes priceFade {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.price-val {
  font-size: clamp(68px, 8.5vw, 104px);
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--surface-900);
  line-height: 0.95;
  font-variant-numeric: tabular-nums;
}
.price-val small {
  font-size: 0.36em;
  font-weight: 700;
  color: var(--primary-600);
  letter-spacing: -0.01em;
  margin-left: 1px;
  position: relative;
  top: -0.35em;
}
.price-per {
  font-size: 14px;
  font-weight: 600;
  color: var(--surface-600);
  margin-top: 2px;
}
.price-save {
  display: inline-block;
  font-size: 11.5px;
  color: var(--success-700);
  font-weight: 600;
  margin-top: 4px;
  padding: 3px 8px;
  background: var(--success-50);
  border: 1px solid rgba(16,185,129,0.2);
  border-radius: 4px;
  width: fit-content;
}
.price-meta { font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--surface-500); }
.price-trial {
  margin: 14px 0 4px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  background: linear-gradient(135deg, rgba(16,185,129,0.08), rgba(79,70,229,0.06));
  border: 1px solid rgba(16,185,129,0.28);
  border-radius: 12px;
}
.price-trial-badge {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  color: #047857;
  background: rgba(16,185,129,0.16);
  padding: 4px 8px;
  border-radius: 6px;
  flex-shrink: 0;
  margin-top: 1px;
}
.price-trial-body { display: flex; flex-direction: column; gap: 3px; line-height: 1.45; }
.price-trial-body strong { font-size: 13.5px; color: var(--ink); font-weight: 700; }
.price-trial-body span { font-size: 12.5px; color: var(--surface-500); }
.price-pay {
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--surface-500);
  text-align: center;
}
.price-existing {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--surface-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.price-existing-text {
  font-size: 13px;
  color: var(--surface-600);
  font-weight: 500;
}
.price-foot {
  padding: 14px 28px;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  background: var(--surface-50);
  border-top: 1px solid var(--surface-100);
  color: var(--surface-500);
  flex-wrap: wrap;
}
.price-foot a {
  color: var(--primary-600);
  font-weight: 600;
  transition: color 0.2s;
}
.price-foot a:hover { color: var(--primary-700); }
@media (max-width: 700px) {
  .price-body { grid-template-columns: 1fr; }
  .price-left { border-right: none; border-bottom: 1px solid var(--surface-100); }
}

/* ---------------------------------------------------------------------
   FAQ
   --------------------------------------------------------------------- */
.faq { padding: 100px 0; background: var(--surface-0); border-top: 1px solid var(--surface-200); border-bottom: 1px solid var(--surface-200); }
.faq-inner { max-width: 860px; }
.faq-list { display: flex; flex-direction: column; }
.faq-list details {
  border-top: 1px solid var(--surface-200);
  padding: 20px 0;
}
.faq-list details:last-child { border-bottom: 1px solid var(--surface-200); }
.faq-list summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  font-size: 16px;
  font-weight: 600;
  color: var(--surface-900);
  letter-spacing: -0.01em;
  transition: color 0.2s;
}
.faq-list summary:hover { color: var(--primary-700); }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: '';
  width: 20px; height: 20px;
  flex-shrink: 0;
  background: var(--surface-100);
  border-radius: 50%;
  position: relative;
  transition: background 0.2s;
}
.faq-list summary::before {
  content: '';
  position: absolute;
  right: 5px;
  width: 10px;
  height: 10px;
  transform: rotate(45deg);
  transition: transform 0.4s cubic-bezier(0.22,0.61,0.36,1),
              margin-top 0.4s cubic-bezier(0.22,0.61,0.36,1);
  will-change: transform;
  margin-top: 6px;
  border-right: 1.5px solid var(--surface-500);
  border-bottom: 1.5px solid var(--surface-500);
}
.faq-list details[open] summary::before {
  transform: rotate(225deg);
  margin-top: 10px;
}
/* Wrapper that we animate via max-height for 60fps open/close. */
.faq-list .faq-body {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transform: translateY(-4px);
  transition: max-height 0.4s cubic-bezier(0.22,0.61,0.36,1),
              opacity 0.28s ease,
              transform 0.3s cubic-bezier(0.22,0.61,0.36,1);
  will-change: max-height, opacity, transform;
}
.faq-list details[open] .faq-body {
  opacity: 1;
  transform: translateY(0);
}
.faq-list .faq-body > p {
  margin: 0;
  padding-top: 14px;
  padding-bottom: 6px;
  font-size: 14.5px;
  color: var(--surface-600);
  line-height: 1.7;
  max-width: 720px;
}
.faq-list .faq-body p em { color: var(--surface-900); font-style: italic; font-weight: 500; }
.faq-list .faq-body p code { font-size: 12.5px; }

/* ---------------------------------------------------------------------
   FINAL CTA
   --------------------------------------------------------------------- */
.final {
  padding: 100px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse 60% 60% at 50% 100%, rgba(99, 102, 241, 0.08), transparent 70%);
}
.final-inner { max-width: 1000px; margin: 0 auto; position: relative; z-index: 1; padding: 0 var(--gutter); }
.final-title {
  font-size: clamp(32px, 4.4vw, 52px);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.1;
  text-wrap: balance;
  margin-bottom: 14px;
  color: var(--surface-900);
}
.final-sub {
  font-size: 17px;
  color: var(--surface-500);
  margin-bottom: 28px;
}
.final-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.final-meta {
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--surface-400);
}

/* ---------------------------------------------------------------------
   FOOTER
   --------------------------------------------------------------------- */
.footer {
  padding: 56px 0 24px;
  background: var(--surface-0);
  border-top: 1px solid var(--surface-200);
}
.foot-inner {
  display: grid;
  grid-template-columns: 1.2fr 2fr;
  gap: 48px;
  padding-bottom: 40px;
}
.foot-brand p {
  color: var(--surface-500);
  font-size: 13.5px;
  line-height: 1.6;
  margin-top: 14px;
  max-width: 320px;
}
.foot-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.foot-cols > div { display: flex; flex-direction: column; gap: 8px; }
.foot-h {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--surface-400);
  font-weight: 600;
  margin-bottom: 4px;
}
.foot-cols a {
  color: var(--surface-600);
  font-size: 13.5px;
  transition: color 0.15s;
}
.foot-cols a:hover { color: var(--primary-700); }

.foot-bottom {
  display: flex;
  justify-content: space-between;
  padding-top: 20px;
  border-top: 1px solid var(--surface-200);
  font-size: 11px;
  color: var(--surface-400);
  letter-spacing: 0.1em;
  flex-wrap: wrap;
  gap: 10px;
}

@media (max-width: 780px) {
  .foot-inner { grid-template-columns: 1fr; gap: 32px; }
  .foot-cols { grid-template-columns: 1fr 1fr; gap: 28px; }
}

/* ---------------------------------------------------------------------
   Data-ico resolver - renders an SVG via ::after using the symbol set
   --------------------------------------------------------------------- */
[data-ico] {
  display: inline-flex;
  width: 16px;
  height: 16px;
  align-items: center;
  justify-content: center;
}
[data-ico]::before {
  content: '';
  width: 100%;
  height: 100%;
  -webkit-mask: var(--m) center/contain no-repeat;
  mask: var(--m) center/contain no-repeat;
  background: currentColor;
}
[data-ico="dashboard"]::before { --m: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M4 4h7v7H4zM13 4h7v4h-7zM13 10h7v10h-7zM4 13h7v7H4z' fill='none' stroke='black' stroke-width='1.8' stroke-linejoin='round'/></svg>"); }
[data-ico="invoice"]::before  { --m: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M6 3h10l4 4v14H6zM16 3v4h4M9 12h8M9 16h8M9 8h4' fill='none' stroke='black' stroke-width='1.8' stroke-linejoin='round' stroke-linecap='round'/></svg>"); }
[data-ico="users"]::before    { --m: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><circle cx='9' cy='8' r='3.5' fill='none' stroke='black' stroke-width='1.8'/><path d='M3 20c0-3.3 2.7-6 6-6s6 2.7 6 6M16 11a3 3 0 100-6M21 20c0-2.5-1.8-4.6-4.2-5.2' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'/></svg>"); }
[data-ico="box"]::before      { --m: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M3 7l9-4 9 4v10l-9 4-9-4zM12 3v18M3 7l9 4 9-4' fill='none' stroke='black' stroke-width='1.8' stroke-linejoin='round'/></svg>"); }
[data-ico="cloud"]::before    { --m: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M7 18a5 5 0 010-10 6 6 0 0111.7 2 4 4 0 01-1.2 8H7z' fill='none' stroke='black' stroke-width='1.8' stroke-linejoin='round'/></svg>"); }
[data-ico="chart"]::before    { --m: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M4 20V4M4 20h16M8 16v-5M12 16V8M16 16v-3' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'/></svg>"); }
[data-ico="gear"]::before     { --m: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><circle cx='12' cy='12' r='3' fill='none' stroke='black' stroke-width='1.8'/><path d='M19.4 15a1.7 1.7 0 00.3 1.9l.1.1a2 2 0 11-2.8 2.8l-.1-.1a1.7 1.7 0 00-1.9-.3 1.7 1.7 0 00-1 1.5V21a2 2 0 11-4 0v-.1a1.7 1.7 0 00-1-1.5 1.7 1.7 0 00-1.9.3l-.1.1a2 2 0 11-2.8-2.8l.1-.1a1.7 1.7 0 00.3-1.9 1.7 1.7 0 00-1.5-1H3a2 2 0 110-4h.1a1.7 1.7 0 001.5-1 1.7 1.7 0 00-.3-1.9l-.1-.1a2 2 0 112.8-2.8l.1.1a1.7 1.7 0 001.9.3h.1a1.7 1.7 0 001-1.5V3a2 2 0 114 0v.1a1.7 1.7 0 001 1.5 1.7 1.7 0 001.9-.3l.1-.1a2 2 0 112.8 2.8l-.1.1a1.7 1.7 0 00-.3 1.9v.1a1.7 1.7 0 001.5 1H21a2 2 0 110 4h-.1a1.7 1.7 0 00-1.5 1z' fill='none' stroke='black' stroke-width='1.6' stroke-linejoin='round'/></svg>"); }
[data-ico="plus"]::before     { --m: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M12 5v14M5 12h14' stroke='black' stroke-width='2.2' stroke-linecap='round'/></svg>"); }
[data-ico="download"]::before { --m: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M12 3v12m0 0l-4-4m4 4l4-4M4 17v2a2 2 0 002 2h12a2 2 0 002-2v-2' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/></svg>"); }
[data-ico="search"]::before   { --m: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><circle cx='11' cy='11' r='7' fill='none' stroke='black' stroke-width='1.8'/><path d='M20 20l-4-4' stroke='black' stroke-width='1.8' stroke-linecap='round'/></svg>"); }
[data-ico="filter"]::before   { --m: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M3 5h18M6 12h12M10 19h4' stroke='black' stroke-width='1.8' stroke-linecap='round'/></svg>"); }
[data-ico="send"]::before     { --m: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M22 2L11 13M22 2l-7 20-4-9-9-4z' fill='none' stroke='black' stroke-width='1.8' stroke-linejoin='round' stroke-linecap='round'/></svg>"); }
[data-ico="check"]::before    { --m: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M5 12l5 5L20 7' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/></svg>"); }
[data-ico="alert"]::before    { --m: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M12 3l10 18H2z' fill='none' stroke='black' stroke-width='1.8' stroke-linejoin='round'/><path d='M12 10v5M12 18v.5' stroke='black' stroke-width='2' stroke-linecap='round'/></svg>"); }
[data-ico="clock"]::before    { --m: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><circle cx='12' cy='12' r='9' fill='none' stroke='black' stroke-width='1.8'/><path d='M12 7v5l3 2' stroke='black' stroke-width='1.8' stroke-linecap='round'/></svg>"); }
[data-ico="shield"]::before   { --m: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M12 3l8 3v5c0 5-3.5 9.5-8 10-4.5-.5-8-5-8-10V6z' fill='none' stroke='black' stroke-width='1.8' stroke-linejoin='round'/><path d='M9 12l2 2 4-4' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/></svg>"); }
[data-ico="receipt"]::before  { --m: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M5 3v18l3-2 3 2 3-2 3 2 3-2V3M9 8h6M9 12h6M9 16h4' fill='none' stroke='black' stroke-width='1.8' stroke-linejoin='round' stroke-linecap='round'/></svg>"); }
[data-ico="calendar"]::before { --m: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><rect x='3' y='5' width='18' height='16' rx='2' fill='none' stroke='black' stroke-width='1.8'/><path d='M3 10h18M8 3v4M16 3v4' stroke='black' stroke-width='1.8' stroke-linecap='round'/></svg>"); }
[data-ico="mail"]::before     { --m: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><rect x='3' y='5' width='18' height='14' rx='2' fill='none' stroke='black' stroke-width='1.8'/><path d='M3 7l9 6 9-6' fill='none' stroke='black' stroke-width='1.8' stroke-linejoin='round'/></svg>"); }
[data-ico="phone"]::before    { --m: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M5 4h4l2 5-3 2a12 12 0 006 6l2-3 5 2v4a2 2 0 01-2 2A17 17 0 013 6a2 2 0 012-2z' fill='none' stroke='black' stroke-width='1.8' stroke-linejoin='round'/></svg>"); }
[data-ico="globe"]::before    { --m: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><circle cx='12' cy='12' r='9' fill='none' stroke='black' stroke-width='1.8'/><path d='M3 12h18M12 3a14 14 0 010 18M12 3a14 14 0 000 18' fill='none' stroke='black' stroke-width='1.8'/></svg>"); }
[data-ico="file"]::before     { --m: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M6 3h9l5 5v13H6z' fill='none' stroke='black' stroke-width='1.8' stroke-linejoin='round'/><path d='M15 3v5h5' fill='none' stroke='black' stroke-width='1.8'/></svg>"); }
[data-ico="info"]::before     { --m: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><circle cx='12' cy='12' r='9' fill='none' stroke='black' stroke-width='1.8'/><path d='M12 16v-5M12 8v.5' stroke='black' stroke-width='2' stroke-linecap='round'/></svg>"); }
[data-ico="trash"]::before    { --m: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M4 7h16M9 7V5a1 1 0 011-1h4a1 1 0 011 1v2M6 7l1 13a2 2 0 002 2h6a2 2 0 002-2l1-13' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/></svg>"); }
[data-ico="copy"]::before     { --m: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><rect x='9' y='9' width='11' height='11' rx='2' fill='none' stroke='black' stroke-width='1.8'/><path d='M5 15V5a2 2 0 012-2h10' fill='none' stroke='black' stroke-width='1.8' stroke-linejoin='round'/></svg>"); }
[data-ico="key"]::before      { --m: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><circle cx='7' cy='15' r='3.5' fill='none' stroke='black' stroke-width='1.8'/><path d='M10 12l10-10M17 5l2 2M14 8l2 2' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'/></svg>"); }
[data-ico="refresh"]::before  { --m: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M4 12a8 8 0 0114-5.3L20 9M20 12a8 8 0 01-14 5.3L4 15M20 4v5h-5M4 20v-5h5' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/></svg>"); }

/* Override tint for dark sidebar icons (kept currentColor) */

/* ---------------------------------------------------------------------
   SCROLL REVEAL
   --------------------------------------------------------------------- */
.to-reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s cubic-bezier(0.22,0.61,0.36,1),
              transform 0.7s cubic-bezier(0.22,0.61,0.36,1);
  transition-delay: var(--d, 0s);
}
.to-reveal.in { opacity: 1; transform: translateY(0); }

/* ---------------------------------------------------------------------
   Friendly ambient motion - warm, subtle, not aggressive
   --------------------------------------------------------------------- */

/* Hero title fades up on load (honors reduced motion) */
.hero-title {
  animation: heroTitleIn 0.8s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}
.hero-sub {
  animation: heroTitleIn 0.8s cubic-bezier(0.22, 0.61, 0.36, 1) 0.15s both;
}
.hero-actions {
  animation: heroTitleIn 0.8s cubic-bezier(0.22, 0.61, 0.36, 1) 0.3s both;
}
.hero-meta {
  animation: heroTitleIn 0.8s cubic-bezier(0.22, 0.61, 0.36, 1) 0.45s both;
}
@keyframes heroTitleIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Eyebrow pill gentle float */
.pill {
  animation: pillFloat 4.2s ease-in-out infinite;
  will-change: transform;
}
@keyframes pillFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-3px); }
}

/* Animated sheen on the hero background gradient - very slow, ambient */
.hero-bg {
  background-size: 200% 200%;
  animation: heroSheen 22s ease-in-out infinite alternate;
}
@keyframes heroSheen {
  0%   { background-position: 0% 0%; }
  100% { background-position: 100% 20%; }
}

/* Feature card cursor-tilt (set via JS custom props --tx, --ty) */
.feat {
  transform-style: preserve-3d;
  will-change: transform;
}
.feat.tilting {
  transform: perspective(900px)
             rotateX(var(--ty, 0deg))
             rotateY(var(--tx, 0deg))
             translateY(-4px);
  box-shadow: var(--shadow-hi);
  border-color: var(--primary-200);
  transition: transform 0.08s linear, box-shadow 0.25s, border-color 0.25s;
}
.feat.tilt-reset {
  transition: transform 0.4s cubic-bezier(0.22, 0.61, 0.36, 1),
              box-shadow 0.25s, border-color 0.25s;
}

/* Period toggle - smoother spring */
.period-toggle .pt {
  transition: background 0.32s cubic-bezier(0.34, 1.3, 0.64, 1),
              color 0.2s ease,
              box-shadow 0.32s cubic-bezier(0.34, 1.3, 0.64, 1),
              transform 0.2s ease;
}
.period-toggle .pt.active {
  transform: scale(1.02);
}

/* One-shot pulse on first scroll-in for primary CTAs */
.btn-primary.cta-pulse {
  animation: ctaPulseOnce 1.5s cubic-bezier(0.22, 0.61, 0.36, 1) 1;
}
@keyframes ctaPulseOnce {
  0%   { box-shadow: 0 0 0 0 rgba(79, 70, 229, 0.35); }
  45%  { box-shadow: 0 0 0 10px rgba(79, 70, 229, 0.0); }
  100% { box-shadow: 0 0 0 0 rgba(79, 70, 229, 0); }
}

/* FAQ smooth expand-collapse polish is handled by the .faq-body
   max-height/opacity transitions above (driven by script.js). */

/* Count-up number lock (prevents jitter while animating) */
.counts.counting { font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------------
   Reduced motion - kill only the heavy/parallax stuff, keep gentle fades
   and tab transitions so the page feels alive even for users who have
   "Reduce motion" enabled at the OS level (Windows 11 default).
   --------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .hero-shot { transform: none !important; }
  .feat.tilting { transform: none !important; }
  .hero-bg { animation: none !important; }
  .pill { animation: none !important; }
  .btn-primary.cta-pulse { animation: none !important; }
}
