:root {
  /* Warm Parchment / Book Paper Palette */
  --bg-primary: #f5f0e6;         /* Authentic warm aged book paper */
  --bg-surface: #fbf8f2;         /* Fresh book page cream */
  --bg-elevated: #ede6d8;        /* Textured parchment / book margin */
  --bg-subtle: #f0e9dc;          /* Soft paper header/toolbar */
  --border-color: #dfd5c4;       /* Deckled book edge border */
  --border-focus: #8b5a2b;       /* Bookbinder warm amber brown */
  
  --text-primary: #2c2724;       /* Traditional printing press ink */
  --text-secondary: #5c554e;     /* Muted vintage ink */
  --text-muted: #8c8278;         /* Subtle pencil graphite */
  
  --accent: #8b5a2b;             /* Warm leather & amber */
  --accent-light: #eedfcb;       /* Creamy amber tint */
  --accent-hover: #70441d;       /* Deep vintage wood / leather */
  --accent-gradient: linear-gradient(135deg, #44372c 0%, #6e5544 100%);
  
  --success: #3f6e4d;            /* Botanical olive green */
  --danger: #b33939;             /* Classic wax seal red */
  --danger-light: #fae8e8;
  --danger-hover: #962828;

  --shadow-sm: 0 1px 3px rgba(60, 50, 40, 0.05);
  --shadow-md: 0 4px 10px -2px rgba(60, 50, 40, 0.07), 0 2px 4px -2px rgba(60, 50, 40, 0.04);
  --shadow-lg: 0 12px 24px -4px rgba(60, 50, 40, 0.09), 0 4px 6px -2px rgba(60, 50, 40, 0.05);
  --shadow-xl: 0 20px 30px -6px rgba(60, 50, 40, 0.12);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 18px;
  
  --font-serif: 'Lora', 'Crimson Pro', Georgia, serif;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
  /* Midnight Study / Antique Dark Oak Library */
  --bg-primary: #181513;
  --bg-surface: #221e1b;
  --bg-elevated: #2d2824;
  --bg-subtle: #1c1816;
  --border-color: #38312b;
  --border-focus: #cda274;

  --text-primary: #f2ece2;
  --text-secondary: #bdb2a4;
  --text-muted: #857b6f;

  --accent: #cda274;
  --accent-light: rgba(205, 162, 116, 0.15);
  --accent-hover: #e0b88d;
  --accent-gradient: linear-gradient(135deg, #cda274 0%, #faedcd 100%);

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 10px -2px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 12px 24px -4px rgba(0, 0, 0, 0.45);
  --shadow-xl: 0 20px 30px -6px rgba(0, 0, 0, 0.55);
}

html {
  scroll-behavior: smooth;
}

[id] {
  scroll-margin-top: 24px;
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  /* Subtle tactile paper texture effect using soft SVG noise overlay */
  background-image: radial-gradient(#dfd5c4 0.75px, transparent 0.75px), radial-gradient(#dfd5c4 0.75px, var(--bg-primary) 0.75px);
  background-size: 30px 30px;
  background-position: 0 0, 15px 15px;
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background-color 0.3s ease, color 0.3s ease;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

[data-theme="dark"] body {
  background-image: radial-gradient(#2d2824 0.75px, transparent 0.75px), radial-gradient(#2d2824 0.75px, var(--bg-primary) 0.75px);
}

.app-shell {
  max-width: 1040px;
  width: 100%;
  margin: 0 auto;
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  gap: 24px;
}

/* Header */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 18px;
  border-bottom: 1.5px dashed var(--border-color);
  gap: 16px;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

.logo-icon {
  width: 40px !important;
  height: 40px !important;
  max-width: 40px !important;
  max-height: 40px !important;
  min-width: 40px !important;
  min-height: 40px !important;
  background: var(--bg-surface);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden !important;
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
  padding: 0;
}

.logo-icon img,
.logo-img {
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: cover !important;
  display: block !important;
}

.logo-title {
  font-family: var(--font-serif);
  font-size: 1.65rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.1;
  color: var(--text-primary);
}

.logo-title .highlight {
  color: var(--accent);
  font-style: italic;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.nav-link {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--text-primary);
  background: var(--bg-surface);
}

.nav-link.active {
  color: var(--accent);
  background: var(--bg-surface);
  font-weight: 600;
  border: 1px solid var(--border-color);
}

@media (max-width: 720px) {
  .header-nav {
    display: none;
  }
}

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border-color);
  background: var(--bg-surface);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}

.icon-btn:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
  border-color: var(--border-focus);
}

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

/* Main Container */
.main-container {
  display: flex;
  flex-direction: column;
  gap: 22px;
  flex: 1;
}

/* Primary Metric Cards Grid */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

@media (max-width: 860px) {
  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
}

/* Phone-only compact optimization */
@media (max-width: 600px) {
  .app-shell {
    padding: 16px 14px;
    gap: 16px;
  }

  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .metric-card {
    padding: 10px 12px !important;
    border-radius: var(--radius-sm) !important;
    gap: 2px !important;
  }

  .metric-label {
    font-size: 0.64rem !important;
    letter-spacing: 0.05em !important;
  }

  .metric-value {
    font-size: 1.45rem !important;
    line-height: 1.15 !important;
  }

  .metric-hint {
    font-size: 0.68rem !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .textarea-container {
    padding: 14px 16px !important;
  }

  textarea {
    min-height: 220px !important;
    font-size: 1.02rem !important;
    line-height: 1.7 !important;
  }

  .editor-toolbar {
    padding: 8px 12px !important;
  }

  .tool-btn {
    padding: 5px 9px !important;
    font-size: 0.74rem !important;
  }

  .insight-card {
    padding: 14px 16px !important;
  }
}

.metric-card {
  background: var(--bg-surface);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  position: relative;
}

.metric-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent);
}

.metric-card.primary {
  background: var(--bg-surface);
  border-left: 3.5px solid var(--accent);
}

.metric-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.metric-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
}

.metric-value {
  font-family: var(--font-serif);
  font-size: 2.35rem;
  font-weight: 600;
  line-height: 1.1;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

.metric-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Editor Section - Book / Manuscript Feel */
.editor-section {
  background: var(--bg-surface);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.editor-section:focus-within {
  border-color: var(--border-focus);
  box-shadow: var(--shadow-lg), 0 0 0 3px var(--accent-light);
}

/* Editor Toolbar */
.editor-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 18px;
  background: var(--bg-subtle);
  border-bottom: 1.5px solid var(--border-color);
  flex-wrap: wrap;
  gap: 8px;
}

.toolbar-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.tool-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  font-family: var(--font-sans);
  color: var(--text-secondary);
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  user-select: none;
}

.tool-btn:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
  border-color: var(--border-focus);
}

.tool-btn.text-danger {
  color: var(--danger);
  border-color: transparent;
  background: transparent;
}

.tool-btn.text-danger:hover {
  background: var(--danger-light);
  color: var(--danger-hover);
}

/* Dropdown */
.dropdown-wrapper {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  background: var(--bg-surface);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
  padding: 6px;
  min-width: 150px;
  display: none;
  flex-direction: column;
  z-index: 50;
  animation: dropdownFade 0.15s ease;
}

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

.dropdown-menu.show {
  display: flex;
}

.dropdown-item {
  padding: 8px 12px;
  font-size: 0.825rem;
  font-weight: 500;
  font-family: var(--font-sans);
  text-align: left;
  background: none;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  cursor: pointer;
  transition: var(--transition);
}

.dropdown-item:hover {
  background: var(--accent-light);
  color: var(--accent);
}

/* Textarea - Classic Typeset Reading Feel */
.textarea-container {
  padding: 24px 28px;
  background-color: var(--bg-surface);
}

textarea {
  width: 100%;
  min-height: 320px;
  border: none;
  outline: none;
  background: transparent;
  color: var(--text-primary);
  font-family: var(--font-serif);
  font-size: 1.18rem;
  line-height: 1.85;
  letter-spacing: 0.01em;
  resize: vertical;
}

textarea::placeholder {
  color: var(--text-muted);
  font-style: italic;
  font-family: var(--font-serif);
  opacity: 0.75;
}

/* Editor Footer */
.editor-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  background: var(--bg-subtle);
  border-top: 1.5px solid var(--border-color);
  font-size: 0.825rem;
  flex-wrap: wrap;
  gap: 10px;
}

.footer-stats {
  display: flex;
  align-items: center;
  gap: 24px;
  color: var(--text-secondary);
}

.time-stat {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.825rem;
}

.time-stat svg {
  color: var(--accent);
}

/* Detailed Insights Grid */
.insights-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 768px) {
  .insights-grid {
    grid-template-columns: 1fr;
  }
}

.insight-card {
  background: var(--bg-surface);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: var(--shadow-sm);
}

.insight-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.insight-header h3 {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
}

.flesch-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 10px;
  background: var(--accent-light);
  color: var(--accent);
  border-radius: 9999px;
  border: 1px solid var(--border-color);
}

.progress-bar-track {
  width: 100%;
  height: 6px;
  background: var(--bg-elevated);
  border-radius: 9999px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 9999px;
  transition: width 0.4s ease;
}

.insight-desc p {
  font-family: var(--font-serif);
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Keywords Chips */
.keywords-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 64px;
  align-items: flex-start;
}

.empty-keywords {
  font-size: 0.85rem;
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--text-muted);
}

.keyword-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  border-radius: 9999px;
  padding: 4px 12px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-primary);
  transition: var(--transition);
}

.keyword-chip:hover {
  border-color: var(--accent);
  background: var(--accent-light);
  color: var(--accent);
}

.keyword-count {
  font-size: 0.7rem;
  font-weight: 700;
  background: rgba(60, 50, 40, 0.08);
  padding: 1px 6px;
  border-radius: 9999px;
}

[data-theme="dark"] .keyword-count {
  background: rgba(255, 255, 255, 0.12);
}

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--text-primary);
  color: var(--bg-surface);
  padding: 10px 22px;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: var(--shadow-xl);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.25s ease;
  z-index: 1000;
  border: 1px solid var(--border-color);
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* Features Summary Grid */
.features-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 10px;
}

@media (max-width: 768px) {
  .features-summary {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

.feature-box {
  background: var(--bg-surface);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

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

.feature-icon {
  font-size: 1.5rem;
  line-height: 1;
  margin-bottom: 4px;
}

.feature-box h4 {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
}

.feature-box p {
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--text-secondary);
}

/* Frequently Asked Questions (FAQ) Section */
.faq-section {
  background: var(--bg-surface);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-top: 12px;
}

@media (max-width: 600px) {
  .faq-section {
    padding: 24px 18px;
    gap: 18px;
  }
}

.faq-header {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-bottom: 1.5px dashed var(--border-color);
  padding-bottom: 18px;
}

.faq-badge {
  display: inline-block;
  align-self: flex-start;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  background: var(--accent-light);
  padding: 4px 10px;
  border-radius: 999px;
}

.faq-title {
  font-family: var(--font-serif);
  font-size: clamp(1.4rem, 3vw, 1.85rem);
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.25;
}

.faq-subtitle {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--transition);
}

.faq-item[open] {
  background: var(--bg-surface);
  border-color: var(--border-focus);
  box-shadow: var(--shadow-sm);
}

.faq-question {
  padding: 16px 20px;
  font-family: var(--font-serif);
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  user-select: none;
  list-style: none;
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-icon {
  font-size: 1.1rem;
  color: var(--accent);
  transition: transform 0.25s ease;
  flex-shrink: 0;
}

.faq-item[open] .faq-icon {
  transform: rotate(180deg);
}

.faq-answer {
  padding: 0 20px 18px 20px;
  font-size: 0.93rem;
  line-height: 1.68;
  color: var(--text-secondary);
  border-top: 1px dashed var(--border-color);
  padding-top: 14px;
}

.faq-answer strong {
  color: var(--text-primary);
}

.faq-answer code {
  background: var(--bg-elevated);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  font-size: 0.85em;
  color: var(--text-primary);
}

/* Legal & Policy Articles */
.legal-article {
  background: var(--bg-surface);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 40px 36px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 28px;
  margin: 16px 0;
}

@media (max-width: 600px) {
  .legal-article {
    padding: 24px 18px;
    gap: 20px;
  }
}

.legal-header {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-bottom: 1.5px dashed var(--border-color);
  padding-bottom: 20px;
}

.legal-badge {
  display: inline-block;
  align-self: flex-start;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  background: var(--accent-light);
  padding: 4px 10px;
  border-radius: 999px;
}

.legal-title {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.legal-updated {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.legal-intro-box {
  background: var(--bg-subtle);
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 16px 20px;
  font-size: 0.98rem;
  line-height: 1.6;
  color: var(--text-primary);
}

.legal-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.legal-section h2 {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
}

.legal-section p {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text-secondary);
}

.legal-section ul {
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.legal-section li {
  font-size: 0.93rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

.legal-section a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.legal-section code {
  background: var(--bg-elevated);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  font-size: 0.85em;
  color: var(--text-primary);
}

/* Polished App Footer */
.app-footer {
  margin-top: auto;
  padding-top: 32px;
  border-top: 1.5px dashed var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.footer-about-section {
  background: var(--bg-surface);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-about-title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}

.footer-about-text {
  font-size: 0.93rem;
  line-height: 1.7;
  color: var(--text-secondary);
}

.footer-about-text strong {
  color: var(--text-primary);
  font-weight: 600;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  gap: 36px;
  flex-wrap: wrap;
}

.footer-brand-col {
  max-width: 380px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

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

.footer-logo-img {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
}

.footer-logo-text {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-primary);
}

.footer-logo-text .highlight {
  color: var(--accent);
  font-style: italic;
}

.footer-desc {
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

.footer-links-grid {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-heading {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-primary);
}

.footer-menu {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-menu a {
  font-size: 0.88rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition);
}

.footer-menu a:hover {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
  font-size: 0.82rem;
  color: var(--text-muted);
}

.footer-subtext {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* Skeleton Loading Screen */
.skeleton-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: var(--bg-primary);
  z-index: 9999;
  display: flex;
  justify-content: center;
  pointer-events: none;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.skeleton-screen.loaded {
  opacity: 0;
  visibility: hidden;
}

.skeleton-shell {
  max-width: 1040px;
  width: 100%;
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.skeleton-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 18px;
  border-bottom: 1.5px dashed var(--border-color);
}

.skeleton-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

@media (max-width: 860px) {
  .skeleton-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.skeleton-card {
  height: 105px;
  background: var(--bg-surface);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  position: relative;
  overflow: hidden;
}

.skeleton-editor {
  height: 380px;
  background: var(--bg-surface);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
}

.skeleton-box {
  background: var(--bg-elevated);
  position: relative;
  overflow: hidden;
}

.skeleton-card::after,
.skeleton-editor::after,
.skeleton-box::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  transform: translateX(-100%);
  background-image: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0,
    rgba(255, 255, 255, 0.4) 30%,
    rgba(255, 255, 255, 0.7) 50%,
    rgba(255, 255, 255, 0.4) 70%,
    rgba(255, 255, 255, 0)
  );
  animation: shimmer 1.5s infinite;
}

[data-theme="dark"] .skeleton-card::after,
[data-theme="dark"] .skeleton-editor::after,
[data-theme="dark"] .skeleton-box::after {
  background-image: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0,
    rgba(255, 255, 255, 0.05) 30%,
    rgba(255, 255, 255, 0.1) 50%,
    rgba(255, 255, 255, 0.05) 70%,
    rgba(255, 255, 255, 0)
  );
}

@keyframes shimmer {
  100% {
    transform: translateX(100%);
  }
}
