:root {
  --primary: #4F46E5;
  --primary-hover: #4338CA;
  --primary-light: #EEF2FF;
  --primary-border: #C7D2FE;
  
  --secondary: #0284C7;
  --success: #059669;
  --warning: #D97706;
  --error: #DC2626;

  /* Clean White Aesthetic (Default) */
  --bg-page: #F8FAFC;
  --bg-surface: #FFFFFF;
  --bg-subtle: #F1F5F9;
  --bg-hover: #F8FAFC;
  
  --border: #E2E8F0;
  --border-strong: #CBD5E1;
  
  --text-main: #0F172A;
  --text-muted: #475569;
  --text-subtle: #64748B;
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.06), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

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;
  font-size: 15px;
}

/* ── Layout Container ── */
.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ── Top Header ── */
header.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #FFFFFF;
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-main);
}

.brand-icon {
  width: 32px;
  height: 32px;
  background: var(--primary);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
}

.brand-icon svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.brand-name {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.brand-name span {
  color: var(--primary);
}

.brand-badge {
  font-size: 11px;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-light);
  border: 1px solid var(--primary-border);
  padding: 2px 8px;
  border-radius: 4px;
  margin-left: 4px;
}

.header-links {
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #FFFFFF;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  padding: 7px 14px;
  border-radius: 6px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s ease;
}

.header-btn:hover {
  background: var(--bg-hover);
  color: var(--text-main);
  border-color: var(--border-strong);
}

/* ── Page Intro ── */
.intro-section {
  background: #FFFFFF;
  border-bottom: 1px solid var(--border);
  padding: 40px 0 32px;
}

.intro-inner {
  max-width: 820px;
}

.intro-tag {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--primary);
  margin-bottom: 8px;
}

.intro-title {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.8px;
  color: var(--text-main);
  margin-bottom: 12px;
  line-height: 1.25;
}

.intro-desc {
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 20px;
}

.intro-meta-bar {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--text-subtle);
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.intro-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.dot-indicator {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
}

/* ── Navigation Tabs ── */
.nav-tabs-wrapper {
  background: #FFFFFF;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 64px;
  z-index: 90;
}

.nav-tabs {
  display: flex;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
}

.nav-tabs::-webkit-scrollbar {
  display: none;
}

.tab-btn {
  background: none;
  border: none;
  padding: 14px 18px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: all 0.15s ease;
}

.tab-btn:hover {
  color: var(--text-main);
}

.tab-btn.active {
  color: var(--primary);
  font-weight: 600;
  border-bottom-color: var(--primary);
}

/* ── Main Layout (Sidebar + Document) ── */
.content-wrapper {
  padding: 36px 0 60px;
}

.main-grid {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 40px;
  align-items: start;
}

/* ── Sidebar TOC ── */
.sidebar-toc {
  position: sticky;
  top: 130px;
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  max-height: calc(100vh - 160px);
  overflow-y: auto;
}

.toc-heading {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-subtle);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.toc-nav {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.toc-nav a {
  display: block;
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 6px;
  line-height: 1.4;
  transition: all 0.15s ease;
}

.toc-nav a:hover {
  color: var(--text-main);
  background: var(--bg-subtle);
}

.toc-nav a.active {
  color: var(--primary);
  background: var(--primary-light);
  font-weight: 600;
}

/* ── Policy Document ── */
.policy-card {
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 40px;
  box-shadow: var(--shadow-sm);
}

.policy-pane {
  display: none;
}

.policy-pane.active {
  display: block;
}

.pane-header {
  padding-bottom: 20px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--border);
}

.pane-title {
  font-size: 26px;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.5px;
  margin-bottom: 6px;
}

.pane-sub {
  font-size: 13px;
  color: var(--text-subtle);
}

/* ── Typography inside Document ── */
.clause-block {
  margin-bottom: 32px;
}

.clause-block:last-child {
  margin-bottom: 0;
}

.clause-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 12px;
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.clause-num {
  color: var(--primary);
  font-size: 16px;
}

p {
  margin-bottom: 14px;
  color: var(--text-muted);
  font-size: 14.5px;
}

p strong {
  color: var(--text-main);
}

ul, ol {
  margin-bottom: 16px;
  padding-left: 20px;
  color: var(--text-muted);
  font-size: 14.5px;
}

li {
  margin-bottom: 8px;
}

li strong {
  color: var(--text-main);
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 13px;
  background: var(--bg-subtle);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--text-main);
  border: 1px solid var(--border);
}

/* ── Clean Box Callouts ── */
.notice-box {
  background: #F8FAFC;
  border-left: 4px solid var(--primary);
  border-top: 1px solid var(--border);
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  border-radius: 0 6px 6px 0;
  padding: 16px 18px;
  margin: 20px 0;
  font-size: 14px;
}

.notice-box.warning {
  border-left-color: var(--warning);
  background: #FFFBEB;
}

.notice-box.success {
  border-left-color: var(--success);
  background: #F0FDF4;
}

.notice-title {
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 4px;
}

.notice-box p {
  margin-bottom: 0;
  color: var(--text-muted);
}

/* ── Clean Tables ── */
.table-responsive {
  overflow-x: auto;
  margin: 20px 0;
  border: 1px solid var(--border);
  border-radius: 6px;
}

table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  text-align: left;
}

table.data-table th {
  background: #F8FAFC;
  padding: 10px 14px;
  font-weight: 600;
  color: var(--text-main);
  border-bottom: 1px solid var(--border);
}

table.data-table td {
  padding: 12px 14px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}

table.data-table tr:last-child td {
  border-bottom: none;
}

/* ── Contact Section ── */
.contact-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.contact-tile {
  background: #F8FAFC;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 18px;
}

.contact-tile h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 4px;
}

.contact-tile p {
  font-size: 13px;
  color: var(--text-subtle);
  margin-bottom: 10px;
}

.contact-tile a {
  display: inline-block;
  color: var(--primary);
  font-weight: 600;
  font-size: 13.5px;
  text-decoration: none;
  word-break: break-all;
}

.contact-tile a:hover {
  text-decoration: underline;
}

/* ── Footer ── */
footer.site-footer {
  background: #FFFFFF;
  border-top: 1px solid var(--border);
  padding: 32px 0;
  margin-top: 40px;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-copy {
  font-size: 13px;
  color: var(--text-subtle);
}

.footer-nav {
  display: flex;
  gap: 18px;
  list-style: none;
}

.footer-nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 13px;
}

.footer-nav a:hover {
  color: var(--primary);
}

/* ── Responsive ── */
@media (max-width: 860px) {
  .main-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  
  .sidebar-toc {
    display: none;
  }
  
  .policy-card {
    padding: 24px 18px;
  }
}

@media print {
  header.site-header,
  .nav-tabs-wrapper,
  .sidebar-toc,
  .header-btn,
  footer.site-footer {
    display: none !important;
  }
  
  body {
    background: #FFFFFF !important;
  }
  
  .policy-card {
    border: none !important;
    padding: 0 !important;
    box-shadow: none !important;
  }
  
  .policy-pane {
    display: block !important;
    page-break-after: always;
  }
}
