/* ============================================================
   VTU FAQ — page-specific styles
   Fonts: Space Grotesk (display) + IBM Plex Sans (body) + IBM Plex Mono (data)
   Layered on top of ../styles.css (shared site chrome: header, footer, hero, sidebar)
   ============================================================ */

:root{
  --faq-bg: #F8FAFC;
  --faq-surface: #FFFFFF;
  --faq-surface-2: #F8FAFC;
  --faq-border: #E2E8F0;
  --faq-text: #0F172A;
  --faq-text-muted: #475569;
  --faq-text-faint: #94A3B8;
  --faq-accent: #38BDF8;
  --faq-accent-hover: #0EA5E9;
  --faq-accent-soft: rgba(56, 189, 248, 0.08);
  --faq-accent-2: #00C6FF;
  --faq-success: #10B981;
  --faq-success-soft: rgba(16, 185, 129, 0.1);
  --faq-shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 4px 12px rgba(15, 23, 42, 0.08);
  --faq-shadow-lg: 0 8px 24px rgba(15, 23, 42, 0.12);
  --faq-radius: 12px;
  --faq-radius-sm: 8px;
  --faq-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --faq-display: 'Space Grotesk', sans-serif;
  --faq-body: 'IBM Plex Sans', sans-serif;
  color-scheme: light;
}

[data-theme="dark"]{
  --faq-bg: #0F172A;
  --faq-surface: #1a1f35;
  --faq-surface-2: #0D1B2E;
  --faq-border: #1e293b;
  --faq-text: #F8FAFC;
  --faq-text-muted: #cbd5e1;
  --faq-text-faint: #94A3B8;
  --faq-accent: #38BDF8;
  --faq-accent-hover: #0EA5E9;
  --faq-accent-soft: rgba(56, 189, 248, 0.12);
  --faq-accent-2: #00C6FF;
  --faq-success: #10B981;
  --faq-success-soft: rgba(16, 185, 129, 0.15);
  --faq-shadow: 0 1px 3px rgba(0, 0, 0, 0.3), 0 4px 12px rgba(0, 0, 0, 0.2);
  --faq-shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.4);
  color-scheme: dark;
}

body{ background: var(--faq-bg); transition: background .25s ease; }

/* ---------- Hero ---------- */
.faq-hero{
  background: var(--faq-bg);
  position: relative;
  overflow: hidden;
}
.faq-hero::before{
  content:"";
  position:absolute; inset: -40% -10% auto -10%;
  height: 420px;
  background: radial-gradient(60% 60% at 30% 20%, var(--faq-accent-soft) 0%, transparent 70%),
              radial-gradient(50% 50% at 80% 10%, rgba(199,98,45,0.10) 0%, transparent 70%);
  pointer-events:none;
  z-index:0;
}
.faq-hero .hero-inner{ position:relative; z-index:1; max-width: 900px; margin: 0 auto; padding: 0 2rem; }
.faq-hero h1{
  font-family: var(--faq-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--faq-text);
}
.faq-hero-sub{
  font-family: var(--faq-body);
  color: var(--faq-text-muted);
  font-size: 1.05rem;
  line-height: 1.6;
  max-width: 56ch;
  margin: 0.4rem 0 1.6rem;
}

/* ---------- Search ---------- */
.faq-search-wrap{
  position: relative;
  max-width: 560px;
  margin-bottom: 0.5rem;
}
.faq-search-input{
  width: 100%;
  box-sizing: border-box;
  font-family: var(--faq-body);
  font-size: 1rem;
  padding: 0.95rem 2.75rem 0.95rem 2.85rem;
  border-radius: 999px;
  border: 1.5px solid var(--faq-border);
  background: var(--faq-surface);
  color: var(--faq-text);
  box-shadow: var(--faq-shadow);
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.faq-search-input:focus{
  border-color: var(--faq-accent);
  box-shadow: 0 0 0 4px var(--faq-accent-soft);
}
.faq-search-input::placeholder{ color: var(--faq-text-faint); }
.faq-search-icon{
  position:absolute; left: 1.05rem; top: 50%; transform: translateY(-50%);
  width: 18px; height: 18px;
  pointer-events:none;
}
.faq-search-icon::before{
  content:"";
  position:absolute; left:0; top:0; width:12px; height:12px;
  border: 2px solid var(--faq-text-faint);
  border-radius:50%;
}
.faq-search-icon::after{
  content:"";
  position:absolute; left:10px; top:10px; width:7px; height:2px;
  background: var(--faq-text-faint);
  transform: rotate(45deg);
  border-radius: 2px;
}
.faq-search-clear{
  position:absolute; right: 0.6rem; top: 50%; transform: translateY(-50%);
  width: 30px; height: 30px;
  border-radius: 50%;
  border: none;
  background: var(--faq-surface-2);
  color: var(--faq-text-muted);
  font-size: 1.1rem;
  cursor: pointer;
  line-height: 1;
}
.faq-search-clear:hover{ background: var(--faq-border); }
.faq-search-status{
  font-family: var(--faq-mono);
  font-size: 0.78rem;
  color: var(--faq-text-faint);
  min-height: 1.2em;
  margin: 0.3rem 0 1.4rem;
}
mark.faq-highlight{
  background: color-mix(in srgb, var(--faq-accent) 25%, transparent);
  color: inherit;
  border-radius: 3px;
  padding: 0 1px;
}

.hero-meta{ color: var(--faq-text-faint); }

/* ---------- Popular strip ---------- */
.popular-strip-wrap{
  border-top: 1px solid var(--faq-border);
  border-bottom: 1px solid var(--faq-border);
  background: var(--faq-surface);
  padding: 1.5rem 0;
}
.popular-strip-inner{
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 2rem;
}
.popular-heading{
  font-family: var(--faq-mono);
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--faq-text-faint);
  margin: 0 0 0.7rem;
}
.popular-strip{
  display: flex;
  gap: 0.6rem;
  overflow-x: auto;
  padding-bottom: 0.3rem;
  scrollbar-width: thin;
}
.popular-chip{
  flex: 0 0 auto;
  white-space: nowrap;
  font-family: var(--faq-body);
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--faq-text);
  background: var(--faq-surface-2);
  border: 1px solid var(--faq-border);
  border-radius: 999px;
  padding: 0.5rem 1rem;
  text-decoration: none;
  transition: background .15s ease, border-color .15s ease, transform .1s ease;
  max-width: 340px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.popular-chip:hover{
  background: var(--faq-accent-soft);
  border-color: var(--faq-accent);
  color: var(--faq-accent);
}

/* ---------- Category filter bar ---------- */
.cat-filter-wrap{
  position: sticky;
  top: 64px;
  z-index: 30;
  background: var(--faq-bg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--faq-border);
  box-shadow: var(--faq-shadow);
  transition: box-shadow 0.3s ease;
}
.cat-filter-wrap.scrolled{
  box-shadow: var(--faq-shadow-lg);
}
.cat-filter-inner{
  max-width: 1300px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  scrollbar-width: thin;
}
.cat-chip{
  flex: 0 0 auto;
  font-family: var(--faq-body);
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--faq-text-muted);
  background: var(--faq-surface);
  border: 1.5px solid var(--faq-border);
  border-radius: 999px;
  padding: 0.6rem 1.2rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
}
.cat-chip:hover{ 
  border-color: var(--faq-accent);
  color: var(--faq-accent);
  background: var(--faq-accent-soft);
  transform: translateY(-2px);
}
.cat-chip.is-active{
  background: var(--faq-accent);
  border-color: var(--faq-accent);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(56, 189, 248, 0.3);
}
.chip-count{
  font-family: var(--faq-mono);
  font-size: 0.72rem;
  opacity: 0.75;
}

/* ---------- Layout ---------- */
.faq-content-wrap{ background: var(--faq-bg); }
.faq-content-grid{ 
  align-items: start;
  max-width: 1300px;
  margin: 0 auto;
  padding: 2rem;
  gap: 2rem;
}
.faq-main{ 
  background: transparent;
  flex: 1;
  min-width: 0;
}

.faq-count-line{
  font-family: var(--faq-mono);
  font-size: 0.8rem;
  color: var(--faq-text-faint);
  margin: 1.2rem 0 1.6rem;
}

/* ---------- Category sections ---------- */
.faq-category{ margin-bottom: 2.6rem; scroll-margin-top: 5.5rem; }
.faq-category-head h2{
  font-family: var(--faq-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--faq-text);
  margin: 0 0 0.15rem;
  letter-spacing: -0.01em;
}
.faq-category-desc{
  font-family: var(--faq-body);
  color: var(--faq-text-muted);
  font-size: 0.92rem;
  margin: 0 0 1.1rem;
}
.faq-card-list{ display: flex; flex-direction: column; gap: 0.7rem; }

/* ---------- FAQ Card ---------- */
.faq-card{
  background: var(--faq-surface);
  border: 1px solid var(--faq-border);
  border-radius: var(--faq-radius);
  box-shadow: var(--faq-shadow);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  scroll-margin-top: 6rem;
}
.faq-card:hover{
  border-color: var(--faq-accent);
  box-shadow: 0 6px 16px rgba(56, 189, 248, 0.12);
}
.faq-card:target,
.faq-card.is-target{
  border-color: var(--faq-accent);
}
.faq-q{ margin: 0; }
.faq-toggle{
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  padding: 1.05rem 1.3rem;
  font-family: var(--faq-body);
  font-weight: 600;
  font-size: 1rem;
  color: var(--faq-text);
}
.faq-toggle:focus-visible{ outline: 2px solid var(--faq-accent); outline-offset: -2px; border-radius: var(--faq-radius); }
.faq-q-text{ flex: 1; }
.faq-chevron{
  flex: 0 0 auto;
  width: 20px; height: 20px;
  position: relative;
}
.faq-chevron::before, .faq-chevron::after{
  content:"";
  position: absolute;
  background: var(--faq-text-faint);
  border-radius: 2px;
  transition: transform .2s ease;
}
.faq-chevron::before{ left:3px; top:9px; width:14px; height:2px; }
.faq-chevron::after{ left:9px; top:3px; width:2px; height:14px; }
.faq-toggle[aria-expanded="true"] .faq-chevron::after{ transform: scaleY(0); }
.faq-toggle[aria-expanded="true"] .faq-chevron::before{ background: var(--faq-accent); }

.faq-panel{ 
  overflow: hidden;
}
.faq-panel-inner{ padding: 0 1.3rem 1.2rem; }
.faq-answer{
  font-family: var(--faq-body);
  font-size: 0.96rem;
  line-height: 1.65;
  color: var(--faq-text-muted);
  margin: 0 0 0.9rem;
}
.faq-meta-row{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.9rem;
  margin-bottom: 0.9rem;
  padding-top: 0.7rem;
  border-top: 1px dashed var(--faq-border);
}
.faq-meta-item{
  font-family: var(--faq-mono);
  font-size: 0.74rem;
  color: var(--faq-text-faint);
}
.faq-action{
  font-family: var(--faq-body);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--faq-accent);
  background: var(--faq-accent-soft);
  border: none;
  border-radius: 6px;
  padding: 0.5rem 1rem;
  cursor: pointer;
  transition: all 0.25s ease;
}
.faq-action:hover{ 
  background: var(--faq-accent);
  color: #fff;
  transform: translateY(-1px);
}
.faq-action.is-copied{ 
  background: var(--faq-success);
  color: #fff;
}

.faq-copy{
  display: none;
}

.faq-vote{
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1rem;
}
.faq-vote-label{
  font-family: var(--faq-body);
  font-size: 0.82rem;
  color: var(--faq-text-faint);
}
.faq-vote-btn{
  font-family: var(--faq-body);
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid var(--faq-border);
  background: var(--faq-surface);
  color: var(--faq-text-muted);
  border-radius: var(--faq-radius-sm);
  padding: 0.28rem 0.7rem;
  cursor: pointer;
}
.faq-vote-btn:hover{ border-color: var(--faq-accent); color: var(--faq-accent); }
.faq-vote-btn.is-selected{ background: var(--faq-success-soft); border-color: var(--faq-success); color: var(--faq-success); }
.faq-vote-thanks{ font-family: var(--faq-body); font-size: 0.8rem; color: var(--faq-success); }

.related-questions{
  background: var(--faq-surface);
  border: 1.5px solid var(--faq-border);
  border-radius: var(--faq-radius);
  padding: 1.4rem;
  margin-top: 1.5rem;
  box-shadow: var(--faq-shadow);
  transition: all 0.3s ease;
}
.related-questions:hover{
  border-color: var(--faq-accent);
  box-shadow: var(--faq-shadow-lg);
}
.related-label{
  font-family: var(--faq-body);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--faq-accent);
  margin: 0 0 0.8rem;
  display: block;
}
.related-list{ list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:0.6rem; }
.related-list li{
  padding: 0.6rem;
  border-radius: 6px;
  transition: background 0.2s ease;
}
.related-list li:hover{
  background: var(--faq-accent-soft);
}
.related-list a{
  font-family: var(--faq-body);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--faq-accent);
  text-decoration: none;
  display: block;
  transition: color 0.2s ease;
}
.related-list a:hover{ 
  color: var(--faq-accent-hover);
}

/* ---------- Empty state ---------- */
.faq-empty-state{ text-align: center; padding: 3rem 1rem; }
.faq-empty-title{ font-family: var(--faq-display); font-size: 1.3rem; font-weight: 700; color: var(--faq-text); margin: 0 0 0.4rem; }
.faq-empty-sub{ font-family: var(--faq-body); color: var(--faq-text-muted); margin: 0 0 1rem; }
.faq-empty-suggestions{ list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:0.5rem; align-items:center; }
.faq-empty-suggestions a{ color: var(--faq-accent); font-family: var(--faq-body); font-weight: 600; text-decoration:none; }
.faq-empty-suggestions a:hover{ text-decoration: underline; }

.faq-feedback-block{
  margin-top: 2rem;
  padding: 1.5rem;
  border-radius: var(--faq-radius);
  background: var(--faq-surface);
  border: 1.5px solid var(--faq-border);
  text-align: center;
  transition: all 0.3s ease;
}
.faq-feedback-block:hover{
  border-color: var(--faq-accent);
  box-shadow: var(--faq-shadow);
}
.faq-feedback-block h2{ 
  font-family: var(--faq-body);
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0 0 1rem;
  color: var(--faq-text);
}
.faq-feedback-block p{ 
  display: none;
}
.faq-feedback-cta{ position: static; }

/* ---------- Sidebar ---------- */
.faq-toc-list, .faq-recent-list, .faq-tools-list{ list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:0.3rem; }
.faq-toc-list a, .faq-tools-list a{
  display:flex; justify-content:space-between; gap:0.5rem;
  font-family: var(--faq-body); font-size: 0.9rem; font-weight:500;
  color: var(--faq-text-muted); text-decoration:none;
  padding: 0.4rem 0.55rem; border-radius: var(--faq-radius-sm);
}
.faq-toc-list a:hover, .faq-tools-list a:hover{ background: var(--faq-surface-2); color: var(--faq-accent); }
.faq-toc-list a.is-active{ background: var(--faq-accent-soft); color: var(--faq-accent); font-weight:600; }
.toc-count{ font-family: var(--faq-mono); font-size: 0.72rem; color: var(--faq-text-faint); }
.faq-recent-list li a{ font-family: var(--faq-body); font-size: 0.86rem; color: var(--faq-accent); text-decoration:none; display:block; padding: 0.25rem 0; }
.faq-recent-list li a:hover{ text-decoration: underline; }

/* ---------- Floating controls ---------- */
.back-to-top, .theme-toggle{
  position: fixed;
  right: 1.3rem;
  width: 46px; height: 46px;
  border-radius: 50%;
  border: 1px solid var(--faq-border);
  background: var(--faq-surface);
  color: var(--faq-text);
  box-shadow: var(--faq-shadow-lg);
  cursor: pointer;
  font-size: 1.15rem;
  z-index: 40;
  display: flex; align-items:center; justify-content:center;
  transition: transform .15s ease, opacity .2s ease;
}
.back-to-top{ bottom: 1.3rem; }
.theme-toggle{ bottom: 5.3rem; }
.back-to-top:hover, .theme-toggle:hover{ transform: translateY(-2px); }
.back-to-top[hidden]{ display:none; }

/* ---------- Hide sections ---------- */
#recent-widget{ display: none !important; }
.faq-sidebar{ display: none !important; }

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

/* ---------- Responsive ---------- */
@media (max-width: 900px){
  .faq-content-grid{ display:block; }
  .faq-sidebar{ margin-top: 2rem; }
  .cat-filter-wrap{ top: 58px; }
  .cat-filter-inner{ padding: 0.7rem 1rem; }
}

@media (max-width: 600px){
  .faq-hero-sub{ font-size: 0.96rem; }
  .faq-toggle{ padding: 0.9rem 1rem; font-size: 0.94rem; }
  .theme-toggle{ bottom: auto; top: 5.5rem; right: 1rem; }
  .back-to-top{ right: 1rem; bottom: 1rem; }
}

/* ---------- Print ---------- */
@media print{
  .site-header, .site-footer, .popular-strip-wrap, .cat-filter-wrap,
  .back-to-top, .theme-toggle, .faq-search-wrap, .faq-search-status,
  .faq-feedback-block, .faq-sidebar, .faq-action{ display:none !important; }
  .faq-panel{ height:auto !important; display:block !important; }
  .faq-panel[hidden]{ display:block !important; }
  .faq-card{ box-shadow:none; border:1px solid #ccc; break-inside: avoid; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce){
  .faq-panel, .faq-chevron::before, .faq-chevron::after, .cat-chip, .faq-action{ transition: none !important; }
}