/* ==========================================================================
   FRYNZY PLATFORM — LEGAL & HELP PORTAL STYLESHEET (CLEAN WHITE THEME)
   ========================================================================== */

:root {
  --bg-page: #ffffff;
  --bg-surface: #ffffff;
  --bg-surface-subtle: #f8fafc;
  --bg-surface-elevated: #f1f5f9;
  
  --text-main: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  --text-dim: #94a3b8;
  
  --accent-primary: #7c3aed;
  --accent-primary-hover: #6d28d9;
  --accent-subtle: #f5f3ff;
  --accent-border: #ddd6fe;
  
  --border-light: #e2e8f0;
  --border-strong: #cbd5e1;
  
  --success: #10b981;
  --success-subtle: #ecfdf5;
  
  --info: #2563eb;
  --info-subtle: #eff6ff;
  
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px -2px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 12px 24px -4px rgba(0, 0, 0, 0.08);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
}

/* ── Top Header ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
  padding: 14px 0;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.brand-group {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-main);
}
.brand-logo-img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: cover;
}
.brand-text {
  font-size: 1.25rem;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}
@media (max-width: 768px) {
  .header-nav { display: none; }
}
.nav-link {
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: color 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.nav-link:hover, .nav-link.active {
  color: var(--accent-primary);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.btn-header-primary {
  padding: 8px 18px;
  background: var(--accent-primary);
  color: #ffffff;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.15s ease, transform 0.1s ease;
}
.btn-header-primary:hover {
  background: var(--accent-primary-hover);
  transform: translateY(-1px);
}

/* ── Hero Banner ── */
.doc-hero {
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
  border-bottom: 1px solid var(--border-light);
  padding: 48px 0 36px;
}
.doc-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background: var(--accent-subtle);
  border: 1px solid var(--accent-border);
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent-primary);
  margin-bottom: 14px;
}
.doc-hero-title {
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  color: var(--text-main);
  margin-bottom: 10px;
}
.doc-hero-subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 750px;
  line-height: 1.55;
}
.doc-meta-row {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 18px;
  font-size: 0.85rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}
.doc-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ── Main Layout: Sidebar + Content ── */
.doc-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 48px;
  padding: 40px 0 80px;
}
@media (max-width: 900px) {
  .doc-layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

/* Sidebar Navigation */
.doc-sidebar {
  position: sticky;
  top: 90px;
  height: fit-content;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
}
@media (max-width: 900px) {
  .doc-sidebar {
    position: static;
    max-height: none;
  }
}

.toc-card {
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 20px;
}
.toc-title {
  font-size: 0.85rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.toc-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.toc-link {
  display: block;
  padding: 6px 10px;
  font-size: 0.88rem;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.15s ease;
  line-height: 1.4;
}
.toc-link:hover, .toc-link.active {
  background: #ffffff;
  color: var(--accent-primary);
  font-weight: 700;
  box-shadow: var(--shadow-sm);
}

.sidebar-actions {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.btn-sidebar-opt {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 14px;
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}
.btn-sidebar-opt:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  box-shadow: var(--shadow-sm);
}

/* Document Article Content */
.doc-article {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-sm);
}
@media (max-width: 600px) {
  .doc-article { padding: 24px 18px; }
}

.doc-section {
  margin-bottom: 40px;
  scroll-margin-top: 100px;
}
.doc-section:last-child {
  margin-bottom: 0;
}

.doc-section h2 {
  font-size: 1.35rem;
  font-weight: 900;
  color: var(--text-main);
  letter-spacing: -0.02em;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  gap: 10px;
}
.doc-section h3 {
  font-size: 1.08rem;
  font-weight: 800;
  color: var(--text-main);
  margin: 22px 0 10px;
}
.doc-section p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 14px;
  line-height: 1.7;
}
.doc-section ul, .doc-section ol {
  padding-left: 24px;
  margin-bottom: 16px;
}
.doc-section li {
  font-size: 0.93rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
  line-height: 1.6;
}

/* Callout Boxes */
.callout-box {
  padding: 16px 20px;
  border-radius: var(--radius-md);
  margin: 20px 0;
  font-size: 0.92rem;
  line-height: 1.65;
}
.callout-box.info {
  background: var(--info-subtle);
  border-left: 4px solid var(--info);
  color: #1e3a8a;
}
.callout-box.security {
  background: var(--accent-subtle);
  border-left: 4px solid var(--accent-primary);
  color: #4c1d95;
}
.callout-box.success {
  background: var(--success-subtle);
  border-left: 4px solid var(--success);
  color: #065f46;
}

/* ── FAQ Search & Accordions ── */
.faq-search-wrapper {
  margin-top: 24px;
  position: relative;
  max-width: 650px;
}
.faq-search-wrapper i {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.1rem;
  color: var(--text-muted);
}
.faq-search-input {
  width: 100%;
  padding: 16px 20px 16px 52px;
  background: #ffffff;
  border: 2px solid var(--border-light);
  border-radius: var(--radius-lg);
  font-family: inherit;
  font-size: 1rem;
  color: var(--text-main);
  outline: none;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}
.faq-search-input:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.12);
}

.faq-categories-strip {
  display: flex;
  gap: 10px;
  margin: 32px 0 24px;
  flex-wrap: wrap;
}
.faq-cat-btn {
  padding: 10px 18px;
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-light);
  border-radius: 20px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}
.faq-cat-btn:hover {
  background: #ffffff;
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}
.faq-cat-btn.active {
  background: var(--accent-primary);
  color: #ffffff;
  border-color: var(--accent-primary);
}

.faq-accordion-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.faq-card {
  background: #ffffff;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all 0.2s ease;
}
.faq-card:hover {
  border-color: var(--border-strong);
}
.faq-card.open {
  border-color: var(--accent-border);
  box-shadow: var(--shadow-sm);
}

.faq-header-btn {
  width: 100%;
  padding: 18px 22px;
  background: transparent;
  border: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  font-family: inherit;
  font-size: 0.98rem;
  font-weight: 800;
  color: var(--text-main);
  cursor: pointer;
  text-align: left;
}
.faq-header-btn i {
  color: var(--accent-primary);
  transition: transform 0.2s ease;
}
.faq-card.open .faq-header-btn i {
  transform: rotate(180deg);
}

.faq-content-body {
  display: none;
  padding: 0 22px 20px;
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.7;
}
.faq-card.open .faq-content-body {
  display: block;
}

/* Feature Guides Grid */
.feature-guides-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin: 36px 0;
}
.guide-card {
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 24px;
}
.guide-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--accent-subtle);
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  margin-bottom: 16px;
}
.guide-card h3 {
  font-size: 1.05rem;
  font-weight: 800;
  margin-bottom: 8px;
}
.guide-card p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* Shortcuts Cheat Sheet */
.shortcuts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-top: 20px;
}
.shortcut-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: 8px;
}
.kbd-tag {
  display: inline-block;
  padding: 3px 8px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--text-main);
  box-shadow: 0 1px 1px rgba(0,0,0,0.1);
}

/* ── Footer ── */
.site-footer {
  margin-top: auto;
  background: #ffffff;
  border-top: 1px solid var(--border-light);
  padding: 48px 0 24px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 36px;
}
@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
}
.footer-col h4 {
  font-size: 0.92rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-main);
  margin-bottom: 14px;
}
.footer-links-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.footer-links-list a {
  text-decoration: none;
  font-size: 0.88rem;
  color: var(--text-muted);
  transition: color 0.15s ease;
}
.footer-links-list a:hover {
  color: var(--accent-primary);
}
.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--text-dim);
  flex-wrap: wrap;
  gap: 12px;
}
