/* legal.css: the subset of app.css used by privacy.html and terms.html. Built Sept 14, 2026 so those pages no longer depend on the app stylesheet. */
:root {
  /* Backgrounds */
  --bg:       #f0f1f6;
  --bg2:      #e6e8ef;
  --bg3:      #ffffff;
  --surface:  #ffffff;
  --surface2: #eef0fb;
  --surface3: #f8f9ff;

  /* Borders */
  --border:   rgba(79,70,229,0.09);
  --border2:  rgba(79,70,229,0.18);

  /* Accent palette */
  --accent:   #4f46e5;
  --accent2:  #7c3aed;
  --accent3:  #a78bfa;
  --accent4:  #f59e0b;
  --success:  #10b981;
  --danger:   #ef4444;

  /* Text */
  --text:     #0f172a;
  --text2:    #334155;
  --text3:    #64748b;
  --text4:    #94a3b8;

  /* Glow */
  --glow:     rgba(79,70,229,0.13);
  --glow2:    rgba(124,58,237,0.11);

  /* Shape */
  --radius:    16px;
  --radius-sm:  8px;
  --radius-xs:  6px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.05), 0 1px 2px rgba(0,0,0,0.03);
  --shadow:    0 4px 16px rgba(0,0,0,0.07), 0 2px 6px rgba(0,0,0,0.04);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.11), 0 4px 12px rgba(0,0,0,0.05);
  --shadow-accent: 0 8px 24px rgba(79,70,229,0.18);
}

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

html { scroll-behavior:smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

::-webkit-scrollbar { width:5px; height:5px; }

::-webkit-scrollbar-track { background:transparent; }

::-webkit-scrollbar-thumb { background:var(--border2); border-radius:99px; }

::-webkit-scrollbar-thumb:hover { background:var(--accent3); transition:background .15s; }

@keyframes toastIn {
  from { opacity:0; transform:translateX(-50%) translateY(12px); }
  to   { opacity:1; transform:translateX(-50%) translateY(0); }
}

@keyframes skeletonShimmer {
  0%   { background-position: 200% center; }
  100% { background-position: -200% center; }
}

.btn-ghost {
  padding: 10px 18px;
  border-radius: 10px;
  border: 1px solid var(--border2);
  background: rgba(255,255,255,0.02);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  cursor: pointer;
}

.btn-ghost:hover { border-color: var(--accent2); color: var(--accent2); }

@keyframes tourPulse {
  0% { box-shadow: 0 0 0 0 rgba(79,70,229,0.35); }
  100% { box-shadow: 0 0 0 12px rgba(79,70,229,0); }
}

@media (max-width: 640px) {
  /* Collapse icon rail to just 48px on mobile */
  .shell { grid-template-columns: 48px 1fr; }
  .icon-rail { padding: 12px 0; gap: 2px; }
  .rail-icon { width: 40px; height: 40px; font-size: 18px; border-radius: 10px; }
  .rail-logo { width: 34px; height: 34px; font-size: 16px; margin-bottom: 12px; }
  .rail-avatar { width: 32px; height: 32px; font-size: 12px; }

  /* Topbar compact */
  .topbar { padding: 0 10px; gap: 6px; height: 52px; }
  .topbar-title { font-size: 14px; }
  .topbar-action { width: 30px; height: 30px; font-size: 14px; }
  .topbar-logout { padding: 5px 10px; font-size: 11px; }

  /* Page content full width */
  .page { padding: 12px; }
  .hero-banner { padding: 18px; border-radius: 14px; }
  .hero-banner h1 { font-size: 22px; }
  .hero-stats { gap: 12px; }
  .hero-stat-num { font-size: 18px; }

  /* Course cards single column */
  .courses-grid { grid-template-columns: 1fr; gap: 14px; }
  .updates-grid { grid-template-columns: 1fr; gap: 12px; }
  .ai-modes-grid { grid-template-columns: 1fr; }
  .micro-cards { grid-template-columns: 1fr 1fr; }

  /* User menu opens upward with better positioning */
  /* user-menu-dropdown uses fixed positioning, no override needed */
}

@media (min-width: 900px) and (max-width: 1200px) and (orientation: landscape) {
  .landing-wrap { width: min(940px, 94vw); }
  .landing-hero { max-width: 760px; }
  .landing-hero h1 { font-size: 38px; }
  .landing-hero p { font-size: 16px; line-height: 1.6; }
  .landing-topbar { gap: 12px; }
  .topbar { height: 56px; }
  .page { padding: 16px; }
  .hero-banner { padding: 22px 24px; }
  .ai-learn-hero { padding: 22px 24px; }
}

@media (min-width: 1200px) and (max-height: 820px) {
  .landing-wrap { padding: 10px 0 16px; gap: 16px; }
  .landing-hero h1 { font-size: 42px; margin-bottom: 10px; }
  .landing-hero p { margin-bottom: 14px; }
  .landing-trust { margin-bottom: 14px; }
  .landing-stat { padding: 10px; }
  .landing-stat-num { font-size: 20px; }
  .topbar { height: 54px; }
  .page { padding-top: 18px; padding-bottom: 18px; }
  .section-header { margin-bottom: 16px; }
  .hero-banner { padding: 22px 24px; margin-bottom: 20px; }
}

@media (max-width: 820px) {
  .page { padding: 18px; }
  .topbar { gap: 10px; padding: 0 12px; }
  .search-bar { display: none; }
  .hero-stats { gap: 18px; flex-wrap: wrap; }
  .hero-banner { padding: 24px; }
  .transparency-banner { flex-direction: column; align-items: flex-start; }
  .ai-learn-hero { flex-direction: column; align-items: flex-start; }
  .pit-main { max-height: none; }
  .section-header { align-items: flex-start; flex-direction: column; gap: 10px; }
  .topbar-action:nth-last-child(2) { display: none; }
}

@media (min-width: 1600px) {
  .landing-wrap { width: min(980px, 88vw); }
  .page { max-width: 1200px; }
}

@keyframes slideUp {
  from { opacity:0; transform:translateY(32px); }
  to   { opacity:1; transform:translateY(0); }
}

.page { display:none; padding: clamp(18px, 2.2vw, 32px); max-width: 1280px; margin: 0 auto; width: 100%; }

@keyframes fadeIn {
  from { opacity:0; transform:translateY(6px); }
  to   { opacity:1; transform:translateY(0);   }
}

@keyframes slideUp {
  from { opacity:0; transform:translateY(20px); }
  to   { opacity:1; transform:translateY(0);    }
}

@keyframes scaleIn {
  from { opacity:0; transform:scale(0.97); }
  to   { opacity:1; transform:scale(1);    }
}

@keyframes progressShimmer {
  0%   { background-position: 200% center; }
  100% { background-position: -200% center; }
}

@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .mobile-nav {
    padding-bottom: env(safe-area-inset-bottom);
    height: calc(56px + env(safe-area-inset-bottom));
  }
  .main { padding-bottom: calc(70px + env(safe-area-inset-bottom)); }
}

@keyframes shimmer{0%{opacity:.5}50%{opacity:1}100%{opacity:.5}}

@media (max-width: 768px) {
  .rail-icon, .mobile-nav-btn, .btn-primary, .enroll-btn, .filter-chip {
    min-height: 44px;
    min-width: 44px;
  }

  /* Larger cards on mobile */
  .course-card { margin-bottom: 4px; }
  .course-thumb { height: 120px; }

  /* Better modal sizing */
  .login-card { padding: 32px 20px; width: 92vw; }

  /* Full-width buttons in modals */
  #edit-profile-modal .btn-primary,
  #review-modal button {
    width: 100%;
  }

  /* Pit sidebar hidden on mobile */
  .pit-layout { grid-template-columns: 1fr; }
  .pit-sidebar { display: none; }

  /* Portfolio header stacks on mobile */
  .portfolio-header { grid-template-columns: 1fr; }

  /* Tasks layout stacks */
  .tasks-layout { grid-template-columns: 1fr; }

  /* Kanban scrolls horizontally */
  .kanban-board {
    display: flex;
    overflow-x: auto;
    gap: 12px;
    padding-bottom: 8px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }
  .kanban-col {
    min-width: 260px;
    scroll-snap-align: start;
    flex-shrink: 0;
  }

  /* Hero banner compact */
  .hero-banner { padding: 20px; }
  .hero-banner h1 { font-size: 22px; }
  .hero-stats { gap: 16px; }
  .hero-stat-num { font-size: 20px; }

  /* Network feed full width */
  .friends-layout { grid-template-columns: 1fr; }

  /* Companies grid */
  .companies-grid { grid-template-columns: 1fr; }

  /* Topbar on mobile */
  .topbar { padding: 0 12px; gap: 8px; }
  .topbar-title { font-size: 15px; }

  /* Pages padding */
  .page { padding: 12px; }

  /* Update cards */
  .updates-grid { grid-template-columns: 1fr; }

  /* AI modes grid */
  .ai-modes-grid { grid-template-columns: 1fr; }

  /* Micro cards */
  .micro-cards { grid-template-columns: repeat(2, 1fr); }

  /* Table scrolls */
  table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

@keyframes slideUpSheet {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}

@keyframes pageEnter {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes bellRing {
  0%,100% { transform: rotate(0); }
  20%  { transform: rotate(-20deg); }
  40%  { transform: rotate(20deg); }
  60%  { transform: rotate(-10deg); }
  80%  { transform: rotate(10deg); }
}

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

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

::-webkit-scrollbar { width: 5px; height: 5px; }

::-webkit-scrollbar-track { background: transparent; }

::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 4px; }

::-webkit-scrollbar-thumb:hover { background: var(--accent3); }

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(1.1); }
}

@media (max-width: 480px) {

  /* Reduce hero h1 significantly — was clamp(32px…) = 32px on small screens */
  .landing-hero h1 {
    font-size: 24px !important;
    line-height: 1.22 !important;
    letter-spacing: -0.5px !important;
    background: none !important;
    -webkit-text-fill-color: var(--text) !important;
    color: var(--text) !important;
  }
  .landing-hero h1 span {
    color: var(--accent) !important;
    -webkit-text-fill-color: var(--accent) !important;
  }

  /* Hero paragraph: tighter, readable line length */
  .landing-hero p {
    font-size: 14px !important;
    line-height: 1.65 !important;
    max-width: 100% !important;
    margin-bottom: 18px !important;
  }

  /* Kicker pill: tighter */
  .landing-kicker {
    font-size: 11px !important;
    padding: 4px 10px !important;
    max-width: 90vw;
    white-space: normal;
    text-align: center;
  }

  /* CTA buttons: stack vertically, full width */
  .landing-actions {
    flex-direction: column !important;
    gap: 8px !important;
  }
  .landing-actions .btn-primary,
  .landing-actions .btn-ghost {
    width: 100% !important;
    text-align: center !important;
    justify-content: center !important;
    padding: 13px 20px !important;
    font-size: 14px !important;
  }

  /* Trust line: smaller, centered */
  .landing-trust {
    font-size: 12px !important;
    text-align: center !important;
    margin-bottom: 16px !important;
  }

  /* Stats: 2×2 grid on mobile (not 4 across) */
  .landing-stats {
    grid-template-columns: 1fr 1fr !important;
    gap: 10px !important;
  }
  .landing-stat {
    padding: 12px 10px !important;
  }
  .landing-stat-num {
    font-size: 20px !important;
  }
  .landing-stat-label {
    font-size: 10px !important;
  }

  /* Tour preview: hide browser chrome on tiny screens */
  .tour-browser-chrome .tour-url {
    font-size: 9px !important;
    padding: 3px 6px !important;
  }

  /* Tour tabs: horizontal scroll, no wrap */
  .tour-tabs {
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    justify-content: flex-start !important;
    padding-bottom: 4px !important;
    scrollbar-width: none !important;
  }
  .tour-tabs::-webkit-scrollbar { display: none; }
  .tour-tab {
    flex-shrink: 0 !important;
    font-size: 12px !important;
    padding: 7px 12px !important;
  }

  /* Preview list: single column */
  .preview-list {
    grid-template-columns: 1fr !important;
  }
  .preview-item {
    font-size: 13px !important;
    padding: 12px !important;
  }

  /* Community pills: tighter */
  .community-pill {
    font-size: 11px !important;
    padding: 4px 8px !important;
  }

  /* ── 2. App layout ─────────────────────────────────────────── */

  /* Hero banner: tighter, cleaner */
  .hero-banner {
    padding: 18px !important;
    margin-bottom: 20px !important;
    border-radius: 14px !important;
  }
  .hero-banner h1 {
    font-size: 20px !important;
    line-height: 1.28 !important;
    letter-spacing: -0.4px !important;
    margin-bottom: 10px !important;
  }
  .hero-banner p {
    font-size: 13px !important;
    line-height: 1.6 !important;
    margin-bottom: 16px !important;
  }
  .hero-badge {
    font-size: 11px !important;
    padding: 4px 10px !important;
  }
  .hero-stats {
    gap: 16px !important;
    flex-wrap: wrap !important;
  }
  .hero-stat-num {
    font-size: 20px !important;
  }
  .hero-stat-label {
    font-size: 11px !important;
  }

  /* Section headers: better mobile sizing */
  .section-header h2 {
    font-size: 18px !important;
    letter-spacing: -0.3px !important;
  }
  .section-header p {
    font-size: 12px !important;
  }

  /* Update cards: constrain text */
  .update-card {
    padding: 16px !important;
  }
  .update-card h3 {
    font-size: 14px !important;
    line-height: 1.35 !important;
  }
  .update-card p {
    font-size: 12px !important;
    line-height: 1.55 !important;
  }
  .update-date {
    font-size: 11px !important;
  }
  .update-tag {
    font-size: 10px !important;
    padding: 2px 8px !important;
  }

  /* Topbar: tighter */
  .topbar {
    padding: 0 10px !important;
    height: 50px !important;
  }
  .topbar-title {
    font-size: 14px !important;
  }

  /* Course cards */
  .course-card {
    border-radius: 12px !important;
  }
  .course-thumb {
    height: 110px !important;
  }
  .course-body {
    padding: 14px !important;
  }
  .course-body h3 {
    font-size: 14px !important;
    line-height: 1.3 !important;
    margin-bottom: 6px !important;
  }
  .course-body p {
    font-size: 12px !important;
    line-height: 1.5 !important;
    margin-bottom: 10px !important;
  }
  .course-meta {
    font-size: 11px !important;
    gap: 8px !important;
  }

  /* Catalog filters: scroll horizontally */
  .catalog-filters {
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    padding-bottom: 4px !important;
    gap: 6px !important;
  }
  .catalog-filters::-webkit-scrollbar { display: none; }
  .filter-chip {
    flex-shrink: 0 !important;
    font-size: 12px !important;
    padding: 6px 12px !important;
    white-space: nowrap !important;
  }

  /* Page padding */
  .page {
    padding: 12px !important;
  }

  /* Updates grid: single column on tiny screens */
  .updates-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  /* Transparency banner */
  .transparency-banner {
    flex-direction: column !important;
    gap: 12px !important;
    padding: 16px !important;
  }
  .tb-content h3 { font-size: 14px !important; }
  .tb-content p  { font-size: 12px !important; }

  /* Mobile nav labels */
  .nav-label { font-size: 9px !important; }
  .nav-icon  { font-size: 18px !important; }
  .mobile-nav { height: 60px !important; }

  /* Feed posts */
  .feed-post { padding: 16px !important; }
  .author-name { font-size: 13px !important; }
  .author-title { font-size: 11px !important; }
  .post-content { font-size: 13px !important; }

  /* Companies */
  .company-card { padding: 16px !important; }
  .company-name { font-size: 15px !important; }
  .company-desc { font-size: 12px !important; }

  /* Login modal */
  .login-card {
    padding: 28px 18px !important;
    border-radius: 18px !important;
  }
  .login-card h1 { font-size: 22px !important; }
  .login-card p  { font-size: 13px !important; margin-bottom: 20px !important; }

  /* Pit chat */
  .pit-text { font-size: 13px !important; }
  .pit-author { font-size: 11px !important; }

  /* Tasks */
  .stat-card { padding: 14px !important; }
  .stat-card-num { font-size: 24px !important; }
  .kanban-task-title { font-size: 12px !important; }
}

@media (max-width: 480px) {
  /* Hero h1 accent text: solid color, no gradient */
  .landing-hero h1 span,
  .hero-banner h1 span {
    background: none !important;
    -webkit-background-clip: unset !important;
    background-clip: unset !important;
    -webkit-text-fill-color: var(--accent) !important;
    color: var(--accent) !important;
  }

  /* Ensure no content overflows creating weird cut-offs */
  .landing-wrap,
  .landing-preview,
  .tour-preview {
    overflow: hidden !important;
    max-width: 100% !important;
  }

  /* Cards: always full-width with consistent border radius */
  .card,
  .update-card,
  .course-card,
  .company-card,
  .cert-item,
  .ai-mode-card {
    border-radius: 12px !important;
  }

  /* Buttons: minimum 44px tap target */
  .btn-primary,
  .btn-ghost,
  .enroll-btn,
  .fc-btn {
    min-height: 40px !important;
  }

  /* Readable line length: never let text span full screen width on small screens */
  .landing-hero p,
  .hero-banner p,
  .tb-content p,
  .update-card p,
  .company-desc,
  .post-content,
  .ai-mode-desc {
    max-width: 100% !important;
    hyphens: auto !important;
  }
}
