/* ===========================================================================
   Public pages: the landing page (main/hub.html) and each service's landing
   page (agents/home, imagine/home, storage/home, edits/landing).

   The same look as the app (charcoal, hairlines, thin headings, pills, capsule
   bars). Sections are short and mobile first; .ui-* are small drawings of the
   real product. The demo is driven by static/js/motion.js (module "demo").
   =========================================================================== */

/* ── Hero typeface: Vazirmatn without the swap ────────────────────────
   Everything above the fold — headline, lede, buttons and the demo window —
   sits in .hero, so when the hero text re-wraps the demo window moves. With
   font-display: swap it re-wrapped on every cold load: each machine's own
   fallback face (unknowable: PageSpeed's lab, every phone) is narrower than
   Vazirmatn, so the headline and lede gained a line when the font arrived
   and PageSpeed measured CLS 0.11–0.16 on .demo-window.

   Same files as fonts.css (the hashed URLs and the preloads are shared), but
   `optional`: Vazirmatn is used when it is ready at first paint (cached, or
   a fast connection), otherwise the hero keeps the fallback for that view
   and never moves. Only the hero opts in; the rest of the page still swaps.
   Must stay in a render-blocking sheet so it is known at first paint. */
@font-face {
    font-family: 'Vazirmatn Hero';
    font-display: optional;
    font-weight: 400;
    src: url("../fonts/vazirmatn-arabic-400-normal.49c0cc018008.woff2") format('woff2');
    unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}
@font-face {
    font-family: 'Vazirmatn Hero';
    font-display: optional;
    font-weight: 500;
    src: url("../fonts/vazirmatn-arabic-500-normal.b58020ccff5c.woff2") format('woff2');
    unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}
@font-face {
    font-family: 'Vazirmatn Hero';
    font-display: optional;
    font-weight: 600;
    src: url("../fonts/vazirmatn-arabic-600-normal.6da23f69b4f7.woff2") format('woff2');
    unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}
@font-face {
    font-family: 'Vazirmatn Hero';
    font-display: optional;
    font-weight: 700;
    src: url("../fonts/vazirmatn-arabic-700-normal.51265c214faf.woff2") format('woff2');
    unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}
@font-face {
    font-family: 'Vazirmatn Hero';
    font-display: optional;
    font-weight: 300;
    src: url("../fonts/vazirmatn-arabic-300-normal.e5389dc5ca6a.woff2") format('woff2');
    unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}
@font-face {
    font-family: 'Vazirmatn Hero';
    font-display: optional;
    font-weight: 400;
    src: url("../fonts/vazirmatn-latin-400-normal.274c04027519.woff2") format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}


/* ── Product demo: one agent chat, drawn like the real one ────────────── */
.demo { position: relative; width: 100%; max-width: 560px; justify-self: center; }
.demo-window {
    position: relative;
    display: grid;
    grid-template-rows: auto 1fr;
    border-radius: 18px;
    border: 1px solid var(--border-strong);
    background: var(--color-surface);
    box-shadow: 0 1px 0 rgb(255 255 255 / .04) inset, 0 30px 60px -36px rgb(0 0 0 / .65);
    overflow: hidden;
    text-align: start;
}
.demo-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-subtle);
}
.demo-agent { display: flex; align-items: center; gap: 10px; font-size: 13.5px; font-weight: 600; }
.demo-agent small { display: block; font-size: 11.5px; font-weight: 400; color: var(--color-text-muted); }
.demo-av {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: rgb(var(--primary-rgb) / .14);
    color: rgb(var(--primary-ink-rgb));
    font-size: 14px;
    font-weight: 700;
    overflow: hidden;
}
.demo-av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.demo-model {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px 4px 8px;
    border-radius: 99px;
    border: 1px solid var(--border-subtle);
    font-size: 12px;
    color: var(--color-text-muted);
    direction: ltr;
}
.demo-model img { width: 16px; height: 16px; border-radius: 4px; }

.demo-chat { display: flex; flex-direction: column; gap: 14px; padding: 20px 18px 14px; min-height: 420px; min-width: 0; }
.demo-msg.user {
    align-self: flex-end;
    max-width: 82%;
    padding: 10px 14px;
    border-radius: 16px;
    border-end-end-radius: 6px;
    background: var(--color-hover-strong);
    font-size: 14px;
    line-height: 1.85;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity .35s var(--ease), transform .45s var(--ease);
}
.demo-msg.user.is-in { opacity: 1; transform: none; }

.demo-think {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    color: var(--color-text-muted);
    /* Always 20px tall: growing it in would push the steps down (CLS). */
    height: 20px;
    margin-bottom: -6px;
    opacity: 0;
    overflow: hidden;
    transition: opacity .25s ease;
}
.demo-think.is-in { opacity: 1; }
.demo-think i {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: currentColor;
    animation: demo-wave 1s ease-in-out infinite;
}
.demo-think i:nth-child(2) { animation-delay: .15s; }
.demo-think i:nth-child(3) { animation-delay: .3s; margin-inline-end: 4px; }
@keyframes demo-wave { 0%, 60%, 100% { transform: translateY(0); opacity: .4; } 30% { transform: translateY(-3px); opacity: 1; } }

/* Tool calls: a quiet checklist, not a stack of cards. */
.demo-steps { display: grid; gap: 2px; margin: 0; padding: 0 2px; list-style: none; }
.demo-steps li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 0;
    font-size: 13px;
    color: var(--color-text-muted);
    opacity: 0;
    transform: translateY(4px);
    transition: opacity .3s var(--ease), transform .4s var(--ease), color .3s ease;
}
.demo-steps li.is-in { opacity: 1; transform: none; }
.demo-steps li.is-done { color: var(--color-text-main); }
.demo-steps li code {
    font-family: 'Roboto Mono', ui-monospace, monospace;
    font-size: 12px;
    padding: 1px 6px;
    border-radius: 6px;
    background: var(--color-hover-strong);
    direction: ltr;
    unicode-bidi: isolate;
}
.demo-steps .st { width: 16px; height: 16px; flex: 0 0 auto; position: relative; }
.demo-steps .st::before {
    content: '';
    position: absolute;
    inset: 1px;
    border-radius: 50%;
    border: 2px solid rgb(var(--color-text-main-rgb) / .15);
    border-top-color: rgb(var(--color-text-main-rgb) / .6);
    animation: shell-spin .8s linear infinite;
}
.demo-steps li.is-done .st::before {
    border: 0;
    animation: none;
    background: #34D399;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 14px no-repeat;
            mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 14px no-repeat;
}

.demo-reply {
    min-height: 3.6em;
    margin: 0;
    font-size: 14.5px;
    line-height: 1.95;
    color: var(--color-text-main);
    opacity: 0;
    transition: opacity .3s ease;
}
.demo-reply.is-in { opacity: 1; }
/* The whole answer is laid out from the start: streamed words move from
   .unsaid (invisible but occupying its lines) to .said, so the paragraph
   never re-wraps or grows while it "types". */
.demo-reply .unsaid { visibility: hidden; }
.demo-reply.is-in:not(.is-done) .said::after {
    content: '';
    display: inline-block;
    width: 2px;
    height: 1.05em;
    /* Net advance of zero, or the caret itself would re-wrap the line. */
    margin-inline: 3px -5px;
    vertical-align: -.15em;
    background: currentColor;
    animation: caret 1s steps(2) infinite;
}
@keyframes caret { 50% { opacity: 0; } }

/* The produced file: a small card with the chart itself. */
.demo-file {
    display: flex;
    align-items: center;
    gap: 12px;
    align-self: flex-start;
    padding: 8px;
    padding-inline-end: 16px;
    border-radius: 14px;
    border: 1px solid var(--border-subtle);
    font-size: 12.5px;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity .35s var(--ease), transform .45s var(--ease);
}
[data-demo].is-done .demo-file { opacity: 1; transform: none; }
.demo-chart {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    width: 92px;
    height: 56px;
    padding: 8px 10px;
    border-radius: 9px;
    background: var(--color-hover-strong);
    direction: ltr;
}
.demo-chart i { flex: 1 1 0; height: var(--h); border-radius: 2px 2px 0 0; background: rgb(var(--primary-rgb) / .45); }
.demo-chart i:last-child { background: rgb(var(--primary-rgb)); }
.demo-file-meta b { display: block; font-family: 'Roboto Mono', monospace; font-size: 12px; font-weight: 500; direction: ltr; text-align: start; }
.demo-file-meta small { color: var(--color-text-muted); font-size: 11.5px; }

.demo-input {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;
    padding-inline: 14px 6px;
    border-radius: 14px;
    border: 1px solid var(--border-subtle);
    background: var(--field-bg);
    min-height: 46px;
}
.demo-input [data-demo-input] { font-size: 14px; color: var(--color-text-main); white-space: nowrap; overflow: hidden; }
.demo-input [data-demo-input]:empty::before { content: attr(data-placeholder); color: var(--color-text-muted); }
.demo-input .caret {
    width: 2px;
    height: 18px;
    margin-inline-start: -6px;
    background: rgb(var(--color-text-main-rgb) / .7);
    animation: caret 1s steps(2) infinite;
}
.demo-input .send {
    margin-inline-start: auto;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: var(--color-hover-strong);
    color: var(--color-text-muted);
    transition: transform .2s var(--ease), background-color .2s ease, color .2s ease;
}
.demo-input:has([data-demo-input]:not(:empty)) .send { background: rgb(var(--primary-rgb)); color: var(--color-text-on-primary); }
.demo-input .send svg { width: 16px; height: 16px; }
.demo-input:has(.is-sent) .send { transform: scale(.88); }

@media (max-width: 560px) {
    .demo-chat { min-height: 400px; padding: 16px 14px 12px; }
    .demo-steps li { font-size: 12.5px; }
}

:root[data-theme="light"] .ask { box-shadow: 0 18px 40px -30px rgb(14 17 22 / .35); }
:root[data-theme="light"] .demo-window { box-shadow: 0 30px 60px -36px rgb(14 17 22 / .3); }


/* ── Model marquee ─────────────────────────────────────────────────────── */
.marquee {
    overflow: hidden;
    -webkit-mask-image: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent);
            mask-image: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent);
}
.marquee-track {
    display: flex;
    gap: 10px;
    width: max-content;
    animation: marquee 48s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(50%); } }
[dir="ltr"] .marquee-track { animation-name: marquee-ltr; }
@keyframes marquee-ltr { to { transform: translateX(-50%); } }
.model-chip {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 7px 14px 7px 8px;
    padding-inline: 8px 14px;
    border-radius: 12px;
    border: 1px solid var(--border-subtle);
    background: var(--color-surface);
    font-size: 13.5px;
    font-weight: 500;
    color: var(--color-text-main);
    white-space: nowrap;
    direction: ltr;
}
.model-chip img {
    width: 24px;
    height: 24px;
    border-radius: 7px;
    object-fit: contain;
    background: #fff;
    padding: 2px;
}
.model-chip small { color: var(--color-text-muted); font-weight: 400; font-size: 11.5px; }

.pub-hero, .pub-head h2, .pub-final h2 { font-family: 'Vazirmatn Hero', 'Vazirmatn Fallback', ui-sans-serif, system-ui, sans-serif; }

.pub { --pub-feat: linear-gradient(155deg, #191B1D, #2F323A); --pub-bar: rgb(255 255 255 / .075); }
:root[data-theme="light"] .pub { --pub-feat: linear-gradient(155deg, #FFFFFF, #EDEFF3); --pub-bar: rgb(14 17 22 / .07); }
.pub-wrap { width: 100%; max-width: 1200px; margin-inline: auto; padding-inline: 16px; }
@media (min-width: 1024px) { .pub-wrap { padding-inline: 32px; } }

/* ── Type ────────────────────────────────────────────────────────────── */
.pub h1 { font-size: clamp(29px, 7.4vw, 50px); font-weight: 300; line-height: 1.32; letter-spacing: 0; }
.pub h1 span { display: block; }
.pub h1 .quiet { margin-top: 4px; font-size: .62em; line-height: 1.5; color: var(--color-text-muted); }
.pub h2 { font-size: clamp(22px, 5.4vw, 34px); font-weight: 300; line-height: 1.42; letter-spacing: 0; }
.pub h3 { font-size: 16px; font-weight: 500; line-height: 1.6; }
.pub-sub { max-width: 58ch; margin-top: 12px; font-size: 15px; line-height: 1.95; color: var(--color-text-muted); }
.pub-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    padding: 5px 13px 5px 8px;
    padding-inline: 8px 13px;
    border-radius: 999px;
    border: 1px solid var(--border-subtle);
    font-size: 12.5px;
    color: var(--color-text-muted);
}
.pub-kicker img { width: 18px; height: 18px; }
.pub-eyebrow { margin-bottom: 6px; font-size: 12.5px; color: rgb(var(--primary-ink-rgb)); }

/* ── Buttons ─────────────────────────────────────────────────────────── */
.pub-cta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.pub-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex: 1 1 140px;
    max-width: 260px;
    height: 48px;
    padding: 0 22px;
    border-radius: 999px;
    border: 1px solid var(--border-strong);
    color: var(--color-text-main);
    font-size: 14.5px;
    white-space: nowrap;
    text-decoration: none;
    transition: background-color .15s ease, border-color .15s ease, filter .15s ease, transform .15s ease;
}
.pub-btn:hover { background: var(--color-hover-subtle); }
.pub-btn:active { transform: scale(.98); }
.pub-btn:focus-visible { outline: 2px solid rgb(var(--primary-rgb) / .7); outline-offset: 2px; }
.pub-btn.is-main { border-color: transparent; background: rgb(var(--primary-rgb)); color: var(--color-text-on-primary); font-weight: 500; }
.pub-btn.is-main:hover { background: rgb(var(--primary-rgb)); filter: brightness(1.08); }
.pub-btn svg { width: 15px; height: 15px; flex: none; }
.pub-go {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13.5px;
    color: rgb(var(--primary-ink-rgb));
    text-decoration: none;
}
.pub-go svg { width: 13px; height: 13px; transition: transform .15s ease; }
a:hover > .pub-go svg, a.pub-go:hover svg { transform: translateX(-3px); }
[dir="ltr"] .pub-go svg { transform: scaleX(-1); }

/* ── Small print beside the buttons ──────────────────────────────────── */
.pub-facts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; padding: 0; list-style: none; }
.pub-facts li, .pub-facts a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 28px;
    padding: 0 11px;
    border-radius: 999px;
    border: 1px solid var(--border-subtle);
    font-size: 12px;
    color: var(--color-text-muted);
    text-decoration: none;
}
.pub-facts a:hover { color: var(--color-text-main); border-color: var(--border-strong); }
.pub-facts .is-gift { background: var(--status-ok-bg); border-color: transparent; color: var(--status-ok); }
.pub-facts svg { width: 13px; height: 13px; flex: none; }

/* ── Sections ────────────────────────────────────────────────────────── */
.pub-sec { padding-block: 30px; }
@media (min-width: 1024px) { .pub-sec { padding-block: 52px; } }
.pub-head { max-width: 62ch; margin-bottom: 16px; }
.pub-head p:not(.pub-eyebrow) { margin-top: 6px; font-size: 14px; line-height: 1.9; color: var(--color-text-muted); }
.pub-head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; max-width: none; }
.pub-head-row .pub-go { flex: none; padding-bottom: 6px; }

/* ── Hero ────────────────────────────────────────────────────────────── */
.pub-hero { padding-block: 22px 26px; }
.pub-hero-in { display: grid; gap: 22px; align-items: center; }
.pub-hero-copy { min-width: 0; }
@media (min-width: 1024px) {
    .pub-hero { padding-block: 44px 36px; }
    .pub-hero-in { grid-template-columns: minmax(0, 1.04fr) minmax(0, 1fr); gap: 52px; }
    html.has-aside .pub-hero-in { gap: 32px; }
}
@media (min-width: 1024px) and (max-width: 1399.98px) {
    /* The sidebar takes the room two columns need. */
    html.has-aside .pub-hero-in { grid-template-columns: minmax(0, 1fr); }
}

/* Prompt box: whatever is typed opens in Dimo chat. */
.ask {
    display: grid;
    gap: 10px;
    margin-top: 18px;
    padding: 12px;
    border-radius: 24px;
    border: 1px solid var(--border-strong);
    background: var(--surface-fill);
}
.ask:focus-within { border-color: rgb(var(--primary-rgb) / .55); }
.ask-modes { display: flex; gap: 4px; }
.ask-modes label { cursor: pointer; }
.ask-modes input { position: absolute; opacity: 0; pointer-events: none; }
.ask-modes span {
    display: block;
    padding: 0 13px;
    line-height: 32px;
    border-radius: 999px;
    font-size: 13px;
    color: var(--color-text-muted);
    transition: background-color .15s ease, color .15s ease;
}
.ask-modes input:checked + span { background: var(--color-hover-strong); color: var(--color-text-main); }
.ask-modes input:focus-visible + span { outline: 2px solid rgb(var(--primary-rgb) / .7); outline-offset: 1px; }
.ask-field { display: grid; gap: 10px; }
.ask textarea {
    width: 100%;
    min-height: 58px;
    max-height: 160px;
    padding: 2px 6px;
    border: 0;
    outline: 0;
    resize: none;
    background: none;
    color: var(--color-text-main);
    font: inherit;
    font-size: 16px;
    line-height: 1.8;
}
.ask textarea::placeholder { color: var(--color-text-subtle); }
.ask-go {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 46px;
    padding: 0 22px;
    border: 0;
    border-radius: 999px;
    background: rgb(var(--primary-rgb));
    color: var(--color-text-on-primary);
    font: inherit;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: filter .15s ease, transform .15s ease;
}
.ask-go:hover { filter: brightness(1.08); }
.ask-go:active { transform: scale(.98); }
.ask-go svg { width: 16px; height: 16px; }
[dir="rtl"] .ask-go svg { transform: scaleX(-1); }
@media (min-width: 560px) {
    .ask-field { grid-template-columns: minmax(0, 1fr) auto; align-items: end; }
}

/* The live demo sits beside the headline; a phone gets the service cards sooner. */
.demo { display: none; }
@media (min-width: 1024px) { .demo { display: block; } }
.demo-window { --spot: none; border-radius: 24px; border-color: var(--border-subtle); background: var(--spot), var(--surface-fill); box-shadow: none; }
.demo-chat { min-height: 400px; }
.demo-input { border-radius: 999px; }
.demo-input .send { border-radius: 50%; }
.demo-file, .demo-chart { border-radius: 14px; }
.demo-chart i { border-radius: 99px; }

/* ── Why ─────────────────────────────────────────────────────────────── */
.pub-why { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
@media (min-width: 1024px) { .pub-why { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; } }
.pub-why li { padding: 14px; border-radius: 20px; border: 1px solid var(--border-subtle); background: var(--surface-fill); }
.pub-why svg { display: block; width: 20px; height: 20px; margin-bottom: 8px; color: rgb(var(--primary-ink-rgb)); }
.pub-why b { display: block; font-size: 14px; font-weight: 500; }
.pub-why span { display: block; margin-top: 3px; font-size: 12.5px; line-height: 1.75; color: var(--color-text-muted); }

/* ── Service cards ───────────────────────────────────────────────────── */
.svc-grid { display: grid; gap: 10px; }
@media (min-width: 760px) { .svc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; } }
.svc-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 16px;
    border-radius: 24px;
    border: 1px solid var(--border-subtle);
    background: var(--surface-fill);
    color: var(--color-text-main);
    text-decoration: none;
    transition: border-color .15s ease;
}
.svc-card:hover { border-color: rgb(var(--primary-rgb) / .5); }
.svc-card:focus-visible { outline: 2px solid rgb(var(--primary-rgb) / .7); outline-offset: 2px; }
.svc-top { display: flex; align-items: center; gap: 11px; }
.svc-top img { width: 30px; height: 30px; flex: none; }
.svc-top small { display: block; font-size: 11.5px; line-height: 1.5; color: var(--color-text-subtle); }
.svc-card > p { font-size: 13.5px; line-height: 1.85; color: var(--color-text-muted); }
.svc-card .ui-stage { flex: 1; align-content: center; }
.svc-card .pub-go { margin-top: auto; padding-top: 2px; }
.svc-card h2 { font-size: 16px; font-weight: 500; line-height: 1.6; }
.svc-ico { display: grid; place-items: center; width: 38px; height: 38px; flex: none; border-radius: 50%; background: rgb(var(--primary-rgb) / .14); color: rgb(var(--primary-ink-rgb)); }
.svc-ico svg { width: 19px; height: 19px; }
@media (min-width: 1024px) { .svc-grid.is-three { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ── Text beside a drawing ───────────────────────────────────────────── */
.pub-band { display: grid; gap: 16px; align-items: center; padding-block: 24px; }
.pub-band + .pub-band { border-top: 1px solid var(--border-subtle); }
@media (min-width: 1024px) {
    .pub-band { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; padding-block: 44px; }
    .pub-band.is-flip > :first-child { order: 2; }
}
.pub-ticks { display: grid; gap: 7px; margin-top: 12px; padding: 0; list-style: none; }
.pub-ticks li {
    position: relative;
    padding-inline-start: 24px;
    font-size: 13.5px;
    line-height: 1.8;
    color: var(--color-text-main);
}
.pub-ticks li::before {
    content: "";
    position: absolute;
    inset-inline-start: 0;
    top: 5px;
    width: 15px;
    height: 15px;
    background: rgb(var(--primary-ink-rgb));
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / contain no-repeat;
            mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / contain no-repeat;
}
.pub-band .pub-go { margin-top: 12px; }

/* ── Tiles and numbered steps ────────────────────────────────────────── */
.pub-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
@media (min-width: 1024px) { .pub-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; } }
.pub-tile { display: block; padding: 14px; border-radius: 20px; border: 1px solid var(--border-subtle); background: var(--surface-fill); color: var(--color-text-main); text-decoration: none; transition: border-color .15s ease; }
a.pub-tile:hover { border-color: rgb(var(--primary-rgb) / .5); }
@media (min-width: 1024px) { .pub-tiles.is-four { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.pub-tile svg { display: block; width: 20px; height: 20px; margin-bottom: 8px; color: rgb(var(--primary-ink-rgb)); }
.pub-tile h3 { font-size: 14px; line-height: 1.5; }
.pub-tile p { margin-top: 4px; font-size: 12.5px; line-height: 1.75; color: var(--color-text-muted); }
.pub-tile .is-mono { direction: ltr; text-align: end; font-family: 'Roboto Mono', ui-monospace, monospace; font-size: 11.5px; }
.pub-steps { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; counter-reset: step; }
@media (min-width: 1024px) { .pub-steps { grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 12px; } }
.pub-steps li {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 2px 12px;
    padding: 14px;
    border-radius: 20px;
    border: 1px solid var(--border-subtle);
    background: var(--surface-fill);
    counter-increment: step;
}
.pub-steps li::before {
    content: counter(step, persian);
    grid-row: span 2;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgb(var(--primary-rgb) / .14);
    color: rgb(var(--primary-ink-rgb));
    font-size: 14px;
}
.pub-steps h3 { font-size: 14px; line-height: 1.6; }
.pub-steps p { font-size: 12.5px; line-height: 1.75; color: var(--color-text-muted); }

/* ── Sideways shelves (gallery, ready-made agents) ───────────────────── */
.pub-shelf {
    display: grid;
    grid-auto-flow: column;
    gap: 8px;
    margin-inline: -16px;
    padding-inline: 16px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scroll-padding-inline: 16px;
    scrollbar-width: none;
}
.pub-shelf::-webkit-scrollbar { display: none; }
.pub-shelf > * { scroll-snap-align: start; }
.gal-shelf { grid-auto-columns: 112px; }
@media (min-width: 1024px) {
    .pub-shelf { margin-inline: 0; padding-inline: 0; }
    .gal-shelf { grid-auto-flow: row; grid-template-columns: repeat(8, minmax(0, 1fr)); grid-auto-columns: auto; gap: 10px; }
}
.gal-i { position: relative; display: block; aspect-ratio: 1; border-radius: 14px; overflow: hidden; background: var(--color-hover-strong); }
.gal-i img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s ease; }
.gal-i:hover img { transform: scale(1.04); }
.gal-i:focus-visible { outline: 2px solid rgb(var(--primary-rgb) / .7); outline-offset: 2px; }
.gal-play { position: absolute; inset-block-start: 6px; inset-inline-start: 6px; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: rgb(0 0 0 / .55); color: #fff; }
.gal-play svg { width: 12px; height: 12px; }

.tpl-shelf { grid-auto-columns: 74vw; }
@media (min-width: 560px) { .tpl-shelf { grid-auto-columns: 290px; } }
@media (min-width: 1024px) { .tpl-shelf { grid-auto-flow: row; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-columns: auto; gap: 12px; } }
.tpl-card {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 14px;
    border-radius: 20px;
    border: 1px solid var(--border-subtle);
    background: var(--surface-fill);
    color: var(--color-text-main);
    text-decoration: none;
    transition: border-color .15s ease;
}
.tpl-card:hover { border-color: rgb(var(--primary-rgb) / .5); }
.tpl-card b { font-size: 14.5px; font-weight: 500; }
.tpl-card span { flex: 1; font-size: 12.5px; line-height: 1.8; color: var(--color-text-muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tpl-card small { font-size: 12px; color: rgb(var(--primary-ink-rgb)); }

/* ── Models ──────────────────────────────────────────────────────────── */
.pub-models { padding-block: 4px 18px; }
.pub-models .models-t { margin-bottom: 10px; font-size: 12.5px; color: var(--color-text-muted); }
.marquee { -webkit-mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent); }
.model-chip { border-radius: 999px; padding: 5px 8px; padding-inline-end: 13px; background: none; font-size: 13px; font-weight: 400; }
.model-chip img { border-radius: 50%; }

/* ── Pricing ─────────────────────────────────────────────────────────── */
.pp-grid { display: grid; gap: 10px; }
@media (min-width: 900px) { .pp-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: stretch; } }
.pp-card { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: 24px; border: 1px solid var(--border-subtle); background: var(--surface-fill); }
.pp-card.is-pick { border-color: rgb(var(--primary-rgb) / .55); background: var(--pub-feat); order: -1; }
@media (min-width: 900px) { .pp-card.is-pick { order: 0; } }
.pp-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pp-tag { padding: 2px 10px; border-radius: 999px; background: rgb(var(--primary-rgb) / .16); color: rgb(var(--primary-ink-rgb)); font-size: 11.5px; }
.pp-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; font-size: 13px; color: var(--color-text-muted); }
.pp-price b { font-size: 28px; font-weight: 300; line-height: 1.2; color: var(--color-text-main); }
.pp-price s { width: 100%; font-size: 13px; color: var(--color-text-subtle); }
.pp-credits { font-size: 13px; color: rgb(var(--primary-ink-rgb)); }
.pp-allow { flex: 1; display: flex; flex-wrap: wrap; gap: 4px; margin: 0; padding: 0; list-style: none; }
.pp-allow li { padding: 0 9px; line-height: 26px; border-radius: 999px; background: var(--color-hover-subtle); font-size: 12px; color: var(--color-text-muted); }
.pp-allow b { font-weight: 500; color: var(--color-text-main); }
.pp-card .pub-btn { flex: none; width: 100%; max-width: none; height: 44px; }
.pp-more { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; margin-top: 12px; font-size: 12.5px; color: var(--color-text-muted); }

/* ── Blog rows ───────────────────────────────────────────────────────── */
.pub-rows { display: grid; margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--border-subtle); }
.pub-rows a { display: block; padding: 13px 0; border-bottom: 1px solid var(--border-subtle); color: var(--color-text-main); text-decoration: none; }
.pub-rows a:hover b { color: rgb(var(--primary-ink-rgb)); }
.pub-rows b { display: block; font-size: 14.5px; font-weight: 400; line-height: 1.7; transition: color .15s ease; }
.pub-rows small { font-size: 11.5px; color: var(--color-text-subtle); }

/* ── FAQ (shared/_faq.html) ──────────────────────────────────────────── */
.pub .faq { max-width: none; padding-block: 30px; padding-inline: max(16px, calc((100% - 1200px) / 2 + 16px)); }
.pub .faq .sec-head { max-width: 62ch; margin-bottom: 14px; }
.pub .faq .sec-head .eyebrow-rule { display: none; }
.pub .faq-list { max-width: none; }
.pub .faq-item summary { padding-block: 13px; }
.pub .faq-item summary h3 { font-size: 14.5px; font-weight: 400; line-height: 1.7; }
.pub .faq-item p { font-size: 13.5px; line-height: 1.95; }
.pub .faq-more { font-size: 12.5px; }
@media (min-width: 1024px) { .pub .faq { padding-block: 52px; padding-inline: max(32px, calc((100% - 1200px) / 2 + 32px)); } }

/* ── The last card ───────────────────────────────────────────────────── */
.pub-final { padding-block: 10px 34px; }
.pub-final-in { padding: 24px 18px; border-radius: 28px; border: 1px solid var(--border-subtle); background: var(--pub-feat); text-align: center; }
@media (min-width: 1024px) { .pub-final { padding-block: 24px 64px; } .pub-final-in { padding: 44px 32px; } }
.pub-final p { max-width: 54ch; margin: 8px auto 0; font-size: 14px; line-height: 1.9; color: var(--color-text-muted); }
.pub-final .pub-cta { justify-content: center; }
.pub-final-marks { display: flex; justify-content: center; gap: 10px; margin-bottom: 12px; }
.pub-final-marks img { width: 22px; height: 22px; }

/* ── Drawings of the product ─────────────────────────────────────────── */
.ui-win { display: flex; flex-direction: column; min-width: 0; border-radius: 24px; border: 1px solid var(--border-subtle); background: var(--surface-fill); overflow: hidden; }
.ui-bar { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 8px 14px; border-bottom: 1px solid var(--border-subtle); font-size: 13px; }
.ui-bar b { font-weight: 500; }
.ui-bar small { display: block; font-size: 11px; color: var(--color-text-muted); }
.ui-av { display: grid; place-items: center; width: 32px; height: 32px; flex: none; border-radius: 50%; background: rgb(var(--primary-rgb)); color: var(--color-text-on-primary); font-size: 12px; font-weight: 600; }
.ui-av img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.ui-end { margin-inline-start: auto; }
.ui-body { display: grid; gap: 10px; padding: 14px; }
.ui-stage { display: grid; gap: 8px; padding: 12px; border-radius: 16px; background: var(--color-hover-subtle); min-width: 0; }
.ui-pill { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--border-subtle); font-size: 11.5px; white-space: nowrap; color: var(--color-text-muted); }
.ui-pill img { width: 14px; height: 14px; border-radius: 50%; background: #fff; padding: 1px; }
.ui-pill.is-ok { border-color: transparent; background: var(--status-ok-bg); color: var(--status-ok); }
.ui-pill.is-on { border-color: transparent; background: rgb(var(--primary-rgb) / .16); color: rgb(var(--primary-ink-rgb)); }
.ui-pills { display: flex; flex-wrap: wrap; gap: 5px; }
/* The sender's bubble sits where it does in the real chat. */
.ui-msg { justify-self: end; max-width: 86%; padding: 9px 13px; border-radius: 16px; border-end-end-radius: 5px; background: var(--color-hover-strong); font-size: 13px; line-height: 1.8; }
.ui-reply { font-size: 13px; line-height: 1.9; }
.ui-steps { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; font-size: 12.5px; color: var(--color-text-muted); }
.ui-steps li { display: flex; align-items: center; gap: 8px; }
.ui-steps li::before { content: ""; width: 14px; height: 14px; flex: none; background: var(--status-ok); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / contain no-repeat; }
.ui-steps code, .ui-code { font-family: 'Roboto Mono', ui-monospace, monospace; font-size: 11.5px; direction: ltr; unicode-bidi: isolate; }
.ui-file { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 14px; border: 1px solid var(--border-subtle); font-size: 12px; }
.ui-file b { display: block; font-family: 'Roboto Mono', ui-monospace, monospace; font-size: 11.5px; font-weight: 500; direction: ltr; text-align: end; }
.ui-file small { color: var(--color-text-muted); font-size: 11px; }

/* Capsule bars: the same chart as the home page. */
.ui-caps { display: flex; align-items: flex-end; gap: clamp(4px, 1.6vw, 8px); height: var(--caps-h, 116px); direction: ltr; }
.ui-caps i { flex: 1 1 0; min-width: 0; height: calc(var(--h) * 1%); border-radius: 99px; background: var(--pub-bar); }
.ui-caps i.is-on { background: linear-gradient(180deg, rgb(var(--primary-rgb)), rgb(var(--primary-rgb) / .55)); box-shadow: 0 0 22px rgb(var(--primary-rgb) / .45); }
.ui-caps.is-mini { --caps-h: 44px; gap: 3px; width: 66px; flex: none; }

/* Donut with a dotted ring. */
.ui-ring { position: relative; width: 118px; aspect-ratio: 1; flex: none; border-radius: 50%; background: conic-gradient(rgb(var(--primary-rgb)) 0 var(--a), rgb(var(--primary-rgb) / .38) 0 var(--b), var(--pub-bar) 0); }
.ui-ring::before { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 1px dotted var(--border-strong); }
.ui-ring::after { content: ""; position: absolute; inset: 30%; border-radius: 50%; background: var(--color-bg-dark); }
.ui-ring b { position: absolute; inset: 0; z-index: 1; display: grid; place-items: center; font-size: 13px; font-weight: 400; }

/* File rows. */
.ui-rows { display: grid; margin: 0; padding: 0; list-style: none; }
.ui-rows li { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: 12.5px; }
.ui-rows li + li { border-top: 1px solid var(--border-subtle); }
.ui-rows svg, .ui-rows img { width: 17px; height: 17px; flex: none; color: rgb(var(--primary-ink-rgb)); }
.ui-rows .ui-code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: end; }
.ui-rows small { flex: none; font-size: 11px; color: var(--color-text-subtle); }
.ui-track { height: 6px; border-radius: 99px; background: var(--pub-bar); overflow: hidden; }
.ui-track i { display: block; width: calc(var(--w) * 1%); height: 100%; border-radius: 99px; background: rgb(var(--primary-rgb)); }

/* Timeline. */
.ui-tl { position: relative; display: grid; gap: 5px; direction: ltr; }
.ui-tl > div { display: flex; gap: 3px; height: 24px; }
.ui-tl span { border-radius: 7px; background: rgb(var(--primary-rgb) / .55); }
.ui-tl span.is-soft { background: rgb(var(--primary-rgb) / .22); }
.ui-tl span.is-dim { background: var(--pub-bar); }
.ui-tl::after { content: ""; position: absolute; inset-block: -3px; left: 38%; width: 2px; border-radius: 2px; background: var(--color-text-main); }
.ui-tl-wave { height: 20px !important; background: repeating-linear-gradient(90deg, rgb(var(--primary-rgb) / .5) 0 2px, transparent 2px 5px); border-radius: 7px; }

/* Voice bars. */
.ui-wave { display: flex; align-items: center; justify-content: center; gap: 4px; height: 44px; }
.ui-wave i { width: 3px; height: calc(var(--h) * 1%); border-radius: 3px; background: rgb(var(--primary-ink-rgb)); }

/* Studio composer. */
.ui-prompt { padding: 11px 13px; border-radius: 16px; border: 1px solid var(--border-subtle); font-size: 13px; line-height: 1.85; }
.ui-gen { display: flex; align-items: center; justify-content: space-between; gap: 8px; height: 44px; padding: 0 16px; border-radius: 999px; background: rgb(var(--primary-rgb)); color: var(--color-text-on-primary); font-size: 13.5px; font-weight: 500; }
.ui-gen small { font-size: 12px; font-weight: 400; opacity: .78; }
.ui-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.ui-tiles i, .ui-tiles img { display: block; width: 100%; aspect-ratio: 4 / 3; border-radius: 10px; object-fit: cover; }
.ui-tiles i { background: linear-gradient(150deg, rgb(var(--primary-rgb) / .5), var(--pub-bar)); }
.ui-tiles i:nth-child(2) { background: linear-gradient(150deg, var(--pub-bar), rgb(var(--primary-rgb) / .34)); }
.ui-tiles i:nth-child(3) { background: linear-gradient(200deg, rgb(var(--primary-rgb) / .3), var(--pub-bar)); }

/* A dashboard, drawn: balance, capsule chart, share and agents. */
.ui-dash { display: grid; gap: 10px; }
@media (min-width: 1024px) { .ui-dash { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 14px; } .ui-dash > .d-chart { grid-column: span 7; } .ui-dash > .d-side { grid-column: span 5; } }
.ui-tile { padding: 14px; border-radius: 22px; border: 1px solid var(--border-subtle); background: var(--surface-fill); min-width: 0; }
.ui-tile.is-feat { background: var(--pub-feat); }
.ui-tile h4 { font-size: 13px; font-weight: 400; color: var(--color-text-muted); }
.ui-num { display: flex; align-items: center; gap: 8px; margin-top: 2px; font-size: 27px; font-weight: 300; line-height: 1.3; }
.ui-num em { font-size: 12px; font-style: normal; color: var(--color-text-muted); }
.ui-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.ui-seg { display: inline-flex; padding: 2px; border-radius: 999px; border: 1px solid var(--border-subtle); font-size: 11px; color: var(--color-text-muted); }
.ui-seg span { padding: 0 9px; line-height: 22px; border-radius: 999px; }
.ui-seg .is-on { background: var(--color-hover-strong); color: var(--color-text-main); }
.ui-side { display: grid; gap: 10px; }
.d-side { display: grid; gap: 10px; align-content: start; }
@media (min-width: 1024px) { .d-side { gap: 14px; } }
.ui-share { display: flex; align-items: center; gap: 18px; padding-inline-start: 6px; }
.ui-legend { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; font-size: 12.5px; }
.ui-legend li { display: flex; align-items: center; gap: 7px; }
.ui-legend img { width: 14px; height: 14px; }
.ui-agent { display: flex; align-items: center; gap: 10px; }
.ui-agent b { display: block; font-size: 13.5px; font-weight: 500; }
.ui-agent small { display: block; font-size: 11.5px; color: var(--color-text-muted); }

@media (prefers-reduced-motion: reduce) {
    .marquee-track { animation: none; flex-wrap: wrap; justify-content: center; width: auto; }
    .marquee { -webkit-mask-image: none; mask-image: none; }
}
