@charset "UTF-8";

:root {
  --bg-color: #0d1117;
  --bg-surface: #161b22;
  --bg-card: rgba(255, 255, 255, 0.025);
  --bg-card-hover: rgba(255, 255, 255, 0.05);
  --bg-drawer: #161b22;
  --border-color: rgba(255, 255, 255, 0.1);
  --border-hover: rgba(255, 255, 255, 0.22);
  --text-primary: #f0f6fc;
  --text-secondary: #8b949e;
  --text-muted: #6e7681;
  --header-bg: rgba(13, 17, 23, 0.95);
  --tab-active: #58a6ff;
  --link-color: #58a6ff;
  --link-hover: #79c0ff;
  --icon-bg: rgba(88, 166, 255, 0.1);
  --icon-border: rgba(88, 166, 255, 0.25);
  --drawer-active-bg: rgba(88, 166, 255, 0.15);
  --sidebar-width: 270px;
  --page-padding: 3rem;
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Google Sans", Roboto, Helvetica, Arial, sans-serif;
}

html[data-theme="light"],
body.light-theme {
  --bg-color: #ffffff;
  --bg-surface: #f6f8fa;
  --bg-card: #f8fafc;
  --bg-card-hover: #f1f5f9;
  --bg-drawer: #ffffff;
  --border-color: rgba(0, 0, 0, 0.08);
  --border-hover: rgba(0, 0, 0, 0.18);
  --text-primary: #1f2328;
  --text-secondary: #57606a;
  --text-muted: #8c959f;
  --header-bg: rgba(255, 255, 255, 0.96);
  --tab-active: #0969da;
  --link-color: #0969da;
  --link-hover: #1a7f37;
  --icon-bg: rgba(9, 105, 218, 0.08);
  --icon-border: rgba(9, 105, 218, 0.2);
  --drawer-active-bg: rgba(9, 105, 218, 0.1);
}

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

html {
  scroll-behavior: smooth;
  width: 100%;
}

body {
  background-color: var(--bg-color);
  color: var(--text-primary);
  font-family: var(--font-family);
  min-height: 100vh;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--link-color);
  text-decoration: none;
  transition: color 0.15s ease, opacity 0.15s ease;
}

a:hover {
  color: var(--link-hover);
}

button {
  font-family: inherit;
  border: none;
  background: none;
  cursor: pointer;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */

.policy-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--header-bg);
  border-bottom: 1px solid var(--border-color);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  width: 100%;
}

.policy-header-inner {
  width: 100%;
  padding: 0.75rem var(--page-padding) 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.policy-header-brand {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.85rem;
}

.policy-brand-link {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 600;
  font-size: 1.2rem;
  color: var(--text-primary);
  letter-spacing: -0.015em;
  white-space: nowrap;
}

.policy-brand-logo {
  height: 24px;
  width: auto;
  max-width: 110px;
  object-fit: contain;
  display: block;
}

.policy-brand-link span {
  font-size: 1.08rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.policy-brand-link:hover span {
  color: var(--text-primary);
}

/* Hamburger button for mobile */
.btn-mobile-menu {
  display: none;
  font-size: 1.55rem;
  color: var(--text-primary);
  padding: 0.2rem;
  line-height: 1;
  align-items: center;
  justify-content: center;
}

/* Mobile header title (shown on small screens next to hamburger) */
.mobile-page-title {
  display: none;
  font-size: 1.18rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.015em;
}

/* Nav Tabs left-aligned under the logo on desktop */
.policy-nav-tabs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 0.5rem;
}

.policy-nav-tabs::-webkit-scrollbar {
  display: none;
}

.policy-tab-link {
  padding: 0.4rem 0.75rem;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: 6px;
  transition: all 0.15s ease;
  white-space: nowrap;
  position: relative;
}

.policy-tab-link:hover {
  color: var(--text-primary);
  background-color: var(--bg-card-hover);
}

.policy-tab-link.active {
  color: var(--text-primary);
  font-weight: 600;
}

.policy-tab-link.active::after {
  content: '';
  position: absolute;
  bottom: -0.5rem;
  left: 0.75rem;
  right: 0.75rem;
  height: 2.5px;
  background: var(--tab-active);
  border-radius: 2px;
}

/* ==========================================================================
   Mobile Drawer Sidebar (Matching Reference Images 2 & 4)
   ========================================================================== */

.drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.drawer-overlay.active {
  opacity: 1;
  visibility: visible;
}

.mobile-drawer {
  position: fixed;
  top: 0;
  left: 0;
  width: 290px;
  max-width: 85vw;
  height: 100vh;
  background: var(--bg-drawer);
  border-right: 1px solid var(--border-color);
  z-index: 1999;
  transform: translateX(-100%);
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.mobile-drawer.active {
  transform: translateX(0);
}

.drawer-header {
  padding: 1.25rem 1.25rem 1rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.drawer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--text-primary);
}

.btn-drawer-close {
  font-size: 1.4rem;
  color: var(--text-secondary);
  padding: 0.25rem;
  line-height: 1;
}

.btn-drawer-close:hover {
  color: var(--text-primary);
}

.drawer-nav-list {
  list-style: none;
  padding: 1rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.drawer-nav-link {
  display: flex;
  align-items: center;
  padding: 0.65rem 1rem;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all 0.15s ease;
}

.drawer-nav-link:hover {
  color: var(--text-primary);
  background: var(--bg-card-hover);
}

.drawer-nav-link.active {
  color: var(--tab-active);
  font-weight: 600;
  background: var(--drawer-active-bg);
}

.drawer-subnav-list {
  list-style: none;
  padding-left: 1.25rem;
  margin: 0.25rem 0 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.drawer-subnav-link {
  display: block;
  padding: 0.45rem 0.75rem;
  font-size: 0.88rem;
  color: var(--text-muted);
  border-radius: 6px;
  transition: color 0.15s ease;
}

.drawer-subnav-link:hover {
  color: var(--text-primary);
}

.drawer-subnav-link.active {
  color: var(--text-primary);
  font-weight: 600;
}

/* ==========================================================================
   In-Page Contents Block (Reference Image 1)
   Desktop: Hidden (because left sidebar is visible)
   Mobile/Tablet: Visible right below the hero banner
   ========================================================================== */

.policy-contents-card {
  display: none; /* Hidden on desktop when left sidebar is present */
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.5rem;
  margin: 2rem 0 2.75rem;
}

.policy-contents-heading {
  font-size: 1.45rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1.25rem;
  letter-spacing: -0.015em;
}

.policy-contents-list {
  list-style: none;
  display: flex;
  flex-direction: column;
}

.policy-contents-item {
  border-top: 1px solid var(--border-color);
}

.policy-contents-item:first-child {
  border-top: none;
}

.policy-contents-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.95rem 0.25rem;
  font-size: 1.02rem;
  font-weight: 500;
  color: var(--text-primary);
  transition: color 0.15s ease, padding-left 0.15s ease;
}

.policy-contents-link-left {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.policy-contents-link-left i {
  font-size: 1.15rem;
  color: var(--text-muted);
  transition: transform 0.15s ease, color 0.15s ease;
}

.policy-contents-link:hover {
  color: var(--link-color);
  padding-left: 0.35rem;
}

.policy-contents-link:hover .policy-contents-link-left i {
  color: var(--link-color);
  transform: translateX(3px);
}

/* ==========================================================================
   Overview Page Styles (Matching Reference Image 1)
   ========================================================================== */

.overview-main {
  flex: 1 0 auto;
  width: 100%;
  padding: 3rem var(--page-padding) 5rem;
}

.overview-hero {
  margin-bottom: 3.5rem;
  max-width: 1000px;
}

.overview-hero-title {
  font-size: clamp(2.25rem, 4vw, 3rem);
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.2;
  letter-spacing: -0.025em;
  margin-bottom: 1.25rem;
}

.overview-hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.65;
  max-width: 850px;
}

.overview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 5rem;
  row-gap: 3.75rem;
  max-width: 1200px;
}

.overview-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.85rem;
}

.overview-card-header {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.overview-card-title {
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.015em;
  line-height: 1.3;
}

.overview-card-desc {
  font-size: 0.96rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

.overview-card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.94rem;
  font-weight: 500;
  color: var(--link-color);
  text-decoration: underline;
  text-underline-offset: 4px;
  margin-top: 0.5rem;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.overview-card-link i {
  font-size: 1.05rem;
  transition: transform 0.15s ease;
  text-decoration: none;
}

.overview-card-link:hover {
  color: var(--link-hover);
}

.overview-card-link:hover i {
  transform: translateX(3px);
}

.overview-card-icon-row {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  width: 100%;
}

.overview-card-icon-box {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--icon-bg);
  border: 1px solid var(--icon-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--link-color);
  font-size: 1.4rem;
  flex-shrink: 0;
  margin-top: 0.15rem;
}

/* ==========================================================================
   Documentation Layout (Fixed Sidebar + Fluid Content, No Spacers)
   ========================================================================== */

.policy-page-wrapper {
  flex: 1 0 auto;
  width: 100%;
  padding: 0 var(--page-padding);
}

.policy-container {
  display: flex;
  position: relative;
  min-height: calc(100vh - 100px);
}

/* Left Sidebar: Fixed permanently to viewport on left, never scrolls away at footer */
.policy-sidebar {
  position: fixed;
  top: 96px;
  left: var(--page-padding);
  width: var(--sidebar-width);
  height: calc(100vh - 96px);
  overflow-y: auto;
  padding: 2.25rem 1.25rem 2.5rem 0;
  border-right: 1px solid var(--border-color);
  scrollbar-width: thin;
  scrollbar-color: var(--border-color) transparent;
  z-index: 100;
}

.policy-sidebar::-webkit-scrollbar {
  width: 4px;
}

.policy-sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.policy-sidebar::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}

.policy-sidebar-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 1rem;
  padding-left: 0.65rem;
}

.policy-toc-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.toc-link {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  font-size: 0.88rem;
  color: var(--text-secondary);
  transition: all 0.15s ease;
  line-height: 1.35;
  border-left: 2px solid transparent;
}

.toc-link:hover {
  color: var(--text-primary);
  background: var(--bg-card-hover);
}

.toc-link.active {
  color: var(--text-primary);
  font-weight: 600;
  background: var(--icon-bg);
  border-left: 2.5px solid var(--tab-active);
  border-radius: 0 6px 6px 0;
}

/* Main Content: Left-docked offset from fixed sidebar, generous readable max-width */
.policy-content {
  margin-left: calc(var(--sidebar-width) + 3.5rem);
  flex: 1 1 auto;
  max-width: 980px;
  min-width: 0;
  padding: 2.25rem 0 6rem 0;
}

.policy-banner {
  padding-bottom: 1.75rem;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 2rem;
}

.policy-meta {
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
  letter-spacing: 0.02em;
}

.policy-title {
  font-size: clamp(2rem, 3.2vw, 2.75rem);
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
  letter-spacing: -0.025em;
  margin-bottom: 0.85rem;
}

.policy-lead {
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.policy-section {
  margin-bottom: 4.5rem;
  scroll-margin-top: 110px;
}

.policy-section h2 {
  font-size: 1.45rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1.15rem;
  letter-spacing: -0.015em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.policy-section h3 {
  font-size: 1.18rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 2rem 0 0.75rem;
  letter-spacing: -0.01em;
}

.policy-section h4 {
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 1.5rem 0 0.5rem;
}

.policy-section p {
  font-size: 0.96rem;
  line-height: 1.78;
  color: var(--text-secondary);
  margin-bottom: 1.1rem;
}

.policy-bullet-list {
  padding-left: 1.25rem;
  margin: 1rem 0 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.policy-bullet-list li {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text-secondary);
}

.policy-bullet-list li strong {
  color: var(--text-primary);
  font-weight: 600;
}

.policy-numbered-list {
  padding-left: 1.25rem;
  margin: 1rem 0 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.policy-numbered-list li {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text-secondary);
}

.policy-numbered-list li strong {
  color: var(--text-primary);
  font-weight: 600;
}

.policy-highlight-box {
  background: var(--icon-bg);
  border: 1px solid var(--icon-border);
  border-radius: 10px;
  padding: 1.35rem 1.6rem;
  margin: 1.75rem 0;
}

.policy-highlight-box h3 {
  margin: 0 0 0.45rem;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
}

.policy-highlight-box p {
  margin: 0;
  font-size: 0.94rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.policy-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  margin: 1.75rem 0;
}

.policy-info-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 1.35rem;
  transition: border-color 0.15s ease;
}

.policy-info-card:hover {
  border-color: var(--border-hover);
}

.policy-info-card i {
  font-size: 1.45rem;
  color: var(--link-color);
  margin-bottom: 0.65rem;
  display: inline-block;
}

.policy-info-card h3 {
  margin: 0 0 0.4rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.policy-info-card p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* ==========================================================================
   FAQ Section Styles
   ========================================================================== */

.faq-category {
  margin-bottom: 3.5rem;
  scroll-margin-top: 110px;
}

.faq-category-title {
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-color);
}

.faq-item {
  border-bottom: 1px solid var(--border-color);
  padding: 1.75rem 0;
}

.faq-item:first-of-type {
  padding-top: 0.5rem;
}

.faq-question {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
  line-height: 1.4;
  letter-spacing: -0.01em;
}

.faq-answer p {
  font-size: 0.95rem;
  line-height: 1.75;
  color: var(--text-secondary);
  margin-bottom: 0.85rem;
}

.faq-answer ol,
.faq-answer ul {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.faq-answer li {
  font-size: 0.94rem;
  line-height: 1.65;
  color: var(--text-secondary);
}

/* ==========================================================================
   Footer
   ========================================================================== */

.policy-footer {
  border-top: 1px solid var(--border-color);
  padding: 2.25rem var(--page-padding);
  width: 100%;
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.policy-footer-with-sidebar {
  padding-left: calc(var(--page-padding) + var(--sidebar-width) + 3.5rem);
}

.policy-footer-links {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.policy-footer-links a {
  color: var(--text-secondary);
}

.policy-footer-links a:hover {
  color: var(--text-primary);
  text-decoration: underline;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */

@media screen and (max-width: 1200px) {
  :root {
    --page-padding: 2rem;
  }
}

@media screen and (max-width: 960px) {
  :root {
    --page-padding: 1.25rem;
  }

  /* Show mobile hamburger & title */
  .btn-mobile-menu {
    display: inline-flex;
  }

  .mobile-page-title {
    display: inline-block;
  }

  /* Hide desktop brand link on mobile to prevent duplicate title */
  .policy-brand-link {
    display: none;
  }

  .policy-header-inner {
    padding: 0.75rem var(--page-padding);
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 0.85rem;
  }

  .policy-nav-tabs {
    display: none;
  }

  .overview-grid {
    grid-template-columns: 1fr;
    row-gap: 2.5rem;
  }

  /* Hide left desktop sidebar on mobile */
  .policy-sidebar {
    display: none;
  }

  /* Show in-page Contents card on mobile right below the heading */
  .policy-contents-card {
    display: block;
  }

  .policy-content {
    margin-left: 0;
    padding: 1.5rem 0 4rem 0;
  }

  .policy-footer-with-sidebar {
    padding-left: var(--page-padding);
  }

  .overview-main {
    padding: 2.25rem var(--page-padding) 4rem;
  }
}

@media screen and (max-width: 640px) {
  .policy-header-inner {
    padding: 0.65rem var(--page-padding);
    gap: 0.75rem;
  }

  .overview-hero-title {
    font-size: 2rem;
  }

  .policy-title {
    font-size: 1.85rem;
  }

  .policy-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.25rem;
    padding: 1.75rem var(--page-padding);
  }
}