/* Pages a visitor sees before signing in (login, access, legal): the KeyHole site brand — paper, ink, KeyHole blue,
   Manrope with a PT Serif italic accent. Served without a session (cloud/src/index.ts PUBLIC). */
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 400 800; font-display: swap; src: url(/brand/fonts/keyhole-ru-subset-1.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 400 800; font-display: swap; src: url(/brand/fonts/keyhole-ru-subset-3.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'PT Serif'; font-style: italic; font-weight: 400; font-display: swap; src: url(/brand/fonts/keyhole-ru-subset-5.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'PT Serif'; font-style: italic; font-weight: 400; font-display: swap; src: url(/brand/fonts/keyhole-ru-subset-7.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root { --paper: #fafaf7; --card: #ffffff; --ink: #17191c; --muted: #5e6871; --line: #d9dfe3; --blue: #0866ed; --blue-dark: #054cb1; --lime: #d5f3a1; --red: #b3261e; color-scheme: light; }
* { box-sizing: border-box; }
html, body { margin: 0; }
body { min-height: 100vh; min-height: 100dvh; background: var(--paper); color: var(--ink); font: 17px/1.5 'Manrope', system-ui, -apple-system, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: var(--blue); text-underline-offset: 3px; }
a:hover { color: var(--blue-dark); }
em, .serif { font-family: 'PT Serif', Georgia, serif; font-style: italic; font-weight: 400; }

/* login, access */
.gate { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 32px 16px; }
.gate-card { width: min(420px, 100%); }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); font-weight: 800; font-size: 20px; letter-spacing: -0.01em; margin-bottom: 40px; }
.brand img { width: 40px; height: 40px; }
.brand em { color: var(--muted); font-size: 21px; }
h1 { font-size: 34px; line-height: 1.12; letter-spacing: -0.02em; font-weight: 800; margin: 0 0 12px; }
h1 em { color: var(--blue); }
.lead { color: var(--muted); margin: 0 0 28px; }
form { display: grid; gap: 14px; }
label.field { display: grid; gap: 6px; font-weight: 600; font-size: 15px; }
input[type=email], input[type=password], input[type=text] { font: inherit; font-size: 17px; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); color: var(--ink); outline: none; transition: border-color .15s, box-shadow .15s; }
input:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgb(8 102 237 / .14); }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-weight: 700; font-size: 17px; padding: 15px 20px; border-radius: 14px; border: 0; background: var(--blue); color: #fff; cursor: pointer; text-decoration: none; transition: background .15s, transform .1s; }
.button:hover { background: var(--blue-dark); color: #fff; }
.button:active { transform: scale(.985); }
.button.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.button.ghost:hover { background: #fff; color: var(--ink); }
.row { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 15px; }
.error { margin: 0; padding: 12px 14px; border-radius: 12px; background: #fdecea; color: var(--red); font-size: 15px; }
.fine { margin: 24px 0 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.note { margin: 28px 0 0; padding: 14px 16px; border-radius: 14px; background: #fff; border: 1px solid var(--line); color: var(--muted); font-size: 15px; }
.steps { margin: 0 0 28px; padding: 0; list-style: none; display: grid; gap: 12px; }
.steps li { display: grid; grid-template-columns: 32px 1fr; gap: 12px; align-items: start; }
.steps b { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--lime); font-size: 15px; }

/* legal documents */
.doc { max-width: 760px; margin: 0 auto; padding: 40px 20px 80px; }
.doc .brand { margin-bottom: 32px; }
.doc h1 { font-size: 32px; }
.doc h2 { font-size: 22px; margin: 36px 0 10px; letter-spacing: -0.01em; }
.doc p, .doc li { font-size: 17px; }
.doc li { margin: 6px 0; }
.draft { margin: 0 0 28px; padding: 14px 16px; border-radius: 14px; background: #fff4d6; border: 1px solid #f1d58a; font-size: 15px; }
.fill { background: var(--lime); padding: 0 4px; border-radius: 4px; }
.meta { color: var(--muted); font-size: 15px; }

/* sign up details */
.hint { font-weight: 400; font-size: 14px; color: var(--muted); }
.muted { color: var(--muted); }
label.check { display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: start; font-size: 15px; line-height: 1.45; cursor: pointer; }
label.check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--blue); }
.button:disabled { opacity: .6; cursor: default; }

/* sales page */
.wrap { width: min(1160px, 100%); margin: 0 auto; padding: 0 20px; }
.narrow { width: min(760px, 100%); }
.center { text-align: center; }
.top { position: sticky; top: 0; z-index: 10; background: rgb(250 250 247 / .86); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid rgb(217 223 227 / .7); }
.top-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 68px; }
.top .brand { margin: 0; }
.top nav { display: flex; align-items: center; gap: 24px; font-size: 16px; font-weight: 600; }
.top nav a:not(.button) { color: var(--ink); text-decoration: none; }
.top nav a:not(.button):hover { color: var(--blue); }
.button.small { padding: 10px 16px; font-size: 16px; border-radius: 12px; }
.button.big { padding: 18px 30px; font-size: 18px; border-radius: 16px; box-shadow: 0 12px 28px -12px rgb(8 102 237 / .55); }
.hero { padding: 64px 0 40px; }
.hero-in { display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center; }
.kicker { margin: 0 0 18px; font-size: 15px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--blue); }
.display { font-size: clamp(40px, 5.6vw, 68px); line-height: 1.04; letter-spacing: -0.035em; margin: 0 0 22px; }
.display em { color: var(--blue); letter-spacing: -0.01em; }
.hero .lead { font-size: 20px; line-height: 1.5; max-width: 560px; margin-bottom: 34px; }
.cta { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.cta .muted { font-size: 15px; }
.hero-media { position: relative; justify-self: center; width: min(460px, 100%); aspect-ratio: 460 / 600; }
.phone { position: absolute; margin: 0; aspect-ratio: 9 / 16; border-radius: 30px; overflow: hidden; background: #e9e6e0; box-shadow: 0 40px 80px -36px rgb(23 25 28 / .5), 0 0 0 1px rgb(23 25 28 / .06); }
.phone.before { left: 0; top: 9%; width: 48%; transform: rotate(-4deg); filter: saturate(.85); }
.phone.after { right: 0; top: 0; width: 58%; transform: rotate(3deg); }
.phone img, .phone video { display: block; width: 100%; height: 100%; object-fit: cover; }
.phone figcaption { position: absolute; left: 12px; top: 12px; max-width: calc(100% - 24px); padding: 9px 12px; border-radius: 14px; background: rgb(255 255 255 / .9); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); font-size: 15px; color: var(--muted); }
.phone figcaption b { color: var(--ink); margin-right: 4px; }
.phone.after figcaption b { color: var(--blue); }
section { padding: 56px 0; }
.section { font-size: clamp(32px, 4vw, 46px); line-height: 1.1; letter-spacing: -0.03em; font-weight: 800; margin: 0 0 32px; }
.section em { color: var(--blue); }
.ba-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 300px)); gap: 28px; justify-content: center; }
.ba figure { margin: 0; }
.ba figure > img, .ba figure > video { aspect-ratio: 9 / 16; border-radius: 26px; background: #e9e6e0; box-shadow: 0 24px 50px -30px rgb(23 25 28 / .45); }
.ba figcaption { margin-top: 14px; font-size: 16px; line-height: 1.45; color: var(--muted); }
.ba figcaption b { display: block; color: var(--ink); font-size: 18px; margin-bottom: 2px; }
.how-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.how-grid li { background: var(--card); border: 1px solid var(--line); border-radius: 24px; padding: 28px; }
.how-grid b { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--lime); font-size: 17px; }
.how-grid h3 { font-size: 21px; margin: 18px 0 8px; letter-spacing: -0.01em; }
.how-grid p { margin: 0; color: var(--muted); }
.vs-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.vs-card { border-radius: 24px; padding: 28px; border: 1px solid var(--line); background: var(--card); }
.vs-card p { margin: 0; }
.vs-card.ours { background: var(--ink); color: #fff; border-color: var(--ink); }
.vs-card.ours .muted { color: #aab2ba; }
.vs-num { font-size: clamp(36px, 4.4vw, 52px); font-weight: 800; letter-spacing: -0.03em; margin: 8px 0 6px !important; }
.vs-card.ours .vs-num { color: var(--lime); }
.lead.sub { margin: -18px 0 36px; max-width: 640px; }
.plan-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: stretch; }
.plan { position: relative; display: flex; flex-direction: column; gap: 6px; background: var(--card); border: 1px solid var(--line); border-radius: 26px; padding: 30px 28px 28px; }
.plan.best { border: 2px solid var(--blue); box-shadow: 0 24px 50px -30px rgb(8 102 237 / .5); }
.plan .tag { position: absolute; top: -14px; left: 28px; background: var(--blue); color: #fff; font-size: 14px; font-weight: 700; padding: 5px 12px; border-radius: 999px; }
.plan h3 { margin: 0; font-size: 22px; }
.plan .price { margin: 6px 0 0; font-size: 40px; font-weight: 800; letter-spacing: -0.03em; }
.plan .price span { font-size: 16px; font-weight: 600; color: var(--muted); margin-left: 6px; letter-spacing: 0; }
.plan .per { margin: 0; font-weight: 700; }
.plan .muted { margin: 0 0 20px; }
.plan .button { margin-top: auto; }
.faq details { border-bottom: 1px solid var(--line); padding: 4px 0; }
.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 16px; padding: 18px 0; font-size: 19px; font-weight: 700; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-weight: 400; font-size: 26px; line-height: 1; color: var(--blue); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0 0 20px; color: var(--muted); max-width: 680px; }
.final { padding-bottom: 80px; }
.final .lead { margin: -16px 0 30px; }
.foot { border-top: 1px solid var(--line); padding: 28px 0 40px; color: var(--muted); font-size: 15px; }
.foot-in { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.foot nav { display: flex; gap: 20px; flex-wrap: wrap; }
.foot a { color: var(--muted); }

@media (max-width: 860px) {
  .hero { padding: 36px 0 24px; }
  .hero-in { grid-template-columns: 1fr; gap: 36px; }
  .hero-media { width: min(400px, 100%); }
  .phone { border-radius: 22px; }
  .phone figcaption { font-size: 14px; left: 8px; top: 8px; padding: 6px 9px; }
  .hero .lead { font-size: 18px; }
  .how-grid, .vs-grid, .plan-grid { grid-template-columns: 1fr; }
  .plan-grid { gap: 26px; }
  section { padding: 40px 0; }
  .top nav a:not(.button) { display: none; }
  .ba-grid { gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ba figure > img, .ba figure > video { border-radius: 18px; }
  .ba figcaption { font-size: 15px; }
  .cta .button { width: 100%; }
  .cta { gap: 12px; }
}

.nowrap { white-space: nowrap; }
.top nav { gap: 12px; } .top nav a:not(.button) { margin-right: 12px; }
@media (max-width: 520px) { .cta-top { display: none !important; } .display span.nowrap { white-space: normal; } }

.narrow-left { max-width: 760px; }
section[id] { scroll-margin-top: 80px; }
