/* ==========================================================================
   Pocket Log — Official Website & Documentation Stylesheet
   Theme: Modern Emerald / Mint (Material 3 Inspired)
   ========================================================================== */

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

  /* Color Palette — Light Mode */
  --bg: #f8fafc;
  --bg-subtle: #f1f5f9;
  --surface: #ffffff;
  --surface-hover: #f8fafc;
  --surface-subtle: #f1f5f9;
  --surface-glass: rgba(255, 255, 255, 0.85);
  --border: #e2e8f0;
  --border-focus: #10b981;
  --text: #0f172a;
  --text-muted: #64748b;
  --text-subtle: #94a3b8;

  /* Primary Accent: Emerald */
  --primary: #059669;
  --primary-hover: #047857;
  --primary-active: #064e3b;
  --primary-light: #ecfdf5;
  --primary-border: #a7f3d0;
  --primary-ring: rgba(16, 185, 129, 0.25);

  /* Secondary Accents */
  --accent-gold: #f59e0b;
  --accent-blue: #0284c7;
  --accent-purple: #7c3aed;
  --accent-rose: #e11d48;

  /* Badges & Highlights */
  --badge-bg: #d1fae5;
  --badge-text: #065f46;
  --badge-blue-bg: #e0f2fe;
  --badge-blue-text: #0369a1;

  /* Shadows */
  --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.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
  --shadow-glow: 0 0 25px rgba(16, 185, 129, 0.25);

  /* Radii */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s ease;
}

[data-theme="dark"] {
  /* Color Palette — Dark Mode */
  --bg: #090d16;
  --bg-subtle: #0f172a;
  --surface: #111827;
  --surface-hover: #1e293b;
  --surface-subtle: #1e293b;
  --surface-glass: rgba(17, 24, 39, 0.88);
  --border: #1f293d;
  --border-focus: #34d399;
  --text: #f8fafc;
  --text-muted: #94a3b8;
  --text-subtle: #64748b;

  --primary: #10b981;
  --primary-hover: #34d399;
  --primary-active: #6ee7b7;
  --primary-light: rgba(16, 185, 129, 0.14);
  --primary-border: rgba(16, 185, 129, 0.3);
  --primary-ring: rgba(52, 211, 153, 0.3);

  --badge-bg: rgba(16, 185, 129, 0.2);
  --badge-text: #6ee7b7;
  --badge-blue-bg: rgba(2, 132, 199, 0.2);
  --badge-blue-text: #7dd3fc;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -2px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -4px rgba(0, 0, 0, 0.4);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 30px rgba(16, 185, 129, 0.2);
}

/* ==========================================================================
   Base & Reset
   ========================================================================== */

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color var(--transition-normal), color var(--transition-normal);
  overflow-x: hidden;
  overflow-wrap: break-word;
}

/* Scroll progress bar */
#progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, #10b981, #059669, #34d399);
  z-index: 1000;
  transition: width 0.1s linear;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--primary-hover);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  padding: 0.15rem 0.4rem;
  border-radius: var(--radius-sm);
  color: var(--primary);
  word-break: break-word;
  overflow-wrap: break-word;
}

/* ==========================================================================
   Layout & Container
   ========================================================================== */

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.container-narrow {
  max-width: 900px;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */

header.site-header {
  position: sticky;
  top: 0;
  background: var(--surface-glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
  transition: background-color var(--transition-normal), border-color var(--transition-normal);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text);
}

.brand-logo-img {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(16, 185, 129, 0.25);
  object-fit: cover;
}

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

.brand-text span {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
}

.nav-links a {
  font-size: 0.925rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color var(--transition-fast);
  padding: 0.5rem 0.25rem;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.btn-icon {
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  color: var(--text);
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.1rem;
  transition: all var(--transition-fast);
}

.btn-icon:hover {
  background: var(--border);
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
}

/* ==========================================================================
   Buttons & Badges
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.75rem 1.4rem;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  border: none;
}

.btn-primary {
  background: var(--primary);
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(16, 185, 129, 0.4);
}

.btn-secondary {
  background: var(--surface);
  color: var(--text) !important;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  background: var(--surface-hover);
  border-color: var(--text-muted);
  transform: translateY(-1px);
}

.btn-sm {
  padding: 0.45rem 0.9rem;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
}

/* Google Play Badge Button */
.btn-playstore {
  background: #000000;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-align: left;
}

[data-theme="dark"] .btn-playstore {
  background: #111827;
  border: 1px solid var(--border);
}

.btn-playstore:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
  border-color: var(--primary);
}

.playstore-icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.playstore-text {
  display: flex;
  flex-direction: column;
}

.playstore-sub {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.85;
  line-height: 1;
}

.playstore-main {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

/* Badges */
.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--badge-bg);
  color: var(--badge-text);
  margin-bottom: 1.25rem;
}

.badge-blue {
  background: var(--badge-blue-bg);
  color: var(--badge-blue-text);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */

.hero {
  padding: 4.5rem 0 3.5rem;
  position: relative;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 3.5rem;
  align-items: center;
}

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

.hero-title {
  font-size: clamp(2.25rem, 4.5vw, 3.5rem);
  font-weight: 900;
  letter-spacing: -0.035em;
  line-height: 1.15;
  margin-bottom: 1.25rem;
  color: var(--text);
}

.hero-title .gradient-text {
  background: linear-gradient(135deg, var(--primary), #10b981, #0284c7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 2rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2.25rem;
}

.hero-features-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.2rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.chip-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.chip-item span.icon {
  color: var(--primary);
  font-weight: bold;
}

/* Hero Mockup Preview */
.hero-visual {
  display: flex;
  justify-content: center;
  position: relative;
}

.phone-mockup-wrapper {
  position: relative;
  max-width: 320px;
  width: 100%;
}

.phone-mockup {
  position: relative;
  border-radius: 36px;
  padding: 10px;
  background: #1e293b;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35), var(--shadow-glow);
  border: 4px solid #334155;
  overflow: hidden;
}

[data-theme="dark"] .phone-mockup {
  border-color: #475569;
  background: #0f172a;
}

.phone-screen {
  border-radius: 28px;
  overflow: hidden;
  background: #000000;
}

.phone-screen img {
  width: 100%;
  height: auto;
  display: block;
}

.floating-badge {
  position: absolute;
  bottom: 20px;
  left: -20px;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 0.65rem 1rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  animation: float 4s ease-in-out infinite;
}

.floating-badge-icon {
  font-size: 1.5rem;
}

.floating-badge-text strong {
  display: block;
  font-size: 0.85rem;
  color: var(--text);
}

.floating-badge-text span {
  font-size: 0.75rem;
  color: var(--text-muted);
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-8px); }
}

/* ==========================================================================
   Highlight Stats Bar
   ========================================================================== */

.stats-bar {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 2rem 0;
  margin: 2rem 0 4rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  text-align: center;
}

.stat-item h3 {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.02em;
}

.stat-item p {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* ==========================================================================
   Section Headers
   ========================================================================== */

.section {
  padding: 4.5rem 0;
}

.section-head {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 3.5rem;
}

.section-subtitle {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.section-title {
  font-size: clamp(1.85rem, 3vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--text);
  margin-bottom: 0.85rem;
}

.section-desc {
  font-size: 1.05rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Feature Cards Grid
   ========================================================================== */

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 1.75rem;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

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

.feature-card.highlight {
  border: 2px solid var(--primary);
  background: linear-gradient(180deg, var(--surface) 0%, var(--primary-light) 100%);
}

.feature-badge {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  background: var(--primary);
  color: #ffffff;
}

.feature-icon-wrap {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin-bottom: 1.25rem;
}

.feature-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
  margin-bottom: 0.6rem;
}

.feature-card p {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 1.25rem;
  flex-grow: 1;
}

.feature-card ul {
  list-style: none;
  font-size: 0.88rem;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.feature-card li::before {
  content: "✓ ";
  color: var(--primary);
  font-weight: bold;
}

/* ==========================================================================
   Debt & Loan Highlight Banner / Deep Dive
   ========================================================================== */

.feature-highlight-banner {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 3rem;
  margin: 4rem 0;
  box-shadow: var(--shadow-md);
}

.highlight-banner-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 3rem;
  align-items: center;
}

.highlight-banner-text h3 {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
  color: var(--text);
}

.debt-demo-card {
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.debt-demo-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.debt-person {
  font-weight: 700;
  font-size: 1.05rem;
}

.debt-badge-borrow {
  font-size: 0.75rem;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  background: rgba(225, 29, 72, 0.15);
  color: var(--accent-rose);
  font-weight: 700;
}

.debt-stats-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.5rem;
  margin-bottom: 1rem;
  text-align: center;
}

.debt-stat-col span {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
}

.debt-stat-col strong {
  font-size: 0.95rem;
  color: var(--text);
}

.debt-progress-bar-wrap {
  background: var(--border);
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.debt-progress-bar-fill {
  background: var(--primary);
  height: 100%;
  width: 40%;
}

.debt-progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Screenshots Carousel / Showcase
   ========================================================================== */

.showcase-slider-wrap {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  padding: 1.5rem 0.5rem 2.5rem;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.showcase-slider-wrap::-webkit-scrollbar {
  height: 8px;
}

.showcase-slider-wrap::-webkit-scrollbar-track {
  background: var(--surface-subtle);
  border-radius: 4px;
}

.showcase-slider-wrap::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

.showcase-slider-wrap::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

.screenshot-card {
  flex: 0 0 260px;
  scroll-snap-align: start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 0.75rem;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-normal);
  text-align: center;
}

.screenshot-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
  border-color: var(--primary);
}

.screenshot-img-wrap {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #000000;
  margin-bottom: 0.75rem;
}

.screenshot-img-wrap img {
  width: 100%;
  height: auto;
  display: block;
}

.screenshot-card h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.screenshot-card p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Comparison Table (Pocket Log vs Cloud Apps)
   ========================================================================== */

.comparison-table-wrap {
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  margin-top: 2rem;
}

table.comparison-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

table.comparison-table th,
table.comparison-table td {
  padding: 1.15rem 1.5rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
}

table.comparison-table th {
  background: var(--surface-subtle);
  font-weight: 700;
  color: var(--text);
}

table.comparison-table th.highlight-col {
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 800;
}

table.comparison-table td.highlight-col {
  background: rgba(16, 185, 129, 0.04);
  font-weight: 600;
  color: var(--primary);
}

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

/* ==========================================================================
   FAQ Accordions
   ========================================================================== */

.faq-container {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 1rem;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: border-color var(--transition-fast);
}

.faq-item:hover {
  border-color: var(--primary-border);
}

.faq-item.open {
  border-color: var(--primary);
}

.faq-question {
  width: 100%;
  padding: 1.25rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: none;
  border: none;
  text-align: left;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.faq-question:hover {
  background: var(--surface-subtle);
}

.faq-icon {
  font-size: 1.2rem;
  color: var(--text-muted);
  transition: transform var(--transition-normal);
  flex-shrink: 0;
  margin-left: 1rem;
}

.faq-item.open .faq-icon {
  transform: rotate(180deg);
  color: var(--primary);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1), padding 0.2s ease;
  padding: 0 1.5rem;
  background: var(--surface-subtle);
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.65;
}

.faq-item.open .faq-answer {
  padding: 1.25rem 1.5rem;
  max-height: 400px;
}

.faq-answer p {
  margin-bottom: 0.75rem;
}

.faq-answer p:last-child {
  margin-bottom: 0;
}

/* ==========================================================================
   Developer & Support Card
   ========================================================================== */

.developer-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 3rem;
  box-shadow: var(--shadow-md);
  text-align: center;
  max-width: 760px;
  margin: 0 auto;
}

.developer-avatar {
  width: 100px;
  height: 100px;
  border-radius: var(--radius-full);
  background: var(--primary-light);
  border: 3px solid var(--primary);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.8rem;
  margin: 0 auto 1.5rem;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.25);
}

.developer-name {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.developer-role {
  font-size: 0.95rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 1.25rem;
}

.developer-bio {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 540px;
  margin: 0 auto 2rem;
  line-height: 1.6;
}

.social-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.social-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface-subtle);
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 600;
  transition: all var(--transition-fast);
}

.social-btn:hover {
  background: var(--border);
  color: var(--primary);
  transform: translateY(-2px);
}

/* ==========================================================================
   Documentation / Policy Pages Layout
   ========================================================================== */

.policy-hero {
  padding: 3.5rem 0 2rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.policy-hero-title {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-bottom: 0.75rem;
}

.policy-hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 720px;
  margin-bottom: 1.5rem;
}

.meta-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.5rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

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

.policy-layout {
  display: grid;
  grid-template-columns: 270px 1fr;
  gap: 3.5rem;
  padding: 3rem 0 5rem;
  align-items: start;
}

aside.policy-sidebar {
  position: sticky;
  top: 92px;
  max-height: calc(100vh - 110px);
  overflow-y: auto;
  padding-right: 0.5rem;
}

aside.policy-sidebar::-webkit-scrollbar {
  width: 4px;
}

aside.policy-sidebar::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

.sidebar-search {
  margin-bottom: 1.25rem;
  position: relative;
}

.sidebar-search input {
  width: 100%;
  padding: 0.55rem 0.75rem 0.55rem 2.2rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--text);
  font-size: 0.85rem;
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.sidebar-search input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--primary-ring);
}

.sidebar-search .search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-subtle);
  pointer-events: none;
  font-size: 0.85rem;
}

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

.toc-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.toc-list a {
  display: block;
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: all var(--transition-fast);
  line-height: 1.4;
}

.toc-list a:hover {
  color: var(--text);
  background: var(--surface-subtle);
}

.toc-list a.active {
  color: var(--primary);
  background: var(--primary-light);
  font-weight: 600;
  border-left: 3px solid var(--primary);
  padding-left: 0.6rem;
}

/* Policy Main Content */
main.policy-body {
  min-width: 0;
}

.policy-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2.25rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-sm);
  scroll-margin-top: 96px;
}

.policy-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.section-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.section-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 0.9rem;
  font-weight: 800;
  border-radius: var(--radius-sm);
}

.policy-section-header h2 {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.015em;
  color: var(--text);
}

.copy-anchor {
  color: var(--text-subtle);
  background: none;
  border: none;
  font-size: 1.1rem;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity var(--transition-fast), color var(--transition-fast);
}

.copy-anchor:hover {
  opacity: 1;
  color: var(--primary);
}

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

.policy-section p:last-child {
  margin-bottom: 0;
}

.policy-section ul,
.policy-section ol {
  margin: 0.75rem 0 1.25rem 1.5rem;
  color: var(--text);
}

.policy-section li {
  margin-bottom: 0.5rem;
}

.policy-section strong {
  color: var(--text);
  font-weight: 600;
}

/* Callout Boxes */
.callout {
  border-left: 4px solid var(--primary);
  background: var(--primary-light);
  padding: 1.1rem 1.35rem;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin: 1.35rem 0;
}

.callout p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text);
}

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

.callout-warning {
  border-left-color: var(--accent-gold);
  background: rgba(245, 158, 11, 0.12);
}

.callout-warning strong {
  color: #b45309;
}

/* Tables */
.table-wrap {
  overflow-x: auto;
  margin: 1.25rem 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

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

table.policy-table th,
table.policy-table td {
  padding: 0.85rem 1.1rem;
  border-bottom: 1px solid var(--border);
}

table.policy-table th {
  background: var(--surface-subtle);
  font-weight: 700;
  color: var(--text);
}

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

/* Step-by-step Cards (Deletion page) */
.step-card {
  border: 1px solid var(--border);
  background: var(--surface-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
}

.step-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.step-badge {
  background: var(--primary);
  color: #ffffff;
  font-weight: 800;
  font-size: 0.85rem;
  width: 26px;
  height: 26px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

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

/* ==========================================================================
   Footer
   ========================================================================== */

footer.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 4rem 0 2.5rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 3rem;
  margin-bottom: 3.5rem;
}

.footer-brand p {
  margin-top: 0.75rem;
  font-size: 0.925rem;
  max-width: 320px;
  line-height: 1.6;
}

.footer-col h4 {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text);
  margin-bottom: 1.1rem;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.footer-col a {
  color: var(--text-muted);
  transition: color var(--transition-fast);
}

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

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
}

.footer-bottom-links {
  display: flex;
  gap: 1.5rem;
}

/* ==========================================================================
   Toast Notification & Back to Top
   ========================================================================== */

#toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--text);
  color: var(--bg);
  padding: 0.75rem 1.4rem;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: var(--shadow-xl);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1000;
}

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

#back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background: var(--primary);
  color: #ffffff;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: all var(--transition-fast);
  z-index: 99;
}

#back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

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

/* ==========================================================================
   Responsive Queries & Mobile Optimization
   Breakpoints:
   - Tablet / Medium Screen: <= 1024px
   - Mobile Landscape / Tablet Portrait: <= 768px
   - Standard Mobile Phones: <= 480px
   - Compact / Small Mobile Phones: <= 360px
   ========================================================================== */

/* Tablet & Medium Screens (<= 1024px) */
@media (max-width: 1024px) {
  .hero-grid {
    gap: 2.5rem;
  }

  .features-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
  }

  .highlight-banner-grid {
    gap: 2rem;
  }

  .policy-layout {
    gap: 2.5rem;
  }
}

/* Tablet Portrait & Large Phones (<= 960px) */
@media (max-width: 960px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2.75rem;
  }

  .hero-content {
    max-width: 100%;
    margin: 0 auto;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-features-chips {
    justify-content: center;
  }

  .highlight-banner-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .policy-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 2rem 0 4rem;
  }

  aside.policy-sidebar {
    position: static;
    max-height: none;
    background: var(--surface);
    padding: 1.25rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
  }

  .toc-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
    font-size: 0.85rem;
    color: var(--text);
    padding: 0.25rem 0;
  }

  .toc-title::after {
    content: "▾";
    font-size: 0.9rem;
    color: var(--text-muted);
    transition: transform var(--transition-fast);
  }

  aside.policy-sidebar.collapsed .toc-title::after {
    transform: rotate(-90deg);
  }

  aside.policy-sidebar.collapsed .toc-list,
  aside.policy-sidebar.collapsed .sidebar-search {
    display: none;
  }
}

/* Mobile Screens (<= 768px) */
@media (max-width: 768px) {
  .container {
    padding: 0 1.25rem;
  }

  .header-inner {
    height: 64px;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .nav-links {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--surface-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 1rem 1.25rem;
    gap: 0.35rem;
    display: none;
    max-height: calc(100vh - 64px);
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    z-index: 999;
  }

  .nav-links.open {
    display: flex;
    animation: menuSlideDown 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  }

  .nav-links li {
    width: 100%;
  }

  .nav-links a {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
  }

  .nav-links a:hover,
  .nav-links a.active {
    background: var(--primary-light);
    color: var(--primary);
  }

  /* Hero Section */
  .hero {
    padding: 2.75rem 0 2rem;
  }

  .hero-title {
    font-size: clamp(2rem, 7vw, 2.75rem);
    line-height: 1.15;
  }

  .hero-subtitle {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1.75rem;
  }

  .phone-mockup-wrapper {
    max-width: min(280px, 80vw);
    margin: 0 auto;
  }

  .floating-badge {
    position: relative;
    bottom: auto;
    left: auto;
    margin: 1.25rem auto 0;
    max-width: 290px;
    animation: none;
    box-shadow: var(--shadow-md);
  }

  /* Stats Bar */
  .stats-bar {
    padding: 1.5rem 0;
    margin: 1.5rem 0 2.5rem;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem 0.75rem;
  }

  .stat-item h3 {
    font-size: 1.65rem;
  }

  .stat-item p {
    font-size: 0.8rem;
  }

  /* Section Spacing */
  .section {
    padding: 3.25rem 0;
  }

  .section-head {
    margin-bottom: 2.25rem;
  }

  .section-title {
    font-size: clamp(1.6rem, 5vw, 2.1rem);
  }

  .section-desc {
    font-size: 0.95rem;
  }

  /* Features Grid */
  .features-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .feature-card {
    padding: 1.5rem 1.25rem;
    border-radius: var(--radius-lg);
  }

  /* Debt Banner */
  .feature-highlight-banner {
    padding: 1.75rem 1.25rem;
    margin: 2.5rem 0;
    border-radius: var(--radius-lg);
  }

  .highlight-banner-text h3 {
    font-size: 1.45rem;
  }

  .debt-demo-card {
    padding: 1.25rem 1rem;
    border-radius: var(--radius-md);
  }

  /* Screenshots Carousel */
  .showcase-slider-wrap {
    padding: 0.75rem 0.25rem 1.75rem;
    gap: 1rem;
    scroll-padding-left: 0.5rem;
  }

  .screenshot-card {
    flex: 0 0 220px;
    border-radius: var(--radius-lg);
    padding: 0.5rem;
  }

  /* Comparison Table */
  .comparison-table-wrap {
    border-radius: var(--radius-lg);
    margin-top: 1.5rem;
    -webkit-overflow-scrolling: touch;
  }

  table.comparison-table th,
  table.comparison-table td {
    padding: 0.85rem 1rem;
    font-size: 0.88rem;
    white-space: nowrap;
  }

  /* FAQ Accordion */
  .faq-question {
    padding: 1.1rem 1.25rem;
    font-size: 0.98rem;
  }

  .faq-answer {
    font-size: 0.9rem;
    line-height: 1.6;
  }

  .faq-item.open .faq-answer {
    padding: 1rem 1.25rem;
    max-height: 600px;
  }

  /* Developer Card */
  .developer-card {
    padding: 2.25rem 1.25rem;
    border-radius: var(--radius-lg);
  }

  .developer-avatar {
    width: 80px;
    height: 80px;
    font-size: 2.2rem;
  }

  .developer-name {
    font-size: 1.5rem;
  }

  .developer-role {
    font-size: 0.9rem;
  }

  .developer-bio {
    font-size: 0.92rem;
  }

  .social-links {
    gap: 0.65rem;
  }

  .social-btn {
    padding: 0.55rem 0.9rem;
    font-size: 0.84rem;
  }

  /* Footer */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 2.5rem;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }

  .footer-bottom-links {
    justify-content: center;
    gap: 1.25rem;
  }

  /* Policy Sections */
  .policy-section {
    padding: 1.5rem 1.25rem;
    border-radius: var(--radius-lg);
    margin-bottom: 1.5rem;
    scroll-margin-top: 80px;
  }

  .policy-section-header h2 {
    font-size: 1.2rem;
  }
}

/* Standard Mobile Devices (<= 480px) */
@media (max-width: 480px) {
  .container {
    padding: 0 1rem;
  }

  /* Header Branding */
  .brand-logo-img {
    width: 36px;
    height: 36px;
    border-radius: 8px;
  }

  .brand-text h1 {
    font-size: 1.12rem;
  }

  .brand-text span {
    display: none;
  }

  .header-actions {
    gap: 0.45rem;
  }

  .btn-icon {
    width: 38px;
    height: 38px;
    font-size: 1rem;
  }

  /* Hero & Buttons */
  .badge-pill {
    font-size: 0.72rem;
    padding: 0.3rem 0.65rem;
    margin-bottom: 1rem;
  }

  .hero-title {
    font-size: 1.95rem;
    letter-spacing: -0.03em;
  }

  .hero-subtitle {
    font-size: 0.925rem;
    line-height: 1.55;
  }

  .hero-actions {
    flex-direction: column;
    width: 100%;
    gap: 0.75rem;
  }

  .hero-actions .btn,
  .hero-actions .btn-playstore {
    width: 100%;
    max-width: 100%;
    justify-content: center;
    padding: 0.75rem 1rem;
  }

  .playstore-main {
    font-size: 1rem;
  }

  .hero-features-chips {
    gap: 0.4rem 0.75rem;
    font-size: 0.78rem;
  }

  /* Mockup Visual */
  .phone-mockup-wrapper {
    max-width: 250px;
  }

  .phone-mockup {
    border-radius: 30px;
    padding: 8px;
    border-width: 3px;
  }

  .phone-screen {
    border-radius: 22px;
  }

  .floating-badge {
    padding: 0.55rem 0.85rem;
    max-width: 260px;
    gap: 0.6rem;
  }

  .floating-badge-icon {
    font-size: 1.25rem;
  }

  .floating-badge-text strong {
    font-size: 0.8rem;
  }

  .floating-badge-text span {
    font-size: 0.7rem;
  }

  /* Stats */
  .stat-item h3 {
    font-size: 1.45rem;
  }

  .stat-item p {
    font-size: 0.75rem;
  }

  /* Feature Cards */
  .feature-card {
    padding: 1.35rem 1rem;
  }

  .feature-badge {
    top: 1rem;
    right: 1rem;
    font-size: 0.68rem;
    padding: 0.15rem 0.5rem;
  }

  .feature-icon-wrap {
    width: 44px;
    height: 44px;
    font-size: 1.35rem;
    margin-bottom: 0.85rem;
  }

  .feature-card h3 {
    font-size: 1.1rem;
  }

  .feature-card p {
    font-size: 0.88rem;
  }

  /* Debt Banner Demo */
  .debt-stats-row {
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0.25rem;
  }

  .debt-stat-col span {
    font-size: 0.65rem;
  }

  .debt-stat-col strong {
    font-size: 0.82rem;
  }

  /* Screenshot Cards */
  .screenshot-card {
    flex: 0 0 195px;
  }

  /* Developer Social Buttons */
  .social-btn {
    flex: 1 1 calc(50% - 0.4rem);
    justify-content: center;
    font-size: 0.8rem;
    padding: 0.55rem 0.6rem;
  }

  /* Policy Document */
  .policy-hero {
    padding: 2.25rem 0 1.5rem;
  }

  .policy-hero-title {
    font-size: 1.75rem;
  }

  .policy-hero-subtitle {
    font-size: 0.925rem;
  }

  .meta-bar {
    gap: 0.75rem 1rem;
    font-size: 0.8rem;
  }

  .policy-section {
    padding: 1.25rem 0.95rem;
  }

  .policy-section-header {
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
  }

  .policy-section-header h2 {
    font-size: 1.1rem;
  }

  .section-num {
    width: 26px;
    height: 26px;
    font-size: 0.78rem;
  }

  .policy-section p,
  .policy-section li {
    font-size: 0.9rem;
    line-height: 1.6;
  }

  .callout {
    padding: 0.85rem 1rem;
    margin: 1rem 0;
    font-size: 0.88rem;
  }

  .step-card {
    padding: 1.1rem 0.85rem;
  }

  .step-card-title {
    font-size: 0.98rem;
  }

  .table-wrap {
    margin: 1rem 0;
  }

  table.policy-table th,
  table.policy-table td {
    padding: 0.65rem 0.75rem;
    font-size: 0.8rem;
  }

  /* Floating UI Elements */
  #back-to-top {
    bottom: 1.25rem;
    right: 1.25rem;
    width: 38px;
    height: 38px;
    font-size: 1.05rem;
  }

  #toast {
    bottom: 1.25rem;
    right: 1rem;
    left: 1rem;
    font-size: 0.85rem;
    text-align: center;
  }
}

/* Compact / Ultra-Small Phones (<= 360px) */
@media (max-width: 360px) {
  .container {
    padding: 0 0.75rem;
  }

  .brand-text h1 {
    font-size: 1.02rem;
  }

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

  .phone-mockup-wrapper {
    max-width: 220px;
  }

  .floating-badge {
    max-width: 220px;
  }

  .stat-item h3 {
    font-size: 1.3rem;
  }

  .debt-stats-row {
    grid-template-columns: 1fr;
    text-align: left;
    gap: 0.4rem;
  }

  .social-btn {
    flex: 1 1 100%;
  }
}

/* Safe Area Inset Support (iPhone Notch & Dynamic Island) */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  footer.site-footer {
    padding-bottom: calc(2.5rem + env(safe-area-inset-bottom));
  }
  #back-to-top {
    bottom: calc(1.25rem + env(safe-area-inset-bottom));
  }
  #toast {
    bottom: calc(1.25rem + env(safe-area-inset-bottom));
  }
}

@keyframes menuSlideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================================
   Print Stylesheet
   ========================================================================== */

@media print {
  body {
    background: #ffffff;
    color: #000000;
    font-size: 11pt;
  }

  #progress-bar,
  header.site-header,
  aside.policy-sidebar,
  .header-actions,
  .copy-anchor,
  .faq-icon,
  #toast,
  #back-to-top,
  footer.site-footer {
    display: none !important;
  }

  .policy-layout {
    display: block;
    padding: 0;
  }

  .policy-section {
    border: none;
    box-shadow: none;
    padding: 1rem 0;
    page-break-inside: avoid;
  }

  .faq-answer {
    max-height: none !important;
    display: block !important;
    padding: 0.5rem 0 !important;
    background: none !important;
  }
}
