/* Dark-only palette, deliberately in the same family as llamanexus.makershop.fi's
   style.css (same neutral scale: --bg/--bg-elevated/--border/--text/--text-muted,
   same .site-header/.hero/.product-grid/.site-footer building blocks) so the two
   sites read as part of the same maker's work, with FastECU's own warm
   red-orange accent standing in for LlamaNexus's terracotta one. Everything
   below the neutral tokens is plain hand-written CSS, no build step, no
   framework — just static files a PHP host can serve as-is. */
:root {
  --bg: #1e1e1e;
  --bg-sidebar: #181818;
  --bg-elevated: #262624;
  --border: #3a3835;
  --text: #e8e6e1;
  --text-muted: #a19d95;
  --accent: #e2734a;
  --accent-hover: #ec8560;
  --danger: #e57373;
  --success: #81c995;
  --stable: #81c995;
  --progress: #e0b95c;
}

* { box-sizing: border-box; }

html { color-scheme: dark; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

* { scrollbar-width: thin; scrollbar-color: var(--border) transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background: var(--border); border-radius: 8px; border: 2px solid transparent; background-clip: padding-box; }

a { color: inherit; text-decoration: none; }
.link-strong { color: var(--accent); font-weight: 600; }
.link-strong:hover { text-decoration: underline; }

.btn {
  display: inline-block;
  border-radius: 8px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  text-align: center;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { opacity: 0.9; }
.btn-outline { background: none; border-color: var(--border); color: var(--text); }
.btn-outline:hover { background: var(--bg-elevated); }
.btn:disabled,
.btn.btn-disabled { opacity: 0.5; cursor: default; }

/* Header / nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--border);
  background: rgba(30, 30, 30, 0.85);
  backdrop-filter: blur(6px);
}
.site-header-inner {
  max-width: 1040px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.site-brand { display: flex; align-items: center; gap: 9px; font-weight: 700; letter-spacing: -0.01em; font-size: 16px; }
.site-brand img { width: 22px; height: 22px; border-radius: 4px; }
.site-nav { display: flex; align-items: center; gap: 22px; font-size: 14px; color: var(--text-muted); }
.site-nav a:hover { color: var(--text); }

/* Landing page */
.hero { max-width: 760px; margin: 0 auto; padding: 76px 24px 32px; text-align: center; }
.hero-eyebrow { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent); margin: 0 0 14px; }
.hero h1 { font-size: 40px; font-weight: 700; letter-spacing: -0.02em; margin: 0; }
.hero-subtitle { margin: 16px auto 0; max-width: 600px; color: var(--text-muted); font-size: 17px; }
.hero-actions { margin-top: 28px; display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; }
.hero-note { margin: 10px 0 0; font-size: 12.5px; color: var(--text-muted); }

.screenshot-wrap { max-width: 1040px; margin: 8px auto 0; padding: 0 24px 64px; }
.screenshot-frame {
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  border-radius: 12px;
  padding: 10px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}
.screenshot-frame img { display: block; width: 100%; height: auto; border-radius: 6px; }
.screenshot-caption { margin: 12px 4px 0; font-size: 13px; color: var(--text-muted); text-align: center; }

/* Generic content section */
.section { max-width: 1040px; margin: 0 auto; padding: 12px 24px 64px; }
.section-header { max-width: 640px; margin: 0 auto 36px; text-align: center; }
.section-eyebrow { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); margin: 0 0 8px; }
.section-title { font-size: 28px; font-weight: 700; letter-spacing: -0.01em; margin: 0; }
.section-lead { margin: 12px 0 0; color: var(--text-muted); font-size: 15px; }
.section-alt { background: var(--bg-sidebar); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

/* Two-card "product" grid, reused for the Qt vs Electron comparison */
.product-grid {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px 0;
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.product-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  border-radius: 12px;
  padding: 24px;
  transition: border-color 0.15s;
}
.product-card:hover { border-color: var(--accent); }
.product-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.product-card-kicker { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); }
.status-pill { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; padding: 3px 8px; border-radius: 99px; white-space: nowrap; }
.status-pill.stable { color: var(--stable); background: rgba(129, 201, 149, 0.12); }
.status-pill.progress { color: var(--progress); background: rgba(224, 185, 92, 0.14); }
.product-card h3 { margin: 10px 0 0; font-size: 18px; }
.product-card-tagline { margin: 4px 0 0; font-size: 13px; font-weight: 600; color: var(--text-muted); }
.product-card-description { margin: 12px 0 0; font-size: 13.5px; color: var(--text-muted); flex: 1; }
.product-card-link { margin-top: 16px; font-size: 13px; font-weight: 600; color: var(--accent); }
.product-card:hover .product-card-link { text-decoration: underline; }

/* Feature category cards */
.feature-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.feature-card {
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  border-radius: 12px;
  padding: 20px 22px;
}
.feature-card h3 { margin: 0 0 10px; font-size: 15px; }
.feature-card ul { margin: 0; padding-left: 18px; font-size: 13.5px; color: var(--text-muted); display: flex; flex-direction: column; gap: 6px; }
.feature-card li::marker { color: var(--accent); }

/* "What's new" status list — dot + label, echoing the app's own connection-status rows */
.status-list { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: var(--bg-elevated); }
.status-row { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; }
.status-row + .status-row { border-top: 1px solid var(--border); }
.status-dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; flex-shrink: 0; }
.status-dot.done { background: var(--stable); }
.status-dot.progress { background: var(--progress); }
.status-row-title { font-size: 14px; font-weight: 600; }
.status-row-desc { margin: 3px 0 0; font-size: 13.5px; color: var(--text-muted); }

/* Supported models table */
.models-columns { display: grid; gap: 28px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.models-columns h3 { font-size: 11.5px; font-weight: 700; margin: 0 0 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.models-columns ul { margin: 0; padding-left: 18px; font-size: 13.5px; display: flex; flex-direction: column; gap: 7px; }
.models-columns li::marker { color: var(--accent); }
.models-note { margin: 28px 0 0; font-size: 13px; color: var(--text-muted); }

/* Download section */
.download-card {
  max-width: 640px;
  margin: 0 auto;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  border-radius: 14px;
  padding: 32px;
  text-align: center;
}
.download-actions { margin-top: 20px; display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); margin-top: auto; }
.site-footer-inner {
  max-width: 1040px;
  margin: 0 auto;
  padding: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-muted);
}
.site-footer-links { display: flex; gap: 16px; flex-wrap: wrap; }
.site-footer-links a:hover { color: var(--text); }
.site-footer-legal { display: flex; gap: 4px 16px; flex-wrap: wrap; }
.site-footer-legal a:hover { color: var(--text); }

@media (max-width: 640px) {
  .hero h1 { font-size: 30px; }
  .section-title { font-size: 22px; }
}

/* --- Account / auth / admin --------------------------------------------------------
   Adapted from llamanexus.makershop.fi's working account+billing system (same
   .auth-shell/.form-field/.account-section/.plan-grid/.stat-grid building blocks),
   re-themed onto FastECU's own tokens above rather than copying its colors. */

.btn-submit { width: 100%; margin-top: 4px; }

.link-button {
  background: none;
  border: none;
  padding: 0;
  color: inherit;
  font: inherit;
  cursor: pointer;
  text-align: left;
  width: 100%;
}

.account-menu { position: relative; }
.account-menu-trigger { background: none; border: none; color: var(--text); font: inherit; font-weight: 600; cursor: pointer; }
.account-menu-trigger:hover { color: var(--accent); }
.account-menu-popup {
  display: none;
  position: absolute;
  right: 0;
  top: 100%;
  margin-top: 8px;
  width: 160px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  border-radius: 8px;
  padding: 4px;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.35);
  z-index: 20;
}
.account-menu.open .account-menu-popup { display: block; }
.account-menu-popup a,
.account-menu-popup .link-button {
  display: block;
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 14px;
}
.account-menu-popup a:hover,
.account-menu-popup .link-button:hover { background: var(--bg-sidebar); }

/* width: 100% is required, not decorative - body is display:flex;flex-direction:column (for the
   sticky footer), and a flex item with auto cross-axis margins but no explicit width shrinks-to-fit
   its content instead of filling up to max-width, so short content silently renders narrower than
   intended. Every top-level, directly-body-child centered container below needs this same pairing. */
.auth-shell { width: 100%; max-width: 420px; margin: 0 auto; padding: 64px 24px; min-height: 55vh; display: flex; flex-direction: column; justify-content: center; }
.auth-shell h1 { font-size: 24px; font-weight: 700; letter-spacing: -0.01em; margin: 0; }
.auth-subtitle { margin: 8px 0 0; font-size: 14px; color: var(--text-muted); }
.auth-body { margin-top: 28px; display: flex; flex-direction: column; gap: 14px; }
.auth-footer { margin-top: 22px; font-size: 14px; color: var(--text-muted); }
.auth-footer-links { display: flex; flex-direction: column; gap: 8px; }

.auth-form { display: flex; flex-direction: column; gap: 14px; }
.auth-legal-notice { margin: -6px 0 0; font-size: 12px; color: var(--text-muted); }
.auth-legal-notice a { color: var(--text-muted); text-decoration: underline; }
.auth-legal-notice a:hover { color: var(--text); }
.form-field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.form-field input {
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  padding: 9px 12px;
  font-size: 14px;
}
.form-field input:focus { outline: none; border-color: var(--accent); }
.form-field-hint { font-size: 12px; color: var(--text-muted); font-weight: 400; }

.password-input-wrap { position: relative; display: flex; }
.password-input-wrap input { flex: 1; padding-right: 38px; }
.password-toggle {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
}
.password-toggle:hover { color: var(--text); background: var(--bg-elevated); }
.password-toggle .icon-eye-off { display: none; }
.password-toggle.showing .icon-eye { display: none; }
.password-toggle.showing .icon-eye-off { display: block; }

.form-message { border-radius: 8px; padding: 9px 12px; font-size: 14px; margin: 0; }
.form-message-error { border: 1px solid rgba(229, 115, 115, 0.4); background: rgba(229, 115, 115, 0.1); color: var(--danger); }
.form-message-success { border: 1px solid rgba(129, 201, 149, 0.4); background: rgba(129, 201, 149, 0.1); color: var(--success); }

.account-section { width: 100%; max-width: 760px; margin: 0 auto; padding: 40px 24px; }
.account-section h1 { font-size: 24px; font-weight: 700; letter-spacing: -0.01em; margin: 0 0 24px; }
.account-section h2 { font-size: 18px; margin: 0 0 16px; }
.account-section-subtitle { font-size: 13px; color: var(--text-muted); margin: -10px 0 16px; }

.plan-status-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin: -10px 0 16px; }
.plan-status-row .account-section-subtitle { margin: 0; }

.account-form-actions { display: flex; justify-content: flex-end; margin-top: 4px; }
.account-logout-form { margin-top: 20px; }

.account-password-row { display: flex; align-items: center; gap: 14px; }
.account-password-dots { letter-spacing: 2px; color: var(--text-muted); }
.account-password-row button.link-strong { background: none; border: none; padding: 0; font: inherit; cursor: pointer; }

.password-dialog {
  background: var(--bg-elevated);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  width: 100%;
  max-width: 380px;
}
.password-dialog::backdrop { background: rgba(0, 0, 0, 0.55); }
.password-dialog h2 { font-size: 18px; margin: 0 0 18px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }

.plan-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.plan-card { border: 1px solid var(--border); border-radius: 10px; padding: 18px; display: flex; flex-direction: column; gap: 8px; background: var(--bg-elevated); }
.plan-card:hover { border-color: var(--accent); }
.plan-card--current { border-color: var(--accent); }
.plan-card h3 { margin: 0; font-size: 15px; }
.plan-card-actions { display: flex; gap: 8px; margin-top: 4px; }
.plan-card-actions form { flex: 1; }
.plan-card-actions .btn { width: 100%; }
.plan-card-actions .btn:hover { border-color: var(--accent); }
.plan-manage-billing { margin-top: 16px; }

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

/* Admin stats */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.stat-tile {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: var(--bg-elevated);
}
.stat-tile-value { font-size: 26px; font-weight: 700; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.stat-tile-label { font-size: 13px; color: var(--text-muted); }

.license-key-value {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  word-break: break-all;
  font-size: 13px;
}

/* Legal pages (Privacy Policy / Terms of Service / Usage Policy) - a plain readable content
   column, no sidebar/TOC (this site has no docs system to share layout with). */
.legal-content { width: 100%; max-width: 720px; margin: 0 auto; padding: 40px 24px 80px; flex: 1; }
.legal-content h1 { font-size: 26px; font-weight: 700; letter-spacing: -0.01em; margin: 0 0 4px; }
.legal-content h2 { font-size: 17px; margin: 32px 0 10px; }
.legal-content p { color: var(--text); margin: 12px 0; }
.legal-content em { color: var(--text-muted); }
.legal-content ul { margin: 12px 0; padding-left: 20px; }
.legal-content li { margin: 6px 0; }
.legal-content li::marker { color: var(--accent); }
.legal-content a { color: var(--accent); }
.legal-content a:hover { text-decoration: underline; }
