:root {
  --color-bg: #f8fafc;
  --color-surface: #ffffff;
  --color-surface-alt: #f1f5f9;
  --color-border: #e2e8f0;
  --color-border-hover: #cbd5e1;
  --color-text-main: #0f172a;
  --color-text-muted: #475569;
  --color-text-subtle: #64748b;
  --color-primary: #0284c7;
  --color-primary-dark: #0369a1;
  --color-primary-light: #e0f2fe;
  --color-success: #059669;
  --color-success-light: #ecfdf5;
  --color-warning-bg: #fffbeb;
  --color-warning-border: #fef3c7;
  --color-warning-text: #92400e;
  --color-accent: #6366f1;
  --color-accent-light: #eef2ff;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 9999px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px -2px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 10px 25px -4px rgba(15, 23, 42, 0.1);
  --max-width: 860px;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--color-bg);
  color: var(--color-text-main);
  line-height: 1.65;
  padding: 2rem 1.25rem 4rem;
}

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

/* Header */
.site-header {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem 2rem;
  box-shadow: var(--shadow-md);
  margin-bottom: 2rem;
  position: relative;
  overflow: hidden;
}

.site-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: linear-gradient(90deg, #0284c7, #38bdf8, #6366f1, #10b981);
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.app-icon {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
  object-fit: cover;
  flex-shrink: 0;
}

.brand-text h1 {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--color-text-main);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.brand-text .app-tagline {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  font-weight: 500;
  margin-top: 0.25rem;
}

/* Language Switcher */
.lang-switcher {
  display: inline-flex;
  background: var(--color-surface-alt);
  padding: 4px;
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border);
}

.lang-btn {
  border: none;
  background: transparent;
  padding: 6px 14px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text-muted);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.lang-btn:hover {
  color: var(--color-text-main);
}

.lang-btn.active {
  background: var(--color-surface);
  color: var(--color-primary-dark);
  box-shadow: var(--shadow-sm);
}

/* Meta Bar */
.meta-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--color-border);
  font-size: 0.875rem;
  color: var(--color-text-subtle);
}

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

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

.badge-green {
  background: var(--color-success-light);
  color: var(--color-success);
  border: 1px solid rgba(5, 150, 105, 0.2);
}

.badge-blue {
  background: var(--color-primary-light);
  color: var(--color-primary-dark);
  border: 1px solid rgba(2, 132, 199, 0.2);
}

/* Summary Grid Cards */
.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.summary-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.25rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.summary-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.card-icon {
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
  display: inline-block;
}

.summary-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text-main);
  margin-bottom: 0.25rem;
}

.summary-card p {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  line-height: 1.5;
}

/* Main Content Article */
.policy-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2.25rem;
  box-shadow: var(--shadow-md);
  margin-bottom: 2rem;
}

.toc-box {
  background: var(--color-surface-alt);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  margin-bottom: 2.5rem;
  border-left: 4px solid var(--color-primary);
}

.toc-box h2 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-text-main);
  margin-bottom: 0.75rem;
}

.toc-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 0.5rem 1.5rem;
}

.toc-list a {
  color: var(--color-primary-dark);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.15s ease;
}

.toc-list a:hover {
  color: var(--color-primary);
  text-decoration: underline;
}

/* Section Typography */
.policy-section {
  padding-bottom: 2rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--color-border);
}

.policy-section:last-child {
  padding-bottom: 0;
  margin-bottom: 0;
  border-bottom: none;
}

.policy-section h2 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--color-text-main);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  scroll-margin-top: 1.5rem;
}

.policy-section h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-text-main);
  margin: 1.25rem 0 0.5rem;
}

.policy-section p {
  color: var(--color-text-muted);
  margin-bottom: 1rem;
  font-size: 0.975rem;
}

.policy-section ul {
  list-style-type: none;
  padding-left: 0;
  margin-bottom: 1rem;
}

.policy-section ul li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.6rem;
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

.policy-section ul li::before {
  content: "•";
  position: absolute;
  left: 0.35rem;
  top: -0.1rem;
  color: var(--color-primary);
  font-size: 1.25rem;
  font-weight: bold;
}

.callout {
  background: var(--color-primary-light);
  border: 1px solid rgba(2, 132, 199, 0.2);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  margin: 1.25rem 0;
  font-size: 0.925rem;
  color: #0c4a6e;
}

.callout strong {
  color: #075985;
}

.callout-warning {
  background: var(--color-warning-bg);
  border: 1px solid var(--color-warning-border);
  color: var(--color-warning-text);
}

/* Compliance Table */
.table-responsive {
  overflow-x: auto;
  margin: 1.25rem 0;
}

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

.compliance-table th,
.compliance-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--color-border);
}

.compliance-table th {
  background: var(--color-surface-alt);
  font-weight: 700;
  color: var(--color-text-main);
}

.compliance-table tr:hover td {
  background: rgba(241, 245, 249, 0.5);
}

.status-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.status-not-collected {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
}

.status-active {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

code {
  background: var(--color-surface-alt);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.875em;
  color: #be185d;
  border: 1px solid var(--color-border);
}

/* Footer */
.site-footer {
  text-align: center;
  color: var(--color-text-subtle);
  font-size: 0.875rem;
  padding-top: 1rem;
}

.site-footer p {
  margin-bottom: 0.5rem;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 1.25rem;
  margin-top: 0.75rem;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--color-primary-dark);
  text-decoration: none;
  font-weight: 500;
}

.footer-links a:hover {
  text-decoration: underline;
}

/* Back to Top Floating Button */
.back-to-top {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  background: var(--color-primary);
  color: white;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  font-size: 1.25rem;
  border: none;
  cursor: pointer;
}

.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
}

.back-to-top:hover {
  background: var(--color-primary-dark);
  transform: translateY(-3px);
}

/* Responsive adjustments */
@media (max-width: 640px) {
  body {
    padding: 1rem 0.75rem 3rem;
  }
  .site-header {
    padding: 1.5rem 1.25rem 1.25rem;
  }
  .policy-card {
    padding: 1.5rem 1.25rem;
  }
  .brand-wrapper {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
  .app-icon {
    width: 56px;
    height: 56px;
  }
  .brand-text h1 {
    font-size: 1.45rem;
  }
  .summary-grid {
    grid-template-columns: 1fr;
  }
}

/* Print Styles */
@media print {
  body {
    background: white;
    color: black;
    padding: 0;
  }
  .site-header, .policy-card {
    border: none;
    box-shadow: none;
    padding: 0;
  }
  .lang-switcher, .back-to-top, .footer-links {
    display: none !important;
  }
}

