/* ==========================================================================
   FJ Digital — Design tokens
   ========================================================================== */
:root {
    --bg: #090d16;
    --surface: #121a2b;
    --surface-2: #182238;
    --border: #232e45;
    --text: #e9edf5;
    --muted: #8993a8;
    --accent: #3d8bfd;
    --accent-2: #22d3ee;
    --accent-dim: rgba(61, 139, 253, 0.14);
    --success: #34d399;
    --warning: #fbbf24;
    --danger: #f87171;
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --font: "Vazirmatn", "Tahoma", sans-serif;
}

/* خودمیزبان: فونت Vazirmatn (مجوز OFL) — بدون هیچ درخواست به دامنهٔ خارجی.
   یک فایل variable (وزن ۱۰۰ تا ۹۰۰) که وزن‌های ۴۰۰/۵۰۰/۶۰۰/۷۰۰/۸۰۰ سایت را پوشش می‌دهد. */
@font-face {
    font-family: "Vazirmatn";
    src: url("../fonts/Vazirmatn-Variable.woff2") format("woff2-variations"),
         url("../fonts/Vazirmatn-Variable.woff2") format("woff2");
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
    size-adjust: 100%;
}

/* FJ polish — existing tokens and layout are preserved. */
:root {
    color-scheme: dark;
    --on-accent: #06101f;
    --accent-hover: #5b9dfd;
    --flash-text: #cfe6fb;
    --body-secondary: #c9ccd2;
    --success-dim: rgba(52,211,153,.12);
    --warning-dim: rgba(251,191,36,.12);
    --danger-dim: rgba(248,113,113,.12);
    --muted-dim: rgba(139,147,168,.15);
    --grid-line: rgba(255,255,255,.035);
    --grid-blue: rgba(61,139,253,.16);
    --grid-cyan: rgba(34,211,238,.12);
    --shadow: 0 12px 28px rgba(0,0,0,.22);
    --brand-glow: 0 0 32px rgba(61,139,253,.22);
    --button-shadow: 0 8px 20px rgba(61,139,253,.2);
    --shine: rgba(255,255,255,.22);
    --focus-ring: 0 0 0 4px var(--accent-dim);
    --nav-glass: rgba(18,26,43,.92);
    --motion-ease: cubic-bezier(.22,1,.36,1);
    --slide-direction: 1;
}
[dir="rtl"] { --slide-direction: -1; }
[data-theme="light"] {
    color-scheme: light;
    --bg: #f3f7fc;
    --surface: #ffffff;
    --surface-2: #eaf1fa;
    --border: #cbd8e9;
    --text: #17253b;
    --muted: #52647c;
    --accent: #2264c5;
    --accent-2: #08748a;
    --accent-dim: rgba(34,100,197,.09);
    --accent-hover: #1d56ab;
    --on-accent: #ffffff;
    --success: #08754f;
    --warning: #805800;
    --danger: #b42d3c;
    --success-dim: rgba(8,117,79,.09);
    --warning-dim: rgba(128,88,0,.09);
    --danger-dim: rgba(180,45,60,.09);
    --muted-dim: rgba(82,100,124,.1);
    --flash-text: #24496f;
    --body-secondary: #425772;
    --grid-line: rgba(34,100,197,.05);
    --grid-blue: rgba(61,139,253,.065);
    --grid-cyan: rgba(34,211,238,.04);
    --shadow: 0 12px 28px rgba(24,51,86,.065);
    --brand-glow: 0 0 24px rgba(34,100,197,.12);
    --button-shadow: 0 8px 20px rgba(34,100,197,.14);
    --nav-glass: rgba(255,255,255,.93);
}


* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    margin: 0;
    padding: 32px 16px 60px;
    position: relative;
    overflow-x: hidden;
}

/* Faint network-grid backdrop — grounds the design in "network / tunnel"
   rather than a generic blurred gradient blob. */
.bg-grid {
    position: fixed;
    inset: 0;
    z-index: -1;
    background-image:
        radial-gradient(circle at 20% 15%, var(--grid-blue), transparent 40%),
        radial-gradient(circle at 82% 8%, var(--grid-cyan), transparent 38%),
        linear-gradient(var(--grid-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
    background-size: auto, auto, 42px 42px, 42px 42px;
    mask-image: linear-gradient(to bottom, black, black 55%, transparent 100%);
}

.container {
    max-width: 480px;
    margin: 0 auto;
}

/* --------------------------------------------------------------------- */
/* Scroll-reveal utility                                                 */
/* --------------------------------------------------------------------- */
.reveal {
    opacity: 1;
    transform: none;
    transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1), transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.fj-reveal-ready .reveal:not(.is-visible) {
    opacity: 0;
    transform: translateY(12px) scale(.995);
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-delay-1.is-visible { transition-delay: 0.08s; }
.reveal-delay-2.is-visible { transition-delay: 0.16s; }
.reveal-delay-3.is-visible { transition-delay: 0.24s; }

/* --------------------------------------------------------------------- */
/* Navbar                                                                */
/* --------------------------------------------------------------------- */
.navbar {
    max-width: 480px;
    margin: 0 auto 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 4px;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 9px;
    color: var(--text);
    text-decoration: none;
    font-weight: 700;
    font-size: 15px;
}

.navbar-logo {
    width: 32px;
    height: 32px;
    border-radius: 22%;
    object-fit: contain;
    background: #fff;
    box-shadow: 0 0 0 1px var(--border), 0 0 18px rgba(61, 139, 253, .16);
    transition: box-shadow .25s ease, transform .25s var(--motion-ease);
}

.navbar-right {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px 14px;
    font-size: 13px;
}

.navbar-right a {
    color: var(--muted);
    text-decoration: none;
    transition: color 0.2s ease;
}
@media (hover:hover) {
.navbar-right a:hover {
    color: var(--accent);
}
}


.navbar-user {
    color: var(--text);
}

.lang-switcher {
    position: relative;
}

.lang-toggle {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 6px 10px;
    cursor: pointer;
    font-size: 15px;
    line-height: 1;
}

.lang-menu {
    display: none;
    position: absolute;
    top: 115%;
    inset-inline-end: 0;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    min-width: 110px;
    z-index: 10;
    box-shadow: var(--shadow);
}

.lang-menu.open {
    display: block;
}

.lang-menu a {
    display: block;
    padding: 9px 12px;
    color: var(--text);
    text-decoration: none;
    font-size: 13px;
}
@media (hover:hover) {
.lang-menu a:hover {
    background: var(--accent-dim);
    color: var(--accent);
}
}


/* --------------------------------------------------------------------- */
/* Flash messages                                                        */
/* --------------------------------------------------------------------- */
.flash-messages {
    margin-bottom: 16px;
}

.flash-message {
    background: var(--accent-dim);
    border: 1px solid var(--accent);
    color: var(--flash-text);
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    margin-bottom: 8px;
}

/* --------------------------------------------------------------------- */
/* Brand / hero blocks                                                   */
/* --------------------------------------------------------------------- */
.brand {
    text-align: center;
    margin-bottom: 26px;
}

.logo-frame {
    display: inline-flex;
    border-radius: 22%;
}

.logo {
    display: block;
    width: 96px;
    height: 96px;
    border-radius: 22%;
    object-fit: contain;
    background: #fff;
    box-shadow: 0 0 0 1px var(--border), 0 0 0 6px rgba(255, 255, 255, .03), var(--brand-glow);
}

.logo.small {
    width: 64px;
    height: 64px;
}

.brand h1 {
    margin: 14px 0 4px;
    font-size: 26px;
    font-weight: 800;
    letter-spacing: 0;
}

.subtitle {
    color: var(--muted);
    margin: 0;
    font-size: 14px;
}

.landing-brand {
    text-align: center;
    margin-bottom: 24px;
}

.landing-brand .logo {
    width: 104px;
    height: 104px;
}

.landing-brand h1 {
    margin: 16px 0 4px;
    font-size: 30px;
    font-weight: 800;
    line-height: 1.4;
}

.hero-text {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.9;
    max-width: 420px;
    margin: 14px auto 0;
}

/* --------------------------------------------------------------------- */
/* Buttons / links                                                       */
/* --------------------------------------------------------------------- */
.social-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 24px;
}

.btn {
    display: block;
    text-align: center;
    padding: 13px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-weight: 700;
    color: var(--on-accent);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
@media (hover:hover) {
.btn:hover {
    transform: translateY(-1px);
}
}


.btn-channel {
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    box-shadow: var(--button-shadow);
}

.btn-bot {
    background: var(--surface);
    border: 1px solid var(--accent);
    color: var(--accent);
}

.btn-support {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
}

.btn-primary-blue {
    margin-top: 6px;
    padding: 13px;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--accent);
    color: var(--on-accent);
    font-weight: 700;
    cursor: pointer;
    font-size: 15px;
    width: 100%;
    transition: background 0.2s ease, transform 0.15s ease;
}
@media (hover:hover) {
.btn-primary-blue:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
}
}


.landing-big-btn {
    display: block;
    text-align: center;
    padding: 18px;
    border-radius: var(--radius-md);
    font-size: 18px;
    font-weight: 700;
    text-decoration: none;
    margin-bottom: 14px;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
@media (hover:hover) {
.landing-big-btn:hover {
    transform: translateY(-2px);
}
}


.landing-btn-login {
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    color: var(--on-accent);
    box-shadow: var(--button-shadow);
}

.landing-btn-register {
    background: transparent;
    border: 2px solid var(--accent);
    color: var(--accent);
}

.back-link {
    display: block;
    text-align: center;
    margin-top: 16px;
    color: var(--muted);
    font-size: 13px;
    text-decoration: none;
}
@media (hover:hover) {
.back-link:hover {
    color: var(--accent);
}
}


/* --------------------------------------------------------------------- */
/* Cards / forms                                                         */
/* --------------------------------------------------------------------- */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 22px;
    margin-bottom: 22px;
}

.card h2, .card h3 {
    margin-top: 0;
}

.auth-card, .landing-card {
    max-width: 400px;
    margin: 0 auto;
}

.landing-card {
    text-align: center;
}

.landing-text {
    color: var(--body-secondary);
    margin-bottom: 20px;
    line-height: 1.8;
}

.order-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.order-form label {
    font-size: 13px;
    color: var(--muted);
}

.order-form input,
.order-form select {
    padding: 11px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text);
    font-size: 15px;
    font-family: var(--font);
    transition: border-color 0.2s ease;
}

.order-form input:focus,
.order-form select:focus {
    outline: none;
    border-color: var(--accent);
}

.price-preview {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px;
    text-align: center;
    margin: 0;
    font-variant-numeric: tabular-nums;
}

.price-preview span {
    color: var(--accent-2);
    font-weight: 700;
    font-size: 17px;
}

.order-form button,
.btn-confirm {
    margin-top: 6px;
    padding: 13px;
    border: none;
    border-radius: var(--radius-sm);
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    color: var(--on-accent);
    font-weight: 700;
    cursor: pointer;
    font-size: 15px;
    width: 100%;
    transition: transform 0.15s ease;
}
@media (hover:hover) {
.order-form button:hover,
.btn-confirm:hover {
    transform: translateY(-1px);
}
}


.address-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    background: var(--bg);
    border: 1px dashed var(--accent);
    border-radius: var(--radius-sm);
    padding: 11px;
    margin: 10px 0;
    word-break: break-all;
    font-family: var(--font);
    font-variant-numeric: tabular-nums;
    font-size: 13px;
}

.address-box button {
    flex-shrink: 0;
    background: var(--accent);
    color: var(--on-accent);
    border: none;
    border-radius: 6px;
    padding: 8px 10px;
    cursor: pointer;
    font-size: 12px;
}

.warning {
    color: var(--warning);
    font-size: 13px;
}

.status-box {
    padding: 12px;
    border-radius: var(--radius-sm);
    font-size: 14px;
}

.status-pending {
    background: var(--warning-dim);
    color: var(--warning);
}

.status-approved {
    background: var(--success-dim);
    color: var(--success);
}

.status-rejected {
    background: var(--danger-dim);
    color: var(--danger);
}

.footer-note {
    color: var(--muted);
    font-size: 12px;
    text-align: center;
    margin-top: 20px;
    line-height: 1.7;
}

.auth-switch {
    text-align: center;
    font-size: 13px;
    color: var(--muted);
    margin-top: 12px;
}

.auth-switch a {
    color: var(--accent);
}

/* --------------------------------------------------------------------- */
/* Scroll hint                                                           */
/* --------------------------------------------------------------------- */
.scroll-hint {
    text-align: center;
    color: var(--muted);
    font-size: 13px;
    margin: 26px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-decoration: none;
}
@media (hover:hover) {
.scroll-hint:hover {
    color: var(--accent);
}
}


.scroll-arrow {
    font-size: 20px;
    color: var(--accent);
    animation: bounce 1.6s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(6px); }
}

/* --------------------------------------------------------------------- */
/* Pricing table                                                         */
/* --------------------------------------------------------------------- */
.pricing-section {
    margin-bottom: 26px;
}

.pricing-title {
    font-size: 19px;
    font-weight: 700;
    margin: 0 0 14px;
    text-align: center;
}

.pricing-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    font-variant-numeric: tabular-nums;
}

.pricing-table th {
    text-align: start;
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
    padding: 12px 16px;
    background: var(--surface-2);
    border-bottom: 1px solid var(--border);
}

.pricing-table td {
    padding: 13px 16px;
    font-size: 15px;
    border-bottom: 1px solid var(--border);
}

.pricing-table tr:last-child td {
    border-bottom: none;
}

.pricing-table .plan-name {
    font-weight: 700;
}

.pricing-table .plan-price {
    color: var(--accent-2);
    font-weight: 700;
    text-align: end;
}

.pricing-table tr.plan-popular {
    background: var(--accent-dim);
    position: relative;
}

.pricing-table tr.plan-popular td:first-child::before {
    content: "★";
    color: var(--accent-2);
    margin-inline-end: 6px;
    font-size: 12px;
}

.pricing-note {
    text-align: center;
    color: var(--muted);
    font-size: 13px;
    margin: 14px 0 0;
    line-height: 1.7;
}

.pricing-note a {
    color: var(--accent);
    font-weight: 600;
    text-decoration: none;
}
@media (hover:hover) {
.pricing-note a:hover {
    text-decoration: underline;
}
}


/* --------------------------------------------------------------------- */
/* Profile                                                               */
/* --------------------------------------------------------------------- */
.profile-icon-link {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.profile-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: var(--on-accent);
    font-weight: 800;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-avatar {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    margin: 0 auto;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: var(--on-accent);
    font-weight: 800;
    font-size: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 0 3px var(--border), var(--brand-glow);
}

.profile-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}

.profile-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.profile-label {
    color: var(--muted);
}

.profile-value {
    font-weight: 600;
}

.orders-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.order-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    text-decoration: none;
    color: var(--text);
    transition: border-color 0.2s ease;
}
@media (hover:hover) {
.order-item:hover {
    border-color: var(--accent);
}
}


.order-item-title {
    font-weight: 700;
    display: block;
}

.order-item-date {
    color: var(--muted);
    font-size: 12px;
    font-variant-numeric: tabular-nums;
}

.status-badge {
    font-size: 12px;
    padding: 5px 10px;
    border-radius: 999px;
    white-space: nowrap;
}

.status-badge-awaiting_payment {
    background: var(--muted-dim);
    color: var(--muted);
}

.status-badge-pending_review {
    background: var(--warning-dim);
    color: var(--warning);
}

.status-badge-approved {
    background: var(--success-dim);
    color: var(--success);
}

.status-badge-rejected {
    background: var(--danger-dim);
    color: var(--danger);
}

/* --------------------------------------------------------------------- */
/* Textarea (support / admin reply)                                      */
/* --------------------------------------------------------------------- */
.order-form textarea {
    padding: 11px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    font-family: var(--font);
    resize: vertical;
    transition: border-color 0.2s ease;
}

.order-form textarea:focus {
    outline: none;
    border-color: var(--accent);
}

/* --------------------------------------------------------------------- */
/* Tickets                                                               */
/* --------------------------------------------------------------------- */
.ticket-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
}

.ticket-item-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.ticket-message {
    color: var(--muted);
    font-size: 13px;
    margin: 0;
    line-height: 1.7;
}

.ticket-reply {
    color: var(--accent-2);
    font-size: 13px;
    margin: 0;
    line-height: 1.7;
}

/* --------------------------------------------------------------------- */
/* Admin panel                                                           */
/* --------------------------------------------------------------------- */
.admin-link {
    color: var(--accent-2) !important;
    font-weight: 700;
}

.admin-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.admin-tab {
    padding: 10px 4px;
    color: var(--muted);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    border-bottom: 2px solid transparent;
}
@media (hover:hover) {
.admin-tab:hover {
    color: var(--text);
}
}


.admin-tab.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.admin-order-card {
    margin-bottom: 16px;
}

.admin-order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.admin-approve-form {
    margin-top: 12px;
}

.btn-reject-admin {
    margin-top: 10px;
    width: 100%;
    padding: 11px;
    border: 1px solid var(--danger);
    background: transparent;
    color: var(--danger);
    border-radius: var(--radius-sm);
    font-weight: 700;
    cursor: pointer;
    font-size: 14px;
}
@media (hover:hover) {
.btn-reject-admin:hover {
    background: var(--danger-dim);
}
}


.about-intro-text {
    color: var(--text);
    font-size: 14px;
    line-height: 1.9;
    margin: 0;
}

/* --------------------------------------------------------------------- */
/* Services hub                                                          */
/* --------------------------------------------------------------------- */
.dashboard-subtitle {
    margin-bottom: 20px;
}

.hub-head {
    margin: 4px 0 24px;
}

.hub-kicker {
    margin: 0 0 8px;
    color: var(--accent-2);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .02em;
}

.hub-title {
    margin: 0 0 8px;
    font-size: clamp(22px, 4vw, 30px);
    font-weight: 800;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.hub-username {
    color: var(--accent);
}
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
    .hub-username {
        background: linear-gradient(92deg, var(--accent), var(--accent-2));
        -webkit-background-clip: text;
        background-clip: text;
        color: transparent;
    }
}

.hub-sub {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.8;
}

.hub-section {
    margin-bottom: 8px;
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.service-card {
    --tilt-x: 0deg;
    --tilt-y: 0deg;
    --lift: 0px;
    --glare-x: 50%;
    --glare-y: 0%;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-inline-size: 0;
    aspect-ratio: 1 / 1.08;
    padding: 14px;
    border-radius: 24px;
    background:
        radial-gradient(120% 90% at 85% 0%, var(--accent-dim), transparent 58%),
        var(--surface);
    border: 1px solid var(--border);
    text-decoration: none;
    color: var(--text);
    text-align: start;
    overflow: hidden;
    isolation: isolate;
    box-shadow: var(--shadow);
    transform-style: preserve-3d;
    transform: perspective(900px) rotateX(var(--tilt-x)) rotateY(var(--tilt-y)) translate3d(0, var(--lift), 0);
    transition: transform .35s var(--motion-ease), border-color .2s ease, box-shadow .25s ease;
    will-change: transform;
}

.service-card-glow {
    position: absolute;
    inset: -40%;
    z-index: 0;
    background: radial-gradient(circle at var(--glare-x) var(--glare-y), var(--accent) 0%, transparent 42%);
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease;
}

.service-card-icon {
    position: relative;
    z-index: 1;
    inline-size: 50px;
    block-size: 50px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    font-size: 24px;
    line-height: 1;
    background: linear-gradient(152deg, var(--accent-dim), transparent 72%), var(--surface-2);
    border: 1px solid var(--border);
    box-shadow: 0 10px 20px -14px var(--accent), inset 0 1px 0 var(--shine);
    transform: translateZ(26px);
    transition: transform .35s var(--motion-ease);
}

.service-card-emoji {
    display: block;
    transform: translateZ(6px);
}

.service-card-ghost {
    position: absolute;
    inset-inline-end: -18px;
    inset-block-end: -30px;
    z-index: 0;
    font-size: 138px;
    line-height: 1;
    opacity: .07;
    filter: saturate(0);
    pointer-events: none;
    transform: rotate(-8deg);
}

.service-card-body {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-inline-size: 0;
    transform: translateZ(14px);
}

.service-card-title {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.service-card-desc {
    color: var(--muted);
    font-size: 11.5px;
    line-height: 1.65;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.service-card-foot {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: auto;
    transform: translateZ(18px);
}

.service-card-price {
    color: var(--accent-2);
    font-size: 11.5px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    overflow-wrap: anywhere;
}

.service-card-arrow {
    inline-size: 26px;
    block-size: 26px;
    flex-shrink: 0;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--accent-dim);
    color: var(--accent);
}
.service-card-arrow svg {
    inline-size: 13px;
    block-size: 13px;
}
[dir="rtl"] .service-card-arrow svg {
    transform: scaleX(-1);
}

@media (hover:hover) {
    .service-card:hover {
        --lift: -4px;
        border-color: var(--accent);
        box-shadow: 0 22px 40px -24px var(--accent), var(--shadow);
    }
    .service-card:hover .service-card-glow {
        opacity: .16;
    }
    .service-card:hover .service-card-icon {
        transform: translateZ(34px) rotate(-3deg);
    }
}

.service-card:active {
    --lift: 1px;
}

.coming-soon-card {
    text-align: center;
}

.coming-soon-icon {
    font-size: 48px;
    display: block;
    margin-bottom: 10px;
}

/* --------------------------------------------------------------------- */
/* File inputs (project files, payment receipts)                         */
/* --------------------------------------------------------------------- */
.order-form input[type="file"] {
    padding: 10px;
    border-radius: var(--radius-sm);
    border: 1px dashed var(--border);
    background: var(--bg);
    color: var(--muted);
    font-size: 13px;
    font-family: var(--font);
}

.order-form input[type="file"]::file-selector-button {
    background: var(--accent);
    color: var(--on-accent);
    border: none;
    border-radius: 6px;
    padding: 6px 12px;
    margin-inline-end: 10px;
    cursor: pointer;
    font-family: var(--font);
    font-size: 12px;
}

body { line-height: 1.65; }
body, .card, .navbar, .lang-menu, .theme-toggle, .lang-toggle,
.order-form input, .order-form select, .order-form textarea, .pricing-table,
.address-box, .status-box, .status-badge, .flash-message {
    transition: background-color .18s ease, color .18s ease, border-color .18s ease;
}
a { color: var(--accent); }
img { object-fit: cover; }
button, input, select, textarea { font: inherit; }
button, .btn, .landing-big-btn, .back-link, .admin-tab,
.navbar-right a, .navbar-brand, .scroll-hint, .auth-switch a,
.pricing-note a, .footer-note a { min-block-size: 44px; }
button { touch-action: manipulation; }
button, .btn, .landing-big-btn { position: relative; }
:where(a,button,input,select,textarea,[tabindex]):focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    box-shadow: var(--focus-ring);
}
::selection { background: var(--accent); color: var(--on-accent); }
html { scrollbar-width: thin; scrollbar-color: var(--accent) var(--bg); }
.navbar { gap: 8px; border-radius: var(--radius-md); }
.navbar-brand { flex-shrink: 0; max-inline-size: 42%; overflow-wrap: anywhere; }
.navbar-right { min-inline-size: 0; gap: 4px 10px; }
.navbar-right > a { display: inline-flex; align-items: center; }
.navbar-logo { flex-shrink: 0; }
.navbar.is-scrolled { background: var(--nav-glass); box-shadow: var(--shadow); }
@supports (backdrop-filter: blur(8px)) {
    .navbar.is-scrolled { backdrop-filter: blur(8px); }
}
.lang-menu a { display: flex; align-items: center; }
.lang-toggle, .theme-toggle {
    inline-size: 44px; block-size: 44px;
    display: inline-flex; align-items: center; justify-content: center;
    padding: 0; border: 1px solid var(--border);
    border-radius: var(--radius-sm); background: var(--surface);
    color: var(--text); cursor: pointer; flex-shrink: 0;
}
.theme-toggle svg { inline-size: 21px; block-size: 21px; grid-area: 1/1; }
.theme-toggle { display: grid; }
.theme-sun, .theme-moon { transition: transform .25s var(--motion-ease), opacity .2s ease; }
.theme-sun { opacity: 1; transform: rotate(0) scale(1); }
.theme-moon { opacity: 0; transform: rotate(-35deg) scale(.5); }
[data-theme="light"] .theme-sun { opacity: 0; transform: rotate(35deg) scale(.5); }
[data-theme="light"] .theme-moon { opacity: 1; transform: rotate(0) scale(1); }
.container h1 { overflow-wrap: anywhere; line-height: 1.5; }
.auth-card h1, .order-heading { font-size: 1.5em; margin-block: 0 .83em; }
.card { box-shadow: var(--shadow); }
.service-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
.service-card { min-inline-size: 0; overflow-wrap: anywhere; box-shadow: var(--shadow); }
.service-card-icon { display: grid; place-items: center; flex-shrink: 0; }
.order-form > :where(input,select,textarea) { inline-size: 100%; min-inline-size: 0; min-block-size: 44px; }
.order-form input, .order-form select { font-size: 16px; }
.order-form textarea { font-size: 16px; line-height: 1.7; }
.order-form :where(input,select,textarea):focus { border-color: var(--accent); box-shadow: var(--focus-ring); }
.order-form label:has(+ :focus) { color: var(--accent); }
.order-form input[type="file"] { padding: 8px; line-height: 2; }
.order-form input[type="file"]::file-selector-button { min-block-size: 44px; margin-inline-end: 8px; }
.address-box > span { min-inline-size: 0; overflow-wrap: anywhere; unicode-bidi: plaintext; }
.address-box button { min-inline-size: 44px; }
.address-box, .price-preview { border-color: var(--border); }
.profile-row, .admin-order-header, .ticket-item-top, .order-item { gap: 8px; min-inline-size: 0; }
.profile-row, .admin-order-header, .ticket-item-top { flex-wrap: wrap; }
.profile-label { flex-shrink: 0; }
.profile-value { min-inline-size: 0; overflow-wrap: anywhere; text-align: end; }
.order-item > div { min-inline-size: 0; overflow-wrap: anywhere; }
.order-item { flex-wrap: wrap; }
.status-badge { max-inline-size: 100%; white-space: normal; flex-shrink: 0; }
.ticket-message, .ticket-reply { overflow-wrap: anywhere; }
.pricing-table { table-layout: fixed; }
.pricing-table :where(th,td) { overflow-wrap: anywhere; vertical-align: top; }
.admin-tabs { gap: 8px; }
.admin-tab { min-inline-size: 0; overflow-wrap: anywhere; font-size: 13px; }
.admin-tab.active { box-shadow: 0 1px 0 var(--accent); }
.footer-note a, .auth-switch a, .pricing-note a { display: inline-flex; align-items: center; }
.flash-message { position: relative; padding-inline-end: 54px; overflow-wrap: anywhere; }
.flash-close {
    position: absolute; inset-block-start: 0; inset-inline-end: 2px;
    inline-size: 44px; block-size: 44px; border: 0;
    background: transparent; color: inherit; cursor: pointer; font-size: 22px;
}
.flash-message.is-dismissed { opacity: 0; transform: translateX(calc(12px * var(--slide-direction))); }
.fj-toast {
    position: fixed; inset-block-end: 24px; inset-inline-start: 50%;
    transform: translateX(-50%); z-index: 50; max-inline-size: calc(100% - 32px);
    padding: 10px 20px; border: 1px solid var(--border);
    border-radius: var(--radius-sm); background: var(--surface-2);
    color: var(--text); box-shadow: var(--shadow); overflow-wrap: anywhere;
}
.fj-toast[hidden] { display: none; }
.copy-success { outline: 2px solid var(--success); outline-offset: 2px; }
.scroll-progress {
    position: fixed; inset-block-start: 0; inset-inline-start: 0;
    inline-size: 100%; block-size: 2px; z-index: 30;
    background: linear-gradient(90deg,var(--accent),var(--accent-2));
    transform: scaleX(0); transform-origin: left;
}
[dir="rtl"] .scroll-progress { transform-origin: right; }
.back-to-top {
    position: fixed; inset-inline-end: max(16px,calc((100vw - 540px)/2));
    inset-block-end: 20px; inline-size: 44px; block-size: 44px;
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    background: var(--surface-2); color: var(--accent); box-shadow: var(--shadow);
    cursor: pointer; display: grid; place-items: center;
    opacity: 0; transform: translateY(8px); visibility: hidden;
    transition: opacity .2s ease, transform .2s ease;
}
.back-to-top.is-visible { opacity: 1; transform: none; visibility: visible; }
.back-to-top svg { inline-size: 20px; block-size: 20px; }
:where(.btn-channel,.landing-btn-login,.order-form button,.btn-confirm,.btn-primary-blue) { overflow: hidden; isolation: isolate; }
:where(.btn-channel,.landing-btn-login,.order-form button,.btn-confirm,.btn-primary-blue)::before {
    content: ""; pointer-events: none; position: absolute; inset: 0;
    background: linear-gradient(110deg,transparent 30%,var(--shine) 50%,transparent 70%);
    transform: translateX(-130%);
}
.fj-ripple {
    position: absolute; pointer-events: none; inset: 0; border-radius: inherit;
    background: var(--shine); animation: fj-ripple .42s var(--motion-ease) forwards;
}
@keyframes fj-ripple { from { opacity: .8; transform: scale(.25); } to { opacity: 0; transform: scale(1.2); } }
@keyframes fj-shine { to { transform: translateX(130%); } }
@keyframes fj-price { 50% { opacity: .75; transform: scale(1.035); } }
@keyframes fj-enter { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes fj-spinner { to { transform: rotate(360deg); } }
.price-pulse { display: inline-block; animation: fj-price .28s ease; }
.auth-card { animation: fj-enter .4s var(--motion-ease); }
.fj-toast:not([hidden]) { animation: fj-enter .2s ease; }
.fj-loading { opacity: .8; }
.fj-loading::after {
    content: ""; display: inline-block; inline-size: 12px; block-size: 12px;
    border: 2px solid currentColor; border-inline-end-color: transparent;
    border-radius: 50%; margin-inline-start: 8px; animation: fj-spinner .7s linear infinite;
}
:where(button,.btn,.landing-big-btn):active { transform: scale(.985); }
@media (hover:hover) {
    .navbar-brand:hover .navbar-logo, .logo:hover { box-shadow: 0 0 0 2px var(--accent), var(--brand-glow); }
    .navbar-right > a:hover { text-decoration: underline; text-underline-offset: 5px; }
    .theme-toggle:hover, .lang-toggle:hover { border-color: var(--accent); background: var(--accent-dim); }
    :where(.btn-channel,.landing-btn-login,.order-form button,.btn-confirm,.btn-primary-blue):hover::before { animation: fj-shine .65s ease; }
    :where(.btn-channel,.landing-btn-login,.btn-confirm,.btn-primary-blue):hover { box-shadow: var(--button-shadow); }
    .card:not(.admin-order-card):hover { border-color: var(--border); }
    .service-card:hover .service-card-arrow { background: var(--accent); color: var(--on-accent); }
    .pricing-table tbody tr:hover { background: var(--accent-dim); }
    .order-item:hover { transform: translateY(-1px); }
    .order-item { transition: transform .18s ease, border-color .18s ease; }
    .order-form input[type="file"]:hover { border-color: var(--accent); }
}
@media (max-width:400px) {
    .navbar-right { gap: 2px 8px; font-size: 12px; }
    .navbar-brand { gap: 6px; font-size: 13px; }
    .card { padding: 18px; }
    .pricing-table :where(th,td) { padding: 10px 8px; font-size: 12px; }
    .admin-tab { font-size: 12px; }
    .service-card { padding: 12px; gap: 8px; }
}
@media (prefers-reduced-motion:reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation: none !important; transition: none !important;
    }
    .reveal, .reveal.is-visible { opacity: 1; transform: none; }
}
@media print {
    .theme-toggle,.lang-switcher,.scroll-progress,.back-to-top,.fj-toast { display: none; }
    .reveal { opacity: 1; transform: none; }
}

.fj-copy-buffer { position: fixed; inset-block-start: 0; inset-inline-start: 0; inline-size: 1px; block-size: 1px; opacity: 0; pointer-events: none; }

/* ==========================================================================
   FJ Digital — hub, hero, telegram strip and scroll parallax
   Loaded for every page but only the classes present are styled.
   ========================================================================== */

/* Screen-reader-only helper (used by the 3D hero label). */
.sr-only {
    position: absolute;
    inline-size: 1px;
    block-size: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Wider layout for the services hub only; every other page keeps 480px. */
body.page-wide .container,
body.page-wide .navbar {
    max-inline-size: 1000px;
}

.section-heading {
    margin: 26px 0 12px;
    font-size: 16px;
    font-weight: 700;
}

/* --------------------------------------------------------------------------
   Landing hero
   -------------------------------------------------------------------------- */
.hero {
    text-align: center;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 14px 0 0;
    padding: 5px 12px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
    color: var(--accent-2);
    font-size: 11.5px;
    font-weight: 700;
}

.hero-scene {
    position: relative;
    inline-size: 100%;
    aspect-ratio: 4 / 3;
    max-block-size: 340px;
    margin: 18px auto 4px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background:
        radial-gradient(120% 90% at 50% 0%, var(--accent-dim), transparent 62%),
        var(--surface);
    overflow: hidden;
    isolation: isolate;
}

.hero-canvas,
.hero-fallback {
    position: absolute;
    inset: 0;
    inline-size: 100%;
    block-size: 100%;
    display: block;
}

.hero-canvas {
    opacity: 0;
    transition: opacity .5s ease;
}

.hero-fallback {
    padding: 6px;
}

.hero-scene.is-live .hero-canvas { opacity: 1; }
.hero-scene.is-live .hero-fallback { opacity: 0; visibility: hidden; }

.hero-actions {
    margin-top: 16px;
}

.hero-note {
    margin: 2px 0 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.7;
}

/* --------------------------------------------------------------------------
   Three-step strip
   -------------------------------------------------------------------------- */
.steps {
    margin: 28px 0 8px;
}

.steps-title {
    margin: 0 0 12px;
    font-size: 16px;
    text-align: center;
}

.steps-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 9px;
}

.step {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    gap: 11px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface);
}

.step-num {
    inline-size: 30px;
    block-size: 30px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: var(--accent-dim);
    border: 1px solid var(--border);
    color: var(--accent);
    font-size: 13px;
    font-weight: 800;
}

.step-body { min-inline-size: 0; }

.step-title {
    display: block;
    font-size: 13.5px;
    font-weight: 700;
}

.step-desc {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: 12.5px;
    line-height: 1.7;
}

/* --------------------------------------------------------------------------
   Telegram bot strip (hub, about, contact)
   -------------------------------------------------------------------------- */
.bot-strip {
    margin: 30px 0 10px;
}

.bot-strip-head {
    margin-bottom: 12px;
}

.bot-strip-title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
}

.bot-strip-sub {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 12.5px;
    line-height: 1.7;
}

.bot-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
}

.bot-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    gap: 2px 12px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface);
}

.bot-icon {
    inline-size: 38px;
    block-size: 38px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: var(--accent-dim);
    border: 1px solid var(--border);
    color: var(--accent);
}

.bot-icon-accent-2 { color: var(--accent-2); }

.bot-icon svg {
    inline-size: 19px;
    block-size: 19px;
}

.bot-body {
    min-inline-size: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.bot-name {
    display: block;
    font-size: 13.5px;
    font-weight: 700;
    line-height: 1.5;
}

.bot-desc {
    margin: 0;
    color: var(--muted);
    font-size: 12.5px;
    line-height: 1.7;
}

.bot-link {
    grid-column: 1 / -1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-block-size: 44px;
    margin-top: 10px;
    padding: 9px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg);
    color: var(--text);
    font-size: 12.5px;
    font-weight: 700;
    text-decoration: none;
    transition: border-color .2s ease, background .2s ease, color .2s ease;
}

.bot-link svg {
    inline-size: 14px;
    block-size: 14px;
    color: var(--accent);
}

@media (hover:hover) {
    .bot-link:hover {
        border-color: var(--accent);
        background: var(--accent-dim);
        color: var(--accent);
    }
}

/* --------------------------------------------------------------------------
   About page
   -------------------------------------------------------------------------- */
.about-hero {
    position: relative;
    margin-bottom: 18px;
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
    overflow: hidden;
    isolation: isolate;
}

.about-orb {
    position: absolute;
    inset-inline-end: -30px;
    inset-block-start: -34px;
    inline-size: 190px;
    opacity: .45;
    pointer-events: none;
    z-index: 0;
}

.about-orb svg,
.ornament-layer svg {
    inline-size: 100%;
    block-size: auto;
    display: block;
}

.about-hero .about-intro-text {
    position: relative;
    z-index: 1;
}

.about-block {
    margin-bottom: 18px;
}

.about-block h2 {
    margin: 0 0 12px;
    font-size: 17px;
    font-weight: 700;
}

.about-service-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 9px;
}

.about-service {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 11px;
    padding: 11px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg);
}

.about-service-icon {
    font-size: 20px;
    line-height: 1;
}

.about-service-text {
    min-inline-size: 0;
}

.about-service-title {
    display: block;
    font-size: 13px;
    font-weight: 700;
}

.about-service-desc {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.6;
}

.about-service-price {
    color: var(--accent-2);
    font-size: 11.5px;
    font-weight: 700;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

@media (max-width: 430px) {
    .about-service {
        grid-template-columns: auto minmax(0, 1fr);
    }
    .about-service-price {
        grid-column: 2;
        margin-top: 2px;
    }
}

.process-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0;
}

.process-step {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 12px;
    padding-block: 12px;
}

.process-step::before {
    content: "";
    position: absolute;
    inset-inline-start: 14px;
    inset-block-start: 0;
    inset-block-end: 0;
    inline-size: 1px;
    background: var(--border);
}

.process-step:first-child::before { inset-block-start: 18px; }
.process-step:last-child::before { inset-block-end: calc(100% - 26px); }

.process-num {
    position: relative;
    z-index: 1;
    inline-size: 29px;
    block-size: 29px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--surface-2);
    border: 1px solid var(--border);
    color: var(--accent);
    font-size: 12px;
    font-weight: 800;
}

.process-body { min-inline-size: 0; padding-block-start: 3px; }

.process-title {
    display: block;
    font-size: 13.5px;
    font-weight: 700;
}

.process-desc {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: 12.5px;
    line-height: 1.7;
}

.why-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 8px;
}

.why-item {
    position: relative;
    padding: 11px 14px;
    padding-inline-start: 38px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    font-size: 13px;
    line-height: 1.75;
}

.why-item::before {
    content: "";
    position: absolute;
    inset-inline-start: 14px;
    inset-block-start: 16px;
    inline-size: 12px;
    block-size: 7px;
    border-inline-start: 2px solid var(--accent-2);
    border-block-end: 2px solid var(--accent-2);
    transform: rotate(-45deg);
}

.faq-list {
    display: grid;
    gap: 8px;
}

.faq-item {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    padding-inline: 14px;
}

.faq-item summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-block-size: 44px;
    padding-block: 12px;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
    content: "+";
    color: var(--accent);
    font-size: 18px;
    line-height: 1;
    transition: transform .2s ease;
}

.faq-item[open] summary::after { transform: rotate(45deg); }

.faq-answer {
    margin: 0 0 14px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.8;
}

.about-contact-links {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}

/* Decorative parallax band between about sections. */
.ornament-band {
    position: relative;
    block-size: 96px;
    margin: 4px 0 20px;
    border: 1px dashed var(--border);
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, transparent, var(--accent-dim));
    overflow: hidden;
}

.ornament-layer {
    position: absolute;
    will-change: transform;
}

.ornament-back {
    inline-size: 150px;
    inset-inline-start: 6%;
    inset-block-start: 2px;
    opacity: .55;
}

.ornament-front {
    inline-size: 116px;
    inset-inline-end: 12%;
    inset-block-start: 34px;
    opacity: .8;
}

/* --------------------------------------------------------------------------
   Desktop / tablet tuning
   -------------------------------------------------------------------------- */
@media (min-width: 640px) {
    .bot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .steps-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 820px) {
    body.page-wide .container,
    body.page-wide .navbar {
        max-inline-size: 1000px;
    }
    .service-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
    .service-card { padding: 18px; border-radius: 28px; aspect-ratio: 1 / 0.95; }
    .service-card-icon { inline-size: 58px; block-size: 58px; border-radius: 18px; font-size: 28px; }
    .service-card-title { font-size: 15px; }
    .service-card-desc { font-size: 12.5px; }
    .service-card-price { font-size: 12.5px; }
    .hub-head { margin-bottom: 28px; }
}

@media (min-width: 1100px) {
    .bot-strip { margin-top: 34px; }
}

@media (prefers-reduced-motion: reduce) {
    .service-card { transform: none !important; }
    .service-card-icon { transform: none !important; }
    .service-card-glow { display: none; }
    .parallax-layer { transform: none !important; }
}

@media print {
    .hero-scene,
    .bot-strip,
    .ornament-band,
    .about-orb { display: none !important; }
}

/* Very narrow phones: keep both columns and a one-line description readable. */
@media (max-width: 410px) {
    .service-card {
        aspect-ratio: 1 / 1.2;
        padding: 12px;
        gap: 8px;
        border-radius: 20px;
    }
    .service-card-icon {
        inline-size: 42px;
        block-size: 42px;
        border-radius: 13px;
        font-size: 20px;
    }
    .service-card-title { font-size: 12.5px; line-height: 1.4; }
    .service-card-desc { font-size: 10.5px; line-height: 1.5; }
    .service-card-price { font-size: 10.5px; }
    .service-card-arrow { inline-size: 22px; block-size: 22px; }
    .service-card-arrow svg { inline-size: 11px; block-size: 11px; }
}

/* ==========================================================================
   Two-path hub + free tools (phase 1)
   Everything below is additive: existing pages keep their layout and tokens.
   ========================================================================== */

/* --- Shared bits -------------------------------------------------------- */
.btn-primary,
.btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-block-size: 44px;
    padding: 11px 18px;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: background .2s ease, border-color .2s ease, color .2s ease, transform .15s ease;
}

.btn-primary {
    background: var(--accent);
    border: 1px solid var(--accent);
    color: var(--on-accent);
}

.btn-ghost {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
}

.btn-sm {
    min-block-size: 36px;
    padding: 6px 12px;
    font-size: 12px;
}

.btn-primary:disabled,
.btn-ghost:disabled {
    opacity: .5;
    cursor: not-allowed;
}

@media (hover:hover) {
    .btn-primary:hover:not(:disabled) { background: var(--accent-hover); border-color: var(--accent-hover); }
    .btn-ghost:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-block-size: 44px;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 12.5px;
    text-decoration: none;
    transition: color .2s ease;
}

.back-link svg { inline-size: 16px; block-size: 16px; }
[dir="rtl"] .back-link svg { transform: scaleX(-1); }

@media (hover:hover) {
    .back-link:hover { color: var(--accent); }
}

/* --- Navbar hub links --------------------------------------------------- */
.hub-nav {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 2px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
}

.hub-nav-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-block-size: 36px;
    padding: 4px 8px;
    border-radius: 999px;
    color: var(--muted) !important;
    font-size: 11.5px;
    font-weight: 700;
    text-decoration: none;
    transition: background .2s ease, color .2s ease;
}

.hub-nav-link svg { inline-size: 15px; block-size: 15px; }
.hub-nav-link span { display: none; }

@media (hover:hover) {
    .hub-nav-link:hover { background: var(--accent-dim); color: var(--accent) !important; }
}

@media (min-width: 820px) {
    body.page-wide .hub-nav-link span { display: inline; }
    body.page-wide .hub-nav-link { padding-inline: 10px; }
}

/* --- Hub: two large choices --------------------------------------------- */
.hub-paths {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
    margin-bottom: 8px;
}

.path-card {
    --tilt-x: 0deg;
    --tilt-y: 0deg;
    --lift: 0px;
    --glare-x: 50%;
    --glare-y: 0%;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-inline-size: 0;
    min-block-size: 188px;
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: 30px;
    background: var(--surface);
    color: var(--text);
    text-decoration: none;
    overflow: hidden;
    isolation: isolate;
    box-shadow: var(--shadow);
    transform-style: preserve-3d;
    transform: perspective(900px) rotateX(var(--tilt-x)) rotateY(var(--tilt-y)) translate3d(0, var(--lift), 0);
    transition: transform .35s var(--motion-ease), border-color .2s ease, box-shadow .25s ease;
}

.path-card-free {
    background:
        radial-gradient(120% 100% at 88% 0%, var(--accent-dim), transparent 62%),
        var(--surface);
}

.path-card-pro {
    background:
        radial-gradient(120% 100% at 12% 0%, rgba(34, 211, 238, .12), transparent 62%),
        var(--surface);
}

.path-glow {
    position: absolute;
    inset: -40%;
    z-index: 0;
    background: radial-gradient(circle at var(--glare-x) var(--glare-y), var(--accent) 0%, transparent 42%);
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease;
}

.path-top {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 14px;
    transform: translateZ(24px);
}

.path-icon {
    position: relative;
    z-index: 1;
    inline-size: 58px;
    block-size: 58px;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    border-radius: 18px;
    border: 1px solid var(--border);
    background: linear-gradient(152deg, var(--accent-dim), transparent 72%), var(--surface-2);
    color: var(--accent);
    box-shadow: 0 14px 26px -18px var(--accent), inset 0 1px 0 var(--shine);
    transform: translateZ(30px);
    transition: transform .35s var(--motion-ease);
}

.path-card-pro .path-icon { color: var(--accent-2); }
.path-icon svg { inline-size: 28px; block-size: 28px; }

.path-title {
    font-size: 20px;
    font-weight: 800;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.path-desc {
    position: relative;
    z-index: 1;
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.85;
    transform: translateZ(12px);
}

.path-foot {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: auto;
    transform: translateZ(20px);
}

.path-chip {
    display: inline-flex;
    align-items: center;
    padding: 5px 11px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface-2);
    color: var(--accent-2);
    font-size: 11.5px;
    font-weight: 700;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

.path-arrow {
    inline-size: 34px;
    block-size: 34px;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--accent-dim);
    color: var(--accent);
}

.path-arrow svg { inline-size: 15px; block-size: 15px; }
[dir="rtl"] .path-arrow svg { transform: scaleX(-1); }

@media (hover:hover) {
    .path-card:hover {
        --lift: -4px;
        border-color: var(--accent);
        box-shadow: 0 24px 44px -26px var(--accent), var(--shadow);
    }
    .path-card:hover .path-glow { opacity: .14; }
    .path-card:hover .path-icon { transform: translateZ(38px) rotate(-3deg); }
}

.path-card:active { --lift: 1px; }

@media (min-width: 760px) {
    .hub-paths { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
    .path-card { min-block-size: 210px; padding: 26px; }
    .path-title { font-size: 22px; }
    .path-desc { font-size: 13.5px; }
}

/* --- Landing split band ------------------------------------------------- */
.landing-split {
    margin: 30px 0 6px;
    text-align: start;
}

.landing-split-title {
    margin: 0 0 12px;
    font-size: 15px;
    font-weight: 700;
}

.landing-split-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.split-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface);
    color: var(--text);
    text-decoration: none;
    transition: border-color .2s ease, transform .2s var(--motion-ease);
}

.split-icon {
    inline-size: 34px;
    block-size: 34px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    background: var(--accent-dim);
    color: var(--accent);
    margin-bottom: 2px;
}

.split-icon-2 { color: var(--accent-2); }
.split-icon svg { inline-size: 18px; block-size: 18px; }

.split-title { font-size: 13px; font-weight: 700; }
.split-desc { color: var(--muted); font-size: 11.5px; line-height: 1.7; }

@media (hover:hover) {
    .split-card:hover { border-color: var(--accent); transform: translateY(-2px); }
}

/* --- Free tools: page width --------------------------------------------- */
body.page-free .container,
body.page-free .navbar {
    max-inline-size: 880px;
}

.free-cat-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
}

.free-cat-card {
    --tilt-x: 0deg;
    --tilt-y: 0deg;
    --glare-x: 50%;
    --glare-y: 0%;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-inline-size: 0;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 24px;
    background:
        radial-gradient(120% 90% at 88% 0%, var(--accent-dim), transparent 60%),
        var(--surface);
    color: var(--text);
    text-decoration: none;
    box-shadow: var(--shadow);
    transform-style: preserve-3d;
    transform: perspective(900px) rotateX(var(--tilt-x)) rotateY(var(--tilt-y));
    transition: transform .35s var(--motion-ease), border-color .2s ease, box-shadow .25s ease;
}

.free-cat-icon {
    inline-size: 52px;
    block-size: 52px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--accent);
    transform: translateZ(20px);
}

.free-cat-icon svg { inline-size: 25px; block-size: 25px; }

.free-cat-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-inline-size: 0;
    transform: translateZ(10px);
}

.free-cat-title { font-size: 15px; font-weight: 700; line-height: 1.5; }
.free-cat-desc { color: var(--muted); font-size: 12px; line-height: 1.75; }

.free-cat-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: auto;
}

.free-cat-count {
    color: var(--accent-2);
    font-size: 11.5px;
    font-weight: 700;
}

.free-cat-arrow {
    inline-size: 26px;
    block-size: 26px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--accent-dim);
    color: var(--accent);
}

.free-cat-arrow svg { inline-size: 13px; block-size: 13px; }
[dir="rtl"] .free-cat-arrow svg { transform: scaleX(-1); }

@media (hover:hover) {
    .free-cat-card:hover {
        border-color: var(--accent);
        box-shadow: 0 20px 38px -26px var(--accent), var(--shadow);
    }
    .free-cat-card:hover .free-cat-icon { transform: translateZ(28px) rotate(-3deg); }
}

@media (min-width: 640px) {
    .free-cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
}

@media (min-width: 1000px) {
    .free-cat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* --- Free tools: search ------------------------------------------------- */
.tool-search {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    padding: 2px 14px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
    transition: border-color .2s ease, box-shadow .2s ease;
}

.tool-search:focus-within { border-color: var(--accent); box-shadow: var(--focus-ring); }
.tool-search > svg { inline-size: 18px; block-size: 18px; flex-shrink: 0; color: var(--muted); }

.tool-search input {
    flex: 1;
    min-inline-size: 0;
    min-block-size: 44px;
    border: 0;
    background: none;
    color: var(--text);
    font-family: inherit;
    font-size: 14px;
    outline: none;
}

.tool-search input::placeholder { color: var(--muted); }
.tool-search input::-webkit-search-cancel-button { display: none; }

.tool-search-clear {
    inline-size: 30px;
    block-size: 30px;
    flex-shrink: 0;
    border: 0;
    border-radius: 50%;
    background: var(--surface-2);
    color: var(--muted);
    font-size: 17px;
    line-height: 1;
    cursor: pointer;
}

.tool-search-empty {
    margin: 0 0 14px;
    padding: 14px;
    border: 1px dashed var(--border);
    border-radius: var(--radius-md);
    color: var(--muted);
    font-size: 12.5px;
    text-align: center;
}

/* --- Free tools: cards -------------------------------------------------- */
.tool-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
}

.tool-card {
    --tilt-x: 0deg;
    --tilt-y: 0deg;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-inline-size: 0;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 22px;
    background: var(--surface);
    color: var(--text);
    text-decoration: none;
    box-shadow: var(--shadow);
    transform-style: preserve-3d;
    transform: perspective(900px) rotateX(var(--tilt-x)) rotateY(var(--tilt-y));
    transition: transform .35s var(--motion-ease), border-color .2s ease, box-shadow .25s ease;
}

.tool-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 2px;
}

.tool-icon {
    inline-size: 42px;
    block-size: 42px;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: var(--accent-dim);
    color: var(--accent);
}

.tool-icon svg { inline-size: 21px; block-size: 21px; }

.tool-title { font-size: 14px; font-weight: 700; line-height: 1.55; overflow-wrap: anywhere; }
.tool-desc { color: var(--muted); font-size: 12px; line-height: 1.75; }

.tool-card-soon { opacity: .74; }
.tool-card-soon .tool-icon { background: var(--muted-dim); color: var(--muted); }

@media (hover:hover) {
    .tool-card:hover { border-color: var(--accent); box-shadow: 0 18px 34px -24px var(--accent), var(--shadow); }
    .tool-card:hover .tool-icon { border-color: var(--accent); }
}

.tool-card:focus-visible,
.free-cat-card:focus-visible,
.path-card:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

@media (min-width: 640px) {
    .tool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
}

@media (min-width: 1000px) {
    .tool-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* --- Status badges ------------------------------------------------------ */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
    padding: 3px 9px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface-2);
    color: var(--muted);
    font-size: 10.5px;
    font-weight: 700;
    line-height: 1.7;
    white-space: nowrap;
}

.status-badge::before {
    content: "";
    inline-size: 6px;
    block-size: 6px;
    border-radius: 50%;
    background: currentColor;
}

.status-badge-ready { color: var(--success); border-color: var(--success); background: var(--success-dim); }
.status-badge-basic { color: var(--warning); border-color: var(--warning); background: var(--warning-dim); }
.status-badge-soon { color: var(--muted); }

/* --- Privacy bar -------------------------------------------------------- */
.privacy-bar {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 24px 0 0;
    padding: 12px 14px;
    border: 1px dashed var(--border);
    border-radius: var(--radius-md);
    color: var(--muted);
    font-size: 11.5px;
    line-height: 1.85;
}

.privacy-bar svg {
    inline-size: 16px;
    block-size: 16px;
    flex-shrink: 0;
    margin-top: 2px;
    color: var(--accent-2);
}

/* --- Tool page ---------------------------------------------------------- */
.tool-head {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 18px;
}

.tool-head-icon {
    inline-size: 54px;
    block-size: 54px;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--accent-dim);
    color: var(--accent);
}

.tool-head-icon svg { inline-size: 26px; block-size: 26px; }
.tool-head-text { min-inline-size: 0; }
.tool-head-text .hub-title { font-size: clamp(19px, 4vw, 23px); margin: 8px 0 4px; }
.tool-head-text .hub-sub { font-size: 13px; }

.tool-notice {
    margin-bottom: 18px;
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background:
        radial-gradient(120% 100% at 100% 0%, var(--accent-dim), transparent 60%),
        var(--surface);
}

.tool-notice-basic {
    background:
        radial-gradient(120% 100% at 100% 0%, var(--warning-dim), transparent 60%),
        var(--surface);
}

.tool-notice-title { margin: 0 0 8px; font-size: 16px; font-weight: 700; }

.tool-notice-text {
    margin: 0 0 10px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.9;
}

.tool-notice-cta { margin-top: 6px; }

/* --- Tool shell --------------------------------------------------------- */
.tool-shell { margin-bottom: 6px; }

.tool-drop {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 30px 16px;
    border: 1.5px dashed var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
    text-align: center;
    cursor: pointer;
    transition: border-color .2s ease, background .2s ease;
}

.tool-drop:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.tool-drop.is-over { border-color: var(--accent); background: var(--accent-dim); }

.tool-drop-icon { inline-size: 34px; block-size: 34px; color: var(--accent); margin-bottom: 2px; }
.tool-drop-title { font-size: 13.5px; font-weight: 700; }
.tool-drop-hint { color: var(--muted); font-size: 12px; }

.tool-files {
    list-style: none;
    margin: 12px 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tool-file-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    font-size: 12.5px;
}

.tool-file-name {
    flex: 1;
    min-inline-size: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tool-file-size { color: var(--muted); font-size: 11.5px; flex-shrink: 0; }

.tool-file-remove {
    inline-size: 30px;
    block-size: 30px;
    flex-shrink: 0;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: var(--bg);
    color: var(--muted);
    font-size: 15px;
    line-height: 1;
    cursor: pointer;
}

.tool-settings { margin-top: 14px; }

.tool-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.tool-progress { margin-top: 16px; }

.tool-progress-track {
    block-size: 8px;
    border-radius: 999px;
    background: var(--surface-2);
    overflow: hidden;
}

.tool-progress-bar {
    display: block;
    block-size: 100%;
    inline-size: 0;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    transition: inline-size .2s ease;
}

.tool-progress-label {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 12px;
}

.tool-results { margin-top: 20px; }

.tool-results-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.tool-results-title { margin: 0; font-size: 14px; font-weight: 700; }

.tool-result-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tool-result {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
}

.tool-result-thumb {
    inline-size: 44px;
    block-size: 44px;
    flex-shrink: 0;
    border-radius: 8px;
    object-fit: cover;
    background: var(--surface-2);
}

.tool-result-body {
    flex: 1;
    min-inline-size: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.tool-result-name {
    font-size: 12.5px;
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tool-result-meta { color: var(--muted); font-size: 11px; }

.tool-error {
    margin-top: 16px;
    padding: 11px 14px;
    border: 1px solid var(--danger);
    border-radius: var(--radius-sm);
    background: var(--danger-dim);
    color: var(--text);
    font-size: 12.5px;
    line-height: 1.8;
}

.tool-shell.is-running .tool-drop { pointer-events: none; opacity: .6; }

/* --- About: free tools block ------------------------------------------- */
.about-free-cta { margin-top: 14px; }

@media (prefers-reduced-motion: reduce) {
    .path-card, .free-cat-card, .tool-card { transform: none !important; }
    .path-glow { display: none; }
}

/* Theme + language controls live in their own group so the links row can
   wrap on its own on small screens instead of scattering into three rows. */
.nav-tools {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.navbar { justify-content: flex-start; gap: 6px; }
.navbar-right {
    flex: 0 1 auto;
    flex-wrap: nowrap;
    margin-inline-start: auto;
    justify-content: flex-end;
    gap: 4px 9px;
    font-size: 12.5px;
}
.navbar-right > a { white-space: nowrap; }

@media (max-width: 620px) {
    .navbar {
        flex-wrap: wrap;
        row-gap: 8px;
    }
    .navbar-brand { max-inline-size: none; }
    .navbar-right {
        order: 3;
        flex: 1 1 100%;
        flex-wrap: wrap;
        margin-inline-start: 0;
        justify-content: flex-start;
        gap: 6px 12px;
        font-size: 12.5px;
    }
    .nav-tools { order: 2; margin-inline-start: auto; }
}

/* Brand must never wrap or clip: the logo keeps its frame, the wordmark
   stays on one line, and the navbar links give way instead. */
.navbar-brand > span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Navbar fit: the wordmark keeps its natural width, spacing tightens just
   enough that seven controls still sit on one row inside the 480px bar. */
.navbar-brand { font-size: 14px; }
.navbar-brand > span { flex: 0 0 auto; }
.navbar-right { gap: 4px 8px; }
.nav-tools { gap: 8px; }
@media (min-width: 820px) {
    body.page-wide .navbar-brand { font-size: 15px; }
}

/* `hidden` must win over the flex/grid display of the components it toggles. */
[hidden] { display: none !important; }

/* ==========================================================================
   Phase 2 — tool settings panel, file rows with thumbnails and reordering
   ========================================================================== */
.tool-file-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1 1 auto;
    min-inline-size: 0;
}

.tool-file-body .tool-file-name { flex: none; }

.tool-file-thumb {
    inline-size: 34px;
    block-size: 46px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: #fff;
    flex: 0 0 auto;
}

.tool-file-grip {
    color: var(--muted);
    font-size: 16px;
    line-height: 1;
    cursor: grab;
    user-select: none;
    flex: 0 0 auto;
}

.tool-file-item.is-dragging { opacity: .4; }

.tool-file-moves {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 0 0 auto;
}

.tool-file-move {
    inline-size: 22px;
    block-size: 18px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 5px;
    background: var(--bg);
    color: var(--muted);
    font-size: 11px;
    line-height: 1;
    cursor: pointer;
}

.tool-file-move:hover:not(:disabled) { color: var(--text); border-color: var(--accent); }
.tool-file-move:disabled { opacity: .35; cursor: default; }

/* --- settings ------------------------------------------------------------ */
.tool-settings {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0 18px;
    margin-top: 16px;
}

@media (min-width: 720px) {
    .tool-settings { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .tool-settings .tool-field.has-hint { grid-column: 1 / -1; }
}

.tool-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 14px;
    min-inline-size: 0;
}

.tool-label {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text);
    text-align: start;
}

.tool-input {
    appearance: none;
    -webkit-appearance: none;
    inline-size: 100%;
    padding: 9px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg);
    color: var(--text);
    font: inherit;
    font-size: 13px;
    text-align: start;
}

.tool-input:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 1px;
}

select.tool-input {
    background-image: linear-gradient(45deg, transparent 50%, currentColor 50%),
                      linear-gradient(135deg, currentColor 50%, transparent 50%);
    background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%;
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
    padding-inline-end: 30px;
}

html[dir="rtl"] select.tool-input {
    background-position: 16px 50%, 11px 50%;
    padding-inline-end: 12px;
    padding-inline-start: 30px;
}

.tool-range-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.tool-input.tool-range {
    padding: 0;
    border: 0;
    background: transparent;
    accent-color: var(--accent);
    block-size: 24px;
}

.tool-range-value {
    font-size: 12px;
    color: var(--muted);
    min-inline-size: 56px;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.tool-check {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 12.5px;
    cursor: pointer;
    padding-block: 4px;
}

.tool-check input {
    inline-size: 18px;
    block-size: 18px;
    accent-color: var(--accent);
    flex: 0 0 auto;
}

.tool-input.tool-color {
    padding: 4px;
    block-size: 40px;
    cursor: pointer;
}

.tool-hint {
    margin: 0;
    font-size: 11.5px;
    line-height: 1.7;
    color: var(--muted);
    text-align: start;
}

/* --- result extras ------------------------------------------------------- */
.tool-result-thumb {
    inline-size: 40px;
    block-size: 40px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: #fff;
    flex: 0 0 auto;
}

.tool-text-output {
    inline-size: 100%;
    min-block-size: 180px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--bg);
    color: var(--text);
    font-family: inherit;
    font-size: 13px;
    line-height: 1.9;
    resize: vertical;
    text-align: start;
}

.tool-inline-note {
    margin: 10px 0 0;
    font-size: 12px;
    color: var(--muted);
    line-height: 1.8;
}

.tool-checkbox-warn {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin-top: 14px;
    padding: 11px 13px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--accent-dim, rgba(120, 120, 255, .07));
    font-size: 12.5px;
    line-height: 1.8;
    cursor: pointer;
}

.tool-checkbox-warn input {
    margin-block-start: 3px;
    inline-size: 17px;
    block-size: 17px;
    accent-color: var(--accent);
    flex: 0 0 auto;
}

.tool-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
    gap: 10px;
    margin-top: 12px;
}

.tool-preview-cell {
    position: relative;
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    aspect-ratio: 3 / 4;
}

.tool-preview-cell img {
    inline-size: 100%;
    block-size: 100%;
    object-fit: contain;
    display: block;
}

.tool-preview-cell .tool-preview-label {
    position: absolute;
    inset-block-end: 0;
    inset-inline: 0;
    padding: 3px 6px;
    font-size: 10.5px;
    background: rgba(0, 0, 0, .62);
    color: #fff;
    text-align: center;
}

.tool-preview-cell.is-removed { opacity: .35; }
.tool-preview-cell.is-removed::after {
    content: "";
    position: absolute;
    inset-block-start: 50%;
    inset-inline: 0;
    block-size: 2px;
    background: #e5484d;
    transform: rotate(-12deg);
}

.tool-canvas-wrap {
    position: relative;
    display: inline-block;
    max-inline-size: 100%;
    line-height: 0;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: #fff;
}

.tool-canvas-wrap canvas {
    display: block;
    max-inline-size: 100%;
    block-size: auto;
    touch-action: none;
    cursor: crosshair;
}

.tool-pager {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 10px;
    font-size: 12px;
    color: var(--muted);
}

.tool-table {
    inline-size: 100%;
    border-collapse: collapse;
    font-size: 12px;
    margin-top: 10px;
    display: block;
    overflow-x: auto;
    white-space: nowrap;
}

.tool-table th,
.tool-table td {
    border: 1px solid var(--border);
    padding: 6px 9px;
    text-align: start;
}

.tool-table th { background: var(--accent-dim, rgba(120, 120, 255, .07)); font-weight: 600; }

/* page editor overlay */
.page-tools {
    position: absolute;
    inset-block-start: 4px;
    inset-inline: 4px;
    display: flex;
    gap: 3px;
    justify-content: center;
    opacity: 0;
    transition: opacity .15s ease;
}

.tool-preview-cell:hover .page-tools,
.tool-preview-cell:focus-within .page-tools { opacity: 1; }

@media (hover: none) {
    .page-tools { opacity: 1; }
}

.page-tool {
    inline-size: 22px;
    block-size: 22px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: rgba(0, 0, 0, .62);
    color: #fff;
    font-size: 12px;
    line-height: 1;
    cursor: pointer;
}

.page-tool:hover { background: rgba(0, 0, 0, .82); }

.tool-preview-placeholder {
    display: grid;
    place-items: center;
    inline-size: 100%;
    block-size: 100%;
    color: var(--muted);
    font-size: 18px;
    background: var(--bg);
}

/* watermark brush overlay */
.wm-overlay {
    position: absolute;
    inset-block-start: 0;
    inset-inline-start: 0;
    inline-size: 100%;
    block-size: 100%;
    touch-action: none;
    cursor: crosshair;
}

/* ==========================================================================
   فاز ۳ — ماشین حساب دیجیتال، ابزارهای فرم‌محور و پنل نرخ‌ها
   ========================================================================== */

/* --- چیدمان ابزارهایی که فایل نمی‌گیرند ---------------------------------- */
.tool-shell.is-uimode { padding-top: 4px; }
.tool-shell.is-uimode .tool-settings { margin-top: 0; }

.tool-ui-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}
@media (min-width: 720px) {
    .tool-ui-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .tool-ui-grid .is-wide { grid-column: 1 / -1; }
}

.tool-stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
    gap: 10px;
    margin-top: 4px;
}
.tool-stat {
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface-2);
}
.tool-stat-label {
    display: block;
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 4px;
}
.tool-stat-value {
    display: block;
    font-size: 19px;
    font-weight: 700;
    color: var(--text);
    font-variant-numeric: tabular-nums;
}

/* --- ماشین حساب --------------------------------------------------------- */
.calc { display: grid; gap: 14px; }

.calc-rows {
    display: grid;
    gap: 8px;
    position: relative;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface-2);
}
.calc-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; }

.calc-input {
    width: 100%;
    min-width: 0;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text);
    font-family: var(--font);
    font-size: 19px;
    font-variant-numeric: tabular-nums;
}
.calc-input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.calc-output { color: var(--accent-2); font-weight: 700; }

.calc-asset {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-inline-size: 210px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text);
    font-family: var(--font);
    font-size: 14px;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.calc-asset:hover { border-color: var(--accent); }
.calc-asset::after {
    content: "▾";
    color: var(--muted);
    font-size: 11px;
}

.calc-swap {
    justify-self: center;
    inline-size: 38px;
    block-size: 38px;
    display: grid;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: var(--surface);
    color: var(--accent);
    font-size: 17px;
    cursor: pointer;
    transition: transform .2s ease, border-color .2s ease;
}
.calc-swap:hover { transform: rotate(180deg); border-color: var(--accent); }

.calc-picker {
    position: relative;
    z-index: 5;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface);
    padding: 10px;
    box-shadow: var(--shadow);
}
.calc-picker[hidden] { display: none; }
.calc-picker-search {
    inline-size: 100%;
    padding: 10px 12px;
    margin-bottom: 8px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface-2);
    color: var(--text);
    font-family: var(--font);
    font-size: 14px;
}
.calc-picker-list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-block-size: 260px;
    overflow-y: auto;
    display: grid;
    gap: 2px;
}
.calc-picker-item {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 9px 10px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 14px;
}
.calc-picker-item:hover,
.calc-picker-item.is-active { background: var(--accent-dim); }
.calc-picker-id { color: var(--muted); font-size: 12px; }
.calc-picker-empty { padding: 10px; color: var(--muted); font-size: 13px; }

.calc-rate { margin: 0; font-size: 14px; color: var(--text); }
.calc-rate-sub { color: var(--muted); font-size: 13px; }
.calc-meta { margin: 0; font-size: 12px; color: var(--muted); line-height: 1.9; }
.calc-meta.is-warning { color: var(--warning); }

.calc-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

.calc-units {
    display: inline-flex;
    border: 1px solid var(--border);
    border-radius: 999px;
    overflow: hidden;
    margin-inline-start: auto;
}
.calc-unit {
    padding: 6px 14px;
    border: 0;
    background: transparent;
    color: var(--muted);
    font-family: var(--font);
    font-size: 13px;
    cursor: pointer;
}
.calc-unit.is-active { background: var(--accent-dim); color: var(--accent); }

.calc-subtitle { margin: 0 0 8px; font-size: 14px; color: var(--muted); font-weight: 600; }

.calc-history-box,
.calc-ticker-box {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface-2);
    padding: 14px;
}
.calc-history-head { display: flex; justify-content: space-between; align-items: center; }
.calc-history { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.calc-history-item {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    background: var(--surface);
    cursor: pointer;
    font-size: 13px;
}
.calc-history-item:hover { outline: 1px solid var(--accent); }
.calc-history-pair { color: var(--muted); }
.calc-history-value { font-variant-numeric: tabular-nums; }
.calc-history-empty { color: var(--muted); font-size: 13px; padding: 6px 2px; }

.calc-ticker { display: grid; gap: 4px; }
.calc-ticker-row {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 10px;
    align-items: center;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    background: var(--surface);
    font-size: 13px;
}
.calc-ticker-name { color: var(--text); }
.calc-ticker-value { font-variant-numeric: tabular-nums; color: var(--muted); }
.calc-ticker-change { font-size: 12px; min-inline-size: 62px; text-align: end; }
.calc-ticker-change.is-up { color: var(--success); }
.calc-ticker-change.is-down { color: var(--danger); }

.calc-disclaimer {
    margin: 0;
    padding: 10px 12px;
    border-inline-start: 3px solid var(--warning);
    border-radius: var(--radius-sm);
    background: var(--warning-dim);
    color: var(--muted);
    font-size: 12px;
    line-height: 1.9;
}

/* --- پنل ادمین: تب نرخ‌ها ----------------------------------------------- */
.admin-rates-grid {
    display: grid;
    gap: 18px;
    margin-block: 18px;
}
.admin-rates-card {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface);
    padding: 16px;
}
.admin-rates-card h2 { margin: 0 0 10px; font-size: 16px; }
.admin-rates-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.admin-rates-note { color: var(--muted); font-size: 12px; line-height: 1.9; margin: 8px 0 0; }
.admin-rates-code {
    display: block;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    background: var(--surface-2);
    color: var(--text);
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 12px;
    direction: ltr;
    text-align: left;
    overflow-x: auto;
}
.admin-rates-status { font-weight: 700; }
.admin-rates-status.is-ok { color: var(--success); }
.admin-rates-status.is-bad { color: var(--danger); }
.admin-rates-status.is-off { color: var(--muted); }
.admin-rates-form { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); align-items: end; }

/* --- فرم‌های داخل ابزار --------------------------------------------------- */
.tool-text-input {
    inline-size: 100%;
    min-block-size: 120px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text);
    font-family: var(--font);
    font-size: 14px;
    line-height: 1.9;
    resize: vertical;
}
.tool-text-input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }

.tool-inline-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-top: 8px;
}

.tool-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 8px;
}
.tool-tab {
    padding: 7px 14px;
    border: 1px solid transparent;
    border-radius: 999px;
    background: transparent;
    color: var(--muted);
    font-family: var(--font);
    font-size: 13px;
    cursor: pointer;
}
.tool-tab:hover { color: var(--text); }
.tool-tab.is-active {
    background: var(--accent-dim);
    border-color: var(--accent);
    color: var(--accent);
}

/* --- شمارش کلمات --------------------------------------------------------- */
.wc-top { margin-top: 14px; }
.wc-top-list { display: flex; flex-wrap: wrap; gap: 6px; }
.wc-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface-2);
    font-size: 13px;
}
.wc-chip strong { color: var(--accent); }

/* --- حجم فایل ------------------------------------------------------------ */
.fs-list { list-style: none; margin: 10px 0; padding: 0; display: grid; gap: 4px; }
.fs-item {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 7px 10px;
    border-radius: var(--radius-sm);
    background: var(--surface-2);
    font-size: 13px;
}
.fs-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fs-size { color: var(--muted); font-variant-numeric: tabular-nums; }

/* --- QR ------------------------------------------------------------------ */
.qr-preview {
    display: grid;
    gap: 12px;
    justify-items: start;
    padding: 14px;
    border: 1px dashed var(--border);
    border-radius: var(--radius-md);
    background: var(--surface-2);
}
.qr-preview canvas {
    max-inline-size: 100%;
    block-size: auto;
    border-radius: var(--radius-sm);
    background: #fff;
}

.tool-warning {
    border-inline-start: 3px solid var(--warning);
    padding-inline-start: 10px;
    color: var(--muted);
}
.texture-preview { margin-top: 14px; display: grid; gap: 8px; }
.texture-tiles {
    display: grid;
    grid-template-columns: repeat(3, 96px);
    gap: 2px;
    inline-size: max-content;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
}
.texture-tile { display: block; inline-size: 96px; block-size: 96px; }
.fbx-preview { margin-top: 14px; display: grid; gap: 8px; }
.fbx-canvas {
    inline-size: 100%;
    max-inline-size: 360px;
    block-size: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: grab;
    touch-action: none;
}
.fbx-canvas:active { cursor: grabbing; }
.extract-output { margin-top: 14px; display: grid; gap: 8px; }
