/**
 * Markdown Viewer & Toolkit — Main CSS Design System
 * Clean, modern, accessible typography and theming.
 */

:root {
  /* Color Palette — Amber Workshop (Light Mode Default) */
  --bg-page: #fbf9f5;
  --bg-surface: #ffffff;
  --bg-surface-alt: #f5f1ea;
  --bg-surface-hover: #ece5da;
  
  --text-main: #231f1d;
  --text-muted: #574f4a;
  --text-subtle: #8a7f77;
  --text-inverse: #ffffff;

  --border-light: #e8e2d7;
  --border-medium: #d8cebf;
  --border-focus: #c25e1a;

  --brand-primary: #c25e1a;          /* Refined copper / burnished amber */
  --brand-primary-hover: #a84e12;
  --brand-primary-active: #8f400c;
  --brand-accent: #d97736;
  --brand-accent-subtle: rgba(194, 94, 26, 0.09);
  --brand-accent-glow: rgba(194, 94, 26, 0.22);

  --color-success: #15803d;
  --color-danger: #b91c1c;
  --color-warning: #b45309;

  --code-bg: #f4efe7;
  --code-border: #e6decfe0;

  /* Typography */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  
  /* Sizing & Radius */
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 3px rgba(35, 31, 29, 0.05);
  --shadow-md: 0 2px 8px -1px rgba(35, 31, 29, 0.08), 0 1px 3px -1px rgba(35, 31, 29, 0.04);
  --shadow-lg: 0 10px 25px -4px rgba(35, 31, 29, 0.12), 0 4px 10px -2px rgba(35, 31, 29, 0.06);
  --transition: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --container-max: 1360px;
}

[data-theme="dark"] {
  /* Color Palette — Amber Workshop (Dark Mode) */
  --bg-page: #161412;
  --bg-surface: #1f1b18;
  --bg-surface-alt: #27221d;
  --bg-surface-hover: #332d26;
  
  --text-main: #f5f0e8;
  --text-muted: #c6bcaf;
  --text-subtle: #94887b;
  --text-inverse: #161412;

  --border-light: #352e26;
  --border-medium: #473e34;
  --border-focus: #e07a38;

  --brand-primary: #e07a38;          /* Glowing warm amber */
  --brand-primary-hover: #eb8b4d;
  --brand-primary-active: #f29c63;
  --brand-accent: #f29c63;
  --brand-accent-subtle: rgba(224, 122, 56, 0.14);
  --brand-accent-glow: rgba(224, 122, 56, 0.28);

  --code-bg: #27221d;
  --code-border: #383027;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 12px 28px rgba(0, 0, 0, 0.6);
}

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

html {
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.5;
  color: var(--text-main);
  background-color: var(--bg-page);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body.site-body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--text-main);
  background-color: var(--bg-page);
}

/* Header Styles */
.site-header {
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: var(--shadow-sm);
}

.header-container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0.625rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  position: relative;
}

.header-brand-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  flex-shrink: 0;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--text-main);
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: -0.015em;
  transition: opacity var(--transition);
  flex-shrink: 0;
  white-space: nowrap;
}

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

.brand-icon {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--brand-primary), #94400e);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 4px var(--brand-accent-glow);
}

.header-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  background-color: var(--bg-surface-alt);
  color: var(--text-muted);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-left: 0.5rem;
  padding-left: 0.75rem;
  border-left: 1px solid var(--border-light);
  flex-wrap: nowrap;
  flex-shrink: 0;
}

.nav-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.55rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  white-space: nowrap;
  flex-shrink: 0;
}

.nav-item span {
  white-space: nowrap;
}

.nav-item:hover {
  color: var(--text-main);
  background-color: var(--bg-surface-alt);
}

.nav-item.active {
  color: var(--brand-primary);
  background-color: var(--brand-accent-subtle);
  font-weight: 600;
}

/* Desktop Navigation & Tools Dropdown Responsiveness:
 * Breakpoint at 1200px based on actual width needed for 7 tool links + brand + actions.
 * Desktop (>1200px): All 7 links visible, Tools dropdown button strictly hidden.
 * Intermediate & Mobile (<=1200px): 7 links hidden, Tools dropdown button visible.
 */
.mobile-tools-btn,
.btn.mobile-tools-btn {
  display: none !important;
}

.mobile-tools-menu {
  display: none;
}

.mobile-menu-backdrop {
  display: none;
}

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

  .mobile-tools-btn,
  .btn.mobile-tools-btn {
    display: inline-flex !important;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.65rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-main);
    background-color: var(--bg-surface-alt);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-sm);
    cursor: pointer;
    flex-shrink: 0;
    white-space: nowrap;
    transition: all var(--transition);
  }

  .mobile-tools-btn:hover {
    background-color: var(--bg-surface-hover);
    border-color: var(--text-muted);
  }

  .mobile-tools-btn .chevron-icon {
    transition: transform var(--transition);
  }

  .mobile-tools-btn[aria-expanded="true"] {
    background-color: var(--bg-surface-hover);
    border-color: var(--brand-primary);
    color: var(--brand-primary);
  }

  .mobile-tools-btn[aria-expanded="true"] .chevron-icon {
    transform: rotate(180deg);
  }

  .mobile-menu-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(2px);
    z-index: 998;
    transition: opacity var(--transition);
  }

  .mobile-menu-backdrop[hidden] {
    display: none !important;
  }

  .mobile-tools-menu {
    display: block;
    position: absolute;
    top: calc(100% + 6px);
    right: 1.25rem;
    width: min(340px, calc(100vw - 2.5rem));
    background-color: var(--bg-surface);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 999;
    overflow: hidden;
  }

  .mobile-tools-menu[hidden] {
    display: none !important;
  }

  .mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.65rem 0.875rem;
    background-color: var(--bg-surface-alt);
    border-bottom: 1px solid var(--border-light);
  }

  .mobile-menu-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-subtle);
  }

  .btn-close-menu {
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
  }

  .btn-close-menu:hover {
    color: var(--text-main);
    background-color: var(--bg-surface-hover);
  }

  .mobile-tools-list {
    display: flex;
    flex-direction: column;
    padding: 0.35rem 0;
  }

  .mobile-tool-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.875rem;
    text-decoration: none;
    color: var(--text-main);
    transition: background-color var(--transition);
    border-left: 3px solid transparent;
    min-height: 48px; /* Touch target >= 44px */
  }

  .mobile-tool-item:hover,
  .mobile-tool-item:focus {
    background-color: var(--bg-surface-alt);
    outline: none;
  }

  .mobile-tool-item.active {
    background-color: var(--brand-accent-subtle);
    color: var(--brand-primary);
    border-left-color: var(--brand-primary);
    font-weight: 600;
  }

  .mobile-tool-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    background-color: var(--bg-surface-alt);
    color: var(--text-muted);
    flex-shrink: 0;
  }

  .mobile-tool-item.active .mobile-tool-icon {
    background-color: var(--brand-primary);
    color: #ffffff;
  }

  .mobile-tool-info {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
  }

  .mobile-tool-name {
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.3;
  }

  .mobile-tool-desc {
    font-size: 0.75rem;
    color: var(--text-subtle);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
  }

  .mobile-active-tag {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.15rem 0.4rem;
    background-color: var(--brand-primary);
    color: #ffffff;
    border-radius: var(--radius-sm);
  }

  body.mobile-menu-open {
    overflow: hidden;
  }
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  flex-shrink: 0;
}

.privacy-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.25rem 0.625rem;
  background-color: rgba(22, 163, 74, 0.08);
  color: var(--color-success);
  border: 1px solid rgba(22, 163, 74, 0.2);
  border-radius: var(--radius-sm);
}

/* Theme Toggle Button */
.theme-toggle {
  background: var(--bg-surface-alt);
  border: 1px solid var(--border-light);
  color: var(--text-main);
  cursor: pointer;
  padding: 0.4rem;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  min-width: 34px;
  min-height: 34px;
  transition: background var(--transition), border-color var(--transition);
}

.theme-toggle:hover {
  background: var(--bg-surface-hover);
  border-color: var(--border-medium);
}

.theme-icon-light, .theme-icon-dark {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Compact Mobile Header Tuning (<= 480px down to 320px) */
@media (max-width: 480px) {
  .header-container {
    padding: 0.5rem 0.75rem;
    gap: 0.5rem;
  }

  .brand-title {
    font-size: 1rem;
  }

  .header-actions {
    gap: 0.375rem;
  }

  .mobile-tools-btn,
  .btn.mobile-tools-btn {
    padding: 0.28rem 0.5rem;
  }

  .mobile-tools-menu {
    right: 0.5rem;
    width: calc(100vw - 1rem);
  }
}

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

/* Base Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1;
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  user-select: none;
  white-space: nowrap;
}

.btn:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 1px;
}

.btn-default {
  background-color: var(--bg-surface);
  color: var(--text-main);
  border-color: var(--border-medium);
}

.btn-default:hover {
  background-color: var(--bg-surface-alt);
  border-color: var(--text-subtle);
}

.btn-primary {
  background-color: var(--brand-primary);
  color: #ffffff;
  border-color: var(--brand-primary);
}

.btn-primary:hover {
  background-color: var(--brand-primary-hover);
}

.btn-ghost {
  background-color: transparent;
  color: var(--text-muted);
}

.btn-ghost:hover {
  background-color: var(--bg-surface-alt);
  color: var(--text-main);
}

.btn-danger {
  background-color: var(--bg-surface);
  color: var(--color-danger);
  border-color: rgba(220, 38, 38, 0.3);
}

.btn-danger:hover {
  background-color: rgba(220, 38, 38, 0.08);
  border-color: var(--color-danger);
}

.btn-icon {
  padding: 0.4rem;
}

/* Page Containers */
.main-content {
  flex: 1;
}

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Content Sections (SEO & Guidance) */
.content-section {
  padding: 3rem 0;
  border-top: 1px solid var(--border-light);
  background-color: var(--bg-page);
}

.section-inner {
  max-width: 960px;
  margin: 0 auto;
}

.section-heading {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-main);
  margin-bottom: 0.75rem;
}

.section-lead {
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.feature-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
}

.feature-card:hover {
  box-shadow: var(--shadow-md);
}

.feature-icon-wrapper {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  background-color: var(--bg-surface-alt);
  color: var(--brand-primary);
  border-radius: var(--radius-sm);
  margin-bottom: 0.75rem;
}

.feature-title {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-main);
}

.feature-desc {
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--text-muted);
}

/* Usage Steps */
.steps-container {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

.step-item {
  display: flex;
  gap: 1rem;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
}

.step-num {
  width: 1.75rem;
  height: 1.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--brand-primary);
  color: #fff;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.875rem;
  flex-shrink: 0;
}

.step-content h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.step-content p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* FAQ Accordion Section */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

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

.faq-item summary {
  padding: 1rem 1.25rem;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
  color: var(--text-main);
  list-style: none;
}

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

.faq-item summary::after {
  content: "+";
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--text-subtle);
  transition: transform var(--transition);
}

.faq-item[open] summary::after {
  content: "−";
}

.faq-content {
  padding: 0 1.25rem 1rem 1.25rem;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--text-muted);
  border-top: 1px solid transparent;
}

/* Footer Styles */
.site-footer {
  background-color: var(--bg-surface);
  border-top: 1px solid var(--border-light);
  margin-top: auto;
}

.footer-container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 2.5rem 1.25rem 1.5rem 1.25rem;
  display: grid;
  grid-template-columns: 2fr 1.2fr 1.5fr;
  gap: 2rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  margin-bottom: 0.75rem;
  color: var(--text-main);
}

.footer-tagline {
  font-size: 0.8125rem;
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 380px;
}

.footer-heading {
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-main);
  margin-bottom: 0.75rem;
}

.shortcuts-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.shortcuts-list li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

kbd {
  display: inline-block;
  padding: 0.15rem 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  background-color: var(--bg-surface-alt);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  box-shadow: 0 1px 0 rgba(0,0,0,0.1);
}

.privacy-note {
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--text-muted);
}

.footer-bottom {
  border-top: 1px solid var(--border-light);
  padding: 1rem 0;
  background-color: var(--bg-surface-alt);
}

.footer-bottom-container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.25rem;
  font-size: 0.75rem;
  color: var(--text-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Toast Notification */
.toast-notice {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  background-color: var(--text-main);
  color: var(--text-inverse);
  padding: 0.625rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 200ms ease, transform 200ms ease;
  pointer-events: none;
}

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

/* Responsive Breakpoints */
@media (max-width: 860px) {
  .footer-container {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

/* Editorial Content Styles (Amber Workshop Guidelines) */
.content-section-alt {
  background-color: var(--bg-surface);
}

.prose-text {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text-main);
  margin-bottom: 1.25rem;
}

.prose-subheading {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-main);
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.content-code-box {
  background-color: var(--bg-surface-alt);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  line-height: 1.55;
  overflow-x: auto;
  margin: 1rem 0 1.5rem 0;
  color: var(--text-main);
  white-space: pre;
}

.content-table-wrapper {
  overflow-x: auto;
  margin: 1.5rem 0 2rem 0;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  background-color: var(--bg-surface);
  box-shadow: var(--shadow-sm);
}

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

.content-table th {
  background-color: var(--bg-surface-alt);
  padding: 0.75rem 1rem;
  font-weight: 600;
  color: var(--text-main);
  border-bottom: 1px solid var(--border-medium);
  white-space: nowrap;
}

.content-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-muted);
  vertical-align: top;
  line-height: 1.5;
}

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

.content-table code {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  background-color: var(--bg-surface-alt);
  padding: 0.15rem 0.35rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  color: var(--text-main);
}

.tools-link-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
  margin: 1.5rem 0;
}

.tool-link-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  box-shadow: var(--shadow-sm);
}

.tool-link-card:hover {
  border-color: var(--brand-primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.tool-link-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.tool-link-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-main);
}

.tool-link-badge {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--brand-primary);
  background-color: var(--brand-subtle);
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

.tool-link-desc {
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--text-muted);
  flex-grow: 1;
}

.tool-link-action {
  margin-top: 0.75rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--brand-primary);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.troubleshoot-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin: 1.5rem 0;
}

.troubleshoot-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
}

.troubleshoot-problem {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.troubleshoot-problem-badge {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--color-danger);
  background-color: rgba(220, 38, 38, 0.1);
  padding: 0.15rem 0.4rem;
  border-radius: var(--radius-sm);
}

.troubleshoot-solution {
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--text-muted);
}

/* Footer Navigation Links */
.footer-bottom-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.footer-bottom-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.75rem;
  transition: color var(--transition);
}

.footer-bottom-links a:hover,
.footer-bottom-links a:focus-visible {
  color: var(--brand-primary);
  text-decoration: underline;
}

@media (max-width: 640px) {
  .footer-bottom-container {
    flex-direction: column;
    gap: 0.75rem;
    text-align: center;
  }
  .footer-bottom-links {
    justify-content: center;
    gap: 1rem;
  }
}

/* Informational & Legal Pages Layout */
.page-hero {
  padding: 3rem 0 2rem 0;
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-light);
}

.page-hero-inner {
  max-width: 860px;
  margin: 0 auto;
}

.page-title {
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-main);
  margin-bottom: 0.75rem;
  line-height: 1.2;
}

.page-subtitle {
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--text-muted);
  margin-bottom: 1rem;
  max-width: 720px;
}

.page-meta {
  font-size: 0.8125rem;
  color: var(--text-subtle);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.page-meta-sep {
  color: var(--border-medium);
}

.prose-article {
  max-width: 860px;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4rem 1.25rem;
}

.prose-section {
  margin-bottom: 2.75rem;
}

.prose-heading-2 {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--text-main);
  margin-top: 1.5rem;
  margin-bottom: 0.875rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-light);
}

.prose-heading-3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-main);
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.prose-list {
  list-style-type: disc;
  margin: 0.75rem 0 1.25rem 1.5rem;
  color: var(--text-main);
  font-size: 0.95rem;
  line-height: 1.7;
}

.prose-list li {
  margin-bottom: 0.5rem;
}

.callout-box {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-left: 4px solid var(--brand-primary);
  border-radius: var(--radius-sm);
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
  box-shadow: var(--shadow-sm);
}

.callout-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.35rem;
}

.callout-text {
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--text-muted);
  margin: 0;
}

.contact-highlight-box {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 2rem;
  margin: 1.5rem 0 2.5rem 0;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.contact-email-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--brand-primary);
  text-decoration: none;
  padding: 0.625rem 1.25rem;
  background-color: var(--brand-subtle);
  border-radius: var(--radius-md);
  margin: 0.75rem 0;
  transition: transform var(--transition), background-color var(--transition);
}

.contact-email-link:hover {
  background-color: var(--border-medium);
  transform: translateY(-1px);
}

.contact-guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  margin: 1.5rem 0;
}

.contact-guide-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
}

.contact-guide-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.contact-guide-desc {
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--text-muted);
}

