/* ==========================================================================
   MarkQ — Landing Page Stylesheet
   Modern CSS Architecture: CSS Variables, Fluid Scaling, Grid, Glassmorphism
   ========================================================================== */

:root {
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", system-ui, sans-serif;
  --font-mono: "SF Mono", Monaco, Menlo, Consolas, "Liberation Mono", monospace;

  /* Palette */
  --bg-dark: #0a0c10;
  --bg-card: rgba(22, 27, 34, 0.7);
  --bg-card-hover: rgba(33, 38, 45, 0.85);
  --bg-elevated: #161b22;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-highlight: rgba(56, 139, 253, 0.35);

  --text-primary: #f0f6fc;
  --text-secondary: #8b949e;
  --text-muted: #6e7681;

  --accent-blue: #388bfd;
  --accent-blue-hover: #58a6ff;
  --accent-cyan: #22d3ee;
  --accent-purple: #a855f7;
  --accent-emerald: #10b981;
  --accent-orange: #f97316;

  /* Oxygen XML Palette Accents */
  --oxy-heading: #79b8ff;
  --oxy-list: #79a6ff;
  --oxy-quote: #b4cc7a;
  --oxy-code: #e3a15d;
  --oxy-block: #7ee787;

  /* Layout */
  --max-width: 1200px;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --shadow-glow: 0 0 60px -15px rgba(56, 139, 253, 0.3);
  --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

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

html {
  font-family: var(--font-sans);
  background-color: var(--bg-dark);
  color: var(--text-primary);
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100dvh;
  line-height: 1.6;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 50% -10%, rgba(56, 139, 253, 0.18), transparent 50%),
    radial-gradient(circle at 90% 40%, rgba(168, 85, 247, 0.08), transparent 40%),
    radial-gradient(circle at 10% 70%, rgba(34, 211, 238, 0.08), transparent 40%),
    var(--bg-dark);
}

/* --- Container --- */
.container {
  width: min(100% - 40px, var(--max-width));
  margin-inline: auto;
}

/* --- Navigation --- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 12, 16, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  transition: all 0.2s ease;
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

.brand-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

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

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.15s ease;
}

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

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.16s cubic-bezier(0.16, 1, 0.3, 1);
  outline: none;
  border: 1px solid transparent;
}

.btn-primary {
  background: linear-gradient(180deg, #388bfd 0%, #1f6feb 100%);
  color: #ffffff;
  box-shadow: 0 2px 10px rgba(31, 111, 235, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-primary:hover {
  background: linear-gradient(180deg, #58a6ff 0%, #388bfd 100%);
  box-shadow: 0 4px 18px rgba(31, 111, 235, 0.6);
  transform: translateY(-1px);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  border-color: var(--border-subtle);
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.btn-lg {
  padding: 14px 26px;
  font-size: 1.05rem;
  border-radius: var(--radius-md);
}

/* --- Hero Section --- */
.hero {
  padding-block: clamp(60px, 8vw, 110px) 40px;
  text-align: center;
  position: relative;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(56, 139, 253, 0.1);
  border: 1px solid rgba(56, 139, 253, 0.3);
  color: var(--accent-blue-hover);
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 24px;
}

.hero-pill .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-emerald);
  box-shadow: 0 0 8px var(--accent-emerald);
}

.hero-title {
  font-size: clamp(2.4rem, 1.2rem + 3.6vw, 3.9rem); /* two lines: the first (Every Markdown Feature You Need.) has to fit the width */
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.035em;
  max-width: 1100px;
  margin-inline: auto;
  margin-bottom: 22px;
  background: linear-gradient(180deg, #ffffff 30%, #a5b4fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* On a narrow screen the line break goes and the title wraps as it needs to */
@media (max-width: 900px) { .hero-title br { display: none; } }

.hero-subtitle {
  font-size: clamp(1.05rem, 0.95rem + 0.6vw, 1.32rem);
  color: var(--text-secondary);
  max-width: 740px;
  margin-inline: auto;
  line-height: 1.6;
  margin-bottom: 36px;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 28px;
}

.hero-badges {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  color: var(--text-muted);
  font-size: 0.86rem;
  margin-bottom: 40px;
}

.hero-badge-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Terminal One-Liner Box */
.terminal-box {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: rgba(22, 27, 34, 0.8);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 8px 14px;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  color: #7ee787;
  max-width: 100%;
  box-shadow: var(--shadow-card);
}

.terminal-prompt {
  color: var(--text-muted);
  user-select: none;
}

.terminal-copy-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  padding: 4px 8px;
  font-size: 0.75rem;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: all 0.12s ease;
}

.terminal-copy-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  color: var(--text-primary);
}

/* --- App Window Mockup --- */
.window-showcase {
  margin-top: 50px;
  position: relative;
}

.window-mockup {
  border-radius: var(--radius-lg);
  background: #0d1117;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 25px 70px -15px rgba(0, 0, 0, 0.8), 0 0 80px -20px rgba(56, 139, 253, 0.25);
  overflow: hidden;
  text-align: left;
}

.window-titlebar {
  height: 42px;
  background: #161b22;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  padding-inline: 16px;
  gap: 16px;
}

.window-dots {
  display: flex;
  gap: 8px;
}

.window-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}
.window-dot.red { background: #ff5f56; }
.window-dot.yellow { background: #ffbd2e; }
.window-dot.green { background: #27c93f; }

.window-tabs {
  display: flex;
  gap: 4px;
  overflow: hidden;
  flex-grow: 1;
}

.mock-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  background: transparent;
}
.mock-tab.active {
  background: #0d1117;
  color: var(--text-primary);
  font-weight: 500;
  border: 1px solid var(--border-subtle);
  border-bottom: none;
}

.window-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 480px;
  background: #0d1117;
}

.pane {
  padding: 24px;
  overflow: hidden;
}

.pane-editor {
  border-right: 1px solid var(--border-subtle);
  background: #ffffff;
  color: #24292e;
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 1.6;
}

.pane-editor .h1-line { color: #000066; font-weight: 600; }
.pane-editor .list-line { color: #3333ff; }
.pane-editor .code-span { color: #8f5536; }
.pane-editor .code-block { color: #008c00; }
.pane-editor .table-pipe { color: #510029; }
.pane-editor .quote-line { color: #90a959; }

.pane-preview {
  background: #0d1117;
  color: #c9d1d9;
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.6;
}

.pane-preview h2 {
  color: #f0f6fc;
  font-size: 1.4rem;
  margin-bottom: 12px;
  border-bottom: 1px solid #30363d;
  padding-bottom: 6px;
}

/* Interactive Mock Preview Box inside Showcase */
.mock-html-box {
  border: 1px solid #30363d;
  border-radius: 8px;
  overflow: hidden;
  margin-top: 14px;
  background: #161b22;
}

.mock-html-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 12px;
  background: #21262d;
  border-bottom: 1px solid #30363d;
  font-size: 11px;
}

.mock-device-pills {
  display: flex;
  gap: 4px;
}
.mock-device-pill {
  padding: 2px 8px;
  border-radius: 4px;
  background: #30363d;
  color: #c9d1d9;
  cursor: pointer;
  border: none;
  font-size: 10px;
}
.mock-device-pill.active {
  background: var(--accent-blue);
  color: #ffffff;
}

.mock-html-content {
  padding: 16px;
  background: #ffffff;
  color: #1f2937;
  border-radius: 0 0 7px 7px;
  text-align: center;
  transition: max-width 0.3s ease;
  margin-inline: auto;
}

/* --- Section Title --- */
.section {
  padding-block: 90px;
  position: relative;
}

.section-header {
  text-align: center;
  max-width: 680px;
  margin-inline: auto;
  margin-bottom: 60px;
}

.section-tag {
  display: inline-block;
  color: var(--accent-cyan);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(1.8rem, 1.2rem + 2vw, 2.8rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.2;
  margin-bottom: 16px;
}

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

/* --- Feature Grid --- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: 24px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 32px;
  backdrop-filter: blur(12px);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

.feature-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-highlight);
  transform: translateY(-3px);
  box-shadow: var(--shadow-glow);
}

.feature-icon-wrapper {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 20px;
  background: rgba(56, 139, 253, 0.12);
  border: 1px solid rgba(56, 139, 253, 0.25);
  color: var(--accent-blue-hover);
}

.feature-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 10px;
  letter-spacing: -0.015em;
}

.feature-desc {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
  flex-grow: 1;
}

.feature-pill {
  align-self: flex-start;
  margin-top: 18px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--accent-cyan);
  font-size: 0.78rem;
  font-weight: 500;
  border: 1px solid var(--border-subtle);
}

/* --- Comparison Battlecard Table --- */
.comparison-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow-card);
}

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

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

.comparison-table th {
  background: rgba(22, 27, 34, 0.9);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.comparison-table th.highlight-col,
.comparison-table td.highlight-col {
  background: rgba(56, 139, 253, 0.08);
  font-weight: 600;
}

.comparison-table td.highlight-col {
  color: #ffffff;
}

/* In the MarkQ column a check mark stays green, like every other column */
.comparison-table td.highlight-col.check-yes {
  color: var(--accent-emerald);
}

.check-yes {
  color: var(--accent-emerald);
  font-weight: 700;
}

.check-no {
  color: var(--text-muted);
}

.check-partial {
  color: #cdb07a; /* a muted, soft gold: partial support without the glare of bright orange */
  font-weight: 500;
}

.comparison-table .row-detail {
  display: block;
  margin-top: 3px;
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 400;
}

.comparison-table td code {
  font-size: 0.85em;
}

.table-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  justify-content: center;
  margin: 22px 0 8px;
  font-size: 0.88rem;
}

.table-caption {
  max-width: 820px;
  margin: 8px auto 0;
  color: var(--text-secondary);
  font-size: 0.85rem;
  line-height: 1.6;
  text-align: center;
}

.table-caption a {
  color: var(--accent-blue-hover);
}

.table-sources {
  max-width: 820px;
  margin: 14px auto 0;
  color: var(--text-muted);
  font-size: 0.82rem;
}

.table-sources summary {
  cursor: pointer;
  text-align: center;
}

.table-sources ul {
  margin: 12px 0 0;
  padding-left: 18px;
  line-height: 1.8;
}

.table-sources a {
  color: var(--accent-blue-hover);
}

/* --- Pricing Card --- */
.pricing-container {
  display: flex;
  justify-content: center;
  margin-top: 20px;
}

.pricing-card {
  max-width: 480px;
  width: 100%;
  background: linear-gradient(180deg, rgba(22, 27, 34, 0.9) 0%, rgba(13, 17, 23, 0.95) 100%);
  border: 1px solid var(--border-highlight);
  border-radius: var(--radius-xl);
  padding: 44px 36px;
  box-shadow: var(--shadow-glow), 0 20px 50px rgba(0, 0, 0, 0.6);
  text-align: center;
  position: relative;
}

.pricing-badge {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(90deg, #388bfd, #22d3ee);
  color: #ffffff;
  padding: 4px 14px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  box-shadow: 0 4px 12px rgba(56, 139, 253, 0.4);
}

.pricing-plan-name {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.pricing-price-wrap {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 6px;
  margin-block: 16px 12px;
}

.pricing-amount {
  font-size: 3.4rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #ffffff;
}

.pricing-period {
  color: var(--text-secondary);
  font-size: 1rem;
}

.pricing-subtext {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 28px;
}

.pricing-features {
  list-style: none;
  text-align: left;
  margin-block: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.pricing-feature-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.pricing-feature-item svg {
  flex-shrink: 0;
  margin-top: 3px;
  color: var(--accent-emerald);
}

/* --- FAQ Accordion --- */
.faq-grid {
  max-width: 760px;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

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

.faq-item:hover {
  border-color: rgba(255, 255, 255, 0.18);
}

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 1.05rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  outline: none;
}

.faq-answer {
  padding: 0 22px 20px 22px;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
  display: none;
}

.faq-item.open .faq-answer {
  display: block;
}

.faq-chevron {
  transition: transform 0.2s ease;
  color: var(--text-secondary);
}

.faq-item.open .faq-chevron {
  transform: rotate(180deg);
}

/* --- Footer --- */
.footer {
  border-top: 1px solid var(--border-subtle);
  padding-block: 60px 40px;
  background: rgba(10, 12, 16, 0.95);
  font-size: 0.9rem;
  color: var(--text-muted);
}

.footer-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 30px;
  align-items: center;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}

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

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

/* --- Responsive Media Queries --- */
@media (max-width: 860px) {
  .window-body {
    grid-template-columns: 1fr;
  }
  .pane-editor {
    border-right: none;
    border-bottom: 1px solid var(--border-subtle);
  }
  .nav-links {
    display: none;
  }
}

.table-verdict {
  max-width: 760px;
  margin: 26px auto 0;
  padding: 16px 22px;
  border: 1px solid var(--border-highlight);
  border-radius: var(--radius-md);
  background: rgba(56, 139, 253, 0.08);
  color: var(--text-primary);
  font-size: 1.02rem;
  font-weight: 600;
  line-height: 1.55;
  text-align: center;
}

/* Hero mock-up: the rendered task list and table that the editor text on the left produces */
.mock-tasks {
  list-style: none;
  margin: 10px 0 12px;
  padding: 0;
  font-size: 13px;
  color: #c9d1d9;
}

.mock-tasks li {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 6px 0;
}

.mock-check {
  flex: none;
  width: 15px;
  height: 15px;
  border-radius: 4px;
  background: #388bfd;
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.mock-check.empty {
  background: transparent;
  border: 1.5px solid #6e7681;
}

.mock-tasks code {
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(110, 118, 129, 0.25);
  color: var(--oxy-code);
}

.mock-table {
  width: 100%;
  margin: 10px 0 14px;
  border-collapse: collapse;
  font-size: 12.5px;
  color: #c9d1d9;
}

.mock-table th,
.mock-table td {
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  text-align: left;
}

.mock-table th {
  background: rgba(255, 255, 255, 0.05);
  font-weight: 600;
}

.mock-table th:nth-child(n + 2),
.mock-table td:nth-child(n + 2) {
  text-align: center;
}

.mock-table .yes {
  color: var(--accent-emerald);
  font-weight: 700;
}

.mock-table .no {
  color: var(--text-muted);
}

/* Hero demo video */
.video-frame {
  border-radius: var(--radius-lg);
  background: #0d1117;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 25px 70px -15px rgba(0, 0, 0, 0.8), 0 0 80px -20px rgba(56, 139, 253, 0.25);
  overflow: hidden;
  line-height: 0;
  aspect-ratio: 16 / 9;
}

.video-frame video {
  display: block;
  width: 100%;
  height: 100%;
  /* The frame and the video are both 16:9, so nothing is lost on the page; full screen on a screen of another shape (a MacBook is 16:10)
     must show the whole picture with bars, not cut the edges off */
  object-fit: contain;
  background: #0d1117;
}

.video-caption {
  margin-top: 14px;
  text-align: center;
  font-size: 14px;
  color: var(--text-muted);
}

/* Legal pages (privacy, terms): moved here from a <style> block so the pages need no inline styles */
.legal { max-width: 760px; margin: 0 auto; padding: 56px 24px 96px; line-height: 1.7; color: var(--text-secondary, #c9d1d9); }
.legal h1 { font-size: 2.2rem; color: var(--text-primary); margin: 8px 0 6px; letter-spacing: -0.02em; }
.legal h2 { font-size: 1.25rem; color: var(--text-primary); margin: 36px 0 8px; }
.legal .meta { color: var(--text-muted, #8b949e); font-size: 0.9rem; margin-bottom: 28px; }
.legal a { color: #58a6ff; }
.legal ul { padding-left: 22px; }
.legal li { margin: 6px 0; }
.legal .back { display: inline-block; margin-bottom: 18px; font-size: 0.9rem; text-decoration: none; }
.legal .callout { background: rgba(56,139,253,0.1); border: 1px solid rgba(56,139,253,0.3); border-radius: 12px; padding: 14px 18px; margin: 18px 0; }
.legal .legal-foot, .legal-foot { margin-top: 40px; }

/* Former inline styles from index.html, moved here so the site's Content-Security-Policy needs no 'unsafe-inline'.
   Two-class selectors so they win over the base rules exactly as the inline styles did. */
.btn.btn-sm { font-size: 0.85rem; padding: 8px 14px; }
.btn.btn-full { width: 100%; }
.section.section-dim { background: rgba(13, 17, 23, 0.4); }
.pricing-badge.pricing-badge-green { background: rgba(63, 185, 80, 0.15); color: #3fb950; border: 1px solid rgba(63, 185, 80, 0.3); }
.pricing-card p.pricing-sub, p.pricing-sub { color: var(--text-secondary); font-size: 0.9rem; }
.pricing-price-wrap.price-center { display: flex; align-items: baseline; gap: 10px; justify-content: center; }
.pricing-amount.price-green { color: #3fb950; font-size: 3.2rem; font-weight: 800; }
.price-was { color: #8b949e; text-decoration: line-through; font-size: 1.5rem; font-weight: 500; }
.pricing-actions { display: flex; flex-direction: column; gap: 12px; margin-bottom: 24px; }
.footer-brand { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.footer-brand img { width: 20px; height: 20px; border-radius: 4px; }
.footer-brand strong { color: var(--text-primary); }
.footer-copy { font-size: 0.8rem; margin-top: 4px; color: var(--text-muted); }

/* --- User Guide page (guide.html, generated from docs/USER_GUIDE.md by scripts/build-guide.js) ---
   It looks like the app: the page and the contents list use the window colours of MarkQ (the --ch-* colours in index.html),
   and the guide itself is drawn by the app's own document stylesheet (preview-content.css, copied here by the build), on a
   white page as in MarkQ's preview. Light or Dark follows the Mac's setting. */
html:has(.guide-page) { color-scheme: light; background-color: light-dark(#ebe9e8, #2a2826); } /* the guide is always light, whatever the Mac is set to */
.guide-page {
  color-scheme: light;
  --g-bg: light-dark(#ebe9e8, #2a2826);
  --g-border: light-dark(#d4d1cf, #3e3a37);
  --g-text: light-dark(#34322f, #e0dcd8);
  --g-strong: light-dark(#1d1b19, #f5f2ef);
  --g-dim: light-dark(#6a6764, #a19d99);
  --g-hover: light-dark(rgba(0, 0, 0, 0.055), rgba(255, 255, 255, 0.07));
  --g-doc: light-dark(#ffffff, #0d1117);
  --text-primary: var(--g-strong); --text-secondary: var(--g-dim); --text-muted: var(--g-dim);
  --border-subtle: var(--g-border); --bg-card-hover: var(--g-hover);
  background: var(--g-bg);
  color: var(--g-text);
}
/* The top bar and the footer are the site's own (dark), as on the other pages: they get the site's colours back */
.guide-page .navbar, .guide-page .footer {
  --text-primary: #f0f6fc; --text-secondary: #8b949e; --text-muted: #6e7681;
  --border-subtle: rgba(255, 255, 255, 0.08); --bg-card-hover: rgba(33, 38, 45, 0.85);
}
.guide-page .navbar, .guide-page .footer { background: #0a0c10; } /* solid: the site's bars are see-through, which over this lighter page would turn gray */
.guide-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 40px; padding-top: 32px; padding-bottom: 80px; align-items: start; }
.guide-side { position: sticky; top: 84px; max-height: calc(100dvh - 104px); overflow-y: auto; padding-right: 8px; font-size: 0.88rem; }
.guide-toc summary { cursor: pointer; font-weight: 700; color: var(--g-strong); margin-bottom: 8px; list-style: none; }
.guide-toc summary::-webkit-details-marker { display: none; }
.guide-toc ul { list-style: none; }
.guide-toc li { margin: 1px 0; }
.guide-toc a { display: block; padding: 3px 8px; border-radius: 6px; color: var(--g-dim); text-decoration: none; line-height: 1.35; }
.guide-toc a:hover { color: var(--g-strong); background: var(--g-hover); }
.guide-toc-2 a { color: var(--g-strong); font-weight: 600; margin-top: 8px; }
.guide-toc-3 a { padding-left: 20px; font-size: 0.84rem; }
/* The page the guide is on: a white (or dark) sheet like MarkQ's preview; its text styles are preview-content.css */
.guide { min-width: 0; max-width: 880px; background: var(--g-doc); border: 1px solid var(--g-border); border-radius: 12px; padding: 40px 52px 64px; font-family: var(--font-sans); font-size: 17px; line-height: 1.7; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08); }
.guide > :first-child { margin-top: 0; }
.guide h2, .guide h3 { scroll-margin-top: 84px; }
.release-notes-page .guide > div:last-child { min-height: calc(100dvh - 170px); } /* the oldest version is short: a jump to it, or to the one above it, can still bring it to the top */
.guide .guide-table { overflow-x: auto; margin: 1em 0; }
.guide-code { position: relative; }
.guide-copy { position: absolute; top: 8px; right: 8px; padding: 3px 10px; font: inherit; font-size: 12px; line-height: 1.5; color: var(--g-strong); background: var(--g-doc); border: 1px solid var(--g-border); border-radius: 6px; cursor: pointer; }
.guide-copy:hover { background: var(--g-hover); border-color: var(--g-dim); }
.guide-copy:focus-visible { outline: 2px solid var(--g-accent, #0a64d6); outline-offset: 1px; }
.guide-copy-box { position: fixed; left: -9999px; top: 0; }
.guide .guide-table table { margin: 0; }
.guide-anchor { margin-left: 8px; font-size: 0.8em; text-decoration: none; opacity: 0; }
.guide h2:hover .guide-anchor, .guide h3:hover .guide-anchor, .guide-anchor:focus { opacity: 0.55; }
.nav-links a[aria-current="page"] { color: var(--text-primary); }
@media (max-width: 900px) {
  .guide-layout { grid-template-columns: minmax(0, 1fr); gap: 18px; padding-top: 18px; }
  .guide-side { position: static; max-height: none; overflow: visible; }
  .guide-toc { border: 1px solid var(--g-border); border-radius: 10px; padding: 10px 12px; background: var(--g-doc); }
  .guide-toc:not([open]) summary { margin-bottom: 0; }
  .guide { padding: 24px 20px 40px; border-radius: 10px; }
}

/* Phones: the top bar keeps a gap between the name and the buttons (they used to touch), the button text stays on one line, and on a
   narrow phone the name drops out (the icon stays) so there is room for both buttons */
@media (max-width: 520px) {
  .nav-container { gap: 10px; }
  .nav-actions { gap: 8px; }
  .nav-actions .btn.btn-sm { padding: 7px 10px; font-size: 0.8rem; white-space: nowrap; }
  .brand { gap: 8px; }
}
@media (max-width: 440px) {
  .brand span { display: none; }
}

/* The User Guide's Contents box on a phone: an arrow shows that it opens (on a wide screen the list is always shown, so no arrow) */
.guide-toc summary::after { content: "\25B8"; margin-left: 8px; font-size: 1.05em; color: var(--g-dim); }
.guide-toc[open] summary::after { content: "\25BE"; }
@media (min-width: 901px) {
  .guide-toc summary { cursor: default; }
  .guide-toc summary::after, .guide-toc[open] summary::after { content: none; }
}

/* The Linux download buttons under the main download button (hero) and under the Mac one in the pricing card */
.linux-downloads { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; margin: 18px 0 26px; }
.linux-label { color: var(--text-secondary); font-size: 0.95rem; margin-right: 2px; }
.linux-downloads .btn-secondary:hover, .btn-secondary[href*="buy.stripe.com"]:hover { background: rgba(56, 139, 253, 0.16); border-color: #58a6ff; color: #ffffff; }
.linux-steps { color: var(--text-secondary); font-size: 0.9rem; text-decoration: underline; text-underline-offset: 3px; margin-left: 4px; }
.linux-steps:hover { color: var(--text-primary); }
.linux-downloads-card { margin: 0; }
.linux-downloads.platform-first { margin-bottom: 10px; }
.linux-downloads-card.platform-first { margin: 0 0 10px; }
