/* =============================================================================
   ORIBIN PRIVACY — DESIGN ENGINE & TYPOGRAPHY SYSTEM
   Google Workspace / Linear Standard • Light & Dark High-Fidelity
   ============================================================================= */

:root {
  /* Light Palette */
  --bg-primary: #FFFFFF;
  --bg-secondary: #F8FAFC;
  --bg-tertiary: #F1F5F9;
  --bg-elevated: #FFFFFF;
  --bg-card: #FFFFFF;
  
  --text-primary: #0F172A;
  --text-secondary: #475569;
  --text-muted: #64748B;
  --text-faint: #94A3B8;

  --border-light: #E2E8F0;
  --border-medium: #CBD5E1;
  --border-active: #7C3AED;

  --brand-purple: #7C3AED;
  --brand-purple-hover: #6D28D9;
  --brand-purple-light: #F5F3FF;
  --brand-purple-border: #DDD6FE;

  --accent-cyan: #0284C7;
  --accent-green: #10B981;
  --accent-green-bg: #ECFDF5;
  --accent-amber: #D97706;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.06), 0 2px 4px -2px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  --font-main: 'Google Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', Consolas, Menlo, monospace;
}

[data-theme="dark"] {
  --bg-primary: #0B0F19;
  --bg-secondary: #111827;
  --bg-tertiary: #1E293B;
  --bg-elevated: #151D2F;
  --bg-card: #151D2F;

  --text-primary: #F8FAFC;
  --text-secondary: #CBD5E1;
  --text-muted: #94A3B8;
  --text-faint: #64748B;

  --border-light: #1E293B;
  --border-medium: #334155;
  --border-active: #A78BFA;

  --brand-purple: #9333EA;
  --brand-purple-hover: #A855F7;
  --brand-purple-light: rgba(147, 51, 234, 0.15);
  --brand-purple-border: rgba(168, 85, 247, 0.3);

  --accent-green-bg: rgba(16, 185, 129, 0.15);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.2s ease, color 0.2s ease;
}

/* =============================================================================
   NAVIGATION TOPBAR
   ============================================================================= */

.topbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-light);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.topbar-inner {
  max-width: 1280px;
  margin: 0 auto;
  height: 64px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-logo {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
}

.brand-text {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.brand-name {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.brand-badge {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: var(--brand-purple-light);
  color: var(--brand-purple);
  border: 1px solid var(--brand-purple-border);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-item {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
}

.nav-item:hover {
  color: var(--text-primary);
  background: var(--bg-secondary);
}

.nav-item.active {
  color: var(--brand-purple);
  font-weight: 600;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  background: var(--bg-card);
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-icon:hover {
  color: var(--text-primary);
  border-color: var(--border-medium);
  background: var(--bg-secondary);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  font-size: 0.85rem;
  font-weight: 500;
  font-family: inherit;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  background: var(--bg-card);
  color: var(--text-primary);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s ease;
}

.btn-secondary:hover {
  background: var(--bg-secondary);
  border-color: var(--border-medium);
}

/* =============================================================================
   HERO / BANNER SECTION
   ============================================================================= */

.hero-section {
  background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
  border-bottom: 1px solid var(--border-light);
  padding: 56px 24px 44px;
}

.hero-inner {
  max-width: 1280px;
  margin: 0 auto;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  background: var(--accent-green-bg);
  color: var(--accent-green);
  font-size: 0.78rem;
  font-weight: 600;
  margin-bottom: 16px;
}

.hero-pill .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-green);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

.hero-title {
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin-bottom: 12px;
  line-height: 1.2;
}

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 760px;
  margin-bottom: 24px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.meta-item strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* =============================================================================
   HIGHLIGHTS GRID (PRIVACY AT A GLANCE)
   ============================================================================= */

.highlights-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 36px;
}

.highlight-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 20px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.highlight-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-medium);
}

.highlight-icon-wrap {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  font-size: 1.1rem;
}

.icon-purple { background: var(--brand-purple-light); color: var(--brand-purple); }
.icon-cyan   { background: rgba(2, 132, 199, 0.12); color: var(--accent-cyan); }
.icon-green  { background: var(--accent-green-bg); color: var(--accent-green); }
.icon-amber  { background: rgba(217, 119, 6, 0.12); color: var(--accent-amber); }

.highlight-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.highlight-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* =============================================================================
   MAIN TWO-COLUMN CONTENT LAYOUT
   ============================================================================= */

.main-content-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 44px 24px 80px;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 48px;
  align-items: start;
}

/* Sidebar Navigation */
.sidebar-sticky {
  position: sticky;
  top: 90px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.toc-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 18px;
}

.toc-header {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.search-box {
  position: relative;
  margin-bottom: 14px;
}

.search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-faint);
  pointer-events: none;
}

.search-input {
  width: 100%;
  height: 34px;
  padding: 0 10px 0 32px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.82rem;
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.15s ease;
}

.search-input:focus {
  border-color: var(--brand-purple);
  background: var(--bg-card);
}

.toc-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: calc(100vh - 280px);
  overflow-y: auto;
  padding-right: 4px;
}

.toc-nav::-webkit-scrollbar {
  width: 4px;
}

.toc-nav::-webkit-scrollbar-thumb {
  background: var(--border-medium);
  border-radius: 4px;
}

.toc-link {
  display: block;
  padding: 6px 10px;
  font-size: 0.84rem;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: all 0.12s ease;
  line-height: 1.4;
  border-left: 2px solid transparent;
}

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

.toc-link.active {
  color: var(--brand-purple);
  font-weight: 600;
  background: var(--brand-purple-light);
  border-left-color: var(--brand-purple);
}

.contact-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 16px;
  font-size: 0.82rem;
}

.contact-title {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.contact-desc {
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.contact-email-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--brand-purple);
  text-decoration: none;
  font-weight: 600;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  word-break: break-all;
}

.contact-email-link:hover {
  text-decoration: underline;
}

/* =============================================================================
   POLICY DOCUMENT BODY (TYPOGRAPHY & CARDS)
   ============================================================================= */

.policy-body {
  display: flex;
  flex-direction: column;
  gap: 36px;
}

.policy-section {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 36px 40px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s ease;
}

.policy-section:target {
  border-color: var(--brand-purple);
  box-shadow: 0 0 0 3px var(--brand-purple-border);
}

.section-tag {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--brand-purple);
  text-transform: uppercase;
  margin-bottom: 6px;
}

.section-title {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-light);
}

.policy-section p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 16px;
  line-height: 1.7;
}

.policy-section p:last-child {
  margin-bottom: 0;
}

.policy-section h3 {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 24px 0 10px;
}

.policy-section ul,
.policy-section ol {
  margin: 12px 0 20px 22px;
  color: var(--text-secondary);
  font-size: 0.94rem;
  line-height: 1.7;
}

.policy-section li {
  margin-bottom: 8px;
}

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

/* Callout Alert Boxes */
.callout-box {
  background: var(--bg-secondary);
  border-left: 4px solid var(--brand-purple);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 16px 20px;
  margin: 20px 0;
  font-size: 0.9rem;
}

.callout-box.security {
  border-left-color: var(--accent-green);
  background: var(--accent-green-bg);
}

.callout-box.warning {
  border-left-color: var(--accent-amber);
  background: rgba(217, 119, 6, 0.08);
}

.callout-title {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Data Table */
.policy-table-wrap {
  overflow-x: auto;
  margin: 20px 0;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
}

.policy-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  text-align: left;
}

.policy-table th {
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-weight: 600;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-light);
}

.policy-table td {
  padding: 12px 16px;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-light);
  vertical-align: top;
}

.policy-table tr:last-child td {
  border-bottom: none;
}

.code-pill {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  background: var(--bg-tertiary);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--brand-purple);
}

/* =============================================================================
   FOOTER
   ============================================================================= */

.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-light);
  padding: 48px 24px 36px;
  color: var(--text-secondary);
  font-size: 0.86rem;
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 24px;
}

.footer-brand-col {
  max-width: 360px;
}

.footer-brand-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.footer-brand-header span {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text-primary);
}

.footer-links-col {
  display: flex;
  gap: 48px;
  flex-wrap: wrap;
}

.footer-col-title {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
  font-size: 0.88rem;
}

.footer-links-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-link {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.12s ease;
}

.footer-link:hover {
  color: var(--brand-purple);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding-top: 24px;
  border-top: 1px solid var(--border-light);
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* =============================================================================
   RESPONSIVE MEDIA QUERIES
   ============================================================================= */

@media (max-width: 1024px) {
  .highlights-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .main-content-wrap {
    grid-template-columns: 240px 1fr;
    gap: 32px;
  }

  .policy-section {
    padding: 28px 24px;
  }
}

@media (max-width: 768px) {
  .main-content-wrap {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .sidebar-sticky {
    position: static;
  }

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

  .highlights-grid {
    grid-template-columns: 1fr;
  }

  .nav-links {
    display: none;
  }

  .footer-links-col {
    gap: 28px;
  }
}

/* =============================================================================
   PRINT STYLESHEET (CLEAN LEGAL DOCUMENT EXPORT)
   ============================================================================= */

@media print {
  .topbar,
  .sidebar-sticky,
  .footer,
  .hero-pill,
  .btn-icon,
  .btn-secondary {
    display: none !important;
  }

  body {
    background: #FFFFFF !important;
    color: #000000 !important;
    font-size: 11pt !important;
  }

  .main-content-wrap {
    grid-template-columns: 1fr !important;
    padding: 0 !important;
  }

  .policy-section {
    border: none !important;
    box-shadow: none !important;
    padding: 0 0 24pt 0 !important;
    page-break-inside: avoid;
  }

  .hero-section {
    background: none !important;
    border: none !important;
    padding: 0 0 20pt 0 !important;
  }
}
