/* ==========================================================================
   NAS GROUP — POULTRY ERP SUITE
   OFFICIAL LEGAL & PRIVACY PORTAL DESIGN SYSTEM
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Plus+Jakarta+Sans:wght@500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  /* Brand Identity & Theme Tokens (Light Mode Default) */
  --brand-navy-900: #061826;
  --brand-navy-800: #0E3860;
  --brand-navy-700: #134475;
  --brand-navy-600: #1B4965;
  --brand-navy-500: #2C6E91;

  --brand-teal-600: #008775;
  --brand-teal-500: #00A896;
  --brand-teal-400: #38B2AC;
  --brand-teal-300: #4FD1C5;
  --brand-teal-100: #E6FFFA;

  --brand-emerald-500: #10B981;
  --brand-emerald-100: #D1FAE5;
  --brand-amber-500: #F59E0B;
  --brand-amber-100: #FEF3C7;
  --brand-rose-500: #EF4444;
  --brand-rose-100: #FEE2E2;

  /* Surfaces & Backgrounds */
  --bg-page: #F8FAFC;
  --bg-page-gradient: radial-gradient(120% 120% at 50% 0%, #F0FDF4 0%, #F1F5F9 50%, #F8FAFC 100%);
  --bg-surface: #FFFFFF;
  --bg-surface-elevated: #FFFFFF;
  --bg-surface-subtle: #F1F5F9;
  --bg-surface-glass: rgba(255, 255, 255, 0.85);

  /* Text & Typography */
  --text-primary: #0F172A;
  --text-secondary: #475569;
  --text-muted: #64748B;
  --text-inverted: #FFFFFF;

  /* Borders & Dividers */
  --border-light: rgba(226, 232, 240, 0.9);
  --border-medium: #CBD5E1;
  --border-focus: #00A896;
  --border-glass: rgba(255, 255, 255, 0.6);

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 4px 12px -2px rgba(15, 23, 42, 0.08), 0 2px 6px -1px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 12px 28px -4px rgba(15, 23, 42, 0.12), 0 4px 10px -2px rgba(15, 23, 42, 0.05);
  --shadow-xl: 0 20px 40px -8px rgba(15, 23, 42, 0.16);
  --shadow-glow: 0 0 20px rgba(56, 178, 172, 0.25);

  /* Radii */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Layout */
  --max-width: 1280px;
  --header-height: 72px;
  --sidebar-width: 300px;
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   Dark Theme Variant
   ========================================================================== */
[data-theme="dark"] {
  --bg-page: #080E1A;
  --bg-page-gradient: radial-gradient(120% 120% at 50% 0%, #0F2338 0%, #08101C 60%, #050912 100%);
  --bg-surface: #0E1726;
  --bg-surface-elevated: #131F33;
  --bg-surface-subtle: #18263E;
  --bg-surface-glass: rgba(14, 23, 38, 0.88);

  --text-primary: #F1F5F9;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;
  --text-inverted: #0F172A;

  --border-light: rgba(51, 65, 85, 0.6);
  --border-medium: #334155;
  --border-focus: #38B2AC;
  --border-glass: rgba(255, 255, 255, 0.08);

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 12px -2px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 12px 28px -4px rgba(0, 0, 0, 0.55);
  --shadow-xl: 0 20px 40px -8px rgba(0, 0, 0, 0.7);
  --shadow-glow: 0 0 25px rgba(56, 178, 172, 0.35);

  --brand-teal-100: rgba(56, 178, 172, 0.15);
  --brand-emerald-100: rgba(16, 185, 129, 0.15);
  --brand-amber-100: rgba(245, 158, 11, 0.15);
  --brand-rose-100: rgba(239, 68, 68, 0.15);
}

/* ==========================================================================
   Base & Reset
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-page);
  background-image: var(--bg-page-gradient);
  background-attachment: fixed;
  color: var(--text-primary);
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background-color 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Plus Jakarta Sans', var(--font-fallback, sans-serif);
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.25;
  letter-spacing: -0.02em;
}

a {
  color: var(--brand-teal-500);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--brand-teal-400);
}

code, pre {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.88em;
}

/* ==========================================================================
   Global Header & Navigation
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  background: var(--bg-surface-glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-light);
  transition: var(--transition);
}

.site-header.scrolled {
  box-shadow: var(--shadow-md);
  border-bottom-color: var(--border-medium);
}

.header-container {
  max-width: var(--max-width);
  margin: 0 auto;
  height: 100%;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
}

.brand-logo-img {
  height: 40px;
  width: auto;
  display: block;
}

.brand-badge {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  background: var(--brand-teal-100);
  color: var(--brand-teal-500);
  border: 1px solid rgba(56, 178, 172, 0.3);
}

.nav-links {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 0.5rem;
}

.nav-link {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius-md);
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.nav-link:hover, .nav-link.active {
  color: var(--brand-teal-500);
  background: var(--bg-surface-subtle);
}

.nav-link.active {
  background: var(--brand-teal-100);
  color: var(--brand-teal-600);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Quick Search Input in Header */
.search-box-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.search-input {
  width: 200px;
  height: 38px;
  padding: 0 2rem 0 2.2rem;
  font-size: 0.85rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-medium);
  background: var(--bg-surface-subtle);
  color: var(--text-primary);
  outline: none;
  transition: var(--transition);
}

.search-input:focus {
  width: 270px;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(56, 178, 172, 0.2);
  background: var(--bg-surface);
}

.search-icon {
  position: absolute;
  left: 0.8rem;
  width: 14px;
  height: 14px;
  color: var(--text-muted);
  pointer-events: none;
}

.search-kbd {
  position: absolute;
  right: 0.6rem;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: 4px;
  padding: 0.15rem 0.35rem;
  pointer-events: none;
}

/* Action Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.55rem 1.15rem;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn-sm {
  font-size: 0.8rem;
  padding: 0.35rem 0.75rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand-teal-500) 0%, var(--brand-navy-600) 100%);
  color: #FFFFFF;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--brand-teal-400) 0%, var(--brand-navy-700) 100%);
  box-shadow: var(--shadow-glow);
  transform: translateY(-1px);
  color: #FFFFFF;
}

.btn-outline {
  background: var(--bg-surface);
  border-color: var(--border-medium);
  color: var(--text-primary);
}

.btn-outline:hover {
  border-color: var(--brand-teal-400);
  color: var(--brand-teal-500);
  background: var(--bg-surface-subtle);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}

.btn-ghost:hover {
  color: var(--text-primary);
  background: var(--bg-surface-subtle);
}

/* Theme Toggle Button */
.theme-toggle-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-medium);
  background: var(--bg-surface);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.theme-toggle-btn:hover {
  color: var(--brand-teal-500);
  border-color: var(--brand-teal-400);
  transform: rotate(15deg);
}

/* ==========================================================================
   Hero Banner Section
   ========================================================================== */
.hero-section {
  position: relative;
  padding: 3.5rem 1.5rem 2.5rem;
  background: linear-gradient(180deg, rgba(14, 56, 96, 0.06) 0%, transparent 100%);
  border-bottom: 1px solid var(--border-light);
  overflow: hidden;
}

.hero-container {
  max-width: var(--max-width);
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.hero-meta-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.compliance-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  color: var(--text-secondary);
  box-shadow: var(--shadow-sm);
}

.compliance-badge.verified {
  background: var(--brand-emerald-100);
  color: var(--brand-emerald-500);
  border-color: rgba(16, 185, 129, 0.3);
}

.hero-title {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, var(--text-primary) 30%, var(--brand-navy-600) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

[data-theme="dark"] .hero-title {
  background: linear-gradient(135deg, #FFFFFF 30%, var(--brand-teal-300) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 820px;
  line-height: 1.7;
  margin-bottom: 2rem;
}

.hero-details-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-light);
  font-size: 0.88rem;
  color: var(--text-muted);
}

.details-items {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.75rem;
}

.detail-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.detail-item strong {
  color: var(--text-primary);
}

/* Key Highlights Bento / Quick Grid */
.highlights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  margin-top: 2rem;
}

.highlight-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

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

.highlight-icon-box {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.9rem;
  font-size: 1.25rem;
}

.highlight-card h4 {
  font-size: 1rem;
  margin-bottom: 0.4rem;
}

.highlight-card p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ==========================================================================
   Main Portal Layout (Sidebar + Content)
   ========================================================================== */
.portal-main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.5rem 1.5rem 5rem;
  width: 100%;
}

.portal-layout {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  gap: 2.5rem;
  align-items: start;
}

/* Sticky Sidebar */
.portal-sidebar {
  position: sticky;
  top: calc(var(--header-height) + 1.5rem);
  max-height: calc(100vh - var(--header-height) - 3rem);
  overflow-y: auto;
  padding-right: 0.5rem;
}

.sidebar-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.25rem;
}

.sidebar-heading {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  font-weight: 700;
  margin-bottom: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.toc-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-md);
  transition: var(--transition);
  border-left: 2px solid transparent;
}

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

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

.toc-num {
  font-size: 0.75rem;
  font-family: 'JetBrains Mono', monospace;
  color: var(--text-muted);
}

.sidebar-support {
  background: linear-gradient(135deg, rgba(14, 56, 96, 0.08) 0%, rgba(56, 178, 172, 0.08) 100%);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
}

.sidebar-support h5 {
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}

.sidebar-support p {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-bottom: 0.9rem;
  line-height: 1.5;
}

/* Policy Content Stream */
.policy-content {
  min-width: 0;
}

.policy-section {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 2.25rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  position: relative;
}

.policy-section:hover {
  box-shadow: var(--shadow-md);
}

.section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-light);
}

.section-badge-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}

.section-num-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-sm);
  background: var(--bg-surface-subtle);
  color: var(--brand-navy-600);
  border: 1px solid var(--border-medium);
}

[data-theme="dark"] .section-num-tag {
  color: var(--brand-teal-300);
}

.section-title {
  font-size: 1.5rem;
  font-weight: 700;
}

.copy-anchor-btn {
  background: transparent;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 0.4rem 0.65rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.copy-anchor-btn:hover {
  color: var(--brand-teal-500);
  border-color: var(--brand-teal-400);
  background: var(--bg-surface-subtle);
}

/* Callout Box / TLDR */
.callout-box {
  display: flex;
  gap: 1rem;
  padding: 1.25rem;
  border-radius: var(--radius-lg);
  margin: 1.25rem 0 1.5rem;
  background: var(--bg-surface-subtle);
  border-left: 4px solid var(--brand-teal-500);
}

.callout-icon {
  font-size: 1.35rem;
  line-height: 1;
  flex-shrink: 0;
}

.callout-content {
  font-size: 0.92rem;
  color: var(--text-secondary);
}

.callout-content strong {
  display: block;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
  font-size: 0.95rem;
}

.callout-box.warning {
  border-left-color: var(--brand-amber-500);
  background: var(--brand-amber-100);
}

.callout-box.important {
  border-left-color: var(--brand-rose-500);
  background: var(--brand-rose-100);
}

/* Structured Typography in Sections */
.policy-section p {
  color: var(--text-secondary);
  font-size: 0.96rem;
  margin-bottom: 1.15rem;
}

.policy-section ul, .policy-section ol {
  margin: 1rem 0 1.5rem 1.25rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.policy-section li {
  margin-bottom: 0.65rem;
  padding-left: 0.25rem;
}

.policy-section li strong {
  color: var(--text-primary);
}

/* Modern Data Table */
.table-wrapper {
  overflow-x: auto;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  margin: 1.5rem 0;
  box-shadow: var(--shadow-sm);
}

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

.data-table th {
  background: var(--bg-surface-subtle);
  color: var(--text-primary);
  font-weight: 700;
  padding: 0.85rem 1.15rem;
  border-bottom: 1px solid var(--border-medium);
  white-space: nowrap;
}

.data-table td {
  padding: 0.85rem 1.15rem;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-secondary);
  vertical-align: top;
}

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

.data-table tr:hover td {
  background: var(--bg-surface-subtle);
}

/* Permission Pill / Badges */
.perm-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-sm);
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-medium);
  color: var(--brand-navy-600);
}

[data-theme="dark"] .perm-pill {
  color: var(--brand-teal-300);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
}

.status-badge.required {
  background: var(--brand-rose-100);
  color: var(--brand-rose-500);
}

.status-badge.optional {
  background: var(--brand-emerald-100);
  color: var(--brand-emerald-500);
}

/* Interactive Card Accordions / Feature Showcases */
.feature-showcase-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
  margin: 1.5rem 0;
}

.feature-box {
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  transition: var(--transition);
}

.feature-box:hover {
  border-color: var(--border-focus);
}

.feature-box h5 {
  font-size: 1rem;
  margin-bottom: 0.4rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.feature-box p {
  font-size: 0.88rem;
  margin-bottom: 0;
}

/* Visual Mockup & Screenshots embed inside policy */
.screenshot-preview-container {
  margin: 2rem 0;
  padding: 1.5rem;
  background: var(--bg-surface-subtle);
  border-radius: var(--radius-lg);
  border: 1px dashed var(--border-medium);
  text-align: center;
}

.screenshot-preview-caption {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
}

.mockup-phones-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin: 1rem 0;
}

.phone-mockup-frame {
  max-width: 220px;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 6px solid #1E293B;
  transition: var(--transition);
}

.phone-mockup-frame:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: var(--shadow-xl);
}

.phone-mockup-frame img {
  width: 100%;
  height: auto;
  display: block;
}

/* Interactive Accordion FAQs */
.accordion-item {
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  margin-bottom: 0.75rem;
  overflow: hidden;
  background: var(--bg-surface);
  transition: var(--transition);
}

.accordion-header {
  width: 100%;
  padding: 1.15rem 1.25rem;
  background: transparent;
  border: none;
  text-align: left;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  transition: var(--transition);
}

.accordion-header:hover {
  background: var(--bg-surface-subtle);
  color: var(--brand-teal-500);
}

.accordion-icon {
  font-size: 1.1rem;
  transition: transform 0.25s ease;
}

.accordion-item.open .accordion-icon {
  transform: rotate(180deg);
}

.accordion-body {
  padding: 0 1.25rem 1.25rem;
  display: none;
  font-size: 0.92rem;
  color: var(--text-secondary);
  border-top: 1px solid var(--border-light);
  line-height: 1.6;
}

.accordion-item.open .accordion-body {
  display: block;
}

/* Data Deletion Interactive Form */
.deletion-form-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 2.25rem;
  margin: 2rem 0;
  box-shadow: var(--shadow-md);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-medium);
  background: var(--bg-surface-subtle);
  color: var(--text-primary);
  outline: none;
  transition: var(--transition);
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--brand-teal-400);
  box-shadow: 0 0 0 3px rgba(56, 178, 172, 0.2);
  background: var(--bg-surface);
}

.form-checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  cursor: pointer;
  margin: 1rem 0;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.toast {
  background: var(--brand-navy-900);
  color: #FFFFFF;
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 500;
  box-shadow: var(--shadow-xl);
  border-left: 4px solid var(--brand-teal-400);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  animation: slideInRight 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  margin-top: auto;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-light);
  padding: 3.5rem 1.5rem 2rem;
}

.footer-container {
  max-width: var(--max-width);
  margin: 0 auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}

.footer-col h6 {
  font-size: 0.95rem;
  margin-bottom: 1.15rem;
  color: var(--text-primary);
}

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

.footer-links a {
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.footer-links a:hover {
  color: var(--brand-teal-500);
  padding-left: 4px;
}

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

/* ==========================================================================
   Print Stylesheet
   ========================================================================== */
@media print {
  .site-header,
  .portal-sidebar,
  .theme-toggle-btn,
  .copy-anchor-btn,
  .search-box-wrapper,
  .toast-container,
  .screenshot-preview-container,
  .deletion-form-card,
  .site-footer {
    display: none !important;
  }

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

  .portal-layout {
    display: block !important;
  }

  .policy-section {
    box-shadow: none !important;
    border: none !important;
    border-bottom: 1px solid #CCCCCC !important;
    page-break-inside: avoid;
    padding: 1.5rem 0 !important;
    margin-bottom: 1.5rem !important;
  }

  a {
    color: #000000 !important;
    text-decoration: underline;
  }
}

/* ==========================================================================
   Responsive Adaptations
   ========================================================================== */
@media (max-width: 1024px) {
  .portal-layout {
    grid-template-columns: 1fr;
  }

  .portal-sidebar {
    position: static;
    max-height: none;
    margin-bottom: 2rem;
  }

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

@media (max-width: 768px) {
  .hero-title {
    font-size: 1.85rem;
  }

  .header-container {
    padding: 0 1rem;
  }

  .nav-links {
    display: none; /* Mobile menu can toggle */
  }

  .search-input {
    width: 140px;
  }

  .search-input:focus {
    width: 180px;
  }

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

/* ==========================================================================
   Clean & Simple App Store Legal Document System
   ========================================================================== */
.simple-header {
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.header-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.brand-logo {
  height: 38px;
  width: auto;
  display: block;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  color: #0f172a;
  line-height: 1.2;
}

.brand-sub {
  font-size: 0.75rem;
  color: #64748b;
  font-weight: 500;
}

.simple-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.nav-item {
  font-size: 0.85rem;
  font-weight: 500;
  color: #475569;
  padding: 0.45rem 0.75rem;
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.nav-item:hover {
  color: #0284c7;
  background: #f1f5f9;
}

.nav-item.active {
  color: #0369a1;
  background: #e0f2fe;
  font-weight: 600;
}

.document-container {
  max-width: 880px;
  margin: 2rem auto 4rem;
  padding: 0 1.25rem;
}

.legal-doc {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.03), 0 2px 4px -2px rgba(0, 0, 0, 0.03);
  padding: 3rem 3.5rem;
}

.doc-header {
  margin-bottom: 2.25rem;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 2rem;
}

.doc-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  background: #f0fdf4;
  color: #15803d;
  border: 1px solid #bbf7d0;
  margin-bottom: 0.75rem;
}

.doc-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 2.25rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.025em;
  margin-bottom: 0.5rem;
}

.doc-subtitle {
  font-size: 1.05rem;
  color: #475569;
  line-height: 1.5;
  margin-bottom: 1.25rem;
}

.doc-meta-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  padding: 0.85rem 1.25rem;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  margin-bottom: 1.25rem;
}

.meta-col {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.meta-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  color: #64748b;
  letter-spacing: 0.05em;
}

.meta-value {
  font-size: 0.88rem;
  font-weight: 600;
  color: #0f172a;
}

.doc-notice {
  background: #f8fafc;
  border-left: 4px solid #0284c7;
  padding: 0.85rem 1rem;
  border-radius: 0 6px 6px 0;
  font-size: 0.88rem;
  color: #334155;
  line-height: 1.6;
}

.doc-contents-nav {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin-bottom: 2.5rem;
}

.contents-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #475569;
  letter-spacing: 0.05em;
  margin-bottom: 0.65rem;
}

.contents-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.toc-chip {
  font-size: 0.8rem;
  font-weight: 500;
  color: #0369a1;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 0.35rem 0.65rem;
  text-decoration: none;
  transition: all 0.15s ease;
}

.toc-chip:hover {
  background: #0284c7;
  color: #ffffff;
  border-color: #0284c7;
}

.doc-section {
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid #f1f5f9;
}

.doc-section:last-child {
  border-bottom: none;
}

.doc-section h2 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.85rem;
  letter-spacing: -0.015em;
}

.doc-section p {
  font-size: 0.95rem;
  color: #334155;
  line-height: 1.7;
  margin-bottom: 1rem;
}

.clean-list {
  list-style: none;
  margin: 0.75rem 0 1.25rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.clean-list li {
  position: relative;
  padding-left: 1.5rem;
  font-size: 0.95rem;
  color: #334155;
  line-height: 1.65;
}

.clean-list li::before {
  content: "•";
  position: absolute;
  left: 0.4rem;
  top: -0.1rem;
  color: #0284c7;
  font-weight: bold;
  font-size: 1.3rem;
}

.info-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  font-size: 0.9rem;
}

.info-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: baseline;
}

.callout {
  padding: 1rem 1.25rem;
  border-radius: 8px;
  margin: 1.25rem 0;
  border-left: 4px solid;
}

.callout.warning {
  background: #fffbeb;
  border-left-color: #f59e0b;
  border-top: 1px solid #fef3c7;
  border-right: 1px solid #fef3c7;
  border-bottom: 1px solid #fef3c7;
}

.callout.note {
  background: #f0fdf4;
  border-left-color: #10b981;
  border-top: 1px solid #d1fae5;
  border-right: 1px solid #d1fae5;
  border-bottom: 1px solid #d1fae5;
}

.callout-header {
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 0.35rem;
  color: #0f172a;
}

.table-container {
  overflow-x: auto;
  margin: 1.25rem 0;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

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

.simple-table th {
  background: #f8fafc;
  padding: 0.75rem 1rem;
  font-weight: 600;
  color: #475569;
  border-bottom: 1px solid #e2e8f0;
}

.simple-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #f1f5f9;
  color: #334155;
  vertical-align: top;
}

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

.contact-box {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.contact-item {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 1rem;
  font-size: 0.88rem;
  line-height: 1.6;
}

.simple-footer {
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
  padding: 1.5rem 0;
  font-size: 0.85rem;
  color: #64748b;
  margin-top: auto;
}

.footer-inner {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 1.25rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.footer-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-links a {
  color: #64748b;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s ease;
}

.footer-links a:hover {
  color: #0284c7;
}

@media (max-width: 768px) {
  .legal-doc {
    padding: 1.75rem 1.25rem;
  }

  .doc-title {
    font-size: 1.75rem;
  }

  .doc-meta-bar {
    flex-direction: column;
    gap: 0.75rem;
  }

  .simple-nav {
    display: none;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

