/* ============================================================
   AimediLabs — Main Stylesheet
   Theme: Very Dark Black / Violet typography
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@400;500;600;700&family=Jost:wght@300;400;500;600&display=swap');

:root {
--black:        #08041a;
--black-soft:   #0b0620;
--black-card:   #0e0826;
--black-card2:  #110a2e;
--black-border: #1f1245;
--black-border2:#2a1858;



  --violet-deep:  #3b0764;
  --violet-main:  #6d28d9;
  --violet-mid:   #8b5cf6;
  --violet-light: #a78bfa;
  --violet-pale:  #c4b5fd;
  --violet-glow:  rgba(109,40,217,0.14);
  --violet-glow2: rgba(139,92,246,0.07);

  --text-primary:   #ddd6fe;
  --text-secondary: #a78bfa;
  --text-body:      #9d96b8;
  --text-muted:     #5e5878;
  --text-white:     #f0ebff;

  --radius-sm:   6px;
  --radius-md:   12px;
  --radius-lg:   18px;
  --font-display:'Cormorant Garamond', Georgia, serif;
  --font-body:   'Jost', 'Segoe UI', sans-serif;
  --transition:  0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body { background-color: var(--black); color: var(--text-body); font-family: var(--font-body); font-weight: 400; line-height: 1.7; min-height: 100vh; overflow-x: hidden; padding-top: 61px; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
ul { list-style: none; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.2; color: var(--text-primary); }
h4, h5 { font-family: var(--font-body); font-weight: 600; color: var(--text-primary); }
h1 { font-size: clamp(2.2rem, 4.5vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); }
h3 { font-size: clamp(1.1rem, 1.8vw, 1.35rem); }
h4 { font-size: 0.93rem; }
p  { font-size: 0.95rem; color: var(--text-body); line-height: 1.75; }

.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.section    { padding: 68px 0; }
.section-sm { padding: 44px 0; }
.text-center { text-align: center; }

.section-label { display: inline-block; font-size: 0.68rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--violet-mid); margin-bottom: 10px; }
.section-title { color: var(--text-primary); margin-bottom: 12px; }
.section-desc  { font-size: 0.95rem; color: var(--text-body); max-width: 520px; line-height: 1.75; }

.divider { height: 1px; background: linear-gradient(90deg, transparent, var(--black-border) 25%, var(--black-border) 75%, transparent); }

/* HEADER */
#site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  width: 100%;
  background: rgba(7,7,9,0.94);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--black-border);
}
/* When Google Translate banner is active, body gets pushed down.
   The header stays sticky at top:0 so it always sits above content. */
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 12px; }
.wordmark { font-family: var(--font-display); font-size: 1.42rem; font-weight: 700; letter-spacing: -0.02em; color: var(--text-white); flex-shrink: 0; }
.wordmark span { color: var(--violet-light); }
.main-nav { position: relative; margin-left: 0; }
.nav-toggle { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 7px; border: 1px solid var(--black-border); border-radius: var(--radius-sm); background: transparent; transition: border-color var(--transition); }
.nav-toggle:hover { border-color: var(--violet-mid); }
.nav-toggle span { display: block; width: 20px; height: 1.5px; background: var(--text-primary); border-radius: 2px; transition: all var(--transition); }
.nav-dropdown-wrapper { position: relative; }
.nav-trigger { display: flex; align-items: center; gap: 7px; cursor: pointer; padding: 7px 16px; border: 1px solid var(--black-border); border-radius: var(--radius-sm); background: transparent; color: var(--text-body); font-family: var(--font-body); font-size: 0.78rem; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; transition: all var(--transition); white-space: nowrap; }
.nav-trigger:hover, .nav-dropdown-wrapper.open .nav-trigger { border-color: var(--violet-mid); color: var(--violet-pale); }
.nav-trigger svg { width: 13px; height: 13px; transition: transform var(--transition); flex-shrink: 0; }
.nav-dropdown-wrapper.open .nav-trigger svg { transform: rotate(180deg); }
.nav-dropdown { display: none; position: absolute; top: calc(100% + 8px); right: 0; min-width: 232px; background: var(--black-card); border: 1px solid var(--black-border); border-radius: var(--radius-md); padding: 6px; box-shadow: 0 24px 64px rgba(0,0,0,0.92), 0 0 40px rgba(109,40,217,0.07); z-index: 200; animation: dropIn 0.18s cubic-bezier(0.4,0,0.2,1); }
@keyframes dropIn { from { opacity:0; transform:translateY(-6px); } to { opacity:1; transform:translateY(0); } }
.nav-dropdown-wrapper.open .nav-dropdown { display: block; }
.nav-dropdown a { display: flex; align-items: center; gap: 9px; padding: 9px 11px; border-radius: var(--radius-sm); font-size: 0.86rem; font-weight: 400; color: var(--text-body); transition: all var(--transition); }
.nav-dropdown a:hover { background: var(--violet-glow); color: var(--violet-pale); }
.nav-dropdown a.active { color: var(--violet-pale); background: var(--violet-glow); }
.nav-dropdown .nav-icon { width: 28px; height: 28px; background: var(--black-border); border-radius: 5px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 0.78rem; }
.nav-dropdown .nav-divider { height: 1px; background: var(--black-border); margin: 5px 0; }

/* HERO */
.hero { position: relative; padding: 76px 0 68px; overflow: hidden; }
.hero::before { content: ''; position: absolute; top: -140px; left: 50%; transform: translateX(-50%); width: 760px; height: 460px; background: radial-gradient(ellipse at center, rgba(109,40,217,0.10) 0%, transparent 68%); pointer-events: none; }
.hero-badge { display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px; border: 1px solid rgba(167,139,250,0.26); border-radius: 100px; font-size: 0.7rem; font-weight: 500; color: var(--violet-light); letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 20px; background: rgba(109,40,217,0.07); }
.hero-badge::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--violet-mid); flex-shrink: 0; }
.hero h1 { color: var(--text-white); margin-bottom: 16px; max-width: 660px; }
.hero h1 em { font-style: italic; color: var(--violet-pale); }
.hero-sub { font-size: 1rem; color: var(--text-body); max-width: 520px; margin-bottom: 32px; line-height: 1.78; }
.hero-ctas { display: flex; gap: 11px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 0; margin-top: 44px; border: 1px solid var(--black-border); border-radius: var(--radius-md); overflow: hidden; max-width: 540px; }
.hero-stat { flex: 1; padding: 14px 18px; border-right: 1px solid var(--black-border); background: var(--black-card); }
.hero-stat:last-child { border-right: none; }
.hero-stat strong { display: block; font-family: var(--font-display); font-size: 1.55rem; font-weight: 700; color: var(--violet-light); line-height: 1; margin-bottom: 4px; }
.hero-stat span { font-size: 0.72rem; color: var(--text-muted); letter-spacing: 0.04em; }

/* BUTTONS */
.btn { display: inline-flex; align-items: center; gap: 7px; padding: 11px 22px; border-radius: var(--radius-sm); font-family: var(--font-body); font-size: 0.875rem; font-weight: 500; letter-spacing: 0.02em; cursor: pointer; border: 1px solid transparent; transition: all var(--transition); text-decoration: none; }
.btn-primary { background: var(--violet-main); color: #fff; border-color: var(--violet-main); }
.btn-primary:hover { background: var(--violet-mid); border-color: var(--violet-mid); transform: translateY(-1px); box-shadow: 0 8px 28px rgba(109,40,217,0.38); }
.btn-outline { background: rgba(30, 4, 56, 0.7); color: var(--violet-light); border-color: rgba(89,20,180,0.45); }
.btn-outline:hover { border-color: var(--violet-mid); background: rgba(30,4,56,0.9); transform: translateY(-1px); }



/* MISSION BAND */
.mission-band { background: var(--black-card); border-top: 1px solid var(--black-border); border-bottom: 1px solid var(--black-border); padding: 48px 0; }
.mission-inner { display: grid; grid-template-columns: 1fr 2.2fr; gap: 48px; align-items: center; }
.mission-inner h2 { font-size: clamp(1.4rem, 2.2vw, 1.9rem); color: var(--text-primary); }
.mission-body { display: flex; flex-direction: column; gap: 11px; }
.mission-body p { font-size: 0.9rem; color: var(--text-body); line-height: 1.8; }
.mission-body p strong { color: var(--violet-pale); font-weight: 500; }

/* AUDIENCE CARDS */
.audience-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 36px; }
.audience-card { background: var(--black-card); border: 1px solid var(--black-border); border-radius: var(--radius-lg); padding: 22px 20px; transition: all var(--transition); position: relative; overflow: hidden; }
.audience-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: linear-gradient(90deg, transparent, var(--violet-main), transparent); opacity: 0; transition: opacity var(--transition); }
.audience-card:hover { border-color: rgba(109,40,217,0.36); transform: translateY(-2px); box-shadow: 0 10px 30px rgba(0,0,0,0.55), 0 0 20px rgba(109,40,217,0.07); }
.audience-card:hover::before { opacity: 1; }
.card-icon { width: 38px; height: 38px; border-radius: 8px; background: var(--violet-glow); border: 1px solid rgba(109,40,217,0.18); display: flex; align-items: center; justify-content: center; font-size: 1.1rem; margin-bottom: 14px; }
.audience-card h3 { color: var(--text-primary); margin-bottom: 7px; font-size: 1.1rem; }
.audience-card p { font-size: 0.84rem; line-height: 1.68; color: var(--text-muted); }
.card-tag-list { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 14px; }
.card-tag { font-size: 0.68rem; padding: 3px 8px; border-radius: 100px; border: 1px solid rgba(139,92,246,0.18); color: var(--violet-light); background: rgba(109,40,217,0.06); font-weight: 500; }

/* PROCESS GRID */
.process-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin-top: 36px; border: 1px solid var(--black-border); border-radius: var(--radius-lg); overflow: hidden; }
.process-item { padding: 24px 20px; border-right: 1px solid var(--black-border); background: var(--black-card); transition: background var(--transition); }
.process-item:last-child { border-right: none; }
.process-item:hover { background: var(--black-card2); }
.process-num { font-family: var(--font-display); font-size: 1.7rem; font-weight: 700; color: var(--violet-main); opacity: 0.32; line-height: 1; margin-bottom: 9px; }
.process-item h4 { font-size: 0.88rem; color: var(--text-primary); margin-bottom: 6px; font-weight: 600; }
.process-item p { font-size: 0.8rem; color: var(--text-muted); line-height: 1.62; }

/* TOOLS PREVIEW */
.tools-preview { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 36px; }
.tools-panel { background: var(--black-card); border: 1px solid var(--black-border); border-radius: var(--radius-lg); padding: 22px 20px; transition: border-color var(--transition); }
.tools-panel:hover { border-color: rgba(109,40,217,0.28); }
.panel-header { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; padding-bottom: 14px; border-bottom: 1px solid var(--black-border); }
.panel-icon { width: 34px; height: 34px; border-radius: 7px; background: rgba(109,40,217,0.12); display: flex; align-items: center; justify-content: center; font-size: 0.95rem; flex-shrink: 0; }
.panel-header h4 { font-size: 0.88rem; color: var(--text-primary); margin-bottom: 1px; }
.panel-header span { font-size: 0.72rem; color: var(--text-muted); }
.tool-list-item { display: flex; align-items: center; gap: 8px; padding: 7px 0; border-bottom: 1px solid rgba(255,255,255,0.03); font-size: 0.82rem; color: var(--text-body); transition: color var(--transition); }
.tool-list-item:last-child { border-bottom: none; }
.tool-list-item:hover { color: var(--violet-pale); }
.tool-dot { width: 4px; height: 4px; border-radius: 50%; background: var(--violet-mid); flex-shrink: 0; }
.panel-cta { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--black-border); }
.panel-cta a { font-size: 0.8rem; color: var(--violet-light); font-weight: 500; display: inline-flex; align-items: center; gap: 5px; transition: gap var(--transition), color var(--transition); }
.panel-cta a:hover { gap: 9px; color: var(--violet-pale); }

/* PRIVACY BAND */
.privacy-band { background: var(--black-card); border-top: 1px solid var(--black-border); border-bottom: 1px solid var(--black-border); padding: 40px 0; }
.privacy-grid { display: grid; grid-template-columns: auto 1fr; gap: 36px; align-items: center; }
.privacy-icon-wrap { width: 58px; height: 58px; border-radius: 13px; border: 1px solid rgba(109,40,217,0.22); background: var(--violet-glow); display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 1.6rem; }
.privacy-points { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.privacy-point h4 { font-size: 0.84rem; color: var(--violet-pale); margin-bottom: 4px; font-weight: 600; }
.privacy-point p { font-size: 0.78rem; color: var(--text-muted); line-height: 1.6; }

/* DISCLAIMER */
.disclaimer-bar { background: rgba(109,40,217,0.05); border: 1px solid rgba(109,40,217,0.14); border-radius: var(--radius-md); padding: 12px 16px; display: flex; gap: 10px; align-items: flex-start; margin-top: 28px; }
.disclaimer-bar svg { flex-shrink: 0; margin-top: 1px; }
.disclaimer-bar p { font-size: 0.76rem; color: var(--text-muted); line-height: 1.6; }
.disclaimer-bar strong { color: var(--violet-light); }

/* COMING SOON */
.coming-soon-wrap { min-height: 70vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 68px 24px; }
.coming-soon-badge { display: inline-flex; align-items: center; gap: 8px; padding: 5px 14px; border: 1px solid rgba(167,139,250,0.26); border-radius: 100px; font-size: 0.7rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--violet-mid); margin-bottom: 26px; background: rgba(109,40,217,0.06); }
.coming-soon-wrap h1 { color: var(--text-primary); margin-bottom: 14px; max-width: 540px; }
.coming-soon-wrap > p { max-width: 460px; margin-bottom: 32px; }

/* ABOUT */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; margin-top: 44px; }
.faq-list { margin-top: 14px; }
.faq-item { border-bottom: 1px solid var(--black-border); padding: 16px 0; }
.faq-item:first-child { border-top: 1px solid var(--black-border); }
.faq-question { font-weight: 500; color: var(--text-primary); cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 0.88rem; user-select: none; }
.faq-question svg { width: 15px; height: 15px; flex-shrink: 0; color: var(--violet-mid); transition: transform var(--transition); }
.faq-item.open .faq-question svg { transform: rotate(45deg); }
.faq-answer { display: none; padding-top: 10px; font-size: 0.86rem; color: var(--text-muted); line-height: 1.75; }
.faq-item.open .faq-answer { display: block; }
.contact-card { background: var(--black-card); border: 1px solid var(--black-border); border-radius: var(--radius-lg); padding: 28px; margin-top: 44px; }
.contact-card h3 { color: var(--text-primary); margin-bottom: 9px; font-size: 1.15rem; }
.contact-email { display: inline-flex; align-items: center; gap: 9px; margin-top: 14px; padding: 10px 16px; background: var(--violet-glow); border: 1px solid rgba(109,40,217,0.22); border-radius: var(--radius-sm); color: var(--violet-light); font-size: 0.88rem; font-weight: 500; transition: all var(--transition); }
.contact-email:hover { background: rgba(109,40,217,0.16); border-color: var(--violet-mid); }

/* LEGAL */
.legal-wrap { max-width: 740px; margin: 0 auto; padding: 68px 24px; }
.legal-wrap h1 { color: var(--text-primary); margin-bottom: 8px; font-size: clamp(1.6rem, 3vw, 2.1rem); }
.legal-meta { font-size: 0.78rem; color: var(--text-muted); margin-bottom: 44px; padding-bottom: 18px; border-bottom: 1px solid var(--black-border); }
.legal-wrap h2 { font-family: var(--font-body); font-size: 0.93rem; font-weight: 600; color: var(--text-primary); margin: 28px 0 9px; }
.legal-wrap p, .legal-wrap li { font-size: 0.86rem; color: var(--text-muted); line-height: 1.8; margin-bottom: 8px; }
.legal-wrap ul { padding-left: 16px; list-style: disc; }
.legal-wrap ul li { margin-bottom: 5px; }
.legal-wrap a { color: var(--violet-light); text-decoration: underline; text-underline-offset: 3px; }

/* PAGE HERO */
.page-hero { padding: 52px 0 44px; border-bottom: 1px solid var(--black-border); position: relative; overflow: hidden; }
.page-hero::before { content: ''; position: absolute; top: -80px; left: -80px; width: 400px; height: 300px; background: radial-gradient(ellipse, rgba(109,40,217,0.07) 0%, transparent 70%); pointer-events: none; }
.page-hero h1 { color: var(--text-primary); margin-bottom: 9px; }
.page-hero p  { max-width: 490px; }

/* FOOTER */
#site-footer { border-top: 1px solid var(--black-border); padding: 40px 0 26px; }
.footer-inner { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 36px; margin-bottom: 32px; }
.footer-brand p { font-size: 0.82rem; color: var(--text-muted); margin-top: 11px; max-width: 250px; line-height: 1.7; }
.footer-col h5 { font-size: 0.68rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 13px; }
.footer-col ul { display: flex; flex-direction: column; gap: 8px; }
.footer-col ul li a { font-size: 0.82rem; color: var(--text-muted); transition: color var(--transition); }
.footer-col ul li a:hover { color: var(--violet-light); }
.footer-bottom { padding-top: 20px; border-top: 1px solid var(--black-border); display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 9px; }
.footer-bottom p { font-size: 0.76rem; color: var(--text-muted); }
.footer-legal { display: flex; gap: 16px; }
.footer-legal a { font-size: 0.76rem; color: var(--text-muted); transition: color var(--transition); }
.footer-legal a:hover { color: var(--violet-light); }

/* RESPONSIVE */
@media (max-width: 960px) {
  .audience-grid  { grid-template-columns: 1fr 1fr; }
  .process-grid   { grid-template-columns: 1fr 1fr; }
  .tools-preview  { grid-template-columns: 1fr; }
  .mission-inner  { grid-template-columns: 1fr; gap: 20px; }
  .privacy-grid   { grid-template-columns: 1fr; }
  .privacy-points { grid-template-columns: 1fr 1fr 1fr; }
  .footer-inner   { grid-template-columns: 1fr 1fr; }
  .footer-inner .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 700px) {
  .container { padding: 0 16px; }
  .hero { padding: 56px 0 48px; }
  .section { padding: 48px 0; }
  .nav-trigger { display: none; }
  .nav-toggle  { display: flex; }
  .nav-dropdown { position: fixed; top: 60px; left: 0; right: 0; width: 100%; border-radius: 0; border-left: none; border-right: none; padding: 9px; box-shadow: 0 30px 60px rgba(0,0,0,0.96); }
  .main-nav.mobile-open .nav-dropdown { display: block; }
  .audience-grid  { grid-template-columns: 1fr; }
  .privacy-points { grid-template-columns: 1fr; }
  .footer-inner   { grid-template-columns: 1fr; gap: 24px; }
  .footer-bottom  { flex-direction: column; align-items: flex-start; }
  .hero-ctas      { flex-direction: column; }
  .btn            { justify-content: center; }
  .hero-stats     { max-width: 100%; }
}
@media (max-width: 460px) {
  .process-grid { grid-template-columns: 1fr; }
  .about-grid   { grid-template-columns: 1fr; gap: 32px; }
}

/* ============================================================
   TOOL PAGES — appended to style.css
   All tool pages live at /toolspatient/ or /toolshealthcare/
   Headers and footers use ../../ relative paths from subdirs
   ============================================================ */

/* ── BREADCRUMB ─────────────────────────────────────────────── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.76rem;
  color: var(--text-muted);
  padding: 14px 0;
  border-bottom: 1px solid var(--black-border);
  flex-wrap: wrap;
}
.breadcrumb a { color: var(--text-muted); transition: color var(--transition); }
.breadcrumb a:hover { color: var(--violet-light); }
.breadcrumb .bc-sep { color: var(--black-border2); font-size: 0.7rem; }
.breadcrumb .bc-current { color: var(--violet-light); }

/* ── TOOL PAGE HERO ─────────────────────────────────────────── */
.tool-hero {
  padding: 36px 0 32px;
  border-bottom: 1px solid var(--black-border);
  position: relative;
  overflow: hidden;
}
.tool-hero::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 320px; height: 280px;
  background: radial-gradient(ellipse, rgba(109,40,217,0.08) 0%, transparent 70%);
  pointer-events: none;
}
.tool-hero-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.tool-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border: 1px solid var(--black-border2);
  border-radius: 100px;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: var(--black-card);
  margin-bottom: 12px;
}
.tool-hero-badge .badge-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--violet-mid);
}
.tool-hero h1 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  color: var(--text-primary);
  margin-bottom: 8px;
}
.tool-hero p {
  font-size: 0.9rem;
  color: var(--text-body);
  max-width: 560px;
  line-height: 1.7;
}
.tool-hero-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 14px;
  flex-wrap: wrap;
}
.tool-meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.73rem;
  color: var(--text-muted);
  padding: 4px 10px;
  border: 1px solid var(--black-border);
  border-radius: 100px;
  background: var(--black-card);
}
.tool-meta-pill svg { color: var(--violet-mid); }

/* ── MAIN TOOL LAYOUT ───────────────────────────────────────── */
.tool-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 20px;
  padding: 28px 0 60px;
  align-items: start;
}
.tool-layout.tool-layout--full {
  grid-template-columns: 1fr;
}
.tool-layout.tool-layout--chat {
  grid-template-columns: 1fr 320px;
}

/* ── TOOL CARD (main working area) ──────────────────────────── */
.tool-card {
  background: var(--black-card);
  border: 1px solid var(--black-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.tool-card-header {
  padding: 18px 22px;
  border-bottom: 1px solid var(--black-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.tool-card-title {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}
.tool-card-title .tct-icon {
  width: 26px; height: 26px;
  border-radius: 5px;
  background: var(--violet-glow);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem;
  flex-shrink: 0;
}
.tool-card-body { padding: 22px; }
.tool-card-footer {
  padding: 14px 22px;
  border-top: 1px solid var(--black-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  background: var(--black-soft);
}

/* ── FORM ELEMENTS ──────────────────────────────────────────── */
.tool-form { display: flex; flex-direction: column; gap: 16px; }

.form-group { display: flex; flex-direction: column; gap: 6px; }

.form-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: 0.04em;
}
.form-label span {
  font-weight: 400;
  color: var(--text-muted);
  margin-left: 4px;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  background: var(--black);
  border: 1px solid var(--black-border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.875rem;
  padding: 10px 14px;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
  -webkit-appearance: none;
}
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--violet-mid);
  box-shadow: 0 0 0 3px rgba(109,40,217,0.12);
}
.form-input::placeholder,
.form-textarea::placeholder { color: var(--text-muted); }

.form-textarea {
  resize: vertical;
  min-height: 120px;
  line-height: 1.65;
}

.form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%235e5878' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  cursor: pointer;
}
.form-select option { background: var(--black-card); color: var(--text-primary); }

.form-hint {
  font-size: 0.74rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Radio / Checkbox group */
.form-check-group { display: flex; flex-direction: column; gap: 8px; }
.form-check-group.inline { flex-direction: row; flex-wrap: wrap; gap: 10px; }

.form-check {
  display: flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  font-size: 0.86rem;
  color: var(--text-body);
  padding: 9px 13px;
  border: 1px solid var(--black-border);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  user-select: none;
}
.form-check:hover {
  border-color: var(--violet-mid);
  color: var(--text-primary);
  background: var(--violet-glow2);
}
.form-check input[type="radio"],
.form-check input[type="checkbox"] {
  width: 15px; height: 15px;
  accent-color: var(--violet-mid);
  cursor: pointer;
  flex-shrink: 0;
}

/* File upload area */
.form-upload {
  border: 1.5px dashed var(--black-border2);
  border-radius: var(--radius-md);
  padding: 28px 20px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  background: var(--black);
}
.form-upload:hover {
  border-color: var(--violet-mid);
  background: var(--violet-glow2);
}
.form-upload input[type="file"] { display: none; }
.form-upload-icon { font-size: 1.6rem; margin-bottom: 8px; }
.form-upload p   { font-size: 0.8rem; color: var(--text-muted); }
.form-upload strong { color: var(--violet-light); font-weight: 500; }

/* Char counter */
.form-counter {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-align: right;
  margin-top: -4px;
}

/* ── OUTPUT AREA ─────────────────────────────────────────────── */
.tool-output {
  background: var(--black);
  border: 1px solid var(--black-border);
  border-radius: var(--radius-md);
  padding: 18px;
  min-height: 140px;
  font-size: 0.875rem;
  color: var(--text-body);
  line-height: 1.75;
  position: relative;
}
.tool-output.is-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.82rem;
  text-align: center;
}
.tool-output.is-empty .empty-icon { font-size: 1.6rem; opacity: 0.4; }
.tool-output.is-loading::after {
  content: '';
  display: block;
  width: 20px; height: 20px;
  border: 2px solid var(--black-border2);
  border-top-color: var(--violet-mid);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin: 20px auto 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

.output-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}

/* ── CHAT INTERFACE ─────────────────────────────────────────── */
.chat-window {
  display: flex;
  flex-direction: column;
  height: 520px;
  background: var(--black-card);
  border: 1px solid var(--black-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  scrollbar-width: thin;
  scrollbar-color: var(--black-border2) transparent;
}
.chat-messages::-webkit-scrollbar { width: 4px; }
.chat-messages::-webkit-scrollbar-thumb { background: var(--black-border2); border-radius: 4px; }

.chat-msg {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  max-width: 92%;
}
.chat-msg.user { flex-direction: row-reverse; align-self: flex-end; }
.chat-msg.user .chat-bubble { background: var(--violet-main); color: #fff; border-radius: 16px 4px 16px 16px; }
.chat-msg.ai  .chat-bubble  { background: var(--black-card2); border: 1px solid var(--black-border); color: var(--text-body); border-radius: 4px 16px 16px 16px; }

.chat-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--violet-glow);
  border: 1px solid var(--black-border2);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem;
  flex-shrink: 0;
  margin-top: 2px;
}
.chat-bubble { padding: 10px 14px; font-size: 0.85rem; line-height: 1.65; }
.chat-bubble p { font-size: 0.85rem; color: inherit; }

.chat-input-row {
  padding: 12px 14px;
  border-top: 1px solid var(--black-border);
  display: flex;
  gap: 9px;
  align-items: flex-end;
  background: var(--black-soft);
}
.chat-input {
  flex: 1;
  background: var(--black);
  border: 1px solid var(--black-border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.875rem;
  padding: 10px 13px;
  resize: none;
  min-height: 40px;
  max-height: 120px;
  outline: none;
  transition: border-color var(--transition);
  line-height: 1.5;
}
.chat-input:focus { border-color: var(--violet-mid); }
.chat-input::placeholder { color: var(--text-muted); }

.chat-send {
  width: 38px; height: 38px;
  border-radius: var(--radius-sm);
  background: var(--violet-main);
  border: none;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--transition);
  flex-shrink: 0;
}
.chat-send:hover { background: var(--violet-mid); }
.chat-send svg { color: #fff; }

/* ── SIDEBAR ─────────────────────────────────────────────────── */
.tool-sidebar { display: flex; flex-direction: column; gap: 14px; }

.sidebar-card {
  background: var(--black-card);
  border: 1px solid var(--black-border);
  border-radius: var(--radius-lg);
  padding: 18px;
}
.sidebar-card h4 {
  font-size: 0.82rem;
  color: var(--text-primary);
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--black-border);
  display: flex;
  align-items: center;
  gap: 7px;
}
.sidebar-card h4 .sc-icon {
  font-size: 0.9rem;
  opacity: 0.7;
}

/* Instructions list */
.instruction-list { display: flex; flex-direction: column; gap: 10px; }
.instruction-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.instruction-num {
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--violet-glow);
  border: 1px solid rgba(109,40,217,0.22);
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--violet-light);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}
.instruction-item p { font-size: 0.8rem; color: var(--text-muted); line-height: 1.6; }

/* Related tools list */
.related-list { display: flex; flex-direction: column; gap: 4px; }
.related-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  color: var(--text-body);
  transition: all var(--transition);
  border: 1px solid transparent;
}
.related-item:hover {
  background: var(--violet-glow2);
  border-color: var(--black-border);
  color: var(--violet-pale);
}
.related-item .ri-icon { font-size: 0.85rem; flex-shrink: 0; opacity: 0.7; }

/* Disclaimer card */
.disclaimer-card {
  background: rgba(109,40,217,0.05);
  border: 1px solid rgba(109,40,217,0.14);
  border-radius: var(--radius-md);
  padding: 14px;
}
.disclaimer-card p { font-size: 0.76rem; color: var(--text-muted); line-height: 1.6; }
.disclaimer-card strong { color: var(--violet-light); }

/* Ad placeholder */
.ad-slot {
  background: var(--black-card);
  border: 1px dashed var(--black-border2);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.ad-slot--banner { height: 90px; width: 100%; }
.ad-slot--rect   { height: 250px; width: 100%; max-width: 300px; }
.ad-slot--leader { height: 90px; width: 100%; }

/* ── BUTTON VARIANTS FOR TOOLS ──────────────────────────────── */
.btn-sm {
  padding: 8px 16px;
  font-size: 0.8rem;
}
.btn-icon {
  width: 34px; height: 34px;
  padding: 0;
  justify-content: center;
  border: 1px solid var(--black-border);
  background: var(--black-card);
  color: var(--text-muted);
  border-radius: var(--radius-sm);
}
.btn-icon:hover { border-color: var(--violet-mid); color: var(--violet-light); background: var(--violet-glow2); }
.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border-color: transparent;
  font-size: 0.82rem;
  padding: 8px 12px;
}
.btn-ghost:hover { color: var(--violet-light); background: var(--violet-glow2); }

/* ── STATUS / ALERT STRIPS ──────────────────────────────────── */
.tool-alert {
  padding: 11px 15px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  display: flex;
  gap: 9px;
  align-items: flex-start;
  line-height: 1.55;
}
.tool-alert svg { flex-shrink: 0; margin-top: 1px; }
.tool-alert--info    { background: rgba(109,40,217,0.07); border: 1px solid rgba(109,40,217,0.18); color: var(--text-body); }
.tool-alert--warning { background: rgba(217,119,6,0.07);  border: 1px solid rgba(217,119,6,0.22); color: #d97706; }
.tool-alert--success { background: rgba(16,185,129,0.07); border: 1px solid rgba(16,185,129,0.2); color: #10b981; }

/* ── TOOL PAGE RESPONSIVE ───────────────────────────────────── */
@media (max-width: 960px) {
  .tool-layout,
  .tool-layout.tool-layout--chat {
    grid-template-columns: 1fr;
  }
  .tool-sidebar { order: -1; }
  .chat-window { height: 420px; }
}
@media (max-width: 600px) {
  .tool-hero h1 { font-size: 1.5rem; }
  .tool-card-body { padding: 16px; }
  .chat-window { height: 360px; }
}

/* ============================================================
   LIBRARY PAGES — tool table, filters, search
   Appended to style.css — inherits all CSS variables
   ============================================================ */

/* ── LIBRARY HERO ───────────────────────────────────────────── */
.library-hero {
  padding: 40px 0 36px;
  border-bottom: 1px solid var(--black-border);
  position: relative;
  overflow: hidden;
}
.library-hero::before {
  content: '';
  position: absolute;
  top: -80px; right: 0;
  width: 400px; height: 300px;
  background: radial-gradient(ellipse at right, rgba(109,40,217,0.08) 0%, transparent 68%);
  pointer-events: none;
}
.library-hero-inner {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.library-hero h1 {
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  color: var(--text-primary);
  margin-bottom: 6px;
}
.library-hero p {
  font-size: 0.9rem;
  color: var(--text-body);
  max-width: 520px;
}
.library-hero-stats {
  display: flex;
  gap: 0;
  border: 1px solid var(--black-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  flex-shrink: 0;
}
.lib-stat {
  padding: 12px 20px;
  background: var(--black-card);
  border-right: 1px solid var(--black-border);
  text-align: center;
}
.lib-stat:last-child { border-right: none; }
.lib-stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--violet-light);
  line-height: 1;
  margin-bottom: 3px;
}
.lib-stat span { font-size: 0.7rem; color: var(--text-muted); white-space: nowrap; }

/* ── CONTROLS BAR ───────────────────────────────────────────── */
.lib-controls {
  display: grid;
  grid-template-columns: 1fr auto auto auto auto;
  gap: 10px;
  align-items: center;
  padding: 20px 0 0;
}
.lib-search-wrap {
  position: relative;
}
.lib-search-wrap svg {
  position: absolute;
  left: 12px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
  flex-shrink: 0;
}
.lib-search {
  width: 100%;
  background: var(--black-card);
  border: 1px solid var(--black-border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.875rem;
  padding: 9px 14px 9px 38px;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.lib-search:focus {
  border-color: var(--violet-mid);
  box-shadow: 0 0 0 3px rgba(109,40,217,0.10);
}
.lib-search::placeholder { color: var(--text-muted); }

.lib-filter-select {
  background: var(--black-card);
  border: 1px solid var(--black-border);
  border-radius: var(--radius-sm);
  color: var(--text-body);
  font-family: var(--font-body);
  font-size: 0.82rem;
  padding: 9px 32px 9px 12px;
  outline: none;
  cursor: pointer;
  transition: border-color var(--transition);
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='11' viewBox='0 0 24 24' fill='none' stroke='%235e5878' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  white-space: nowrap;
  max-width: 200px;
}
.lib-filter-select:focus { border-color: var(--violet-mid); }
.lib-filter-select option { background: var(--black-card); color: var(--text-primary); }

.lib-clear-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: transparent;
  border: 1px solid var(--black-border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.78rem;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}
.lib-clear-btn:hover {
  border-color: var(--violet-mid);
  color: var(--violet-light);
  background: var(--violet-glow2);
}
.lib-clear-btn.hidden { opacity: 0; pointer-events: none; }

/* ── RESULTS COUNT & PER PAGE ───────────────────────────────── */
.lib-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0 0;
  flex-wrap: wrap;
}
.lib-count {
  font-size: 0.78rem;
  color: var(--text-muted);
}
.lib-count strong { color: var(--violet-light); }
.lib-per-page {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--text-muted);
}
.lib-per-page select {
  background: var(--black-card);
  border: 1px solid var(--black-border);
  border-radius: var(--radius-sm);
  color: var(--text-body);
  font-family: var(--font-body);
  font-size: 0.78rem;
  padding: 4px 24px 4px 8px;
  outline: none;
  cursor: pointer;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%235e5878' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 7px center;
  transition: border-color var(--transition);
}
.lib-per-page select:focus { border-color: var(--violet-mid); }
.lib-per-page select option { background: var(--black-card); }

/* ── TABLE WRAPPER ──────────────────────────────────────────── */
/* overflow must NOT be hidden — kills position:sticky on thead.
   Border drawn via border property; corners clipped via border-radius
   only on first/last th and td elements instead. */
.lib-table-wrap {
  margin-top: 14px;
  border: 1px solid var(--black-border);
  border-radius: var(--radius-lg);
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  isolation: isolate;
}

/* ── TABLE ──────────────────────────────────────────────────── */
.lib-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
  font-size: 0.85rem;
}

/* Corner rounding on cells (compensates for no overflow:hidden) */
.lib-table thead tr th:first-child { border-top-left-radius: calc(var(--radius-lg) - 1px); }
.lib-table thead tr th:last-child  { border-top-right-radius: calc(var(--radius-lg) - 1px); }
.lib-table tbody tr:last-child td:first-child { border-bottom-left-radius: calc(var(--radius-lg) - 1px); }
.lib-table tbody tr:last-child td:last-child  { border-bottom-right-radius: calc(var(--radius-lg) - 1px); }

/* Fixed header — does not move on scroll */
.lib-table thead {
  position: static;
  background: var(--black-card2);
}
.lib-table thead tr {
  border-bottom: 2px solid var(--black-border2);
}
.lib-table th {
  padding: 13px 16px;
  text-align: left;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  transition: color var(--transition);
  border-right: 1px solid var(--black-border);
}
.lib-table th:last-child { border-right: none; }
.lib-table th:hover { color: var(--violet-light); }
.lib-table th.sorted-asc  { color: var(--violet-light); }
.lib-table th.sorted-desc { color: var(--violet-light); }
.lib-table th .sort-icon {
  display: inline-block;
  margin-left: 5px;
  opacity: 0.35;
  font-size: 0.65rem;
  transition: opacity var(--transition);
}
.lib-table th:hover .sort-icon,
.lib-table th.sorted-asc .sort-icon,
.lib-table th.sorted-desc .sort-icon { opacity: 1; }

/* Rows */
.lib-table tbody tr {
  border-bottom: 1px solid var(--black-border);
  transition: background var(--transition);
}
.lib-table tbody tr:last-child { border-bottom: none; }
.lib-table tbody tr:hover { background: var(--violet-glow2); }
.lib-table tbody tr.coming-soon { opacity: 0.45; }
.lib-table tbody tr.coming-soon td { cursor: default; }

.lib-table td {
  padding: 12px 16px;
  vertical-align: top;
  color: var(--text-body);
  border-right: 1px solid var(--black-border);
  line-height: 1.5;
}
.lib-table td:last-child { border-right: none; }

/* Column widths to match new order: sno | name | desc | cat | type | tags */
.lib-table td.td-sno,
.lib-table th.th-sno {
  width: 48px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.78rem;
}

/* Tool name cell */
.td-name a {
  color: var(--violet-pale);
  font-weight: 500;
  text-decoration: none;
  transition: color var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.td-name a:hover { color: var(--text-white); text-decoration: underline; text-underline-offset: 3px; }
.td-name .cs-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 2px 7px;
  border: 1px solid var(--black-border2);
  border-radius: 100px;
  white-space: nowrap;
  vertical-align: middle;
}

/* Category / Type pills */
.td-cat span,
.td-type span {
  display: inline-block;
  font-size: 0.72rem;
  padding: 3px 9px;
  border-radius: 100px;
  font-weight: 500;
  white-space: nowrap;
}
.td-cat span {
  background: rgba(109,40,217,0.09);
  border: 1px solid rgba(109,40,217,0.2);
  color: var(--violet-light);
}
.td-type span {
  background: rgba(139,92,246,0.07);
  border: 1px solid rgba(139,92,246,0.15);
  color: var(--text-secondary);
}

/* Description */
.td-desc { width: 30%; font-size: 0.82rem; color: var(--text-muted); }
.td-cat  { width: 150px; }
.td-type { width: 110px; }

/* Tags */
.td-tags { max-width: 200px; }
.tag-list { display: flex; flex-wrap: wrap; gap: 4px; }
.tag-pill {
  font-size: 0.64rem;
  padding: 2px 7px;
  border-radius: 100px;
  background: var(--black-card2);
  border: 1px solid var(--black-border2);
  color: var(--text-muted);
  white-space: nowrap;
}
.tag-pill.highlight {
  background: rgba(109,40,217,0.12);
  border-color: rgba(109,40,217,0.3);
  color: var(--violet-light);
}

/* Search highlight */
mark.hl {
  background: rgba(109,40,217,0.22);
  color: var(--violet-pale);
  border-radius: 2px;
  padding: 0 2px;
}

/* ── NO RESULTS ─────────────────────────────────────────────── */
.lib-empty {
  padding: 60px 24px;
  text-align: center;
  display: none;
}
.lib-empty.visible { display: block; }
.lib-empty-icon { font-size: 2rem; margin-bottom: 12px; opacity: 0.4; }
.lib-empty h4 { color: var(--text-primary); margin-bottom: 8px; font-size: 1rem; }
.lib-empty p  { font-size: 0.86rem; color: var(--text-muted); max-width: 360px; margin: 0 auto 18px; }

/* ── PAGINATION ─────────────────────────────────────────────── */
.lib-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 16px 0 40px;
  flex-wrap: wrap;
}
.lib-page-info { font-size: 0.78rem; color: var(--text-muted); }
.lib-page-btns { display: flex; gap: 4px; }
.page-btn {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--black-border);
  border-radius: var(--radius-sm);
  background: var(--black-card);
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all var(--transition);
}
.page-btn:hover:not(:disabled) {
  border-color: var(--violet-mid);
  color: var(--violet-light);
  background: var(--violet-glow2);
}
.page-btn.active {
  background: var(--violet-main);
  border-color: var(--violet-main);
  color: #fff;
}
.page-btn:disabled { opacity: 0.3; cursor: not-allowed; }
.page-btn.page-gap { border: none; background: transparent; cursor: default; color: var(--text-muted); }

/* ── KEYBOARD HINT ──────────────────────────────────────────── */
.kbd-hint {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.7rem;
  color: var(--text-muted);
}
.kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1px 5px;
  border: 1px solid var(--black-border2);
  border-radius: 3px;
  background: var(--black-card);
  font-size: 0.68rem;
  color: var(--text-muted);
  font-family: monospace;
}

/* ── RESPONSIVE ─────────────────────────────────────────────── */
@media (max-width: 1000px) {
  .lib-controls { grid-template-columns: 1fr 1fr 1fr; }
  .lib-search-wrap { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
  .lib-controls { grid-template-columns: 1fr 1fr; }
  .lib-search-wrap { grid-column: 1 / -1; }
  .library-hero-inner { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 600px) {
  .lib-controls { grid-template-columns: 1fr; }
  .lib-filter-select { max-width: 100%; }
  .lib-table th, .lib-table td { padding: 10px 12px; }
  .lib-pagination { flex-direction: column; align-items: flex-start; }
  .library-hero-stats { width: 100%; }
  .lib-stat { flex: 1; }
}

/* ============================================================
   HEADER RIGHT + LANGUAGE SELECT + GT BANNER
   ============================================================ */

.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

/* ── Language select ─────────────────────────────────────────── */
.aml-lang-select {
  appearance: none;
  -webkit-appearance: none;
  background-color: #ddd6fe;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%233b0764' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 9px center;
  border: 1.5px solid #a78bfa;
  border-radius: var(--radius-sm);
  color: #1e0a3c;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 7px 28px 7px 12px;
  min-width: 108px;
  cursor: pointer;
  transition: background-color var(--transition), border-color var(--transition);
  line-height: 1;
}
.aml-lang-select:hover {
  background-color: #ede9fe;
  border-color: var(--violet-main);
}
.aml-lang-select:focus {
  outline: none;
  border-color: var(--violet-main);
  box-shadow: 0 0 0 3px rgba(109,40,217,0.18);
}
.aml-lang-select option,
.aml-lang-select optgroup {
  background: #13101f;
  color: #ddd6fe;
  font-size: 0.85rem;
  font-weight: 400;
}
.aml-lang-select optgroup {
  color: #a78bfa;
  font-weight: 600;
}

/* ── Hide GT banner iframe entirely ─────────────────────────── */
/* GT injects iframe.skiptranslate — we suppress it completely.
   Users cancel translation via the Translate select (choosing blank). */
iframe.skiptranslate,
.goog-te-banner-frame {
  display: none !important;
  height: 0 !important;
  visibility: hidden !important;
}

/* Suppress GT body offset */
body { top: 0 !important; }

/* Hide GT's dummy widget */
#gt_dummy { display: none !important; }

/* Mobile */
@media (max-width: 700px) {
  .aml-lang-select { min-width: 88px; font-size: 0.72rem; padding: 6px 22px 6px 8px; }
}







/* ============================================================
   LIGHT MODE THEME
   ============================================================ */

/* Logo swap */
[data-theme="light"] .logo-dark  { display: none !important; }
[data-theme="light"] .logo-light { display: inline-block !important; }


/* Variable overrides */
[data-theme="light"] {
  --black:        #f0f4ff;
  --black-soft:   #e8eeff;
  --black-card:   #ffffff;
  --black-card2:  #f0f4ff;
  --black-border: #c8d4f0;
  --black-border2:#b0c0e8;

  --violet-main:  #1a56db;
  --violet-mid:   #2563eb;
  --violet-light: #1d4ed8;
  --violet-pale:  #1e3a8a;
  --violet-glow:  rgba(37,99,235,0.10);
  --violet-glow2: rgba(37,99,235,0.05);

  --text-primary:   #0f172a;
  --text-secondary: #1e3a8a;
  --text-body:      #334155;
  --text-muted:     #64748b;
  --text-white:     #0f172a;
}

/* Header bg (hardcoded rgba in existing rule — must override separately) */
[data-theme="light"] #site-header {
  background: rgba(240,244,255,0.96);
}

/* Button outline fix for light mode */
[data-theme="light"] .btn-outline {
  background: rgba(37,99,235,0.08);
  color: #1d4ed8;
  border-color: rgba(37,99,235,0.35);
}
[data-theme="light"] .btn-outline:hover {
  background: rgba(37,99,235,0.15);
  border-color: #2563eb;
}


