:root {
  --bg-color: #000000;
  --hero-bg: linear-gradient(180deg, #5c632e 0%, #000000 100%); /* Olive gradient from screenshot */
  --accent-rgb: 255 69 58;
  --accent-color: rgb(var(--accent-rgb));
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.6);
  --card-bg: #1c1c1e;
  --pill-bg: rgba(255, 255, 255, 0.1);
  --font-main: -apple-system, "BlinkMacSystemFont", "Segoe UI", "Roboto", "Helvetica", "Arial", sans-serif;
}

body.theme-home {
  --accent-rgb: 255 69 58; /* red */
}

body.theme-app {
  --accent-rgb: 88 166 255; /* blue */
}

body.theme-support {
  --accent-rgb: 48 209 88; /* green */
}

body.theme-journal {
  --accent-rgb: 175 82 222; /* purple */
}

body.theme-trademark {
  --accent-rgb: 255 159 67; /* orange/gold */
}

body.theme-privacy {
  --accent-rgb: 142 142 147; /* grey */
}

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

body {
  background-color: var(--bg-color);
  font-family: var(--font-main);
  color: var(--text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden; /* Prevent horizontal scroll from any overflow */
}

/* Nav */
nav.pill-nav {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  display: flex;
  background: rgba(28, 28, 30, 0.5);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 6px;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

nav.pill-nav a {
  color: var(--text-secondary);
  text-decoration: none;
  padding: 8px 20px;
  border-radius: 24px;
  font-size: 0.85rem;
  font-weight: 500;
  transition: none;
}

nav.pill-nav a.active, nav.pill-nav a:hover {
  background-color: rgba(255, 255, 255, 0.15);
  color: var(--text-primary);
}

/* Hero */
.hero {
  height: 80vh;
  width: 100%;
  background: var(--hero-bg);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 0 10%;
  position: relative;
}

.hero-content {
  max-width: 600px;
}

.hero-label {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 10px;
  opacity: 0.8;
}

.hero h1 {
  font-size: 4rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 20px;
  letter-spacing: -2px;
}

.hero p {
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-bottom: 30px;
}

.hero-logo {
  width: 140px;
  margin-bottom: 20px;
  filter: drop-shadow(0 30px 25px rgba(0, 0, 0, 0.25));
}

/* Main Content */
main {
  padding: 60px 10%;
  background: #000;
}

main section {
  margin-bottom: 40px;
}

main section h2 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 20px;
}

main section p {
  margin-bottom: 15px;
  color: var(--text-secondary);
}

main section ul {
  margin-bottom: 15px;
  padding-left: 20px;
}

main section li {
  margin-bottom: 10px;
  color: var(--text-secondary);
}

h2 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 20px;
}

/* Code Blocks */
pre {
  background-color: #000;
  padding: 24px;
  border-radius: 16px;
  overflow-x: auto;
  font-family: ui-monospace, SFMono-Regular, monospace;
  font-size: 0.85rem;
  margin: 15px 0;
  border: none;
  white-space: pre-wrap;
  word-break: break-word;
}

code {
  color: #ff7b72;
}



/* Tables */
.table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 15px;
  border: none;
}

.table th,
.table td {
  padding: 14px 16px;
  text-align: left;
  vertical-align: top;
  border: none;
}

.table thead th {
  border-top: none;
  color: var(--text-primary);
  font-size: 0.85rem;
  letter-spacing: 0.3px;
  background: rgba(255, 255, 255, 0.04);
}

.table tbody td {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* Links & Buttons */
.btn-primary {
  display: inline-block;
  color: var(--text-primary);
  text-decoration: none;
  padding: 8px 16px;
  font-weight: 500;
  font-size: 0.9rem;
  transition: none;
  border-bottom: 1px solid var(--text-secondary);
}

.btn-primary:hover {
  border-bottom: 1px solid var(--text-primary);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 8px 12px;
  font-weight: 500;
  font-size: 0.85rem;
  transition: none;
  border-bottom: 1px solid transparent;
}

.btn-secondary:hover {
  color: var(--text-primary);
  border-bottom: 1px solid var(--text-secondary);
}

.card-actions {
  margin-top: 14px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.link-list li {
  list-style: none;
  margin-bottom: 15px;
}

.link-list a {
  display: flex;
  align-items: center;
  background-color: rgba(255, 255, 255, 0.05);
  padding: 16px 20px;
  border-radius: 16px;
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 600;
  transition: none;
}

.link-list a:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

/* Inline links inside card copy */
.inline-link {
  color: var(--accent-color);
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.35);
  text-underline-offset: 3px;
}

.inline-link:hover {
  text-decoration-color: rgba(255, 255, 255, 0.7);
}

footer {
  padding: 60px 10%;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* Utility Classes */
.subtext {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-top: 10px;
}

.card-subtext {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-top: 10px;
}

.card-span-2 {
  grid-column: span 2;
}

.grid-2-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.text-small {
  font-size: 0.75rem;
}

.text-small-margin-top {
  font-size: 0.75rem;
  margin-top: 5px;
}

.section-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(2, 1fr);
  max-width: 800px;
}



.content-centered {
  position: relative;
  text-align: center;
  padding-top: 100px;
}

.doodle-positioned {
  position: absolute;
  bottom: 50px;
  right: 50px;
  width: 150px;
}

.hero-blue {
  background: linear-gradient(180deg, #2e4a63 0%, #000000 100%);
}

.hero-purple {
  background: linear-gradient(180deg, #632e52 0%, #000000 100%);
}

.hero-teal {
  background: linear-gradient(180deg, #2e635b 0%, #000000 100%);
}

.hero-orange {
  background: linear-gradient(180deg, #63522e 0%, #000000 100%);
}

.hero-cyan {
  background: linear-gradient(180deg, #3a3a3c 0%, #000000 100%);
}

.link-disabled {
  opacity: 0.6;
  cursor: default;
}

/* Mobile Navigation Toggle */
.nav-links-container {
  display: flex;
  gap: 0;
}

.mobile-menu-toggle {
  display: none; /* Hidden on desktop by default */
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
  margin-left: 10px;
}

.dots-icon {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  width: 18px;
  height: 18px;
}

.dots-icon span {
  position: absolute;
  width: 18px;
  height: 1.5px;
  background-color: var(--text-secondary);
  transition: none;
  left: 0;
}

.dots-icon span:nth-child(1) { top: 4px; }
.dots-icon span:nth-child(2) { top: 8px; }
.dots-icon span:nth-child(3) { top: 12px; }

.mobile-menu-toggle:hover .dots-icon span {
  background-color: var(--text-primary);
}

.mobile-menu-toggle.active .dots-icon span:nth-child(1) {
  top: 8px;
  transform: rotate(45deg);
}

.mobile-menu-toggle.active .dots-icon span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.active .dots-icon span:nth-child(3) {
  top: 8px;
  transform: rotate(-45deg);
}

@media (max-width: 768px) {
  .hero h1 { font-size: 2.5rem; }
  .hero { padding: 0 5%; height: auto; min-height: 50vh; padding-top: 100px; padding-bottom: 40px; }
  main { padding: 30px 5%; }

  /* Adjust sections for mobile */
  main section {
    margin-bottom: 25px;
  }

  main section h2 {
    font-size: 1.4rem;
  }

  main section ul {
    padding-left: 15px;
  }

  /* Stack table columns on mobile */
  .table {
    min-width: auto;
    width: 100%;
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .table thead {
    display: none;
  }

  .table tbody {
    display: block;
    width: 100%;
  }

  .table tr {
    display: block;
    margin-bottom: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.02);
  }

  .table td {
    display: flex;
    flex-direction: column;
    text-align: left;
    padding: 6px 0;
    border: none;
    position: relative;
    white-space: normal;
    font-size: 0.85rem;
  }

  .table td::before {
    content: attr(data-label);
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.7rem;
    text-transform: uppercase;
    margin-bottom: 4px;
  }

  .table td code {
    font-size: 0.75rem;
    word-break: break-all;
  }

  /* Adjust code blocks for mobile */
  pre {
    padding: 12px;
    font-size: 0.7rem;
    overflow-x: auto;
  }

  /* Adjust footer for mobile */
  footer {
    padding: 30px 5%;
  }

  /* Adjust link lists for mobile */
  .link-list a {
    padding: 12px 16px;
  }

  /* Adjust hero content for mobile */
  .hero-content {
    max-width: 100%;
  }

  /* Adjust buttons for mobile */
  .btn-primary {
    padding: 6px 12px;
    font-size: 0.85rem;
  }

  .btn-secondary {
    padding: 6px 10px;
    font-size: 0.8rem;
  }

  /* Mobile Navigation */
  nav.pill-nav {
    position: fixed;
    width: auto;
    max-width: none;
    justify-content: flex-end;
    padding: 0;
    background: none;
    border: none;
    top: 20px;
    right: 20px;
    left: auto;
    transform: none;
  }

  /* Hide the desktop links container on mobile */
  .nav-links-container {
    position: absolute;
    top: 100%;
    right: 0;
    background: rgba(28, 28, 30, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 10px 20px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
    min-width: 150px;
    z-index: 1001;
    width: max-content;
    display: none;
    pointer-events: auto;
  }

  .nav-links-container.active {
    display: flex;
  }

  .nav-links-container a {
    padding: 10px 15px;
    text-align: center;
    border-radius: 12px;
    font-size: 1rem;
  }

  .mobile-menu-toggle {
    display: flex !important;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #333333 0%, #1a1a1a 100%) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: none !important;
    border-radius: 12px;
    width: 44px;
    height: 44px;
    padding: 0;
    margin: 0;
    z-index: 1002;
    cursor: pointer;
    pointer-events: auto;
    position: relative;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  }

  .section-grid {
    grid-template-columns: 1fr !important;
    max-width: 100% !important;
  }

  .section-grid.max-2 {
    grid-template-columns: 1fr !important;
  }

  .section-grid.max-2 section {
    grid-column: span 1;
  }
}

  main section h2 {
    font-size: 1.5rem;
  }

  main section ul {
    padding-left: 15px;
  }

  /* Stack table columns on mobile */
  .table {
    min-width: auto;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .table thead {
    display: none; /* Hide table headers on mobile */
  }

  .table tr {
    display: block;
    margin-bottom: 20px;
    border: none;
    border-radius: 12px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.04);
  }

  .table td {
    display: block;
    text-align: left;
    padding: 8px 0;
    border: none;
    position: relative;
    padding-left: 100px;
    white-space: normal;
    font-size: 0.85rem;
  }

  .table td::before {
    content: attr(data-label);
    position: absolute;
    left: 0;
    width: 90px;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.75rem;
    text-transform: uppercase;
  }

  .table td code {
    font-size: 0.8rem;
  }

  /* Adjust code blocks for mobile */
  pre {
    padding: 16px;
    font-size: 0.75rem;
  }

  /* Adjust footer for mobile */
  footer {
    padding: 40px 5%;
  }

  /* Adjust link lists for mobile */
  .link-list a {
    padding: 12px 16px;
  }

  /* Adjust hero content for mobile */
  .hero-content {
    max-width: 100%;
  }

  /* Adjust hero height for mobile */
  .hero {
    height: 60vh;
  }

  /* Adjust buttons for mobile */
  .btn-primary {
    padding: 6px 12px;
    font-size: 0.85rem;
  }

  .btn-secondary {
    padding: 6px 10px;
    font-size: 0.8rem;
  }

  /* Mobile Navigation */
  nav.pill-nav {
    position: fixed;
    width: auto;
    max-width: none;
    justify-content: flex-end;
    padding: 0;
    background: none;
    border: none;
    top: 20px;
    right: 20px;
    left: auto;
    transform: none;
  }

  /* Hide the desktop links container on mobile */
  .nav-links-container {
    position: absolute;
    top: 100%;
    right: 0;
    background: rgba(28, 28, 30, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 10px 20px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
    min-width: 150px;
    z-index: 1001;
    width: max-content;
    display: none;
    pointer-events: auto;
  }

  .nav-links-container.active {
    display: flex;
  }

  .nav-links-container a {
    padding: 10px 15px;
    text-align: center;
    border-radius: 12px;
    font-size: 1rem;
  }

  .mobile-menu-toggle {
    display: flex !important;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #333333 0%, #1a1a1a 100%) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: none !important;
    border-radius: 12px;
    width: 44px;
    height: 44px;
    padding: 0;
    margin: 0;
    z-index: 1002;
    cursor: pointer;
    pointer-events: auto;
    position: relative;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  }

  .section-grid {
    grid-template-columns: 1fr;
    max-width: 100%;
  }
