/* =====================================================================
   Seal Chat website — site.css
   Same colours as the app: dark slate, "sealed" green, Tor violet.
   Sections: 1 tokens · 2 base · 3 buttons · 4 header · 5 hero
             6 sections + cards · 7 how it works · 8 downloads
             9 FAQ · 10 footer · 11 admin area · 11b phone (Seal Chat Web)
             11c Mac + help & source (1.3.0) · 12 small screens
   ===================================================================== */

/* ---------- 1. Tokens ---------- */
:root {
  --bg: #121418; --bg-2: #181b21; --bg-3: #1f232b; --bg-4: #272c36; --line: #2c313b;
  --text: #e6e8ec; --text-2: #a3a9b5; --text-3: #6f7685;
  --accent: #3ccf91; --accent-2: #2aa874; --accent-ink: #062418;
  --violet: #2b2550; --violet-2: #8f7cf0;
  --amber: #f0b445; --red: #ff6464;
  --radius: 14px;
  --font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Ubuntu", "Cantarell", sans-serif;
  --mono: "Cascadia Mono", Consolas, ui-monospace, "DejaVu Sans Mono", monospace;
}

/* ---------- 2. Base ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 var(--font); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code { font-family: var(--mono); font-size: .88em; background: var(--bg-3); border: 1px solid var(--line); padding: 1px 6px; border-radius: 6px; word-break: break-all; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 12px; }
h2 { font-size: clamp(26px, 3.2vw, 36px); letter-spacing: -.3px; }
h3 { font-size: 18px; }
p { margin: 0 0 12px; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.wrap.narrow { max-width: 820px; }
.row { display: flex; align-items: center; gap: 16px; }
.between { justify-content: space-between; flex-wrap: wrap; }
.muted { color: var(--text-2); }
.small { font-size: 14px; }
.accent { color: var(--accent); }
.selectable { user-select: all; }

/* ---------- 3. Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 20px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg-4); color: var(--text); font: 600 15px var(--font); cursor: pointer; text-decoration: none !important; transition: background .15s, transform .15s; }
.btn:hover { background: #313744; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: #4fdca0; transform: translateY(-1px); }
.btn.ghost { background: transparent; }
.btn.big { padding: 14px 26px; font-size: 17px; border-radius: 12px; }
.btn.small { padding: 7px 14px; font-size: 14px; }
.btn.wide { width: 100%; }
.btn.disabled { opacity: .5; cursor: default; }
.btn.danger { color: var(--red); border-color: #5e2a2a; background: transparent; }
.link { background: none; border: 0; color: var(--accent); cursor: pointer; font: inherit; padding: 0; }

/* ---------- 4. Header ---------- */
.topbar { position: sticky; top: 0; z-index: 20; background: rgba(18, 20, 24, .86); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.topbar .wrap { height: 64px; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; font-size: 19px; text-decoration: none !important; }
.brand img { width: 34px; height: 34px; }
.brand.small { font-size: 16px; } .brand.small img { width: 26px; height: 26px; }
.nav { display: flex; align-items: center; gap: 22px; }
.nav a:not(.btn) { color: var(--text-2); font-size: 15px; }
.nav a:not(.btn):hover { color: var(--text); text-decoration: none; }

/* ---------- 5. Hero ---------- */
.hero { padding: 72px 0 40px; background: radial-gradient(900px 500px at 85% 10%, rgba(143, 124, 240, .18), transparent 60%), radial-gradient(700px 400px at 5% 90%, rgba(60, 207, 145, .10), transparent 60%), linear-gradient(180deg, #17142a 0%, var(--bg) 70%); }
.hero-grid { display: grid; grid-template-columns: 1fr 1.08fr; gap: 48px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; color: var(--text-2); font-size: 14px; background: var(--bg-3); border: 1px solid var(--line); border-radius: 999px; padding: 5px 14px; margin-bottom: 20px; }
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent); }
.hero h1 { font-size: clamp(34px, 5vw, 56px); letter-spacing: -1px; margin-bottom: 18px; }
.lead { font-size: 18px; color: var(--text-2); max-width: 560px; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; margin: 26px 0 10px; }
.window { background: var(--bg-2); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; box-shadow: 0 30px 80px rgba(0, 0, 0, .55), 0 0 0 1px rgba(143, 124, 240, .12); }
.window-bar { height: 34px; display: flex; align-items: center; gap: 7px; padding: 0 12px; background: #1a1d24; border-bottom: 1px solid var(--line); color: var(--text-3); font-size: 13px; }
.window-bar i { width: 11px; height: 11px; border-radius: 50%; background: #3a3f4b; }
.window-bar span { margin-left: 8px; }
.hero-shot .window { transform: perspective(1400px) rotateY(-6deg) rotateX(2deg); }
.pills { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 56px; }
.pills span { background: var(--bg-2); border: 1px solid var(--line); border-radius: 999px; padding: 7px 16px; font-size: 14px; color: var(--text-2); }

/* ---------- 6. Sections + cards ---------- */
.section { padding: 88px 0; }
.section.alt { background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-lead { color: var(--text-2); font-size: 18px; max-width: 700px; margin-bottom: 36px; }
.grid { display: grid; gap: 18px; }
.features { grid-template-columns: repeat(4, 1fr); }
.grid.two { grid-template-columns: 1fr 1fr; }
.grid.three { grid-template-columns: repeat(3, 1fr); }
.grid.four { grid-template-columns: repeat(4, 1fr); }
.card { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; transition: border-color .2s, transform .2s; }
.section.alt .card { background: var(--bg); }
.card:hover { border-color: #3b4250; }
.features .card:hover { transform: translateY(-3px); }
.card p { color: var(--text-2); font-size: 15px; margin: 0; }
.card .ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-size: 22px; background: rgba(60, 207, 145, .1); border: 1px solid rgba(60, 207, 145, .25); margin-bottom: 14px; }
.card.tall { padding: 26px 28px; }
ul.ticks, ul.dots { list-style: none; margin: 0; padding: 0; }
ul.ticks li, ul.dots li { position: relative; padding-left: 30px; margin: 12px 0; color: var(--text-2); }
ul.ticks li b, ul.dots li b { color: var(--text); }
ul.ticks li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--accent); font-weight: 700; }
ul.dots li::before { content: "!"; position: absolute; left: 4px; top: 2px; width: 18px; height: 18px; border-radius: 50%; background: rgba(240, 180, 69, .15); color: var(--amber); font: 700 12px/18px var(--font); text-align: center; }
ul.news li { font-size: 17px; }

/* ---------- 7. How it works ---------- */
.how-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.steps { list-style: none; padding: 0; margin: 24px 0 0; }
.steps li { display: flex; gap: 18px; margin-bottom: 26px; }
.steps .num { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; background: var(--accent); color: var(--accent-ink); }
.steps p { color: var(--text-2); margin: 0; }

/* ---------- 8. Downloads ---------- */
.downloads { grid-template-columns: repeat(3, 1fr); }   /* 1.3.0: 6 cards = 2 rows of 3 */
.dl-card { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; display: flex; flex-direction: column; gap: 10px; }
.dl-card.recommended { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 12px 40px rgba(60, 207, 145, .12); }
.dl-card.recommended .dl-top h3::after { content: "Recommended for you"; display: block; font: 600 11px var(--font); color: var(--accent); text-transform: uppercase; letter-spacing: .6px; margin-top: 4px; }
.dl-update { background: linear-gradient(180deg, rgba(143, 124, 240, .08), transparent), var(--bg); }
.dl-top { display: flex; gap: 14px; align-items: flex-start; }
.dl-top h3 { margin: 2px 0 2px; }
.dl-top p { font-size: 14px; margin: 0; }
.dl-os { width: 42px; height: 42px; flex: none; border-radius: 12px; display: grid; place-items: center; background: var(--bg-3); border: 1px solid var(--line); color: var(--text); }
.dl-os svg { width: 24px; height: 24px; }
.dl-meta { font-size: 14px; color: var(--text-3); margin: 0; flex: 1; }
.dl-note { font-size: 13px; color: var(--text-2); margin: 0; }
.sha summary { cursor: pointer; font-size: 13px; color: var(--text-3); }
.sha code { display: block; margin: 6px 0; font-size: 11px; }
.install-help { margin-top: 36px; }
.install-help p { color: var(--text-2); font-size: 15px; }

/* ---------- 9. FAQ ---------- */
details { border: 1px solid var(--line); background: var(--bg); border-radius: 12px; padding: 0 20px; margin-bottom: 10px; }
details summary { cursor: pointer; padding: 16px 0; font-weight: 600; list-style: none; position: relative; padding-right: 28px; }
details summary::-webkit-details-marker { display: none; }
details summary::after { content: "+"; position: absolute; right: 0; top: 13px; font-size: 22px; color: var(--accent); }
details[open] summary::after { content: "–"; }
details p { color: var(--text-2); padding-bottom: 6px; }
details.sha { border: 0; padding: 0; background: none; margin: 0; }
details.sha summary { padding: 0; font-weight: 400; }
details.sha summary::after { content: ""; }

/* ---------- 10. Footer ---------- */
.footer { padding: 34px 0; border-top: 1px solid var(--line); }
.footer p { margin: 0; }

/* ---------- 11. Admin area ---------- */
.admin { max-width: 980px; margin: 0 auto; padding: 32px 24px 80px; }
.admin-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 26px; flex-wrap: wrap; }
.panel { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; margin-bottom: 18px; }
.panel h2 { font-size: 20px; margin-bottom: 4px; }
.panel .hint { color: var(--text-3); font-size: 14px; margin-bottom: 14px; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
.fields .full { grid-column: 1 / -1; }
label.f { display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: var(--text-2); }
label.f input, label.f textarea { background: var(--bg-3); border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; color: var(--text); font: 14px var(--font); outline: none; width: 100%; }
label.f input:focus, label.f textarea:focus { border-color: var(--accent-2); }
label.f input.mono { font-family: var(--mono); font-size: 12.5px; }
.msg { border-radius: 10px; padding: 11px 14px; margin-bottom: 18px; font-size: 15px; }
.msg.ok { background: rgba(60, 207, 145, .1); border: 1px solid rgba(60, 207, 145, .35); color: var(--accent); }
.msg.bad { background: rgba(255, 100, 100, .08); border: 1px solid rgba(255, 100, 100, .35); color: var(--red); }
.login { max-width: 420px; margin: 9vh auto 0; }
.login .brand { justify-content: center; margin-bottom: 18px; font-size: 22px; }
.login .panel { padding: 26px; }
.actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; position: sticky; bottom: 0; padding: 14px 0; background: linear-gradient(180deg, transparent, var(--bg) 35%); }
.item-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.item-head .dl-os { width: 36px; height: 36px; }
.badge { font-size: 12px; padding: 2px 9px; border-radius: 999px; background: var(--bg-4); color: var(--text-2); }
.badge.on { background: rgba(60, 207, 145, .12); color: var(--accent); }

form.inline { margin: 0; }
.m0 { margin: 0; }
.center { text-align: center; }

/* ---------- 11b. Use it on your phone — Seal Chat Web (1.2.1) ---------- */
.flow { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; align-items: stretch; gap: 12px; margin: 30px 0 26px; }
.flow-box { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; text-align: center; }
.flow-box .ic { width: 48px; height: 48px; margin: 0 auto 10px; border-radius: 12px; display: grid; place-items: center; font-size: 24px; background: rgba(60, 207, 145, .1); border: 1px solid rgba(60, 207, 145, .25); }
.flow-box h3 { margin: 0 0 6px; }
.flow-box p { color: var(--text-2); font-size: 15px; margin: 0; }
.flow-arrow { display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--accent); font-size: 26px; line-height: 1; }
.flow-arrow span { font-size: 11px; text-transform: uppercase; letter-spacing: .8px; color: var(--text-3); margin-bottom: 4px; }
.web-grid { margin-bottom: 26px; }
.web-install { display: grid; grid-template-columns: 1.6fr 1fr; gap: 28px; align-items: start; }
.web-install h3 { margin-top: 0; }
.steps.compact li { margin-bottom: 14px; gap: 14px; align-items: flex-start; }
.steps.compact .num { width: 30px; height: 30px; font-size: 14px; }
.web-dl .dl-card { background: var(--bg-2); }
.web-dl p { margin-top: 12px; }
.web-hint { margin: 22px 0 0; }

/* ---------- 11c. Mac + help & source (1.3.0) ---------- */
.mac-grid .card p { margin: 0 0 10px; }
.mac-grid ul.ticks li { margin: 8px 0; }
ul.dots.mac-notes { margin-top: 28px; }
.mac-notes li { max-width: 900px; }
.grid.docs { max-width: 820px; }
.grid.docs .dl-card { background: var(--bg-2); }
/* 1.3.2: macOS 12 (legacy) fold-out inside a macOS card — small and closed by default */
details.legacy { border: 0; padding: 0; background: none; margin: 0; border-top: 1px dashed var(--line); padding-top: 8px; }
details.legacy summary { padding: 0; font-weight: 400; font-size: 13px; color: var(--text-3); }
details.legacy summary::after { content: "▸"; top: 0; font-size: 12px; color: var(--text-3); }
details.legacy[open] summary::after { content: "▾"; }
.legacy-body { font-size: 13px; color: var(--text-2); padding-top: 6px; }
.legacy-body p { margin: 0 0 6px; color: var(--text-2); font-size: 13px; }
.legacy-body ul { margin: 0 0 8px; padding-left: 18px; }
.legacy-body li { margin: 3px 0; }
.legacy-body code { font-size: 10px; }
.legacy-link a { text-decoration: underline; }
.admin-group { font-size: 13px; text-transform: uppercase; letter-spacing: .8px; color: var(--text-3); margin: 30px 0 10px; }
.admin-group:first-of-type { margin-top: 8px; }

/* 1.4.1: the short notes under the Android download card */
ul.small-dots { margin-top: 16px; }
ul.small-dots li { font-size: 14px; margin: 8px 0; }

/* ---------- 12. Small screens ---------- */
@media (max-width: 1000px) {
  .features, .downloads, .grid.four { grid-template-columns: repeat(2, 1fr); }
  .hero-grid, .how-grid, .web-install { grid-template-columns: 1fr; }
  .flow { grid-template-columns: 1fr; }
  .flow { gap: 6px; }
  .flow-arrow { flex-direction: row; gap: 8px; font-size: 20px; }
  .flow-arrow span { margin: 0; }
  .hero-shot .window { transform: none; }
  .android-install .web-dl { order: -1; }   /* 1.4.1: Android download card above the install steps */
}
@media (max-width: 720px) {
  .nav a:not(.btn) { display: none; }
  .features, .downloads, .grid.two, .grid.three, .grid.four, .fields { grid-template-columns: 1fr; }
  .section { padding: 64px 0; }
  .hero { padding-top: 44px; }
}

/* 1.5.1: admin — the release from GitHub */
.kv-list p { margin: 4px 0; color: var(--text-2); font-size: 15px; }
.kv-list b { color: var(--text); }
span.bad { color: var(--red); }
.mono { font-family: var(--mono); }
p.mono a { word-break: break-all; }

/* ---- Seal PGP: "Seal PGP /" link back to sealpgp.com in the header ---- */
.brand-group { display: flex; align-items: center; gap: 10px; min-width: 0; }
.parent { display: flex; align-items: center; gap: 8px; color: var(--text-2); font-weight: 600; font-size: 15px; text-decoration: none !important; }
.parent:hover { color: var(--text); }
.parent img { width: 30px; height: 30px; }
.brand-group .sep { color: var(--text-2); opacity: .5; }
@media (max-width: 600px) { .parent span { display: none; } }
