/* header and footer: nav.css */
/* qfil.cpsoho.net — deep navy / electric blue, no external fonts or CDNs */
:root {
  --navy: #0b1437;
  --navy2: #14216b;
  --blue: #2563eb;
  --electric: #38bdf8;
  --fg: #0f172a;
  --muted: #5b6b86;
  --line: #e2e8f0;
  --card: #ffffff;
  --bg: #f5f7fb;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--fg); background: var(--bg); font: 16px/1.65 system-ui, 'Segoe UI', 'Microsoft JhengHei', 'PingFang TC', sans-serif; }
a { color: var(--blue); }
[data-lang][hidden] { display: none !important; }
img { max-width: 100%; height: auto; }

/* hero */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: clamp(24px, 4vw, 56px); align-items: center;
  padding: clamp(40px, 7vw, 88px) clamp(16px, 5vw, 64px); color: #fff;
  background: radial-gradient(circle at 80% 10%, rgba(56, 189, 248, 0.35) 0, transparent 45%), linear-gradient(135deg, var(--navy), var(--navy2) 60%, #1d3bd1); }
.kicker { margin: 0 0 10px; color: var(--electric); font-weight: 700; letter-spacing: 0.4px; text-transform: none; }
.hero h1 { margin: 0 0 16px; font-size: clamp(30px, 4.2vw, 50px); line-height: 1.12; }
.lead { margin: 0 0 24px; font-size: 18px; color: #dbeafe; }
.lead strong { color: #fff; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.btn { display: inline-block; padding: 11px 20px; border-radius: 10px; background: var(--electric); color: var(--navy); font-weight: 700; text-decoration: none; }
.btn:hover { filter: brightness(1.08); }
.btn.light { background: #fff; color: var(--navy); }
/* on the dark hero */
.btn.ghost { background: rgba(255, 255, 255, 0.08); color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4); }
.btn.install { padding: 14px 24px; font-size: 17px; }
.btn.install.edge { background: #fff; color: var(--navy); }
.btn.install::before { content: ''; display: inline-block; width: 18px; height: 18px; margin: 0 9px -3px 0; background: url('/assets/icon-128.png') center / cover; border-radius: 4px; }
.fine { margin: 14px 0 0; font-size: 13px; color: #93c5fd; }
.hero-shot { margin: 0; }
.hero-shot img { display: block; border-radius: 14px; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45); border: 1px solid rgba(255, 255, 255, 0.15); }

/* features */
section { padding: clamp(40px, 6vw, 72px) clamp(16px, 5vw, 64px); }
section h2 { margin: 0 0 26px; font-size: clamp(24px, 3vw, 34px); text-align: center; }
.features .grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; max-width: 1180px; margin: 0 auto; }
.features article { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 20px 22px; box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04); }
.features article h3 { margin: 0 0 8px; font-size: 18px; color: var(--navy2); }
.features article p { margin: 0; color: var(--muted); }
.more-cta { margin: 32px 0 0; text-align: center; }

/* screenshots */
.shots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px; max-width: 1180px; margin: 0 auto; padding-top: 0; }
.shots figure { margin: 0; }
.shots img { display: block; border-radius: 12px; border: 1px solid var(--line); box-shadow: 0 8px 26px rgba(15, 23, 42, 0.1); }
.shots figcaption { margin-top: 10px; font-size: 14px; color: var(--muted); text-align: center; }


/* privacy band */
.privacy-band { display: flex; gap: 28px; align-items: center; justify-content: space-between; max-width: 1180px; margin: 0 auto 56px; border-radius: 18px; color: #fff;
  background: linear-gradient(135deg, var(--navy), var(--blue)); padding: 34px clamp(20px, 4vw, 44px); }
.privacy-band h2 { text-align: left; margin-bottom: 8px; }
.privacy-band p { margin: 0; color: #dbeafe; max-width: 760px; }

.muted { color: #94a3b8; }

/* privacy policy page */
.policy { max-width: 860px; margin: 0 auto; padding: 36px 20px 56px; }
.policy h1 { font-size: 34px; margin: 0 0 4px; color: var(--navy); }
.policy h2 { font-size: 20px; margin: 30px 0 8px; text-align: left; color: var(--navy2); }
.policy h3 { font-size: 17px; margin: 18px 0 4px; color: var(--navy2); }
.policy .meta { color: var(--muted); font-size: 14px; margin: 0 0 18px; }
.policy .summary { background: #eff6ff; border: 1px solid #bfdbfe; border-left: 5px solid var(--blue); border-radius: 10px; padding: 14px 18px; }
.policy code { background: #eef2ff; border-radius: 5px; padding: 1px 6px; font-size: 0.92em; }
.policy li { margin: 6px 0; }

/* features & FAQ */
:is(main, section) [id], section[id] { scroll-margin-top: calc(var(--top-h, 60px) + 18px); }
.page-head .lead a { color: #fff; }
.docs { max-width: 1220px; margin: 0 auto; padding: 28px clamp(16px, 4vw, 32px) 56px; }
.docs .toc { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 8px; }
.docs .toc a { padding: 5px 14px; border: 1px solid #bfdbfe; border-radius: 999px; background: #fff; font-size: 14.5px; text-decoration: none; }
.docs .toc a:hover { background: #eff6ff; }
.docs section { padding: 0; }
.docs .topic { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 18px 32px; align-items: start; margin-top: 26px; padding: clamp(18px, 3vw, 30px); background: var(--card); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 4px 18px rgba(15, 23, 42, 0.05); }
.docs .topic h2 { grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; margin: 0; font-size: clamp(20px, 2.4vw, 26px); line-height: 1.3; text-align: left; color: var(--navy); }
.docs .topic h2 b { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: linear-gradient(135deg, var(--navy2), var(--blue)); color: #fff; font-size: 18px; }
.docs figure { margin: 0; }
.docs figure img { display: block; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 8px 24px rgba(15, 23, 42, 0.1); }
.docs .topic ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.docs .topic li h3 { margin: 0 0 2px; font-size: 16.5px; color: var(--navy2); }
.docs .topic li p { margin: 0; color: var(--muted); font-size: 15.5px; }
.docs .more { grid-column: 1 / -1; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px 22px; margin: 0; font-size: 15px; font-weight: 600; }
.docs .more a { text-decoration: none; } .docs .more a:hover { text-decoration: underline; }
.docs code, .features code { background: #eef2ff; border-radius: 5px; padding: 1px 5px; font-size: 0.9em; overflow-wrap: anywhere; }
.docs .table-wrap { margin: 12px 0; overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
.docs .table-wrap table { width: 100%; border-collapse: collapse; font-size: 15px; }
.docs .table-wrap th, .docs .table-wrap td { padding: 9px 13px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.docs .table-wrap td + td, .docs .table-wrap th + th { border-left: 1px solid var(--line); }
.docs .table-wrap th { background: #f1f5fd; color: var(--navy2); white-space: nowrap; }
.docs .table-wrap tr:last-child td { border-bottom: 0; }
.docs .table-wrap .note { display: inline-block; margin-top: 4px; color: var(--muted); font-size: 14px; }
.docs details ul { margin: 6px 0 10px; padding-left: 22px; } .docs details li { margin: 5px 0; }
@media (max-width: 640px) {
  .docs details > div { padding-left: 18px; }
  .docs .table-wrap.stack { overflow: visible; border: 0; }
  .docs .table-wrap.stack thead { display: none; }
  .docs .table-wrap.stack table, .docs .table-wrap.stack tbody, .docs .table-wrap.stack tr, .docs .table-wrap.stack td { display: block; width: 100%; }
  .docs .table-wrap.stack tr { margin: 0 0 12px; border: 1px solid var(--line); border-radius: 12px; background: #fbfdff; overflow: hidden; }
  .docs .table-wrap.stack td { padding: 8px 14px; border: 0; border-bottom: 1px dashed var(--line); }
  .docs .table-wrap.stack td:last-child { border-bottom: 0; }
  .docs .table-wrap.stack td::before { content: attr(data-l); display: block; margin-bottom: 2px; color: var(--navy2); font-size: 12.5px; font-weight: 700; letter-spacing: 0.3px; }
  .docs .table-wrap.stack td:first-child { background: #f1f5fd; font-weight: 600; }
  .docs .table-wrap.stack td + td, .docs .table-wrap.stack tr:last-child td { border-left: 0; }
  .docs .table-wrap.stack td code { overflow-wrap: anywhere; }
}
.docs .faq { margin-top: 48px; }
.docs .faq h2 { margin-bottom: 18px; }
.docs details { background: var(--card); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 10px; }
.docs details[open] { border-color: #93c5fd; box-shadow: 0 6px 20px rgba(37, 99, 235, 0.08); }
.docs summary { padding: 14px 18px; cursor: pointer; font-weight: 600; color: var(--navy); list-style: none; display: flex; gap: 12px; align-items: baseline; }
.docs summary::-webkit-details-marker { display: none; }
.docs summary::before { content: '+'; flex: none; width: 1em; color: var(--blue); font-weight: 800; }
.docs details[open] summary::before { content: '−'; }
.docs summary:focus-visible { outline: 3px solid rgba(56, 189, 248, 0.5); border-radius: 12px; }
.docs details > div { padding: 0 18px 14px 46px; color: #334155; }
.docs details p { margin: 0 0 8px; }
.docs details .more { justify-content: flex-start; }
.docs .ask { margin: 28px 0 0; text-align: center; color: var(--muted); }
.docs .ask .btn { margin-left: 10px; }

/* updates */
.updates { max-width: 860px; margin: 0 auto; padding: 28px clamp(16px, 4vw, 32px) 56px; }
.updates .latest { display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: center; justify-content: space-between; margin: 0 0 28px; padding: 14px 18px; background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 14px; }
.updates .latest > span { flex: 1 1 300px; }
.timeline { margin: 0; padding: 0 0 0 26px; list-style: none; border-left: 3px solid #bfdbfe; }
.timeline > li { position: relative; margin: 0 0 22px; padding: 18px 22px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 3px 14px rgba(15, 23, 42, 0.05); }
.timeline > li::before { content: ''; position: absolute; left: -36px; top: 26px; width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 4px solid #93c5fd; }
.timeline > li.new { border-color: #93c5fd; } .timeline > li.new::before { border-color: var(--blue); }
.timeline h2 { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 22px; text-align: left; color: var(--navy); }
.timeline h2 em { padding: 2px 12px; border-radius: 999px; background: linear-gradient(135deg, var(--blue), var(--electric)); color: #fff; font: 700 13px/1.6 system-ui, sans-serif; }
.timeline .what { margin: 2px 0 8px; color: var(--muted); font-weight: 600; }
.timeline ul { margin: 0; padding-left: 20px; } .timeline ul li { margin: 5px 0; }

/* feedback page */
.page-head { padding: clamp(30px, 5vw, 56px) clamp(16px, 5vw, 64px); color: #fff; text-align: center;
  background: radial-gradient(circle at 80% 0, rgba(56, 189, 248, 0.35) 0, transparent 45%), linear-gradient(135deg, var(--navy), var(--navy2) 60%, #1d3bd1); }
.page-head h1 { margin: 0 0 10px; font-size: clamp(26px, 3.6vw, 40px); line-height: 1.2; }
.page-head .lead { margin: 0; font-size: 17px; }
.feedback { max-width: 780px; margin: -24px auto 56px; padding: 0 16px; }
.feedback .card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: clamp(20px, 4vw, 36px); box-shadow: 0 16px 44px rgba(15, 23, 42, 0.12); }
.feedback h2 { margin: 0 0 18px; font-size: 22px; color: var(--navy2); }
.feedback .field { margin-bottom: 18px; }
.feedback .field > label { display: block; margin-bottom: 6px; font-weight: 600; }
.feedback .req { color: #dc2626; }
.feedback input[type='text'], .feedback select, .feedback textarea { display: block; width: 100%; padding: 10px 12px; border: 1px solid #cbd5e1; border-radius: 10px; background: #fff; color: var(--fg); font: inherit; }
.feedback textarea { resize: vertical; line-height: 1.55; }
.feedback input:focus-visible, .feedback select:focus-visible, .feedback textarea:focus-visible { outline: 3px solid rgba(56, 189, 248, 0.45); border-color: var(--blue); }
.feedback [aria-invalid='true'] { border-color: #dc2626 !important; background: #fef2f2 !important; }
.feedback .err { margin: 5px 0 0; font-size: 14px; color: #b91c1c; }
.feedback .hint { margin: 6px 0 0; font-size: 13.5px; color: var(--muted); }
.feedback .hint.warn { color: #92400e; }
.feedback .env { border: 1px dashed #bfdbfe; border-radius: 12px; padding: 14px 16px; background: #f8fbff; }
.feedback .env .check { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.feedback .env .check input { width: 18px; height: 18px; }
.feedback .env .ver { display: flex; align-items: center; gap: 10px; margin: 4px 0 8px; font-size: 14.5px; }
.feedback .env .ver select { width: auto; padding: 5px 10px; }
.feedback #fb-env { background: #f1f5f9; color: #334155; font: 13px/1.6 ui-monospace, Consolas, 'Microsoft JhengHei', monospace; }
.feedback #fb-env-box.off { opacity: 0.45; }
.feedback .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }
.feedback .actions .btn { border: 0; font: inherit; font-weight: 700; line-height: 1.4; cursor: pointer; }
.btn.primary { background: linear-gradient(135deg, var(--blue), #1d4ed8); color: #fff; }
.btn.outline { background: #fff; color: var(--blue); box-shadow: inset 0 0 0 1.5px var(--blue); }
.btn:focus-visible { outline: 3px solid rgba(56, 189, 248, 0.6); outline-offset: 2px; }
.feedback .status { min-height: 1.6em; margin: 12px 0 0; font-weight: 600; }
.feedback .status.ok { color: #15803d; } .feedback .status.bad { color: #b91c1c; }
.feedback #fb-manual { margin-top: 8px; font-size: 14px; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .features .grid, .shots { grid-template-columns: 1fr; }
  .privacy-band { flex-direction: column; align-items: flex-start; }
  .docs .topic { grid-template-columns: 1fr; }
}

/* the "Buy me an energy drink" button lives in sponsor.css */
@media (max-width: 640px) {
  .cta .btn, .feedback .actions .btn { width: 100%; text-align: center; }
}
