/* =====================================================================
   Rastra site v2 — loaded after site.css
   New floating header, multi-page layout helpers, live editor demo,
   and stepped (pixel) motion. Motion is removed under reduced-motion.
   ===================================================================== */

:root { --hdr-h: 64px; --tick: 80ms; }

/* ---------------------------------------------------------------- header */
.hdr { position: sticky; top: 0; z-index: 50; padding: 12px var(--gutter) 0; pointer-events: none; }
.hdr__bar { pointer-events: auto; max-width: calc(var(--wrap) + 2 * var(--gutter)); margin-inline: auto; height: var(--hdr-h);
  background: var(--ink); color: var(--paper); border-radius: 10px; display: flex; align-items: center; gap: 20px; padding-inline: 14px 10px;
  box-shadow: 0 8px 28px rgba(32,25,38,.18); transition: height .35s cubic-bezier(.2,.7,.2,1), box-shadow .35s ease; }
.hdr.is-scrolled .hdr__bar { height: 54px; box-shadow: 0 10px 30px rgba(32,25,38,.32); }
.hdr__brand { display: flex; align-items: center; gap: 10px; color: var(--paper); text-decoration: none; flex: none; }
.hdr__mark { display: grid; grid-template-columns: repeat(8, 4px); grid-template-rows: repeat(10, 4px); direction: ltr; width: 32px; height: 40px; }
.hdr__mark i { background: var(--verm); }
.hdr__name { font-family: var(--rastra-font-fa); font-weight: 800; font-size: 21px; line-height: 1; }
.hdr__beta { font-size: 11px; font-weight: 600; color: var(--rastra-neutral-300); border: 1px solid var(--rastra-neutral-700); border-radius: 3px; padding: 2px 6px; }
.hdr__nav { flex: 1; display: flex; justify-content: center; }
.hdr__nav ul { display: flex; gap: 2px; list-style: none; margin: 0; padding: 0; }
.hdr__nav a { position: relative; display: block; padding: 8px 12px; color: var(--rastra-neutral-200); text-decoration: none; font-size: 15px; font-weight: 600; border-radius: 6px; }
.hdr__nav a:hover { color: var(--paper); background: var(--ink-2); }
.hdr__nav a[aria-current="page"] { color: var(--paper); }
.hdr__nav a[aria-current="page"]::after { content: ""; position: absolute; right: 12px; bottom: 2px; width: 6px; height: 6px; background: var(--verm);
  box-shadow: -8px 0 0 var(--verm), -16px 0 0 var(--rastra-vermilion-400); }
.hdr__cta { flex: none; }
.hdr__menu { display: none; align-items: center; gap: 10px; background: none; border: 1px solid var(--rastra-neutral-700); color: var(--paper);
  font: inherit; font-size: 15px; font-weight: 600; border-radius: 6px; height: 40px; padding: 0 12px; cursor: pointer; }
.hdr__menu .bars { display: grid; gap: 3px; } .hdr__menu .bars i { display: block; width: 16px; height: 2px; background: currentColor; }
.mnav { pointer-events: auto; max-width: calc(var(--wrap) + 2 * var(--gutter)); margin: 8px auto 0; background: var(--ink); border-radius: 10px; padding: 12px; }
.mnav[hidden] { display: none; }
.mnav ul { list-style: none; margin: 0; padding: 0; }
.mnav a { display: flex; align-items: center; justify-content: space-between; padding: 14px 12px; color: var(--paper); text-decoration: none; font-size: 20px; font-weight: 800; border-bottom: 1px solid var(--ink-2); }
.mnav a::after { content: ""; width: 8px; height: 8px; background: var(--verm); }
.mnav a[aria-current="page"] { color: var(--rastra-vermilion-400); }
.mnav .btn { margin-top: 12px; width: 100%; }
@media (max-width: 1060px) { .hdr__nav, .hdr__cta { display: none; } .hdr__menu { display: inline-flex; margin-inline-start: auto; } }
@media (max-width: 420px) { .hdr__beta { display: none; } }

/* first section sits under the floating header */
main > section:first-child { margin-top: calc(-1 * (var(--hdr-h) + 12px)); padding-top: calc(var(--hdr-h) + 12px + 64px); }
.ph1 { font-size: clamp(34px, 5vw, 56px); }

/* ---------------------------------------------------------------- home hero with live editor */
.hero2 { background: var(--verm); color: var(--ink); position: relative; overflow: hidden; padding-bottom: 88px; }
main > section.hero2:first-child { padding-top: calc(var(--hdr-h) + 12px + 52px); }
.hero2__grid { position: relative; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px; align-items: center; }
.hero2 .hero__copy h1 { font-size: clamp(40px, 5.2vw, 68px); margin-bottom: 18px; }
.hero2 .lead { font-size: clamp(18px, 1.9vw, 22px); line-height: 1.8; font-weight: 600; }
.hero2 .sub { font-size: 16px; }
.hero2 .en { margin-top: 28px; font-size: 18px; font-weight: 600; }
.hero2 .weave-r { --c: 30px; color: var(--ink); left: -40px; bottom: -40px; opacity: .14; }
@media (max-width: 1000px) { .hero2__grid { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- live editor */
.live { position: relative; background: var(--paper); border-radius: 12px; overflow: hidden; color: var(--ink);
  box-shadow: 0 2px 0 rgba(32,25,38,.08), 0 30px 60px rgba(32,25,38,.28); font-family: var(--rastra-font-fa); user-select: none; }
.live__top { height: 44px; background: var(--ink); color: var(--paper); display: flex; align-items: center; gap: 14px; padding: 0 12px; }
.live__top .dots { display: flex; gap: 6px; } .live__top .dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--rastra-neutral-700); }
.live__tools { display: flex; gap: 2px; }
.live__tools span { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 5px; color: var(--rastra-neutral-200); }
.live__tools span.on { background: var(--select); color: #fff; }
.live__file { flex: 1; text-align: center; font-size: 13px; color: var(--rastra-neutral-300); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.live__file b { color: var(--paper); font-weight: 600; }
.live__people { display: flex; }
.live__people i { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 12px; font-weight: 800; border: 2px solid var(--ink); margin-left: -6px; }
.live__people .s { background: var(--verm); color: var(--ink); } .live__people .a { background: #498BDC; color: #fff; }
.live__share { font-size: 13px; font-weight: 600; background: var(--verm); color: var(--ink); padding: 5px 10px; border-radius: 5px; }
.live__body { display: grid; grid-template-columns: 170px minmax(0, 1fr) 176px; height: 430px; }
.lpanel, .ppanel { background: #fff; padding: 10px 0; font-size: 12.5px; overflow: hidden; }
.lpanel { border-right: 1px solid var(--line); } .ppanel { border-left: 1px solid var(--line); }
.live .pt { margin: 0 12px 6px; font-size: 11.5px; font-weight: 800; color: var(--rastra-neutral-500); }
.llist { list-style: none; margin: 0; padding: 0; }
.llist li { display: flex; align-items: center; gap: 7px; height: 28px; padding-inline: 12px; white-space: nowrap; }
.llist li.child { padding-inline-start: 26px; }
.llist li.sel { background: var(--rastra-info-bg); color: var(--rastra-info-text); }
.llist li svg { flex: none; } .llist li.comp { color: #7B61FF; }
.llist li.new { animation: lv-in .35s ease both; }
.props { padding: 0 12px; }
.prow { display: flex; justify-content: space-between; align-items: center; height: 30px; border-bottom: 1px solid var(--rastra-neutral-100); }
.prow .k { color: var(--rastra-neutral-500); } .prow .v { font-family: var(--rastra-font-mono); font-size: 11.5px; direction: ltr; }
.prow .v.fa { font-family: var(--rastra-font-fa); direction: rtl; font-size: 12px; }
.prow .sw { display: inline-block; width: 12px; height: 12px; border-radius: 2px; background: var(--rastra-neutral-200); vertical-align: -2px; margin-right: 6px; }
.prow.flash { background: var(--rastra-info-bg); }
.lcanvas { position: relative; background: var(--rastra-neutral-100);
  background-image: radial-gradient(var(--rastra-neutral-200) 1px, transparent 1.2px); background-size: 16px 16px; overflow: hidden; }
.art { position: absolute; inset: 0; }
.art.out { animation: lv-out .5s ease forwards; }
.f { position: absolute; background: #fff; box-shadow: 0 0 0 1px var(--rastra-neutral-200); }
.f__lbl { position: absolute; top: -20px; right: 0; font-size: 11px; color: var(--rastra-neutral-500); white-space: nowrap; }
.el { position: absolute; }
.el.t { font-weight: 800; font-size: 18px; white-space: nowrap; direction: rtl; }
.el.t small { display: block; font-size: 11px; font-weight: 400; color: var(--rastra-neutral-500); }
.el.card { background: var(--verm); padding: 12px 14px; display: flex; flex-direction: column; justify-content: flex-end; color: var(--ink); direction: rtl; overflow: hidden; }
.el.card b { font-size: 14px; white-space: nowrap; } .el.card span { font-size: 11.5px; white-space: nowrap; }
.el.list { display: flex; flex-direction: column; gap: 12px; direction: rtl; }
.el.list div { display: flex; gap: 8px; align-items: center; font-size: 12.5px; white-space: nowrap; animation: lv-in .35s ease both; }
.el.list i { width: 12px; height: 12px; border: 2px solid var(--ink); flex: none; } .el.list i.done { background: var(--ink); }
.el.btnx { background: var(--ink); color: var(--paper); font-size: 12.5px; font-weight: 600; display: grid; place-items: center; border-radius: 4px; animation: lv-in .35s ease both; }
.selbox { position: absolute; outline: 1.5px solid var(--select); pointer-events: none; z-index: 3; }
.selbox::before, .selbox::after { content: ""; position: absolute; width: 6px; height: 6px; background: #fff; border: 1.5px solid var(--select); }
.selbox::before { top: -4px; left: -4px; } .selbox::after { bottom: -4px; right: -4px; }
.selbox b { position: absolute; bottom: -22px; left: 50%; transform: translateX(-50%); background: var(--select); color: #fff; font: 600 10.5px var(--rastra-font-mono); padding: 1px 5px; border-radius: 3px; white-space: nowrap; }
.pin { position: absolute; display: flex; align-items: flex-start; gap: 6px; z-index: 4; animation: lv-in .35s cubic-bezier(.2,.7,.2,1) both; direction: rtl; }
.pin i { width: 22px; height: 22px; border-radius: 50% 50% 0 50%; background: #498BDC; color: #fff; font-style: normal; font-size: 11px; font-weight: 800; display: grid; place-items: center; flex: none; }
.pin span { background: #fff; border-radius: 6px; padding: 5px 9px; font-size: 12px; box-shadow: 0 4px 14px rgba(32,25,38,.18); white-space: nowrap; }
.pin.done span { text-decoration: line-through; color: var(--rastra-neutral-400); }
.cur { position: absolute; top: 0; left: 0; z-index: 6; pointer-events: none; display: flex; align-items: flex-start; gap: 2px; opacity: 0;
  transition-property: transform; transition-timing-function: cubic-bezier(.3,.7,.2,1); }
.cur.on { opacity: 1; }
.cur b { margin-top: 14px; font-size: 11px; font-weight: 800; padding: 2px 7px; border-radius: 4px; white-space: nowrap; }
.cur--s b { background: var(--verm); color: var(--ink); } .cur--a b { background: #498BDC; color: #fff; }
.cur.click svg { animation: lv-click .22s ease; }
.live__status { height: 30px; background: #fff; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 8px; padding: 0 12px; font-size: 12px; color: var(--rastra-neutral-500); }
.live__status .ok { color: var(--rastra-success-text); font-weight: 600; }
@keyframes lv-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@keyframes lv-out { to { opacity: 0; } }
@keyframes lv-click { 50% { transform: scale(.82); } }
@media (max-width: 760px) {
  .live__body { grid-template-columns: minmax(0, 1fr); height: 400px; }
  .lpanel, .ppanel, .live__file, .live__share { display: none; }
}

/* small pixel spinner (same as brand/p2/loading) */
.rl-spin { --s: 3px; direction: ltr; display: inline-grid; grid-template-columns: repeat(3, var(--s)); grid-template-rows: repeat(3, var(--s)); gap: 1px; }
.rl-spin i { background: currentColor; opacity: .12; animation: rl-spin calc(var(--tick) * 8) steps(1, end) infinite; }
@keyframes rl-spin { 0% { opacity: 1 } 12.5% { opacity: .55 } 25% { opacity: .25 } 37.5%, 100% { opacity: .12 } }

/* ---------------------------------------------------------------- explore cards (home) */
.xcards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.xcard { display: flex; flex-direction: column; gap: 10px; padding: 20px; border-radius: 10px; background: var(--paper); color: var(--ink); text-decoration: none; border: 1px solid var(--line); transition: transform .35s cubic-bezier(.2,.7,.2,1), border-color .25s ease, box-shadow .35s ease; }
.xcard:hover { transform: translateY(-6px); border-color: var(--ink); box-shadow: 0 14px 30px rgba(32,25,38,.10); }
.xcard h3 { margin: 6px 0 0; font-size: 20px; } .xcard p { margin: 0; color: var(--muted); font-size: 15px; }
.xgo { margin-top: auto; font-weight: 800; color: var(--verm-text); }
.xviz { height: 120px; border-radius: 6px; background: var(--white); border: 1px solid var(--line); display: grid; place-items: center; overflow: hidden; }
@media (max-width: 1000px) { .xcards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .xcards { grid-template-columns: 1fr; } }

/* mini visuals — all stepped */
.v-mirror { display: grid; gap: 6px; width: 120px; direction: ltr; }
.v-mirror i { height: 10px; background: var(--ink); animation: v-mirror 2.4s steps(1, end) infinite; }
.v-mirror i:nth-child(1) { width: 100%; background: var(--verm); } .v-mirror i:nth-child(2) { width: 70%; } .v-mirror i:nth-child(3) { width: 45%; }
@keyframes v-mirror { 0% { margin-left: 0; margin-right: auto } 50%, 100% { margin-left: auto; margin-right: 0 } }
.v-rack { display: grid; gap: 6px; width: 110px; }
.v-rack div { height: 22px; background: var(--ink); border-radius: 3px; display: flex; align-items: center; gap: 5px; padding: 0 8px; direction: ltr; }
.v-rack i { width: 6px; height: 6px; background: #32A155; animation: v-led 1.2s steps(1, end) infinite; }
.v-rack div:nth-child(2) i { animation-delay: -.4s; } .v-rack div:nth-child(3) i { animation-delay: -.8s; }
.v-rack span { flex: 1; height: 3px; background: var(--rastra-neutral-700); }
@keyframes v-led { 0% { opacity: 1 } 50%, 100% { opacity: .25 } }
.v-link { display: flex; align-items: center; gap: 6px; direction: rtl; }
.v-link b { width: 26px; height: 26px; background: var(--ink); } .v-link b:last-child { background: var(--verm); }
.v-link i { width: 8px; height: 8px; background: var(--rastra-neutral-200); animation: v-dot 1.2s steps(1, end) infinite; }
.v-link i:nth-of-type(2) { animation-delay: .2s } .v-link i:nth-of-type(3) { animation-delay: .4s } .v-link i:nth-of-type(4) { animation-delay: .6s } .v-link i:nth-of-type(5) { animation-delay: .8s }
@keyframes v-dot { 0% { background: var(--verm) } 25%, 100% { background: var(--rastra-neutral-200) } }
.v-bars { display: flex; align-items: flex-end; gap: 10px; height: 80px; direction: ltr; }
.v-bars i { width: 22px; background: var(--ink); animation: v-grow 3s steps(4, end) infinite; transform-origin: bottom; }
.v-bars i:nth-child(1) { height: 30%; background: var(--rastra-neutral-300); } .v-bars i:nth-child(2) { height: 60%; background: var(--verm); } .v-bars i:nth-child(3) { height: 100%; }
@keyframes v-grow { 0% { transform: scaleY(.25) } 60%, 100% { transform: scaleY(1) } }

/* ---------------------------------------------------------------- page motion */
.rv { opacity: 0; transform: translateY(24px); }
.rv.in { opacity: 1; transform: none; transition: opacity .7s ease, transform .8s cubic-bezier(.2,.7,.2,1); transition-delay: var(--d, 0s); }
.weave-r { position: absolute; display: grid; grid-template-columns: repeat(8, var(--c)); grid-template-rows: repeat(10, var(--c)); direction: ltr; pointer-events: none; }
.weave-r i { background: currentColor; opacity: 0; }
.weave-r.go i { animation: wr-in .01s steps(1) forwards; animation-delay: var(--d); }
@keyframes wr-in { to { opacity: 1; } }
.cta-sec .weave-r { --c: 34px; color: var(--ink); left: -30px; bottom: -60px; }
.link-arrow svg rect { animation: v-dot-ink 1.2s steps(1, end) infinite; }
.link-arrow svg rect:nth-child(2) { animation-delay: .2s } .link-arrow svg rect:nth-child(3) { animation-delay: .4s }
@keyframes v-dot-ink { 0% { fill: var(--verm) } 30%, 100% { fill: currentColor } }

/* footer brand without Latin wordmark */
.footer-mark { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.footer-mark svg { width: 28px; height: 35px; display: block; } .footer-mark b { font-size: 26px; font-weight: 800; color: var(--paper); }

@media (prefers-reduced-motion: reduce) {
  .rv { opacity: 1; transform: none; }
  .weave-r i { opacity: 1; }
  .v-mirror i, .v-rack i, .v-link i, .v-bars i, .link-arrow svg rect, .rl-spin i { animation: none; }
  .hdr__bar, .xcard { transition: none; }
}


/* =====================================================================
   v2.1 — smooth interaction feedback (user: every press should animate)
   ===================================================================== */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vt-out .22s ease both; }
::view-transition-new(root) { animation: vt-in .38s cubic-bezier(.2,.7,.2,1) both; }
@keyframes vt-out { to { opacity: 0; transform: translateY(-8px); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(12px); } }
.hdr { view-transition-name: site-header; }

/* buttons: lift on hover, press down, pixel ripple from the press point */
.btn { position: relative; overflow: hidden; transition: transform .25s cubic-bezier(.2,.7,.2,1), background-color .25s ease, color .25s ease, border-color .25s ease, box-shadow .25s ease; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(32,25,38,.16); }
.btn:active { transform: translateY(0) scale(.97); box-shadow: none; transition-duration: .08s; }
.btn .px { transition: transform .3s cubic-bezier(.2,.7,.2,1); }
.btn:hover .px { transform: rotate(90deg) scale(1.15); }
.ripple { position: absolute; width: 10px; height: 10px; margin: -5px 0 0 -5px; background: currentColor; opacity: .28; pointer-events: none; animation: ripple .55s cubic-bezier(.2,.7,.2,1) forwards; }
@keyframes ripple { to { transform: scale(26); opacity: 0; } }

/* header nav: underline slides in */
.hdr__nav a { transition: color .2s ease, background-color .2s ease; }
.hdr__nav a::before { content: ""; position: absolute; right: 12px; left: 12px; bottom: 4px; height: 2px; background: var(--verm); transform: scaleX(0); transform-origin: right; transition: transform .3s cubic-bezier(.2,.7,.2,1); }
.hdr__nav a:hover::before { transform: scaleX(1); }
.hdr__nav a[aria-current="page"]::before { display: none; }
.hdr__brand .hdr__mark { transition: transform .35s cubic-bezier(.2,.7,.2,1); }
.hdr__brand:hover .hdr__mark { transform: translateY(-2px) rotate(-6deg); }

/* mobile menu: slides open, links cascade in, burger turns into × */
.hdr__menu { transition: background-color .2s ease, border-color .2s ease; }
.hdr__menu .bars i { transition: transform .3s cubic-bezier(.2,.7,.2,1), opacity .2s ease; }
.hdr__menu[aria-expanded="true"] { background: var(--ink-2); }
.hdr__menu[aria-expanded="true"] .bars i:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.hdr__menu[aria-expanded="true"] .bars i:nth-child(2) { opacity: 0; }
.hdr__menu[aria-expanded="true"] .bars i:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }
.mnav { transform-origin: top; opacity: 0; transform: translateY(-10px) scaleY(.96); transition: opacity .25s ease, transform .35s cubic-bezier(.2,.7,.2,1); }
.mnav.open { opacity: 1; transform: none; }
.mnav li, .mnav .btn { opacity: 0; transform: translateX(16px); transition: opacity .3s ease, transform .4s cubic-bezier(.2,.7,.2,1); }
.mnav.open li, .mnav.open .btn { opacity: 1; transform: none; }
.mnav.open li:nth-child(1) { transition-delay: .04s } .mnav.open li:nth-child(2) { transition-delay: .08s } .mnav.open li:nth-child(3) { transition-delay: .12s }
.mnav.open li:nth-child(4) { transition-delay: .16s } .mnav.open li:nth-child(5) { transition-delay: .2s } .mnav.open li:nth-child(6) { transition-delay: .24s }
.mnav.open .btn { transition-delay: .28s; }

/* FAQ: answers slide open, the plus turns into minus */
.faq summary { cursor: pointer; transition: color .2s ease; }
.faq summary:hover { color: var(--verm-text); }
.faq summary .pm::before, .faq summary .pm::after { transition: transform .35s cubic-bezier(.2,.7,.2,1), background-color .2s ease; }
.faq details[open] summary .pm::after { display: block; transform: rotate(90deg) scaleY(0); }
.faq details[open] summary .pm::before { transform: rotate(180deg); }
.faq .ans { overflow: hidden; }
.faq details.closing summary .pm::after { transform: none; }

/* form: field focus, submit states */
.field input, .field select, .field textarea { transition: border-color .2s ease, box-shadow .2s ease; }
.field input:focus, .field select:focus, .field textarea:focus { box-shadow: 0 0 0 3px rgba(255,86,61,.25); }
.form-card { transition: transform .4s cubic-bezier(.2,.7,.2,1); }
.form-done { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 24px 0; animation: vt-in .5s cubic-bezier(.2,.7,.2,1) both; }
.form-done .ok { width: 56px; height: 56px; background: var(--verm); display: grid; place-items: center; animation: pop .5s cubic-bezier(.3,1.6,.5,1) both .1s; }
.form-done .ok svg { width: 28px; height: 28px; color: var(--ink); }
.form-done b { font-size: 22px; } .form-done p { margin: 0; color: var(--muted); }
@keyframes pop { from { transform: scale(.4); opacity: 0; } }

/* links inside text: underline grows */
main p a:not(.btn), .site-footer a:not(.giyan-badge) { background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size .3s ease; text-decoration: none; }
main p a:not(.btn):hover, .site-footer a:not(.giyan-badge):hover { background-size: 100% 1px; }

@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  .btn, .btn:hover, .btn:active, .mnav, .mnav li, .mnav .btn, .faq summary .pm::before, .faq summary .pm::after { transition: none !important; transform: none !important; }
  .mnav.open, .mnav li, .mnav .btn { opacity: 1; }
  .ripple, .form-done, .form-done .ok { animation: none; }
}

/* =====================================================================
   v2.2 — custom select (enhances the native <select>, which stays for the form)
   ===================================================================== */
.csel { position: relative; }
.csel select { position: absolute; inset: 0; opacity: 0; pointer-events: none; }
.csel__btn { width: 100%; min-height: 48px; padding: 10px 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  font: 400 16px/1.6 var(--rastra-font-fa); color: var(--ink); text-align: right; background: var(--white);
  border: 1px solid var(--rastra-neutral-500); border-radius: var(--rastra-radius-sm); transition: border-color .2s ease, box-shadow .2s ease; }
.csel__btn:hover { border-color: var(--ink); }
.csel__btn:focus-visible, .csel.open .csel__btn { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(255,86,61,.25); }
.csel__btn .is-ph { color: var(--rastra-neutral-500); }
.csel__chev { flex: none; color: var(--ink); transition: transform .3s cubic-bezier(.2,.7,.2,1); }
.csel.open .csel__chev { transform: rotate(180deg); }
.csel__list { position: absolute; inset-inline: 0; top: calc(100% + 6px); z-index: 30; margin: 0; padding: 6px; list-style: none;
  background: var(--ink); color: var(--paper); border-radius: 8px; box-shadow: 0 18px 40px rgba(32,25,38,.35); max-height: 300px; overflow-y: auto;
  opacity: 0; transform: translateY(-8px) scaleY(.96); transform-origin: top; pointer-events: none; transition: opacity .2s ease, transform .3s cubic-bezier(.2,.7,.2,1); }
.csel.open .csel__list { opacity: 1; transform: none; pointer-events: auto; }
.csel__list li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 5px; font-size: 15px; transition: background-color .15s ease;
  opacity: 0; transform: translateX(10px); }
.csel.open .csel__list li { opacity: 1; transform: none; transition: background-color .15s ease, opacity .25s ease, transform .35s cubic-bezier(.2,.7,.2,1); transition-delay: 0s, calc(var(--i) * 30ms), calc(var(--i) * 30ms); }
.csel__list li::before { content: ""; width: 8px; height: 8px; flex: none; background: transparent; box-shadow: inset 0 0 0 1.5px var(--rastra-neutral-600); }
.csel__list li.is-ph { color: var(--rastra-neutral-400); }
.csel__list li.is-ph::before { box-shadow: none; }
.csel__list li.active { background: var(--ink-2); }
.csel__list li[aria-selected="true"] { color: #fff; font-weight: 600; }
.csel__list li[aria-selected="true"]::before { background: var(--verm); box-shadow: none; }
.field textarea { resize: none; }
@media (prefers-reduced-motion: reduce) { .csel__list, .csel__list li, .csel__chev { transition: none !important; transform: none !important; } .csel__list li { opacity: 1; } }

/* =====================================================================
   v2.3 — "why Rastra": four problem cards with live pixel scenes
   ===================================================================== */
.why__head { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 48px; align-items: end; margin-bottom: 48px; }
.why__lead { margin: 0; font-size: 18px; line-height: 1.9; color: var(--muted); }
.pcards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.pcard { display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
  transition: transform .4s cubic-bezier(.2,.7,.2,1), box-shadow .4s ease, border-color .3s ease; }
.pcard:hover { transform: translateY(-6px); box-shadow: 0 18px 40px rgba(32,25,38,.12); border-color: var(--ink); }
.pcard__viz { height: 168px; background: var(--ink); color: var(--paper); display: grid; place-items: center; position: relative; overflow: hidden;
  background-image: radial-gradient(rgba(247,245,239,.07) 1px, transparent 1.2px); background-size: 12px 12px; }
.pcard__body { padding: 22px 22px 0; flex: 1; }
.pcard__n { font-family: var(--rastra-font-mono); font-size: 13px; color: var(--verm-text); font-weight: 500; }
.pcard__body h3 { margin: 6px 0 10px; font-size: 21px; }
.pcard__body p { margin: 0; font-size: 15px; line-height: 1.9; color: var(--muted); }
.pcard__fix { margin: 18px 22px 22px; padding: 12px 14px; background: var(--paper); border-radius: 8px; font-size: 14.5px; line-height: 1.8; display: flex; gap: 8px; align-items: baseline;
  transition: background-color .3s ease, color .3s ease; }
.pcard__fix .sq { width: 8px; height: 8px; background: var(--verm); flex: none; transition: background-color .3s ease; }
.pcard:hover .pcard__fix { background: var(--verm); color: var(--ink); }
.pcard:hover .pcard__fix .sq { background: var(--ink); }
@media (max-width: 1100px) { .pcards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 860px) { .why__head { grid-template-columns: 1fr; gap: 16px; } }
@media (max-width: 560px) { .pcards { grid-template-columns: 1fr; } }

/* scene 1: connection stuck */
.pv { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.pv-net svg { color: var(--verm); animation: v-led 1.2s steps(1, end) infinite; }
.pv-stuck { display: flex; gap: 3px; } .pv-stuck i { width: 9px; height: 6px; background: var(--rastra-neutral-700); }
.pv-stuck i.on { background: var(--rastra-neutral-300); } .pv-stuck i.blink { animation: pv-blink .8s steps(1, end) infinite; }
@keyframes pv-blink { 0% { background: var(--verm) } 50%, 100% { background: var(--rastra-neutral-700) } }
.pv-net small { font-size: 12px; color: var(--rastra-neutral-400); }
/* scene 2: declined card */
.pv-pay { position: relative; }
.pv-pay .card { width: 120px; height: 76px; border-radius: 8px; background: var(--ink-2); box-shadow: inset 0 0 0 1px var(--rastra-neutral-700); position: relative; animation: pv-shake 3s ease infinite; }
.pv-pay .chip { position: absolute; right: 14px; top: 16px; width: 18px; height: 14px; background: #EBA002; border-radius: 2px; }
.pv-pay .ln { position: absolute; right: 14px; left: 14px; bottom: 22px; height: 5px; background: var(--rastra-neutral-600); }
.pv-pay .ln.s { bottom: 12px; left: 50px; }
.pv-pay .stamp { position: absolute; top: 50%; left: 50%; padding: 4px 12px; border: 2.5px solid var(--verm); color: var(--verm); font-weight: 800; font-size: 15px; background: rgba(32,25,38,.6);
  border-radius: 4px; transform: translate(-50%, -50%) rotate(-10deg); animation: pv-stamp 3s cubic-bezier(.3,1.5,.5,1) infinite; }
@keyframes pv-stamp { 0%, 30% { opacity: 0; transform: translate(-50%, -50%) rotate(-10deg) scale(1.8); } 40%, 85% { opacity: 1; transform: translate(-50%, -50%) rotate(-10deg) scale(1); } 100% { opacity: 0; } }
@keyframes pv-shake { 0%, 36%, 48%, 100% { transform: none } 39% { transform: translateX(-4px) } 42% { transform: translateX(4px) } 45% { transform: translateX(-2px) } }
/* scene 3: blocked wire to the outside */
.pv-sec { flex-direction: row; gap: 10px; }
.pv-sec .srv { color: var(--paper); } .pv-sec .glob { color: var(--rastra-neutral-600); }
.pv-sec .wire { display: flex; align-items: center; gap: 4px; }
.pv-sec .wire i { width: 6px; height: 4px; background: var(--rastra-neutral-600); animation: v-dot 1.2s steps(1, end) infinite; }
.pv-sec .wire i:nth-of-type(2) { animation-delay: .15s } .pv-sec .wire i:nth-of-type(3) { animation-delay: .3s }
.pv-sec .wire i:nth-of-type(n+4) { animation: none; background: var(--rastra-neutral-700); }
.pv-sec .wire b { width: 26px; height: 26px; display: grid; place-items: center; background: var(--verm); color: var(--ink); border-radius: 4px; animation: pv-lock 2.4s cubic-bezier(.3,1.5,.5,1) infinite; }
@keyframes pv-lock { 0%, 60%, 100% { transform: none } 66% { transform: scale(1.18) } }
/* scene 4: broken Persian vs fixed */
.pv-fa { position: relative; width: 100%; height: 100%; display: grid; place-items: center; }
.pv-fa span { grid-area: 1 / 1; font-size: 40px; font-weight: 800; }
.pv-fa .bad { color: var(--rastra-neutral-500); letter-spacing: 2px; animation: pv-swap 4s steps(1, end) infinite; }
.pv-fa .good { color: var(--verm); animation: pv-swap 4s steps(1, end) infinite reverse; }
@keyframes pv-swap { 0% { opacity: 1 } 50%, 100% { opacity: 0 } }
@media (prefers-reduced-motion: reduce) {
  .pv-net svg, .pv-stuck i.blink, .pv-pay .card, .pv-pay .stamp, .pv-sec .wire i, .pv-sec .wire b, .pv-fa span { animation: none !important; }
  .pv-fa .bad { opacity: 0; } .pcard, .pcard:hover { transform: none; }
}

/* =====================================================================
   v2.4 — billing toggle on the pricing page
   ===================================================================== */
.billing { position: relative; display: flex; width: max-content; gap: 0; padding: 4px; margin: 0 auto 32px; background: var(--white); border: 1px solid var(--line); border-radius: 10px; }
.billing button { position: relative; z-index: 1; border: 0; background: none; font: inherit; font-size: 15px; font-weight: 600; color: var(--muted); padding: 10px 20px; border-radius: 7px;
  display: inline-flex; align-items: center; gap: 8px; transition: color .25s ease; }
.billing button[aria-pressed="true"] { color: var(--paper); }
.billing button span { font-size: 12px; font-weight: 800; background: var(--verm); color: var(--ink); padding: 2px 7px; border-radius: 4px; }
.billing::before { content: ""; position: absolute; top: 4px; bottom: 4px; right: 4px; width: var(--w, 50%); transform: translateX(var(--x, 0)); background: var(--ink); border-radius: 7px;
  transition: transform .4s cubic-bezier(.2,.7,.2,1), width .4s cubic-bezier(.2,.7,.2,1); }
.plan__price .amt { display: inline-block; }
@media (prefers-reduced-motion: reduce) { .billing::before { transition: none; } }

/* ---- roadmap: ready in the free beta / coming soon (v2.4) ---- */
.rm-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.rm-col { padding: 32px; border: 1px solid var(--line); border-radius: 16px; background: var(--paper); }
.rm-col--now { background: var(--white); border-color: var(--ink); box-shadow: 6px 6px 0 var(--ink); }
.rm-col h3 { display: flex; align-items: center; gap: 12px; margin: 0 0 24px; font-size: 22px; }
.rm-badge { font-size: 13px; font-weight: 800; padding: 3px 10px; border-radius: 4px; background: var(--verm); color: var(--ink); }
.rm-badge--soon { background: transparent; box-shadow: inset 0 0 0 1px var(--ink); }
.rm-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.rm-col li { display: grid; grid-template-columns: 10px minmax(0, 1fr); gap: 14px; align-items: start; line-height: 1.9; color: var(--muted); }
.rm-col li b { color: var(--ink); font-weight: 700; }
.rm-dot { width: 10px; height: 10px; margin-top: 10px; background: var(--verm); }
.rm-col:not(.rm-col--now) .rm-dot { background: transparent; box-shadow: inset 0 0 0 2px var(--ink); }
.plan li .soon, .compare .soon { margin-inline-start: 6px; vertical-align: middle; }
@media (max-width: 860px) { .rm-grid { grid-template-columns: 1fr; } .rm-col { padding: 24px; } .rm-col--now { box-shadow: 4px 4px 0 var(--ink); } }
