/* The look every page shares, taken from the K app icon: a glowing mint BlockDAG on deep
   black. Each page links this first, then keeps its own <style> for what only it has; those
   rules come later, so they win where they differ. The names (--teal, --cell, .card, .list...)
   are the ones the pages already use, so their own rules pick up the new colours. */
:root{
  --bg:#04080a;
  --bg-2:#071214;
  --cell:rgba(127,245,220,.045);
  --cell-2:rgba(127,245,220,.085);
  --cell-3:rgba(127,245,220,.13);
  --sep:rgba(127,245,220,.13);
  --text:#effffb;
  --muted:#8fb2ac;
  --muted-2:#5d7d78;
  --teal:#7ff5dc;            /* the icon's mint */
  --teal-deep:#2fbfa4;
  --teal-ink:#03201a;        /* text on a mint fill */
  --teal-dim:rgba(127,245,220,.12);
  --teal-ring:rgba(127,245,220,.34);
  --glow:0 0 0 1px rgba(127,245,220,.22), 0 18px 50px rgba(47,191,164,.16);
  --glass:rgba(4,8,10,.74);
  --glass-stroke:rgba(127,245,220,.14);
  --green:#30d158; --blue:#0a84ff; --orange:#ff9f0a; --purple:#bf5af2;
  --pink:#ff375f; --indigo:#5e5ce6; --yellow:#ffd60a; --red:#ff453a; --gray:#8e8e93;
  --r-cell:16px; --r-card:22px; --r-btn:14px;
  --maxw:1120px;
  --font:-apple-system,BlinkMacSystemFont,"SF Pro Text","SF Pro Display","Segoe UI",Roboto,Helvetica,Arial,"Apple Color Emoji","Segoe UI Emoji",sans-serif;
  --mono:ui-monospace,"SF Mono",SFMono-Regular,Menlo,Consolas,monospace;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth; -webkit-text-size-adjust:100%; background:var(--bg)}
body{margin:0; background:var(--bg); color:var(--text); font-family:var(--font); font-size:17px; line-height:1.5;
  -webkit-font-smoothing:antialiased; overflow-x:hidden}
/* The icon's glow, behind everything. */
body::before{content:""; position:fixed; inset:0; z-index:-1; pointer-events:none;
  background:
    radial-gradient(60% 40% at 50% -8%, rgba(127,245,220,.16), transparent 70%),
    radial-gradient(40% 30% at 100% 30%, rgba(47,191,164,.07), transparent 70%),
    radial-gradient(40% 30% at 0% 70%, rgba(47,191,164,.06), transparent 70%)}
a{color:inherit; text-decoration:none}
.wrap{max-width:var(--maxw); margin:0 auto; padding:0 20px}
code{font-family:var(--mono)}
::selection{background:rgba(127,245,220,.3)}
:focus-visible{outline:2px solid var(--teal); outline-offset:3px; border-radius:6px}

/* ---------- the bar along the top ---------- */
header.nav{position:sticky; top:0; z-index:50; background:var(--glass);
  -webkit-backdrop-filter:blur(20px) saturate(160%); backdrop-filter:blur(20px) saturate(160%);
  border-bottom:1px solid var(--glass-stroke)}
.nav-in{display:flex; align-items:center; gap:16px; height:60px}
.brand{display:flex; align-items:center; gap:10px; font-weight:800; font-size:19px; letter-spacing:-.02em}
.mark{width:32px; height:32px; flex:0 0 auto; display:block; filter:drop-shadow(0 0 10px rgba(127,245,220,.35))}
.nav-links{margin-left:auto; display:flex; align-items:center; gap:22px; font-size:15px; color:var(--muted)}
.nav-links a:not(.btn){transition:color .15s}
.nav-links a:not(.btn):hover{color:var(--teal)}
@media (max-width:820px){ .nav-links a:not(.btn){display:none} .nav-links{gap:8px} }
@media (max-width:400px){ .nav-in{gap:10px} .nav-links .btn-sm{padding:0 11px; font-size:14px} }
@media (max-width:360px){ .brand{font-size:0; gap:0} }

/* The old logo tile, for anything still using it: now the sphere, uncropped. */
.tile{display:inline-grid; place-items:center; overflow:hidden; border-radius:50%; flex:0 0 auto}
.tile img{width:100%; height:100%; object-fit:cover}

/* ---------- buttons ---------- */
.btn{display:inline-flex; align-items:center; justify-content:center; gap:8px; border-radius:var(--r-btn);
  font-weight:650; font-size:17px; letter-spacing:-.01em; padding:0 20px; height:50px;
  transition:filter .15s, transform .15s, box-shadow .15s, background .15s, border-color .15s;
  -webkit-tap-highlight-color:transparent; white-space:nowrap; border:1px solid transparent}
.btn:active{transform:scale(.98)}
.btn-fill{background:linear-gradient(180deg, #9ffbe7, var(--teal) 55%, #5fe6c9); color:var(--teal-ink);
  box-shadow:0 0 0 1px rgba(127,245,220,.5), 0 10px 30px rgba(127,245,220,.22)}
.btn-fill:hover{filter:brightness(1.06); box-shadow:0 0 0 1px rgba(127,245,220,.7), 0 12px 38px rgba(127,245,220,.32)}
.btn-gray{background:var(--cell-2); color:var(--text); border-color:var(--sep)}
.btn-gray:hover{background:var(--cell-3); border-color:var(--teal-ring)}
.btn-tinted{background:var(--teal-dim); color:var(--teal); border-color:rgba(127,245,220,.18)}
.btn-tinted:hover{background:rgba(127,245,220,.2)}
.btn-sm{height:36px; font-size:15px; padding:0 15px; border-radius:999px}
.btn svg{width:20px; height:20px; flex:0 0 auto}

/* ---------- headings and sections ---------- */
h1, h2, h3{letter-spacing:-.02em}
section{padding:64px 0}
.sec-head{text-align:center; margin-bottom:36px}
.sec-head h2{font-size:clamp(28px,4.4vw,44px); letter-spacing:-.03em; margin:0 0 12px; font-weight:800; line-height:1.1}
.sec-head p{color:var(--muted); max-width:62ch; margin:0 auto; font-size:17px}
.eyebrow{display:inline-flex; align-items:center; gap:8px; margin:0 0 14px; padding:5px 12px; border-radius:999px;
  background:var(--teal-dim); border:1px solid rgba(127,245,220,.18); color:var(--teal);
  font-size:13px; font-weight:700; letter-spacing:.06em; text-transform:uppercase}
.group-label{font-size:13px; text-transform:uppercase; letter-spacing:.06em; color:var(--muted); margin:0 0 8px 16px; font-weight:600}
.group-foot{font-size:13px; color:var(--muted); margin:8px 16px 0}
.back{display:inline-flex; align-items:center; gap:6px; color:var(--teal); font-size:15px; font-weight:600}
.back svg{width:8px; height:13px}

/* Icon tiles: mint glass in place of the old Settings colours. */
.ic{width:30px; height:30px; border-radius:8px; display:grid; place-items:center; flex:0 0 auto; color:var(--teal);
  background:var(--teal-dim); box-shadow:inset 0 0 0 1px rgba(127,245,220,.22)}
.ic svg{width:18px; height:18px}
.ic.lg{width:46px; height:46px; border-radius:13px}
.ic.lg svg{width:24px; height:24px}
.ic svg[stroke="#fff"], .ic svg [stroke="#fff"]{stroke:var(--teal)}
.ic svg[fill="#fff"], .ic svg [fill="#fff"]{fill:var(--teal)}
.bg-teal, .bg-green, .bg-blue, .bg-orange, .bg-purple, .bg-pink, .bg-indigo, .bg-gray, .bg-red, .bg-yellow{background:var(--teal-dim)}

/* ---------- grouped lists ---------- */
.list{background:var(--cell); border:1px solid var(--sep); border-radius:var(--r-cell); overflow:hidden}
.row{display:flex; gap:14px; align-items:flex-start; padding:15px 16px; position:relative}
.row + .row::before{content:""; position:absolute; top:0; right:0; left:60px; height:1px; background:var(--sep)}
.row .num{width:30px; height:30px; border-radius:50%; display:grid; place-items:center; flex:0 0 auto;
  background:var(--teal); color:var(--teal-ink); font-weight:800; font-size:15px; box-shadow:0 0 18px rgba(127,245,220,.35)}
.row h3{margin:0 0 3px; font-size:17px; font-weight:650; letter-spacing:-.01em}
.row p{margin:0; color:var(--muted); font-size:15px; line-height:1.55}
.row code{font-size:.88em; color:var(--teal)}
.link-row{display:flex; align-items:center; gap:14px; padding:12px 16px; position:relative; transition:background .12s}
.link-row + .link-row::before{content:""; position:absolute; top:0; right:0; left:60px; height:1px; background:var(--sep)}
.link-row:hover{background:var(--cell-2)}
.link-row .label{flex:1; font-size:17px}
.link-row .detail{color:var(--muted); font-size:15px}
.link-row .chev{width:9px; height:15px; color:var(--muted-2); flex:0 0 auto}

/* ---------- cards ---------- */
.card{background:linear-gradient(180deg, rgba(127,245,220,.065), rgba(127,245,220,.02)); border:1px solid var(--sep);
  border-radius:var(--r-card); padding:22px; transition:transform .2s, border-color .2s, box-shadow .2s}
.card:hover{transform:translateY(-3px); border-color:var(--teal-ring); box-shadow:var(--glow)}
.card .ic{margin-bottom:14px}
.card h3{margin:0 0 6px; font-size:18px; font-weight:700; letter-spacing:-.015em}
.card p{margin:0; color:var(--muted); font-size:15px; line-height:1.55}
.card .pill{display:inline-block; margin-top:12px; font-size:12.5px; font-weight:650; color:var(--teal);
  background:var(--teal-dim); padding:4px 10px; border-radius:999px}
.appicon{width:56px; height:56px; border-radius:22%; flex:0 0 auto; display:block; background:#000;
  box-shadow:0 0 0 1px rgba(127,245,220,.18), 0 8px 24px rgba(0,0,0,.45)}

/* Store badges stay in Apple's and Google's light style. */
.badge{display:inline-flex; align-items:center; gap:11px; height:56px; padding:0 18px; border-radius:var(--r-btn);
  background:#fff; color:#000; min-width:190px; transition:transform .15s, filter .15s}
.badge:hover{transform:translateY(-2px); filter:brightness(.97)}
.badge .glyph{width:26px; height:26px; flex:0 0 auto; display:grid; place-items:center}
.badge .glyph svg{width:100%; height:100%; display:block}
.badge .t{display:flex; flex-direction:column; text-align:left; line-height:1.05}
.badge .t small{font-size:11px; color:#3a3a3c; font-weight:600}
.badge .t strong{font-size:18px; font-weight:700; letter-spacing:-.01em; margin-top:1px}

/* ---------- the footer ---------- */
footer.site{border-top:1px solid var(--sep); padding:44px 0 calc(44px + env(safe-area-inset-bottom)); margin-top:32px;
  text-align:center; color:var(--muted); font-size:14px; background:linear-gradient(180deg, transparent, rgba(127,245,220,.03))}
footer.site .fbrand{display:inline-flex; align-items:center; gap:10px; font-weight:800; color:var(--text); font-size:18px; margin-bottom:16px}
footer.site .fbrand .mark{width:30px; height:30px}
footer.site .flinks{display:flex; gap:12px 20px; justify-content:center; flex-wrap:wrap; margin-bottom:16px}
footer.site .flinks a{color:var(--teal)}
footer.site .flinks a:hover{text-decoration:underline}
footer.site .fine{font-size:12.5px; line-height:1.6}

/* ---------- phones ---------- */
@media (max-width:560px){
  .wrap{padding:0 16px}
  section{padding:46px 0}
  .sec-head p{font-size:15.5px}
  .badge{width:100%; min-width:0; justify-content:center}
}
@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  *, *::before, *::after{transition:none !important}
  .card:hover, .badge:hover{transform:none}
}

/* ---------- the Install menu (install-menu.js): latest version or beta ---------- */
.install-menu{padding:0; border:1px solid var(--sep); border-radius:var(--r-card); background:var(--bg-2); color:var(--text);
  width:min(420px, calc(100% - 32px)); box-shadow:var(--glow), 0 30px 80px rgba(0,0,0,.6)}
.install-menu:focus{outline:none}
.install-menu::backdrop{background:rgba(0,0,0,.6); -webkit-backdrop-filter:blur(6px); backdrop-filter:blur(6px)}
.install-menu .im-in{padding:18px}
.install-menu .im-head{display:flex; align-items:center; justify-content:space-between; margin:0 0 14px 4px}
.install-menu h2{margin:0; font-size:20px; font-weight:800}
.install-menu .im-close{width:32px; height:32px; border-radius:50%; display:grid; place-items:center; cursor:pointer;
  background:var(--cell-2); color:var(--muted); border:1px solid var(--sep)}
.install-menu .im-close:hover{color:var(--text); border-color:var(--teal-ring)}
.install-menu .im-close svg{width:16px; height:16px}
.install-menu .link-row{padding:14px 16px}
.install-menu .label{font-weight:650}
.install-menu .label small{display:block; color:var(--muted); font-size:14px; font-weight:400; margin-top:2px}
/* On a phone it rises from the bottom, like a share sheet. */
@media (max-width:560px){
  .install-menu{width:100%; max-width:none; margin:auto 0 0; border-radius:var(--r-card) var(--r-card) 0 0; border-bottom:0}
  .install-menu .im-in{padding:18px 16px calc(18px + env(safe-area-inset-bottom))}
}
