/* ==========================================================================
   BSEBWALA.IN — UNIFIED MASTER STYLESHEET
   --------------------------------------------------------------------------
   ARCHITECTURE & TABLE OF CONTENTS:
   01. Design Tokens & Color Palettes (Light, Dark & System Auto-Detect)
   02. Global Reset, Typography & Layout Containers
   03. Sticky Site Header, Brand Identity, Main Navigation & Language Pill
   04. Shared Hero Panels, Notice Tickers, Badges & Action Buttons
   05. Portal Directory & Filterable Link Grid (index.html)
   06. Academic Fee Calculator & Fee Structure Tables (fee.html)
   07. Live Educational News Feed & Summary Cards (news.html)
   08. Educator & Master Trainer Executive Profile (about.html)
   09. Contact Form, Support Directory & Crowdfunding Modal (contact.html)
   10. Official Letters & Circulars Repository (letter.html)
   11. Ultimate AI Hub Masonry Terminal (aihub.html)
   12. Video Series Theater & Course Directory (learn.html)
   13. Global Footer, Accessibility & Responsive Breakpoints
   ========================================================================== */


/* ==========================================================================
   01. DESIGN TOKENS & COLOR PALETTES
   ========================================================================== */
:root {
  /* Core Light Theme Surface & Ink Tokens */
  --bg:               #FDF6FF;
  --surface:          #FFFFFF;
  --surface-2:        #F4EBFF;
  --surface-elevated: #FAF4FF;
  --border:           #E7D9F7;
  --border-focus:     #CBA6FF;
  --text:             #241A38;
  --text-muted:       #6B5C82;

  /* Brand Signature Accents */
  --primary:          #7B2FF7;
  --primary-hover:    #6420D9;
  --accent:           #FF6B9D;
  --accent-soft:      #FFE1EC;
  --accent-glow:      rgba(255, 107, 157, 0.35);

  /* Semantic Status Indicators */
  --danger:           #E4572E;
  --success:          #10B981;
  --emerald:          #10B981;
  --emerald-bg:       rgba(16, 185, 129, 0.12);
  --gold:             #F59E0B;

  /* Portal Directory Category Accents */
  --c-secondary:      #2E9BFF;
  --c-senior:         #21C08B;
  --c-scholarship:    #FFB020;
  --c-admin:          #FF6B9D;
  --c-udise:          #7B2FF7;
  --c-docs:           #FF7A45;

  /* Official Letters & Documents Repository Tokens */
  --primary-color:    #7B2FF7;
  --list-bg:          #FFFFFF;
  --list-hover:       #FAF5FF;
  --badge-bg:         #F4EBFF;
  --badge-text:       #7B2FF7;
  --cat-bg:           #F3F4F6;
  --cat-text:         #4B5563;

  /* Border Radii & Elevation Shadows */
  --radius-sm:        8px;
  --radius:           14px;
  --radius-md:        12px;
  --radius-lg:        18px;
  --radius-xl:        24px;
  --radius-pill:      999px;
  --shadow-sm:        0 2px 10px rgba(123, 47, 247, 0.04);
  --shadow:           0 4px 18px rgba(123, 47, 247, 0.08);
  --shadow-md:        0 10px 28px rgba(123, 47, 247, 0.08);
  --shadow-lg:        0 20px 44px rgba(123, 47, 247, 0.14);

  /* Typography & Structural Metrics */
  --font-head:        'Lora', Georgia, serif;
  --font-body:        'Inter', system-ui, -apple-system, sans-serif;
  --header-h:         66px;
  color-scheme:       light;
}

/* Explicit Dark Theme Override */
:root[data-theme="dark"] {
  --bg:               #120D1C;
  --surface:          #1B1429;
  --surface-2:        #241A38;
  --surface-elevated: #2C2044;
  --border:           #352652;
  --border-focus:     #533B82;
  --text:             #F3EDFC;
  --text-muted:       #B8A9D1;

  --primary:          #B98CFF;
  --primary-hover:    #D4BCFF;
  --accent:           #FF9EC1;
  --accent-soft:      #3A2038;
  --danger:           #FF8A65;
  --emerald:          #34D399;
  --emerald-bg:       rgba(52, 211, 153, 0.15);
  --gold:             #FBBF24;

  --c-secondary:      #5CB3FF;
  --c-senior:         #4CD9A6;
  --c-scholarship:    #FFC94D;
  --c-admin:          #FF9EC1;
  --c-udise:          #B98CFF;
  --c-docs:           #FF9A6B;

  --primary-color:    #B98CFF;
  --list-bg:          #1F1830;
  --list-hover:       #261D3A;
  --badge-bg:         #261D3A;
  --badge-text:       #D8B4FE;
  --cat-bg:           #374151;
  --cat-text:         #E5E7EB;

  --shadow-sm:        0 2px 10px rgba(0, 0, 0, 0.35);
  --shadow:           0 4px 22px rgba(0, 0, 0, 0.45);
  --shadow-md:        0 10px 28px rgba(0, 0, 0, 0.50);
  --shadow-lg:        0 20px 44px rgba(0, 0, 0, 0.65);
  color-scheme:       dark;
}

/* System Dark Mode Auto-Detection (When no manual toggle is saved) */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]):not([data-theme="dark"]) {
    --bg:               #120D1C;
    --surface:          #1B1429;
    --surface-2:        #241A38;
    --surface-elevated: #2C2044;
    --border:           #352652;
    --border-focus:     #533B82;
    --text:             #F3EDFC;
    --text-muted:       #B8A9D1;

    --primary:          #B98CFF;
    --primary-hover:    #D4BCFF;
    --accent:           #FF9EC1;
    --accent-soft:      #3A2038;
    --danger:           #FF8A65;
    --emerald:          #34D399;
    --emerald-bg:       rgba(52, 211, 153, 0.15);
    --gold:             #FBBF24;

    --c-secondary:      #5CB3FF;
    --c-senior:         #4CD9A6;
    --c-scholarship:    #FFC94D;
    --c-admin:          #FF9EC1;
    --c-udise:          #B98CFF;
    --c-docs:           #FF9A6B;

    --primary-color:    #B98CFF;
    --list-bg:          #1F1830;
    --list-hover:       #261D3A;
    --badge-bg:         #261D3A;
    --badge-text:       #D8B4FE;
    --cat-bg:           #374151;
    --cat-text:         #E5E7EB;

    --shadow-sm:        0 2px 10px rgba(0, 0, 0, 0.35);
    --shadow:           0 4px 22px rgba(0, 0, 0, 0.45);
    --shadow-md:        0 10px 28px rgba(0, 0, 0, 0.50);
    --shadow-lg:        0 20px 44px rgba(0, 0, 0, 0.65);
    color-scheme:       dark;
  }
}


/* ==========================================================================
   02. GLOBAL RESET, TYPOGRAPHY & LAYOUT CONTAINERS
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + env(safe-area-inset-top, 0px) + 14px);
  -webkit-text-size-adjust: 100%;
}

body {
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  background-color: var(--bg);
  /* Subtle ambient top mesh glow */
  background-image:
    radial-gradient(circle at 12% 8%, color-mix(in srgb, var(--primary) 10%, transparent) 0%, transparent 42%),
    radial-gradient(circle at 88% 14%, color-mix(in srgb, var(--accent) 8%, transparent) 0%, transparent 38%);
  background-repeat: no-repeat;
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.58;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  margin: 0;
  line-height: 1.25;
}

a {
  text-decoration: none;
  color: inherit;
}

button, input, select, textarea {
  font: inherit;
}

button, a {
  -webkit-tap-highlight-color: transparent;
}

img {
  max-width: 100%;
  display: block;
}

main {
  flex: 1;
}

.wrap {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 18px;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}


/* ==========================================================================
   03. STICKY SITE HEADER, BRAND IDENTITY, NAVIGATION & LANGUAGE PILL
   ========================================================================== */
header.site,
header.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  padding-top: env(safe-area-inset-top, 0px);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

/* Brand Logo & Wordmark */
.brand,
.site-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.08rem;
  color: var(--text);
  white-space: nowrap;
  flex-shrink: 0;
}

.brand .mark,
.brand-logo {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.88rem;
  box-shadow: 0 4px 12px rgba(123, 47, 247, 0.35);
  flex-shrink: 0;
}

/* Desktop Navigation Bar */
.main-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-left: 24px;
  flex: 1;
}

.main-nav a {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.94rem;
  padding-bottom: 5px;
  transition: color 0.15s ease;
  position: relative;
  white-space: nowrap;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--primary);
}

.main-nav a.active {
  font-weight: 700;
}

.main-nav a.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2.5px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: var(--radius-pill);
}

/* Header Action Buttons (Language Toggle, Theme Switch, Mobile Hamburger) */
.header-actions,
.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  flex-shrink: 0;
}

.lang-btn {
  background: var(--surface-2);
  color: var(--primary);
  border: 1.5px solid var(--border);
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  white-space: nowrap;
  min-height: 38px;
}

.lang-btn:hover {
  background: var(--primary);
  color: #FFFFFF;
  border-color: var(--primary);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

[data-theme="dark"] .lang-btn {
  background: #261D3A;
  color: #B98CFF;
  border-color: #382A54;
}

[data-theme="dark"] .lang-btn:hover {
  background: #B98CFF;
  color: #15101F;
}

.icon-btn {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  width: 40px;
  height: 40px;
  border-radius: var(--radius-pill);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex: none;
  font-size: 1rem;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.icon-btn:hover {
  background: var(--surface-2);
  border-color: var(--primary);
  transform: translateY(-1px);
}

.menu-toggle-btn {
  display: none;
  font-size: 1.2rem;
  font-weight: 700;
}


/* ==========================================================================
   04. SHARED HERO PANELS, NOTICE TICKERS, BADGES & ACTION BUTTONS
   ========================================================================== */
.hero {
  padding: 32px 0 18px;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 28px;
  align-items: center;
}

.hero h1 {
  font-size: clamp(1.6rem, 3.8vw, 2.4rem);
  font-weight: 700;
  background: linear-gradient(100deg, var(--primary) 15%, var(--accent) 60%, var(--c-senior) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p {
  color: var(--text-muted);
  margin-top: 8px;
  font-size: 0.95rem;
}

/* Gradient-Bordered Counter Panel */
.hero-panel {
  position: relative;
  border-radius: var(--radius-xl);
  padding: 2px;
  background: conic-gradient(from 180deg, var(--primary), var(--accent), var(--c-senior), var(--primary));
}

.hero-panel-inner {
  background: var(--surface);
  border-radius: calc(var(--radius-xl) - 2px);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hero-panel .big-num {
  font-family: var(--font-head);
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
  color: var(--primary);
}

.hero-panel .big-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.hero-panel .mini-row {
  display: flex;
  gap: 16px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.hero-panel .mini-row div {
  font-size: 0.76rem;
  color: var(--text-muted);
}

.hero-panel .mini-row strong {
  display: block;
  font-size: 1.05rem;
  color: var(--text);
  font-family: var(--font-head);
}

/* Notice Bar & Pills */
.notice-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
  margin-bottom: 20px;
  font-size: 0.83rem;
  color: var(--text);
}

.notice-pill {
  background: var(--primary);
  color: #FFFFFF;
  font-weight: 700;
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  flex-shrink: 0;
}

/* Primary Pill Call-to-Action Button */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  color: #FFFFFF;
  padding: 13px 32px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 0.94rem;
  box-shadow: 0 6px 20px rgba(123, 47, 247, 0.3);
  transition: filter 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.btn-primary:hover {
  filter: brightness(1.08);
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(123, 47, 247, 0.38);
}

.doc-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface-2);
  color: var(--primary);
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  font-weight: 700;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.doc-link-btn:hover {
  background: var(--primary);
  color: #FFFFFF;
}

/* Download Banner Card */
.download-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 18px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.download-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--c-docs), var(--accent));
}

.download-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pdf-badge-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--c-docs) 15%, transparent);
  color: var(--c-docs);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  flex: none;
}

.download-text h3 {
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--text);
}

.download-text p {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 2px;
}


/* ==========================================================================
   05. PORTAL DIRECTORY & FILTERABLE LINK GRID (index.html)
   ========================================================================== */
.search-box {
  flex: 1;
  position: relative;
  max-width: 420px;
  margin-left: auto;
  margin-right: 12px;
}

.search-box input {
  width: 100%;
  padding: 10px 14px 10px 38px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 0.95rem;
}

.search-box svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  pointer-events: none;
}

/* Category Filter Chips */
.filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  padding: 10px 4px 18px;
}

.chip {
  flex: 0 1 auto;
  padding: 9px 18px;
  border-radius: var(--radius-pill);
  border: 2px solid var(--chip-color, var(--border));
  background: var(--surface);
  color: var(--chip-color, var(--text-muted));
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.chip:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.chip.active {
  background: var(--chip-color, var(--primary));
  border-color: var(--chip-color, var(--primary));
  color: #FFFFFF;
}

.chip[data-filter="all"]         { --chip-color: var(--primary); }
.chip[data-filter="secondary"]   { --chip-color: var(--c-secondary); }
.chip[data-filter="senior"]      { --chip-color: var(--c-senior); }
.chip[data-filter="scholarship"] { --chip-color: var(--c-scholarship); }
.chip[data-filter="admin"]       { --chip-color: var(--c-admin); }
.chip[data-filter="udise"]       { --chip-color: var(--c-udise); }
.chip[data-filter="docs"]        { --chip-color: var(--c-docs); }

/* Directory Sections & Link Cards */
.section {
  margin-top: 34px;
  opacity: 1;
}

.section .section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  border-bottom: 3px solid var(--sec-color, var(--border));
  padding-bottom: 10px;
  text-align: left;
}

.section .section-head h2 {
  font-size: 1.2rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 9px;
}

.section .section-head h2::before {
  content: '';
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--sec-color, var(--primary));
  flex: none;
}

.section .section-head span {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--sec-color, var(--text-muted));
  background: color-mix(in srgb, var(--sec-color, var(--primary)) 14%, transparent);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
}

.section[data-category="secondary"]   { --sec-color: var(--c-secondary); }
.section[data-category="senior"]      { --sec-color: var(--c-senior); }
.section[data-category="scholarship"] { --sec-color: var(--c-scholarship); }
.section[data-category="admin"]       { --sec-color: var(--c-admin); }
.section[data-category="udise"]       { --sec-color: var(--c-udise); }
.section[data-category="docs"]        { --sec-color: var(--c-docs); }

.grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

.grid .card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 15px 54px 14px 18px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  overflow: hidden;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.grid .card::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 3px;
  background: var(--sec-color, var(--primary));
}

.grid .card:hover {
  box-shadow: 0 8px 18px color-mix(in srgb, var(--sec-color, var(--primary)) 22%, transparent);
  border-color: var(--sec-color, var(--primary));
  transform: translateY(-2px);
}

.grid .card .top-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.grid .card .emoji {
  font-size: 1.15rem;
  line-height: 1;
  flex: none;
}

.grid .card .title {
  font-weight: 700;
  font-size: 0.94rem;
}

.grid .card .desc {
  font-size: 0.81rem;
  color: var(--text-muted);
}

.status-badge {
  font-size: 0.66rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--c-senior) 16%, transparent);
  color: var(--c-senior);
  letter-spacing: 0.02em;
}

.grid .card .pin,
.grid .card .share-btn {
  position: absolute;
  top: 8px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 0.95rem;
  min-width: 30px;
  min-height: 30px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0.65;
  transition: opacity 0.15s ease, transform 0.15s ease, background 0.15s ease;
}

.grid .card .pin {
  right: 6px;
}

.grid .card .share-btn {
  right: 36px;
  font-size: 0.84rem;
}

.grid .card .pin:hover,
.grid .card .share-btn:hover {
  opacity: 1;
  background: var(--surface-2);
  transform: scale(1.06);
}

.grid .card .pin.pinned {
  color: var(--accent);
  opacity: 1;
}

.card.hidden,
.section.hidden {
  display: none;
}

/* Pinned Links Bar */
.pinned-bar {
  background: linear-gradient(120deg, var(--accent-soft), color-mix(in srgb, var(--c-scholarship) 18%, var(--accent-soft)));
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 16px 18px;
  margin-top: 26px;
  display: none;
}

.pinned-bar.show {
  display: block;
}

.pinned-bar h3 {
  font-size: 0.95rem;
  margin-bottom: 10px;
}

.pinned-bar .grid {
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
  display: none;
}

.empty-state.show {
  display: block;
}


/* ==========================================================================
   06. ACADEMIC FEE CALCULATOR & FEE STRUCTURE TABLES (fee.html)
   ========================================================================== */
.category-nav {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}

.cat-tab-btn {
  padding: 12px 14px;
  border-radius: var(--radius);
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
  box-shadow: var(--shadow);
}

.cat-tab-btn span.cat-sub {
  font-size: 0.74rem;
  font-weight: 500;
  color: var(--text-muted);
}

.cat-tab-btn:hover {
  border-color: var(--primary);
}

.cat-tab-btn.active {
  background: var(--primary);
  color: #FFFFFF;
  border-color: var(--primary);
  box-shadow: 0 4px 14px color-mix(in srgb, var(--primary) 30%, transparent);
}

.cat-tab-btn.active span.cat-sub {
  color: #F4EBFF;
}

.tab-content-panel {
  display: none;
}

.tab-content-panel.active {
  display: block;
}

.sub-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.sub-tab-btn {
  flex: 1;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  text-align: center;
  transition: all 0.15s ease;
}

.sub-tab-btn:hover {
  border-color: var(--primary);
}

.sub-tab-btn.active {
  background: var(--primary);
  color: #FFFFFF;
  border-color: var(--primary);
  box-shadow: 0 3px 8px color-mix(in srgb, var(--primary) 25%, transparent);
}

/* Interactive Fee Calculator Container */
.calculator-wrapper {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 20px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  margin-bottom: 24px;
}

.calculator-wrapper::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--c-secondary), var(--primary), var(--accent));
}

.tab-selector {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.tab-btn {
  flex: 1;
  min-width: 110px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-weight: 600;
  font-size: 0.84rem;
  cursor: pointer;
  text-align: center;
  transition: all 0.15s ease;
}

.tab-btn:hover {
  border-color: var(--primary);
}

.tab-btn.active {
  background: var(--primary);
  color: #FFFFFF;
  border-color: var(--primary);
  box-shadow: 0 3px 8px color-mix(in srgb, var(--primary) 30%, transparent);
}

.calc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: start;
}

.calc-controls {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.form-group label {
  display: block;
  font-size: 0.84rem;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text);
}

.form-select {
  width: 100%;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 0.88rem;
  outline: none;
  transition: border-color 0.15s;
}

.form-select:focus {
  border-color: var(--primary);
}

.check-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.15s;
}

.check-card:hover {
  background: color-mix(in srgb, var(--surface-2) 75%, var(--primary) 25%);
}

.check-card input[type="checkbox"] {
  margin-top: 3px;
  accent-color: var(--primary);
  width: 17px;
  height: 17px;
  cursor: pointer;
  flex-shrink: 0;
}

.check-card-text {
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--text-muted);
}

.check-card-text strong {
  display: block;
  color: var(--text);
  font-size: 0.85rem;
}

/* Fee Slip Output */
.calc-slip {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.slip-total-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
  text-align: center;
  box-shadow: 0 2px 6px rgba(123, 47, 247, 0.05);
}

.slip-total-card .lbl {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
}

.slip-total-card .val {
  font-family: var(--font-head);
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
  margin: 2px 0;
  font-variant-numeric: tabular-nums;
}

.slip-total-card .tag {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: var(--accent-soft);
  color: var(--accent);
  display: inline-block;
}

.funds-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.fund-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  text-align: center;
}

.fund-box span {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
  display: block;
}

.fund-box strong {
  font-size: 1.05rem;
  font-family: var(--font-head);
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.slip-breakdown {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 0.8rem;
}

.slip-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
  border-bottom: 1px dashed var(--border);
  gap: 8px;
}

.slip-item:last-child {
  border-bottom: none;
}

.slip-item.waived {
  color: var(--text-muted);
  text-decoration: line-through;
}

.slip-item.waived .fee-n {
  text-decoration: none;
  color: var(--c-senior);
  font-weight: 700;
}

.slip-item .fee-n {
  white-space: nowrap;
  font-weight: 600;
}

/* Fee Data Tables & Filter Toolbars */
.table-section {
  margin-bottom: 24px;
}

.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.table-search {
  position: relative;
  flex: 1;
  max-width: 280px;
}

.table-search input {
  width: 100%;
  padding: 7px 12px 7px 32px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 0.82rem;
  outline: none;
}

.table-search input:focus {
  border-color: var(--primary);
}

.table-search svg {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  color: var(--text-muted);
}

.table-filters {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.tbl-filter-btn {
  padding: 5px 11px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.tbl-filter-btn.active {
  background: var(--primary);
  color: #FFFFFF;
  border-color: var(--primary);
}

.table-container {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow-x: auto;
  box-shadow: var(--shadow);
  -webkit-overflow-scrolling: touch;
}

.styled-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
  text-align: left;
  min-width: 520px;
}

.styled-table th {
  background: var(--surface-2);
  color: var(--text);
  padding: 10px 14px;
  font-weight: 700;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.styled-table td {
  padding: 9px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}

.styled-table tr:last-child td {
  border-bottom: none;
}

.styled-table tr:hover {
  background: color-mix(in srgb, var(--surface-2) 40%, transparent);
}

.badge-tag {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  white-space: nowrap;
}

.tag-vikas {
  background: color-mix(in srgb, var(--c-secondary) 15%, transparent);
  color: var(--c-secondary);
}

.tag-chhatra {
  background: color-mix(in srgb, var(--c-scholarship) 20%, transparent);
  color: #C47D00;
}

.tag-abolished {
  background: color-mix(in srgb, var(--danger) 15%, transparent);
  color: var(--danger);
  text-decoration: line-through;
}

/* Fee Guidelines & Abolished Fee Alerts */
.rules-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 28px;
}

.rule-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: transform 0.15s ease;
}

.rule-card::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 3px;
  background: var(--primary);
}

.rule-card:hover {
  transform: translateY(-2px);
}

.rule-card .r-icon {
  font-size: 1.15rem;
  line-height: 1;
  margin-bottom: 2px;
}

.rule-card .r-title {
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--text);
}

.rule-card .r-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.danger-alert-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 14px 18px;
  position: relative;
  overflow: hidden;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
}

.danger-alert-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--danger);
}

.danger-alert-card h3 {
  color: var(--danger);
  font-size: 0.98rem;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.danger-alert-card p {
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-bottom: 8px;
}

.pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.strike-pill {
  background: color-mix(in srgb, var(--danger) 10%, transparent);
  color: var(--danger);
  border: 1px solid color-mix(in srgb, var(--danger) 20%, transparent);
  font-size: 0.74rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
}


/* ==========================================================================
   07. LIVE EDUCATIONAL NEWS FEED & SUMMARY CARDS (news.html)
   ========================================================================== */
.page-header {
  margin-bottom: 24px;
  text-align: center;
}

.page-header h1 {
  font-size: clamp(2rem, 5vw, 2.8rem);
  background: linear-gradient(100deg, var(--primary) 15%, var(--accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 10px;
  line-height: 1.4;
  padding-top: 0.15em;
  padding-bottom: 0.1em;
}

.page-header p {
  color: var(--text-muted);
  font-size: 1.05rem;
}

.news-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 4px 20px;
  justify-content: center;
}

.news-chip {
  flex: 0 1 auto;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.15s ease, border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03);
}

.news-chip:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-1px);
}

.news-chip.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #FFFFFF;
  box-shadow: 0 4px 12px color-mix(in srgb, var(--primary) 30%, transparent);
}

.news-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}

.news-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 22px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
}

.news-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  opacity: 0.85;
}

.news-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 24px rgba(123, 47, 247, 0.12);
  border-color: var(--primary);
}

.card-top-tags {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}

.source-tag {
  background: var(--surface-2);
  color: var(--primary);
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-size: 0.7rem;
  font-weight: 700;
}

.read-time-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  background: color-mix(in srgb, var(--surface-2) 70%, transparent);
  padding: 3px 8px;
  border-radius: 6px;
}

.news-card h2 {
  font-size: 1.12rem;
  color: var(--text);
  margin-bottom: 14px;
  line-height: 1.35;
  overflow-wrap: break-word;
  word-break: break-word;
}

.takeaways-wrapper {
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-bottom: 16px;
  border: 1px solid var(--border);
  flex-grow: 1;
  overflow-wrap: break-word;
}

.takeaways-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--primary);
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}

.takeaways-list {
  margin: 0;
  padding-left: 18px;
  font-size: 0.88rem;
  color: var(--text);
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.takeaways-list li {
  margin: 0;
  overflow-wrap: break-word;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.card-actions-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
}

.read-more {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--primary);
  transition: color 0.15s;
}

.read-more:hover {
  color: var(--accent);
}

.whatsapp-share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #25D366;
  color: #FFFFFF;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 2px 6px rgba(37, 211, 102, 0.25);
}

.whatsapp-share-btn:hover {
  background: #20BD5A;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(37, 211, 102, 0.35);
}

.status-container {
  text-align: center;
  padding: 60px 20px;
  grid-column: 1 / -1;
  color: var(--text-muted);
}

.spinner {
  display: inline-block;
  width: 40px;
  height: 40px;
  border: 4px solid var(--surface-2);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 16px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.last-updated {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 36px;
  font-weight: 500;
}


/* ==========================================================================
   08. EDUCATOR, TRAINER & WEB DEVELOPER PROFILE (about.html)
   ========================================================================== */
.dev-hero {
  padding: 52px 0 40px;
  display: grid;
  grid-template-columns: 230px 1fr;
  gap: 48px;
  align-items: center;
}

.dev-portrait-box {
  position: relative;
  width: 220px;
  height: 220px;
  margin: 0 auto;
}

.dev-portrait-box::after {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 28px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  opacity: 0.28;
  filter: blur(12px);
  z-index: 0;
}

.dev-portrait {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  border-radius: 24px;
  object-fit: cover;
  border: 3px solid var(--surface);
  box-shadow: var(--shadow-md);
}

.dev-hero-content {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.dev-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary);
}

.dev-eyebrow .pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--emerald);
}

.dev-hero-content h1 {
  font-size: clamp(2.1rem, 4vw, 2.9rem);
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}

.dev-subtitle {
  font-size: 1.12rem;
  font-weight: 600;
  color: var(--text-muted);
  line-height: 1.5;
}

.dev-subtitle span {
  color: var(--primary);
}

.dev-summary {
  font-size: 0.98rem;
  color: var(--text);
  line-height: 1.75;
  max-width: 740px;
}

.dev-hero-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  font-size: 0.92rem;
  transition: all 0.18s ease;
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
}

/* Clean Hairline Metric Strip */
.proof-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  margin: 12px 0 56px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.proof-cell {
  padding: 22px 18px;
  text-align: center;
  border-right: 1px solid var(--border);
}

.proof-cell:last-child {
  border-right: none;
}

.proof-num {
  font-family: var(--font-head);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 4px;
}

.proof-desc {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* Dual-Role Core Pillars (Educator Trainer + Web Developer) */
.dual-pillars {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
  margin-bottom: 60px;
}

.pillar-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 34px 30px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.pillar-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.pillar-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.pillar-header h2 {
  font-size: 1.32rem;
  color: var(--text);
}

.pillar-header span {
  display: block;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--primary);
  margin-bottom: 2px;
}

.pillar-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.pillar-list li {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.6;
  padding-left: 18px;
  position: relative;
}

.pillar-list li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: 700;
  font-size: 1.1rem;
  line-height: 1.4;
}

.pillar-list strong {
  color: var(--text);
  font-weight: 600;
}

.pillar-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: auto;
  padding-top: 10px;
}

.p-tag {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--primary);
  background: var(--surface-2);
  padding: 4px 12px;
  border-radius: var(--radius-pill);
}

/* Editorial Section Heading */
.editorial-head {
  margin-bottom: 26px;
}

.editorial-head h2 {
  font-size: 1.65rem;
  color: var(--text);
  margin-bottom: 6px;
}

.editorial-head p {
  font-size: 0.94rem;
  color: var(--text-muted);
}

/* Clutter-Free Accreditation Ledger */
.ledger-section {
  margin-bottom: 60px;
}

.ledger-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.ledger-item {
  background: var(--surface);
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ledger-meta {
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--primary);
}

.ledger-item h3 {
  font-family: var(--font-body);
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text);
}

.ledger-item p {
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* Featured Project & Beyond Code Split */
.showcase-split {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 28px;
  margin-bottom: 56px;
}

.showcase-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 32px 28px;
  box-shadow: var(--shadow-sm);
}

.showcase-box h3 {
  font-size: 1.3rem;
  color: var(--text);
  margin-bottom: 10px;
}

.showcase-box p {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 16px;
}

.quote-minimal {
  font-family: var(--font-head);
  font-style: italic;
  font-size: 0.98rem;
  color: var(--text);
  border-left: 3px solid var(--primary);
  padding-left: 14px;
  margin: 16px 0;
}

.social-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.social-chip {
  font-size: 0.82rem;
  font-weight: 600;
  padding: 7px 15px;
  border-radius: var(--radius-pill);
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
  transition: all 0.15s ease;
}

.social-chip:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* Portfolio Experience Timeline & Verified Skills Matrix (about.html) */
.portfolio-section {
  margin-bottom: 56px;
}

.exp-timeline {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.exp-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 28px 30px;
  box-shadow: var(--shadow-sm);
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 24px;
  align-items: start;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.exp-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
}

.exp-period {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.exp-year-badge {
  display: inline-block;
  align-self: flex-start;
  background: var(--surface-2);
  color: var(--primary);
  border: 1px solid var(--border);
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.exp-org {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-muted);
  line-height: 1.4;
}

.exp-details h3 {
  font-family: var(--font-body);
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.exp-details p {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 12px;
}

.exp-highlights {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.exp-highlights li {
  font-size: 0.88rem;
  color: var(--text);
  padding-left: 18px;
  position: relative;
  line-height: 1.55;
}

.exp-highlights li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: 700;
}

.exp-highlights strong {
  color: var(--primary);
  font-weight: 600;
}

.skills-matrix {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.skill-group-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 26px 28px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.skill-group-title {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--primary);
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.verified-chip-pool {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.v-chip {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 6px 13px;
  border-radius: var(--radius-pill);
  font-size: 0.81rem;
  font-weight: 600;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.v-chip:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.cred-id-tag {
  display: inline-block;
  margin-top: 4px;
  font-family: monospace;
  font-size: 0.74rem;
  color: var(--text-muted);
  background: var(--surface-2);
  padding: 2px 8px;
  border-radius: 6px;
  align-self: flex-start;
}

/* Responsive Rules for About Page */
@media (max-width: 920px) {
  .dev-hero {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 28px 0 24px;
  }

  .dev-portrait-box {
    width: 110px;
    height: 110px;
    margin: 0;
  }

  .dev-portrait {
    border-radius: 50%;
  }

  .dev-portrait-box::after {
    border-radius: 50%;
  }

  .proof-strip {
    grid-template-columns: repeat(2, 1fr);
  }

  .proof-cell:nth-child(2) {
    border-right: none;
  }

  .proof-cell:nth-child(1),
  .proof-cell:nth-child(2) {
    border-bottom: 1px solid var(--border);
  }

  .dual-pillars,
  .ledger-grid,
  .showcase-split,
  .exp-card,
  .skills-matrix {
    grid-template-columns: 1fr;
  }

  .exp-card {
    padding: 22px 20px;
    gap: 14px;
  }
}


/* ==========================================================================
   09. CONTACT FORM, SUPPORT INFO & CROWDFUNDING MODAL (contact.html)
   ========================================================================== */
.page-intro {
  text-align: center;
  margin-bottom: 52px;
}

.page-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface-2);
  color: var(--primary);
  border: 1px solid var(--border);
  padding: 5px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.main-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 36px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
}

.panel-heading {
  margin-bottom: 24px;
}

.panel-heading h2 {
  font-size: 1.65rem;
  color: var(--text);
  margin-bottom: 6px;
}

.panel-heading p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin: 0;
}

.query-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.form-group textarea,
.form-group input {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1.5px solid var(--border);
  color: var(--text);
  font-size: 0.95rem;
  outline: none;
  transition: all 0.2s ease;
}

.form-group textarea {
  resize: vertical;
  min-height: 110px;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 20%, transparent);
  background: var(--surface);
}

.field-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.btn-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #FFFFFF;
  font-weight: 700;
  font-size: 1rem;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  box-shadow: 0 6px 18px var(--accent-glow);
  transition: all 0.2s ease;
  margin-top: 6px;
}

.btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--accent-glow);
}

.btn-submit:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

.form-status {
  font-size: 0.92rem;
  font-weight: 600;
  text-align: center;
  margin-top: 10px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  display: none;
  line-height: 1.5;
}

.form-status.error {
  background: rgba(239, 68, 68, 0.12);
  color: #EF4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
  display: block;
}

.right-col {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.info-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 30px;
  box-shadow: var(--shadow);
}

.info-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.info-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.info-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--primary);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
}

.info-text h4 {
  font-family: var(--font-body);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.info-text a,
.info-text span {
  font-weight: 600;
  font-size: 0.98rem;
  color: var(--text);
}

.info-text a:hover {
  color: var(--primary);
}

.crowdfund-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 32px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.crowdfund-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface-2);
  color: var(--accent);
  border: 1px solid var(--border);
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.crowdfund-card h3 {
  font-size: 1.45rem;
  color: var(--text);
  margin-bottom: 8px;
}

.crowdfund-card .cause-desc {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.6;
  margin-bottom: 20px;
}

.cf-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.qr-wrapper {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px;
  text-align: center;
  flex-shrink: 0;
  width: 150px;
}

.qr-wrapper img {
  width: 126px;
  height: 126px;
  object-fit: contain;
  border-radius: 8px;
}

.qr-tag {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  margin-top: 6px;
  text-transform: uppercase;
  display: block;
}

.cf-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.btn-upi-pay {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, #6C38F7, #EB4793);
  color: #FFFFFF;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  box-shadow: 0 4px 14px rgba(235, 71, 147, 0.25);
  transition: all 0.2s;
}

.btn-upi-pay:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(235, 71, 147, 0.35);
}

.upi-copy-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
}

.upi-id {
  font-family: monospace;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btn-copy-upi {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}

.btn-copy-upi:hover {
  background: var(--primary);
  color: #FFFFFF;
  border-color: var(--primary);
}

/* Verification Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(18, 13, 27, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 36px 32px 30px;
  max-width: 440px;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
  transform: scale(0.92) translateY(10px);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.active .modal-card {
  transform: scale(1) translateY(0);
}

.modal-icon-ring {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.12);
  border: 2px solid var(--success);
  color: var(--success);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.modal-icon-ring svg {
  width: 34px;
  height: 34px;
}

.modal-title {
  font-size: 1.5rem;
  color: var(--text);
  margin-bottom: 12px;
}

.modal-msg {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 26px;
}

.modal-msg strong {
  color: var(--primary);
}

.btn-modal-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 13px 24px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #FFFFFF;
  font-weight: 700;
  font-size: 0.98rem;
  border: none;
  cursor: pointer;
  box-shadow: 0 6px 18px var(--accent-glow);
  transition: all 0.2s ease;
}

.btn-modal-close:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--accent-glow);
}


/* ==========================================================================
   10. OFFICIAL LETTERS & CIRCULARS REPOSITORY (letter.html)
   ========================================================================== */
.doc-controls {
  max-width: 1100px;
  margin: 1.5rem auto;
  padding: 0 1rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.control-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  margin-left: 0.2rem;
}

.doc-controls .form-control {
  width: 100%;
  padding: 0.6rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  background-color: var(--surface);
  color: var(--text);
  transition: border-color 0.2s;
  appearance: none;
}

.doc-controls select.form-control {
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 1em;
  padding-right: 2.5rem;
  cursor: pointer;
}

.doc-controls .form-control:focus {
  outline: none;
  border-color: var(--primary);
}

.doc-container {
  max-width: 1100px;
  margin: 0 auto 4rem auto;
  padding: 0 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.doc-row {
  display: flex;
  flex-direction: column;
  padding: 0.85rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background-color: var(--surface);
  transition: transform 0.15s ease, box-shadow 0.2s ease, border-color 0.15s ease;
  gap: 0.85rem;
  width: 100%;
  overflow: hidden;
}

.doc-row:hover {
  background-color: var(--surface-2);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(123, 47, 247, 0.1);
  border-color: var(--primary);
}

.doc-info-left {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
}

.doc-sl {
  color: var(--primary);
  font-weight: 700;
  font-size: 0.95rem;
  white-space: nowrap;
  flex-shrink: 0;
  text-align: center;
  min-width: 20px;
}

.doc-type-badge {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  background-color: var(--badge-bg);
  color: var(--badge-text);
  padding: 0.25rem 0.55rem;
  border-radius: 6px;
  white-space: nowrap;
  flex-shrink: 0;
  text-align: center;
}

.doc-cat-badge {
  font-size: 0.75rem;
  font-weight: 500;
  background-color: var(--cat-bg);
  color: var(--cat-text);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-pill);
  white-space: nowrap;
  flex-shrink: 0;
  text-align: center;
}

.doc-text-group {
  display: flex;
  flex-direction: column;
  flex: 1 1 0%;
  min-width: 0;
  justify-content: center;
}

.doc-title {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  white-space: normal;
  word-break: break-word;
  overflow-wrap: break-word;
  line-height: 1.45;
  display: block;
}

.doc-info-right {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  flex-shrink: 0;
  width: 100%;
}

.doc-date {
  font-size: 0.85rem;
  color: var(--text-muted);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}

.download-btn {
  background-color: var(--success);
  color: #FFFFFF;
  border: none;
  padding: 0.45rem 1.35rem;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 0.85rem;
  transition: all 0.2s ease;
  white-space: nowrap;
  text-align: center;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.25);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.download-btn:hover {
  background-color: #059669;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(16, 185, 129, 0.35);
}

.no-results {
  text-align: center;
  padding: 3rem;
  color: var(--text-muted);
  font-size: 1rem;
  background-color: var(--surface);
  border-radius: var(--radius);
  border: 1px dashed var(--border);
}


/* ==========================================================================
   11. ULTIMATE AI HUB MASONRY TERMINAL (aihub.html)
   ========================================================================== */
.ai-page-header {
  text-align: center;
  padding: 34px 0 24px;
}

.ai-page-header h1 {
  font-weight: 700;
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  line-height: 1.25;
  margin-bottom: 6px;
  background: linear-gradient(100deg, var(--primary) 15%, var(--accent) 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.ai-page-header p {
  color: var(--text-muted);
  max-width: 680px;
  margin: 0 auto;
  font-size: 0.95rem;
}

.dashboard {
  column-count: 2;
  column-gap: 22px;
  margin-top: 10px;
  margin-bottom: 50px;
}

.ai-section {
  break-inside: avoid;
  page-break-inside: avoid;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px 20px;
  margin-bottom: 22px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}

.ai-section h2 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
}

.ai-links-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  width: 100%;
}

.ai-btn {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 12px 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-weight: 600;
  font-size: 0.92rem;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
  min-height: 64px;
}

.ai-btn span {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-top: 3px;
}

.ai-btn:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
  background: color-mix(in srgb, var(--primary) 12%, var(--surface-2));
}

[data-theme="dark"] .ai-btn {
  background: #261D3A;
}


/* ==========================================================================
   12. VIDEO SERIES THEATER & COURSE DIRECTORY (learn.html)
   ========================================================================== */
.learn-hero {
  text-align: center;
  padding: 24px 0 18px;
}

.hero-badge {
  display: inline-block;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--primary);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 4px 14px;
  border-radius: var(--radius-pill);
  margin-bottom: 10px;
  text-transform: uppercase;
}

.learn-hero h1 {
  font-weight: 700;
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  line-height: 1.25;
  margin-bottom: 6px;
  background: linear-gradient(100deg, var(--primary) 15%, var(--accent) 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.learn-hero p {
  color: var(--text-muted);
  max-width: 680px;
  margin: auto;
  font-size: 0.92rem;
}

.course-selection-bar {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 12px;
  margin-bottom: 16px;
  -webkit-overflow-scrolling: touch;
}

.course-selection-bar::-webkit-scrollbar {
  display: none;
}

.course-chip {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  white-space: nowrap;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
  transition: all 0.2s ease;
}

.course-chip:hover {
  border-color: var(--primary);
  background: var(--surface-2);
}

.course-chip.active {
  background: var(--primary);
  color: #FFFFFF;
  border-color: var(--primary);
  box-shadow: 0 4px 12px color-mix(in srgb, var(--primary) 28%, transparent);
}

.player-theater-section {
  margin: 6px 0 38px;
  width: 100%;
}

.theater-container {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: 1fr 380px;
}

.video-stage {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-right: 1px solid var(--border);
  min-width: 0;
}

.video-screen-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.video-screen-wrapper iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.player-meta-bar {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--surface);
}

.meta-details {
  min-width: 0;
  flex: 1;
}

.meta-details-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.now-tag {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--primary);
  background: var(--surface-2);
  padding: 2px 8px;
  border-radius: 4px;
  letter-spacing: 0.04em;
}

.meta-details h2 {
  font-size: 1.05rem;
  color: var(--text);
  margin: 4px 0 2px;
  overflow-wrap: anywhere;
}

.meta-details p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.player-actions-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.btn-stage-bookmark {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-stage-bookmark:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.btn-stage-bookmark.bookmarked {
  background: color-mix(in srgb, var(--gold) 15%, var(--surface));
  color: var(--gold);
  border-color: var(--gold);
}

.btn-yt-launch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #FF0000;
  color: #FFFFFF;
  border-radius: var(--radius-pill);
  padding: 8px 16px;
  font-size: 0.8rem;
  font-weight: 700;
  min-height: 38px;
  white-space: nowrap;
  transition: opacity 0.15s ease;
}

.btn-yt-launch:hover {
  opacity: 0.88;
}

/* Playlist Sidebar */
.playlist-sidebar {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  height: 100%;
  min-width: 0;
}

.sidebar-header {
  padding: 14px 18px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.sidebar-header-left {
  min-width: 0;
  flex: 1;
}

.sidebar-header h3 {
  font-size: 0.92rem;
  color: var(--text);
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-stats {
  font-size: 0.72rem;
  color: var(--text-muted);
  display: block;
  margin-top: 1px;
}

.mobile-drawer-indicator {
  display: none;
  font-size: 0.75rem;
  color: var(--primary);
}

.sidebar-items-scroll {
  overflow-y: auto;
  max-height: 480px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  -webkit-overflow-scrolling: touch;
}

.playlist-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: var(--surface);
  cursor: pointer;
  transition: all 0.15s ease;
}

.playlist-row:hover {
  background: var(--surface-2);
  border-color: var(--border);
}

.playlist-row.active {
  background: color-mix(in srgb, var(--primary) 10%, var(--surface));
  border-color: var(--primary);
}

.row-index {
  width: 22px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary);
  text-align: center;
  flex-shrink: 0;
}

.row-thumb {
  position: relative;
  width: 72px;
  aspect-ratio: 16 / 9;
  border-radius: 6px;
  overflow: hidden;
  background: #000000;
  flex-shrink: 0;
}

.row-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.row-info {
  flex: 1;
  min-width: 0;
}

.row-topic-pill {
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--primary);
  background: var(--surface-2);
  padding: 1px 6px;
  border-radius: 4px;
  display: inline-block;
  margin-bottom: 2px;
}

.row-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.row-bookmark-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1rem;
  padding: 4px;
  flex-shrink: 0;
  transition: transform 0.15s ease, color 0.15s ease;
}

.row-bookmark-btn:hover {
  transform: scale(1.15);
  color: var(--gold);
}

.row-bookmark-btn.bookmarked {
  color: var(--gold);
}

/* Video Directory & Cards */
.directory {
  margin-bottom: 50px;
}

.section-heading {
  border-bottom: 2px solid var(--border);
  padding-bottom: 10px;
  margin-bottom: 18px;
}

.section-heading h2 {
  font-size: 1.22rem;
  color: var(--text);
}

.section-heading p {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.tabs-wrap {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 2px;
}

.tabs-wrap::-webkit-scrollbar {
  display: none;
}

.tabs {
  display: flex;
  gap: 8px;
  white-space: nowrap;
}

.tab {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  padding: 7px 15px;
  border-radius: var(--radius-pill);
  font-size: 0.82rem;
  font-weight: 600;
  min-height: 38px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.tab.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #FFFFFF;
}

.search-wrap {
  width: min(100%, 320px);
  min-width: 200px;
}

.search {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 8px 16px;
  background: var(--surface);
  color: var(--text);
  outline: none;
  font-size: 0.84rem;
  transition: border-color 0.2s;
}

.search:focus {
  border-color: var(--primary);
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 18px;
}

.video-card {
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, border-color 0.15s ease;
  position: relative;
}

.video-card:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
}

.video-card .card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.card-top-left {
  display: flex;
  align-items: center;
  gap: 6px;
}

.video-card .badge-tag {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(239, 68, 68, 0.12);
  color: #EF4444;
  text-transform: uppercase;
}

.category-pill {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--primary);
  background: var(--surface-2);
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
}

.card-bookmark-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.15rem;
  padding: 2px 6px;
  transition: transform 0.15s ease, color 0.15s ease;
}

.card-bookmark-btn:hover {
  transform: scale(1.15);
  color: var(--gold);
}

.card-bookmark-btn.bookmarked {
  color: var(--gold);
}

.card-thumb-preview {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 12px;
  background: #000000;
  cursor: pointer;
}

.card-thumb-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.2s ease;
}

.card-thumb-preview:hover img {
  transform: scale(1.04);
}

.thumb-play-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  transition: background 0.2s;
}

.card-thumb-preview:hover .thumb-play-overlay {
  background: rgba(0, 0, 0, 0.15);
}

.video-title {
  font-size: 0.98rem;
  line-height: 1.4;
  margin-bottom: 6px;
  color: var(--text);
  overflow-wrap: anywhere;
}

.video-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 14px;
  flex: 1;
}

.video-card .card-meta {
  font-size: 0.74rem;
  color: var(--text-muted);
  padding-bottom: 10px;
  margin-bottom: 12px;
  border-bottom: 1px dashed var(--border);
}

.card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.btn-action {
  min-height: 38px;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 700;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  cursor: pointer;
}

.btn-stream {
  background: var(--surface-2);
  border-color: var(--border);
  color: var(--primary);
}

.btn-stream:hover {
  background: var(--primary);
  color: #FFFFFF;
}

.btn-redirect {
  background: #FF0000;
  color: #FFFFFF;
}

.empty-notice {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px 10px;
  color: var(--text-muted);
  font-size: 0.92rem;
}


/* ==========================================================================
   13. GLOBAL FOOTER, ACCESSIBILITY & RESPONSIVE BREAKPOINTS
   ========================================================================== */
footer {
  border-top: 1px solid var(--border);
  padding: 26px 0 76px;
  padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px));
  color: var(--text-muted);
  font-size: 0.81rem;
  text-align: center;
  line-height: 1.65;
  margin-top: auto;
}

footer p + p {
  margin-top: 4px;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- Desktop >= 768px --- */
@media (min-width: 768px) {
  .doc-controls {
    grid-template-columns: 2fr 1fr 1fr;
  }

  .doc-row {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.25rem;
    gap: 1.5rem;
  }

  .doc-info-left {
    flex-wrap: nowrap;
    flex: 1 1 auto;
    min-width: 0;
    width: auto;
  }

  .doc-sl {
    width: 24px;
  }

  .doc-type-badge {
    width: 44px;
  }

  .doc-cat-badge {
    width: 110px;
  }

  .doc-text-group {
    flex: 1 1 0%;
  }

  .doc-info-right {
    width: auto;
    justify-content: flex-end;
    gap: 1.25rem;
  }
}

@media (min-width: 480px) {
  .cf-body {
    flex-direction: row;
    align-items: center;
    gap: 24px;
  }
}

@media (min-width: 540px) {
  .form-row {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 880px) {
  .main-grid {
    grid-template-columns: 1.15fr 1fr;
    align-items: start;
  }
}

/* --- Tablet & Small Laptop <= 980px --- */
@media (max-width: 980px) {
  .dashboard {
    column-count: 1;
    column-gap: 0;
  }
}

/* --- Navigation & Theater Collapse <= 920px --- */
@media (max-width: 920px) {
  .header-inner {
    flex-wrap: wrap;
    height: auto;
    padding-top: 10px;
    padding-bottom: 10px;
    gap: 10px;
  }

  .brand .full {
    display: none;
  }

  .menu-toggle-btn {
    display: flex;
  }

  .search-box {
    margin-right: 0;
    max-width: none;
  }

  .main-nav {
    display: none;
    width: 100%;
    order: 5;
    margin-left: 0;
    margin-top: 6px;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    background: var(--surface-2);
    padding: 12px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
  }

  .main-nav.open {
    display: flex;
    animation: slideDown 0.2s ease;
  }

  .main-nav a {
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 1rem;
  }

  .main-nav a.active {
    background: var(--surface);
  }

  .main-nav a.active::after {
    display: none;
  }

  /* Video Theater Mobile Stack (learn.html) */
  .theater-container {
    grid-template-columns: 1fr;
  }

  .video-stage {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .player-meta-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .player-actions-row {
    justify-content: space-between;
  }

  .btn-yt-launch {
    flex: 1;
    justify-content: center;
  }

  .sidebar-header {
    cursor: pointer;
  }

  .mobile-drawer-indicator {
    display: inline-block;
  }

  .sidebar-items-scroll {
    display: none;
    max-height: 280px;
  }

  .sidebar-items-scroll.expanded {
    display: flex;
  }
}

/* --- Mobile <= 768px --- */
@media (max-width: 768px) {
  .wrap {
    padding: 0 14px;
  }

  .hero {
    grid-template-columns: 1fr;
    padding: 16px 0 12px;
    gap: 14px;
  }

  .hero h1 {
    font-size: 1.45rem;
    line-height: 1.3;
  }

  .category-nav {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .cat-tab-btn {
    flex-direction: row;
    justify-content: space-between;
    padding: 11px 16px;
    font-size: 0.88rem;
  }

  .sub-tabs {
    flex-direction: column;
    gap: 6px;
  }

  .sub-tab-btn {
    padding: 9px 12px;
    font-size: 0.82rem;
  }

  .calc-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .tab-selector {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
  }

  .tab-btn {
    min-width: 0;
    padding: 8px 10px;
    font-size: 0.78rem;
  }

  .rules-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .download-card {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .download-card .doc-link-btn {
    width: 100%;
    justify-content: center;
  }

  .section .section-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .table-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .table-search {
    max-width: 100%;
  }

  .table-filters {
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 3px;
  }
}

/* --- Small Mobile <= 580px --- */
@media (max-width: 580px) {
  .search-box {
    order: 4;
    flex: 1 0 100%;
    margin-left: 0;
    max-width: 100%;
  }

  .news-grid,
  .video-grid {
    grid-template-columns: 1fr;
  }

  .panel {
    padding: 24px 18px;
  }

  .info-card,
  .crowdfund-card {
    padding: 22px 18px;
  }

  .toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .search-wrap {
    width: 100%;
  }

  .player-meta-bar {
    padding: 14px;
  }

  .ai-section {
    padding: 16px 12px;
    margin-bottom: 14px;
  }

  .ai-links-grid {
    gap: 8px;
  }

  .ai-btn {
    padding: 10px 12px;
    font-size: 0.86rem;
    min-height: 58px;
  }

  .ai-btn span {
    font-size: 0.68rem;
  }
}

@media (max-width: 360px) {
  .ai-links-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   14. FLOATING BSEB ASSISTANT AI WIDGET (BOTTOM-RIGHT)
   ========================================================================== */
.bseb-chat-root {
  position: fixed;
  right: 18px;
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  z-index: 950;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  font-family: var(--font-body);
}

.bseb-chat-fab {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 46px;
  padding: 0 18px;
  border-radius: var(--radius-pill);
  border: 1px solid color-mix(in srgb, var(--primary) 25%, transparent);
  background: var(--primary);
  color: #FFFFFF;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(123, 47, 247, 0.34);
  transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1), background 0.18s ease, box-shadow 0.18s ease;
}

.bseb-chat-fab:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(123, 47, 247, 0.4);
}

:root[data-theme="dark"] .bseb-chat-fab {
  color: #120D1C;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]):not([data-theme="dark"]) .bseb-chat-fab {
    color: #120D1C;
  }
}

.bseb-chat-panel {
  width: min(390px, calc(100vw - 28px));
  max-height: min(560px, calc(100vh - 110px));
  display: flex;
  flex-direction: column;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: bsebChatIn 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.bseb-chat-panel[hidden] {
  display: none;
}

@keyframes bsebChatIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.bseb-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}

.bseb-chat-title-wrap {
  min-width: 0;
}

.bseb-chat-title {
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}

.bseb-chat-subtitle {
  font-size: 0.74rem;
  color: var(--text-muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bseb-chat-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.bseb-chat-lang-btn {
  padding: 5px 10px;
  min-height: 30px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
}

.bseb-chat-lang-btn:hover {
  background: var(--primary);
  color: #FFFFFF;
}

:root[data-theme="dark"] .bseb-chat-lang-btn:hover {
  color: #120D1C;
}

.bseb-chat-icon-btn {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.bseb-chat-icon-btn:hover {
  color: var(--text);
  border-color: var(--primary);
}

.bseb-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 220px;
}

.bseb-chat-welcome p {
  font-size: 0.86rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 12px;
}

.bseb-chat-starters {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.bseb-chat-starter-btn {
  text-align: left;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-size: 0.83rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.bseb-chat-starter-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateX(2px);
}

.bseb-chat-msg {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 92%;
}

.bseb-chat-msg--user {
  align-self: flex-end;
  align-items: flex-end;
}

.bseb-chat-msg--assistant {
  align-self: flex-start;
  align-items: flex-start;
  max-width: 100%;
}

.bseb-chat-bubble {
  padding: 10px 13px;
  border-radius: 12px;
  font-size: 0.86rem;
  line-height: 1.55;
  overflow-wrap: break-word;
}

.bseb-chat-msg--user .bseb-chat-bubble {
  background: var(--primary);
  color: #FFFFFF;
  border-bottom-right-radius: 4px;
}

:root[data-theme="dark"] .bseb-chat-msg--user .bseb-chat-bubble {
  color: #120D1C;
  font-weight: 500;
}

.bseb-chat-msg--assistant .bseb-chat-bubble {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
}

.bseb-chat-bubble--loading {
  color: var(--text-muted);
  font-style: italic;
}

.bseb-chat-bubble--error {
  border-color: color-mix(in srgb, var(--danger) 45%, var(--border));
  color: var(--danger);
}

.bseb-chat-bubble p + p {
  margin-top: 7px;
}

.bseb-chat-list {
  margin: 6px 0 2px;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.bseb-chat-retry-btn {
  margin-top: 8px;
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--danger);
  background: var(--surface);
  color: var(--danger);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}

.bseb-chat-links {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

.bseb-chat-link-card {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.bseb-chat-link-card:hover {
  border-color: var(--primary);
  transform: translateY(-1px);
}

.bseb-chat-link-title {
  font-size: 0.83rem;
  font-weight: 700;
  color: var(--primary);
}

.bseb-chat-link-meta {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.bseb-chat-followups {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  width: 100%;
}

.bseb-chat-followup-btn {
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.bseb-chat-followup-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.bseb-chat-composer {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.bseb-chat-input {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-size: 0.88rem;
  outline: none;
}

.bseb-chat-input:focus {
  border-color: var(--primary);
  background: var(--surface);
}

.bseb-chat-send {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  border: none;
  background: var(--primary);
  color: #FFFFFF;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s ease, opacity 0.15s ease;
}

.bseb-chat-send:hover:not(:disabled) {
  background: var(--primary-hover);
}

.bseb-chat-send:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

:root[data-theme="dark"] .bseb-chat-send {
  color: #120D1C;
}

@media (max-width: 480px) {
  .bseb-chat-root {
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  }

  .bseb-chat-panel {
    width: calc(100vw - 24px);
    max-height: min(72vh, 520px);
  }

  .bseb-chat-fab {
    min-height: 44px;
    padding: 0 15px;
    font-size: 0.84rem;
  }
}

/* --- Reduced Motion Accessibility Preference --- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}
