:root {
  --navy: #082A68;
  --blue: #2563EB;
  --blue-hover: #1D4ED8;
  --bg-canvas: #F7F8FC;
  --bg-card: #FFFFFF;
  --text-primary: #111827;
  --text-secondary: #64748B;
  --border: #D9E2F2;
  --badge-bg: rgba(37, 99, 235, 0.1);
  --badge-color: #2563EB;
  --headline-color: #082A68;
  --btn-bg: #082A68;
  --btn-hover: #0C3683;
  --btn-text: #FFFFFF;
  --font-heading: 'Bricolage Grotesque', sans-serif;
  --font-body: 'Figtree', sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --navy: #082A68;
    --blue: #3B82F6;
    --blue-hover: #60A5FA;
    --bg-canvas: #0B1220;
    --bg-card: #111827;
    --text-primary: #F9FAFB;
    --text-secondary: #9CA3AF;
    --border: #1F2937;
    --badge-bg: rgba(59, 130, 246, 0.15);
    --badge-color: #60A5FA;
    --headline-color: #F9FAFB;
    --btn-bg: #2563EB;
    --btn-hover: #1D4ED8;
    --btn-text: #FFFFFF;
  }
}

*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  text-align: center;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

main {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 680px;
  flex: 1;
  padding: 80px 48px;
}

@media (max-width: 640px) {
  main {
    padding: 40px 24px;
  }
}

.logo {
  height: 56px;
  width: auto;
  max-width: 220px;
  object-fit: contain;
  margin-bottom: 32px;
}

h1 {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 6vw, 3.5rem);
  font-weight: 700;
  color: var(--headline-color);
  margin: 0 0 16px 0;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.subheadline {
  font-size: clamp(1rem, 2vw, 1.25rem);
  font-weight: 400;
  color: var(--text-secondary);
  max-width: 540px;
  margin: 0 0 24px 0;
  line-height: 1.5;
}

.badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 9999px;
  background: var(--badge-bg);
  color: var(--badge-color);
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 32px;
  letter-spacing: 0.01em;
}

#notify-form {
  display: flex;
  gap: 12px;
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
}

@media (max-width: 640px) {
  #notify-form {
    flex-direction: column;
  }
}

input[type="email"] {
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.875rem;
  flex: 1;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input[type="email"]::placeholder {
  color: var(--text-secondary);
  opacity: 0.7;
}

input[type="email"]:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px var(--badge-bg);
}

button[type="submit"] {
  padding: 12px 24px;
  border-radius: 12px;
  background-color: var(--btn-bg);
  color: var(--btn-text);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.875rem;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.2s ease, transform 0.1s ease;
}

button[type="submit"]:hover {
  background-color: var(--btn-hover);
}

button[type="submit"]:active {
  transform: scale(0.98);
}

.confirmation {
  font-size: 0.95rem;
  font-weight: 600;
  color: #16A34A;
  margin-top: 16px;
  padding: 12px 20px;
  background: rgba(22, 163, 74, 0.1);
  border-radius: 12px;
  border: 1px solid rgba(22, 163, 74, 0.2);
}

@media (prefers-color-scheme: dark) {
  .confirmation {
    color: #4ADE80;
    background: rgba(74, 222, 128, 0.15);
    border-color: rgba(74, 222, 128, 0.25);
  }
}

footer {
  padding: 24px;
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 400;
  text-align: center;
  width: 100%;
  border-top: 1px solid var(--border);
  background: var(--bg-card);
}

/* ============================================================
   LEGAL PAGES & EXTENDED NAVIGATION STYLES
   ============================================================ */

body.legal-page {
  text-align: left;
  align-items: stretch;
  justify-content: flex-start;
}

/* Legal Header & Nav */
.legal-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  width: 100%;
  background-color: rgba(247, 248, 252, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

@media (prefers-color-scheme: dark) {
  .legal-nav {
    background-color: rgba(11, 18, 32, 0.92);
  }
}

.legal-nav-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.nav-brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.nav-logo {
  height: 32px;
  width: auto;
  max-width: 140px;
  object-fit: contain;
}

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

.nav-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.15s ease;
  padding: 4px 0;
}

.nav-link:hover {
  color: var(--blue);
}

.nav-link.active {
  color: var(--blue);
  font-weight: 600;
}

/* Legal Content Container */
.legal-main {
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  padding: 48px 24px 80px 24px;
  flex: 1;
}

@media (max-width: 640px) {
  .legal-main {
    padding: 32px 16px 60px 16px;
  }
  .legal-nav-inner {
    padding: 12px 16px;
  }
  .nav-links {
    gap: 12px;
  }
}

.legal-header {
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.legal-header h1 {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 700;
  color: var(--headline-color);
  margin: 12px 0 10px 0;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.legal-meta {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Callout & Notice Boxes */
.notice-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 4px solid var(--blue);
  border-radius: 12px;
  padding: 16px 20px;
  margin: 24px 0;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--text-primary);
}

.notice-box.warning {
  border-left-color: #F59E0B;
  background: rgba(245, 158, 11, 0.05);
}

.notice-box.success {
  border-left-color: #10B981;
  background: rgba(16, 185, 129, 0.05);
}

.notice-box strong {
  color: var(--headline-color);
}

/* Table of Contents */
.toc-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 24px;
  margin: 28px 0 36px 0;
}

.toc-title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--headline-color);
  margin: 0 0 12px 0;
}

.toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 8px 16px;
}

.toc-list li a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.15s ease;
  display: block;
  line-height: 1.4;
}

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

/* Typography in Legal Content */
.legal-content section {
  margin-bottom: 40px;
  scroll-margin-top: 80px;
}

.legal-content h2 {
  font-family: var(--font-heading);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--headline-color);
  margin: 0 0 16px 0;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  line-height: 1.3;
}

.legal-content h3 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--headline-color);
  margin: 24px 0 10px 0;
  line-height: 1.35;
}

.legal-content p {
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--text-primary);
  margin: 0 0 14px 0;
}

.legal-content ul, .legal-content ol {
  margin: 0 0 16px 0;
  padding-left: 24px;
}

.legal-content li {
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.legal-content strong {
  color: var(--headline-color);
  font-weight: 600;
}

.legal-content a {
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.legal-content a:hover {
  color: var(--blue-hover);
}

/* Feature Cards & Highlights */
.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  margin: 18px 0;
}

.feature-card h4 {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--headline-color);
  margin: 0 0 8px 0;
}

.feature-card p:last-child {
  margin-bottom: 0;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
  margin: 20px 0;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-card);
}

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

table.legal-table th, table.legal-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

table.legal-table th {
  background: var(--badge-bg);
  color: var(--headline-color);
  font-weight: 600;
  font-family: var(--font-heading);
}

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

/* Footer Links & Layout */
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

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

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

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

.footer-sep {
  color: var(--border);
  font-size: 0.75rem;
}
