/* Career OS Main Application Layout & Components */
@import url('./tokens.css');

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

/* Body Layout: Left Sidebar + Main Content Wrapper */
html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
}

/* App shell with sidebar: lock html/body so that .main-wrapper is the dedicated scrolling container */
html:has(body > .app-sidebar),
html.has-app-sidebar {
  height: 100%;
  overflow: hidden;
}

body:has(> .app-sidebar),
body.has-app-sidebar {
  height: 100vh;
  width: 100vw;
  display: flex;
  flex-direction: row;
  overflow: hidden;
  box-sizing: border-box;
}

/* Standalone pages without .app-sidebar (admin, docs, auth, legal): natural document scrolling */
html:not(:has(body > .app-sidebar)):not(.has-app-sidebar) {
  height: auto;
  min-height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
}

body:not(:has(> .app-sidebar)):not(.has-app-sidebar) {
  height: auto;
  min-height: 100vh;
  width: 100%;
  display: flex;
  flex-direction: column;
  overflow-y: visible;
  overflow-x: hidden;
  box-sizing: border-box;
}

/* Resizable Left Sidebar */
.app-sidebar {
  width: var(--sidebar-width, 240px);
  min-width: 180px;
  max-width: 480px;
  background: #111113;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: relative;
  z-index: 100;
  flex-shrink: 0;
  box-sizing: border-box;
  overflow: hidden;
}

.sidebar-content {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
  padding: 16px 0;
  display: flex;
  flex-direction: column;
}

.sidebar-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  margin-top: auto;
  flex-shrink: 0;
  width: 100%;
  box-sizing: border-box;
}

.sidebar-login-btn,
.sidebar-logout-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  box-sizing: border-box;
  text-decoration: none;
  font-weight: 600;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.sidebar-login-btn {
  background: linear-gradient(180deg, #e4ded3 0%, #c9b99a 100%) !important;
  color: #121214 !important;
  border: 1px solid rgba(255, 255, 255, 0.25) !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.5) !important;
}

.sidebar-login-btn:hover {
  background: #ede8df !important;
  color: #0d0d0f !important;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.5), 0 0 16px rgba(201, 185, 154, 0.3) !important;
  transform: translateY(-1px);
}

.sidebar-login-btn:active {
  transform: translateY(0) scale(0.98);
}

.sidebar-login-btn i,
.sidebar-login-btn svg,
.sidebar-auth-account i,
.sidebar-auth-account svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.sidebar-auth {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.sidebar-auth-account {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  overflow: hidden;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-size: 11.5px;
  font-weight: 600;
  text-align: left;
}

.sidebar-auth-account span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-auth-account i,
.sidebar-auth-account svg {
  color: var(--highlight);
}

/* Sidebar Resizer Drag Handle */
.sidebar-resizer {
  width: 6px;
  cursor: col-resize;
  position: absolute;
  top: 0;
  right: -3px;
  bottom: 0;
  z-index: 110;
  transition: background var(--transition-fast);
}

.sidebar-resizer:hover, .sidebar-resizer.is-resizing {
  background: var(--highlight);
}

/* Brand Header inside Sidebar */


.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.brand-logo .logo-icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  display: block;
  color: var(--text);
}

.brand-logo .logo-icon svg,
.brand-logo img.logo-icon {
  width: 28px;
  height: 28px;
  display: block;
}

.brand-logo span.tag {
  font-size: 10px;
  background: var(--highlight-subtle);
  color: var(--highlight);
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* App Navigation inside Sidebar */
.app-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0 10px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 13px;
  transition: all var(--transition-fast);
  position: relative;
}

.nav-item svg, .nav-icon-wrap svg {
  width: 16px;
  height: 16px;
  stroke-width: 2;
  display: inline-block;
  vertical-align: middle;
  transition: transform var(--transition-fast);
}

.nav-item:hover {
  color: var(--text);
  background: var(--surface2);
}

.nav-item:hover svg, .nav-item:hover .nav-icon-wrap svg {
  transform: scale(1.05);
}

.nav-item.active {
  color: var(--highlight);
  background: rgba(201, 185, 154, 0.12);
  font-weight: 600;
}

.nav-item:active {
  transform: scale(0.98);
}

.sidebar-divider {
  height: 1px;
  background: var(--border);
  margin: 16px 0;
}

.sidebar-section-title {
  padding: 0 16px 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-dim);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* Main Content Wrapper */
.main-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  box-sizing: border-box;
}

/* Top Header Bar */
.top-bar {
  height: 56px;
  min-height: 56px;
  background: rgba(17, 17, 19, 0.92);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 90;
  box-sizing: border-box;
  flex-shrink: 0;
  backdrop-filter: blur(16px);
}

.top-bar-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Container */
.app-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 28px 24px;
  width: 100%;
  flex: 1;
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
}

.page-title-group h1 {
  font-size: 22px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}

.page-title-group p {
  color: var(--text-muted);
  font-size: 13px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--transition-fast);
  text-decoration: none;
  white-space: nowrap;
  user-select: none;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary,
a.btn-primary,
a.btn-primary:visited {
  background: linear-gradient(180deg, #f0ede8 0%, #ded9d0 100%);
  color: var(--bg);
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}
.btn-primary:hover,
a.btn-primary:hover {
  background: #f7f5f2;
  border-color: rgba(255, 255, 255, 0.4);
  color: #111113;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.4), 0 0 14px rgba(201, 185, 154, 0.2);
  transform: translateY(-1px);
}
.btn-primary:active,
a.btn-primary:active {
  transform: translateY(0) scale(0.98);
}

.btn-secondary {
  background: var(--surface2);
  color: var(--text);
  border-color: var(--border);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}
.btn-secondary:hover {
  background: var(--surface3);
  border-color: var(--border-focus);
  color: var(--text);
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}
.btn-secondary:active {
  transform: translateY(0) scale(0.98);
}

.btn-outline {
  background: transparent;
  color: var(--text-muted);
  border-color: var(--border);
}
.btn-outline:hover {
  color: var(--text);
  border-color: var(--border-focus);
  background: var(--surface2);
  transform: translateY(-1px);
}
.btn-outline:active {
  transform: translateY(0) scale(0.98);
}

.btn-danger {
  background: var(--red-subtle);
  color: var(--red);
  border-color: rgba(239, 68, 68, 0.3);
}
.btn-danger:hover {
  background: var(--red);
  color: #ffffff;
}

.btn-link {
  background: transparent;
  border-color: transparent;
  color: var(--text-muted);
  padding: 4px 8px;
  font-weight: 500;
}
.btn-link:hover {
  background: var(--surface2);
  color: var(--text);
  border-color: transparent;
}

.btn-sm {
  padding: 5px 10px;
  font-size: 12px;
}

/* Cards & Grid */
.grid {
  display: grid;
  gap: 20px;
}
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 1023px) {
  .grid-cols-3, .grid-cols-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 639px) {
  .grid-cols-2, .grid-cols-3, .grid-cols-4 { grid-template-columns: 1fr; }
  .top-bar { padding: 0 16px; }
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-sm);
}

.card:hover {
  border-color: rgba(255, 255, 255, 0.14);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Stat Cards */
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-sm);
}

.stat-card:hover {
  border-color: rgba(255, 255, 255, 0.14);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.stat-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stat-value {
  font-size: 26px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--text);
}

.stat-desc {
  font-size: 12px;
  color: var(--text-dim);
}

/* Status Pills & Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: capitalize;
}

.badge-saved { background: var(--surface3); color: var(--text-muted); }
.badge-assessing { background: var(--blue-subtle); color: var(--blue); }
.badge-tailoring { background: var(--purple-subtle); color: var(--purple); }
.badge-ready { background: var(--green-subtle); color: var(--green); }
.badge-applied { background: var(--amber-subtle); color: var(--amber); }
.badge-interview { background: var(--highlight-subtle); color: var(--highlight); }
.badge-offer { background: rgba(16, 185, 129, 0.25); color: #34d399; }
.badge-rejected { background: var(--red-subtle); color: var(--red); }
.badge-withdrawn { background: var(--surface2); color: var(--text-dim); }

.badge-verified { background: var(--green-subtle); color: var(--green); }
.badge-unverified { background: var(--amber-subtle); color: var(--amber); }
.badge-risk { background: var(--red-subtle); color: var(--red); }

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-fast);
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-container {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255, 255, 255, 0.05);
  transform: translateY(12px) scale(0.98);
  transition: transform var(--transition-fast);
}

.modal-overlay.active .modal-container {
  transform: translateY(0) scale(1);
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 {
  font-size: 17px;
  font-weight: 600;
}

.modal-body {
  padding: 24px;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  background: var(--surface2);
}

/* Forms */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.form-control {
  width: 100%;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 9px 12px;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 13.5px;
  transition: var(--transition-fast);
}

.form-control:focus {
  border-color: var(--highlight);
  outline: none;
  box-shadow: 0 0 0 2px rgba(201, 185, 154, 0.2);
}

textarea.form-control {
  min-height: 90px;
  resize: vertical;
}

select.form-control {
  cursor: pointer;
}

.form-row {
  display: flex;
  gap: 16px;
}

.form-row .form-group {
  flex: 1;
}

/* Toast System */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 2000;
}

.toast-item {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 18px;
  font-size: 13px;
  color: var(--text);
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideIn 0.2s ease forwards;
}

.toast-item.success { border-color: rgba(109, 184, 138, 0.4); }
.toast-item.error { border-color: rgba(224, 92, 92, 0.4); }
.toast-item.warning { border-color: rgba(212, 163, 115, 0.4); }

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
}
.empty-state svg {
  width: 42px;
  height: 42px;
  color: var(--text-dim);
  margin-bottom: 12px;
}
.empty-state h4 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}
.empty-state p {
  font-size: 13px;
  margin-bottom: 18px;
}

/* Utility Lists & Tables */
.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
}

.data-table th {
  padding: 12px 16px;
  background: var(--surface2);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border);
}

.data-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}

.data-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

/* Hide nested scrollbars on sidebars */
.app-sidebar, .sidebar-content, .resume-right-sidebar, .site-left-sidebar, nav#sidebar-nav {
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}

.app-sidebar::-webkit-scrollbar,
.sidebar-content::-webkit-scrollbar,
.resume-right-sidebar::-webkit-scrollbar,
.site-left-sidebar::-webkit-scrollbar,
nav#sidebar-nav::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

/* Fixed Non-Scrollable Sidebars & Pixel-Perfect Alignment */
.app-sidebar, .site-left-sidebar {
  width: var(--sidebar-width, 240px) !important;
  min-width: 180px !important;
  max-width: 480px !important;
  position: sticky !important;
  top: 0 !important;
  height: 100vh !important;
  flex-shrink: 0 !important;
  z-index: 100 !important;
  box-sizing: border-box !important;
}

.resume-right-sidebar {
  width: var(--right-sidebar-width, 280px) !important;
  min-width: 180px !important;
  max-width: 600px !important;
  position: relative !important;
}

.sidebar-content {
  overflow-y: auto !important;
}

.resume-right-sidebar nav#sidebar-nav {
  overflow: hidden !important;
  overflow-y: hidden !important;
}

header, 
.top-bar, 
.editor-top-bar {
  height: 56px !important;
  min-height: 56px !important;
  max-height: 56px !important;
  padding: 0 24px !important;
  margin: 0 !important;
  border-bottom: 1px solid var(--border) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  box-sizing: border-box !important;
  position: sticky !important;
  top: 0 !important;
  z-index: 90 !important;
}

.app-sidebar, 
.site-left-sidebar {
  padding-top: 0 !important;
  margin-top: 0 !important;
  border-right: 1px solid var(--border) !important;
  box-sizing: border-box !important;
}

.sidebar-content {
  padding-top: 12px !important;
}

/* Pixel-Perfect Continuous 56px Top Header Border Line & '+' Crosshair Intersection Across ALL Pages */
.sidebar-brand, 
.site-left-sidebar .brand-logo, 
.app-sidebar .sidebar-brand {
  height: 56px !important;
  min-height: 56px !important;
  max-height: 56px !important;
  padding: 0 16px !important;
  margin: 0 !important;
  border-bottom: 1px solid var(--border) !important;
  display: flex !important;
  align-items: center !important;
  box-sizing: border-box !important;
  flex-shrink: 0 !important;
}

.top-bar, 
header.top-bar, 
.editor-top-bar {
  height: 56px !important;
  min-height: 56px !important;
  max-height: 56px !important;
  padding: 0 24px !important;
  margin: 0 !important;
  border-bottom: 1px solid var(--border) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  box-sizing: border-box !important;
  position: sticky !important;
  top: 0 !important;
  z-index: 90 !important;
}

.app-sidebar, 
.site-left-sidebar {
  padding-top: 0 !important;
  margin-top: 0 !important;
  border-right: 1px solid var(--border) !important;
  box-sizing: border-box !important;
}

.sidebar-content {
  padding-top: 12px !important;
}

/* Navigation Breathing Room Padding below 56px Header Line */
.app-nav, 
.site-left-sidebar .app-nav {
  display: flex !important;
  flex-direction: column !important;
  gap: 4px !important;
  padding: 12px 10px 0 10px !important;
}

.right-sidebar-content, 
.resume-right-sidebar nav#sidebar-nav {
  padding: 12px 0 0 0 !important;
}

.sidebar-content {
  padding-top: 0 !important;
}

/* Remove light accent border line on left side when nav item is selected */
.nav-item.active,
.app-nav .nav-item.active,
.site-left-sidebar .nav-item.active {
  border-left: none !important;
}

.resume-right-sidebar nav#sidebar-nav a.active {
  border-left: none !important;
}

/* Right Sidebar Resizer Handle & Width Variables */
.resume-right-sidebar {
  width: var(--right-sidebar-width, 260px) !important;
  min-width: 180px !important;
  max-width: 600px !important;
  position: relative !important;
}


.sidebar-resizer.left-resizer:hover,
.sidebar-resizer.left-resizer.resizing {
  background: var(--highlight) !important;
}


/* Copilot Markdown Tables & Code Formatting */
.copilot-markdown-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 10px 0;
  font-size: 11.5px;
}
.copilot-markdown-content th, .copilot-markdown-content td {
  border: 1px solid var(--border);
  padding: 6px 8px;
  text-align: left;
}
.copilot-markdown-content th {
  background: var(--surface2);
  color: var(--highlight);
  font-weight: 600;
}
.copilot-markdown-content p {
  margin: 0 0 8px 0;
  line-height: 1.5;
}
.copilot-markdown-content ul, .copilot-markdown-content ol {
  margin: 6px 0 8px 18px;
  padding: 0;
}
.copilot-markdown-content li {
  margin-bottom: 4px;
}
.copilot-markdown-content pre {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px;
  overflow-x: auto;
  margin: 8px 0;
}
.copilot-markdown-content code {
  font-family: monospace;
  font-size: 11px;
  background: var(--surface2);
  border-radius: 3px;
  padding: 2px 4px;
  color: var(--highlight);
}


/* Delete / Cross Icon Styling for Bullet Rows */
.icon-btn.danger {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: var(--text-muted) !important;
  border: 1px solid var(--border) !important;
  border-radius: 4px !important;
  background: var(--surface2) !important;
  transition: all 0.15s ease !important;
}
.icon-btn.danger:hover {
  color: #ff5f56 !important;
  border-color: rgba(255, 95, 86, 0.4) !important;
  background: rgba(255, 95, 86, 0.1) !important;
}


/* Right Sidebar Vertical Dividing Line & Chat Empty State */
.resume-right-sidebar {
  border-left: 1px solid var(--border) !important;
  box-sizing: border-box !important;
}

.athena-empty-prompt-card,
.hermes-empty-prompt-card,
.rajat-empty-prompt-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 11.5px;
  color: var(--text-muted);
  text-align: left;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.athena-empty-prompt-card:hover,
.hermes-empty-prompt-card:hover,
.rajat-empty-prompt-card:hover {
  border-color: var(--highlight);
  color: var(--text);
  background: rgba(201, 185, 154, 0.08);
}


/* Tab Button Pointer Fix */
.tab-btn {
  cursor: pointer !important;
  pointer-events: auto !important;
  user-select: none !important;
  position: relative !important;
  z-index: 10 !important;
}
.tab-btn * {
  pointer-events: none !important;
}


.sidebar-resizer.left-resizer {
  width: 8px !important;
  cursor: col-resize !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  bottom: 0 !important;
  z-index: 1000 !important;
  background: transparent !important;
  transition: background 0.15s, box-shadow 0.15s !important;
}

.sidebar-resizer.left-resizer:hover,
.sidebar-resizer.left-resizer.resizing {
  background: var(--highlight) !important;
  box-shadow: 0 0 10px rgba(201, 185, 154, 0.7) !important;
}


/* Right Sidebar Drag Resizer Bar Styling */
.resume-right-sidebar {
  position: relative !important;
}

.sidebar-resizer.left-resizer {
  width: 10px !important;
  cursor: col-resize !important;
  position: absolute !important;
  top: 0 !important;
  left: -5px !important;
  bottom: 0 !important;
  z-index: 9999 !important;
  background: transparent !important;
  transition: background 0.15s, box-shadow 0.15s !important;
}

.sidebar-resizer.left-resizer:hover,
.sidebar-resizer.left-resizer.resizing {
  background: var(--highlight) !important;
  box-shadow: 0 0 10px rgba(201, 185, 154, 0.8) !important;
}


/* 3-Column Editor Layout Flex Mechanics */
.main-wrapper {
  display: flex !important;
  flex-direction: column !important;
  flex: 1 !important;
  height: 100vh !important;
  min-height: 0 !important;
  min-width: 0 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  position: relative !important;
  box-sizing: border-box !important;
}

.editor-workspace-row {
  display: flex !important;
  flex-direction: row !important;
  flex: 1 !important;
  height: calc(100vh - 56px) !important;
  width: 100% !important;
  overflow: hidden !important;
}

.editor-workspace-row main {
  flex: 1 !important;
  height: 100% !important;
  overflow-y: auto !important;
  box-sizing: border-box !important;
  padding: 24px 36px !important;
  min-width: 0 !important;
  max-width: none !important;
}

.resume-right-sidebar {
  width: var(--right-sidebar-width, 280px) !important;
  min-width: 180px !important;
  max-width: 600px !important;
  height: 100% !important;
  background: var(--surface) !important;
  border-left: 1px solid var(--border) !important;
  display: flex !important;
  flex-direction: column !important;
  box-sizing: border-box !important;
  position: relative !important;
  flex-shrink: 0 !important;
  overflow: hidden !important;
  margin-left: auto !important;
}

@keyframes rajatSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.rajat-thinking-pill {
  box-shadow: 0 0 12px rgba(201, 185, 154, 0.12);
  transition: all 0.25s ease-in-out;
}

.rajat-thinking-pill:hover {
  border-color: var(--highlight);
  background: rgba(201, 185, 154, 0.12) !important;
}

/* Knowledge Base Tabs & Styling */
.kb-tab-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 6px;
  align-items: flex-end;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
  overflow: visible;
  min-width: 0;
}

.kb-tab-btn {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
  white-space: nowrap;
  flex: 0 0 auto;
  max-width: 100%;
}

.kb-tab-btn:hover {
  color: var(--text);
  background: var(--surface2);
  border-radius: 6px 6px 0 0;
}

.kb-tab-btn.active {
  color: var(--highlight);
  border-bottom-color: var(--highlight);
  font-weight: 600;
}

.tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 10px;
  min-width: 16px;
  height: 16px;
  line-height: 1;
}

.kb-tab-btn.active .tab-badge {
  background: rgba(201, 185, 154, 0.15);
  border-color: rgba(201, 185, 154, 0.35);
  color: var(--highlight);
}

.kb-tab-content {
  display: none;
  animation: fadeIn 0.15s ease;
}

.kb-tab-content.active {
  display: block;
}

.kb-tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 12px;
  color: var(--text);
  transition: border-color 0.15s;
}

.kb-tag-chip:hover {
  border-color: var(--highlight);
}

.kb-tag-chip button {
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: 0;
  font-size: 13px;
  line-height: 1;
}

.kb-tag-chip button:hover {
  color: var(--red);
}

.app-page-footer {
  border-top: 1px solid var(--border);
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--text-muted);
  flex-wrap: wrap;
  gap: 12px;
}

.app-page-footer a {
  color: var(--text-muted);
  text-decoration: none;
}

.app-page-footer a:hover {
  color: var(--highlight);
}

.error-hero {
  text-align: center;
  padding: 12px 0 8px;
}

.error-code {
  font-family: var(--font-mono);
  font-size: 72px;
  font-weight: 700;
  color: var(--highlight);
  letter-spacing: -2px;
  line-height: 1;
  margin-bottom: 12px;
}

.error-link-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin: 20px 0 8px;
}

.error-link-card {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 16px;
}

.error-link-card:hover {
  border-color: var(--highlight);
  background: var(--surface2);
}

.error-link-icon {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: var(--highlight-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--highlight);
  flex-shrink: 0;
}

.legal-prose {
  max-width: 820px;
}

.legal-prose h2 {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  margin: 28px 0 10px;
}

.legal-prose p,
.legal-prose li {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.legal-prose ul {
  padding-left: 20px;
  margin-bottom: 14px;
}

.legal-prose code {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text);
}

.hub-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.hub-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-decoration: none;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 20px;
}

.hub-card:hover {
  border-color: var(--highlight);
  background: var(--surface2);
}

.hub-card-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--highlight-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--highlight);
  margin-bottom: 14px;
}

.consent-card {
  max-width: 480px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 24px;
}

.consent-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.consent-actions .btn {
  flex: 1;
  justify-content: center;
}

.consent-banner-inner {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
}

#career-consent-banner {
  position: fixed;
  left: calc(var(--sidebar-width, 240px) + 24px);
  right: 24px;
  max-width: 860px;
  bottom: 24px;
  z-index: 1000;
  background: var(--surface1, var(--surface));
  border: 1px solid var(--border-focus, var(--border));
  border-radius: 12px;
  padding: 16px 20px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(12px);
}

body:not(:has(.app-sidebar)):not(.has-app-sidebar) #career-consent-banner {
  left: 24px;
  right: 24px;
  top: 72px;
  bottom: auto;
  margin: 0 auto;
}

body:has(#career-consent-banner):not(:has(.app-sidebar)):not(.has-app-sidebar) .auth-container {
  padding-top: 160px;
}

@media (max-width: 768px) {
  #career-consent-banner {
    left: 12px;
    right: 12px;
    bottom: 12px;
    max-width: none;
    padding: 14px 16px;
  }
}

@media (max-width: 639px) {
  body.has-app-sidebar #career-consent-banner {
    top: auto;
    bottom: calc(58px + env(safe-area-inset-bottom) + 8px);
    left: 8px;
    right: 8px;
    max-width: none;
    max-height: min(30dvh, 200px);
    overflow-y: auto;
    padding: 10px 12px;
    z-index: 255;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
  }

  body.has-app-sidebar #career-consent-banner p {
    font-size: 12px;
    line-height: 1.45;
    margin-top: 4px;
  }

  body.has-app-sidebar .consent-banner-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  body.has-app-sidebar .consent-banner-actions {
    width: 100%;
    justify-content: stretch;
  }

  body.has-app-sidebar .consent-banner-actions .btn {
    flex: 1 1 0;
    justify-content: center;
  }

  #career-consent-deny {
    color: var(--text) !important;
    border-color: color-mix(in srgb, var(--text-muted) 55%, var(--border)) !important;
    background: var(--surface2) !important;
  }
}

#career-consent-banner p {
  margin: 6px 0 0;
  font-size: 12.5px;
  color: var(--text-muted);
  max-width: 640px;
  line-height: 1.5;
}

.consent-banner-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
  align-items: center;
}

#career-offline-banner {
  position: fixed;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 90;
  background: var(--amber-subtle, rgba(245, 158, 11, 0.15));
  color: var(--amber, #f59e0b);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 12.5px;
  font-weight: 600;
}

/* Public marketing landing (/) — no app sidebar */
body.marketing-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(1200px 480px at 50% -80px, rgba(201, 185, 154, 0.08), transparent 60%),
    var(--bg);
}

.mkt-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 28px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.mkt-nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 13px;
}

.mkt-nav-links a:not(.btn) {
  color: var(--text-muted);
  text-decoration: none;
}

.mkt-nav-links a:not(.btn):hover {
  color: var(--text);
}

.mkt-hero {
  max-width: 760px;
  margin: 0 auto;
  padding: 72px 24px 40px;
}

.mkt-kicker {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--highlight);
  font-weight: 600;
  margin-bottom: 14px;
}

.mkt-hero h1 {
  font-size: clamp(32px, 5vw, 48px);
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
}

.mkt-lead,
.mkt-fine {
  color: var(--text-muted);
  line-height: 1.6;
  font-size: 16px;
}

.mkt-fine {
  font-size: 13px;
  margin-top: 16px;
}

.mkt-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.mkt-section {
  max-width: 960px;
  margin: 0 auto;
  padding: 24px 24px 56px;
}

.mkt-section h2 {
  font-size: 22px;
  margin-bottom: 18px;
}

.mkt-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.mkt-grid .card p,
.mkt-list {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.55;
}

.mkt-list {
  padding-left: 18px;
  margin-bottom: 20px;
  max-width: 720px;
}

.mkt-list li + li {
  margin-top: 8px;
}

.mkt-footer {
  margin-top: auto;
  border-top: 1px solid var(--border);
  padding: 20px 28px 32px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: var(--text-muted);
}

.mkt-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.mkt-footer a,
.mkt-hero a:not(.btn),
.mkt-section a:not(.btn) {
  color: var(--highlight);
}

/* Auth progress: moving line while a session is created, then a filled bar. */
.auth-progress {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.auth-progress[hidden] {
  display: none !important;
}

.auth-progress-track {
  position: relative;
  height: 3px;
  border-radius: 99px;
  background: var(--surface3);
  overflow: hidden;
}

.auth-progress-bar {
  position: absolute;
  top: 0;
  left: -40%;
  width: 40%;
  height: 100%;
  border-radius: 99px;
  background: var(--highlight);
}

.auth-progress.is-working .auth-progress-bar {
  animation: auth-progress-slide 1.05s ease-in-out infinite;
}

.auth-progress.is-done .auth-progress-bar {
  animation: none;
  left: 0;
  width: 100%;
}

.auth-progress-label {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--highlight);
  text-align: center;
}

/* Below desktop the moving auth bar and its status text stay readable. */
@media (max-width: 1023px) {
  .auth-progress-track {
    height: 4px;
  }

  .auth-progress-label {
    font-size: 14px;
  }
}

@keyframes auth-progress-slide {
  0% { left: -40%; }
  100% { left: 100%; }
}

@keyframes auth-progress-pulse {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .auth-progress.is-working .auth-progress-bar {
    animation: auth-progress-pulse 1.2s ease-in-out infinite;
    left: 0;
    width: 100%;
  }
}

.auth-mode-switch {
  margin: 10px 0 0;
  font-size: 12.5px;
  color: var(--text-muted);
}

.auth-text-btn {
  background: none;
  border: none;
  padding: 0;
  color: var(--highlight);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
}

.auth-card.is-auth-busy .auth-tabs,
.auth-card.is-auth-busy .oauth-group,
.auth-card.is-auth-busy .divider,
.auth-card.is-auth-busy #standalone-auth-form,
.auth-card.is-auth-busy .auth-mode-switch {
  opacity: 0.4;
  pointer-events: none;
}

.auth-modal-signup-hint {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.45;
}

.auth-modal-signup-hint a {
  color: var(--highlight);
}

/* Responsive locks: phone ≤639, tablet 640–1023, desktop ≥1024.
   Desktop sidebar rules above stay in force at ≥1024. */
.rail-toggle,
.phone-tabbar,
.phone-more,
.phone-more-backdrop,
.right-nav-toggle {
  display: none;
}

.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  position: relative;
}

.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }

@media (max-width: 1023px) {
  html body {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
  }

  body .app-layout {
    width: 100% !important;
    max-width: 100% !important;
  }

  body .sidebar-resizer,
  body .sidebar-resizer.left-resizer {
    display: none !important;
    pointer-events: none !important;
  }

  body .main-wrapper {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  body .page-header,
  body .card-header,
  body .page-title-group,
  body .top-bar-title {
    min-width: 0;
    max-width: 100%;
  }

  body .top-bar-title {
    flex: 1 1 auto;
  }

  body .top-bar-title,
  body .page-title-group h1,
  body .card-title {
    display: block;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body .top-bar-title i,
  body .top-bar-title svg,
  body .card-title i,
  body .card-title svg {
    display: inline-block;
    vertical-align: -3px;
    margin-right: 6px;
  }

  body .btn,
  body .nav-item,
  body .kb-tab-btn,
  body .auth-tab-btn,
  body .oauth-btn,
  body .btn-submit,
  body .btn-magic,
  body .rail-toggle,
  body .phone-tab,
  body .form-control:not(textarea),
  body .form-input,
  body select.form-control {
    min-height: 44px !important;
    min-width: 44px !important;
  }

  body .btn:focus-visible,
  body .nav-item:focus-visible,
  body .phone-tab:focus-visible,
  body .kb-tab-btn:focus-visible {
    outline: 2px solid var(--highlight);
    outline-offset: 2px;
  }

  body .right-nav-toggle {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
  }

  body .resume-right-sidebar {
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: min(340px, 92vw) !important;
    min-width: 0 !important;
    max-width: 92vw !important;
    height: 100dvh !important;
    margin: 0 !important;
    transform: translateX(105%) !important;
    visibility: hidden !important;
    pointer-events: none !important;
    z-index: 240 !important;
  }

  body.right-nav-open .resume-right-sidebar {
    transform: translateX(0) !important;
    visibility: visible !important;
    pointer-events: auto !important;
  }

  body .editor-workspace-row {
    min-height: 0 !important;
    flex: 1 1 auto !important;
    overflow: hidden !important;
  }

  body .editor-workspace-row main {
    padding: 16px !important;
    min-width: 0 !important;
    overflow-x: hidden !important;
  }

  body .grid > *,
  body .card,
  body .app-container,
  body .table-responsive {
    min-width: 0 !important;
    max-width: 100% !important;
  }

  body .table-responsive {
    display: block !important;
    width: 100% !important;
    overflow-x: hidden !important;
  }

  body .data-table {
    min-width: 0 !important;
    width: 100% !important;
    display: block;
  }

  body .data-table thead { display: none; }

  body .data-table tbody,
  body .data-table tr,
  body .data-table td {
    display: block;
    width: 100% !important;
    box-sizing: border-box;
  }

  body .data-table td[data-label] {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
  }

  body .data-table td[data-label]::before {
    content: attr(data-label);
    flex: 1 1 100%;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-muted);
  }

  body .form-control[style*="min-width"],
  body select.form-control[style*="min-width"],
  body input.form-control[style*="min-width"] {
    min-width: 0 !important;
    flex: 1 1 calc(50% - 12px) !important;
    width: auto !important;
    max-width: 100% !important;
  }

  .app-container [style*="grid-template-columns: 2fr"],
  .app-container [style*="grid-template-columns:2fr"],
  .app-container [style*="grid-template-columns: repeat(4"],
  .app-container [style*="grid-template-columns:repeat(4"],
  .app-container [style*="grid-template-columns: 1.1fr"],
  .app-container [style*="grid-template-columns:1.1fr"] {
    grid-template-columns: 1fr 1fr !important;
  }

  body .card div[style*="display: flex"],
  body .card div[style*="display:flex"],
  body .job-card div[style*="display: flex"],
  body .job-card div[style*="display:flex"],
  body .discovery-feed-banner {
    flex-wrap: wrap !important;
    min-width: 0 !important;
  }

  /* Auth progress (.auth-progress-track / .auth-progress-label) is owned by #19.
     The email divider is not that bar. */
  body .auth-header {
    height: auto !important;
    max-height: none !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
  }

  body .auth-card .form-input,
  body .oauth-btn,
  body .btn-submit,
  body .btn-magic {
    width: 100% !important;
    box-sizing: border-box !important;
  }

  body.marketing-page header.mkt-nav,
  body .mkt-nav {
    height: auto !important;
    max-height: none !important;
    flex-wrap: wrap !important;
    padding: 12px 16px !important;
  }

  body .mkt-nav-links a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }

  body .job-card:hover,
  body .hub-card:hover,
  body .card:hover,
  body .oauth-btn:hover,
  body .btn:hover {
    transform: none !important;
  }
}

@media (min-width: 640px) and (max-width: 1023px) {
  body .app-sidebar,
  body .site-left-sidebar {
    display: flex !important;
    width: 72px !important;
    min-width: 72px !important;
    max-width: 72px !important;
    position: sticky !important;
    top: 0 !important;
    height: 100vh !important;
    height: 100dvh !important;
    transform: none !important;
    visibility: visible !important;
    pointer-events: auto !important;
    overflow: hidden !important;
  }

  body.rail-expanded .app-sidebar,
  body.rail-expanded .site-left-sidebar {
    width: 240px !important;
    min-width: 240px !important;
    max-width: 240px !important;
  }

  body .rail-toggle {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 44px !important;
    height: 44px !important;
    margin: 8px auto !important;
    padding: 0 !important;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface2);
    color: var(--text);
    cursor: pointer;
    flex: 0 0 auto;
  }

  body:not(.rail-expanded) .brand-logo span,
  body:not(.rail-expanded) .sidebar-auth-account span {
    display: none !important;
  }

  body:not(.rail-expanded) .nav-label {
    display: none !important;
  }

  body:not(.rail-expanded) .nav-item.active {
    color: var(--highlight) !important;
    flex-direction: column !important;
  }

  body:not(.rail-expanded) .nav-item.active .nav-label {
    display: block !important;
    color: var(--highlight) !important;
    max-width: 64px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 10px;
    line-height: 1.2;
    font-weight: 600;
  }

  body:not(.rail-expanded) .app-nav .nav-item {
    justify-content: center !important;
    min-height: 44px !important;
    min-width: 44px !important;
    padding: 6px 4px !important;
  }

  body.rail-expanded .nav-item.active,
  body.rail-expanded .nav-item.active .nav-label {
    color: var(--highlight) !important;
  }

  body:not(.rail-expanded) .sidebar-login-btn,
  body:not(.rail-expanded) .sidebar-logout-btn {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    padding: 0 !important;
    margin: 0 auto;
    overflow: hidden !important;
    white-space: nowrap !important;
    color: transparent !important;
  }

  body:not(.rail-expanded) .sidebar-login-btn svg,
  body:not(.rail-expanded) .sidebar-login-btn i {
    color: #16130e !important;
  }

  body:not(.rail-expanded) .sidebar-logout-btn svg,
  body:not(.rail-expanded) .sidebar-logout-btn i {
    color: var(--text) !important;
  }

  body:not(.rail-expanded) .sidebar-footer {
    padding: 8px !important;
  }
}

@media (max-width: 639px) {
  body .app-sidebar,
  body .site-left-sidebar {
    display: none !important;
    width: 0 !important;
    min-width: 0 !important;
    max-width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    visibility: hidden !important;
    pointer-events: none !important;
    position: absolute !important;
  }

  body nav.phone-tabbar,
  body .phone-tabbar {
    display: flex !important;
    position: fixed !important;
    top: auto !important;
    left: 0;
    right: 0;
    bottom: 0;
    height: auto !important;
    max-height: none !important;
    z-index: 260;
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: 4px 2px calc(4px + env(safe-area-inset-bottom));
    box-sizing: border-box;
    gap: 2px;
  }

  body .phone-tab {
    flex: 1 1 0;
    min-width: 44px !important;
    min-height: 44px !important;
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    color: var(--text-muted);
    text-decoration: none;
    background: transparent;
    border: 0;
    font: inherit;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 2px;
    cursor: pointer;
  }

  body .phone-tab svg {
    width: 18px;
    height: 18px;
  }

  body .phone-tab.active,
  body .phone-tab.active .phone-tab-label {
    color: var(--highlight);
  }

  body .phone-tab-label {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body.more-open .phone-more-backdrop {
    display: block !important;
    position: fixed;
    inset: 0;
    z-index: 240;
    border: 0;
    background: rgba(0, 0, 0, 0.55);
  }

  body.more-open .phone-more {
    display: flex !important;
    flex-direction: column;
    position: fixed;
    left: 0;
    right: 0;
    bottom: calc(58px + env(safe-area-inset-bottom));
    max-height: min(70dvh, 480px);
    overflow-y: auto;
    z-index: 250;
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: 8px;
    box-sizing: border-box;
  }

  body .phone-more .nav-item.active,
  body .phone-more .nav-item.active .nav-label {
    color: var(--highlight);
  }

  body .phone-more-account {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 8px 12px 12px;
    min-width: 0;
  }

  body .phone-more-account .nav-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body .main-wrapper {
    height: 100dvh !important;
    max-height: 100dvh !important;
    padding-bottom: calc(62px + env(safe-area-inset-bottom)) !important;
    box-sizing: border-box !important;
  }

  body .header-actions:not(:empty) {
    display: flex !important;
    flex-wrap: wrap !important;
    width: 100% !important;
    max-width: 100% !important;
    gap: 8px !important;
  }

  body .btn-primary {
    width: 100% !important;
  }

  body .top-bar .header-actions .btn,
  body .top-bar .header-actions .btn-primary {
    width: auto !important;
    flex: 1 1 calc(50% - 4px);
    min-width: 0;
  }

  body .top-bar .right-nav-toggle {
    flex: 1 1 100% !important;
    order: -1;
    margin-bottom: 2px;
  }

  body .form-row {
    flex-direction: column !important;
  }

  body .form-control[style*="min-width"],
  body select.form-control[style*="min-width"],
  body input.form-control[style*="min-width"] {
    flex: 1 1 100% !important;
    width: 100% !important;
  }

  .app-container [style*="grid-template-columns"],
  .main-wrapper [style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
  }

  body .field-row,
  body .field-row.triple,
  body .skill-row-item {
    grid-template-columns: 1fr !important;
  }

  body .grid-cols-2,
  body .grid-cols-3,
  body .grid-cols-4 {
    grid-template-columns: 1fr !important;
  }

  body .grid > [style*="grid-column"] {
    grid-column: auto !important;
  }

  body .app-container {
    padding: 16px !important;
  }

  body header.top-bar,
  body .top-bar {
    height: auto !important;
    min-height: 56px !important;
    max-height: none !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    padding: 8px 12px !important;
  }

  #toast-container,
  #toast {
    left: 12px !important;
    right: 12px !important;
    bottom: calc(72px + env(safe-area-inset-bottom)) !important;
    max-width: none !important;
  }

  body.has-app-sidebar:has(.app-layout) {
    height: 100dvh !important;
    max-height: 100dvh !important;
    flex-direction: column !important;
    overflow: hidden !important;
  }

  body.has-app-sidebar:has(.app-layout) .app-layout {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    min-width: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
    max-height: 100% !important;
    overflow: hidden !important;
  }

  body.has-app-sidebar:has(.app-layout) .main-wrapper {
    overflow: hidden !important;
    flex: 1 1 auto !important;
    min-height: 0 !important;
    height: auto !important;
    max-height: none !important;
  }

  body.has-app-sidebar:has(.app-layout) .editor-workspace-row {
    height: auto !important;
    max-height: none !important;
    flex: 1 1 auto !important;
    min-height: 0 !important;
  }

  body.has-app-sidebar:has(.app-layout) .editor-workspace-row main {
    height: auto !important;
    flex: 1 1 auto !important;
    min-height: 0 !important;
    width: 100% !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  body.has-app-sidebar .top-bar {
    z-index: 270;
    position: relative;
  }

  body.right-nav-open .resume-right-sidebar {
    bottom: calc(58px + env(safe-area-inset-bottom)) !important;
    height: auto !important;
    z-index: 275 !important;
  }

  body.has-app-sidebar .page-header.page-header--compact-mobile .page-title-group h1 {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  body.has-app-sidebar .kb-tab-strip {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    align-items: stretch;
    border-bottom: none;
    margin-bottom: 16px;
  }

  body.has-app-sidebar .kb-tab-strip .kb-tab-btn {
    justify-content: center;
    text-align: center;
    border: 1px solid var(--border);
    border-radius: 10px;
    border-bottom: 1px solid var(--border);
    padding: 10px 8px;
    white-space: normal;
    line-height: 1.25;
    min-height: 44px;
  }

  body.has-app-sidebar .kb-tab-strip .kb-tab-btn.active {
    border-color: color-mix(in srgb, var(--highlight) 50%, var(--border));
    border-bottom-color: color-mix(in srgb, var(--highlight) 50%, var(--border));
    background: color-mix(in srgb, var(--highlight) 8%, var(--surface2));
  }

  .onboarding-wizard-tab {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  #onboarding-auth-cta.btn-secondary {
    color: var(--text);
    border-color: color-mix(in srgb, var(--text-muted) 45%, var(--border));
    min-height: 44px;
  }

  .home-date {
    word-break: break-word;
  }

  .home-empty .home-paste-cta {
    display: none !important;
  }

  body.marketing-page .mkt-cta-row .btn-primary {
    flex: 1 1 100%;
  }
}

/* Post-auth onboarding wizard */
.onboarding-wizard {
  max-width: 720px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.onboarding-wizard-nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.onboarding-wizard-tab {
  flex: 1 1 auto;
  min-width: 120px;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text-muted);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 600;
  cursor: default;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.onboarding-wizard-tab.is-active {
  background: var(--surface);
  color: var(--highlight);
  border-color: color-mix(in srgb, var(--highlight) 45%, var(--border));
  transform: translateY(-1px);
}

.onboarding-wizard-tab.is-done {
  color: var(--text);
}

.onboarding-wizard-stage {
  position: relative;
  min-height: 280px;
}

.onboarding-wizard-panel {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.onboarding-wizard-panel.is-active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
  position: relative;
}

.onboarding-dropzone {
  border: 1px dashed var(--border);
  border-radius: 14px;
  padding: 28px 18px;
  text-align: center;
  background: var(--surface2);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
  touch-action: manipulation;
}

.onboarding-dropzone:hover,
.onboarding-dropzone.is-dragover {
  border-color: var(--highlight);
  background: color-mix(in srgb, var(--highlight) 8%, var(--surface2));
}

.onboarding-wizard-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

@media (prefers-reduced-motion: reduce) {
  .onboarding-wizard-panel,
  .onboarding-wizard-tab {
    transition: none;
  }
}

.onboarding-convert-progress {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}

.onboarding-convert-progress[hidden] {
  display: none !important;
}

.onboarding-convert-progress-track {
  position: relative;
  height: 4px;
  border-radius: 99px;
  background: var(--surface3, #2a2a30);
  overflow: hidden;
}

.onboarding-convert-progress-bar {
  position: absolute;
  top: 0;
  left: -35%;
  width: 35%;
  height: 100%;
  border-radius: 99px;
  background: var(--highlight);
  transition: left 0.35s ease, width 0.35s ease;
}

.onboarding-convert-progress.is-uploading .onboarding-convert-progress-bar {
  animation: onboarding-convert-slide 1s ease-in-out infinite;
}

.onboarding-convert-progress.is-converting .onboarding-convert-progress-bar {
  animation: onboarding-convert-slide 0.85s ease-in-out infinite;
}

.onboarding-convert-progress.is-saving .onboarding-convert-progress-bar {
  animation: none;
  left: 0;
  width: 72%;
}

.onboarding-convert-progress.is-done .onboarding-convert-progress-bar {
  animation: none;
  left: 0;
  width: 100%;
}

.onboarding-convert-progress.is-error .onboarding-convert-progress-bar {
  animation: none;
  left: 0;
  width: 100%;
  background: var(--red, #f87171);
}

.onboarding-convert-progress-label {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--highlight);
}

@keyframes onboarding-convert-slide {
  0% { left: -35%; }
  100% { left: 100%; }
}

/* Logged-in /app home (redesign v1). Nav locks above stay unchanged.
   Phone padding stays 16px. Tablet and desktop use 24px. */
.home-app.app-container {
  padding: 16px;
}

.home-greet {
  margin: 0 0 20px;
}

.home-greet h2 {
  font-family: var(--font-sans);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--text);
  margin: 0;
}

.home-date {
  margin: 4px 0 0;
  font-size: 13px;
  line-height: 1.4;
  color: var(--text-muted);
}

.home-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  margin-bottom: 24px;
}

.home-paste-cta {
  width: 100%;
  min-height: 44px;
  box-sizing: border-box;
}

.home-continue,
.home-view-all {
  color: var(--highlight);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
  text-decoration: none;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition-fast);
}

.home-continue:hover,
.home-view-all:hover {
  color: var(--highlight-hover);
  transform: translateX(2px);
}

.home-continue[hidden],
#home-continue-resume[hidden],
.home-view-all[hidden],
.home-today[hidden],
#home-today[hidden],
#home-recent-head[hidden],
.home-recent-list[hidden],
#home-recent-list[hidden],
.home-empty[hidden],
#home-empty[hidden] {
  display: none !important;
}

.home-section-label {
  margin: 0 0 12px;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.home-today {
  margin-bottom: 24px;
}

.home-today-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.home-today-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "kicker chevron"
    "title chevron"
    "line chevron";
  gap: 2px 8px;
  align-items: center;
  min-width: 0;
  min-height: 44px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  color: inherit;
  text-decoration: none;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-sm);
}

.home-today-card:hover {
  background: var(--surface2);
  border-color: rgba(255, 255, 255, 0.16);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.home-today-card:active {
  transform: translateY(0) scale(0.99);
}

.home-kicker {
  grid-area: kicker;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.home-card-title,
.home-recent-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text);
}

.home-card-title {
  grid-area: title;
  min-width: 0;
}

.home-card-line,
.home-recent-meta {
  font-size: 13px;
  line-height: 1.4;
  color: var(--text-muted);
}

.home-card-line {
  grid-area: line;
  min-width: 0;
}

.home-chevron {
  grid-area: chevron;
  width: 16px;
  height: 16px;
  color: var(--text-muted);
}

.home-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.home-section-head .home-section-label {
  margin-bottom: 0;
}

.home-recent-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.home-recent-row {
  display: block;
  min-width: 0;
  min-height: 44px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  color: var(--text);
  text-decoration: none;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-sm);
}

.home-recent-row:hover {
  background: var(--surface2);
  border-color: rgba(255, 255, 255, 0.16);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.home-recent-row:active {
  transform: translateY(0) scale(0.99);
}

.home-recent-title,
.home-recent-meta {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.home-recent-meta {
  margin-top: 2px;
}

.home-empty {
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 24px;
  text-align: center;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-sm);
}

.home-empty:hover {
  border-color: var(--border-focus);
}

.home-empty p {
  margin: 0 0 16px;
  font-size: 14px;
  line-height: 1.4;
  color: var(--text-muted);
}

@media (max-width: 639px) {
  .home-app.app-container {
    padding: 16px;
  }
}

@media (min-width: 640px) {
  .home-app.app-container {
    padding: 24px;
  }

  .home-today-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .home-paste-cta {
    max-width: 280px;
  }
}

/* Sign-in and first-run setup share one window. The moving line is the top edge of the page. */
body.gate-page {
  min-height: 100vh;
  margin: 0;
  background: #111113;
  color: #e8e6e3;
  font-family: "DM Sans", sans-serif;
}

body.gate-page #auth-progress.auth-progress,
body.gate-page .gate-step-rail {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  gap: 10px;
  pointer-events: none;
}

body.gate-page .auth-progress-track,
body.gate-page .gate-step-rail-track {
  height: 3px;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.08);
}

body.gate-page .auth-progress-bar,
body.gate-page .gate-step-rail-bar {
  border-radius: 0;
  background: #e8e6e3;
}

body.gate-page .auth-progress-label {
  color: #c4c0b8;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

/* Step title lives in the gate window h1; hide duplicate rail caption. */
body.gate-page .gate-step-rail-label {
  display: none;
}

.gate-step-rail-track {
  position: relative;
  overflow: hidden;
}

.gate-step-rail-bar {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 12%;
  transition: width 0.45s ease;
}

.gate-step-rail[data-step="profile"] .gate-step-rail-bar { width: 46%; }
.gate-step-rail[data-step="resume"] .gate-step-rail-bar { width: 74%; }

.gate-step-rail.is-working .gate-step-rail-bar {
  width: 40%;
  animation: auth-progress-slide 1.05s ease-in-out infinite;
}

.gate-step-rail.is-done .gate-step-rail-bar {
  left: 0;
  width: 100%;
  animation: none;
}

.gate-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 28px 28px 0;
}

.gate-brand a.gate-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #e8e6e3;
  text-decoration: none;
  font-weight: 650;
  font-size: 16px;
  letter-spacing: -0.03em;
}

.gate-brand .gate-quiet {
  color: #9a9690;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
}

.gate-brand .gate-quiet:hover { color: #e8e6e3; }

body.gate-page .auth-container,
body.gate-page .gate-stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 20px 56px;
  box-sizing: border-box;
}

body.gate-page .auth-card,
body.gate-page .gate-window {
  background: #18181b;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  width: 100%;
  max-width: 440px;
  padding: 32px 28px;
  box-sizing: border-box;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

body.gate-page .gate-window h1,
body.gate-page .auth-card h1 {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: #e8e6e3;
}

body.gate-page .gate-lead,
body.gate-page #auth-lead {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.5;
  color: #9a9690;
}

body.gate-page .auth-tabs {
  display: flex;
  background: #1f1f23;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 4px;
  gap: 4px;
}

body.gate-page .auth-tab-btn {
  flex: 1;
  padding: 8px 12px;
  border: none;
  background: transparent;
  color: #6b6760;
  font-size: 13px;
  font-weight: 600;
  border-radius: 7px;
  cursor: pointer;
}

body.gate-page .auth-tab-btn.active {
  background: #2a2a30;
  color: #e8e6e3;
}

body.gate-page .oauth-group { display: flex; flex-direction: column; gap: 10px; }

body.gate-page .oauth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 11px 16px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

body.gate-page .oauth-btn-github { background: #24292e; color: #fff; border-color: #3f4448; }
body.gate-page .oauth-btn-github:hover { background: #2f363d; }
body.gate-page .oauth-btn-google { background: #fff; color: #1f1f1f; border-color: #dadce0; }
body.gate-page .oauth-btn-google:hover { background: #f4f2ef; }

body.gate-page .divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #6b6760;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
body.gate-page .divider::before,
body.gate-page .divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
}

body.gate-page .form-group,
body.gate-page .form-field { display: flex; flex-direction: column; gap: 8px; }
body.gate-page .form-group { gap: 14px; }

body.gate-page .form-input,
body.gate-page .gate-window .form-control {
  background: #1f1f23;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  color: #e8e6e3;
  padding: 11px 14px;
  font-size: 14px;
  font-family: inherit;
  width: 100%;
}

body.gate-page .form-input:focus,
body.gate-page .gate-window .form-control:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow: 0 0 0 3px rgba(232, 230, 227, 0.08);
}

body.gate-page .btn-submit {
  width: 100%;
  padding: 12px;
  background: #e8e6e3;
  color: #111113;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 650;
  cursor: pointer;
}
body.gate-page .btn-submit:hover { background: #f4f2ef; }

body.gate-page .btn-magic {
  width: 100%;
  padding: 10px;
  background: transparent;
  color: #9a9690;
  border: 1px dashed rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  font-size: 12.5px;
  cursor: pointer;
}
body.gate-page .btn-magic:hover { color: #e8e6e3; border-color: rgba(255, 255, 255, 0.28); }

body.gate-page .status-msg {
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 12.5px;
  display: none;
  line-height: 1.4;
}
body.gate-page .status-error {
  background: rgba(224, 92, 92, 0.12);
  border: 1px solid rgba(224, 92, 92, 0.3);
  color: #f0a0a0;
}
body.gate-page .status-success {
  background: rgba(109, 184, 138, 0.12);
  border: 1px solid rgba(109, 184, 138, 0.3);
  color: #b7e0c6;
}

body.gate-page .form-field.is-signup-only { display: none; }
body.gate-page .auth-card.mode-signup .form-field.is-signup-only { display: flex; }

body.gate-page .onboarding-wizard-nav {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

body.gate-page .onboarding-wizard {
  max-width: 440px;
  gap: 0;
}

body.gate-page .onboarding-wizard-stage {
  min-height: 0;
}

body.gate-page .onboarding-wizard-panel:not(.is-active) {
  display: none;
}

body.gate-page .onboarding-wizard-panel.is-active {
  position: relative;
  opacity: 1;
  visibility: visible;
  transform: none;
  pointer-events: auto;
}

body.gate-page .gate-window .btn-primary,
body.gate-page .gate-window a.btn-primary,
body.gate-page .auth-card .btn-primary,
body.gate-page .auth-card a.btn-primary {
  width: 100%;
  background: #e8e6e3;
  color: #111113;
  border-color: #e8e6e3;
}

body.gate-page .onboarding-wizard-panel {
  border: none;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

body.gate-page .onboarding-dropzone {
  border-radius: 12px;
  background: #1f1f23;
  border-color: rgba(255, 255, 255, 0.14);
}

body.gate-page .onboarding-convert-progress-track { display: none; }

body.gate-page .gate-window .btn-primary,
body.gate-page .auth-card .btn-primary,
body.gate-page .auth-card a.btn-primary {
  background: #e8e6e3;
  color: #111113;
  border-color: #e8e6e3;
}

body.gate-page .auth-card .btn-primary:hover,
body.gate-page .auth-card a.btn-primary:hover {
  background: #f4f2ef;
  border-color: #f4f2ef;
  color: #111113;
}

body.gate-page .gate-next {
  margin-top: 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 12px;
}

body.gate-page .gate-next summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: #c4c0b8;
}

@media (max-width: 639px) {
  .gate-brand { padding: 22px 16px 0; }
  body.gate-page .auth-card,
  body.gate-page .gate-window { padding: 24px 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .gate-step-rail.is-working .gate-step-rail-bar {
    animation: auth-progress-pulse 1.2s ease-in-out infinite;
    left: 0;
    width: 100%;
  }
  .gate-step-rail-bar { transition: none; }
}
