/* jogi.am's look: every public and signed-in page. Colours come from Aram's brand (brand/colors.css, brand.json):
   garnet for the logo, buttons and links; plum for text and dark sections; white underneath. Garnet on plum is
   decoration only (2.3:1), never text. Sharp and quiet; the motion carries the fun. */

:root {
  --garnet: #b11b32;
  --garnet-dark: #96172a;
  --plum: #3a1630;
  --white: #fff;
  --ink: var(--plum);
  --ink-soft: rgba(58, 22, 48, .7);
  --ink-faint: rgba(58, 22, 48, .5);
  --line: rgba(58, 22, 48, .1);
  --line-strong: rgba(58, 22, 48, .2);
  --wash: #fbf7f8;           /* a whisper of garnet: alternate sections, cards */
  --blush: #f8e8eb;          /* outgoing chat bubble, highlights */
  --radius: 12px;
  --radius-lg: 20px;
  --shadow: 0 1px 2px rgba(58, 22, 48, .06), 0 8px 24px rgba(58, 22, 48, .06);
  --shadow-lg: 0 2px 6px rgba(58, 22, 48, .08), 0 30px 60px -20px rgba(58, 22, 48, .3);
  --font: Inter, "Noto Sans Armenian", system-ui, -apple-system, "Segoe UI", sans-serif;
  --wrap: 1160px;
  --gutter: clamp(16px, 4vw, 40px);
}

*, *::before, *::after { box-sizing: border-box }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px }
body {
  margin: 0; background: var(--white); color: var(--ink); font-family: var(--font); font-size: 16px;
  line-height: 1.55; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100% }
a { color: var(--garnet); text-decoration-thickness: 1px; text-underline-offset: 3px }
a:hover { color: var(--garnet-dark) }
h1, h2, h3 { color: var(--ink); line-height: 1.08; letter-spacing: -.025em; margin: 0 0 .5em; font-weight: 700 }
h1 { font-size: clamp(2.3rem, 5.4vw, 4.2rem); letter-spacing: -.035em }
h2 { font-size: clamp(1.75rem, 3.6vw, 2.75rem) }
h3 { font-size: 1.15rem; letter-spacing: -.01em; line-height: 1.3 }
p { margin: 0 0 1em }
:focus-visible { outline: 2px solid var(--garnet); outline-offset: 3px; border-radius: 4px }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter) }
.muted { color: var(--ink-soft) }
.eyebrow {
  display: inline-flex; align-items: center; gap: .5em; font-size: .8rem; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: var(--garnet); margin-bottom: 1rem;
}
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55em; font: inherit; font-weight: 600;
  font-size: 1rem; line-height: 1.2; padding: .85em 1.35em; border-radius: var(--radius); border: 1px solid transparent;
  background: var(--garnet); color: var(--white); text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background .15s, transform .15s, box-shadow .15s, border-color .15s;
}
.btn:hover { background: var(--garnet-dark); color: var(--white); transform: translateY(-1px) }
.btn:active { transform: none }
.btn svg { width: 1.15em; height: 1.15em; flex: none }
.btn.lg { font-size: 1.08rem; padding: 1em 1.6em }
.btn.sm { font-size: .9rem; padding: .6em 1em; border-radius: 10px }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line-strong) }
.btn.ghost:hover { background: var(--wash); color: var(--ink); border-color: var(--ink-faint) }
.btn.light { background: var(--white); color: var(--plum) }
.btn.light:hover { background: var(--blush); color: var(--plum) }
.btn.danger { background: var(--white); color: var(--garnet); border-color: var(--garnet) }
.btn.danger:hover { background: var(--garnet); color: var(--white) }
.link { background: none; border: 0; padding: 0; font: inherit; color: var(--ink-soft); text-decoration: underline; cursor: pointer }
.link:hover { color: var(--ink) }

/* Header: the brand at the left edge; What it does, Ambassadors, the language and Get started at the right edge */
.top {
  position: sticky; top: 0; z-index: 30; background: rgba(255, 255, 255, .88);
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent; transition: border-color .2s;
}
.top.scrolled { border-bottom-color: var(--line) }
.top .bar { display: flex; align-items: center; gap: .4rem; height: 72px; padding: 0 clamp(16px, 3.4vw, 56px) }
.brand {
  display: inline-flex; align-items: center; gap: .55rem; flex: none; color: var(--ink); text-decoration: none;
  font-weight: 700; font-size: 1.55rem; letter-spacing: -.025em; line-height: 1;
}
.brand svg { width: 31px; height: 33px; display: block; flex: none }
.brand span { display: block; padding-top: .14em }  /* the cap height sits on the mark's centre */
.brand:hover { color: var(--ink) }
.brand.white, .brand.white:hover { color: var(--white) }
.top .links { display: flex; gap: .2rem; margin-left: clamp(12px, 3vw, 40px) }
.navlink {
  padding: .55em .85em; border-radius: 10px; color: var(--ink-soft); text-decoration: none; font-weight: 500;
  font-size: .97rem; white-space: nowrap;
}
.navlink:hover, .navlink.on { background: var(--wash); color: var(--ink) }
.top .right { margin-left: auto; display: flex; align-items: center; gap: .6rem }
@media (max-width: 720px) {
  .top .bar { height: 62px; gap: .3rem }
  .brand { font-size: 1.35rem } .brand svg { width: 27px; height: 29px }
  .top .links { display: none }
}

/* Language: a globe and the language's name, clearly a control */
.lang { position: relative }
.lang summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: .45em; padding: .5em .85em;
  border: 1px solid var(--line-strong); border-radius: 999px; font-size: .93rem; font-weight: 500; color: var(--ink);
  user-select: none; white-space: nowrap; background: var(--white);
}
.lang summary::-webkit-details-marker { display: none }
.lang summary:hover, .lang[open] summary { border-color: var(--ink-faint) }
.lang summary svg { width: 17px; height: 17px; color: var(--garnet) }
.lang summary .chev { width: 13px; height: 13px; color: var(--ink-soft); transition: transform .15s }
.lang[open] summary .chev { transform: rotate(180deg) }
.lang .short { display: none }
@media (max-width: 720px) { .lang .full { display: none } .lang .short { display: inline } .lang summary { padding: .45em .65em } }
.menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 40; min-width: 11rem; padding: .35rem;
  background: var(--white); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column;
}
.menu a, .menu button {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; width: 100%; text-align: left;
  font: inherit; font-size: .95rem; color: var(--ink); background: none; border: 0; border-radius: 9px;
  padding: .6rem .8rem; text-decoration: none; cursor: pointer;
}
.menu a:hover, .menu button:hover { background: var(--wash); color: var(--ink) }
.menu a[aria-current=true] { font-weight: 600 }
.menu a[aria-current=true]::after { content: "✓"; color: var(--garnet) }
.menu .handle { color: var(--ink-faint); font-size: .82rem; padding: .45rem .75rem .3rem }
.menu form { margin: 0 }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: .3rem 0 }

/* Get started: on a phone or tablet a plain link to Telegram; on a computer a panel with a QR code */
.go { position: relative }
.go summary { list-style: none; cursor: pointer }
.go summary::-webkit-details-marker { display: none }
.go summary .chev { width: 1em; height: 1em; transition: transform .15s }
.go[open] summary .chev { transform: rotate(180deg) }
.go-panel { width: 320px; padding: .4rem; gap: .2rem }
.go-panel a.opt { justify-content: flex-start; gap: .8rem; padding: .75rem .8rem; align-items: center }
.go-panel .oi { flex: none; width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: var(--wash); color: var(--garnet) }
.go-panel .oi svg { width: 20px; height: 20px }
.go-panel .opt.main .oi { background: var(--garnet); color: var(--white) }
.go-panel .opt b { display: block; font-size: .98rem }
.go-panel .opt small { display: block; color: var(--ink-faint); font-size: .82rem; font-weight: 400 }
.hero .go .menu, .two .go .menu, .fcta .go .menu { left: 0; right: auto }
.fcta .go .menu { left: 50%; transform: translateX(-50%) }
.go-touch { display: none }
@media (hover: none), (pointer: coarse), (max-width: 1024px) {
  .go, .go-desk { display: none } .go-touch { display: inline-flex }
}

/* Who is signed in (top right) */
.who { position: relative; flex: none }
.who summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: .5rem; padding: .25rem .75rem .25rem .25rem;
  border: 1px solid var(--line-strong); border-radius: 999px; font-size: .9rem; font-weight: 500;
}
.who summary::-webkit-details-marker { display: none }
.who summary:hover, .who[open] summary { border-color: var(--ink-faint) }
.avatar {
  flex: none; width: 1.8rem; height: 1.8rem; border-radius: 50%; display: inline-flex; align-items: center;
  justify-content: center; background: var(--garnet); color: var(--white); font-weight: 700; font-size: .85rem;
}
.who .name { max-width: 10em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
@media (max-width: 440px) { .who .name { display: none } .who summary { padding: .2rem } }

/* Sections */
:where(main > section:not(.panel)) { padding: clamp(56px, 8vw, 100px) 0 }
section.tint { background: var(--wash) }
section.dark { background: var(--plum); color: var(--white) }
section.dark h2, section.dark h3 { color: var(--white) }
section.dark .muted { color: rgba(255, 255, 255, .72) }
section.dark .eyebrow { color: #f2a7b3 }

/* Hero: the first screen holds the hello, Get started, the phone and its tabs */
main > section.hero { padding: clamp(16px, 2.5vh, 36px) 0 clamp(36px, 5vh, 64px) }
.hero .wrap {
  max-width: none; padding: 0 clamp(16px, 3.4vw, 56px); display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: clamp(24px, 4vw, 72px); align-items: center; min-height: calc(100svh - 72px - 72px);
}
.hero h1 { font-size: clamp(2.4rem, 5vw, 4.5rem); margin-bottom: .45em }
.hero h1 .accent { color: var(--garnet); display: block }
.hero .lead { font-size: clamp(1.08rem, 1.5vw, 1.3rem); color: var(--ink-soft); max-width: 32em; margin-bottom: 1.8rem }
.hero .actions { margin-top: 0 }
.langs-row { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: 2rem }
.chip {
  display: inline-flex; align-items: center; gap: .4em; padding: .35em .85em; border-radius: 999px; font-size: .86rem;
  border: 1px solid var(--line-strong); color: var(--ink-soft); background: var(--white);
}
@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: minmax(0, 1fr); min-height: 0; gap: 28px }
  .hero .copy { text-align: center }
  .hero .lead { margin-left: auto; margin-right: auto }
  .hero .actions, .langs-row { justify-content: center }
  .langs-row { margin-top: 1.2rem }
}

/* The phone: a Telegram chat with Jogi that plays scenes */
.stage { position: relative; display: flex; flex-direction: column; align-items: center; gap: 1.2rem }
.stage::before {
  content: ""; position: absolute; inset: 8% -10% 14%; z-index: -1; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(177, 27, 50, .16), rgba(177, 27, 50, 0));
}
.phone {
  /* Ali's recording, cropped to the phone (640x980, its bottom cut by the frame: faded out); the white around it
  multiplies into the page */
  display: block; height: clamp(380px, calc(100svh - 72px - 240px), 600px); aspect-ratio: 640 / 980; max-width: 92vw;
  object-fit: contain; background: transparent; mix-blend-mode: multiply;
  -webkit-mask-image: linear-gradient(#000 88%, transparent); mask-image: linear-gradient(#000 88%, transparent);
}
.chat {
  flex: 1; display: flex; flex-direction: column; justify-content: flex-end; gap: .45rem; padding: .8rem .7rem 1rem;
  overflow: hidden; font-size: .86rem; line-height: 1.38;
}
.msg {
  max-width: 84%; padding: .5rem .72rem .55rem; border-radius: 16px; background: var(--white); color: var(--ink);
  box-shadow: 0 1px 1px rgba(58, 22, 48, .08); white-space: pre-line; overflow-wrap: anywhere;
  animation: pop .32s cubic-bezier(.2, .9, .3, 1.2) both;
}
.msg.me { align-self: flex-end; background: var(--blush); border-bottom-right-radius: 5px }
.msg.jogi { align-self: flex-start; border-bottom-left-radius: 5px }
.msg .time { float: right; margin: .35rem 0 -.15rem .6rem; font-size: .68rem; color: var(--ink-faint) }
.msg.card { padding: .55rem .72rem }
.msg .btns { display: grid; gap: .3rem; margin-top: .5rem }
.msg .btns span { display: block; text-align: center; padding: .38rem; border-radius: 9px; background: var(--wash); color: var(--garnet); font-weight: 600; font-size: .8rem }
.msg.call { display: flex; align-items: center; gap: .6rem }
.msg.call .ring { width: 30px; height: 30px; border-radius: 50%; background: var(--garnet); display: grid; place-items: center; flex: none }
.msg.call .ring svg { width: 15px; height: 15px; fill: var(--white) }
.msg.file { display: flex; align-items: center; gap: .6rem }
.msg.file .doc { width: 34px; height: 40px; border-radius: 6px; background: var(--garnet); color: var(--white); font-size: .6rem; font-weight: 700; display: grid; place-items: center; flex: none }
.msg.voice { display: flex; align-items: center; gap: .55rem }
.msg.voice .play { width: 30px; height: 30px; border-radius: 50%; background: var(--garnet); flex: none; position: relative }
.msg.voice .play::after { content: ""; position: absolute; left: 12px; top: 9px; border: 6px solid transparent; border-left: 9px solid var(--white) }
.msg.voice .wave { display: flex; align-items: center; gap: 2px; height: 22px }
.msg.voice .wave i { width: 3px; border-radius: 2px; background: var(--garnet); opacity: .55 }
.typing-bubble { align-self: flex-start; animation: pop .25s ease-out both }
.typing-bubble svg { width: 46px; height: auto }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.96) } to { opacity: 1; transform: none } }

/* The mark's three dots type (the logo is a speech bubble) */
.dots circle { animation: dot 1.2s ease-in-out infinite; transform-box: fill-box; transform-origin: center }
.dots circle:nth-child(2) { animation-delay: .15s }
.dots circle:nth-child(3) { animation-delay: .3s }
@keyframes dot { 0%, 60%, 100% { transform: none; opacity: 1 } 30% { transform: translateY(-22%); opacity: .55 } }

/* Two rows on a computer; a screen too narrow for a row wraps it (phones) */
.scenes { display: flex; flex-direction: column; align-items: center; gap: .35rem; max-width: 100% }
.scenes .row { display: flex; flex-wrap: wrap; justify-content: center; gap: .35rem }
.scenes button {
  font: inherit; font-size: .85rem; font-weight: 500; padding: .42em .9em; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line-strong); background: var(--white); color: var(--ink-soft); transition: all .15s;
  white-space: nowrap; flex: none;
}
.scenes button:hover { color: var(--ink); border-color: var(--ink-faint) }
.scenes button[aria-pressed=true] { background: var(--plum); border-color: var(--plum); color: var(--white) }

/* Cards (the ambassador page) */
.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.5rem;
  transition: box-shadow .2s, border-color .2s;
}
.card:hover { box-shadow: var(--shadow); border-color: var(--line-strong) }

/* Home, screen two: how to start next to the questions */
.two { background: var(--wash); border-top: 1px solid var(--line) }
.two .wrap { max-width: none; padding: 0 clamp(16px, 3.4vw, 56px); display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(32px, 6vw, 96px); align-items: start }
@media (max-width: 900px) { .two .wrap { grid-template-columns: minmax(0, 1fr) } }
.two h2 { font-size: clamp(1.6rem, 2.8vw, 2.2rem); margin-bottom: 1.4rem }
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; display: grid; gap: 1.2rem }
.steps li { display: grid; grid-template-columns: 40px 1fr; column-gap: 1rem; align-items: start }
.steps li::before {
  counter-increment: step; content: counter(step); grid-row: span 2; display: grid; place-items: center; width: 40px;
  height: 40px; border-radius: 50%; background: var(--garnet); color: var(--white); font-weight: 700;
}
.steps li b { font-size: 1.08rem; line-height: 1.35; padding-top: .45rem }
.steps li span { color: var(--ink-soft) }
.two .actions { margin-top: 1.8rem }

/* Questions */
.faq details { border-bottom: 1px solid var(--line) }
.faq details:first-child { border-top: 1px solid var(--line) }
.faq summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: 1.1rem 0; font-weight: 600; font-size: 1.05rem;
}
.faq summary::-webkit-details-marker { display: none }
.faq summary::after { content: "+"; flex: none; font-weight: 400; font-size: 1.5rem; line-height: 1; color: var(--garnet); transition: transform .2s }
.faq details[open] summary::after { transform: rotate(45deg) }
.faq .a { padding: 0; color: var(--ink-soft); max-width: 62ch }
.faq .a p { margin: 0; padding-bottom: 1.2rem }

/* The ambassador program slides in from the corner (site.js, until it's closed) */
.amb-pop {
  position: fixed; left: clamp(12px, 2vw, 28px); bottom: clamp(12px, 2vw, 28px); z-index: 50; max-width: 420px;
  display: flex; align-items: center; gap: .8rem; padding: .85rem .9rem .85rem 1rem; background: var(--plum);
  color: var(--white); border-radius: 18px; box-shadow: var(--shadow-lg); transform: translateY(140%);
  transition: transform .55s cubic-bezier(.2, .9, .3, 1.15);
}
.amb-pop.in { transform: none }
.amb-pop .cap { flex: none; width: 42px; height: 42px; border-radius: 12px; background: var(--garnet); display: grid; place-items: center; animation: wiggle 2.4s ease-in-out 1s 2 }
.amb-pop .cap svg { width: 22px; height: 22px; color: var(--white) }
.amb-pop .txt { display: flex; flex-direction: column; line-height: 1.3; font-size: .88rem; color: rgba(255, 255, 255, .8) }
.amb-pop .txt b { color: var(--white); font-size: .95rem }
.amb-pop .btn { background: var(--white); color: var(--plum); flex: none }
.amb-pop .btn:hover { background: var(--blush); color: var(--plum) }
.amb-pop .x { flex: none; background: none; border: 0; color: rgba(255, 255, 255, .6); font-size: 1.3rem; cursor: pointer; padding: .1rem .3rem; line-height: 1 }
.amb-pop .x:hover { color: var(--white) }
@keyframes wiggle { 0%, 100% { transform: none } 20% { transform: rotate(-10deg) } 40% { transform: rotate(8deg) } 60% { transform: rotate(-4deg) } }
@media (max-width: 560px) { .amb-pop { right: 12px; max-width: none } .amb-pop .txt span { display: none } }

/* What Jogi does (/features) */
main > section.fhead { padding: clamp(40px, 6vw, 80px) 0 clamp(16px, 3vw, 32px) }
.fhead .wrap, .features .wrap, .armenia .wrap, .fcta .wrap { max-width: none; padding: 0 clamp(16px, 3.4vw, 56px) }
.fhead h1 { font-size: clamp(2.2rem, 4.6vw, 3.8rem); max-width: 14em }
.fhead .lead { font-size: clamp(1.05rem, 1.4vw, 1.25rem); color: var(--ink-soft); max-width: 40em; margin: 0 }
main > section.features { padding-top: clamp(16px, 3vw, 32px) }
.rows-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: clamp(32px, 5vw, 80px) }
@media (max-width: 1100px) { .rows-list { grid-template-columns: repeat(2, minmax(0, 1fr)) } }
@media (max-width: 720px) { .rows-list { grid-template-columns: minmax(0, 1fr) } }
.rows-list li { display: grid; grid-template-columns: 48px 1fr; gap: 1rem; padding: 1.6rem 0; border-top: 1px solid var(--line) }
.rows-list .ic { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--blush); color: var(--garnet) }
.rows-list .ic svg { width: 24px; height: 24px }
.rows-list h3 { font-size: 1.15rem; margin: .1rem 0 .35rem }
.rows-list p { color: var(--ink-soft); margin: 0 0 .8rem }
.rows-list .say {
  display: inline-block; padding: .45em .85em; border-radius: 16px 16px 16px 5px; background: var(--wash);
  border: 1px solid var(--line); font-size: .9rem; color: var(--ink);
}
.armenia .wrap { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(32px, 6vw, 80px); align-items: center }
@media (max-width: 900px) { .armenia .wrap { grid-template-columns: minmax(0, 1fr) } }
.armenia h2 { margin-bottom: 1.4rem }
.facts { display: grid; gap: 1.1rem; margin: 0; padding: 0; list-style: none }
.facts li { display: flex; gap: .9rem; align-items: flex-start }
.facts li .n { flex: none; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: rgba(255, 255, 255, .1); font-size: 1.05rem }
.facts li b { display: block; margin-bottom: .1rem }
.rows-list .more, .facts .more { display: table; margin-top: .7rem; font-weight: 600; color: var(--garnet); text-decoration: none }
.rows-list .more:hover, .facts .more:hover { text-decoration: underline }
.facts .more { margin-top: .35rem; color: #fff }
.ticker { display: grid; gap: .7rem; overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent) }
.ticker .row { display: flex; gap: .6rem; width: max-content; animation: slide 46s linear infinite }
.ticker .row.rev { animation-direction: reverse; animation-duration: 52s }
.ticker span { white-space: nowrap; padding: .75em 1.1em; border-radius: 16px 16px 16px 5px; background: rgba(255, 255, 255, .1); font-size: 1.02rem }
.ticker .row.rev span { border-radius: 16px 16px 5px 16px; background: rgba(255, 255, 255, .16) }
@keyframes slide { to { transform: translateX(-50%) } }
.fcta { text-align: center }
.fcta .big-mark { width: 64px; margin: 0 auto 1rem }
.fcta p { font-size: 1.3rem; font-weight: 600; margin-bottom: 1.2rem }
.fcta .actions { justify-content: center }

/* Footer */
footer.site { background: var(--plum); color: rgba(255, 255, 255, .7); padding: 44px 0 24px; font-size: .92rem }
footer.site .wrap { max-width: none; padding: 0 clamp(16px, 3.4vw, 56px) }
footer.site .foot { display: grid; grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr)); gap: 2rem }
@media (max-width: 720px) { footer.site .foot { grid-template-columns: 1fr 1fr } footer.site .fbrand { grid-column: 1 / -1 } }
footer.site .note { max-width: 26em; margin: .9rem 0 0; color: rgba(255, 255, 255, .6) }
footer.site nav { display: flex; flex-direction: column; gap: .55rem }
footer.site nav b { color: var(--white); font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; margin-bottom: .2rem }
footer.site a { color: rgba(255, 255, 255, .85); text-decoration: none }
footer.site a:hover { color: var(--white) }
footer.site .new { display: inline-block; margin-left: .35rem; padding: .05em .45em; border-radius: 999px; background: var(--garnet); color: var(--white); font-size: .72rem; font-weight: 700; animation: pulse 2.4s ease-in-out infinite }
@keyframes pulse { 50% { box-shadow: 0 0 0 5px rgba(177, 27, 50, .35) } }
footer.site .base { margin-top: 2rem; padding-top: 1.1rem; border-top: 1px solid rgba(255, 255, 255, .12); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; font-size: .84rem; color: rgba(255, 255, 255, .5) }

/* Reveal on scroll (site.js adds .in; without JavaScript everything shows) */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease }
.js .reveal.in { opacity: 1; transform: none }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto }
  *, *::before, *::after { animation: none !important; transition: none !important }
  .js .reveal { opacity: 1; transform: none }
}

/* ─── Public pages (sign-in, the ambassador program, results) ─────────────────────────────────── */
body.public { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh }
main.page { flex: 1; padding: clamp(32px, 7vw, 80px) 0 clamp(48px, 8vw, 96px) }
.wrap.narrow { max-width: 680px }
.alert {
  border: 1px solid rgba(177, 27, 50, .3); background: #fdf1f3; color: var(--ink); border-radius: var(--radius);
  padding: .8rem 1rem; font-size: .95rem; margin: 0 0 1rem;
}
.alert.ok { border-color: rgba(30, 130, 76, .3); background: #eef8f1 }
.note { font-size: .9rem; color: var(--ink-soft) }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; margin-top: 1.4rem }
@media (max-width: 480px) { .actions .btn { width: 100% } }
.center { text-align: center }
.result { max-width: 480px; margin: 0 auto; text-align: center; display: flex; flex-direction: column; align-items: center }
.result .actions { justify-content: center }
.result .big-mark { width: 64px; margin-bottom: 1.2rem }

/* Sign-in */
.signin-box {
  max-width: 440px; margin: 0 auto; text-align: center; display: flex; flex-direction: column; align-items: center;
  padding: clamp(28px, 5vw, 44px); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow);
}
.signin-box .big-mark { width: 60px; margin-bottom: 1.2rem }
.signin-box h1 { font-size: clamp(1.7rem, 4vw, 2.2rem) }
.signin-box .widget { min-height: 48px; margin: 1.2rem 0 .4rem }
.signin-box .or { display: flex; align-items: center; gap: .8rem; width: 100%; color: var(--ink-faint); font-size: .85rem; margin: 1rem 0 }
.signin-box .or::before, .signin-box .or::after { content: ""; flex: 1; border-top: 1px solid var(--line) }
.signin-box .note { margin: 1rem 0 0 }
/* jogi.am/go/<code>'s page (admin/sources.py): the card's look, centred; edge to edge on a phone */
body.go-land main.page { display: flex; align-items: center }
.go-land main.page > .wrap { width: 100% }
.go-land .actions { width: 100%; justify-content: center }
@media (max-width: 480px) { .go-land .signin-box { border: 0; box-shadow: none; padding: 0 } }

/* ─── The signed-in area: sidebar + content; tabs along the bottom on a phone ─────────────────── */
body.app { background: var(--wash) }
.shell { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: 100vh; min-height: 100dvh }
.side {
  position: sticky; top: 0; height: 100vh; height: 100dvh; display: flex; flex-direction: column; gap: 1.4rem;
  padding: 22px 14px 16px; background: var(--white); border-right: 1px solid var(--line);
}
.side .logo { padding: 0 10px }
.side .logo img { height: 32px; width: auto }
.side-nav { display: flex; flex-direction: column; gap: 2px }
.side-nav a {
  display: flex; align-items: center; gap: .75rem; padding: .62rem .75rem; border-radius: 10px; color: var(--ink-soft);
  text-decoration: none; font-weight: 500; font-size: .95rem;
}
.side-nav a svg { width: 19px; height: 19px; flex: none }
.side-nav a:hover { background: var(--wash); color: var(--ink) }
.side-nav a[aria-current=page] { background: var(--blush); color: var(--garnet) }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: .6rem }
.side-foot .tg { justify-content: flex-start }
.side-foot .lang summary { width: 100% }
.side-foot .lang summary .chev { margin-left: auto }
.lang.up .menu { top: auto; bottom: calc(100% + 6px); left: 0; right: auto }
.me { display: flex; align-items: center; gap: .6rem; padding: .7rem .5rem 0; border-top: 1px solid var(--line) }
.me .who-text { min-width: 0; flex: 1; line-height: 1.25 }
.me .who-text b, .me .who-text small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.me .who-text b { font-size: .9rem }
.me .who-text small { color: var(--ink-faint); font-size: .8rem }
.me form { margin: 0 }
.icon-btn {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; border: 0; background: none;
  color: var(--ink-soft); cursor: pointer;
}
.icon-btn:hover { background: var(--wash); color: var(--garnet) }
.icon-btn svg { width: 18px; height: 18px }
.appmain { min-width: 0; display: flex; flex-direction: column }
.appbar { display: none }
.content { width: 100%; max-width: 820px; margin: 0 auto; padding: clamp(24px, 4vw, 48px) clamp(16px, 4vw, 40px) 64px }
.tabbar { display: none }
.content > h1 { font-size: clamp(1.7rem, 3vw, 2.2rem); margin-bottom: .3rem }
.content > .sub { color: var(--ink-soft); margin-bottom: 1.8rem }

@media (max-width: 820px) {
  .shell { display: block }
  .side { display: none }
  .appbar {
    display: flex; align-items: center; gap: .7rem; position: sticky; top: 0; z-index: 30; height: 56px;
    padding: 0 12px 0 16px; background: rgba(255, 255, 255, .92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
  }
  .appbar .logo svg { width: 28px; height: 28px }
  .appbar .here { font-size: 1rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
  .appbar .right { margin-left: auto; display: flex; align-items: center; gap: .3rem }
  .appbar .lang summary span, .appbar .lang summary .chev { display: none }
  .appbar .who summary { padding: .15rem; border: 0 }
  .content { padding-bottom: calc(96px + env(safe-area-inset-bottom)) }
  .content > h1 { display: none }
  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    background: rgba(255, 255, 255, .96); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .tabbar a {
    display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 4px 2px; text-decoration: none;
    color: var(--ink-faint); font-size: .68rem; font-weight: 500; text-align: center; line-height: 1.15;
  }
  .tabbar a svg { width: 22px; height: 22px }
  .tabbar a[aria-current=page] { color: var(--garnet) }
}

/* Panels, rows and controls (account, settings, connections, help) */
.panel { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); margin-bottom: 1.2rem; overflow: hidden }
.panel > .ph { padding: 1.2rem 1.4rem .2rem }
.panel > .ph h2 { font-size: 1.1rem; letter-spacing: -.01em; margin: 0 0 .2rem; display: flex; align-items: center; gap: .55rem }
.panel > .ph p { color: var(--ink-soft); font-size: .93rem; margin: 0 }
.panel > .pb { padding: 1.1rem 1.4rem 1.4rem }
.panel .big { font-size: 1.2rem; font-weight: 600; margin: 0 0 .35rem }
.panel .links { display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; margin-top: 1rem; font-size: .93rem }
.rows { list-style: none; margin: 0; padding: 0 }
.rows > li { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.4rem; border-top: 1px solid var(--line) }
.rows > li:first-child { border-top: 0 }
.rows .lbl { min-width: 0 }
.rows .lbl b { display: block; font-weight: 600; font-size: .97rem }
.rows .lbl small { display: block; color: var(--ink-soft); font-size: .86rem; margin-top: .1rem; line-height: 1.4 }
.rows .ctl { flex: none; display: flex; align-items: center; gap: .5rem }
@media (max-width: 560px) {
  .rows > li.wrapme { flex-direction: column; align-items: stretch }
  .rows > li.wrapme .ctl { justify-content: flex-start }
}
select.input, input.input {
  font: inherit; font-size: .95rem; color: var(--ink); background: var(--white); border: 1px solid var(--line-strong);
  border-radius: 10px; padding: .55rem .75rem; max-width: 100%;
}
select.input { padding-right: 2rem; appearance: none; -webkit-appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233a1630' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .6rem center; background-size: 14px }
select.input:focus, input.input:focus { outline: none; border-color: var(--garnet); box-shadow: 0 0 0 3px rgba(177, 27, 50, .12) }
input.input.time { width: 7.5rem }
input.input.num { width: 6.5rem }
/* a toggle: a checkbox drawn as a switch */
.switch { position: relative; display: inline-flex; width: 46px; height: 28px; flex: none }
.switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; z-index: 1 }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: rgba(58, 22, 48, .2); transition: background .15s }
.switch span::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--white);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .2); transition: transform .15s;
}
.switch input:checked + span { background: var(--garnet) }
.switch input:checked + span::after { transform: translateX(18px) }
.switch input:focus-visible + span { outline: 2px solid var(--garnet); outline-offset: 2px }
.saved { font-size: .8rem; color: #1e824c; opacity: 0; transition: opacity .2s }
.saved.on { opacity: 1 }
.tag {
  display: inline-flex; align-items: center; gap: .3em; padding: .2em .65em; border-radius: 999px; font-size: .8rem;
  font-weight: 600; background: var(--wash); color: var(--ink-soft); border: 1px solid var(--line);
}
.tag.on { background: #eef8f1; color: #1e6b41; border-color: rgba(30, 130, 76, .25) }
.tag.warn { background: #fdf1f3; color: var(--garnet); border-color: rgba(177, 27, 50, .25) }
.check-list { list-style: none; margin: .4rem 0 0; padding: 0; display: grid; gap: .55rem }
.check-list li { display: flex; gap: .6rem; align-items: flex-start }
.check-list li svg { width: 18px; height: 18px; flex: none; color: var(--garnet); margin-top: .2rem }
ol.plan-steps { margin: .6rem 0 0; padding-left: 1.2rem; display: grid; gap: .6rem }
.sections-nav { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 1.4rem }
.sections-nav a {
  padding: .4em .85em; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--white);
  color: var(--ink-soft); text-decoration: none; font-size: .86rem; font-weight: 500;
}
.sections-nav a:hover { color: var(--ink); border-color: var(--ink-faint) }

/* ─── The web chat ────────────────────────────────────────────────────────────────────────────── */
body.app.full .content { max-width: none; padding: 0; height: 100vh; height: 100dvh; display: flex; flex-direction: column }
.chatwrap { flex: 1; min-height: 0; display: flex; flex-direction: column; width: 100% }
#log { padding-left: max(clamp(14px, 3vw, 28px), calc((100% - 860px) / 2)) !important; padding-right: max(clamp(14px, 3vw, 28px), calc((100% - 860px) / 2)) !important }
.chathead { display: flex; align-items: center; gap: .75rem; padding: 18px clamp(16px, 3vw, 28px); border-bottom: 1px solid var(--line); background: var(--white) }
.chathead .pic { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; background: var(--white) }
.chathead .pic svg { width: 26px }
.chathead b { display: block; line-height: 1.2 }
.chathead small { display: block; color: var(--ink-faint); font-size: .8rem }
.chathead .tg { margin-left: auto }
#log {
  flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: .5rem;
  padding: 1.2rem clamp(14px, 3vw, 28px) 1rem; background: #f6f0f2;
  background-image: radial-gradient(rgba(58, 22, 48, .045) 1px, transparent 1px); background-size: 16px 16px;
}
#log .msg { font-size: .97rem; line-height: 1.45; max-width: min(82%, 560px); white-space: pre-wrap; animation: none; padding: .6rem .85rem }
#log .msg.in { align-self: flex-end; background: var(--blush); border-bottom-right-radius: 5px }
#log .msg.out { align-self: flex-start; background: var(--white); border-bottom-left-radius: 5px }
#log .msg a:not(.btnlink):not(.file) { color: var(--garnet) }
#log .msg a.btnlink, #log .msg button.tap {
  display: inline-flex; margin: .55rem .4rem 0 0; padding: .45rem .9rem; border-radius: 10px; font: inherit; font-size: .9rem;
  font-weight: 600; text-decoration: none; cursor: pointer; background: var(--wash); color: var(--garnet); border: 1px solid var(--line);
}
#log .msg button.tap:first-of-type { background: var(--garnet); color: var(--white); border-color: var(--garnet) }
#log .msg button.tap:disabled { opacity: .5; cursor: default }
#log .msg .tapped { display: block; margin-top: .5rem; color: var(--ink-faint); font-size: .88rem }
#log .msg audio { display: block; width: min(320px, 100%); margin-top: .4rem }
#log .msg video, #log .msg img.photo { display: block; max-width: 100%; max-height: 360px; border-radius: 12px; margin-top: .4rem }
#log .msg img.photo { cursor: zoom-in }
#log .msg a.file {
  display: inline-flex; align-items: center; gap: .4rem; margin-top: .4rem; padding: .5rem .8rem; border-radius: 10px;
  background: var(--wash); color: var(--ink); text-decoration: none; font-weight: 500; word-break: break-all;
}
#log .hint { margin: auto; text-align: center; color: var(--ink-soft); max-width: 340px; display: flex; flex-direction: column; align-items: center; gap: .8rem }
#log .hint svg { width: 56px }
#log .typing-bubble svg { width: 44px }
form.composer {
  display: flex; align-items: flex-end; gap: .5rem; padding: .7rem clamp(12px, 3vw, 24px) calc(.8rem + env(safe-area-inset-bottom));
  background: var(--white); border-top: 1px solid var(--line);
}
form.composer textarea {
  flex: 1; min-width: 0; resize: none; font: inherit; font-size: 1rem; color: var(--ink); background: var(--wash);
  border: 1px solid var(--line); border-radius: 14px; padding: .7rem .95rem; max-height: 160px; outline: none; line-height: 1.4;
}
form.composer textarea:focus { border-color: var(--garnet); background: var(--white) }
form.composer .icon-btn { width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line) }
form.composer .send { width: 44px; height: 44px; padding: 0; border-radius: 12px }
@media (max-width: 820px) {
  body.app.full .content { height: calc(100dvh - 56px); padding-bottom: 0 }
  body.app.full .tabbar { display: none }
  .chathead { display: none }
}
.inline-ic { display: inline-block; width: 16px; height: 16px; vertical-align: -3px }
.panel .ph h2 svg { width: 20px; height: 20px; color: var(--garnet) }
.panel .ph h2 svg.tg-ic { fill: var(--garnet) }
.panel .ph h2 .tag { margin-left: auto }
.check-list .dot { width: 18px; height: 18px; flex: none; border-radius: 50%; border: 2px solid var(--line-strong); margin-top: .2rem }
.faq.small summary { font-size: 1rem; padding: 1rem 0 }
.faq.small details:last-child { border-bottom: 0 }
.js .save-bar { display: none }
.settings-form .panel { scroll-margin-top: 80px }
.btn.sm svg, .btn svg { flex: none }

/* Legal pages */
.legal { font-size: 1rem; line-height: 1.65 }
.legal h1 { font-size: clamp(1.9rem, 4vw, 2.6rem) }
.legal h2 { font-size: 1.3rem; margin: 2.2rem 0 .7rem }
.legal ul { padding-left: 1.3rem } .legal li { margin: .45rem 0 }
.legal .lead { font-size: 1.15rem }
main.page.wide { padding-top: 0 }
@media (max-width: 820px) {
  .sections-nav { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -16px 1.2rem; padding: 0 16px }
  .sections-nav::-webkit-scrollbar { display: none }
  .sections-nav a { white-space: nowrap }
}
.side .logo .brand { font-size: 1.4rem } .side .logo .brand svg { width: 28px; height: 30px }
@media (max-width: 420px) {
  .top .right { gap: .35rem }
  .top .go-touch { padding: .55em .8em }
  .top .go-touch svg { display: none }
}
html, body { overflow-x: clip }
.stage .more { color: var(--garnet); border-color: var(--garnet); font-weight: 600; text-decoration: none; margin-top: .2rem }
.stage .more:hover { color: var(--garnet-dark); border-color: var(--garnet-dark) }
@media (max-width: 720px) {
  .phone { height: min(520px, calc(100svh - 190px)) }
  .hero h1 { font-size: clamp(2.1rem, 9vw, 2.8rem) }
  .hero .lead { font-size: 1.02rem; margin-bottom: 1.3rem }
  .hero .actions .btn { width: 100%; justify-content: center }
  .scenes button { font-size: .8rem; padding: .4em .8em }
  .two .actions .btn, .fcta .actions .btn { width: 100%; justify-content: center }
  main > section.fhead { padding-top: 28px }
}
/* A wrapped bubble: even lines, so its box hugs the words instead of leaving a gap on the right */
.msg, #log .msg { text-wrap: wrap }
.faq .a { overflow: hidden }
.faq .a .try { display: inline-block; margin-top: .5rem; font-weight: 600; text-decoration: none }
.faq .a .try:hover { text-decoration: underline }

/* The plan page and its result: one card, the price in big type */
.plan-card {
  max-width: 460px; margin: clamp(8px, 4vh, 40px) auto 0; padding: clamp(24px, 5vw, 40px); text-align: center;
  background: var(--white); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow);
}
.plan-card .plan-mark { width: 52px; margin: 0 auto 1.1rem }
.plan-card .big-price { font-size: clamp(2.4rem, 8vw, 3.2rem); font-weight: 700; letter-spacing: -.03em; line-height: 1.05; margin: 0; color: var(--ink) }
.plan-card .then { font-size: 1.15rem; color: var(--ink-soft); margin: .45rem 0 1.5rem }
.plan-card .then b, .plan-card .big-price b { color: var(--garnet) }
.plan-card .check-list { text-align: left; margin: 0 0 1.6rem; padding: 1.1rem 1.2rem; background: var(--wash); border-radius: 16px; gap: .7rem }
.plan-card .btn.wide { width: 100%; justify-content: center }
.plan-card .secure { margin: 1rem 0 0 }
.plan-card.done h1 { font-size: clamp(1.7rem, 5vw, 2.2rem); margin-bottom: .2rem }
.plan-card.done .note { margin-top: 1rem }
/* The plan page: one card per plan (billing/plans.py), side by side where there's room */
.plans { display: grid; gap: 1.2rem; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); align-items: start }
.plans .plan-card h2 { margin: 0 0 .6rem; font-size: 1.2rem; color: var(--garnet) }
.plans .plan-card form { margin: 0 }
.plans .plan-card { margin: 0; max-width: none; display: flex; flex-direction: column }
.plans .plan-card .check-list { flex: 1; align-content: start }
.plans .plan-card .for { margin: -.3rem 0 1rem; color: var(--ink-soft) }
.plans .plan-card.featured { border: 2px solid var(--garnet) }
/* The public plan page (web/plans.py): three cards, one column on a phone, then which one and the facts */
.plans-page .wrap { max-width: none; padding: 0 clamp(16px, 3.4vw, 56px) clamp(32px, 6vw, 72px) }
main > section.plans-page { padding-top: 0 }
.plans-page .plans { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); align-items: stretch }
.plans-notes { display: grid; gap: 1.5rem 3rem; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); margin-top: clamp(32px, 5vw, 56px) }
.plans-notes h2 { font-size: 1.15rem; margin: 0 0 .6rem }
.plans-notes ul { margin: 0; padding-left: 1.1rem; display: grid; gap: .5rem; color: var(--ink-soft) }

/* Guides (web/guides.py): a page per need, the steps and questions in the homepage's two columns */
.guide-head .actions { margin-top: 1.6rem }
.two .say-h { margin-top: 2.4rem; font-size: 1.3rem }
.says { display: flex; flex-wrap: wrap; gap: .6rem }
.says .say { background: var(--blush); color: var(--garnet); border-radius: 18px 18px 18px 4px; padding: .55rem .9rem; font-size: .95rem }
.guide-more { padding: clamp(32px, 5vw, 64px) 0 0 }
.guide-more .wrap { max-width: none; padding: 0 clamp(16px, 3.4vw, 56px) }
.guide-more h2 { font-size: 1.3rem; margin-bottom: 1rem }
.guide-more ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .8rem }
.guide-more a { display: inline-flex; align-items: center; gap: .5rem; padding: .7rem 1rem; border: 1px solid var(--line); border-radius: 14px; color: var(--ink); text-decoration: none }
.guide-more a:hover { border-color: var(--garnet) }
.guide-more svg { width: 20px; height: 20px; color: var(--garnet) }
.guide-list { padding: 0 0 clamp(32px, 5vw, 56px) }
.guide-list .wrap { max-width: none; padding: 0 clamp(16px, 3.4vw, 56px) }
.guide-list h2 { font-size: clamp(1.4rem, 2.4vw, 1.9rem); margin-bottom: 1.2rem }
.guide-list .groups { display: grid; gap: 1.4rem }
.guide-list h3 { font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft); margin: 0 0 .6rem }
.guide-list ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem }
.guide-list li { padding: .45rem .85rem; border: 1px solid var(--line); border-radius: 999px; background: #fff; font-size: .95rem }
