/* A fixed viewport budget: wordmark, offer, phone and both actions. */
.topbar { display: grid; grid-template-columns: 1fr auto 1fr; height: 72px; min-height: 0; gap: 16px; }
.topbar .wordmark { grid-column: 2; grid-row: 1; justify-self: center; }
.topbar nav { grid-column: 1; grid-row: 1; gap: 20px; font-size: 14px; white-space: nowrap; }
.wordmark { font: 750 34px/1 var(--body); font-style: normal; letter-spacing: -.055em; gap: 8px; }
.wordmark .brand-star { display: block; width: 38px; height: 38px; margin: 0; }
main > .hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr) auto;
  grid-template-areas: "title" "visual" "actions";
  justify-items: center;
  height: calc(var(--screen, 100svh) - 72px);
  min-height: 0;
  padding-top: 6px;
  padding-bottom: 24px;
  gap: clamp(10px, calc(var(--screen-unit, 1svh) * 1.7), 18px);
  text-align: center;
  position: relative;
}
.hero h1 { grid-area: title; max-width: 1160px; font-size: clamp(30px, min(4.2vw, calc(var(--screen-unit, 1svh) * 6.1)), 58px); line-height: 1.06; }
.hero-phrase { display: inline-block; }
.hero h1 .hero-condensed { font-size: 1.17em; line-height: .93; margin: 0; }
.hero-description { grid-area: description; margin: 0; max-width: 790px; font-size: clamp(14px, 1.3vw, 18px); line-height: 1.45; }
.hero-description > span { display: block; }
.hero-actions { grid-area: actions; margin: 0; align-self: start; flex-direction: row; flex-wrap: nowrap; justify-content: center; gap: 14px 24px; }
.hero-actions .button { min-height: 50px; padding: 13px 22px; font-size: 16px; gap: 18px; }
.hero-actions .text-button { min-height: 50px; padding: 9px 0; font-size: 16px; gap: 14px; }
.hero-actions .icon { width: 22px; height: 22px; }
.hero-visual { grid-area: visual; position: relative; z-index: 2; width: min(100%, 360px); height: 100%; min-height: 0; max-height: none; margin: 0; align-self: end; }
.hero-decoration { z-index: -1; }
.decor-orbit { top: auto; bottom: 12%; left: 22%; width: 56%; height: 38%; border-width: 1px; border-color: var(--blue); transform: rotate(-17deg); opacity: .3; }
.decor-spark { top: 14%; right: 8%; width: 48px; height: 48px; }
.decor-plane { top: auto; bottom: 13%; left: 22%; width: 50px; height: 50px; }
.decor-knot { width: 110px; height: 110px; bottom: 34%; left: 13%; color: #FF86F4; transform: rotate(-18deg); opacity: .8; }
.decor-pebble { width: 82px; height: 98px; top: auto; bottom: 27%; right: 19%; color: #43CFF5; transform: rotate(18deg); }
.decor-steps { width: 72px; height: 66px; bottom: 7%; left: auto; right: 29%; color: #D9FF43; transform: rotate(12deg); }
.char-glyph.has-letter-mark { position: relative; }
.letter-face { display: inline-block; }
.char-glyph .letter-mark { position: absolute; width: .86em; height: .86em; left: 50%; top: 50%; margin-left: -.43em; margin-top: -.43em; opacity: 0; pointer-events: none; }
.phone-frame { transform: perspective(1400px) rotateX(5deg); transform-origin: 50% 100%; height: 100%; min-height: 0; padding: 7px 7px 0; border: 1px solid #686B79; border-bottom: 0; border-radius: 44px 44px 0 0; background: linear-gradient(110deg, #171922, #4D5260 48%, #151620); box-shadow: 0 16px 30px -24px #303BFF77; -webkit-mask-image: linear-gradient(#000 calc(100% - 14px), transparent); mask-image: linear-gradient(#000 calc(100% - 14px), transparent); }
.phone-screen { height: 100%; min-height: 0; display: flex; flex-direction: column; border-radius: 36px 36px 0 0; overflow: hidden; background: radial-gradient(ellipse at 15% 85%, #C9EAFB, transparent 60%), radial-gradient(ellipse at 90% 35%, #EBE6FF, transparent 70%), #F2F7FD; color: var(--ink); text-align: left; }
.phone-status { flex: none; position: relative; display: flex; align-items: center; justify-content: space-between; height: 38px; padding: 0 23px; }
.phone-status b { font: 650 12px/1 var(--body); }
.phone-status > svg { width: 44px; height: 11px; }
.phone-island { position: absolute; left: 50%; top: 7px; width: 90px; height: 25px; margin-left: -45px; border-radius: 20px; background: #101116; }
.phone-island::after { content: ""; position: absolute; right: 9px; top: 9px; width: 6px; height: 6px; border-radius: 50%; background: #242B46; }
.phone-heading { flex: none; display: flex; align-items: center; gap: 9px; min-height: 51px; padding: 4px 14px 9px; border-bottom: 1px solid #1421480C; background: #FFFFFF80; }
.phone-avatar { display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 50%; background: #fff; }
.phone-avatar img { width: 33px; height: 33px; }
.phone-heading > span:not(.phone-avatar) { display: grid; gap: 2px; }
.phone-heading b { font: 700 14px/1.2 var(--body); letter-spacing: -.04em; }
.phone-heading small { display: flex; align-items: center; gap: 5px; font: 450 10px/1.3 var(--body); color: #5D6479; }
.phone-heading small i { width: 5px; height: 5px; border-radius: 50%; background: #138565; }
.phone-telegram { margin-left: auto; width: 21px; height: 21px; color: #303BFF; }
.phone-chat { position: relative; flex: 1; min-height: 0; overflow: hidden; }
.phone-example-label { position: relative; z-index: 2; display: flex; align-items: center; justify-content: center; gap: 6px; height: 25px; font: 500 9px/1.2 var(--body); color: #646B80; }
.phone-typing { display: inline-flex; gap: 2px; }
.phone-typing i { width: 3px; height: 3px; border-radius: 50%; background: #303BFF; }
.phone-stack { position: absolute; inset: 27px 12px 24px; }
.phone-tender { position: absolute; bottom: 0; left: 0; width: 100%; border: 1px solid #DCE1ED; border-radius: 17px 17px 17px 5px; padding: 11px; background: #FFFFFF; box-shadow: 0 4px 12px -8px #283C6150; transform-origin: 50% 100%; }
.phone-tender.is-older { pointer-events: none; }
.phone-tender-meta { display: flex; justify-content: space-between; margin-bottom: 5px; color: #303BFF; font: 650 9px/1.2 var(--body); }
.phone-tender-meta time { color: #7A8194; font-weight: 400; }
.phone-tender h2 { font: 650 15px/1.2 var(--body); letter-spacing: -.025em; }
.phone-tender > p { margin-top: 4px; color: #62697A; font: 400 11px/1.35 var(--body); }
.phone-tender-facts { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 7px; }
.phone-tender-facts strong { font: 650 18px/1.2 var(--body); letter-spacing: -.04em; }
.phone-tender-facts > span { color: #62697A; font: 400 9px/1.3 var(--body); }
.phone-tender-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 8px; }
.phone-tender-actions button { display: flex; align-items: center; justify-content: space-between; min-height: 36px; padding: 8px 10px; border: 0; border-radius: 8px; color: #303BFF; background: #E9EEFF; font: 600 11px/1.2 var(--body); }
.phone-tender-actions button:last-child { color: #fff; background: #303BFF; }
.phone-tender-actions button:hover { background: #D9FF43; color: #101116; }
.phone-tender-actions .icon { width: 13px; height: 13px; }
.phone-tender-actions button:focus-visible { outline-offset: 2px; }
.hero-visual.is-playing .phone-typing i { animation: phone-dot 1.2s ease-in-out infinite; }
.hero-visual.is-playing .phone-typing i:nth-child(2) { animation-delay: .15s; }
.hero-visual.is-playing .phone-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes phone-dot { 0%, 65%, 100% { opacity: .35; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-2px); } }
@media (min-width: 761px) and (max-width: 1000px) {
  .topbar nav { font-size: 12px; gap: 12px; }
  .topbar .wordmark { font-size: 30px; }
  .hero h1 { font-size: min(3.9vw, calc(var(--screen-unit, 1svh) * 6)); }
}
.workflow-strip > span { display: flex; flex-direction: column; justify-content: center; gap: 5px; }
.workflow-strip small { font: 400 12px/1.4 var(--body); }
.start-section > .button { margin-top: 40px; }
#dialog-example { margin-top: 12px; font-size: 16px; color: #4E5362; }
@media (min-width: 761px) and (max-width: 1000px) {
  .hero h1 { font-size: 4.25vw; }
  .hero-description { font-size: 18px; }
  .hero-actions .button { font-size: 16px; padding-inline: 16px; gap: 12px; }
  .hero-actions .text-button { font-size: 15px; }
}

/* Keep layout independent of browser chrome and scroll-driven colour changes. */
.viewport-probe { position: fixed; inset: 0 auto auto 0; width: 0; height: 100vh; height: 100svh; visibility: hidden; pointer-events: none; contain: strict; }
html[data-page-theme] { transition: background-color .8s cubic-bezier(.22, 1, .36, 1); }
html[data-page-theme] body { background: transparent; transition: color .8s cubic-bezier(.22, 1, .36, 1); }
html[data-page-theme="ice"] { --page-bg: #E7F7FF; --page-accent: #303BFF; }
html[data-page-theme="night"] { --page-bg: #303BFF; --page-ink: #F1FCFF; --page-accent: #D9FF43; }
html[data-page-theme="sky"] { --page-bg: #FFE0FA; --page-accent: #303BFF; }
html[data-page-theme] :is(.manifesto h2 span, .section-intro h2 span, .control-copy h2 span, .faq h2 span, .start-steps article > span, .workflow-strip svg, .control-symbol) { transition: color .8s cubic-bezier(.22, 1, .36, 1); }
/* Without JavaScript the two coloured sections retain a readable static palette. */
html:not([data-page-theme]) .workflow-section { --page-ink: #FFFFFF; --page-accent: #D9FF43; color: var(--page-ink); background: #303BFF; }
html:not([data-page-theme]) :is(.closing, footer) { --page-ink: #101116; --page-accent: #303BFF; color: var(--page-ink); background: #FFE0FA; }
html[data-page-theme].motion-paused, html[data-page-theme].motion-paused body, html[data-page-theme].motion-paused :is(.manifesto h2 span, .section-intro h2 span, .control-copy h2 span, .faq h2 span, .start-steps article > span, .workflow-strip svg, .control-symbol) { transition: none; }
@media (prefers-reduced-motion: reduce) {
  html[data-page-theme], html[data-page-theme] body, html[data-page-theme] :is(.manifesto h2 span, .section-intro h2 span, .control-copy h2 span, .faq h2 span, .start-steps article > span, .workflow-strip svg, .control-symbol) { transition: none; }
}
footer.wrap { max-width: none; }

/* Native scrolling and contained answer screens inside the hero phone. */
#hero-phone .phone-view { height: 100%; min-height: 0; display: flex; flex-direction: column; }
#hero-phone .phone-view[hidden] { display: none; }
#hero-phone .phone-example-label { flex: none; height: 27px; font-size: 10px; }
#hero-phone .phone-feed-scroll, #hero-phone .phone-detail-scroll {
  flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden;
  overscroll-behavior-y: contain; touch-action: pan-y; -webkit-overflow-scrolling: touch;
  scrollbar-width: thin; scrollbar-color: #A8B4D2 transparent;
  padding: 0 12px 24px;
}
#hero-phone .phone-stack { position: static; display: grid; gap: 10px; }
#hero-phone .phone-tender { position: relative; bottom: auto; width: 100%; transform: none; }
#hero-phone .phone-tender-actions button { min-height: 40px; }
.phone-detail-toolbar { flex: none; display: flex; align-items: center; justify-content: space-between; padding: 5px 12px; font: 500 10px/1.3 var(--body); color: #687085; }
.phone-back { display: flex; align-items: center; gap: 7px; min-height: 36px; padding: 5px 0; border: 0; color: #303BFF; background: transparent; font: 600 12px/1.2 var(--body); }
.phone-detail-tabs { flex: none; display: grid; grid-template-columns: 1fr 1fr; gap: 3px; margin: 0 12px 10px; padding: 3px; background: #DFE6F4; border-radius: 11px; }
.phone-detail-tabs button { min-height: 35px; border: 0; border-radius: 8px; color: #62697A; background: transparent; font: 600 11px/1.2 var(--body); }
.phone-detail-tabs button[aria-pressed="true"] { background: #fff; color: #303BFF; box-shadow: 0 2px 5px #1421480C; }
.phone-answer { padding: 15px; border: 1px solid #DCE1ED; border-radius: 15px 15px 15px 5px; background: #fff; }
.phone-answer-label { display: block; margin-bottom: 7px; color: #303BFF; font: 600 10px/1.4 var(--body); }
#hero-phone .phone-answer h3 { margin: 0 0 14px; font: 650 16px/1.25 var(--body); letter-spacing: -.025em; }
.phone-answer-body { font: 400 12px/1.6 var(--body); }
.phone-answer-body dl { margin: 0; }
.phone-answer-body dt { margin-top: 12px; font-size: 10px; color: #687085; }
.phone-answer-body dd { margin: 2px 0 0; font-weight: 600; }
.phone-risk { margin-top: 16px; padding: 10px; background: #F0F3FF; border-radius: 8px; }
.phone-draft-text { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; }
#hero-phone .phone-demo-note { margin: 14px 0 0; color: #747C8E; font: 400 10px/1.5 var(--body); }
#hero-phone .phone-feed-scroll > .phone-demo-note { text-align: center; }

/* A small repeated grain tile adds print texture without any moving layer. */
:is(.showcase-shell, .business-card, .workflow-strip > span, .draft-back-sheet, .control-symbol, .brand-ribbon, .service-petal, .monitor, .code-window, .build-block) {
  background-image: var(--paper-grain);
  background-size: 180px 180px;
}
.workflow-strip > span:nth-of-type(2) { background-color: var(--pink); color: var(--ink); }
.workflow-strip > span:nth-of-type(3) { background-color: var(--lime); color: var(--ink); }
.workflow-strip > span { border-radius: 15px; padding: 12px 20px; }
.workflow-strip > span:first-of-type { background-color: var(--ice); color: var(--ink); }
.paper-check { background-color: var(--lime); }

