:root {
  color-scheme: light;
  --ink: #211633;
  --muted: #625a73;
  --accent: #643de7;
  --accent-dark: #4f2bc9;
  --line: #e9e3f2;
  --surface: #fff;
  --soft: #f7f3ff;
  --radius: 25px;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 300px; background: #fbfaff; color: var(--ink); }
button, input, textarea, select { font: inherit; }
button, a, input, textarea, select { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .66; }
a { color: inherit; }
svg { width: 1.25rem; height: 1.25rem; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.65; }
:focus-visible { outline: 2px solid #784bf0; outline-offset: 3px; }
h1, h2, h3, p { margin: 0; }

.wrap { width: min(1160px, calc(100% - 72px)); margin-inline: auto; }
.site-header { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; min-height: 82px; gap: 24px; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; white-space: nowrap; gap: 10px; text-decoration: none; }
.brand img { flex: none; display: block; }
.brand-name { font-size: 1.27rem; font-weight: 750; letter-spacing: -.055em; }
.brand-divider { height: 19px; margin: 0 2px 0 4px; border-left: 1px solid #dcd4ea; }
.brand-product { font-size: .925rem; font-weight: 650; color: var(--muted); }
.main-nav, .account-actions { display: flex; align-items: center; gap: 27px; }
.main-nav a, .projects-link, .site-footer a { color: var(--muted); font-size: .935rem; font-weight: 600; text-decoration: none; }
.main-nav a:hover, .projects-link:hover, .site-footer a:hover { color: var(--accent-dark); }
.account-actions { justify-content: flex-end; gap: 16px; }

.button { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: .62rem 1.1rem; border: 1px solid transparent; border-radius: 10px; white-space: nowrap; font-weight: 650; line-height: 1.3; text-align: center; text-decoration: none; transition: background .15s, color .15s, box-shadow .15s; }
.button-primary { color: #fff; background: var(--accent); box-shadow: 0 3px 7px #5634d42b; }
.button-primary:hover:enabled, a.button-primary:hover { background: var(--accent-dark); box-shadow: 0 4px 10px #5634d453; }
.button-quiet { background: #fff; border-color: #ded7e9; color: var(--ink); }
.button-quiet:hover:enabled { background: var(--soft); border-color: #d9cbed; color: var(--accent-dark); }
.button-full { width: 100%; }
.text-button { min-height: 32px; background: none; border: 0; padding: 0; color: var(--accent-dark); font-size: .875rem; font-weight: 650; }
.text-button:hover:enabled { text-decoration: underline; text-underline-offset: 3px; }

.studio-backdrop { position: relative; isolation: isolate; }
.studio-backdrop::before { content: ""; position: absolute; z-index: -1; inset: 0 0 20%; pointer-events: none; background: radial-gradient(ellipse at 50% 42%, #eee5ff 0, #f5efff 46%, transparent 76%); }
.studio-backdrop::after { content: ""; position: absolute; z-index: -1; inset: 0 0 31%; pointer-events: none; opacity: .52; background: radial-gradient(circle, #b89cfa 1px, transparent 1.4px) 0 0 / 23px 23px; mask-image: radial-gradient(ellipse at 50% 54%, #0002 18%, #000 39%, transparent 74%); }
.hero { padding: clamp(42px, 4.5vw, 61px) 0 clamp(30px, 3.7vw, 43px); text-align: center; }
.hero h1 { text-wrap: balance; font-size: clamp(2.8rem, 6.5vw, 4.8rem); font-weight: 800; letter-spacing: -.074em; line-height: .99; }
.hero h1 span { display: inline-block; color: var(--accent-dark); background: linear-gradient(102deg, #4c25c5 2%, #7a44ed 62%, #8d42dd 100%); background-clip: text; -webkit-text-fill-color: transparent; }
.hero p { max-width: 665px; margin: 21px auto 0; color: #584b69; font-size: clamp(1rem, 2vw, 1.125rem); line-height: 1.55; text-wrap: pretty; }

.studio { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); align-items: stretch; gap: 20px; scroll-margin-block: 28px; }
.panel { min-width: 0; overflow: hidden; border: 1px solid #e6dff1; border-radius: var(--radius); background: var(--surface); box-shadow: 0 18px 52px #3c1a6620, 0 2px 5px #34244f07; }
.panel-header { display: flex; min-height: 71px; padding: 0 22px; justify-content: space-between; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); }
.panel-heading { display: flex; align-items: center; gap: 10px; min-width: 0; }
.panel-heading h2 { font-size: 1.075rem; letter-spacing: -.026em; font-weight: 730; overflow-wrap: anywhere; }
.panel-icon { display: inline-grid; width: 34px; height: 34px; flex: none; place-items: center; border-radius: 10px; background: #f1eaff; color: var(--accent-dark); }
.panel-icon svg { width: 17px; height: 17px; }
.composer-content { padding: 21px 22px 20px; }
.field-label, .mode-field legend, .input-label { display: block; margin-bottom: 8px; font-size: .94rem; font-weight: 670; }
.brief-box { display: flex; flex-direction: column; min-height: 141px; border: 1px solid #e1d8ed; border-radius: 13px; background: #fcfaff; }
.brief-box:focus-within { border-color: #a887ff; box-shadow: 0 0 0 3px #b08fff33; }
textarea { display: block; width: 100%; min-height: 104px; padding: 12px 13px 2px; resize: vertical; border: 0; background: transparent; color: var(--ink); }
textarea::placeholder { color: #756989; opacity: 1; }
textarea:focus { outline: 0; }
.brief-footer { display: flex; align-items: center; justify-content: space-between; padding: 0 13px 4px; gap: 8px; }
.field-meta, .composer-note, .preview-caption { color: var(--muted); font-size: .81rem; }
.mode-field { min-width: 0; margin: 16px 0; padding: 0; border: 0; }
.mode-options { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.mode-card { display: block; position: relative; min-width: 0; cursor: pointer; }
.mode-card input { position: absolute; opacity: 0; }
.mode-choice { display: flex; align-items: center; height: 100%; min-height: 55px; gap: 9px; padding: 8px 9px; border: 1px solid #e4ddea; border-radius: 11px; line-height: 1.22; }
.mode-choice svg { flex: none; color: #796690; width: 17px; height: 17px; }
.mode-choice strong, .mode-choice small { display: block; }
.mode-choice strong { font-size: .88rem; }
.mode-choice small { margin-top: 4px; color: var(--muted); font-size: .785rem; }
.mode-card:hover .mode-choice { border-color: #c8b2ed; }
.mode-card input:checked + .mode-choice { border-color: #aa8afd; color: var(--accent-dark); background: #f6f0ff; }
.mode-card input:checked + .mode-choice svg { color: var(--accent-dark); }
.mode-card input:focus-visible + .mode-choice { outline: 2px solid #784bf0; outline-offset: 2px; }
.composer-note { margin-top: 9px; text-align: center; }

.preview { display: flex; flex-direction: column; }
.device-switch { display: flex; align-items: center; padding: 3px; gap: 2px; border: 1px solid #eae4f3; border-radius: 10px; background: #f8f5fc; }
.device-button { display: grid; width: 34px; height: 32px; place-items: center; background: transparent; border: 1px solid transparent; border-radius: 7px; padding: 0; color: #6d627d; }
.device-button svg { width: 17px; height: 17px; }
.device-button:hover { color: var(--accent-dark); }
.device-button[aria-pressed="true"] { background: #fff; border-color: #e8e1f2; color: var(--accent-dark); box-shadow: 0 1px 3px #38225913; }
.preview-stage { display: flex; flex: 1; min-width: 0; min-height: 335px; justify-content: center; align-items: center; padding: 17px; background: radial-gradient(ellipse at 52% 52%, #ede3ff, #f7f2ff 70%); }
.browser-shell { width: 100%; max-width: 100%; min-width: 0; border: 1px solid #ddd3eb; border-radius: 13px; overflow: hidden; background: #fff; box-shadow: 0 9px 25px #3d216524; transition: width .24s ease; }
.preview-stage[data-device="mobile"] .browser-shell { width: 304px; }
.browser-bar { position: relative; display: flex; min-height: 36px; justify-content: center; align-items: center; padding: 4px 12px; background: #fdfbff; border-bottom: 1px solid #e5dfee; }
.browser-dots { display: flex; position: absolute; left: 11px; gap: 4px; }
.browser-dots i { display: block; width: 5px; height: 5px; border-radius: 50%; background: #d1c6e1; }
.browser-address { width: min(175px, 61%); padding: 2px 5px; border: 1px solid #eee8f4; border-radius: 5px; background: #f6f2fb; color: #665876; text-align: center; font-size: .75rem; }
.demo-site { background: #f5efe6; color: #342e28; }
.demo-header { display: flex; min-height: 43px; padding-inline: 15px; justify-content: space-between; align-items: center; gap: 10px; }
.demo-logo { font-family: Georgia, serif; font-size: 1.45rem; line-height: 1; letter-spacing: -.09em; }
.demo-logo span { color: #8b5436; }
.demo-nav { font-size: .75rem; white-space: nowrap; }
.demo-hero { position: relative; display: flex; align-items: flex-end; min-height: 225px; overflow: hidden; isolation: isolate; background: #453d55; color: #fff7ed; }
.demo-hero img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: 58% 51%; }
.demo-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(70deg, #100e18d9 4%, #100e185c 52%, #100e180d 86%); }
.demo-copy { padding: 23px 15px 20px; }
.demo-copy span { display: block; margin-bottom: 7px; font-size: .75rem; font-weight: 650; letter-spacing: .085em; }
.demo-copy strong { display: block; font: 400 clamp(1.55rem, 3.5vw, 2.75rem)/.98 Georgia, serif; letter-spacing: -.055em; }
.demo-footer { display: flex; min-height: 34px; justify-content: space-between; align-items: center; gap: 6px; padding: 3px 15px; font-size: .75rem; }
.preview-stage[data-device="mobile"] .demo-header, .preview-stage[data-device="mobile"] .demo-footer { padding-inline: 10px; }
.preview-stage[data-device="mobile"] .demo-nav { display: none; }
.preview-stage[data-device="mobile"] .demo-copy strong { font-size: 1.9rem; }
.preview-stage[data-device="mobile"] .demo-hero img { object-position: 65% 50%; }
.preview-caption { padding: 10px 16px; border-top: 1px solid var(--line); text-align: center; }

.description { color: var(--muted); font-size: .96rem; }
.error-message { margin: 12px 0; color: #9b2445; font-size: .9rem; overflow-wrap: anywhere; }
.loading-message { display: flex; align-items: center; gap: 11px; color: var(--muted); }
.spinner { width: 18px; height: 18px; flex: none; border: 2px solid #ddcef9; border-top-color: var(--accent); border-radius: 50%; animation: spin .75s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.question-list { display: grid; gap: 10px; }
.input-label { display: grid; gap: 6px; margin: 0; overflow-wrap: anywhere; }
.input-label input, .page-select { width: 100%; min-height: 43px; padding: 8px 11px; border: 1px solid #ded5eb; border-radius: 9px; background: #fcfaff; color: var(--ink); font-size: 1rem; font-weight: 400; }
.question-list input::placeholder { color: #756989; opacity: 1; }
.question-actions { display: grid; gap: 7px; margin-top: 17px; }
.question-actions .text-button { justify-self: center; }
.project-step { display: grid; gap: 12px; }
.project-state { color: var(--accent-dark); font-weight: 700; }
.project-step .error-message { margin: 0; }
.progress-meter { height: 7px; overflow: hidden; border-radius: 99px; background: #eee7fa; }
.progress-meter span { display: block; width: 43%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #a57cfe, var(--accent)); animation: slide 1.5s ease-in-out infinite alternate; }
@keyframes slide { to { transform: translateX(130%); } }
.checkout { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px; border: 1px solid #e8def4; border-radius: 12px; background: #faf6ff; }
.checkout div { min-width: 0; }
.checkout div span { display: block; margin-top: 2px; color: var(--muted); font-size: .89rem; }
.checkout-price { font-size: 1.45rem; white-space: nowrap; }
.project-step .text-button { justify-self: center; }
.preview-waiting { display: grid; justify-items: center; gap: 7px; max-width: 365px; padding: 22px 12px; color: #35204c; text-align: center; }
.preview-waiting p { color: var(--muted); }
.waiting-icon { display: grid; width: 62px; height: 62px; margin-bottom: 8px; place-items: center; border: 1px solid #d9c5ff; border-radius: 19px; background: #f4edff; color: var(--accent); box-shadow: 0 5px 15px #65429322; }
.waiting-icon svg { width: 27px; height: 27px; }
.page-select { appearance: none; max-width: min(65%, 240px); min-height: 28px; padding: 2px 22px 2px 7px; background: linear-gradient(45deg, transparent 50%, #716282 50%) calc(100% - 12px) 50%/5px 5px no-repeat, linear-gradient(135deg, #716282 50%, transparent 50%) calc(100% - 7px) 50%/5px 5px no-repeat, #f7f2fc; font-size: .875rem; text-overflow: ellipsis; }
.frame-viewport { position: relative; height: clamp(320px, 48vw, 510px); overflow: hidden; }
.result-browser iframe { display: block; width: 100%; height: 100%; border: 0; background: #fff; transform-origin: top left; }
.preview-stage[data-device="mobile"] .frame-viewport { height: 510px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.projects, .how { margin-top: 74px; scroll-margin-block: 26px; }
.projects h2, .how h2, .pricing h2 { font-size: clamp(1.65rem, 3.8vw, 2.45rem); letter-spacing: -.06em; line-height: 1.12; }
.projects-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.projects-heading .description { margin-top: 7px; overflow-wrap: anywhere; }
.project-list { display: grid; margin: 0; padding: 0; gap: 9px; list-style: none; }
.project-row { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 13px; padding: 15px 17px; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); text-align: left; }
.project-row:hover { background: var(--soft); border-color: #d8c9f3; }
.project-row strong { min-width: 0; overflow-wrap: anywhere; }
.project-row span { flex: none; color: var(--muted); font-size: .875rem; }
.how h2 { margin-bottom: 22px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; }
.steps article { padding: 22px; border: 1px solid var(--line); border-radius: 18px; background: #fff; }
.step-icon { display: grid; width: 38px; height: 38px; margin-bottom: 13px; place-items: center; border-radius: 11px; color: var(--accent-dark); background: #f1eaff; }
.steps h3 { margin-bottom: 5px; font-size: 1.08rem; }
.steps p, .pricing p { color: var(--muted); }
.pricing { margin-top: 38px; scroll-margin-block: 26px; }
.pricing-card { display: flex; align-items: center; justify-content: space-between; gap: 21px; padding: clamp(23px, 5vw, 40px); border: 1px solid #e6d9fb; border-radius: 21px; background: radial-gradient(ellipse at 95% 0, #e7d7ff, #f5efff 65%); }
.pricing-copy p { margin-top: 10px; }
.site-footer { display: flex; min-height: 90px; margin-top: 54px; align-items: center; justify-content: space-between; gap: 10px; border-top: 1px solid var(--line); color: var(--muted); }

.auth-dialog { width: min(430px, calc(100% - 28px)); max-height: calc(100% - 36px); padding: 0; border: 1px solid #e5dcf1; border-radius: 21px; background: white; color: var(--ink); box-shadow: 0 17px 80px #23113743; }
.auth-dialog::backdrop { background: #25173985; backdrop-filter: blur(3px); }
.auth-content { position: relative; display: grid; gap: 9px; padding: 26px; }
.auth-mark { margin-bottom: 3px; }
.auth-content h2 { font-size: 1.55rem; letter-spacing: -.045em; line-height: 1.2; }
.close-dialog { position: absolute; top: 13px; right: 13px; display: grid; width: 38px; height: 38px; place-items: center; border: 0; border-radius: 10px; background: var(--soft); color: var(--ink); }
.close-dialog:hover { background: #ece3fd; }
.auth-content form { display: grid; gap: 11px; margin-top: 9px; }
.auth-content form .error-message { margin: 0; }
.auth-content form .button { margin-top: 5px; }
.auth-switch { margin-top: 3px; color: var(--muted); font-size: .9rem; text-align: center; }
.app-notice { position: fixed; z-index: 2; left: 50%; bottom: 17px; width: max-content; max-width: calc(100% - 26px); padding: 10px 15px; transform: translateX(-50%); border: 1px solid #e4d8f6; border-radius: 11px; background: #fbf8ff; color: var(--ink); box-shadow: 0 6px 25px #38226929; }

@media (max-width: 870px) {
  .wrap { width: calc(100% - 42px); }
  .main-nav, .account-actions { gap: 13px; }
  .studio { gap: 13px; }
  .panel-header { padding-inline: 14px; }
  .composer-content { padding-inline: 14px; }
  .preview-stage { padding-inline: 12px; }
}

@media (max-width: 690px) {
  .studio { grid-template-columns: 1fr; gap: 15px; }
  .wrap { width: calc(100% - 30px); }
  .site-header { min-height: 66px; gap: 10px; }
  .main-nav { display: none; }
  .hero p { margin-top: 17px; }
  .steps { grid-template-columns: 1fr; gap: 9px; }
  .steps article { padding: 15px; }
  .how, .projects { margin-top: 52px; }
  .preview-stage { min-height: 0; }
  .demo-hero { min-height: 210px; }
}

@media (max-width: 440px) {
  .account-actions { gap: 7px; }
  .account-actions .button { padding-inline: 8px; font-size: .89rem; }
  .projects-link { font-size: .82rem; white-space: nowrap; }
  .brand { gap: 6px; }
  .brand img { width: 31px; height: 31px; }
  .brand-name { font-size: 1.1rem; }
  .brand-divider { margin-inline: 0; }
  .brand-product { font-size: .79rem; }
  .panel { border-radius: 19px; }
  .mode-choice { gap: 5px; padding-inline: 6px; }
  .mode-choice svg { width: 13px; height: 13px; }
  .mode-choice small { font-size: .75rem; }
  .pricing-card { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 350px) {
  .brand-divider, .brand-product, .demo-nav { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
