/* ==========================================================================
   Aira Legal Center - Modern Responsive Stylesheet
   ========================================================================== */

:root {
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  /* Light Theme (Default) */
  --bg: #f8fafc;
  --bg-subtle: #f1f5f9;
  --surface: #ffffff;
  --surface-raised: #ffffff;
  --text: #0f172a;
  --text-muted: #64748b;
  --text-dim: #94a3b8;
  --border: #e2e8f0;
  --border-light: #f1f5f9;
  --border-focus: #6366f1;
  
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-subtle: #eef2ff;
  --primary-border: #c7d2fe;
  --primary-text: #3730a3;

  --accent-gradient: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  --glow-shadow: 0 10px 25px -5px rgba(79, 70, 229, 0.2), 0 8px 10px -6px rgba(79, 70, 229, 0.1);
  --card-shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.04), 0 2px 4px -2px rgba(15, 23, 42, 0.04);
  --card-shadow-lg: 0 20px 25px -5px rgba(15, 23, 42, 0.05), 0 8px 10px -6px rgba(15, 23, 42, 0.04);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  --nav-height: 72px;
  --shell-max: 1140px;
}

[data-theme="dark"] {
  --bg: #090d16;
  --bg-subtle: #111827;
  --surface: #111827;
  --surface-raised: #1e293b;
  --text: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --border: #1e293b;
  --border-light: #162032;
  --border-focus: #818cf8;

  --primary: #6366f1;
  --primary-hover: #818cf8;
  --primary-subtle: rgba(99, 102, 241, 0.12);
  --primary-border: rgba(99, 102, 241, 0.25);
  --primary-text: #c7d2fe;

  --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -2px rgba(0, 0, 0, 0.4);
  --card-shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.4);
}

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

/* Clean Hidden Scrollbars - Complete Elimination Across All Engines */
*,
*::before,
*::after,
html,
body,
aside,
div,
.toc-card {
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}

::-webkit-scrollbar,
*::-webkit-scrollbar,
html::-webkit-scrollbar,
body::-webkit-scrollbar,
aside::-webkit-scrollbar,
div::-webkit-scrollbar,
.toc-card::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  max-width: 0 !important;
  max-height: 0 !important;
  background: transparent !important;
  opacity: 0 !important;
}

::-webkit-scrollbar-track,
::-webkit-scrollbar-thumb,
::-webkit-scrollbar-button,
::-webkit-scrollbar-corner,
*::-webkit-scrollbar-track,
*::-webkit-scrollbar-thumb,
*::-webkit-scrollbar-button,
*::-webkit-scrollbar-corner {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  background: transparent !important;
  opacity: 0 !important;
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.68;
  letter-spacing: -0.011em;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background-color 0.25s ease, color 0.25s ease;
  background-image: 
    radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.07) 0px, transparent 50%),
    radial-gradient(at 100% 0%, rgba(79, 70, 229, 0.05) 0px, transparent 50%);
  background-attachment: fixed;
}

/* Container Shell */
.shell {
  width: 100%;
  max-width: var(--shell-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
}

/* Header & Nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: rgba(248, 250, 252, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  transition: background-color 0.25s ease, border-color 0.25s ease;
}

[data-theme="dark"] .site-header {
  background-color: rgba(9, 13, 22, 0.82);
}

.nav-container {
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.025em;
  transition: opacity 0.2s ease;
}

.brand-link:hover {
  opacity: 0.88;
}

.brand-badge {
  width: 36px;
  height: 36px;
  background: var(--accent-gradient);
  color: #ffffff;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 1.1rem;
  box-shadow: var(--glow-shadow);
}

.brand-name {
  display: flex;
  align-items: center;
  gap: 6px;
}

.brand-tag {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--primary-subtle);
  color: var(--primary-text);
  padding: 3px 8px;
  border-radius: var(--radius-full);
}

.nav-links {
  display: inline-flex;
  align-items: center;
  background-color: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 3px;
  gap: 2px;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1.25;
}

.nav-link:hover {
  color: var(--text);
  background-color: rgba(255, 255, 255, 0.65);
}

[data-theme="dark"] .nav-link:hover {
  background-color: rgba(255, 255, 255, 0.08);
}

.nav-link.active {
  color: var(--primary);
  background-color: var(--surface);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08), 0 1px 2px rgba(15, 23, 42, 0.04);
  font-weight: 700;
}

[data-theme="dark"] .nav-link.active {
  background-color: var(--surface-raised);
  color: #ffffff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.45);
}

.nav-text-short {
  display: none;
}

.nav-text-full {
  display: inline;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.theme-toggle-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: all 0.2s ease;
}

.theme-toggle-btn:hover {
  color: var(--text);
  background: var(--bg-subtle);
  border-color: var(--text-dim);
}

.theme-toggle-btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-moon { display: none; }
[data-theme="dark"] .icon-sun { display: none; }
[data-theme="dark"] .icon-moon { display: block; }

/* Hero Section */
.hero-section {
  padding: 60px 0 32px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.22);
  padding: 6px 16px;
  border-radius: var(--radius-full);
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary);
  margin-bottom: 20px;
  margin-left: auto;
  margin-right: auto;
  box-shadow: 0 2px 6px rgba(99, 102, 241, 0.08);
}

.hero-pill-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #6366f1;
  box-shadow: 0 0 8px rgba(99, 102, 241, 0.7);
}

.hero-title {
  font-size: clamp(2.2rem, 5.5vw, 3.8rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.04em;
  color: var(--text);
  margin-bottom: 18px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.hero-desc {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 740px;
  line-height: 1.6;
  margin-bottom: 24px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 0.86rem;
  margin-left: auto;
  margin-right: auto;
}

.meta-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  color: var(--text);
  font-weight: 500;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.meta-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  flex-shrink: 0;
}

.meta-icon.calendar {
  color: #3b82f6;
  background: rgba(59, 130, 246, 0.12);
}

.meta-icon.clock {
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.14);
}

.meta-icon.scope {
  color: #10b981;
  background: rgba(16, 185, 129, 0.12);
}

.meta-icon svg {
  width: 13px;
  height: 13px;
}

/* Quick Search Box */
.search-container {
  margin-top: 20px;
  position: relative;
  width: 100%;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

.search-input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 14px 10px 38px;
  font-size: 0.9rem;
  color: var(--text);
  font-family: inherit;
  box-shadow: var(--card-shadow);
  transition: all 0.2s ease;
}

.search-input:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--text-dim);
  pointer-events: none;
}

.search-clear-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: 4px;
  display: none;
  border-radius: 4px;
}

.search-clear-btn:hover {
  color: var(--text);
}

/* Legal Content Layout */
.legal-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 32px;
  padding: 16px 0 72px;
  align-items: start;
}

/* Sticky Sidebar Table of Contents */
.toc-sidebar {
  position: sticky;
  top: 92px;
}

.toc-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--card-shadow);
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.toc-card::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

.toc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-light);
}

.toc-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.toc-badge {
  display: none !important;
}

.toc-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.toc-link {
  display: flex;
  align-items: center;
  padding: 8px 10px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.88rem;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
  line-height: 1.35;
}

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

.toc-link.active {
  background: var(--primary-subtle);
  color: var(--primary);
  font-weight: 600;
}

.toc-num {
  font-size: 0.75rem;
  font-weight: 700;
  min-width: 22px;
  color: var(--text-dim);
}

.toc-link.active .toc-num {
  color: var(--primary);
}

/* Main Legal Article */
.legal-article {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(22px, 3.2vw, 38px);
  box-shadow: var(--card-shadow);
}

.legal-section {
  scroll-margin-top: 100px;
  margin-bottom: 36px;
  padding-bottom: 30px;
  border-bottom: 1px solid var(--border-light);
  transition: opacity 0.2s ease;
}

.legal-section:last-of-type {
  margin-bottom: 0;
  padding-bottom: 80px;
  border-bottom: none;
}

.legal-section.hidden-by-search {
  display: none !important;
}

.section-header-wrap {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.section-title {
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--text);
  line-height: 1.3;
}

.copy-anchor-btn {
  background: transparent;
  border: none;
  color: var(--text-dim);
  padding: 6px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.section-header-wrap:hover .copy-anchor-btn,
.copy-anchor-btn:focus-visible {
  opacity: 1;
}

.copy-anchor-btn:hover {
  color: var(--primary);
  background: var(--primary-subtle);
}

/* Structured Info Grid */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin: 20px 0;
}

.info-card {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

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

.info-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.info-card-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.info-card-title {
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--text);
}

.info-card-desc {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin: 0 !important;
}

/* Service Providers Grid with Colored Logos */
.provider-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin: 22px 0 28px;
}

.provider-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.provider-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-focus);
  box-shadow: var(--card-shadow);
}

.provider-logo-wrap {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.provider-logo-wrap svg {
  width: 24px;
  height: 24px;
}

.provider-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.provider-name {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text);
}

.provider-role {
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.45;
}

/* Structured Checklist Items */
.check-list {
  list-style: none !important;
  margin: 18px 0 !important;
  padding: 0 !important;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.check-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.94rem;
  color: var(--text);
  line-height: 1.5;
}

.check-icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.check-icon svg {
  width: 12px;
  height: 12px;
  stroke-width: 3;
}

.rule-icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.rule-icon svg {
  width: 12px;
  height: 12px;
  stroke-width: 2.5;
}

.section-subtitle {
  font-size: 1.08rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--text);
  margin-top: 24px;
  margin-bottom: 8px;
}

.legal-article p {
  color: var(--text);
  opacity: 0.9;
  margin-bottom: 16px;
  font-size: 0.98rem;
}

.legal-article p:last-child {
  margin-bottom: 0;
}

.legal-article ul {
  margin: 14px 0 20px 20px;
  color: var(--text);
  opacity: 0.9;
  font-size: 0.98rem;
}

.legal-article li {
  margin-bottom: 8px;
  line-height: 1.6;
}

.legal-article strong {
  color: var(--text);
  font-weight: 600;
}

/* Callout Notice */
.legal-callout {
  background: var(--primary-subtle);
  border: 1px solid var(--primary-border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin: 16px 0;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.callout-icon {
  flex-shrink: 0;
  width: 17px;
  height: 17px;
  color: var(--primary);
  margin-top: 2px;
}

.callout-text {
  font-size: 0.88rem;
  color: var(--primary-text);
  line-height: 1.5;
}

.callout-text strong {
  color: var(--text);
}

/* Hub Cards Grid (for index.html) */
.hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 28px;
  margin: 40px 0 80px;
}

.hub-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 36px 32px;
  box-shadow: var(--card-shadow);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-decoration: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.hub-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--accent-gradient);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.hub-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-focus);
  box-shadow: var(--card-shadow-lg);
}

.hub-card:hover::before {
  opacity: 1;
}

.hub-card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--primary-subtle);
  color: var(--primary);
  display: grid;
  place-items: center;
  margin-bottom: 20px;
}

.hub-card-title {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
  letter-spacing: -0.02em;
}

.hub-card-desc {
  font-size: 0.96rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 24px;
  flex-grow: 1;
}

.hub-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 18px;
  border-top: 1px solid var(--border-light);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--primary);
}

.hub-card-arrow {
  transition: transform 0.2s ease;
}

.hub-card:hover .hub-card-arrow {
  transform: translateX(4px);
}

/* Document Switcher Bar removed as requested */
.doc-switcher {
  display: none !important;
}

/* Mobile Quick Section Selector */
.mobile-toc-bar {
  display: none;
  position: sticky;
  top: var(--nav-height);
  z-index: 40;
  background-color: rgba(248, 250, 252, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  padding: 8px 16px;
  margin-bottom: 20px;
  box-shadow: 0 4px 12px -2px rgba(15, 23, 42, 0.05);
  transition: background-color 0.25s ease, border-color 0.25s ease;
}

[data-theme="dark"] .mobile-toc-bar {
  background-color: rgba(9, 13, 22, 0.88);
  box-shadow: 0 4px 12px -2px rgba(0, 0, 0, 0.4);
}

.mobile-toc-select {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 8px 36px 8px 16px;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text);
  font-family: inherit;
  outline: none;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236366f1' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}

.mobile-toc-select:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

/* Footer */
.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--border);
  background-color: var(--surface);
  padding: 36px 0;
  color: var(--text-muted);
  font-size: 0.88rem;
  transition: background-color 0.25s ease, border-color 0.25s ease;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 18px;
}

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

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

/* Toast notification */
.toast-notice {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--text);
  color: var(--surface);
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: var(--card-shadow-lg);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: all 0.25s ease;
  z-index: 100;
}

.toast-notice.show {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive Media Queries */
@media (max-width: 900px) {
  :root {
    --nav-height: 64px;
  }

  .legal-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .toc-sidebar {
    display: none;
  }

  .mobile-toc-bar {
    display: block;
  }

  .hero-section {
    padding: 36px 0 18px;
  }

  .legal-article {
    border-radius: var(--radius-lg);
    padding: 24px 20px;
  }
}

@media (max-width: 680px) {
  :root {
    --nav-height: 58px;
  }

  .shell {
    padding-left: 16px;
    padding-right: 16px;
  }

  .site-header {
    padding-top: env(safe-area-inset-top, 0px);
  }

  .nav-container {
    height: var(--nav-height);
    gap: 10px;
  }

  .brand-link {
    gap: 8px;
    font-size: 1.05rem;
  }

  .brand-badge {
    width: 32px;
    height: 32px;
    font-size: 0.95rem;
    border-radius: 8px;
  }

  .brand-tag {
    display: none !important;
  }

  .nav-links {
    padding: 2.5px;
    gap: 2px;
  }

  .nav-link {
    padding: 5px 12px;
    font-size: 0.82rem;
    line-height: 1.25;
  }

  .nav-text-full {
    display: none !important;
  }

  .nav-text-short {
    display: inline !important;
  }

  .nav-actions {
    gap: 6px;
  }

  .theme-toggle-btn {
    width: 34px;
    height: 34px;
    border-radius: 8px;
  }

  .theme-toggle-btn svg {
    width: 16px;
    height: 16px;
  }

  .theme-toggle-btn:active,
  .nav-link:active {
    transform: scale(0.93);
  }

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

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

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

  .hero-desc {
    font-size: 1rem;
    margin-bottom: 18px;
  }

  .hero-meta {
    gap: 8px;
  }

  .meta-item {
    padding: 4px 10px;
    font-size: 0.78rem;
  }

  .search-container {
    margin-top: 16px;
  }
}

@media (max-width: 360px) {
  .brand-name {
    display: none; /* Show branded icon 'A' only for ultra-narrow screens */
  }

  .nav-link {
    padding: 5px 9px;
    font-size: 0.78rem;
  }
}

/* Print Stylesheet */
@media print {
  .site-header, .toc-sidebar, .mobile-toc-bar, .site-footer, .search-container, .theme-toggle-btn, .doc-switcher, .copy-anchor-btn {
    display: none !important;
  }

  body {
    background: #ffffff !important;
    color: #000000 !important;
  }

  .legal-article {
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
  }

  .legal-section {
    page-break-inside: avoid;
  }
}
