/* AK VPN - public front page. Own colourful theme (does not follow the panel's dark mode), mobile-first. */
:root {
  --ink: #0f172a;
  --text: #334155;
  --muted: #64748b;
  --line: #e2e8f0;
  --bg: #ffffff;
  --soft: #f8fafc;
  --blue: #2563eb;
  --violet: #7c3aed;
  --teal: #0d9488;
  --orange: #ea580c;
  --pink: #db2777;
  --green: #16a34a;
  --amber: #d97706;
  --sky: #0284c7;
  --indigo: #4f46e5;
  --radius: 18px;
  --shadow: 0 10px 30px rgba(15, 23, 42, .08);
  --grad: linear-gradient(135deg, #1d4ed8 0%, #7c3aed 55%, #db2777 100%);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif; -webkit-text-size-adjust: 100%; }
img { max-width: 100%; }
a { color: var(--blue); text-decoration: none; }
h1, h2, h3 { color: var(--ink); line-height: 1.2; margin: 0; }
.wrap { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 18px; }

/* ---------- buttons ---------- */
.b { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 48px; padding: .7rem 1.3rem; border-radius: 14px; font-weight: 700; font-size: 1rem; border: 2px solid transparent; cursor: pointer; text-align: center; transition: transform .15s ease, box-shadow .15s ease; }
.b:hover { transform: translateY(-1px); text-decoration: none; }
.b-white { background: #fff; color: var(--blue); box-shadow: 0 6px 18px rgba(0, 0, 0, .15); }
.b-glass { background: rgba(255, 255, 255, .14); color: #fff; border-color: rgba(255, 255, 255, .55); }
.b-primary { background: var(--grad); color: #fff; box-shadow: 0 8px 20px rgba(124, 58, 237, .3); }
.b-outline { background: #fff; color: var(--ink); border-color: var(--line); }
.b-sm { min-height: 40px; padding: .45rem .9rem; font-size: .92rem; border-radius: 12px; }

/* ---------- header ---------- */
.top { position: sticky; top: 0; z-index: 20; background: rgba(255, 255, 255, .92); backdrop-filter: saturate(180%) blur(10px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; gap: .8rem; min-height: 64px; }
.logo { display: flex; align-items: center; gap: .55rem; font-weight: 800; font-size: 1.15rem; color: var(--ink); }
.logo img { width: 34px; height: 34px; }
.menu-toggle { margin-left: auto; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: #fff; font-size: 1.3rem; color: var(--ink); cursor: pointer; }
.top .login { margin-left: .2rem; }
.nav { display: none; position: absolute; top: 64px; left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--line); padding: .5rem 18px 1rem; flex-direction: column; box-shadow: var(--shadow); }
.nav.open { display: flex; }
.nav a { padding: .8rem .4rem; color: var(--ink); font-weight: 600; border-bottom: 1px solid var(--line); }
.nav a:last-child { border-bottom: 0; }
@media (min-width: 900px) {
  .menu-toggle { display: none; }
  .nav { display: flex; position: static; flex-direction: row; gap: 1.6rem; padding: 0; border: 0; box-shadow: none; background: transparent; margin-left: auto; }
  .nav a { border: 0; padding: 0; }
  .top .login { margin-left: 1.2rem; }
}

/* ---------- hero ---------- */
.hero { background: var(--grad); color: #fff; position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; right: -120px; top: -120px; width: 380px; height: 380px; border-radius: 50%; background: rgba(255, 255, 255, .08); }
.hero .wrap { position: relative; z-index: 1; display: grid; gap: 2rem; padding-top: 2.6rem; padding-bottom: 3rem; }
.hero .kicker { display: inline-block; background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .35); padding: .3rem .8rem; border-radius: 99px; font-size: .85rem; font-weight: 700; letter-spacing: .02em; }
.hero h1 { color: #fff; font-size: clamp(1.9rem, 7vw, 3.2rem); font-weight: 800; margin: .9rem 0 .8rem; }
.hero p.lead { font-size: 1.1rem; color: rgba(255, 255, 255, .92); margin: 0 0 1.4rem; max-width: 620px; }
.hero .cta { display: grid; gap: .7rem; grid-template-columns: 1fr; max-width: 520px; }
.hero .chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.4rem; padding: 0; list-style: none; }
.hero .chips li { background: rgba(255, 255, 255, .16); border-radius: 99px; padding: .35rem .8rem; font-size: .9rem; font-weight: 600; }
@media (min-width: 560px) { .hero .cta { grid-template-columns: auto auto auto; justify-content: start; } }
@media (min-width: 960px) { .hero .wrap { grid-template-columns: 1.3fr 1fr; align-items: center; padding-top: 4.5rem; padding-bottom: 4.5rem; } }

.diagram { background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .3); border-radius: 24px; padding: 1.4rem; display: flex; flex-direction: column; align-items: center; gap: .55rem; }
.diagram .n { background: #fff; color: var(--ink); border-radius: 14px; padding: .55rem 1rem; font-weight: 800; text-align: center; box-shadow: 0 6px 16px rgba(0, 0, 0, .12); }
.diagram .n small { display: block; font-weight: 500; color: var(--muted); font-size: .78rem; }
.diagram .n.core { background: #fde68a; }
.diagram .wire { width: 3px; height: 22px; background: rgba(255, 255, 255, .8); border-radius: 2px; }
.diagram .row { display: flex; flex-wrap: wrap; justify-content: center; gap: .45rem; }

/* ---------- sections ---------- */
.sec { padding: 3.2rem 0; }
.sec.soft { background: var(--soft); }
.sec-head { text-align: center; max-width: 720px; margin: 0 auto 2rem; }
.tag { display: inline-block; font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; padding: .3rem .8rem; border-radius: 99px; margin-bottom: .7rem; }
.tag.blue { background: #dbeafe; color: #1d4ed8; } .tag.violet { background: #ede9fe; color: #6d28d9; } .tag.teal { background: #ccfbf1; color: #0f766e; }
.tag.orange { background: #ffedd5; color: #c2410c; } .tag.pink { background: #fce7f3; color: #be185d; } .tag.green { background: #dcfce7; color: #15803d; }
.sec-head h2 { font-size: clamp(1.5rem, 5vw, 2.2rem); font-weight: 800; }
.sec-head p { color: var(--muted); margin: .7rem 0 0; font-size: 1.05rem; }

.grid { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid.g2, .grid.g3, .grid.g4 { grid-template-columns: 1fr 1fr; } }
@media (min-width: 980px) { .grid.g3 { grid-template-columns: repeat(3, 1fr); } .grid.g4 { grid-template-columns: repeat(4, 1fr); } }

/* coloured cards: --c is the accent of each card */
.card { --c: var(--blue); background: #fff; border: 1px solid var(--line); border-top: 5px solid var(--c); border-radius: var(--radius); padding: 1.3rem; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: .55rem; }
.card .ic { width: 52px; height: 52px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 1.6rem; background: #eef2ff; background: color-mix(in srgb, var(--c) 14%, #fff); }
.card h3 { font-size: 1.12rem; font-weight: 800; }
.card p { margin: 0; }
.card .ex { font-size: .9rem; color: var(--muted); background: var(--soft); border-radius: 10px; padding: .5rem .7rem; }
.c-blue { --c: var(--blue); } .c-violet { --c: var(--violet); } .c-teal { --c: var(--teal); } .c-orange { --c: var(--orange); }
.c-pink { --c: var(--pink); } .c-green { --c: var(--green); } .c-amber { --c: var(--amber); } .c-sky { --c: var(--sky); } .c-indigo { --c: var(--indigo); }

/* download cards */
.dl { position: relative; }
.dl .btns { display: flex; flex-direction: column; gap: .5rem; margin-top: auto; padding-top: .4rem; }
.dl .b { width: 100%; }
.dl .b-c { background: var(--c); color: #fff; }
.dl .b-c2 { background: #fff; color: var(--c); border-color: var(--c); }
.dl .rec { display: none; position: absolute; top: -12px; right: 14px; background: var(--green); color: #fff; font-size: .75rem; font-weight: 800; padding: .25rem .65rem; border-radius: 99px; }
.dl.recommended { box-shadow: 0 0 0 3px var(--green), var(--shadow); }
.dl.recommended .rec { display: block; }
.code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .85rem; background: #0f172a; color: #e2e8f0; border-radius: 10px; padding: .6rem .7rem; overflow-x: auto; white-space: nowrap; }

/* steps */
.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 860px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.steps li { counter-increment: s; background: #fff; border-radius: var(--radius); padding: 1.4rem; box-shadow: var(--shadow); border: 1px solid var(--line); }
.steps li::before { content: counter(s); display: flex; width: 44px; height: 44px; border-radius: 50%; background: var(--grad); color: #fff; font-weight: 800; font-size: 1.2rem; align-items: center; justify-content: center; margin-bottom: .7rem; }
.steps h3 { font-size: 1.1rem; margin-bottom: .35rem; }
.steps p { margin: 0; color: var(--muted); }

/* features: compact rows */
.feat { display: flex; gap: .8rem; align-items: flex-start; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 1rem; }
.feat .dot { flex: 0 0 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; background: #eef2ff; background: color-mix(in srgb, var(--c, var(--blue)) 14%, #fff); }
.feat b { display: block; color: var(--ink); }
.feat span { color: var(--muted); font-size: .93rem; }

/* why band */
.why { background: linear-gradient(135deg, #0f766e, #0284c7); color: #fff; }
.why .sec-head h2, .why .sec-head p { color: #fff; }
.why .tag { background: rgba(255, 255, 255, .18); color: #fff; }
.why .item { background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .3); border-radius: var(--radius); padding: 1.2rem; }
.why .item h3 { color: #fff; font-size: 1.08rem; margin-bottom: .35rem; }
.why .item p { margin: 0; color: rgba(255, 255, 255, .9); }

/* faq */
.faq { max-width: 820px; margin: 0 auto; display: flex; flex-direction: column; gap: .7rem; }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: .95rem 1.1rem; box-shadow: 0 2px 8px rgba(15, 23, 42, .04); }
.faq summary { cursor: pointer; font-weight: 700; color: var(--ink); list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--violet); font-size: 1.3rem; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq p { margin: .6rem 0 0; color: var(--text); }

/* final call to action */
.final { background: var(--grad); color: #fff; text-align: center; }
.final h2 { color: #fff; font-size: clamp(1.5rem, 5vw, 2.2rem); }
.final p { color: rgba(255, 255, 255, .9); }
.final .row { display: flex; flex-wrap: wrap; justify-content: center; gap: .7rem; margin-top: 1.3rem; }

/* footer */
.foot { background: var(--ink); color: #cbd5e1; padding: 2rem 0 6rem; font-size: .92rem; }
.foot a { color: #fff; }
.foot .wrap { display: flex; flex-direction: column; gap: .5rem; text-align: center; }
.foot small { color: #94a3b8; }
@media (min-width: 900px) { .foot { padding-bottom: 2rem; } }

/* mobile bottom bar: always-visible Login + Download */
.bottom-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; padding: .6rem 12px calc(.6rem + env(safe-area-inset-bottom)); background: rgba(255, 255, 255, .96); border-top: 1px solid var(--line); box-shadow: 0 -6px 20px rgba(15, 23, 42, .08); }
@media (min-width: 900px) { .bottom-bar { display: none; } }

/* ---------- user guide (/guide) ---------- */
.guide-hero .wrap { display: block; padding-top: 2rem; padding-bottom: 2.2rem; }
.guide-hero h1 { font-size: clamp(1.7rem, 6vw, 2.6rem); margin: .8rem 0 .5rem; }
.lang-switch { display: inline-flex; background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .4); border-radius: 99px; padding: 3px; }
.lang-switch a { color: #fff; font-weight: 700; padding: .35rem .95rem; border-radius: 99px; font-size: .92rem; }
.lang-switch a.on { background: #fff; color: var(--violet); }
.g-search { display: flex; align-items: center; gap: .6rem; background: #fff; border-radius: 14px; padding: 0 .9rem; max-width: 620px; box-shadow: 0 8px 24px rgba(0, 0, 0, .15); }
.g-search input { flex: 1; border: 0; outline: 0; font: inherit; font-size: 1rem; padding: .9rem 0; background: transparent; color: var(--ink); min-width: 0; }

.g-layout { display: grid; gap: 1.5rem; grid-template-columns: 1fr; padding-top: 1.5rem; padding-bottom: 3rem; }
@media (min-width: 980px) { .g-layout { grid-template-columns: 290px 1fr; align-items: start; } }

.g-toc details { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem 1rem; box-shadow: var(--shadow); }
.g-toc summary { cursor: pointer; font-weight: 800; color: var(--ink); font-size: 1.05rem; }
.g-toc-group { margin: .9rem 0 .3rem; font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--violet); }
.g-toc ul { list-style: none; margin: 0; padding: 0; }
.g-toc li a { display: block; padding: .38rem .45rem; border-radius: 8px; color: var(--text); font-size: .94rem; }
.g-toc li a:hover { background: var(--soft); text-decoration: none; color: var(--blue); }
@media (min-width: 980px) { .g-toc { position: sticky; top: 80px; max-height: calc(100vh - 100px); overflow-y: auto; } }

.g-group { margin-bottom: 1.6rem; }
.g-group-title { font-size: 1.3rem; font-weight: 800; margin: .4rem 0 .9rem; padding-left: .8rem; border-left: 5px solid var(--violet); }
.g-cat { margin-bottom: 1.1rem; scroll-margin-top: 80px; }
.g-cat-head { display: flex; align-items: center; gap: .8rem; }
.g-cat-head h3 { font-size: 1.2rem; }
.g-intro { color: var(--text); margin: .2rem 0 .2rem; }
.g-cat code { background: var(--soft); border: 1px solid var(--line); border-radius: 6px; padding: .05rem .35rem; font-size: .88em; word-break: break-word; }

.g-steps { counter-reset: gs; list-style: none; margin: .4rem 0 0; padding: 0; display: flex; flex-direction: column; gap: .7rem; }
.g-steps > li { counter-increment: gs; position: relative; padding-left: 2.6rem; }
.g-steps > li::before { content: counter(gs); position: absolute; left: 0; top: .05rem; width: 1.85rem; height: 1.85rem; border-radius: 50%; background: var(--c); color: #fff; font-weight: 800; font-size: .92rem; display: flex; align-items: center; justify-content: center; }
.g-steps p { margin: 0; }
.g-code { position: relative; margin-top: .45rem; }
.g-code pre { margin: 0; background: #0f172a; color: #e2e8f0; border-radius: 10px; padding: .8rem 4.8rem .8rem .9rem; overflow-x: auto; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .85rem; line-height: 1.5; white-space: pre; }
.g-code button { position: absolute; top: .4rem; right: .4rem; min-height: 32px; padding: .2rem .7rem; }

.g-note { border-radius: 12px; padding: .75rem .9rem; font-size: .95rem; }
.g-note.tip { background: #ecfdf5; border: 1px solid #a7f3d0; color: #065f46; }
.g-note.warn { background: #fff7ed; border: 1px solid #fed7aa; color: #9a3412; }
.g-note code { background: rgba(255, 255, 255, .7); }
.g-top { align-self: flex-end; font-size: .88rem; font-weight: 700; }
.g-empty { background: #fff7ed; border: 1px solid #fed7aa; border-radius: 12px; padding: 1rem; color: #9a3412; }
.g-help { background: var(--grad); color: #fff; border-radius: var(--radius); padding: 1.6rem; text-align: center; }
.g-help h2 { color: #fff; }
.g-help .row { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; margin-top: 1rem; }
mark { background: #fde68a; color: inherit; border-radius: 3px; padding: 0 .1rem; }
.guide-cta { text-align: center; margin: 1.6rem 0 0; }
.g-layout > * { min-width: 0; }
