:root {
  --bg: #efeae0;
  --surface: #fbf8f2;
  --surface-2: #f3eee3;
  --text: #17181c;
  --muted: #6c6a62;
  --border: #ddd5c5;
  --accent: #e07a63;        /* soft vermilion for fills; text on it is dark ink */
  --accent-text: #b04028;   /* the same hue for small text and icons on the cream paper (4.9:1) */
  --accent-fg: #2b0e07;
  --hl: #ffe27a;
  --enc: #0b7a55;
  --enc-bg: #e3f1ea;
  --row: 46px;
  --font-body: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Plus Jakarta Sans", "DM Sans", system-ui, sans-serif; /* was "Bricolage Grotesque" 700/800 until 2026-10-15: to go back, change this and the bunny.net <link> family (bricolage-grotesque:700,800) in every page */
  --font-mono: "DM Mono", ui-monospace, "SF Mono", Consolas, "Liberation Mono", monospace;
  --font-logo: "Outfit", "DM Sans", system-ui, sans-serif;
  color-scheme: light;
}
[data-theme="dark"] {
  --bg: #0d0f13;
  --surface: #151820;
  --surface-2: #1b1f29;
  --text: #ece9e1;
  --muted: #9a9a95;
  --border: #272c36;
  --accent: #e8907c;
  --accent-text: #ee9d8a;
  --accent-fg: #1a0b07;
  --hl: #5b4a0f;
  --enc: #5fc79c;
  --enc-bg: #12241d;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15.5px/1.55 var(--font-body);
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}
a { color: inherit; text-decoration: none; }
svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
code, .plan em { font-family: var(--font-mono); }

.page {
  width: 100%;
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr); /* without this, a child with a long unbreakable line (e.g. a <pre> code
    block) grows the implicit auto column past the available width instead of scrolling inside it */
  grid-template-rows: auto 1fr auto;
  gap: clamp(8px, 2vh, 22px);
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 28px clamp(10px, 2vh, 22px);
}

/* ---------- beta offer: landing.js swaps the hero button to the beta size and pins this counter to its corner while places are left
   (absolutely placed, so it never widens the button or moves anything around it) ---------- */
#hero-cta { position: relative; }
#hero-cta .slots {
  position: absolute;
  top: -10px;
  right: -8px;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--text);
  color: var(--bg);
  font: 500 10.5px/1 var(--font-mono);
  letter-spacing: .02em;
  white-space: nowrap;
  pointer-events: none;
}

/* ---------- keyboard focus (links, buttons, fields, FAQ rows) ---------- */
a:focus-visible, button:focus-visible, input:focus-visible, summary:focus-visible {
  outline: 2px solid var(--accent-text); outline-offset: 3px; border-radius: 6px;
}
.btn:focus-visible { border-radius: 11px; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- header (every landing page): brand | How it works, Plans, Windows app | theme, Sign in, Create account.
   Create account is an outlined ink button, so the homepage hero button stays the only vermilion button.
   Below 1000 px it goes (the hero button / page CTAs are right there); phones keep brand, theme and Sign in. ---------- */
.top { display: flex; align-items: center; gap: 28px; min-height: 72px; padding: 8px 0; }
.top .brand { font-size: 20px; }
.top-links { display: flex; gap: 4px; margin-right: auto; }
.top-links a, .top-signin { padding: 8px 10px; border-radius: 8px; font-weight: 500; font-size: 15px; color: var(--muted); white-space: nowrap; }
.top-links a:hover, .top-signin:hover { color: var(--text); background: var(--surface); }
.top-links a[aria-current="page"] { color: var(--text); }
.top-end { display: flex; align-items: center; gap: 6px; }
.top-signin { color: var(--text); }
.top-join { height: 38px; margin-left: 6px; font-size: 14.5px; }
#theme .sun { display: none; }
[data-theme="dark"] #theme .sun { display: block; }
[data-theme="dark"] #theme .moon { display: none; }
@media (max-width: 1000px) { .top .top-join { display: none; } }
@media (max-width: 720px) {
  .top { min-height: 60px; gap: 12px; }
  .top-links { display: none; }
  .top .brand { margin-right: auto; font-size: 18px; }
}
/* logo: the lifted-corner mark + KOPYA wordmark (the mark alone only where space is tight; CLAUDE.md section 57) */
.brand { display: inline-flex; align-items: center; gap: .55em; font-family: var(--font-logo); font-weight: 600; font-size: 22px; letter-spacing: .24em; line-height: 1; padding: 6px 0; }
.mark { display: block; width: 1.3em; height: 1.3em; flex: none; stroke: none; }  /* the global svg rule adds a 2px outline otherwise */
.mark-base { fill: currentColor; }
.mark-lift { fill: var(--accent); }
.brand-word { margin-right: -.24em; }
.textlink { font-weight: 500; color: var(--muted); }
.textlink:hover { color: var(--text); }
.icon-btn { width: 36px; height: 36px; display: grid; place-items: center; border: 0; border-radius: 9px; background: transparent; color: var(--muted); cursor: pointer; }
.icon-btn:hover { background: var(--surface); color: var(--text); }
.icon-btn svg { width: 18px; height: 18px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 36px; padding: 0 16px;
  border-radius: 9px; border: 1.5px solid var(--text); background: transparent; color: var(--text);
  font: inherit; font-weight: 700; cursor: pointer; white-space: nowrap; transition: transform .12s, background .12s, box-shadow .12s;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 3px 0 var(--text); }
.btn:active { transform: none; box-shadow: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }
.btn.primary:hover { box-shadow: 0 3px 0 color-mix(in srgb, var(--accent) 55%, #000); }
.btn.lg { height: 46px; padding: 0 22px; font-size: 15.5px; border-radius: 11px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; color: var(--muted); border-color: var(--border); }
.btn[disabled]:hover { transform: none; box-shadow: none; }
.btn em { font-style: normal; font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.btn svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- hero ---------- */
.kicker { margin: 0 0 8px; font-size: 12.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
h1 { margin: 0; font-family: var(--font-display); font-size: clamp(34px, 5.4vw, 62px); line-height: 1.04; letter-spacing: -.03em; font-weight: 800; }
/* "can't read": vermilion type that flickers like a weak TV signal. A noise mask keeps cutting small specks out of the letters
   (it jumps to a new pattern every few frames), and now and then the picture tears sideways with a red/blue split. It stays readable.
   A plain span (not <mark>), so screen readers read the headline as one normal sentence. */
.noise-text {
  display: inline-block; background: none; color: var(--accent-text); padding: 0 .04em;
  --noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85 .55' numOctaves='2' seed='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 -11 6.9'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
  -webkit-mask-image: var(--noise); mask-image: var(--noise); -webkit-mask-size: 160px 160px; mask-size: 160px 160px;
  animation: static-grain .6s steps(1) infinite, static-tear 6s infinite;
}
@keyframes static-grain {
  0%   { -webkit-mask-position: 0 0;       mask-position: 0 0; }
  17%  { -webkit-mask-position: -43px 71px;  mask-position: -43px 71px; }
  34%  { -webkit-mask-position: 97px -12px;  mask-position: 97px -12px; }
  51%  { -webkit-mask-position: 20px 120px;  mask-position: 20px 120px; }
  68%  { -webkit-mask-position: -88px -60px; mask-position: -88px -60px; }
  85%  { -webkit-mask-position: 60px 33px;   mask-position: 60px 33px; }
}
@keyframes static-tear {
  0%, 86%, 100% { transform: none; text-shadow: none; }
  88% { transform: translateX(.05em); text-shadow: -.04em 0 rgba(255, 70, 70, .75), .04em 0 rgba(70, 150, 255, .75); }
  90% { transform: translateX(-.07em) skewX(-6deg); text-shadow: .05em 0 rgba(255, 70, 70, .75), -.05em 0 rgba(70, 150, 255, .75); }
  92% { transform: translateX(.03em); text-shadow: -.03em 0 rgba(255, 70, 70, .6), .03em 0 rgba(70, 150, 255, .6); }
  94% { transform: none; text-shadow: none; }
}
.lead { margin: 16px 0 0; max-width: 31em; color: var(--muted); font-size: 17px; }
.cta { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-top: clamp(10px, 2.4vh, 22px); }

/* ---------- live demo ---------- */
.demo { position: relative; min-width: 0; }
.demo-label { display: flex; align-items: flex-start; gap: 8px; margin: 0 0 10px; font-size: 12.5px; color: var(--muted); }
.demo-label svg { width: 15px; height: 15px; color: var(--accent-text); flex: none; margin-top: 2px; }
.demo-label strong { color: var(--text); font-weight: 700; }
.panel {
  position: relative; display: grid; grid-template-columns: 108px minmax(0, 1fr); align-items: stretch;
  background: var(--surface); border: 1.5px solid var(--border); border-radius: 16px; overflow: hidden;
  box-shadow: 2px 2px 0 var(--border); transition: transform .15s;
}
.panel.drag { transform: translate(-2px, -2px) rotate(-.4deg); }

.dash-side { display: flex; flex-direction: column; gap: 2px; padding: 14px 8px; background: var(--surface-2); border-right: 1px solid var(--border); }
.dash-brand { display: flex; align-items: center; gap: .6em; font-family: var(--font-logo); font-weight: 600; font-size: 10.5px; letter-spacing: .2em; color: var(--muted); padding: 2px 8px 12px; }
.dash-brand .mark { width: 1.5em; height: 1.5em; }
.dash-side a { display: flex; align-items: center; gap: 8px; padding: 7px 8px; border-radius: 7px; font-size: 11.5px; font-weight: 500; color: var(--muted); }
.dash-side a svg { width: 14px; height: 14px; flex: none; }
.dash-side a.on { background: var(--accent); color: var(--accent-fg); }

.dash-main { min-width: 0; display: flex; flex-direction: column; position: relative; }
.dash-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.dash-search { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted); background: var(--surface-2); border: 1px solid var(--border); border-radius: 7px; padding: 5px 9px; flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.dash-search svg { width: 13px; height: 13px; flex: none; }
.view-toggle { display: flex; background: var(--surface-2); border: 1px solid var(--border); border-radius: 7px; padding: 2px; flex: none; }
.view-toggle button { border: 0; background: none; padding: 4px 9px; border-radius: 5px; font: inherit; font-size: 10.5px; font-weight: 600; color: var(--muted); cursor: pointer; }
.view-toggle button.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.15); }

.files { list-style: none; margin: 0; padding: 6px 6px 0; display: flex; flex-direction: column; }
.files li {
  flex: none; height: var(--row); display: flex; align-items: center; gap: 9px; padding: 0 8px; border-radius: 9px; min-width: 0; overflow: hidden;
  transition: background .15s; cursor: default;
}
.files li.hl { background: var(--surface-2); }
.ext { flex: none; width: 28px; height: 28px; border-radius: 7px; display: grid; place-items: center; font: 500 9.5px/1 var(--font-mono); letter-spacing: .02em; color: #fff; background: #7a7f8a; }
.ext.jpg, .ext.png { background: #e9822f; }
.ext.pdf { background: #d6453d; }
.ext.txt { background: #5b7aa6; }
.ext.mov, .ext.mp4 { background: #8a55d6; }
.ext.doc, .ext.docx { background: #2f6fe0; }
.ext.zip { background: #c99a1c; }
.ext.lock { background: var(--enc); }
.files li.cipher .ext { background: var(--enc-bg); color: var(--enc); border: 1px dashed var(--enc); font-size: 11px; }
.name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; font-size: 14px; }
.files li.cipher .name { font-weight: 500; font-size: 12.5px; color: var(--enc); font-family: var(--font-mono); letter-spacing: .01em; }
.size { flex: none; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }

.files-hint { flex: 1 1 auto; margin: 6px; padding: 18px 14px; min-height: 200px; border: 1.5px dashed var(--border); border-radius: 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: var(--muted); font-size: 12px; text-align: center; transition: border-color .15s, color .15s; }
.panel.drag .files-hint { border-color: var(--accent); color: var(--accent-text); }
.files-hint svg { width: 20px; height: 20px; }
.only-mob { display: none; }
/* the file that "drops" into the list in the phone demo (landing.js) */
.ghost { position: absolute; z-index: 2; left: 12px; right: 12px; top: 52px; height: var(--row); display: flex; align-items: center; gap: 9px; padding: 0 8px; background: var(--surface); border: 1.5px solid var(--accent); border-radius: 9px; box-shadow: 1.5px 1.5px 0 var(--border); pointer-events: none; }

/* ---------- plans ---------- */
.plans { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.plan { display: grid; grid-template-columns: auto 1fr auto; align-items: baseline; column-gap: 10px; padding: 11px 16px; background: var(--surface); border: 1.5px solid var(--border); border-radius: 12px; color: var(--muted); }
.plan b { font-family: var(--font-display); font-size: 28px; letter-spacing: -.02em; color: var(--text); font-weight: 800; white-space: nowrap; }
.plan span { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; }
.plan em { font-style: normal; font-size: 12px; white-space: nowrap; }
/* Paid cards (4 to a row) are too narrow to fit size + label + price on one line like the free
   card does -- stack the price on its own row below instead of letting it wrap mid-phrase. */
.plan { grid-template-columns: auto 1fr; grid-template-rows: auto auto; row-gap: 4px; }
.plan b { grid-column: 1; grid-row: 1; }
.plan span { grid-column: 2; grid-row: 1; justify-self: end; }
.plan em { grid-column: 1 / -1; grid-row: 2; }
.plan.free, .plan.buy { border-color: var(--border); color: var(--text); box-shadow: 1px 1px 0 var(--border); transition: transform .12s, box-shadow .12s; }
.plan.free em, .plan.buy em { color: var(--accent-text); font-weight: 500; }
.plan.free:hover, .plan.buy:hover { transform: translate(-1px, -1px); box-shadow: 1.5px 1.5px 0 var(--border); }

/* ---------- footer ---------- */
.site-foot {
  flex: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 16px;
  padding: 10px 16px clamp(10px, 2vh, 16px);
  font-size: 11.5px;
  color: var(--muted);
}
.site-foot a { display: inline-block; min-height: 24px; line-height: 24px; color: var(--muted); }   /* 24 px tap targets (WCAG 2.5.8) */
.site-foot a:hover { color: var(--text); text-decoration: underline; }


/* ---------- breadcrumb above a page title ("Kopya / Terms"): same look as the per-page .fx2-crumb, .dl2-crumb, .sc-crumb, .rm-crumb, .an-crumb ---------- */
.crumb, .legal .crumb { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 18px; font: 500 13px var(--font-mono); letter-spacing: .06em; color: var(--muted); }
.crumb > span { opacity: .5; }
.crumb a, .legal .crumb a { color: inherit; text-decoration: none; }
.crumb a:hover, .legal .crumb a:hover { color: var(--text); }

/* ---------- legal pages (terms / privacy) ---------- */
.legal-page { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
.legal {
  max-width: 680px;
  margin: 0 auto;
  padding: clamp(28px, 6vh, 64px) 0 clamp(24px, 6vh, 64px);   /* same top space as the other pages; no side padding: .page already gives the same gutter as the header */
}
.legal h1 { font-family: var(--font-display); font-size: clamp(28px, 5vh, 42px); line-height: 1.08; letter-spacing: -.03em; font-weight: 800; margin: 0 0 6px; }
.legal .updated { margin: 0 0 36px; font-size: 12.5px; color: var(--muted); }
.legal h2 { font-family: var(--font-display); font-size: 19px; font-weight: 700; margin: 34px 0 10px; letter-spacing: -.01em; }
.legal h2:first-of-type { margin-top: 0; }
.legal p { margin: 0 0 14px; color: var(--text); }
.legal p.muted, .legal li.muted { color: var(--muted); }
.legal ul { margin: 0 0 14px; padding-left: 1.3em; }
.legal li { margin: 0 0 7px; }
.legal a { color: var(--accent-text); text-decoration: underline; text-underline-offset: 2px; }
.legal strong { font-weight: 700; }

/* ---------- animations ---------- */
@keyframes land { 0% { background: var(--enc-bg); } 100% { background: transparent; } }
.files li.land { animation: land 1.2s ease-out; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .noise-text { -webkit-mask-image: none; mask-image: none; }   /* no flicker: plain vermilion text */
}

/* ---------- smaller screens ---------- */
@media (max-width: 860px) {
  .only-desk { display: none; }
  .only-mob { display: inline; }
  .page { padding: 0 16px 12px; }
  :root { --row: 34px; }
  h1 { font-size: clamp(26px, 4.6vh, 34px); }
  .cta .btn { flex: 1 1 auto; }
  .plans { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .plan { grid-template-columns: 1fr; grid-template-rows: auto auto auto; row-gap: 0; padding: 8px 10px; text-align: center; }
  .plan b, .plan span, .plan em { grid-column: 1; }
  .plan b { grid-row: 1; }
  .plan span { grid-row: 2; justify-self: center; font-size: 11.5px; }
  .plan em { grid-row: 3; margin-top: 3px; }
  .plan em { font-size: 10.5px; }
  .plan b, .plan em { white-space: normal; }
  .panel { box-shadow: 1.5px 1.5px 0 var(--border); grid-template-columns: minmax(0, 1fr); }
  .dash-side { display: none; }
  .dash-brand { display: none; }
  .size { display: none; }
  /* no drop box on phones (the demo plays by itself); the list keeps room for its four rows so the page never shifts as files land */
  .files-hint { display: none; }
  /* fixed height (not just a minimum): while a file lands, the list briefly holds a fifth row, which used to push the page down and back */
  .files { height: calc(var(--row) * 4 + 6px); overflow: hidden; }
  .panel.drag { transform: none; }
  h1 { font-size: clamp(26px, 8vw, 34px); }   /* vh units change as the phone's address bar slides away, resizing the headline mid-scroll */
}
@media (max-width: 480px) {
  .textlink { color: var(--text); }
}


/* ---------- home page: long, scrolling layout ---------- */
html { scroll-behavior: smooth; scroll-padding-top: 12px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
.page.home { display: block; padding-bottom: 0; }
.page.home .plans { margin: 0; }
.page.home .plan { padding: 16px 18px; }
.trust { list-style: none; margin: 0; padding: 18px 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; border-top: 1.5px solid var(--border); border-bottom: 1.5px solid var(--border); }
.trust li { display: flex; flex-direction: column; gap: 2px; }
.trust b { font-family: var(--font-mono); font-weight: 500; font-size: 13px; color: var(--text); letter-spacing: .01em; }
.trust span { font-size: 13px; color: var(--muted); line-height: 1.4; }

/* ---------- homepage hero: "type to encrypt" ----------
   A focused first screen: on desktop the hero fills the viewport below the header (the trust strip starts right at the fold),
   split into the message on the left (headline, one line, the one vermilion button) and the example on the right: one card
   with the file name you type, a lock "pipe", and the dark "server" panel showing the real AES-GCM output. Sign in lives in
   the header; the "at a glance" facts live in the trust strip right below (no second facts line here). landing.js adds .live
   to #hero once WebCrypto works; until then (no JS, old browser, plain http) the card shows a static example and the "type
   here" wording stays hidden. Phones (<= 860 px): one column, message and button first, the card right under it, no forced
   viewport height. */
:root { --vault: #17181c; --vault-line: #2c303a; --vault-text: #7fd8b0; --vault-muted: #a4a49e; --soft-shadow: #d9d0be; --top-h: 72px; }
[data-theme="dark"] { --vault: #07080b; --vault-line: #3a404c; --vault-text: #6fd3a8; --vault-muted: #9a9a95; --soft-shadow: #252a35; }
@media (max-width: 720px) { :root { --top-h: 60px; } }

.hero2 { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; padding: clamp(16px, 4vw, 40px) 0 clamp(40px, 7vw, 64px); }
.hx-live { display: none; }
.hero2.live .hx-live { display: inline; }
.hero2.live .hx-static { display: none; }

.hx-copy { min-width: 0; }
.hero2 h1 { font-size: clamp(36px, 10vw, 60px); line-height: .98; letter-spacing: -.04em; text-wrap: balance; }
.hx-lead { margin: 14px 0 0; max-width: 30em; font-size: 16px; line-height: 1.5; text-wrap: pretty; }

.hx-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin-top: 24px; }
/* the label and an invisible "Start with 00 GB free" share one grid cell, so the button is already wide enough for the
   beta wording and never changes size when the offer appears */
.hx-go { display: inline-grid; flex: 1 1 100%; height: 52px; padding: 0 30px; border-radius: 12px; font-size: 16.5px; font-variant-numeric: tabular-nums; }
.hx-go > span { grid-area: 1 / 1; text-align: center; }
.hx-go-size { visibility: hidden; }
.hx-fine { flex: 1 1 100%; text-align: center; font: 500 12px/1.2 var(--font-mono); letter-spacing: .04em; color: var(--muted); }

/* the example: one card, read top to bottom (your screen -> the lock -> our server) */
.hx-demo { min-width: 0; }
.hx-card {
  --pad: 16px; --fpad: 6px; --badge: 32px;
  --pipe: calc(var(--pad) + 1.5px + var(--fpad) + var(--badge) / 2);   /* x of the badge centre: the pipe starts under it */
  position: relative; display: flex; flex-direction: column;
  border: 1.5px solid var(--text); border-radius: 16px; overflow: hidden; background: var(--surface);
  box-shadow: 4px 4px 0 var(--soft-shadow);
}
[data-theme="dark"] .hx-card { border-color: var(--vault-line); }
.hx-cell { display: flex; flex-direction: column; min-width: 0; padding: var(--pad); }
.hx-you { padding-bottom: 0; }
.hx-label { display: block; margin: 0 0 10px; font: 500 10.5px/1 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.hx-file { display: flex; align-items: center; gap: 10px; padding: var(--fpad); border: 1.5px solid var(--border); border-radius: 12px; background: var(--bg); transition: border-color .15s; }
.hx-file:focus-within { border-color: var(--accent-text); box-shadow: 0 0 0 1px var(--accent-text); }
.hx-file .ext { width: var(--badge); height: var(--badge); border-radius: 8px; font-size: 10px; }
.hx-file input {
  flex: 1; min-width: 0; padding: 5px 0; border: 0; outline: 0; background: transparent; color: var(--text); caret-color: var(--accent-text);
  font: 700 18px/1.2 var(--font-body); letter-spacing: -.01em; text-overflow: ellipsis;
}
.hx-file input:focus-visible { outline: 0; }   /* the box around it shows focus instead */

/* the pipe: a line drops from the file badge, through the lock, into the server panel */
.hx-lock { position: relative; display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 10px var(--pad) 10px calc(var(--pipe) - 15px); }
.hx-lock::before { content: ""; position: absolute; left: calc(var(--pipe) - .75px); top: 0; bottom: 0; border-left: 1.5px dashed var(--muted); }
.hx-lock::after { content: ""; position: absolute; left: calc(var(--pipe) - 4.75px); bottom: 3px; width: 8px; height: 8px; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: rotate(45deg); }
.hx-lock svg { position: relative; z-index: 1; width: 14px; height: 14px; padding: 7px; box-sizing: content-box; border-radius: 50%; background: var(--text); color: var(--bg); box-shadow: 0 0 0 5px var(--surface); flex: none; }
.hx-algo { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.hx-algo b { font: 500 11.5px/1.2 var(--font-mono); letter-spacing: .06em; color: var(--text); }
.hx-algo span { font-size: 12.5px; line-height: 1.3; color: var(--muted); }

.hx-server { background: var(--vault); color: var(--vault-text); }
.hx-server .hx-label { color: var(--vault-muted); }
.hx-cipher { display: block; min-height: calc(1.55em * 2); font: 500 13.5px/1.55 var(--font-mono); letter-spacing: .01em; word-break: break-all; color: var(--vault-text); }
.hx-bytes { margin: auto 0 0; padding-top: 10px; font-size: 12.5px; line-height: 1.45; color: var(--vault-muted); }
.hx-bytes a { color: #ece9e1; text-decoration: underline; text-decoration-color: #5b606b; text-underline-offset: 3px; }
.hx-bytes a:hover { text-decoration-color: currentColor; }
.hx-bytes a:focus-visible { outline-color: var(--vault-text); }
.hx-note { margin: 14px 2px 0; font-size: 12.5px; line-height: 1.45; color: var(--muted); }

/* a quiet "scroll" cue at the foot of the full-height hero (desktop only); landing.js fades it once the page moves */
.hx-scroll { display: none; }

@media (min-width: 521px) {
  .hx-go { flex: none; }
  .hx-fine { flex: 0 1 auto; text-align: left; }
}
@media (min-width: 861px) {
  /* one viewport tall below the header (svh: the smallest viewport, so mobile browser bars never make it jump), within
     sensible limits; the content is centred in it, a little above the middle (more room below for the scroll cue) */
  .hero2 {
    grid-template-columns: minmax(0, 47fr) minmax(0, 53fr); align-items: center; align-content: center; column-gap: clamp(40px, 5vw, 80px);
    min-height: clamp(540px, calc(100vh - var(--top-h)), 1160px);
    min-height: clamp(540px, calc(100svh - var(--top-h)), 1160px);
    padding: 20px 0 76px;
  }
  .hx-copy { container-type: inline-size; }
  .hx-line { display: block; white-space: nowrap; }
  .hero2 h1 { font-size: 60px; font-size: clamp(44px, 14.4cqi, 80px); line-height: .97; }
  .hx-lead { margin-top: 24px; max-width: 24em; font-size: 18px; }
  .hx-cta { margin-top: 36px; }

  .hx-card { --pad: 26px; --fpad: 9px; --badge: 40px; border-radius: 18px; box-shadow: 6px 6px 0 var(--soft-shadow); }
  .hx-label { margin-bottom: 14px; font-size: 11px; }
  .hx-file { gap: 14px; }
  .hx-file .ext { border-radius: 9px; font-size: 11px; }
  .hx-file input { font-size: clamp(18px, 1.7vw, 23px); }
  .hx-lock { min-height: 84px; gap: 16px; padding-left: calc(var(--pipe) - 18px); }
  .hx-lock svg { width: 18px; height: 18px; padding: 9px; box-shadow: 0 0 0 6px var(--surface); }
  .hx-algo b { font-size: 12px; }
  .hx-algo span { font-size: 13px; }
  .hx-server { padding-top: 24px; padding-bottom: 24px; }
  .hx-cipher { font-size: clamp(14px, 1.15vw, 16px); }
  .hx-bytes { padding-top: 12px; font-size: 13px; }
  .hx-note { margin-top: 18px; font-size: 13px; }

  .hx-scroll {
    position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%);
    display: flex; flex-direction: column; align-items: center; gap: 8px;
    font: 500 10.5px/1 var(--font-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--muted);
    transition: opacity .3s;
  }
  .hx-scroll i { position: relative; width: 1.5px; height: 26px; background: var(--border); overflow: hidden; }
  .hx-scroll i::after { content: ""; position: absolute; left: 0; top: 0; width: 100%; height: 9px; background: var(--muted); animation: hx-drip 2.2s ease-in-out infinite; }
  .hero2.scrolled .hx-scroll { opacity: 0; }
}
@keyframes hx-drip { 0% { transform: translateY(-9px); } 60%, 100% { transform: translateY(26px); } }
/* 861-1099 px: still split, a bit tighter */
@media (min-width: 861px) and (max-width: 1099px) {
  .hero2 { grid-template-columns: minmax(0, 47fr) minmax(0, 53fr); column-gap: 36px; }
  .hx-card { --pad: 22px; }
  .hx-lead { font-size: 17px; }
}
/* short laptop windows (e.g. 1280 x 720, 1440 x 700): a little tighter so everything fits without scrolling */
@media (min-width: 861px) and (max-height: 760px) {
  .hero2 { padding: 8px 0 60px; }
  .hero2 h1 { font-size: clamp(44px, 13.4cqi, 70px); }
  .hx-lead { margin-top: 18px; }
  .hx-cta { margin-top: 28px; }
  .hx-card { --pad: 22px; }
  .hx-lock { min-height: 70px; }
  .hx-server { padding-top: 20px; padding-bottom: 20px; }
  .hx-note { margin-top: 14px; }
  .hx-scroll { bottom: 12px; }
  .hx-scroll i { height: 20px; }
}
/* short phones (e.g. 320 x 568): headline, line and button above the fold, the card starts right under it */
@media (max-width: 480px) and (max-height: 700px) {
  .hero2 { padding-top: 8px; gap: 26px; }
  .hero2 h1 { font-size: 31px; }
  .hx-lead { margin-top: 8px; font-size: 14.5px; line-height: 1.45; }
  .hx-cta { margin-top: 16px; gap: 8px; }
  .hx-go { height: 48px; }
  .hx-card { --pad: 12px; --fpad: 4px; --badge: 28px; }
  .hx-label { margin-bottom: 7px; }
  .hx-file input { font-size: 17px; }
  .hx-lock { min-height: 52px; }
  .hx-cipher { font-size: 12.5px; line-height: 1.45; }
  .hx-bytes { padding-top: 6px; font-size: 12px; }
}

.sec { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 24px clamp(24px, 5vw, 72px); align-items: center; padding: clamp(44px, 8vw, 96px) 0 0; }
.sec.flip .sec-copy { order: 2; }
.sec.flip .sec-art { order: 1; }
.sec .sec-copy.wide { grid-column: 1 / -1; max-width: 640px; }
.sec h2, .finale h2 { margin: 4px 0 14px; font-family: var(--font-display); font-size: clamp(28px, 4.2vw, 42px); line-height: 1.08; letter-spacing: -.028em; font-weight: 800; }
.sec .kicker { color: var(--accent-text); font-family: var(--font-mono); margin-bottom: 6px; }
.sec .kicker .soon { font-style: normal; margin-left: 8px; padding: 1px 7px; border: 1px solid var(--border); border-radius: 99px; color: var(--muted); font-size: 10.5px; letter-spacing: .06em; }
.sec p { color: var(--muted); margin: 0 0 12px; }
.sec code, .faq code { font-family: var(--font-mono); font-size: .92em; background: var(--surface-2); border: 1px solid var(--border); border-radius: 4px; padding: 0 4px; color: var(--text); }
.ticks { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 10px; }
.ticks li { position: relative; padding-left: 26px; color: var(--muted); line-height: 1.55; }
.ticks li::before { content: ""; position: absolute; left: 3px; top: .48em; width: 11px; height: 6px; border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg); }
.ticks strong { color: var(--text); font-weight: 700; }
.ticks em { font-style: normal; color: var(--text); font-weight: 600; }
.sec p.more { margin-top: 18px; }
.sec p.more a { color: var(--accent-text); font-weight: 600; }
.sec p.more a:hover { text-decoration: underline; text-underline-offset: 3px; }
.sec-art { min-width: 0; }


/* thumbnail grid */
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 14px; background: var(--surface); border: 1.5px solid var(--border); border-radius: 16px; box-shadow: 2px 2px 0 var(--border); }
.t { position: relative; display: block; aspect-ratio: 1; border-radius: 10px; overflow: hidden; }
.t1 { background: url(/img/p1.svg) center / cover; }
.t2 { background: url(/img/p2.svg) center / cover; }
.t3 { background: url(/img/p3.svg) center / cover; }
.t4 { background: url(/img/p4.svg) center / cover; }
.t5 { background: url(/img/p5.svg) center / cover; }
.t6 { background: url(/img/p6.svg) center / cover; }
.t.vid::after { content: ""; position: absolute; left: 50%; top: 50%; width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%; background: rgba(255,255,255,.88) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 7l9 5-9 5z' fill='%2317181c'/%3E%3C/svg%3E") center / 20px no-repeat; }

/* share link card */
.linkcard { padding: 22px 20px; background: var(--surface); border: 1.5px solid var(--border); border-radius: 16px; box-shadow: 2px 2px 0 var(--border); }
.sec .lk-label { margin: 0 0 10px; font: 500 11.5px/1 var(--font-mono); text-transform: uppercase; letter-spacing: .08em; }
.sec .lk { margin: 0; font: 500 clamp(12px, 1.5vw, 14.5px)/1.7 var(--font-mono); word-break: break-all; color: var(--text); }
.lk-sent { color: var(--text); }
.lk-key { color: var(--accent-text); background: color-mix(in srgb, var(--accent) 13%, transparent); border-radius: 4px; padding: 0 3px; }
.sec .lk-note { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 14px 0 0; font-size: 12px; }
.lk-note .lk-sent { color: var(--muted); }
.lk-note .lk-sent::before, .lk-note .lk-key::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; background: var(--muted); }
.lk-note .lk-key { background: none; padding: 0; }
.lk-note .lk-key::before { background: var(--accent); }

/* desktop modes */
.modes { display: grid; gap: 10px; padding: 14px; background: var(--surface); border: 1.5px solid var(--border); border-radius: 16px; box-shadow: 2px 2px 0 var(--border); }
.sec .mode { margin: 0; padding: 12px 14px; border: 1.5px solid var(--border); border-radius: 11px; display: flex; flex-direction: column; gap: 2px; }
.mode b { color: var(--text); }
.mode span { font-size: 13px; color: var(--muted); }
.mode.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, var(--surface)); }

/* referral meter */
.meterbox { padding: 22px 20px; background: var(--surface); border: 1.5px solid var(--border); border-radius: 16px; box-shadow: 2px 2px 0 var(--border); }
.sec .mt-top { display: flex; align-items: baseline; gap: 10px; margin: 0 0 14px; }
.mt-top b { font-family: var(--font-display); font-size: 34px; font-weight: 800; letter-spacing: -.02em; color: var(--text); }
.mt { height: 12px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 99px; overflow: hidden; }
.mt-fill { display: block; height: 100%; width: 40%; background: var(--accent); border-radius: 99px; }
.sec .mt-foot { display: flex; justify-content: space-between; margin: 10px 0 0; font: 500 12px/1 var(--font-mono); }

/* cards, faq, finale */
.cards { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.card { background: var(--surface); border: 1.5px solid var(--border); border-radius: 14px; padding: 18px; }
.card h3 { margin: 0 0 6px; font-family: var(--font-display); font-size: 17px; letter-spacing: -.01em; }
.sec .card p { margin: 0; font-size: 13.5px; line-height: 1.55; }
#plans { display: block; }
#plans .sec-copy { margin-bottom: 22px; }
#faq { display: block; }
.faq { max-width: 760px; margin-top: 18px; border-top: 1.5px solid var(--border); }
.faq details { border-bottom: 1.5px solid var(--border); }
.faq summary { cursor: pointer; list-style: none; padding: 16px 28px 16px 0; font-weight: 700; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 12px; font: 400 22px/1.4 var(--font-mono); color: var(--accent-text); }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { margin: 0 0 16px; color: var(--muted); max-width: 40em; }
.faq a { color: var(--accent-text); text-decoration: underline; text-underline-offset: 2px; }
.finale { margin: clamp(44px, 8vw, 96px) 0 clamp(28px, 5vw, 56px); padding: clamp(26px, 5vw, 52px); text-align: center; background: var(--surface); border: 1.5px solid var(--border); border-radius: 18px; box-shadow: 2.5px 2.5px 0 var(--border); }
.finale h2 { margin-bottom: 8px; }
.finale p { margin: 0; color: var(--muted); }
.finale .cta { justify-content: center; margin-top: 20px; }
@media (max-width: 860px) {
  .trust { grid-template-columns: 1fr 1fr; }
  .sec { grid-template-columns: 1fr; gap: 24px; padding-top: 48px; }
  .sec.flip .sec-copy, .sec.flip .sec-art { order: 0; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .page.home .plans { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .cards { grid-template-columns: 1fr; }
}

/* --- /cli (private, not linked anywhere; the old /download layout): same chrome, own hero + steps --- */
.dl-page { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
.dl {
  width: 100%; margin: 0 auto; padding: clamp(28px, 6vh, 64px) 0 72px; min-width: 0;
  /* width:100% + min-width:0 together: .dl's own auto horizontal margins (for centering) otherwise make a grid
     item size to its own content instead of stretching to the track, so a long unbroken line (e.g. inside a
     .codeblock) was sizing the whole page off its own content width instead of scrolling inside itself */
}
.dl-hero { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 36px; align-items: center; margin-bottom: clamp(48px, 8vh, 88px); }
.dl-hero-copy .kicker { margin-bottom: 14px; }
.dl-hero-copy h1 { font-family: var(--font-display); font-size: clamp(28px, 5vh, 42px); line-height: 1.08; letter-spacing: -.02em; font-weight: 800; margin: 0 0 10px; }
.dl-btn { display: inline-flex; align-items: center; gap: 9px; margin-top: 22px; padding: 12px 20px; font-size: 14.5px; }
.dl-btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.dl-meta { margin: 10px 0 0; font-size: 12.5px; color: var(--muted); }
.dl-note { margin: 18px 0 0; padding: 12px 14px; max-width: 34em; background: var(--surface); border: 1.5px solid var(--border); border-radius: 10px; font-size: 12.5px; color: var(--muted); line-height: 1.55; }
.dl-note strong { color: var(--text); }
.dl-note em { font-style: normal; color: var(--accent-text); font-weight: 600; }

.dl-art { display: flex; align-items: center; justify-content: center; }
.sync-gfx { width: 100%; max-width: 220px; height: auto; }
.sg-folder { fill: var(--accent); }
.sg-line { fill: var(--accent-fg); opacity: .35; }
.sg-badge { fill: var(--surface); stroke: var(--border); stroke-width: 2; }
.sg-arc { fill: none; stroke: var(--accent-text); stroke-width: 5; stroke-linecap: round; }
.sg-head { fill: var(--accent-text); }
.sg-spin { transform-origin: 130px 120px; animation: sg-rotate 3.4s linear infinite; }
@keyframes sg-rotate { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .sg-spin { animation: none; } }

.dl-features h2 { font-family: var(--font-display); font-size: 20px; font-weight: 700; margin: 0 0 16px; letter-spacing: -.01em; }
.dl-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.dl-cards .card h3 { font-size: 15.5px; }
.dl-cards .card p { font-size: 13px; }
.dl-foot { margin-top: 44px; padding-top: 20px; border-top: 1.5px solid var(--border); color: var(--muted); font-size: 12.5px; }
@media (max-width: 860px) {
  .dl-hero { grid-template-columns: 1fr; }
  .dl-art { display: none; }   /* phones: the page title comes first, like on every other page */
  .dl-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) { .dl-cards { grid-template-columns: 1fr; } }

/* --- "Beta" label: a small shimmering pill, for the now-live desktop app on the homepage/features --- */
.badge-beta {
  position: relative; display: inline-flex; align-items: center; margin-left: 2px; padding: 2px 9px;
  border-radius: 99px; background: var(--accent); color: var(--accent-fg); overflow: hidden;
  font: 700 10px/1.5 var(--font-mono); text-transform: uppercase; letter-spacing: .08em;
}
.badge-beta::after {
  content: ""; position: absolute; inset: 0; transform: translateX(-120%);
  background: linear-gradient(100deg, transparent 35%, color-mix(in srgb, var(--accent-fg) 45%, transparent) 50%, transparent 65%);
  animation: badge-shine 3.2s ease-in-out infinite;
}
@keyframes badge-shine { 0%, 40% { transform: translateX(-120%); } 70%, 100% { transform: translateX(120%); } }
@media (prefers-reduced-motion: reduce) { .badge-beta::after { animation: none; display: none; } }
.kicker .badge-beta { margin-left: 8px; vertical-align: 2px; }

/* --- /cli (internal, not linked anywhere): reuses the download page's chrome, adds a two-column step layout --- */
.term-gfx { width: 100%; max-width: 220px; height: auto; }
.term-win { fill: var(--surface); stroke: var(--border); stroke-width: 2; }
.term-bar { fill: var(--surface-2); }
.term-dot { fill: var(--border); }
.term-prompt { fill: var(--accent-text); }
.term-line { fill: var(--text); }
.term-out { fill: var(--muted); }
.term-cursor { fill: var(--accent-text); animation: term-blink 1.1s step-end infinite; }
@keyframes term-blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .term-cursor { animation: none; } }

.cli-step { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px 32px; align-items: center; margin: 0 0 34px; }
.cli-step h3 { grid-column: 1 / -1; margin: 0 0 2px; font-family: var(--font-display); font-size: 16.5px; font-weight: 700; }
.cli-text p { margin: 0 0 10px; color: var(--muted); font-size: 13.5px; line-height: 1.6; }
.cli-text p:last-child { margin-bottom: 0; }
.cli-code { min-width: 0; }
.codeblock {
  margin: 0; padding: 13px 16px; background: var(--surface-2); border: 1.5px solid var(--border); border-radius: 10px;
  font: 12.5px/1.6 var(--font-mono); color: var(--text); overflow-x: auto; white-space: pre;
}
.codeblock .rem { color: var(--muted); }
@media (max-width: 760px) { .cli-step { grid-template-columns: minmax(0, 1fr); } }
