/* Adly free tools — SaaS product UI */

.public-tools-page {
    --pt-primary: #7c3aed;
    --pt-primary-hover: #6d28d9;
    --pt-primary-soft: #f5f3ff;
    --pt-ink: #0f172a;
    --pt-muted: #64748b;
    --pt-border: #e2e8f0;
    --pt-surface: #ffffff;
    --pt-canvas: #f1f5f9;
    --pt-shadow: 0 12px 40px rgba(15, 23, 42, 0.08);
    --pt-radius: 20px;
    --pt-radius-sm: 14px;
    /* Status tones (brand-aligned — quiet violet/slate, never Bootstrap green) */
    --pt-ok-bg: #f8fafc;
    --pt-ok-border: #e2e8f0;
    --pt-ok-ink: #334155;
    --pt-ok-accent: #7c3aed;
    --pt-ok-badge: #ede9fe;
    --pt-warn-bg: #faf6f1;
    --pt-warn-border: #e7d3b5;
    --pt-warn-ink: #7c4a1a;
    --pt-warn-badge: #f3e8d9;
    --pt-err-bg: #faf4f6;
    --pt-err-border: #e8c4cf;
    --pt-err-ink: #9f1239;
    --pt-err-badge: #fce7ef;
    --pt-busy-bg: #f5f3ff;
    --pt-busy-border: #ddd6fe;
    --pt-busy-ink: #5b21b6;
    --pt-miss-bg: #f8fafc;
    --pt-miss-border: #e2e8f0;
    --pt-miss-ink: #475569;
    background: var(--pt-canvas);
    font-family: 'Cairo', 'Tajawal', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

html[lang="en"] .public-tools-page,
html[lang="bg"] .public-tools-page,
html[lang="pt"] .public-tools-page {
    font-family: 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

/* Keep HTML hidden working even when other rules set display:flex/grid. */
.public-tools-page [hidden] {
    display: none !important;
}

/* Kill homepage.css `section { padding: 80px 0 }` on tools pages */
.public-tools-page section {
    padding: 0;
}

/* ── Hero ─────────────────────────────────────────────── */
.public-tools-page .public-tools-aurora {
    padding-bottom: 40px;
}

.public-tools-hero-wrap {
    position: relative;
    z-index: 2;
    padding-top: 8px;
    padding-bottom: 8px;
}

.public-tools-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    font-size: 13px;
    color: rgba(226, 232, 240, 0.78);
    margin-bottom: 20px;
}

.public-tools-breadcrumb a {
    color: #ddd6fe;
    text-decoration: none;
    font-weight: 500;
}

.public-tools-breadcrumb a:hover {
    color: #fff;
}

.public-tools-hero {
    max-width: 720px;
}

.public-tools-kicker {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #4c1d95;
    background: #f3e8ff;
    border: 1px solid #e9d5ff;
    border-radius: 999px;
    padding: 6px 12px;
    margin-bottom: 14px;
}

.public-tools-hero h1 {
    font-size: clamp(1.75rem, 3.4vw, 2.5rem);
    font-weight: 800;
    line-height: 1.25;
    color: #f8fafc;
    margin-bottom: 14px;
}

.public-tools-hero-sub {
    font-size: 1.125rem;
    color: rgba(241, 245, 249, 0.92);
    line-height: 1.7;
    margin-bottom: 12px;
}

.public-tools-trust {
    font-size: 0.9375rem;
    color: rgba(196, 181, 253, 0.95);
    margin-bottom: 16px;
}

.public-tools-hero-pills {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0;
    margin: 18px 0 0;
}

.public-tools-hero-pills li {
    font-size: 12px;
    font-weight: 500;
    color: #e9d5ff;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(233, 213, 255, 0.22);
    border-radius: 999px;
    padding: 6px 12px;
}

/* ── Main band ────────────────────────────────────────── */
.public-tools-main {
    position: relative;
    z-index: 1;
    background: var(--pt-canvas);
    padding: 36px 0 64px;
    color: var(--pt-ink);
}

.public-tools-intro {
    margin-bottom: 28px;
    max-width: 820px;
}

.public-tools-intro p {
    margin-bottom: 12px;
    color: #334155;
    line-height: 1.75;
}

.public-tools-intro p:last-child {
    margin-bottom: 0;
}

/* ── Hub cards ────────────────────────────────────────── */
.public-tools-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin: 8px 0 0;
}

.public-tools-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 22px;
    border-radius: var(--pt-radius-sm);
    border: 1px solid var(--pt-border);
    background: var(--pt-surface);
    text-decoration: none;
    color: inherit;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.public-tools-card:hover {
    transform: translateY(-2px);
    border-color: #c4b5fd;
    box-shadow: var(--pt-shadow);
}

.public-tools-card h2 {
    font-size: 1.125rem;
    font-weight: 800;
    line-height: 1.3;
    margin: 0;
}

.public-tools-card p {
    color: var(--pt-muted);
    font-size: 0.9375rem;
    line-height: 1.6;
    flex: 1;
    margin: 0;
}

.public-tools-card-cta {
    font-weight: 700;
    color: var(--pt-primary);
    font-size: 0.875rem;
}

.public-tools-card-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--pt-primary-soft);
    color: var(--pt-primary);
    display: grid;
    place-items: center;
    font-size: 15px;
    font-weight: 800;
    /* Force monochrome brand color — never system emoji colors */
    -webkit-text-fill-color: var(--pt-primary);
    filter: none;
}

.public-tools-card-icon[data-icon="qr"]::before { content: "QR"; font-size: 11px; }
.public-tools-card-icon[data-icon="palette"]::before { content: "●"; }
.public-tools-card-icon[data-icon="compress"]::before { content: "↓"; }
.public-tools-card-icon[data-icon="convert"]::before { content: "⇄"; }
.public-tools-card-icon[data-icon="resize"]::before { content: "⤢"; }
.public-tools-card-icon[data-icon="textimg"]::before { content: "نص"; font-size: 9px; }
.public-tools-card-icon[data-icon="bg"]::before { content: "◈"; }
.public-tools-card-icon[data-icon="whitebg"]::before { content: "أبيض"; font-size: 8px; }
.public-tools-card-icon[data-icon="enhance"]::before { content: "✦"; }
.public-tools-card-icon[data-icon="object"]::before { content: "⌀"; }
.public-tools-card-icon[data-icon="adsize"]::before { content: "▣"; }
.public-tools-card-icon[data-icon="bizcard"]::before { content: "▭"; }
.public-tools-card-icon[data-icon="mp4compress"]::before { content: "▼"; }
.public-tools-card-icon[data-icon="mp4gif"]::before { content: "▶"; }
.public-tools-card-icon[data-icon="gifmp4"]::before { content: "▷"; }
.public-tools-card-icon[data-icon="optgif"]::before { content: "◎"; }
.public-tools-card-icon[data-icon="gifedit"]::before { content: "✎"; }
.public-tools-card-icon[data-icon="acapella"]::before { content: "♪"; }
.public-tools-card-icon[data-icon="tts"]::before { content: "صوت"; font-size: 9px; }
.public-tools-card-icon[data-icon="extractmusic"]::before { content: "♫"; }
.public-tools-card-icon[data-icon="article"]::before { content: "¶"; }
.public-tools-card-icon[data-icon="translator"]::before { content: "⇋"; }
.public-tools-card-icon[data-icon="seoopt"]::before { content: "⌕"; }
.public-tools-card-icon[data-icon="logo"]::before { content: "◆"; }
.public-tools-card-icon[data-icon="menu"]::before { content: "منيو"; font-size: 8px; }
.public-tools-card-icon[data-icon="adcaption"]::before { content: "✎"; }
.public-tools-card-icon[data-icon="addesign"]::before { content: "▣"; }
.public-tools-card-icon[data-icon="hook"]::before { content: "◎"; }
.public-tools-card-icon[data-icon="walink"]::before { content: "☎"; }
.public-tools-card-icon[data-icon="wabutton"]::before { content: "◉"; }
.public-tools-card-icon[data-icon="countdown"]::before { content: "◷"; }
.public-tools-card-icon[data-icon="utm"]::before { content: "⛓"; }
.public-tools-card-icon[data-icon="eosb"]::before { content: "EOS"; font-size: 9px; }
.public-tools-card-icon[data-icon="vat"]::before { content: "%"; }
.public-tools-card-icon[data-icon="invoice"]::before { content: "فات"; font-size: 9px; }
.public-tools-card-icon[data-icon="quotation"]::before { content: "عرض"; font-size: 9px; }
.public-tools-card-icon[data-icon="feasib"]::before { content: "جدوى"; font-size: 8px; }
.public-tools-card-icon[data-icon="adbudget"]::before { content: "$"; }
.public-tools-card-icon[data-icon="roascalc"]::before { content: "ROAS"; font-size: 8px; }
.public-tools-card-icon[data-icon="igbio"]::before { content: "@"; }
.public-tools-card-icon[data-icon="charcount"]::before { content: "#"; }
.public-tools-card-icon[data-icon="catalog"]::before { content: "▦"; }
.public-tools-card-icon[data-icon="safezone"]::before { content: "▣"; }
.public-tools-card-icon[data-icon="iggrid"]::before { content: "⊞"; }
.public-tools-card-icon[data-icon="igcarousel"]::before { content: "⧉"; }
.public-tools-card-icon[data-icon="ighandle"]::before { content: "IG"; font-size: 11px; }
.public-tools-card-icon[data-icon="tthandle"]::before { content: "TT"; font-size: 11px; }
.public-tools-card-icon[data-icon="ttcaption"]::before { content: "Aa"; font-size: 11px; }
.public-tools-card-icon[data-icon="lifmt"]::before { content: "B"; font-weight: 900; }
.public-tools-card-icon[data-icon="yttitle"]::before { content: "T"; }
.public-tools-card-icon[data-icon="yttags"]::before { content: "⌗"; }

.pt-audio-preview {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}
.pt-audio-stem {
  border: 1px solid var(--brand-border, #e2e8f0);
  border-radius: 12px;
  padding: 12px 14px;
  background: #fff;
}
.pt-audio-stem.is-primary {
  border-color: var(--brand-primary, #0f766e);
  box-shadow: 0 0 0 1px rgba(15, 118, 110, 0.12);
}
.pt-audio-stem-title {
  font-weight: 700;
  font-size: 14px;
  margin: 0 0 8px;
}
.pt-audio-stem audio {
  width: 100%;
  display: block;
}
.pt-gif-controls {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  margin: 12px 0;
}
.pt-gif-controls label {
  display: grid;
  gap: 4px;
  font-size: 13px;
  font-weight: 500;
  color: var(--brand-muted, #64748b);
}
.pt-gif-controls label {
  min-width: 0;
}
/* Number fields kept their intrinsic width and ran out of the card on phones. 16px stops iOS zooming on focus. */
.pt-gif-controls input,
.pt-gif-controls select {
  font: inherit;
  font-size: 16px;
  color: var(--pt-ink, #0f172a);
  width: 100%;
  min-width: 0;
  min-height: 44px;
  background: #fff;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--brand-border, #e2e8f0);
}
.pt-gif-preview {
  margin-top: 12px;
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0f172a0a;
  border-radius: 12px;
  overflow: hidden;
}
.pt-gif-preview img,
.pt-gif-preview video {
  max-width: 100%;
  max-height: 360px;
  display: block;
}

.pt-obj-tools {
  display: grid;
  gap: 10px;
  margin: 12px 0;
}
.pt-obj-brush {
  width: 100%;
  accent-color: #7c3aed;
}
.pt-obj-stage {
  min-height: 280px;
}
.pt-obj-editor {
  position: relative;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto;
  user-select: none;
  touch-action: none;
}
/* Tall photos used to run past the screen, so the bottom could not be painted without scrolling. */
.pt-obj-base {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: min(70vh, 640px);
  border-radius: 12px;
}
.pt-obj-paint {
  position: absolute;
  inset-inline-start: 0;
  top: 0;
  width: 100%;
  height: 100%;
  border-radius: 12px;
  cursor: crosshair;
}

/* ── Workbench (the product surface) ──────────────────── */
.public-tools-workbench {
    background: var(--pt-surface);
    border: 1px solid var(--pt-border);
    border-radius: 24px;
    box-shadow: var(--pt-shadow);
    overflow: hidden;
}

.public-tools-workbench-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 20px;
    padding: 18px 24px;
    border-bottom: 1px solid var(--pt-border);
    background: linear-gradient(180deg, #fafafa 0%, #fff 100%);
}

.public-tools-workbench-kicker {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--pt-primary);
    margin: 0 0 4px;
}

.public-tools-workbench-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--pt-ink);
    margin: 0;
    line-height: 1.35;
    max-width: 48ch;
}

.public-tools-workbench-link {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--pt-primary);
    text-decoration: none;
    white-space: nowrap;
}

.public-tools-workbench-link:hover {
    color: var(--pt-primary-hover);
}

.public-tools-workbench-body {
    padding: 28px;
}

.public-tools-usage-warning {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin: 0;
    padding: 16px 24px;
    background: #fef2f2;
    border-bottom: 1px solid #fecaca;
    color: #7f1d1d;
}

.public-tools-usage-warning-icon {
    flex: 0 0 auto;
    margin-top: 1px;
    color: #dc2626;
}

.public-tools-usage-warning-title {
    margin: 0 0 6px;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.3;
    color: #b91c1c;
}

.public-tools-usage-warning-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 8px;
}

.public-tools-usage-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 4px 11px;
    border: 1px solid #fca5a5;
    border-radius: 999px;
    background: #fff;
    color: #7f1d1d;
    font-size: 0.875rem;
    font-weight: 700;
    line-height: 1.3;
}

.public-tools-usage-chip[hidden] {
    display: none;
}

.public-tools-usage-chip img {
    display: block;
    width: 20px;
    height: 15px;
    border-radius: 2px;
    object-fit: cover;
    box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.15);
}

.public-tools-usage-warning-body {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.55;
    color: #7f1d1d;
}

@media (max-width: 600px) {
    .public-tools-usage-warning {
        padding: 14px 16px;
        gap: 10px;
    }
}

/* Tool shell layout */
.pt-shell {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.pt-shell.pt-panel {
    display: grid;
}

.pt-history {
    grid-column: 1 / -1;
    margin-top: 4px;
    padding-top: 14px;
    border-top: 1px solid var(--pt-border);
}

.pt-history-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.pt-history-clear {
    padding: 6px 10px !important;
    font-size: 0.8125rem !important;
}

.pt-history-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
    gap: 10px;
}

.pt-history-card {
    position: relative;
    display: grid;
    gap: 6px;
    text-align: start;
    border: 1px solid var(--pt-border);
    background: #fff;
    border-radius: 12px;
    padding: 8px;
    cursor: pointer;
    font: inherit;
    color: inherit;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.pt-history-card:hover {
    border-color: #c4b5fd;
    box-shadow: 0 6px 16px rgba(124, 58, 237, 0.08);
}

.pt-history-card img,
.pt-history-card-empty {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 8px;
    background: #f1f5f9;
}

.pt-history-card-empty {
    display: grid;
    place-items: center;
    color: #94a3b8;
    font-size: 1.4rem;
}

.pt-history-card-meta {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.pt-history-card-meta strong {
    font-size: 0.8125rem;
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pt-history-card-meta span {
    font-size: 0.75rem;
    color: var(--pt-muted);
}

.pt-history-card-del {
    position: absolute;
    top: 10px;
    inset-inline-end: 10px;
    width: 22px;
    height: 22px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.72);
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 14px;
    line-height: 1;
}

.pt-upload {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.pt-dropzone {
    border: 2px dashed #cbd5e1;
    border-radius: 18px;
    padding: 48px 28px;
    min-height: 180px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 8px;
    background: #f8fafc;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.pt-dropzone:hover,
.pt-dropzone.is-dragover {
    border-color: var(--pt-primary);
    background: var(--pt-primary-soft);
    box-shadow: inset 0 0 0 1px rgba(124, 58, 237, 0.12);
}

.pt-dropzone.is-busy {
    border-color: var(--pt-busy-border);
    background: var(--pt-busy-bg);
    cursor: wait;
    pointer-events: none;
}

.pt-dropzone.is-busy,
.pt-dropzone.is-done,
.pt-dropzone.is-error {
    margin-bottom: 16px !important;
}

.pt-dropzone.is-done {
    border-color: #c4b5fd;
    background: var(--pt-primary-soft);
}

.pt-dropzone.is-error {
    border-color: var(--pt-err-border);
    background: var(--pt-err-bg);
}

.pt-upload-spinner,
.pt-adsize-spinner {
    width: 28px;
    height: 28px;
    margin: 0 auto 12px;
    border-radius: 999px;
    border: 3px solid #ddd6fe;
    border-top-color: var(--pt-primary, #7c3aed);
    animation: pt-upload-spin 0.7s linear infinite;
}

.pt-upload-spinner[hidden],
.pt-adsize-spinner[hidden] {
    display: none !important;
}

@keyframes pt-upload-spin {
    to { transform: rotate(360deg); }
}

@keyframes pt-adsize-spin {
    to { transform: rotate(360deg); }
}

.pt-dropzone strong,
.pt-upload-zone-title {
    display: block;
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--pt-ink);
}

.pt-dropzone span,
.pt-upload-zone-sub {
    color: var(--pt-muted);
    font-size: 0.875rem;
    line-height: 1.5;
    max-width: 36ch;
}

.pt-status.pt-upload-status,
.pt-upload-status,
.pt-adsize-status {
    margin: 0;
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.45;
}

/*
 * Always separate status from the dropzone above it.
 * !important beats later `.pt-status { margin: 0 }` and homepage resets.
 */
.public-tools-page .pt-status.pt-upload-status:not([hidden]),
.public-tools-page .pt-upload-status:not([hidden]),
.public-tools-page .pt-adsize-status:not([hidden]),
.pt-dropzone + .pt-status.pt-upload-status,
.pt-dropzone + input + .pt-status.pt-upload-status,
.pt-upload-zone + .pt-status.pt-upload-status,
.pt-upload-zone + input + .pt-status.pt-upload-status,
.pt-controls > .pt-status.pt-upload-status,
.pt-upload > .pt-status.pt-upload-status {
    margin-top: 16px !important;
}

.pt-upload-status.is-busy,
.pt-adsize-status.is-busy {
    background: var(--pt-busy-bg);
    color: var(--pt-busy-ink);
    border: 1px solid var(--pt-busy-border);
    border-inline-start: 3px solid var(--pt-primary);
}

.public-tools-page .pt-upload-status.is-ok,
.public-tools-page .pt-adsize-status.is-ok,
.pt-upload-status.is-ok,
.pt-adsize-status.is-ok {
    background: #f8fafc !important;
    color: #334155 !important;
    border: 1px solid #e2e8f0 !important;
    border-inline-start: 3px solid #7c3aed !important;
}

.pt-upload-status.is-error,
.pt-adsize-status.is-error {
    background: var(--pt-err-bg);
    color: var(--pt-err-ink);
    border: 1px solid var(--pt-err-border);
    border-inline-start: 3px solid var(--pt-err-ink);
}

.pt-upload-progress {
    width: 100%;
    height: 10px;
    margin-top: 16px;
    border-radius: 999px;
    background: #ede9fe;
    border: 1px solid #ddd6fe;
    overflow: hidden;
    box-sizing: border-box;
}

.pt-upload-progress[hidden] {
    display: none !important;
}

.pt-upload-progress-bar {
    height: 100%;
    width: 0%;
    border-radius: inherit;
    background: linear-gradient(90deg, #7c3aed 0%, #a78bfa 100%);
    transition: width 0.15s ease-out;
}

.pt-upload-progress.is-indeterminate .pt-upload-progress-bar {
    width: 40% !important;
    animation: pt-upload-progress-slide 1.1s ease-in-out infinite;
}

@keyframes pt-upload-progress-slide {
    0% { transform: translateX(-120%); }
    100% { transform: translateX(280%); }
}

html[dir="rtl"] .pt-upload-progress.is-indeterminate .pt-upload-progress-bar {
    animation-name: pt-upload-progress-slide-rtl;
}

@keyframes pt-upload-progress-slide-rtl {
    0% { transform: translateX(120%); }
    100% { transform: translateX(-280%); }
}

.pt-settings {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px 24px;
    padding: 22px 24px;
    border-radius: 16px;
    border: 1px solid var(--pt-border);
    background: #f8fafc;
}

.pt-settings .pt-field {
    margin-bottom: 0;
}

.pt-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    padding-top: 4px;
}

.pt-panel {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: 28px;
    align-items: start;
}

.pt-controls,
.pt-preview {
    min-width: 0;
}

.pt-controls {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.pt-label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 700;
    color: #475569;
    margin-bottom: 8px;
}

.pt-field {
    margin-bottom: 18px;
}

.pt-input,
.pt-select,
.pt-textarea {
    width: 100%;
    border: 1px solid var(--pt-border);
    border-radius: 12px;
    padding: 11px 14px;
    font: inherit;
    background: #fff;
    color: var(--pt-ink);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.pt-input:focus,
.pt-select:focus,
.pt-textarea:focus {
    outline: none;
    border-color: #a78bfa;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.12);
}

.pt-input[type="range"] {
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    height: 28px;
    accent-color: var(--pt-primary);
}

.pt-textarea {
    min-height: 96px;
    resize: vertical;
}

.pt-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.pt-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}

.pt-tab,
.pt-btn {
    border: 1px solid var(--pt-border);
    background: #fff;
    color: #334155;
    border-radius: 999px;
    padding: 10px 16px;
    font: inherit;
    font-weight: 500;
    font-size: 0.9375rem;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

a.pt-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-sizing: border-box;
}

.pt-tab:hover,
.pt-btn:hover {
    border-color: #c4b5fd;
    color: var(--pt-primary);
}

.pt-tab.is-active,
.pt-btn.is-active,
.pt-btn-primary {
    background: var(--pt-primary);
    border-color: var(--pt-primary);
    color: #fff;
}

.pt-tab.is-active:hover,
.pt-btn-primary:hover {
    background: var(--pt-primary-hover);
    border-color: var(--pt-primary-hover);
    color: #fff;
}

.pt-btn-primary:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.pt-btn-primary.is-loading:disabled {
    opacity: 0.95;
    cursor: wait;
}

.pt-btn.is-loading {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.pt-btn-ghost {
    background: var(--pt-primary-soft);
    border-color: #ddd6fe;
    color: var(--pt-primary);
}

.pt-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 0;
}

.pt-preview-box {
    position: relative;
    border: 1px solid var(--pt-border);
    border-radius: 16px;
    min-height: 320px;
    display: grid;
    place-items: center;
    background:
        linear-gradient(45deg, #f8fafc 25%, transparent 25%),
        linear-gradient(-45deg, #f8fafc 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #f8fafc 75%),
        linear-gradient(-45deg, transparent 75%, #f8fafc 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0;
    background-color: #fff;
    padding: 20px;
    overflow: auto;
}

/* Download overlay on image/video results (public-tools only; not app UI) */
.pt-preview-box.has-media-download,
.pt-compare.has-media-download,
.pt-gif-preview.has-media-download {
    position: relative;
}

.pt-media-download {
    position: absolute;
    top: 12px;
    inset-inline-end: 12px;
    z-index: 6;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    padding: 0;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.34);
    background: rgba(15, 23, 42, 0.94);
    color: #fff;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.38), 0 0 0 1px rgba(15, 23, 42, 0.18);
    backdrop-filter: blur(8px);
    transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.pt-media-download:hover,
.pt-media-download:focus-visible {
    transform: translateY(-2px);
    background: rgba(17, 24, 39, 0.98);
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.48), 0 0 0 1px rgba(255, 255, 255, 0.22);
    outline: none;
}

.pt-media-download svg {
    display: block;
    flex-shrink: 0;
}

.pt-media-download-bar {
    position: absolute;
    bottom: 12px;
    inset-inline: 12px;
    z-index: 6;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 10px 16px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: rgba(15, 23, 42, 0.94);
    color: #fff;
    font: inherit;
    font-weight: 700;
    font-size: 0.9375rem;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.36);
    backdrop-filter: blur(8px);
    transition: transform 0.15s ease, background 0.15s ease;
}

.pt-media-download-bar:hover,
.pt-media-download-bar:focus-visible {
    background: rgba(17, 24, 39, 0.98);
    transform: translateY(-1px);
    outline: none;
}

.pt-media-download-bar svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

@media (min-width: 961px) {
    .pt-media-download-bar {
        /* Corner icon is enough on wide layouts; keep a compact labeled control near the media. */
        inset-inline-start: auto;
        width: auto;
        min-width: 148px;
    }
}

.pt-preview-box.has-media-download,
.pt-gif-preview.has-media-download {
    /* Keep overlay controls visible inside the preview frame */
    overflow: auto;
}

.pt-file-list {
    display: grid;
    gap: 12px;
}

.pt-file-card {
    display: grid;
    grid-template-columns: 72px 1fr auto;
    gap: 14px;
    align-items: center;
    padding: 14px;
    border: 1px solid var(--pt-border);
    border-radius: 14px;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.pt-file-card:hover {
    border-color: #c4b5fd;
}

.pt-file-card.is-selected {
    border-color: var(--pt-primary);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.12);
}

.pt-file-card img {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 10px;
    background: #f1f5f9;
}

.pt-file-meta {
    font-size: 0.875rem;
    color: var(--pt-muted);
    line-height: 1.5;
}

.pt-file-meta strong {
    display: block;
    color: var(--pt-ink);
    font-size: 0.9375rem;
    margin-bottom: 4px;
    word-break: break-all;
}

.pt-file-meta-hint {
    display: block;
    margin-top: 4px;
    font-size: 0.8125rem;
    color: var(--pt-primary);
    font-weight: 500;
}

/* Background remover: original vs transparent result */
.pt-bg-compare {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    width: 100%;
}

.pt-bg-compare-pane {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.pt-bg-compare-label {
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--pt-muted);
}

.pt-bg-compare-media {
    display: grid;
    place-items: center;
    min-height: 220px;
    max-height: 420px;
    border-radius: 14px;
    border: 1px solid var(--pt-border);
    overflow: hidden;
    padding: 12px;
}

.pt-bg-compare-media.is-solid {
    background: #f8fafc;
}

.pt-bg-compare-media.is-checker {
    background:
        linear-gradient(45deg, #e2e8f0 25%, transparent 25%),
        linear-gradient(-45deg, #e2e8f0 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #e2e8f0 75%),
        linear-gradient(-45deg, transparent 75%, #e2e8f0 75%);
    background-size: 16px 16px;
    background-position: 0 0, 0 8px, 8px -8px, -8px 0;
    background-color: #fff;
}

.pt-bg-compare-media img {
    max-width: 100%;
    max-height: 380px;
    object-fit: contain;
    display: block;
}

.pt-lightbox-trigger,
.pt-bg-compare-media img,
.pt-compare-pane-media img {
    cursor: zoom-in;
}

body.pt-lightbox-open {
    overflow: hidden;
}

.pt-lightbox {
    position: fixed;
    inset: 0;
    z-index: 1400;
    background: rgba(15, 23, 42, 0.86);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.pt-lightbox.is-open {
    display: flex;
}

.pt-lightbox-frame {
    position: relative;
    display: grid;
    gap: 10px;
    justify-items: center;
    max-width: min(96vw, 1100px);
    max-height: 88vh;
}

.pt-lightbox-frame img {
    max-width: min(96vw, 1100px);
    max-height: 78vh;
    border-radius: 14px;
    object-fit: contain;
    background: #0f172a;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
}

.pt-lightbox-frame.is-checker img {
    background:
        linear-gradient(45deg, #334155 25%, transparent 25%),
        linear-gradient(-45deg, #334155 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #334155 75%),
        linear-gradient(-45deg, transparent 75%, #334155 75%);
    background-size: 18px 18px;
    background-position: 0 0, 0 9px, 9px -9px, -9px 0;
    background-color: #1e293b;
}

.pt-lightbox-caption,
.pt-lightbox-counter {
    color: #f8fafc;
    font-size: 0.875rem;
    font-weight: 500;
    text-align: center;
}

.pt-lightbox-counter {
    opacity: 0.8;
    font-weight: 500;
    font-size: 0.8125rem;
}

.pt-lightbox-close,
.pt-lightbox-nav {
    position: absolute;
    border: 0;
    background: rgba(255, 255, 255, 0.94);
    color: #0f172a;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    cursor: pointer;
    font-size: 22px;
    line-height: 1;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
}

.pt-lightbox-close {
    top: 18px;
    inset-inline-end: 18px;
}

html[dir="rtl"] .pt-lightbox-close,
html[lang="ar"] .pt-lightbox-close,
html[lang="he"] .pt-lightbox-close {
    inset-inline-end: auto;
    inset-inline-start: 18px;
    left: 18px;
    right: auto;
}

.pt-lightbox-nav {
    top: 50%;
    transform: translateY(-50%);
    display: none;
}

.pt-lightbox.has-nav .pt-lightbox-nav {
    display: grid;
    place-items: center;
}

.pt-lightbox-nav.prev {
    inset-inline-start: 16px;
}

.pt-lightbox-nav.next {
    inset-inline-end: 16px;
}

@media (max-width: 720px) {
    /* Keep before and after side by side on phones: stacked, the pair was two screens tall. */
    .pt-bg-compare {
        gap: 8px;
    }

    .pt-bg-compare-media {
        min-height: 140px;
        padding: 6px;
    }

    .pt-lightbox {
        padding: 12px;
    }

    .pt-lightbox-nav.prev {
        inset-inline-start: 8px;
    }

    .pt-lightbox-nav.next {
        inset-inline-end: 8px;
    }
}

/* Converter: clear from → to flow */
.pt-convert-step {
    display: grid;
    gap: 8px;
}

.pt-convert-live {
    margin: 0;
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 0.9375rem;
    font-weight: 700;
    line-height: 1.45;
    border: 1px solid var(--pt-border);
    background: #f8fafc;
    color: var(--pt-ink);
}

.pt-convert-live[hidden] {
    display: none !important;
}

.pt-convert-live.is-busy {
    background: var(--pt-busy-bg);
    border-color: var(--pt-busy-border);
    color: var(--pt-busy-ink);
}

.pt-convert-live.is-ok {
    background: #f8fafc;
    border-color: #c4b5fd;
    border-inline-start: 3px solid var(--pt-primary);
    color: var(--pt-ink);
}

.pt-convert-live.is-error {
    background: var(--pt-err-bg);
    border-color: var(--pt-err-border);
    border-inline-start: 3px solid var(--pt-err-ink);
    color: var(--pt-err-ink);
}

.pt-convert-summary[hidden] {
    display: none !important;
}

.pt-convert-summary-card {
    display: grid;
    gap: 12px;
    padding: 18px;
    border-radius: 16px;
    border: 1px solid var(--pt-border);
    background: #fff;
}

.pt-convert-flow {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 10px;
}

.pt-convert-chip {
    flex: 1 1 140px;
    display: grid;
    gap: 2px;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid var(--pt-border);
    background: #f8fafc;
}

.pt-convert-chip.is-to {
    border-color: #c4b5fd;
    background: var(--pt-primary-soft);
}

.pt-convert-chip-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--pt-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.pt-convert-chip strong {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--pt-ink);
    line-height: 1.2;
}

.pt-convert-chip em {
    font-style: normal;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--pt-muted);
}

.pt-convert-arrow {
    display: grid;
    place-items: center;
    min-width: 28px;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--pt-primary);
}

.pt-convert-summary-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--pt-muted);
}

.pt-convert-path {
    display: inline-block;
    margin: 2px 0 4px;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--pt-primary-soft);
    color: var(--pt-primary);
    font-weight: 800;
    font-size: 0.8125rem;
}

.pt-convert-warn {
    color: var(--pt-warn-ink) !important;
}

.pt-convert-settings .pt-btn.is-active {
    background: var(--pt-primary);
    border-color: var(--pt-primary);
    color: #fff;
}

/* Compressor / converter: original vs result + synced zoom */
.pt-compare-host[hidden] {
    display: none !important;
}

.pt-compare {
    display: grid;
    gap: 16px;
    padding: 20px;
    border: 1px solid var(--pt-border);
    border-radius: 18px;
    background: #fff;
}

.pt-compare-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.pt-compare-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.pt-compare-stat {
    min-width: 110px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid var(--pt-border);
    background: #f8fafc;
}

.pt-compare-stat.is-result {
    border-color: #c4b5fd;
    background: var(--pt-primary-soft);
}

.pt-compare-stat-label {
    display: block;
    font-size: 0.8125rem;
    color: var(--pt-muted);
    font-weight: 500;
    margin-bottom: 2px;
}

.pt-compare-stat strong {
    font-size: 0.9375rem;
    color: var(--pt-ink);
    font-weight: 700;
}

.pt-compare-stage {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.pt-compare-pane {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.pt-compare-pane-label {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    font-size: 0.875rem;
}

.pt-compare-pane-label strong {
    color: var(--pt-ink);
    font-weight: 700;
}

.pt-compare-pane-label span {
    color: var(--pt-muted);
    font-weight: 500;
}

.pt-compare-pane-media {
    position: relative;
    height: 260px;
    border-radius: 14px;
    border: 1px solid var(--pt-border);
    background:
        linear-gradient(45deg, #f1f5f9 25%, transparent 25%),
        linear-gradient(-45deg, #f1f5f9 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #f1f5f9 75%),
        linear-gradient(-45deg, transparent 75%, #f1f5f9 75%);
    background-size: 16px 16px;
    background-position: 0 0, 0 8px, 8px -8px, -8px 0;
    background-color: #fff;
    overflow: hidden;
    cursor: crosshair;
    touch-action: none;
    user-select: none;
}

.pt-compare-pane-media img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    pointer-events: none;
}

.pt-compare-lens {
    position: absolute;
    width: 72px;
    height: 72px;
    margin: -36px 0 0 -36px;
    border: 2px solid #fff;
    border-radius: 999px;
    box-shadow: 0 0 0 2px var(--pt-primary), 0 8px 20px rgba(15, 23, 42, 0.2);
    pointer-events: none;
    z-index: 2;
}

.pt-compare-lens[hidden] {
    display: none !important;
}

.pt-compare-zoom {
    border-radius: 14px;
    border: 1px dashed #cbd5e1;
    background: #f8fafc;
    padding: 14px;
    min-height: 180px;
}

.pt-compare-zoom.is-active {
    border-style: solid;
    border-color: #c4b5fd;
    background: #fff;
}

.pt-compare-zoom-hint {
    margin: 0;
    text-align: center;
    color: var(--pt-muted);
    font-size: 0.875rem;
    font-weight: 500;
    padding: 48px 12px;
}

.pt-compare-zoom.is-active .pt-compare-zoom-hint {
    display: none;
}

.pt-compare-zoom-grid {
    display: none;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.pt-compare-zoom.is-active .pt-compare-zoom-grid {
    display: grid;
}

.pt-compare-zoom-pane {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.pt-compare-zoom-label {
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--pt-muted);
}

.pt-compare-zoom-view {
    height: 180px;
    border-radius: 12px;
    border: 1px solid var(--pt-border);
    background-color: #0f172a;
    background-repeat: no-repeat;
}

@media (max-width: 720px) {
    .pt-compare-stage,
    .pt-compare-zoom.is-active .pt-compare-zoom-grid {
        grid-template-columns: 1fr;
    }

    .pt-compare-pane-media {
        height: 220px;
    }

    .pt-compare-zoom-view {
        height: 160px;
    }
}

.pt-hint,
.pt-status {
    font-size: 0.875rem;
    color: var(--pt-muted);
    margin: 0;
    line-height: 1.5;
}

.pt-status.is-error {
    color: var(--pt-err-ink);
}

.pt-status.is-ok {
    color: var(--pt-ok-ink);
}

.pt-color-bars {
    display: grid;
    gap: 10px;
}

.pt-color-bar {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 10px;
    align-items: center;
    border-radius: 12px;
    padding: 12px 14px;
    color: #fff;
    cursor: grab;
    min-height: 56px;
}

.pt-swatches {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
    gap: 10px;
    margin-top: 12px;
}

.pt-swatch {
    border: 0;
    border-radius: 10px;
    height: 56px;
    cursor: pointer;
}

/* ── SEO content sections ─────────────────────────────── */
.public-tools-section {
    margin-top: 48px;
}

.public-tools-section > h2 {
    font-size: clamp(1.3rem, 2.1vw, 1.55rem);
    font-weight: 800;
    margin-bottom: 18px;
    color: var(--pt-ink);
    line-height: 1.3;
}

.public-tools-steps {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    padding: 0;
    margin: 0;
}

.public-tools-steps li {
    display: grid;
    grid-template-columns: 40px 1fr;
    gap: 14px;
    padding: 18px;
    border-radius: var(--pt-radius-sm);
    border: 1px solid var(--pt-border);
    background: var(--pt-surface);
    align-items: start;
}

.public-tools-step-num {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    font-weight: 800;
    font-size: 0.9375rem;
    color: #fff;
    background: var(--pt-primary);
}

.public-tools-steps h3 {
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 6px;
    line-height: 1.35;
}

.public-tools-steps p,
.public-tools-features p,
.public-tools-usecases p {
    color: var(--pt-muted);
    line-height: 1.6;
    font-size: 0.9375rem;
    margin: 0;
}

.public-tools-features {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.public-tools-usecases {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.public-tools-features article,
.public-tools-usecases article {
    padding: 18px 20px;
    border-radius: var(--pt-radius-sm);
    border: 1px solid var(--pt-border);
    background: var(--pt-surface);
}

.public-tools-features h3,
.public-tools-usecases h3 {
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 8px;
    line-height: 1.35;
}

.public-tools-prose p {
    color: #334155;
    line-height: 1.8;
    margin-bottom: 14px;
    font-size: 1rem;
}

.public-tools-prose h3 {
    font-size: 1.125rem;
    font-weight: 800;
    color: var(--pt-ink, #0f172a);
    margin: 22px 0 8px;
    line-height: 1.4;
}

.public-tools-prose h3:first-child {
    margin-top: 0;
}

.public-tools-prose a {
    color: var(--pt-primary, #7c3aed);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.public-tools-prose p:last-child {
    margin-bottom: 0;
}

.pt-vs-table {
    width: 100%;
    margin: 8px 0 0;
    border-collapse: collapse;
    font-size: 0.9375rem;
    line-height: 1.5;
    color: #334155;
}

.pt-vs-table caption {
    caption-side: top;
    text-align: start;
    font-weight: 800;
    font-size: 1rem;
    color: var(--pt-ink, #0f172a);
    margin-bottom: 10px;
}

.pt-vs-table th,
.pt-vs-table td {
    border: 1px solid var(--pt-border, #e2e8f0);
    padding: 10px 12px;
    text-align: start;
    vertical-align: top;
}

.pt-vs-table thead th {
    background: #f8fafc;
    font-weight: 800;
    color: #0f172a;
}

.pt-vs-table tbody th {
    font-weight: 700;
    color: #0f172a;
    width: 28%;
    background: #f8fafc;
}

html[dir="rtl"] .pt-vs-table,
html[dir="rtl"] .pt-vs-table caption,
html[dir="rtl"] .pt-vs-table th,
html[dir="rtl"] .pt-vs-table td {
    unicode-bidi: isolate;
}

.public-tools-prose ul {
    margin: 0 0 14px 1.15em;
    color: #334155;
    line-height: 1.75;
}

.public-tools-prose li + li {
    margin-top: 6px;
}

.public-tools-faq details {
    border: 1px solid var(--pt-border);
    border-radius: 12px;
    background: var(--pt-surface);
    padding: 14px 16px;
    margin-bottom: 10px;
}

.public-tools-faq details:last-child {
    margin-bottom: 0;
}

.public-tools-faq summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 28px;
    cursor: pointer;
    font-weight: 700;
    color: var(--pt-ink);
    font-size: 1rem;
    list-style: none;
}

.public-tools-faq summary::-webkit-details-marker {
    display: none;
}

.public-tools-faq summary::after {
    content: "";
    flex: 0 0 auto;
    width: 9px;
    height: 9px;
    margin-inline-end: 4px;
    /* Physical sides on purpose: a down chevron must not mirror in RTL. */
    border-right: 2px solid var(--pt-muted);
    border-bottom: 2px solid var(--pt-muted);
    transform: translateY(-2px) rotate(45deg);
    transition: transform 0.2s ease;
}

.public-tools-faq details[open] > summary::after {
    transform: translateY(2px) rotate(-135deg);
}

.public-tools-faq summary:hover {
    color: var(--pt-primary);
}

.public-tools-faq summary:focus-visible {
    outline: 2px solid var(--pt-primary);
    outline-offset: 4px;
    border-radius: 6px;
}

.public-tools-faq p {
    margin-top: 10px;
    color: var(--pt-muted);
    line-height: 1.65;
    font-size: 0.9375rem;
}

html[dir="rtl"] .public-tools-hero h1,
html[dir="rtl"] .public-tools-hero-sub,
html[dir="rtl"] .public-tools-trust,
html[dir="rtl"] .public-tools-workbench-title,
html[dir="rtl"] .public-tools-steps h3,
html[dir="rtl"] .public-tools-steps p,
html[dir="rtl"] .public-tools-features h3,
html[dir="rtl"] .public-tools-features p,
html[dir="rtl"] .public-tools-usecases h3,
html[dir="rtl"] .public-tools-usecases p,
html[dir="rtl"] .public-tools-prose p,
html[dir="rtl"] .public-tools-prose li,
html[dir="rtl"] .public-tools-faq summary,
html[dir="rtl"] .public-tools-faq p,
html[dir="rtl"] .public-tools-cta-band h2,
html[dir="rtl"] .public-tools-cta-band p,
html[dir="rtl"] .public-tools-card h2,
html[dir="rtl"] .public-tools-card p {
    unicode-bidi: isolate;
}

.public-tools-page bdi[dir="ltr"] {
    unicode-bidi: isolate;
    direction: ltr;
}

.public-tools-more {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.public-tools-more a {
    display: inline-block;
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid var(--pt-border);
    background: var(--pt-surface);
    color: var(--pt-primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
    line-height: 1.4;
}

.public-tools-more a:hover {
    background: var(--pt-primary-soft);
    border-color: #c4b5fd;
}

.public-tools-page section.public-tools-cta-band {
    text-align: center;
    padding: 40px 32px;
    border-radius: 20px;
    background: var(--pt-primary);
    color: #fff;
    margin-top: 52px;
}

.public-tools-cta-band h2 {
    font-size: clamp(1.25rem, 2.2vw, 1.6rem);
    font-weight: 800;
    margin: 0 0 12px;
}

.public-tools-cta-band p {
    max-width: 560px;
    margin: 0 auto 20px;
    opacity: 0.95;
    line-height: 1.65;
    font-size: 1rem;
}

.public-tools-cta-btn,
.public-tools-showcase-cta-btn {
    display: inline-block !important;
    min-height: 48px;
    padding: 14px 28px !important;
    border-radius: 12px;
    background: #fff !important;
    color: #4c1d95 !important;
    font-size: 1rem !important;
    font-weight: 700 !important;
    line-height: 1.25 !important;
    text-align: center;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.18);
    margin: 0;
}

.public-tools-cta-btn:hover,
.public-tools-showcase-cta-btn:hover {
    background: #f5f3ff !important;
}

/* Portfolio rails */
.public-tools-page .public-tools-portfolio.portfolio {
    background: #0a0518;
    margin: 40px 0;
    padding: 40px 0 36px;
}

.public-tools-page .public-tools-portfolio .hero-showcase-bridge {
    /* Override homepage .portfolio { direction: ltr } for the label */
    margin-bottom: 24px;
    unicode-bidi: isolate;
}

.public-tools-page .public-tools-portfolio .hero-showcase-bridge__label {
    font-size: clamp(1.2rem, 2.2vw, 1.5rem);
}

.public-tools-page .public-tools-portfolio .portfolio-row {
    margin-bottom: 18px;
}

.public-tools-page .public-tools-portfolio .portfolio-row:last-child {
    margin-bottom: 0;
}

/* Tool-specific Try Adly CTA under showcase rails (same copy as bottom band) */
.public-tools-showcase-cta {
    max-width: 720px;
    margin: 28px auto 0;
    padding: 0 24px 8px;
    text-align: center;
    /* dir set in HTML; isolate so LTR marquee parent cannot reorder Arabic */
    unicode-bidi: isolate;
}

.public-tools-showcase-cta-title {
    font-size: clamp(1.15rem, 2.2vw, 1.45rem);
    font-weight: 800;
    color: #fff;
    line-height: 1.35;
    margin: 0 0 10px;
    unicode-bidi: plaintext;
}

.public-tools-showcase-cta-body {
    font-size: 0.9375rem;
    line-height: 1.65;
    color: rgba(226, 232, 240, 0.88);
    margin: 0 auto 18px;
    max-width: 54ch;
    unicode-bidi: plaintext;
}

.public-tools-showcase-cta-btn {
    unicode-bidi: plaintext;
}

@media (max-width: 960px) {
    .public-tools-grid,
    .public-tools-features {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .public-tools-steps {
        grid-template-columns: 1fr;
    }

    .pt-panel,
    .pt-settings {
        grid-template-columns: 1fr;
    }

    .public-tools-workbench-body {
        padding: 20px;
    }

    .pt-file-card {
        grid-template-columns: 64px 1fr;
    }

    .pt-file-card .pt-actions {
        grid-column: 1 / -1;
    }

    .public-tools-page .public-tools-portfolio.portfolio {
        margin: 32px 0;
        padding: 32px 0 28px;
    }
}

/* Meta ad size checker */
.pt-adsize-summary {
    margin: 4px 0 18px;
    padding: 14px 18px;
    border-radius: 14px;
    border: 1px solid var(--pt-border);
    background: #f8fafc;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
    color: #334155;
}

.pt-adsize-summary:empty {
    display: none;
}

.pt-adsize-summary.is-ok {
    border-color: var(--pt-ok-border);
    background: var(--pt-ok-bg);
    color: var(--pt-ok-ink);
}

.pt-adsize-summary.is-warn {
    border-color: var(--pt-warn-border);
    background: var(--pt-warn-bg);
    color: var(--pt-warn-ink);
}

.pt-adsize-layout[hidden],
.pt-gate[hidden] {
    display: none;
}

.pt-adsize-layout {
    display: grid;
    grid-template-columns: minmax(240px, 300px) 1fr;
    gap: 28px;
    margin-top: 4px;
    align-items: start;
}

.pt-adsize-side {
    display: grid;
    gap: 14px;
}

.pt-adsize-preview {
    border: 1px solid var(--pt-border);
    border-radius: 16px;
    background: #fff;
    min-height: 200px;
    display: grid;
    place-items: center;
    padding: 18px;
    overflow: hidden;
}

.pt-adsize-thumb {
    max-width: 100%;
    max-height: 300px;
    object-fit: contain;
    border-radius: 10px;
}

.pt-adsize-meta,
.pt-adsize-text {
    margin: 0;
    font-size: 13px;
    line-height: 1.55;
    color: var(--pt-muted, #64748b);
}

.pt-adsize-ltr {
    direction: ltr;
    unicode-bidi: isolate;
    display: inline-block;
}

.pt-adsize-list {
    display: grid;
    gap: 14px;
}

.pt-adsize-row {
    border: 1px solid var(--pt-border);
    border-radius: 16px;
    background: #fff;
    padding: 18px 20px;
    border-inline-start-width: 3px;
}

.pt-adsize-row.is-ok {
    border-color: var(--pt-ok-border);
    border-inline-start-color: var(--pt-primary);
    background: var(--pt-ok-bg);
}

.pt-adsize-row.is-warn {
    border-color: var(--pt-warn-border);
    border-inline-start-color: #c2410c;
    background: var(--pt-warn-bg);
}

.pt-adsize-row.is-miss {
    border-color: var(--pt-miss-border);
    border-inline-start-color: #94a3b8;
    background: var(--pt-miss-bg);
}

.pt-adsize-row-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.pt-adsize-badge {
    font-size: 12px;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.06);
    white-space: nowrap;
}

.pt-adsize-row.is-ok .pt-adsize-badge {
    background: var(--pt-ok-badge);
    color: var(--pt-ok-ink);
}

.pt-adsize-row.is-warn .pt-adsize-badge {
    background: var(--pt-warn-badge);
    color: var(--pt-warn-ink);
}

.pt-adsize-row.is-miss .pt-adsize-badge {
    background: #e2e8f0;
    color: var(--pt-miss-ink);
}

.pt-adsize-rec,
.pt-adsize-note {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
    color: #475569;
}

.pt-adsize-note {
    margin-top: 6px;
}

.pt-gate {
    margin-top: 18px;
    padding: 18px 20px;
    border-radius: 16px;
    border: 1px solid var(--pt-border);
    background: #fff;
    display: grid;
    gap: 10px;
}

.pt-gate-title {
    font-size: 16px;
    font-weight: 700;
    color: #1e1b4b;
}

.pt-gate-body {
    margin: 0;
    font-size: 14px;
    line-height: 1.55;
    color: #475569;
}

.pt-gate .pt-btn {
    justify-self: start;
    text-decoration: none;
}

/* Sticky preview needs visible overflow on workbench ancestors */
body[data-tools-module="bizcard"] .public-tools-workbench {
    overflow: visible;
}

body[data-tools-module="bizcard"] .public-tools-workbench-head {
    border-radius: 24px 24px 0 0;
}

body[data-tools-module="bizcard"] .public-tools-workbench-body {
    border-radius: 0 0 24px 24px;
    overflow: visible;
}

/* Digital business card free preview */
.pt-bizcard-layout {
    display: grid;
    grid-template-columns: minmax(280px, 0.95fr) minmax(0, 1.15fr);
    gap: 28px;
    align-items: start;
}

.pt-bizcard-form {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.pt-bizcard-section {
    margin-top: 8px;
    padding: 18px 18px 8px;
    border: 1px solid var(--pt-border);
    border-radius: 16px;
    background: #fff;
}

.pt-bizcard-section-title {
    margin: 0 0 14px;
    font-size: 15px;
    font-weight: 700;
    color: #1e1b4b;
}

.pt-bizcard-hint,
.pt-bizcard-preview-note,
.pt-bizcard-field-hint {
    margin: 0 0 12px;
    font-size: 13px;
    line-height: 1.5;
    color: var(--pt-muted, #64748b);
}

.pt-bizcard-field-hint {
    margin-top: 6px;
    margin-bottom: 0;
}

.pt-bizcard-colors {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.pt-bizcard-check {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 8px 0 14px;
    font-size: 14px;
    font-weight: 500;
    color: #334155;
    cursor: pointer;
}

.pt-bizcard-thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 10px 0 14px;
}

.pt-bizcard-thumb {
    position: relative;
    width: 72px;
    height: 72px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--pt-border);
    background: #f8fafc;
}

.pt-bizcard-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pt-bizcard-thumb-remove {
    position: absolute;
    top: 4px;
    inset-inline-end: 4px;
    width: 22px;
    height: 22px;
    border: 0;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.72);
    color: #fff;
    cursor: pointer;
    line-height: 1;
}

.pt-bizcard-gate-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.pt-bizcard-gate-actions .pt-btn {
    text-decoration: none;
}

.pt-bizcard-preview-panel {
    position: sticky;
    top: 88px;
    z-index: 5;
    align-self: start;
}

.pt-bizcard-shell .phone-frame {
    background: #0f1222;
    border-radius: 36px;
    padding: 18px 16px 22px;
    box-shadow: 0 24px 60px rgba(15, 18, 34, 0.35);
    max-width: 380px;
    margin: 0 auto;
}

.pt-bizcard-shell .phone-frame.is-full-screen {
    background: transparent;
    box-shadow: none;
    padding: 0;
    border-radius: 18px;
}

.pt-bizcard-shell .phone-notch {
    width: 120px;
    height: 16px;
    background: #0f1222;
    border-radius: 0 0 14px 14px;
    margin: 0 auto 10px;
}

.pt-bizcard-shell .phone-screen {
    background: #f5f6fb;
    border-radius: 28px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    max-height: min(70vh, 640px);
    overflow-x: hidden;
    overflow-y: auto;
}

.pt-bizcard-shell .phone-frame.is-full-screen .phone-screen {
    border-radius: 18px;
    border: 1px solid #e5e7f2;
    max-height: none;
}

.pt-bizcard-shell .business-card-preview {
    padding: 6px;
}

.pt-bizcard-shell .business-card {
    border: 1px solid #e5e7f2;
    border-radius: 18px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 18px 40px rgba(15, 18, 30, 0.08);
    --brand-on-primary: #fff;
}

.pt-bizcard-shell .business-card-header {
    background: var(--card-header-bg, linear-gradient(120deg, var(--card-brand-primary, #7c3aed), var(--card-brand-secondary, #a78bfa)));
    color: #fff;
    padding: 18px;
    position: relative;
    isolation: isolate;
    text-align: center;
}

.pt-bizcard-shell .business-card-header > :not(.business-card-cover-bg) {
    position: relative;
    z-index: 1;
}

.pt-bizcard-shell .business-card-cover-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.42;
    filter: saturate(1.08);
}

.pt-bizcard-shell .business-card.banner-fade .business-card-header::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    background:
        linear-gradient(180deg, rgba(15, 23, 42, 0.16), rgba(15, 23, 42, 0.42)),
        radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.28), transparent 58%);
}

.pt-bizcard-shell .business-card-cover {
    width: 100%;
    max-height: 200px;
    object-fit: cover;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin-bottom: 12px;
}

.pt-bizcard-shell .business-card.cover-layout-full_bleed .business-card-cover {
    width: calc(100% + 36px);
    max-width: none;
    margin: -18px -18px 12px;
    border-radius: 18px 18px 0 0;
    border-inline: 0;
    border-top: 0;
}

.pt-bizcard-shell .business-card-logo {
    width: 58px;
    height: 58px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.18);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin: 0 auto 10px;
    font-weight: 700;
    backdrop-filter: blur(8px);
}

.pt-bizcard-shell .business-card-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pt-bizcard-shell .business-card-title {
    font-size: 22px;
    font-weight: 700;
}

.pt-bizcard-shell .business-card-subtitle {
    margin-top: 6px;
    opacity: 0.9;
}

.pt-bizcard-shell .business-card-body {
    padding: 16px 18px;
    display: grid;
    gap: 12px;
}

.pt-bizcard-shell .business-card .action-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 16px 10px;
    justify-content: center;
}

.pt-bizcard-shell .business-card .action-tile {
    box-sizing: border-box;
    flex: 0 1 calc((100% - 20px) / 3);
    padding: 10px;
    border-radius: 14px;
    border: 1px solid #e0e3ef;
    text-decoration: none;
    color: var(--card-button-text, #1e2430);
    background: var(--card-button-bg, #f7f8fd);
    font-weight: 500;
    font-size: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-align: center;
    min-height: 82px;
    justify-content: center;
    cursor: pointer;
    font: inherit;
}

.pt-bizcard-shell .business-card .action-tile.whatsapp {
    background: var(--card-button-bg, #f7f8fd);
    color: var(--card-button-text, #1e2430);
}

.pt-bizcard-shell .business-card .action-icon {
    width: 20px;
    height: 20px;
    display: block;
}

.pt-bizcard-shell .business-card.button-display-icon_only .action-icon,
.pt-bizcard-shell .business-card.button-display-icon-only .action-icon {
    width: 38px;
    height: 38px;
}

.pt-bizcard-shell .business-card .action-icon svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.pt-bizcard-shell .business-card.button-display-icon_only .action-icon svg,
.pt-bizcard-shell .business-card.button-display-icon-only .action-icon svg {
    width: 38px;
    height: 38px;
}

.pt-bizcard-shell .business-card .action-text {
    line-height: 1.2;
    word-break: break-word;
}

.pt-bizcard-shell .business-card .card-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
    gap: 8px;
}

.pt-bizcard-shell .business-card .card-gallery img {
    width: 100%;
    border-radius: 10px;
    object-fit: cover;
    border: 1px solid #e3e6f2;
    aspect-ratio: 1 / 1;
    cursor: pointer;
}

.pt-bizcard-shell .business-card .card-footer {
    padding: 10px 16px 14px;
    text-align: center;
    font-size: 11px;
    color: #8a90a5;
    border-top: 1px solid #edf0f7;
}

.pt-bizcard-shell .business-card .card-footer a {
    color: inherit;
    text-decoration: none;
    font-weight: 500;
}

/* Legacy bizcard lightbox classes → shared .pt-lightbox */

@media (max-width: 900px) {
    .pt-adsize-layout {
        grid-template-columns: 1fr;
    }

    .pt-bizcard-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .pt-bizcard-preview-panel {
        position: sticky;
        top: 72px;
        order: -1;
        z-index: 6;
        padding-bottom: 8px;
        background: linear-gradient(180deg, #fff 70%, rgba(255, 255, 255, 0));
    }

    .pt-bizcard-shell .phone-frame {
        max-width: 280px;
        transform: scale(0.92);
        transform-origin: top center;
    }

    .pt-bizcard-shell .phone-screen {
        max-height: min(42vh, 420px);
    }
}

@media (max-width: 560px) {
    .public-tools-grid,
    .public-tools-features,
    .public-tools-usecases {
        grid-template-columns: 1fr;
    }

    .public-tools-main {
        padding: 24px 0 48px;
    }

    .public-tools-section {
        margin-top: 40px;
    }

    .public-tools-workbench-head {
        padding: 16px 18px;
    }

    .public-tools-workbench-body {
        padding: 18px;
    }

    .pt-dropzone {
        padding: 36px 18px;
        min-height: 150px;
    }

    .pt-settings {
        padding: 18px;
        gap: 16px;
    }

    .public-tools-page section.public-tools-cta-band {
        margin-top: 40px;
        padding: 32px 20px;
    }
}

/* ---------------------------------------------------------------------------
   AI text tools: article writer / translator / SEO optimizer
--------------------------------------------------------------------------- */

.pt-text-tool .pt-settings {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pt-goal-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.pt-goal-chip {
    display: flex;
    flex-direction: column;
    gap: 3px;
    text-align: start;
    border: 1px solid var(--pt-border);
    background: #fff;
    border-radius: 14px;
    padding: 12px 14px;
    font: inherit;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.pt-goal-chip strong {
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--pt-ink);
}

.pt-goal-chip span {
    font-size: 0.8125rem;
    color: #64748b;
}

.pt-goal-chip:hover {
    border-color: #c4b5fd;
}

.pt-goal-chip.is-active {
    border-color: var(--pt-primary);
    background: #faf5ff;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.12);
}

.pt-goal-chip.is-active strong {
    color: var(--pt-primary);
}

.pt-result-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.pt-result-head .pt-label {
    margin-bottom: 0;
}

.pt-result-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pt-btn-sm {
    padding: 7px 12px;
    font-size: 0.8125rem;
}

.pt-text-output {
    display: block;
    min-height: 260px;
    max-height: 640px;
    overflow-y: auto;
    padding: 22px;
    text-align: start;
    align-items: initial;
    justify-content: initial;
}

.pt-art-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 220px;
    text-align: center;
    color: #64748b;
}

.pt-art-placeholder-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: #f3e8ff;
    color: var(--pt-primary);
    font-size: 1.5rem;
}

.pt-art-placeholder p {
    max-width: 380px;
    font-size: 0.875rem;
    line-height: 1.7;
}

.pt-art-doc {
    line-height: 1.85;
    color: var(--pt-ink);
    font-size: 1rem;
}

.pt-art-doc-title {
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1.4;
    margin: 0 0 6px;
}

.pt-art-doc-meta {
    font-size: 0.8125rem;
    color: #94a3b8;
    margin: 0 0 12px;
}

.pt-art-doc-desc {
    font-size: 0.875rem;
    color: #475569;
    background: #f8fafc;
    border: 1px solid var(--pt-border);
    border-radius: 12px;
    padding: 10px 14px;
    margin: 0 0 18px;
}

.pt-art-doc h2 {
    font-size: 1.125rem;
    font-weight: 800;
    margin: 22px 0 8px;
}

.pt-art-doc h3,
.pt-art-doc h4 {
    font-size: 1rem;
    font-weight: 700;
    margin: 18px 0 6px;
}

.pt-art-doc p {
    margin: 0 0 12px;
}

.pt-art-doc ul,
.pt-art-doc ol {
    margin: 0 0 12px;
    padding-inline-start: 22px;
}

.pt-art-doc li {
    margin-bottom: 6px;
}

.pt-tr-source {
    min-height: 200px;
}

.pt-tr-result {
    white-space: pre-wrap;
    line-height: 1.85;
    color: var(--pt-ink);
    font-size: 1rem;
    word-break: break-word;
}

.pt-tr-tones {
    margin-bottom: 0;
}

/* SEO optimizer report */

.pt-seo-shell {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.pt-seo-urlrow {
    display: flex;
    gap: 10px;
    align-items: stretch;
}

.pt-seo-urlrow .pt-input {
    flex: 1;
    min-width: 0;
}

.pt-seo-urlrow .pt-btn {
    white-space: nowrap;
}

.pt-seo-report {
    max-height: none;
}

.pt-seo-head {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
}

.pt-seo-score-ring {
    position: relative;
    width: 96px;
    height: 96px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.pt-seo-score-ring::before {
    content: "";
    position: absolute;
    inset: 9px;
    border-radius: 50%;
    background: #fff;
}

.pt-seo-score-ring strong {
    position: relative;
    font-size: 1.6rem;
    font-weight: 800;
    line-height: 1;
    color: var(--pt-ink);
}

.pt-seo-score-ring span {
    position: relative;
    font-size: 0.75rem;
    color: #94a3b8;
}

.pt-seo-head-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.pt-seo-head-verdict {
    font-size: 1.125rem;
    font-weight: 800;
}

.pt-seo-head-url {
    font-size: 0.8125rem;
    color: #64748b;
    word-break: break-all;
}

.pt-seo-head-title {
    font-size: 0.875rem;
    color: var(--pt-ink);
    font-weight: 500;
}

.pt-seo-summary {
    margin: 16px 0 0;
    padding: 12px 16px;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid var(--pt-border);
    font-size: 0.9375rem;
    line-height: 1.8;
    color: #334155;
}

.pt-seo-section {
    margin-top: 24px;
}

.pt-seo-section h3 {
    font-size: 0.9375rem;
    font-weight: 800;
    color: var(--pt-ink);
    margin: 0 0 12px;
}

.pt-seo-checks {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.pt-seo-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    border: 1px solid var(--pt-border);
    border-radius: 12px;
    padding: 10px 12px;
    background: #fff;
}

.pt-seo-check strong {
    display: block;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--pt-ink);
}

.pt-seo-check span:not(.pt-seo-check-icon) {
    font-size: 0.75rem;
    color: #64748b;
}

.pt-seo-check-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    font-size: 0.8125rem;
    font-weight: 800;
    flex-shrink: 0;
    margin-top: 1px;
}

.pt-seo-check.is-pass .pt-seo-check-icon {
    background: #dcfce7;
    color: #16a34a;
}

.pt-seo-check.is-warn .pt-seo-check-icon {
    background: #fef3c7;
    color: #d97706;
}

.pt-seo-check.is-fail .pt-seo-check-icon {
    background: #fee2e2;
    color: #dc2626;
}

.pt-seo-suggestions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pt-seo-suggestion {
    border: 1px solid var(--pt-border);
    border-inline-start: 3px solid #d97706;
    border-radius: 12px;
    padding: 12px 14px;
    background: #fff;
}

.pt-seo-suggestion.is-high {
    border-inline-start-color: #dc2626;
}

.pt-seo-suggestion.is-low {
    border-inline-start-color: #16a34a;
}

.pt-seo-suggestion-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}

.pt-seo-suggestion-head strong {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--pt-ink);
}

.pt-seo-severity {
    font-size: 0.75rem;
    font-weight: 700;
    color: #64748b;
    background: #f1f5f9;
    border-radius: 999px;
    padding: 3px 10px;
}

.pt-seo-suggestion p {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.75;
    color: #334155;
}

.pt-seo-copycards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.pt-seo-copycard {
    border: 1px solid var(--pt-border);
    border-radius: 12px;
    padding: 12px 14px;
    background: #fff;
}

.pt-seo-copycard-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 6px;
}

.pt-seo-copycard-head strong {
    font-size: 0.8125rem;
    font-weight: 700;
    color: #475569;
}

.pt-seo-copycard-body {
    margin: 0 0 4px;
    font-size: 0.9375rem;
    line-height: 1.7;
    color: var(--pt-ink);
}

.pt-seo-keywords {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pt-seo-keyword {
    border: 1px solid var(--pt-border);
    background: #f8fafc;
    color: #334155;
    border-radius: 999px;
    padding: 7px 14px;
    font: inherit;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: border-color 0.15s ease, color 0.15s ease;
}

.pt-seo-keyword:hover {
    border-color: #c4b5fd;
    color: var(--pt-primary);
}

@media (max-width: 860px) {
    .pt-text-tool .pt-settings,
    .pt-seo-copycards {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .pt-goal-grid,
    .pt-seo-checks {
        grid-template-columns: 1fr;
    }

    .pt-seo-urlrow {
        flex-direction: column;
    }

    .pt-text-output {
        padding: 16px;
    }
}

/* WhatsApp / UTM / IG bio / char count / safe zone tools */
.pt-igbio-count,
.pt-charcount-num {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--brand-muted, #64748b);
}

.pt-igbio-count.is-warn,
.pt-charcount-num.is-warn {
    color: #d97706;
}

.pt-igbio-count.is-over,
.pt-charcount-num.is-over {
    color: #dc2626;
}

.pt-igbio-preview-box {
    min-height: 180px;
    justify-content: flex-start;
    align-items: stretch;
    padding: 20px;
}

.pt-igbio-preview {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    width: 100%;
    text-align: start;
}

.pt-igbio-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #c4b5fd, #7c3aed);
    flex-shrink: 0;
}

.pt-igbio-handle {
    display: block;
    font-weight: 700;
    margin-bottom: 6px;
}

.pt-igbio-text {
    margin: 0;
    white-space: pre-wrap;
    word-break: break-word;
    line-height: 1.45;
    color: #334155;
}

.pt-igbio-placeholder {
    color: #64748b;
}

.pt-safezone-layout {
    margin-top: 12px;
}

.pt-safezone-source-wrap {
    position: relative;
    width: 100%;
    max-width: 520px;
    min-height: 240px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    border: 1px solid var(--pt-border);
    border-radius: 16px;
    overflow: hidden;
}

.pt-safezone-source {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 240px;
}

.pt-safezone-source-img {
    display: block;
    max-width: 100%;
}

.pt-safezone-overlay {
    position: absolute;
    inset: 0;
    margin: auto;
    pointer-events: none;
    display: flex;
    flex-direction: column;
}

.pt-safezone-shade {
    background: rgba(15, 23, 42, 0.52);
}

.pt-safezone-shade-row {
    display: flex;
    width: 100%;
    flex-shrink: 0;
}

.pt-safezone-window {
    flex: 0 0 auto;
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px #7c3aed;
    border-radius: 2px;
}

.pt-safezone-preview-box {
    min-height: 200px;
}

.pt-safezone-canvas {
    max-width: 100%;
    max-height: 420px;
    height: auto;
    border-radius: 8px;
}

.pt-status.is-ok {
    color: #059669;
}

.pt-status.is-error {
    color: #dc2626;
}

/* ---------------------------------------------------------------------------
   AI tools: logo generator / ad caption / hook analyzer
--------------------------------------------------------------------------- */

.pt-wizard-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}

.pt-wizard-nav-btn {
    border: 1px solid var(--pt-border);
    background: #fff;
    color: #64748b;
    border-radius: 999px;
    padding: 8px 14px;
    font: inherit;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
}

.pt-wizard-nav-btn.is-active,
.pt-wizard-nav-btn.is-done {
    border-color: #c4b5fd;
    color: var(--pt-primary);
    background: #faf5ff;
}

.pt-wizard-nav-btn.is-active {
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.12);
}

/* Wizard steps: only the active tab is visible (do not rely on [hidden] alone —
   other stylesheets can override the UA hidden display rule). */
.pt-wizard-step {
    display: none !important;
    flex-direction: column;
    gap: 12px;
}

.pt-wizard-step.is-active {
    display: flex !important;
}

.pt-wizard-step:focus,
.pt-wizard-step:focus-visible {
    outline: none;
}

.pt-logo-refine:not(.is-visible),
.pt-sticky-cta:not(.is-visible) {
    display: none !important;
}

.pt-logo-refine.is-visible {
    display: flex !important;
}

.pt-sticky-cta.is-visible {
    display: flex !important;
}

.pt-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pt-chip {
    border: 1px solid var(--pt-border);
    background: #fff;
    color: #334155;
    border-radius: 999px;
    padding: 8px 14px;
    font: inherit;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.pt-chip:hover {
    border-color: #c4b5fd;
    color: var(--pt-primary);
}

.pt-chip.is-active {
    border-color: var(--pt-primary);
    background: #faf5ff;
    color: var(--pt-primary);
}

.pt-style-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.pt-style-card {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    text-align: start;
    border: 1px solid var(--pt-border);
    background: #fff;
    border-radius: 14px;
    padding: 12px;
    font: inherit;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.pt-style-card strong {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--pt-ink);
}

.pt-style-card:hover {
    border-color: #c4b5fd;
}

.pt-style-card.is-active {
    border-color: var(--pt-primary);
    background: #faf5ff;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.12);
}

.pt-style-preview {
    position: relative;
    height: 56px;
    border-radius: 10px;
    background: var(--pt-primary-soft);
    overflow: hidden;
    color: var(--pt-primary);
    display: grid;
    place-items: center;
    padding: 6px 8px;
}

.pt-style-preview svg {
    display: block;
    width: 100%;
    height: 100%;
    color: inherit;
}

.pt-style-preview-a,
.pt-style-preview-b,
.pt-style-preview-c {
    display: none;
}

.pt-color-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.pt-color-swatch {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px var(--pt-border);
    cursor: pointer;
    padding: 0;
}

.pt-color-swatch.is-ai {
    width: auto;
    height: auto;
    border-radius: 999px;
    padding: 8px 12px;
    background: #f8fafc;
    color: #334155;
    font: inherit;
    font-size: 0.8125rem;
    font-weight: 500;
    box-shadow: none;
    border: 1px solid var(--pt-border);
}

.pt-color-swatch.is-active {
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.35);
}

.pt-color-swatch.is-ai.is-active {
    border-color: var(--pt-primary);
    background: #faf5ff;
    color: var(--pt-primary);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.12);
}

.pt-logo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    width: 100%;
}

.pt-logo-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    border: 1px solid var(--pt-border);
    background: #fff;
    border-radius: 14px;
    padding: 10px;
    font: inherit;
    cursor: pointer;
    text-align: start;
}

.pt-logo-card.is-selected {
    border-color: var(--pt-primary);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.12);
}

.pt-logo-card-media {
    position: relative;
    aspect-ratio: 1;
    border-radius: 10px;
    background: #f8fafc;
    overflow: hidden;
    display: grid;
    place-items: center;
}

.pt-logo-card-badge {
    position: absolute;
    top: 8px;
    inset-inline-start: 8px;
    z-index: 2;
    padding: 4px 8px;
    border-radius: 999px;
    background: var(--pt-primary, #7c3aed);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1.2;
}

.pt-logo-card.is-selected .pt-logo-card-label {
    color: var(--pt-primary, #7c3aed);
}

.pt-logo-card-media img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.pt-logo-enlarge {
    position: absolute;
    top: 8px;
    inset-inline-end: 8px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.88);
    color: #fff;
    cursor: zoom-in;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.28);
}

.pt-logo-enlarge:hover,
.pt-logo-enlarge:focus-visible {
    background: rgba(17, 24, 39, 0.96);
    outline: none;
}

.pt-logo-enlarge svg {
    display: block;
}

.pt-logo-card-label {
    font-size: 0.8125rem;
    color: #64748b;
    font-weight: 500;
}

.pt-logo-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.pt-logo-refine {
    margin-top: 16px;
    flex-direction: column;
    gap: 10px;
    padding: 16px;
    border-radius: 16px;
    border: 1px solid #ddd6fe;
    background: #faf5ff;
}

.pt-logo-refine-kicker {
    margin: 0;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--pt-primary, #7c3aed);
}

.pt-logo-refine-title {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 800;
    color: #1e293b;
}

.pt-logo-refine-sub {
    margin: 0 0 4px;
    font-size: 0.875rem;
    font-weight: 400;
    color: #475569;
    line-height: 1.45;
}

.pt-sticky-cta {
    position: sticky;
    bottom: 12px;
    z-index: 5;
    justify-content: center;
    padding: 8px;
    pointer-events: none;
}

.pt-sticky-cta .pt-btn {
    pointer-events: auto;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.18);
}

/* Ad copywriter loading pill (recreated; not shared with app.html classes) */
.pt-loading-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 10px;
    background: rgba(147, 51, 234, 0.1);
    color: #6d28d9;
    font-weight: 700;
    font-size: 13px;
    font-family: 'Tajawal', system-ui, -apple-system, 'Segoe UI', sans-serif;
    line-height: 1.3;
}

.pt-loading-pill-on-btn {
    padding: 0;
    background: transparent;
    color: inherit;
    font-size: inherit;
    font-weight: 700;
}

.pt-loading-hourglass {
    display: inline-block;
    animation: pt-hourglass 1.2s ease-in-out infinite;
}

@keyframes pt-hourglass {
    0% { transform: rotate(0deg); }
    50% { transform: rotate(180deg); }
    100% { transform: rotate(360deg); }
}

.pt-elapsed-timer {
    font-weight: 400;
    opacity: 0.8;
    font-size: 12px;
    font-variant-numeric: tabular-nums;
}

.pt-status.is-busy {
    display: flex;
    align-items: center;
    background: transparent;
    border: none;
    padding: 0;
    color: inherit;
}

.pt-logo-loading {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

.pt-logo-loading-hint {
    margin: 0;
    font-size: 0.875rem;
    font-weight: 400;
    color: var(--pt-muted, #64748b);
}

.pt-logo-busy-preview .pt-logo-busy-hourglass,
.pt-logo-busy-preview .pt-loading-hourglass {
    font-size: 2.4rem;
    line-height: 1;
}

.pt-logo-busy-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: var(--pt-text, #334155);
}

.pt-logo-busy-timer {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 500;
    color: var(--pt-primary, #7c3aed);
    opacity: 1;
}

.pt-logo-busy-hint {
    margin: 0;
    font-size: 0.875rem;
    font-weight: 400;
    color: var(--pt-muted, #64748b);
}

#pt-cap-run.is-loading {
    opacity: 0.92;
    cursor: wait;
}

.pt-cap-preview-img,
.pt-cap-preview-video {
    max-width: 100%;
    max-height: 360px;
    border-radius: 12px;
    object-fit: contain;
    background: #0f172a08;
}

.pt-cap-preview-video {
    width: 100%;
    display: block;
}

.pt-cap-variant,
.pt-hook-rewrite,
.pt-cap-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 14px;
}

.pt-cap-field-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.pt-cap-field-head strong,
.pt-hook-list-title {
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--pt-ink);
    margin: 0;
}

.pt-cap-count {
    font-size: 0.8125rem;
    color: #64748b;
}

.pt-cap-field-body {
    margin: 0;
    padding: 12px 14px;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid var(--pt-border);
    white-space: pre-wrap;
    line-height: 1.55;
    color: #334155;
}

.pt-score-meter {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
    margin-bottom: 18px;
    padding: 14px;
    border-radius: 14px;
    border: 1px solid var(--pt-border);
    background: #f8fafc;
}

.pt-score-meter-ring {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #fff;
    border: 6px solid #cbd5e1;
}

.pt-score-meter.is-strong .pt-score-meter-ring {
    border-color: #059669;
}

.pt-score-meter.is-ok .pt-score-meter-ring {
    border-color: #d97706;
}

.pt-score-meter.is-weak .pt-score-meter-ring {
    border-color: #dc2626;
}

.pt-score-value {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--pt-ink);
    line-height: 1;
}

.pt-score-max {
    font-size: 0.75rem;
    color: #64748b;
}

.pt-score-meter-copy {
    flex: 1;
    min-width: 160px;
}

.pt-score-meter-copy strong {
    display: block;
    margin-bottom: 4px;
}

.pt-score-meter-copy p {
    margin: 0;
    color: #334155;
    line-height: 1.5;
}

.pt-hook-list {
    margin-bottom: 16px;
}

.pt-hook-bullets {
    margin: 8px 0 0;
    padding-inline-start: 1.2em;
    color: #334155;
    line-height: 1.55;
}

.pt-hook-rewrites {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

@media (min-width: 720px) {
    .pt-style-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .pt-style-grid,
    .pt-logo-grid {
        grid-template-columns: 1fr;
    }
}

.pt-cat-steps {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0;
    margin-bottom: 18px;
    overflow-x: auto;
    scrollbar-width: none;
}
.pt-cat-steps::-webkit-scrollbar {
    display: none;
}
.pt-cat-step {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0;
    border-radius: 0;
    font-size: 13px;
    font-weight: 700;
    color: #94a3b8;
    background: none;
    flex-shrink: 0;
    white-space: nowrap;
}
.pt-cat-step-num {
    display: inline-grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #e2e8f0;
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    flex-shrink: 0;
}
.pt-cat-step-label {
    font-weight: 700;
    white-space: nowrap;
    font-size: 13px;
}
.pt-cat-step.is-active {
    color: #0f172a;
    background: none;
}
.pt-cat-step.is-active .pt-cat-step-num {
    background: #4f46e5;
    color: #fff;
}
.pt-cat-step.is-done {
    color: #334155;
    background: none;
}
.pt-cat-step.is-done .pt-cat-step-num {
    background: #4f46e5;
    color: #fff;
}
.pt-cat-step-line {
    flex: 1 1 28px;
    min-width: 16px;
    max-width: 56px;
    height: 2px;
    margin: 0 8px;
    border-radius: 999px;
    background: #e2e8f0;
    flex-shrink: 1;
}
.pt-cat-step-line.is-done {
    background: #4f46e5;
}
.pt-cat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
}
.pt-cat-card {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
}
.pt-cat-card img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    display: block;
    background: #f8fafc;
}
.pt-cat-card-body {
    padding: 8px 10px 10px;
}
.pt-cat-card-title {
    font-size: 13px;
    font-weight: 500;
    line-height: 1.3;
}
.pt-cat-card-meta {
    font-size: 12px;
    color: var(--brand-muted, #64748b);
}
.pt-cat-card.is-selected {
    border-color: #4f46e5;
    box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.25);
}
.pt-cat-card.is-done {
    border-color: #22c55e;
}
.pt-cat-grid .pt-cat-card {
    cursor: pointer;
}
.pt-cat-progress {
    height: 10px;
    border-radius: 999px;
    background: #e2e8f0;
    overflow: hidden;
}
.pt-cat-progress-fill {
    height: 100%;
    border-radius: 999px;
    background: #4f46e5;
    transition: width 0.4s ease;
}
.pt-cat-progress.is-busy .pt-cat-progress-fill {
    animation: pt-cat-progress-pulse 1.2s ease-in-out infinite;
}
.pt-cat-wait {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 220px;
    padding: 28px 16px;
    text-align: center;
}
.pt-cat-wait-glass {
    font-size: 2.6rem;
    line-height: 1;
}
.pt-cat-wait-title {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
}
.pt-cat-wait-timer {
    margin: 0;
    font-size: 15px;
    font-weight: 500;
}
@keyframes pt-cat-progress-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.55; }
}
.pt-cat-actions {
    position: sticky;
    top: 0;
    z-index: 4;
    display: grid;
    gap: 10px;
    padding: 12px 0 14px;
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
}
.pt-cat-template {
    max-width: 420px;
    width: 100%;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    display: block;
    margin-inline: auto;
}
.pt-cat-paywall {
    padding: 14px;
    border-radius: 12px;
    background: rgba(99, 102, 241, 0.08);
    display: grid;
    gap: 10px;
}
.pt-cat-ttl {
    display: grid;
    gap: 6px;
    padding: 18px 18px 16px;
    border: 2px solid var(--pt-warn-border);
    border-radius: 16px;
    background: var(--pt-warn-bg);
    color: var(--pt-warn-ink);
    text-align: center;
}
.pt-cat-ttl-time {
    margin: 0;
    font-size: 40px;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
    color: var(--pt-warn-ink);
}
.pt-cat-ttl-title {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--pt-ink);
}
.pt-cat-ttl-body {
    margin: 0;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.45;
    color: var(--pt-warn-ink);
}
.pt-cat-tool .pt-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.pt-cat-tool .pt-stack {
    display: grid;
    gap: 12px;
}

.pt-eosb-currency {
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--pt-muted, #64748b);
}

.pt-eosb-check-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.875rem;
    line-height: 1.55;
    color: #334155;
    cursor: pointer;
}

.pt-eosb-check-input {
    margin-top: 3px;
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    accent-color: var(--pt-primary, #7c3aed);
}

.pt-eosb-document {
    border: 1px solid var(--pt-border, #e2e8f0);
    border-radius: 16px;
    background: #fff;
    padding: 22px 20px;
    display: grid;
    gap: 14px;
}

.pt-eosb-kicker {
    margin: 0;
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--pt-muted, #64748b);
}

.pt-eosb-meta {
    margin: 0;
    font-size: 0.875rem;
    color: #475569;
}

.pt-eosb-amount {
    margin: 0;
    font-size: clamp(1.6rem, 4vw, 2.1rem);
    font-weight: 800;
    line-height: 1.2;
    color: var(--pt-ink, #0f172a);
    font-variant-numeric: tabular-nums;
}

.pt-eosb-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.pt-eosb-amount,
.pt-vat-formula {
    text-align: start;
}

.pt-eosb-split-item {
    border: 1px solid var(--pt-border, #e2e8f0);
    border-radius: 12px;
    padding: 10px 12px;
    display: grid;
    gap: 4px;
    text-align: start;
}

.pt-eosb-split-item .pt-label {
    margin: 0;
}

.pt-eosb-banner,
.pt-eosb-warn {
    margin: 0;
    padding: 10px 12px;
    border-radius: 12px;
    font-size: 0.875rem;
    line-height: 1.55;
}

.pt-eosb-banner {
    border: 1px solid var(--pt-warn-border, #e7d3b5);
    background: var(--pt-warn-bg, #faf6f1);
    color: var(--pt-warn-ink, #7c4a1a);
}

.pt-eosb-warn {
    border: 1px solid #fecaca;
    background: #fef2f2;
    color: #991b1b;
}

.pt-eosb-sentence {
    margin: 0;
    font-size: 0.9375rem;
    line-height: 1.7;
    color: #334155;
}

.pt-eosb-disclaimer {
    margin: 0;
    font-size: 0.8125rem;
    line-height: 1.55;
    color: var(--pt-muted, #64748b);
}

@media (max-width: 640px) {
    .pt-eosb-split {
        grid-template-columns: 1fr;
    }

    .pt-eosb-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

@media print {
    @page {
        size: A4;
        margin: 0;
    }

    body.public-tools-page[data-tools-module="eosb"] header,
    body.public-tools-page[data-tools-module="eosb"] footer,
    body.public-tools-page[data-tools-module="eosb"] .top-aurora-wrap,
    body.public-tools-page[data-tools-module="eosb"] .public-tools-portfolio,
    body.public-tools-page[data-tools-module="eosb"] .public-tools-section,
    body.public-tools-page[data-tools-module="eosb"] .public-tools-cta-band,
    body.public-tools-page[data-tools-module="eosb"] .public-tools-workbench-head,
    body.public-tools-page[data-tools-module="eosb"] .pt-controls {
        display: none !important;
    }

    body.public-tools-page[data-tools-module="eosb"] .public-tools-main,
    body.public-tools-page[data-tools-module="eosb"] .container,
    body.public-tools-page[data-tools-module="eosb"] .public-tools-workbench,
    body.public-tools-page[data-tools-module="eosb"] .public-tools-workbench-body,
    body.public-tools-page[data-tools-module="eosb"] .pt-eosb,
    body.public-tools-page[data-tools-module="eosb"] .pt-preview {
        display: block !important;
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 0 !important;
        border: none !important;
        box-shadow: none !important;
        background: #fff !important;
    }

    body.public-tools-page[data-tools-module="eosb"] .pt-eosb-document {
        display: block !important;
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 16mm 14mm !important;
        border: none !important;
        box-shadow: none !important;
        background: #fff !important;
    }

    body.public-tools-page[data-tools-module="eosb"] .pt-panel {
        display: block !important;
        grid-template-columns: none !important;
    }
}

.pt-vat-chips {
    gap: 6px;
}

body.public-tools-page[data-tools-module="vat"] .public-tools-workbench,
body.public-tools-page[data-tools-module="vat"] .public-tools-workbench-body {
    overflow: visible;
}

.pt-vat {
    align-items: stretch;
}

.pt-vat .pt-preview {
    align-self: stretch;
    min-height: 100%;
}

.pt-vat-result-sticky {
    position: sticky;
    top: 5.75rem;
    z-index: 5;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
    border-radius: 16px;
}

.pt-vat-extra {
    margin-top: 16px;
}

.pt-vat-num {
    display: inline-block;
    font-variant-numeric: tabular-nums lining-nums;
    unicode-bidi: isolate;
    direction: ltr;
}

.pt-vat-formula {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    color: var(--pt-primary, #7c3aed);
    font-variant-numeric: tabular-nums;
}

.pt-vat-table td:not(:first-child),
.pt-vat-table th:not(:first-child) {
    text-align: start;
}

.pt-vat-formula {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    color: var(--pt-primary, #7c3aed);
    font-variant-numeric: tabular-nums;
}

.pt-vat-split {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.pt-vat-line {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.9fr) auto;
    gap: 8px;
    align-items: center;
    margin-bottom: 8px;
}

.pt-vat-lines-list {
    display: grid;
    gap: 4px;
    margin-bottom: 10px;
}

@media (max-width: 640px) {
    .pt-vat-split {
        grid-template-columns: 1fr;
    }

    .pt-vat-line {
        grid-template-columns: 1fr;
    }

    .pt-vat-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

@media print {
    body.public-tools-page[data-tools-module="vat"] header,
    body.public-tools-page[data-tools-module="vat"] footer,
    body.public-tools-page[data-tools-module="vat"] .top-aurora-wrap,
    body.public-tools-page[data-tools-module="vat"] .public-tools-portfolio,
    body.public-tools-page[data-tools-module="vat"] .public-tools-section,
    body.public-tools-page[data-tools-module="vat"] .public-tools-cta-band,
    body.public-tools-page[data-tools-module="vat"] .public-tools-workbench-head,
    body.public-tools-page[data-tools-module="vat"] .pt-controls {
        display: none !important;
    }

    body.public-tools-page[data-tools-module="vat"] .public-tools-main,
    body.public-tools-page[data-tools-module="vat"] .container,
    body.public-tools-page[data-tools-module="vat"] .public-tools-workbench,
    body.public-tools-page[data-tools-module="vat"] .public-tools-workbench-body,
    body.public-tools-page[data-tools-module="vat"] .pt-vat,
    body.public-tools-page[data-tools-module="vat"] .pt-preview,
    body.public-tools-page[data-tools-module="vat"] .pt-vat-result-sticky {
        display: block !important;
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 0 !important;
        border: none !important;
        box-shadow: none !important;
        background: #fff !important;
    }

    body.public-tools-page[data-tools-module="vat"] .pt-vat-result-sticky {
        position: static !important;
        top: auto !important;
    }

    body.public-tools-page[data-tools-module="vat"] .pt-vat-document,
    body.public-tools-page[data-tools-module="vat"] .pt-vat-extra {
        display: block !important;
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
        border: none !important;
        box-shadow: none !important;
        background: #fff !important;
    }

    body.public-tools-page[data-tools-module="vat"] .pt-vat-document {
        padding: 16mm 14mm 8mm !important;
    }

    body.public-tools-page[data-tools-module="vat"] .pt-vat-extra {
        padding: 0 14mm 16mm !important;
    }

    body.public-tools-page[data-tools-module="vat"] .pt-panel {
        display: block !important;
        grid-template-columns: none !important;
    }
}

.pt-help {
    margin: 0 0 8px;
    font-size: 13px;
    line-height: 1.55;
    color: var(--brand-muted, #64748b);
}

.pt-doc-block {
    display: grid;
    gap: 4px;
    padding: 14px 14px 6px;
    border: 1px solid var(--pt-border, #e2e8f0);
    border-radius: 16px;
    background: #fff;
}

.pt-doc-block-title {
    margin: 0 0 8px;
    font-size: 15px;
    font-weight: 700;
}

.pt-doc-line {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(72px, 0.5fr) minmax(90px, 0.7fr) minmax(72px, 0.5fr) auto;
    gap: 8px;
    align-items: end;
    margin-bottom: 8px;
}

.pt-doc-line-remove {
    margin-bottom: 18px;
}

.pt-doc-color {
    width: 56px;
    height: 40px;
    padding: 4px;
    border: 1px solid var(--pt-border, #e2e8f0);
    border-radius: 10px;
    background: #fff;
}

.pt-doc-check {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.pt-doc-preview-frame {
    display: flex;
    justify-content: center;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 8px;
    max-height: calc(100dvh - 6.5rem);
}

body.public-tools-page[data-tools-module="docgen"] .public-tools-workbench,
body.public-tools-page[data-tools-module="docgen"] .public-tools-workbench-body {
    overflow: visible;
}

.pt-doc .pt-preview {
    align-self: stretch;
    min-height: 100%;
}

.pt-doc-preview-sticky {
    position: sticky;
    top: 5.75rem;
    z-index: 5;
}

.pt-doc-section-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    margin: 0 0 8px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--pt-ink, #0f172a);
    font: inherit;
    font-size: 15px;
    font-weight: 700;
    text-align: start;
    cursor: pointer;
}

.pt-doc-section-toggle:hover {
    color: var(--pt-primary, #7c3aed);
}

.pt-doc-section-mark {
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: 1px solid var(--pt-border, #e2e8f0);
    background: #f8fafc;
    color: var(--pt-primary, #7c3aed);
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
}

.pt-doc-section-body {
    display: grid;
    gap: 4px;
}

.pt-doc-section-body[hidden] {
    display: none !important;
}

.pt-doc-sheet {
    width: 210mm;
    min-width: min(210mm, 100%);
    max-width: 100%;
    min-height: 297mm;
    box-sizing: border-box;
    padding: 18mm 16mm 16mm;
    background: #fff;
    color: #111827;
    border: 1px solid #e5e7eb;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
    font-family: 'Tajawal', system-ui, -apple-system, 'Segoe UI', sans-serif;
    font-size: 13px;
    line-height: 1.55;
    position: relative;
}

.pt-doc-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 14px;
    margin-bottom: 16px;
    border-bottom: 4px solid var(--pt-doc-accent, #6d28d9);
}

.pt-doc-brand {
    display: flex;
    gap: 12px;
    min-width: 0;
}

.pt-doc-logo {
    width: 64px;
    height: 64px;
    object-fit: contain;
    border-radius: 8px;
    background: #f8fafc;
}

.pt-doc-logo-fallback {
    width: 64px;
    height: 64px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 28px;
    color: #fff;
    background: var(--pt-doc-accent, #6d28d9);
}

.pt-doc-seller-name,
.pt-doc-party-name,
.pt-doc-number {
    font-weight: 800;
    margin: 0 0 4px;
}

.pt-doc-kicker {
    margin: 0 0 4px;
    font-size: 12px;
    font-weight: 700;
    color: var(--pt-doc-accent, #6d28d9);
}

.pt-doc-meta {
    text-align: start;
}

.pt-doc-parties {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 18px;
}

.pt-doc-party-label {
    margin: 0 0 4px;
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    letter-spacing: 0.04em;
}

.pt-doc-num {
    font-variant-numeric: tabular-nums lining-nums;
    unicode-bidi: isolate;
    direction: ltr;
}

.pt-doc-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 16px;
}

.pt-doc-table th,
.pt-doc-table td {
    border-bottom: 1px solid #e5e7eb;
    padding: 8px 6px;
    text-align: start;
}

.pt-doc-table th {
    font-size: 11px;
    color: #64748b;
    font-weight: 700;
}

.pt-doc-totals {
    width: min(280px, 100%);
    margin-inline-start: auto;
    margin-bottom: 16px;
}

.pt-doc-totals p {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 6px;
}

.pt-doc-grand {
    padding-top: 8px;
    border-top: 2px solid var(--pt-doc-accent, #6d28d9);
    font-size: 15px;
}

.pt-doc-tafqeet {
    font-weight: 700;
    margin: 0 0 10px;
}

.pt-doc-notes,
.pt-doc-sign {
    margin-top: 18px;
    padding-top: 12px;
    border-top: 1px dashed #cbd5e1;
}

.pt-doc-qr {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    margin-top: 16px;
}

.pt-doc-qr-label {
    font-weight: 700;
    margin: 0;
}

.pt-doc-qr-note {
    margin: 0;
    font-size: 11px;
    color: #64748b;
}

.pt-doc-ribbon {
    position: absolute;
    top: 18px;
    inset-inline-start: 0;
    padding: 4px 14px;
    font-size: 12px;
    font-weight: 800;
    color: #fff;
    background: #6d28d9;
}

.pt-doc-ribbon-sent { background: #2563eb; }
.pt-doc-ribbon-accepted { background: #059669; }
.pt-doc-ribbon-expired { background: #b45309; }

.pt-doc-sign-line {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    margin-top: 28px;
}

.pt-doc-sign-blank {
    flex: 1;
    border-bottom: 1px solid #111827;
    min-height: 36px;
}

@media (max-width: 900px) {
    .pt-doc-line {
        grid-template-columns: 1fr 1fr;
    }

    .pt-doc-line-remove {
        grid-column: 1 / -1;
        margin-bottom: 8px;
    }
}

@media print {
    body.public-tools-page[data-tools-module="docgen"] header,
    body.public-tools-page[data-tools-module="docgen"] footer,
    body.public-tools-page[data-tools-module="docgen"] .top-aurora-wrap,
    body.public-tools-page[data-tools-module="docgen"] .public-tools-portfolio,
    body.public-tools-page[data-tools-module="docgen"] .public-tools-section,
    body.public-tools-page[data-tools-module="docgen"] .public-tools-cta-band,
    body.public-tools-page[data-tools-module="docgen"] .public-tools-workbench-head,
    body.public-tools-page[data-tools-module="docgen"] .pt-controls {
        display: none !important;
    }

    body.public-tools-page[data-tools-module="docgen"] .public-tools-main,
    body.public-tools-page[data-tools-module="docgen"] .container,
    body.public-tools-page[data-tools-module="docgen"] .public-tools-workbench,
    body.public-tools-page[data-tools-module="docgen"] .public-tools-workbench-body,
    body.public-tools-page[data-tools-module="docgen"] .pt-doc,
    body.public-tools-page[data-tools-module="docgen"] .pt-preview,
    body.public-tools-page[data-tools-module="docgen"] .pt-doc-preview-sticky,
    body.public-tools-page[data-tools-module="docgen"] .pt-doc-preview-frame {
        display: block !important;
        width: 100% !important;
        max-width: none !important;
        max-height: none !important;
        margin: 0 !important;
        padding: 0 !important;
        border: none !important;
        box-shadow: none !important;
        background: #fff !important;
        position: static !important;
        overflow: visible !important;
    }

    body.public-tools-page[data-tools-module="docgen"] .pt-panel {
        display: block !important;
        grid-template-columns: none !important;
    }

    body.public-tools-page[data-tools-module="docgen"] .pt-doc-sheet {
        display: block !important;
        width: 100% !important;
        max-width: none !important;
        max-height: none !important;
        min-height: 0 !important;
        margin: 0 !important;
        padding: 16mm 14mm !important;
        border: none !important;
        box-shadow: none !important;
        background: #fff !important;
        position: relative !important;
        overflow: visible !important;
    }
}

.pt-feasib-presets {
    flex-wrap: wrap;
}

body.public-tools-page[data-tools-module="feasib"] .public-tools-workbench,
body.public-tools-page[data-tools-module="feasib"] .public-tools-workbench-body {
    overflow: visible;
}

.pt-feasib-aside {
    min-width: 0;
    align-self: stretch;
    min-height: 100%;
}

.pt-feasib-aside-inner {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-height: 100%;
}

.pt-feasib-live {
    padding: 18px 20px;
    border-radius: 16px;
    border: 1px solid var(--pt-border, #e2e8f0);
    background: #fff;
    position: sticky;
    top: 5.75rem;
    z-index: 6;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

.pt-feasib-num {
    font-variant-numeric: tabular-nums lining-nums;
    unicode-bidi: isolate;
    direction: ltr;
}

.pt-feasib-section-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    margin: 0 0 8px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--pt-ink, #0f172a);
    font: inherit;
    font-size: 15px;
    font-weight: 700;
    text-align: start;
    cursor: pointer;
}

.pt-feasib-section-toggle:hover {
    color: var(--pt-primary, #7c3aed);
}

.pt-feasib-section-mark {
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: 1px solid var(--pt-border, #e2e8f0);
    background: #f8fafc;
    color: var(--pt-primary, #7c3aed);
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
}

.pt-feasib-section-body {
    display: grid;
    gap: 4px;
}

.pt-feasib-section-body[hidden] {
    display: none !important;
}

.pt-feasib-live-kicker {
    margin: 0 0 4px;
    font-size: 12px;
    font-weight: 700;
    color: var(--brand-muted, #64748b);
}

.pt-feasib-live-head {
    margin: 0 0 8px;
    font-size: 28px;
    font-weight: 800;
    line-height: 1.2;
    color: var(--pt-primary, #6d28d9);
}

.pt-feasib-document {
    padding: 20px 22px;
    border-radius: 16px;
    border: 1px solid var(--pt-border, #e2e8f0);
    background: #fff;
    font-family: 'Tajawal', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

.pt-feasib-kicker {
    margin: 0 0 4px;
    font-size: 12px;
    font-weight: 700;
    color: var(--pt-primary, #6d28d9);
}

.pt-feasib-doc-title {
    margin: 0 0 8px;
    font-size: 22px;
    font-weight: 800;
}

.pt-feasib-headline {
    margin: 12px 0 4px;
    font-size: 20px;
    font-weight: 800;
}

.pt-feasib-subhead,
.pt-feasib-meta,
.pt-feasib-foot {
    margin: 0 0 10px;
    color: var(--brand-muted, #64748b);
    font-size: 13px;
}

.pt-feasib-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 16px 0;
}

.pt-feasib-metric {
    padding: 10px 12px;
    border-radius: 12px;
    background: #f8fafc;
}

.pt-feasib-metric.is-bad strong,
.pt-feasib-table tr.is-bad td,
.pt-feasib-rule.is-bad {
    color: #b45309;
}

.pt-feasib-table {
    width: 100%;
    border-collapse: collapse;
    margin: 12px 0 16px;
    font-size: 13px;
}

.pt-feasib-table th,
.pt-feasib-table td {
    text-align: start;
    padding: 8px 6px;
    border-bottom: 1px solid #e5e7eb;
}

.pt-feasib-rule {
    font-weight: 700;
    margin: 0 0 12px;
}

.pt-feasib-warnings {
    margin: 0 0 12px;
    padding-inline-start: 18px;
    color: #9a3412;
}

.pt-feasib-custom-row {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr) auto;
    gap: 8px;
    align-items: end;
    margin-bottom: 8px;
}

@media (max-width: 960px) {
    .pt-feasib-live {
        top: 4.75rem;
    }
}

@media (max-width: 640px) {
    .pt-feasib-grid,
    .pt-feasib-custom-row {
        grid-template-columns: 1fr;
    }
}

@media print {
    body.public-tools-page[data-tools-module="feasib"] header,
    body.public-tools-page[data-tools-module="feasib"] footer,
    body.public-tools-page[data-tools-module="feasib"] .top-aurora-wrap,
    body.public-tools-page[data-tools-module="feasib"] .public-tools-portfolio,
    body.public-tools-page[data-tools-module="feasib"] .public-tools-section,
    body.public-tools-page[data-tools-module="feasib"] .public-tools-cta-band,
    body.public-tools-page[data-tools-module="feasib"] .public-tools-workbench-head,
    body.public-tools-page[data-tools-module="feasib"] .pt-controls,
    body.public-tools-page[data-tools-module="feasib"] .pt-feasib-live {
        display: none !important;
    }

    body.public-tools-page[data-tools-module="feasib"] .public-tools-main,
    body.public-tools-page[data-tools-module="feasib"] .container,
    body.public-tools-page[data-tools-module="feasib"] .public-tools-workbench,
    body.public-tools-page[data-tools-module="feasib"] .public-tools-workbench-body,
    body.public-tools-page[data-tools-module="feasib"] .pt-feasib,
    body.public-tools-page[data-tools-module="feasib"] .pt-feasib-aside,
    body.public-tools-page[data-tools-module="feasib"] .pt-preview {
        display: block !important;
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 0 !important;
        border: none !important;
        box-shadow: none !important;
        background: #fff !important;
    }

    body.public-tools-page[data-tools-module="feasib"] .pt-feasib-document {
        display: block !important;
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 16mm 14mm !important;
        border: none !important;
        box-shadow: none !important;
        background: #fff !important;
    }

    body.public-tools-page[data-tools-module="feasib"] .pt-panel {
        display: block !important;
        grid-template-columns: none !important;
    }
}

.pt-menu-preview-frame {
    min-width: 0;
    overflow: hidden;
}

.pt-menu-stack {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.pt-menu-scale {
    transform: scale(var(--pt-menu-scale, 1));
    transform-origin: top center;
}

.pt-menu-sheet {
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    overflow: hidden;
    position: relative;
    font-family: 'Tajawal', system-ui, -apple-system, 'Segoe UI', sans-serif;
    color: #1c1917;
    background: #faf6ef;
    border: 1px solid #e7e0d6;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
    --pt-menu-accent: #7c2d12;
}

.pt-menu-sheet.is-a4 {
    width: 210mm;
    height: 297mm;
    padding: 16mm 14mm 12mm;
    font-size: 13px;
    line-height: 1.5;
}

.pt-menu-sheet.is-story {
    width: 1080px;
    height: 1920px;
    padding: 72px 64px 56px;
    font-size: 28px;
    line-height: 1.45;
}

.pt-menu-head {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-bottom: 12px;
    margin-bottom: 14px;
    border-bottom: 3px solid var(--pt-menu-accent);
}

.pt-menu-logo,
.pt-menu-logo-fallback {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    object-fit: contain;
    flex: 0 0 auto;
    background: #fff;
}

.pt-menu-sheet.is-story .pt-menu-logo,
.pt-menu-sheet.is-story .pt-menu-logo-fallback {
    width: 128px;
    height: 128px;
}

.pt-menu-logo-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 28px;
    color: #fff;
    background: var(--pt-menu-accent);
}

.pt-menu-kicker {
    margin: 0 0 2px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--pt-menu-accent);
}

.pt-menu-sheet.is-story .pt-menu-kicker {
    font-size: 18px;
}

.pt-menu-title {
    margin: 0;
    font-size: 26px;
    font-weight: 800;
    line-height: 1.2;
}

.pt-menu-sheet.is-story .pt-menu-title {
    font-size: 52px;
}

.pt-menu-tagline {
    margin: 4px 0 0;
    color: #57534e;
}

.pt-menu-body {
    flex: 1;
    min-height: 0;
}

.pt-menu-section-title {
    margin: 14px 0 8px;
    font-size: 16px;
    font-weight: 800;
    color: var(--pt-menu-accent);
}

.pt-menu-sheet.is-story .pt-menu-section-title {
    font-size: 32px;
    margin: 28px 0 16px;
}

.pt-menu-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px 16px;
    align-items: start;
    padding: 8px 0;
    border-bottom: 1px dotted #d6d3d1;
}

.pt-menu-item.has-photo {
    grid-template-columns: 52px minmax(0, 1fr) auto;
}

.pt-menu-sheet.is-story .pt-menu-item.has-photo {
    grid-template-columns: 96px minmax(0, 1fr) auto;
}

.pt-menu-item-photo {
    width: 52px;
    height: 52px;
    object-fit: cover;
    border-radius: 10px;
}

.pt-menu-sheet.is-story .pt-menu-item-photo {
    width: 96px;
    height: 96px;
}

.pt-menu-item-name {
    margin: 0;
    font-weight: 700;
}

.pt-menu-item-desc {
    margin: 2px 0 0;
    font-size: 12px;
    color: #57534e;
}

.pt-menu-sheet.is-story .pt-menu-item-desc {
    font-size: 22px;
}

.pt-menu-item-tags {
    margin: 4px 0 0;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.pt-menu-tag {
    font-size: 11px;
    font-weight: 500;
}

.pt-menu-item-price {
    margin: 0;
    font-weight: 800;
    white-space: nowrap;
    color: var(--pt-menu-accent);
}

.pt-menu-foot {
    margin-top: auto;
    padding-top: 10px;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    border-top: 1px solid #e7e0d6;
}

.pt-menu-notes p {
    margin: 0 0 4px;
    font-size: 11px;
    color: #57534e;
}

.pt-menu-sheet.is-story .pt-menu-notes p {
    font-size: 20px;
}

.pt-menu-pageno {
    margin: 0;
    font-size: 11px;
    font-weight: 700;
    color: #78716c;
}

.pt-menu-qr {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pt-menu-qr-label {
    margin: 0;
    font-size: 11px;
    font-weight: 700;
}

.pt-menu-qr-box canvas,
.pt-menu-qr-box img {
    display: block;
}

.pt-menu-sheet.is-modern {
    background: #fff;
    border-color: #e5e7eb;
}

.pt-menu-sheet.is-modern .pt-menu-head {
    border-bottom-width: 2px;
}

.pt-menu-sheet.is-modern .pt-menu-item {
    border-bottom-style: solid;
    border-bottom-color: #f1f5f9;
}

.pt-menu-sheet.is-dark {
    background: #161412;
    color: #f5ead6;
    border-color: #2a241f;
}

.pt-menu-sheet.is-dark .pt-menu-tagline,
.pt-menu-sheet.is-dark .pt-menu-item-desc,
.pt-menu-sheet.is-dark .pt-menu-notes p,
.pt-menu-sheet.is-dark .pt-menu-pageno {
    color: #d6c7b2;
}

.pt-menu-sheet.is-dark .pt-menu-item {
    border-bottom-color: #3f3a34;
}

.pt-menu-sheet.is-dark .pt-menu-foot {
    border-top-color: #3f3a34;
}

.pt-menu-sheet.is-dark .pt-menu-logo {
    background: #1f1b18;
}

.pt-menu-item-editor {
    border-bottom: 1px solid var(--pt-border, #e2e8f0);
}

.pt-menu-item-fields {
    display: grid;
    gap: 4px;
    padding: 4px 0 8px;
}

/* Collapsed dish row: photo, name, price, chevron. Tap to edit. */
.pt-menu-item-sum {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr) auto 12px;
    align-items: center;
    gap: 12px;
    min-height: 56px;
    padding: 8px 0;
    cursor: pointer;
    list-style: none;
}

.pt-menu-item-sum::-webkit-details-marker {
    display: none;
}

.pt-menu-item-sum::after {
    content: "";
    width: 8px;
    height: 8px;
    border-right: 2px solid #64748b;
    border-bottom: 2px solid #64748b;
    transform: translateY(-2px) rotate(45deg);
    transition: transform 0.2s ease;
}

.pt-menu-item-editor[open] > .pt-menu-item-sum::after {
    transform: translateY(2px) rotate(-135deg);
}

.pt-menu-item-sum:focus-visible {
    outline: 2px solid var(--pt-primary, #7c3aed);
    outline-offset: 2px;
    border-radius: 8px;
}

.pt-menu-sum-thumb {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    object-fit: cover;
}

.pt-menu-sum-thumb.is-empty {
    background: #f1f5f9;
    border: 1px dashed #cbd5e1;
}

.pt-menu-item-sum-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 700;
    color: var(--pt-ink, #0f172a);
}

.pt-menu-item-sum-price {
    font-size: 0.875rem;
    color: #475569;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.pt-menu-price-row,
.pt-menu-photo-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    align-items: end;
}

.pt-menu-thumb {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 10px;
}

.pt-menu-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 14px;
    margin: 6px 0;
}

.pt-menu-item-adly {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    margin: 0 0 4px;
    font-size: 13px;
    font-weight: 500;
    color: var(--pt-primary, #7c3aed);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.pt-menu-textarea {
    min-height: 72px;
    resize: vertical;
}

.pt-menu-item-remove {
    justify-self: start;
}

@media (max-width: 640px) {
    .pt-menu-price-row,
    .pt-menu-photo-row {
        grid-template-columns: 1fr;
    }
}

@media print {
    body.public-tools-page[data-tools-module="menu"] header,
    body.public-tools-page[data-tools-module="menu"] footer,
    body.public-tools-page[data-tools-module="menu"] .top-aurora-wrap,
    body.public-tools-page[data-tools-module="menu"] .public-tools-portfolio,
    body.public-tools-page[data-tools-module="menu"] .public-tools-section,
    body.public-tools-page[data-tools-module="menu"] .public-tools-cta-band,
    body.public-tools-page[data-tools-module="menu"] .public-tools-workbench-head,
    body.public-tools-page[data-tools-module="menu"] .pt-controls {
        display: none !important;
    }

    body.public-tools-page[data-tools-module="menu"] .public-tools-main,
    body.public-tools-page[data-tools-module="menu"] .container,
    body.public-tools-page[data-tools-module="menu"] .public-tools-workbench,
    body.public-tools-page[data-tools-module="menu"] .public-tools-workbench-body,
    body.public-tools-page[data-tools-module="menu"] .pt-menu,
    body.public-tools-page[data-tools-module="menu"] .pt-preview,
    body.public-tools-page[data-tools-module="menu"] .pt-menu-preview-frame,
    body.public-tools-page[data-tools-module="menu"] .pt-menu-stack,
    body.public-tools-page[data-tools-module="menu"] .pt-menu-scale,
    body.public-tools-page[data-tools-module="menu"] .pt-menu-sheet {
        display: block !important;
        width: auto !important;
        max-width: none !important;
        margin: 0 auto !important;
        padding: 0 !important;
        border: none !important;
        box-shadow: none !important;
        background: transparent !important;
        overflow: visible !important;
        height: auto !important;
        transform: none !important;
    }

    body.public-tools-page[data-tools-module="menu"] .pt-panel {
        display: block !important;
        grid-template-columns: none !important;
    }

    body.public-tools-page[data-tools-module="menu"] .pt-menu-sheet {
        page-break-after: always;
        break-after: page;
        box-shadow: none !important;
        border: none !important;
    }

    body.public-tools-page[data-tools-module="menu"] .pt-menu-sheet.is-a4 {
        width: 210mm !important;
        height: 297mm !important;
        padding: 16mm 14mm 12mm !important;
        background: #faf6ef !important;
    }

    body.public-tools-page[data-tools-module="menu"] .pt-menu-sheet.is-a4.is-modern {
        background: #fff !important;
    }

    body.public-tools-page[data-tools-module="menu"] .pt-menu-sheet.is-a4.is-dark,
    body.public-tools-page[data-tools-module="menu"] .pt-menu-sheet.is-story.is-dark {
        background: #161412 !important;
    }

    body.public-tools-page[data-tools-module="menu"] .pt-menu-sheet.is-story {
        width: 1080px !important;
        height: 1920px !important;
        padding: 72px 64px 56px !important;
    }

    body.public-tools-page[data-tools-module="menu"] .pt-menu-sheet:last-child {
        page-break-after: auto;
        break-after: auto;
    }
}

.pt-whitebg-files {
    display: grid;
    gap: 8px;
}

.pt-whitebg-file {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    text-align: start;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid var(--pt-border, #e2e8f0);
    background: #fff;
    font: inherit;
    cursor: pointer;
}

.pt-whitebg-file.is-active {
    border-color: var(--pt-primary, #7c3aed);
    background: var(--pt-primary-soft, #f5f3ff);
}

.pt-whitebg-file span {
    color: var(--pt-muted, #64748b);
    font-size: 13px;
}

.pt-whitebg-preview {
    min-height: 280px;
}

.pt-whitebg-slider {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    background: #fff;
    aspect-ratio: 1;
    border: 1px solid var(--pt-border, #e2e8f0);
    container-type: inline-size;
}

.pt-whitebg-slider-after,
.pt-whitebg-slider-before img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #fff;
}

.pt-whitebg-slider-after {
    height: 100%;
}

.pt-whitebg-slider-before {
    position: absolute;
    inset-block: 0;
    inset-inline-start: 0;
    width: var(--split, 50%);
    overflow: hidden;
}

.pt-whitebg-slider-before img {
    position: absolute;
    inset-inline-start: 0;
    top: 0;
    width: 100cqw;
    max-width: none;
    height: 100%;
}

.pt-whitebg-slider-handle {
    position: absolute;
    inset-block: 0;
    inset-inline-start: var(--split, 50%);
    width: 2px;
    background: var(--pt-primary, #7c3aed);
    transform: translateX(-1px);
    pointer-events: none;
}

html[dir="rtl"] .pt-whitebg-slider-handle {
    transform: translateX(1px);
}

.pt-whitebg-slider-range {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: ew-resize;
}

.pt-whitebg-presets .pt-chip {
    position: relative;
}

.pt-textimg {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
    gap: 20px;
    align-items: stretch;
    height: calc(100dvh - 10.75rem);
    min-height: 520px;
    max-height: calc(100dvh - 10.75rem);
}

body.public-tools-page[data-tools-module="textimg"] .public-tools-workbench-body {
    padding: 16px 18px 18px;
}

.pt-textimg-stage-col {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
}

.pt-textimg-templates {
    flex: 0 0 auto;
    margin-bottom: 10px;
}

.pt-textimg-stage {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1 1 auto;
    min-height: 0;
    padding: 14px;
    border-radius: 16px;
    background:
        linear-gradient(45deg, #e2e8f0 25%, transparent 25%) 0 0 / 20px 20px,
        linear-gradient(-45deg, #e2e8f0 25%, transparent 25%) 0 10px / 20px 20px,
        #f8fafc;
    border: 1px solid var(--pt-border, #e2e8f0);
    touch-action: none;
}

.pt-textimg-canvas {
    display: block;
    max-width: 100%;
    max-height: min(100%, calc(100dvh - 22rem));
    width: auto;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.18);
    touch-action: none;
    cursor: grab;
    background: #111;
}

.pt-textimg-canvas:active {
    cursor: grabbing;
}

.pt-textimg-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 12px;
    margin-top: 20px;
    padding-top: 4px;
}

.pt-textimg-toolbar-group {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.pt-textimg-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 42px;
    padding: 8px 14px;
    border: 1px solid var(--pt-border, #e2e8f0);
    background: #fff;
    color: var(--pt-ink, #0f172a);
    border-radius: 999px;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.pt-textimg-icon-btn svg {
    flex: 0 0 auto;
}

.pt-textimg-icon-btn:hover:not(:disabled) {
    border-color: #c4b5fd;
    color: var(--pt-primary, #7c3aed);
}

.pt-textimg-icon-btn:disabled {
    opacity: 0.4;
    cursor: default;
}

.pt-textimg-icon-btn.is-primary {
    background: var(--pt-primary, #7c3aed);
    border-color: var(--pt-primary, #7c3aed);
    color: #fff;
}

.pt-textimg-icon-btn.is-primary:hover:not(:disabled) {
    background: var(--pt-primary-hover, #6d28d9);
    border-color: var(--pt-primary-hover, #6d28d9);
    color: #fff;
}

.pt-textimg-icon-btn.is-ghost {
    background: var(--pt-primary-soft, #f5f3ff);
    border-color: #ddd6fe;
    color: var(--pt-primary, #7c3aed);
}

.pt-textimg-side {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-inline-end: 4px;
    padding-bottom: 8px;
}

.pt-textimg-side .pt-field {
    margin-bottom: 12px;
}

.pt-textimg-side-head {
    position: sticky;
    top: 0;
    z-index: 3;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding-bottom: 10px;
    background: var(--pt-surface, #fff);
    box-shadow: 0 10px 14px -10px rgba(15, 23, 42, 0.18);
}

.pt-textimg-side-block {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pt-textimg-board {
    padding-bottom: 14px;
    border-bottom: 1px solid var(--pt-border, #e2e8f0);
}

.pt-textimg-layers {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
}

.pt-textimg-layer {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 100%;
    border: 1px solid var(--pt-border, #e2e8f0);
    background: #fff;
    color: var(--pt-ink, #0f172a);
    border-radius: 999px;
    padding: 7px 12px;
    font: inherit;
    font-size: 13px;
    font-weight: 500;
    text-align: start;
    cursor: pointer;
}

.pt-textimg-layer span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 16ch;
}

.pt-textimg-layer svg {
    flex: 0 0 auto;
}

.pt-textimg-layer.is-active {
    border-color: #a78bfa;
    background: var(--pt-primary-soft, #f5f3ff);
    color: var(--pt-primary, #7c3aed);
}

.pt-textimg-add-hint {
    margin: 0;
}

.pt-textimg-add-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.pt-textimg-add-btn {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    min-height: 44px;
    padding: 10px 12px;
    border: 1.5px dashed #c4b5fd;
    background: #faf5ff;
    color: #5b21b6;
    border-radius: 12px;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    text-align: start;
    cursor: pointer;
}

.pt-textimg-add-btn svg {
    flex: 0 0 auto;
}

.pt-textimg-add-btn:hover {
    border-style: solid;
    background: var(--pt-primary-soft, #f5f3ff);
    color: var(--pt-primary, #7c3aed);
}

.pt-textimg-colors {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.pt-textimg-color {
    width: 52px;
    min-width: 52px;
    padding: 4px;
    height: 40px;
}

.pt-textimg-form {
    padding: 12px;
    border: 1px solid var(--pt-border, #e2e8f0);
    border-radius: 14px;
    background: #fff;
}

.pt-textimg-form .pt-textarea {
    min-height: 72px;
    resize: vertical;
}

@media (max-width: 800px) {
    .pt-textimg {
        grid-template-columns: 1fr;
        height: auto;
        max-height: none;
        min-height: 0;
    }

    .pt-textimg-stage {
        min-height: 240px;
    }

    .pt-textimg-canvas {
        max-height: min(52vh, 420px);
    }

    .pt-textimg-side {
        overflow: visible;
        max-height: none;
    }
}

/* Arabic text to speech */
.pt-tts-textarea {
    min-height: 132px;
    font-size: 1rem;
    line-height: 1.7;
}

.pt-tts-count.is-warn {
    color: #d97706;
}

.pt-tts-count,
.pt-tts-speed-val {
    unicode-bidi: isolate;
    direction: ltr;
    text-align: start;
}

.pt-tts-count.is-over {
    color: #dc2626;
}

.pt-tts-tip {
    margin-top: 6px;
    color: var(--pt-ink);
    font-weight: 500;
}

.pt-tts-voices {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.pt-tts-voice {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    text-align: start;
    border: 1px solid var(--pt-border);
    background: #fff;
    border-radius: 14px;
    padding: 12px 14px;
    font: inherit;
    cursor: pointer;
    color: var(--pt-ink);
    transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.pt-tts-voice:hover {
    border-color: #c4b5fd;
}

.pt-tts-voice.is-active {
    border-color: var(--pt-primary);
    background: var(--pt-primary-soft);
    box-shadow: 0 0 0 1px rgba(124, 58, 237, 0.18);
}

.pt-tts-voice.is-playing {
    border-color: #7c3aed;
}

.pt-tts-voice-title {
    font-size: 0.9375rem;
    font-weight: 700;
}

.pt-tts-voice-tone {
    font-size: 0.8125rem;
    color: var(--pt-muted);
}

.pt-tts-voice-play {
    margin-top: 6px;
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--pt-primary);
    background: transparent;
    border: 0;
    padding: 0;
    cursor: pointer;
    font-family: inherit;
}

.pt-tts-speed-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pt-tts-speed-row .pt-input[type="range"] {
    flex: 1;
}

.pt-tts-speed-val {
    min-width: 3.2em;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.pt-tts-preview {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.pt-tts-sample,
.pt-tts-output {
    border: 1px solid var(--pt-border);
    border-radius: 16px;
    background: #fff;
    padding: 16px;
}

.pt-tts-sample-title {
    margin: 0 0 6px;
    font-size: 1rem;
    font-weight: 800;
}

.pt-tts-player {
    display: block;
    width: 100%;
    margin-top: 10px;
}

.pt-tts-duration {
    margin: 8px 0 0;
    font-size: 0.875rem;
    color: var(--pt-muted);
    font-weight: 500;
}

.pt-tts-cap-cta {
    margin-top: 12px;
    padding: 14px;
    border-radius: 14px;
    background: #faf5ff;
    border: 1px solid #e9d5ff;
}

.pt-tts-cap-cta .pt-btn {
    display: inline-flex;
    margin-top: 8px;
    text-decoration: none;
}

@media (max-width: 640px) {
    /* Two voices per row: one per row stacked six cards (about 750px) before the speed and Generate. */
    .pt-tts-voices {
        gap: 8px;
    }

    .pt-tts-voice {
        padding: 10px 12px;
    }
}




/* Social tools: grid maker, carousel splitter, handle checkers, caption/tag generators,
   LinkedIn formatter, YouTube title checker. */
/* Image previews keep the photo's own left-to-right order on Arabic pages. */
.pt-soc-grid-preview, .pt-soc-slides, .pt-soc-strip { direction: ltr; }
.pt-soc-grid-preview { display: grid; gap: 4px; background: #0f172a; padding: 4px; border-radius: 12px; max-width: 520px; margin: 0 auto; }
.pt-soc-tile { position: relative; background: #fff; border-radius: 4px; overflow: hidden; }
.pt-soc-tile canvas, .pt-soc-slide canvas { display: block; width: 100%; height: auto; }
.pt-soc-tile-num { position: absolute; top: 6px; inset-inline-start: 6px; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 999px; background: rgba(15, 23, 42, 0.82); color: #fff; font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.pt-soc-tile-dl { position: absolute; bottom: 6px; inset-inline-end: 6px; }
.pt-soc-slides { display: flex; gap: 10px; overflow-x: auto; padding: 6px 2px 10px; scroll-snap-type: x mandatory; }
.pt-soc-slide { position: relative; flex: 0 0 auto; width: min(220px, 60vw); scroll-snap-align: start; border-radius: 10px; overflow: hidden; border: 1px solid var(--pt-border, #e2e8f0); background: #fff; }
.pt-soc-strip { position: relative; border-radius: 12px; overflow: hidden; border: 1px solid var(--pt-border, #e2e8f0); }
.pt-soc-strip canvas { display: block; width: 100%; height: auto; }
.pt-soc-rules { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 6px; }
.pt-soc-rules li { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; line-height: 1.5; }
.pt-soc-rules li::before { content: "✓"; color: #16a34a; font-weight: 800; }
.pt-soc-rules li.is-bad::before { content: "✕"; color: #dc2626; }
.pt-soc-rules li.is-warn::before { content: "!"; color: #d97706; }
.pt-soc-handle-row { display: flex; gap: 8px; align-items: center; }
.pt-soc-handle-at { font-weight: 700; color: var(--pt-muted, #64748b); }
.pt-soc-suggest { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.pt-soc-suggest a { display: inline-flex; align-items: center; padding: 6px 12px; border-radius: 999px; border: 1px solid #ddd6fe; background: #f5f3ff; color: #5b21b6; font-size: 13px; font-weight: 500; text-decoration: none; direction: ltr; }
.pt-soc-suggest a:hover { border-color: #7c3aed; }
.pt-soc-cards { display: grid; gap: 10px; margin-top: 12px; }
.pt-soc-card { border: 1px solid var(--pt-border, #e2e8f0); border-radius: 12px; padding: 12px 14px; background: #fff; display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; }
.pt-soc-card p { margin: 0; white-space: pre-wrap; line-height: 1.6; font-size: 14px; }
.pt-soc-card .pt-soc-tags { color: #6d28d9; margin-top: 6px; font-size: 13px; }
.pt-soc-taglist { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.pt-soc-taglist button { border: 1px solid var(--pt-border, #e2e8f0); background: #fff; border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 13px; cursor: pointer; }
.pt-soc-taglist button:hover { border-color: #7c3aed; color: #5b21b6; }
.pt-soc-counter { font-size: 13px; color: var(--pt-muted, #64748b); }
.pt-soc-counter.is-over { color: #dc2626; font-weight: 700; }
.pt-soc-toolbar { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.pt-soc-li-preview { border: 1px solid var(--pt-border, #e2e8f0); border-radius: 12px; padding: 14px 16px; background: #fff; font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif; }
.pt-soc-li-head { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }
.pt-soc-li-avatar { width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(135deg, #0a66c2, #7c3aed); }
.pt-soc-li-name { font-weight: 700; font-size: 14px; }
.pt-soc-li-meta { font-size: 12px; color: #64748b; }
.pt-soc-li-body { white-space: pre-wrap; font-size: 14px; line-height: 1.5; color: #1f2937; unicode-bidi: plaintext; }
.pt-soc-li-more { color: #64748b; font-weight: 500; }
.pt-soc-yt-preview { display: grid; gap: 12px; }
.pt-soc-yt-card { border: 1px solid var(--pt-border, #e2e8f0); border-radius: 12px; padding: 12px 14px; background: #fff; }
.pt-soc-yt-card small { display: block; color: #64748b; font-size: 12px; margin-bottom: 4px; }
.pt-soc-yt-title { font-family: Roboto, Arial, sans-serif; font-size: 18px; font-weight: 500; color: #0f0f0f; line-height: 1.35; unicode-bidi: plaintext; }
.pt-soc-yt-card.is-mobile .pt-soc-yt-title { font-size: 15px; }
.pt-soc-score { display: flex; align-items: baseline; gap: 6px; font-size: 32px; font-weight: 800; color: #0f172a; }
.pt-soc-score span { font-size: 15px; color: #64748b; font-weight: 500; }

/* ── Audit fixes 2026-10-09 ───────────────────────────── */
/* "0 / 300" counters read backwards ("300 / 0") inside RTL text. */
.pt-charcount-num,
.pt-igbio-count,
.pt-soc-counter,
[id$="-count"] {
    direction: ltr;
    unicode-bidi: isolate;
    font-variant-numeric: tabular-nums;
}

html[dir="rtl"] p[id$="-count"] {
    text-align: right;
}

.pt-input::placeholder,
.pt-textarea::placeholder,
.public-tools-workbench input::placeholder,
.public-tools-workbench textarea::placeholder {
    color: #64748b;
    opacity: 1;
}

/* Collapsible form sections were 28px tall tap targets. */
.pt-doc-section-toggle,
.pt-feasib-section-toggle {
    min-height: 44px;
}

.pt-tts-voice-play {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 6px 0;
    margin-top: 0;
}

.pt-cat-step-label {
    color: #64748b;
}

.pt-cat-step-num {
    color: #475569;
}

@media (max-width: 960px) {
    /* An empty preview should not push the result area a full screen down on phones. */
    .pt-preview-box {
        min-height: 200px;
    }
}

@media (max-width: 560px) {
    .pt-goal-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .pt-goal-chip {
        padding: 10px 12px;
    }
}

/* Object remover: brush size and clear on one row; phone order puts the photo above the buttons. */
.pt-obj-tools {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 12px;
  margin: 0;
}

.pt-obj-tools .pt-label {
  grid-column: 1 / -1;
  margin-bottom: 0;
}

.pt-obj-tools .pt-btn {
  min-height: 40px;
  padding-inline: 14px;
}

.pt-preview-empty {
  color: #64748b;
  text-align: center;
  max-width: 32ch;
}

.pt-obj-cta {
  margin-top: 4px;
  padding: 14px 16px;
  border-radius: 14px;
  background: #faf5ff;
  border: 1px solid #e9d5ff;
}

.pt-obj-cta p {
  margin: 0 0 10px;
}

.pt-obj-cta .pt-btn {
  display: inline-flex;
  text-decoration: none;
}

@media (max-width: 960px) {
  .pt-obj-panel {
    gap: 16px;
  }

  .pt-obj-panel > .pt-controls {
    display: contents;
  }

  .pt-obj-panel > .pt-controls > *,
  .pt-obj-panel > .pt-preview,
  .pt-obj-panel > .pt-history {
    order: 20;
  }

  .pt-obj-panel .pt-dropzone,
  .pt-obj-panel .pt-upload-zone {
    order: 1;
  }

  .pt-obj-panel > .pt-controls > .pt-status,
  .pt-obj-panel > .pt-controls > .pt-upload-status,
  .pt-obj-panel > .pt-controls > .pt-upload-progress {
    order: 2;
  }

  .pt-obj-panel > .pt-preview {
    order: 3;
  }

  .pt-obj-panel > .pt-controls > .pt-obj-tools {
    order: 4;
  }

  .pt-obj-panel > .pt-controls > .pt-actions {
    order: 5;
  }

  .pt-obj-panel:not(.has-image) > .pt-preview {
    display: none;
  }

  .pt-obj-panel .pt-obj-base {
    max-height: 60vh;
  }
}

@media (max-width: 960px) {
    /* On phones the download bar sits under the result instead of covering it. */
    .pt-media-download-bar {
        position: static;
        width: 100%;
        margin-top: 12px;
    }
}

/* The result already carries its own download bar; the second button beside Run was a duplicate. */
#pt-enh-download,
#pt-bg-download {
    display: none !important;
}

/* Same duplicate for the GIF and video tools: keep the download bar on the result only. */
#pt-optgif-download,
#pt-gifedit-download,
#pt-mp4c-download {
    display: none !important;
}

/* The magnifier follows the pointer; on touch screens it was an empty box that never filled. */
@media (hover: none) {
    .pt-compare-zoom,
    .pt-hover-hint {
        display: none !important;
    }
}

/* Logo wizard: four steps on one row on phones instead of an orphaned "4 · Results". */
@media (max-width: 560px) {
    .pt-wizard-nav {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 6px;
    }

    .pt-wizard-nav-btn {
        min-height: 44px;
        padding: 8px 4px;
        font-size: 0.8125rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

/* Palette lock: a real 36px control that follows the swatch's text color. */
.pt-color-lock {
    min-height: 36px;
    padding: 6px 12px;
    border: 0;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.22);
    color: inherit;
    font-size: 0.8125rem;
    font-weight: 700;
}

.pt-color-bar.is-light .pt-color-lock {
    background: rgba(255, 255, 255, 0.55);
}

.pt-color-lock[aria-pressed="true"] {
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
}

/* Invoice / quotation preview on phones: the A4 page scales down whole (see fitSheet in docgen.js). */
.pt-doc-sheet.is-fitted {
    width: 210mm;
    min-width: 210mm;
    max-width: none;
    zoom: var(--pt-doc-zoom, 1);
}

.pt-doc-preview-frame:has(.pt-doc-sheet.is-fitted) {
    justify-content: flex-start;
    overflow: hidden;
}

@media print {
    .pt-doc-sheet.is-fitted {
        zoom: 1;
    }
}

.pt-table-scroll {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 560px) {
    .pt-table-scroll .pt-vs-table {
        min-width: 420px;
        font-size: 0.875rem;
    }

    .pt-table-scroll .pt-vs-table th,
    .pt-table-scroll .pt-vs-table td {
        padding: 8px 10px;
    }
}

/* Catalog stepper: only the current step keeps its label, so six steps fit any width without clipping. */
.pt-cat-step:not(.is-active) .pt-cat-step-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.pt-cat-steps {
    justify-content: flex-start;
}

/* Color pickers styled as text fields collapsed to a thin line; show the actual color swatch. */
.pt-input[type="color"] {
    width: 100%;
    height: 44px;
    padding: 4px;
    cursor: pointer;
}

.pt-input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}

.pt-input[type="color"]::-webkit-color-swatch {
    border: 0;
    border-radius: 8px;
}

.pt-input[type="color"]::-moz-color-swatch {
    border: 0;
    border-radius: 8px;
}

@media (max-width: 560px) {
    .pt-cat-step-line {
        min-width: 8px;
        margin: 0 4px;
    }
}

.pt-tts-voice-tone {
    color: #5b6474;
}

html[dir="rtl"] .public-tools-workbench input[dir="ltr"] {
    text-align: right;
}

/* The native file button ("Choose File") looked like an unstyled browser default. */
.public-tools-workbench input[type="file"]::file-selector-button {
    margin-inline-end: 10px;
    padding: 8px 14px;
    border: 1px solid #ddd6fe;
    border-radius: 10px;
    background: #f5f3ff;
    color: #5b21b6;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

/* From → To cards: keep them on one row (the "to" card wrapped under an arrow pointing sideways)
   and point the arrow the reading direction in Arabic. */
.pt-convert-flow {
    flex-wrap: nowrap;
}

.pt-convert-flow .pt-convert-chip {
    flex: 1 1 0;
    min-width: 0;
}

html[dir="rtl"] .pt-convert-arrow {
    transform: scaleX(-1);
}

@media (max-width: 560px) {
    .pt-convert-flow {
        gap: 6px;
    }

    .pt-convert-flow .pt-convert-chip {
        padding: 10px 12px;
    }

    .pt-convert-chip strong {
        font-size: 1.125rem;
    }
}

/* Long sample text ends in "…" instead of being cut mid-word. */
.public-tools-workbench input {
    text-overflow: ellipsis;
}

.pt-nowrap {
    white-space: nowrap;
}

/* ── Prohibited upload: suspension notice + locked tools ───────────────── */
body.pt-ban-open {
    overflow: hidden;
}

.pt-ban {
    --ban-ink: #ffffff;
    --ban-soft: #f6d5db;
    --ban-muted: #e3aab5;
    --ban-hot: #ff5c7a;
    --ban-card: #1a0a0f;
    --ban-line: rgba(255, 92, 122, 0.22);
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    padding: 16px;
    overflow-y: auto;
    background: rgba(10, 3, 6, 0.88);
    -webkit-backdrop-filter: blur(10px) saturate(0.4);
    backdrop-filter: blur(10px) saturate(0.4);
    animation: pt-ban-veil 260ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.pt-ban-card {
    width: min(100%, 500px);
    /* Auto margins centre it, and a card taller than the screen still scrolls to its top. */
    margin: auto;
    padding: 32px;
    border-radius: var(--pt-radius, 20px);
    background: var(--ban-card);
    border: 1px solid var(--ban-line);
    box-shadow: 0 32px 80px rgba(0, 0, 0, 0.55), 0 2px 0 rgba(255, 92, 122, 0.35) inset;
    color: var(--ban-soft);
    text-align: start;
    animation: pt-ban-card 420ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.pt-ban-icon {
    width: 56px;
    height: 56px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    background: #e11d48;
    color: #ffffff;
    box-shadow: 0 10px 28px rgba(225, 29, 72, 0.45);
    margin-bottom: 24px;
}

.pt-ban-title {
    margin: 0 0 12px;
    font-size: 26px;
    line-height: 1.25;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--ban-ink);
    text-wrap: balance;
}

.pt-ban-lead {
    margin: 0 0 24px;
    font-size: 16px;
    line-height: 1.6;
    font-weight: 400;
    color: var(--ban-soft);
}

.pt-ban-facts {
    margin: 0 0 24px;
    border-top: 1px solid var(--ban-line);
}

.pt-ban-fact {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid var(--ban-line);
}

.pt-ban-fact dt {
    flex: 0 0 auto;
    font-size: 14px;
    font-weight: 400;
    color: var(--ban-muted);
}

.pt-ban-fact dd {
    margin: 0;
    font-size: 16px;
    font-weight: 500;
    color: var(--ban-ink);
    text-align: end;
}

.pt-ban-place {
    display: grid;
    gap: 4px;
    justify-items: end;
}

.pt-ban-place-country {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.pt-ban-flag {
    font-size: 16px;
    line-height: 1;
}

.pt-ban-place-local {
    font-weight: 400;
    color: var(--ban-soft);
    unicode-bidi: plaintext;
}

.pt-ban-fact dd.is-code {
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.02em;
    unicode-bidi: isolate;
}

.pt-ban-fact dd.is-strong {
    font-weight: 700;
    color: var(--ban-hot);
}

.pt-ban-note {
    margin: 0 0 24px;
    font-size: 14px;
    line-height: 1.6;
    color: var(--ban-muted);
}

.pt-ban-ok {
    display: block;
    width: 100%;
    min-height: 48px;
    padding: 12px 20px;
    border: 0;
    border-radius: 12px;
    background: #ffffff;
    color: #1a0a0f;
    font: inherit;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 160ms ease, transform 160ms ease;
}

.pt-ban-ok:hover {
    background: #ffe4e9;
}

.pt-ban-ok:active {
    transform: translateY(1px);
}

.pt-ban-ok:focus-visible {
    outline: 3px solid var(--ban-hot);
    outline-offset: 3px;
}

.pt-ban ::selection {
    background: #e11d48;
    color: #ffffff;
}

/* Tools stay visible but dead while the ban lasts. */
body.pt-banned #public-tool-root {
    filter: grayscale(1);
    opacity: 0.4;
    pointer-events: none;
    user-select: none;
}

.pt-ban-bar {
    position: fixed;
    inset-inline: 16px;
    bottom: 16px;
    z-index: 1900;
    max-width: 640px;
    margin-inline: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 12px 12px 20px;
    border-radius: 14px;
    background: #1a0a0f;
    border: 1px solid rgba(255, 92, 122, 0.35);
    box-shadow: 0 16px 40px rgba(10, 3, 6, 0.35);
    color: #f6d5db;
    font-size: 14px;
    line-height: 1.5;
}

[dir="rtl"] .pt-ban-bar,
html[lang="ar"] .pt-ban-bar {
    padding: 12px 20px 12px 12px;
}

.pt-ban-bar-btn {
    flex: 0 0 auto;
    min-height: 44px;
    padding: 0 16px;
    border: 1px solid rgba(255, 92, 122, 0.5);
    border-radius: 10px;
    background: transparent;
    color: #ffffff;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 160ms ease;
}

.pt-ban-bar-btn:hover {
    background: rgba(255, 92, 122, 0.16);
}

.pt-ban-bar-btn:focus-visible {
    outline: 3px solid #ff5c7a;
    outline-offset: 2px;
}

/* Entrance starts from a visible frame, so a paused tab never shows an empty veil. */
@keyframes pt-ban-veil {
    from { background-color: rgba(10, 3, 6, 0.6); }
    to { background-color: rgba(10, 3, 6, 0.88); }
}

@keyframes pt-ban-card {
    from { transform: translateY(16px) scale(0.97); }
    to { transform: none; }
}

@media (max-width: 520px) {
    .pt-ban-card {
        padding: 24px 20px;
    }
    .pt-ban-title {
        font-size: 22px;
    }
    .pt-ban-fact {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    .pt-ban-fact {
        padding: 10px 0;
    }
    .pt-ban-fact dd {
        text-align: start;
    }
    .pt-ban-place {
        justify-items: start;
    }
    .pt-ban-icon {
        margin-bottom: 20px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .pt-ban,
    .pt-ban-card {
        animation: none;
    }
}

/* ── WhatsApp chat button builder (module: wabutton) ─────────── */
.pt-wab .pt-wab-phone-row { flex-wrap: nowrap; }
.pt-wab .pt-wab-cc { max-width: 96px; flex: none; text-align: center; }
.pt-wab .pt-wab-num { flex: 1; min-width: 0; }
.pt-wab .pt-hint.is-error { color: var(--pt-err-ink); }
.pt-wab .pt-wab-textarea { min-height: 76px; }
.pt-wab-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.pt-wab-pair .pt-field, .pt-wab-pair .pt-tabs { margin-bottom: 0; }
.pt-wab-swatches { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.pt-wab-swatch {
    width: 36px; height: 36px; border-radius: 50%; border: 0; padding: 0; cursor: pointer;
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.12);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.pt-wab-swatch:hover { transform: scale(1.06); }
.pt-wab-swatch.is-active { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--pt-ink); }
.pt-wab-swatch:focus-visible { outline: 3px solid #a78bfa; outline-offset: 3px; }
.pt-wab-custom {
    position: relative; overflow: hidden; display: block;
    background: conic-gradient(#ef4444, #f59e0b, #22c55e, #06b6d4, #6366f1, #d946ef, #ef4444);
}
.pt-wab-color-input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; border: 0; padding: 0; }
.pt-wab-check { display: flex; gap: 10px; align-items: flex-start; font-size: 0.9375rem; color: #334155; line-height: 1.5; cursor: pointer; }
.pt-wab-check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--pt-primary); flex: none; }
.pt-wab-preview-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.pt-wab-preview-head .pt-label { margin: 0; }
.pt-wab-toggle { padding: 8px 14px; font-size: 0.875rem; }
.pt-wab-stage {
    position: relative; height: 500px; border-radius: var(--pt-radius-sm); overflow: hidden;
    border: 1px solid var(--pt-border); background: #f8fafc;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.pt-wab-chrome { display: flex; gap: 6px; padding: 12px 14px; background: #fff; border-bottom: 1px solid var(--pt-border); }
.pt-wab-chrome i { width: 10px; height: 10px; border-radius: 50%; background: #e2e8f0; display: block; }
.pt-wab-page { padding: 26px 24px; display: grid; gap: 12px; }
.pt-wab-line { display: block; height: 10px; border-radius: 6px; background: #e2e8f0; }
.pt-wab-line.w50 { width: 50%; } .pt-wab-line.w60 { width: 60%; height: 16px; background: #cbd5e1; }
.pt-wab-line.w75 { width: 75%; } .pt-wab-line.w85 { width: 85%; } .pt-wab-line.w90 { width: 90%; }
.pt-wab-block { display: block; height: 120px; border-radius: 12px; background: #e9eef5; margin: 6px 0; }
.pt-wab-code-field { margin-top: 18px; }
.pt-wab-code {
    margin: 0 0 12px; padding: 14px 16px; border-radius: 12px; background: #0f172a; color: #e2e8f0;
    font: 400 13px/1.6 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    white-space: pre-wrap; word-break: break-all; max-height: 220px; overflow: auto; text-align: left;
}
.pt-wab-code::selection { background: #7c3aed; color: #fff; }
.pt-wab-code:focus-visible { outline: 3px solid #a78bfa; outline-offset: 2px; }
@media (max-width: 860px) {
    .pt-wab-stage { height: 460px; }
}
@media (max-width: 480px) {
    .pt-wab-pair { grid-template-columns: 1fr; }
    .pt-wab-stage { height: 470px; }
    .pt-wab-page { padding: 18px 16px; }
}

/* ── Countdown banner builder (module: countdown) ────────────── */
.pt-cdb { gap: 22px; }
.pt-cdb .pt-hint.is-error { color: var(--pt-err-ink); }
.pt-cdb-preview .pt-wab-preview-head .pt-tabs { margin-bottom: 0; }
.pt-cdb-stage {
    max-width: 100%; margin-inline: auto; border-radius: var(--pt-radius-sm); overflow: hidden;
    border: 1px solid var(--pt-border); background: #f8fafc;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.pt-cdb-stage.is-phone { max-width: 390px; }
.pt-cdb-page { padding: 22px 24px 26px; }
.pt-cdb-controls { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; }
.pt-cdb-controls .pt-tabs { margin-bottom: 0; }
.pt-cdb-wide { grid-column: 1 / -1; }
.pt-cdb-when { flex-wrap: nowrap; gap: 8px; }
.pt-cdb-when #pt-cdb-date { flex: 1.5; min-width: 0; }
.pt-cdb-when #pt-cdb-time { flex: 1; min-width: 0; }
.pt-cdb-when #pt-cdb-offset { flex: none; width: 104px; }
.pt-cdb-code-field { margin: 0; }
@media (max-width: 720px) {
    .pt-cdb-controls { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
    .pt-cdb-when { flex-wrap: wrap; }
    .pt-cdb-when #pt-cdb-date { flex-basis: 100%; }
    .pt-cdb-page { padding: 18px 16px 22px; }
}

/* ── "Add this calculator to your website" (tools with an embed) ── */
.public-tools-embed-lead { margin: -6px 0 18px; color: var(--pt-muted); font-size: 0.9375rem; line-height: 1.6; max-width: 70ch; }
.public-tools-embed-box {
    background: var(--pt-surface); border: 1px solid var(--pt-border); border-radius: var(--pt-radius-sm);
    padding: 20px; box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.public-tools-embed-box .pt-tabs { margin-bottom: 14px; }
.public-tools-embed-box .pt-actions { margin-top: 0; }
@media (max-width: 480px) {
    .public-tools-embed-box { padding: 14px; }
}

/* ---- Free AI ad designer (addesign.js) ---------------------------------- */
.pt-ad-form { gap: 0; }
.pt-ad-field { margin-bottom: 20px; }
.pt-ad-field-hint { margin-top: 8px; font-size: 0.8125rem; }
.pt-ad-textarea-sm { min-height: 64px; }

.pt-ad-check {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    font-size: 0.875rem;
    color: #334155;
    cursor: pointer;
}
.pt-ad-check input { width: 18px; height: 18px; margin: 0; accent-color: var(--pt-primary); flex: none; }

/* Product photo + logo, side by side */
.pt-ad-tiles {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}
.pt-ad-tile-wrap { position: relative; min-width: 0; }
.pt-ad-file { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.pt-ad-tile {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: 72px;
    padding: 12px;
    border: 1px dashed #c4b5fd;
    border-radius: 14px;
    background: var(--pt-primary-soft);
    color: var(--pt-ink);
    font: inherit;
    text-align: start;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
}
.pt-ad-tile:hover { border-color: var(--pt-primary); background: #ede9fe; }
.pt-ad-tile:focus-visible,
.pt-ad-tile-remove:focus-visible,
.pt-ad-swatch:focus-visible,
.pt-ad-more summary:focus-visible {
    outline: 2px solid var(--pt-primary);
    outline-offset: 2px;
}
.pt-ad-tile.has-file { border-style: solid; border-color: #ddd6fe; background: #fff; }
.pt-ad-tile-thumb {
    flex: none;
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: #fff;
    border: 1px solid #ddd6fe;
    display: grid;
    place-items: center;
    overflow: hidden;
}
.pt-ad-tile-thumb:empty::before {
    content: "+";
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--pt-primary);
}
.pt-ad-tile-thumb img { width: 100%; height: 100%; object-fit: contain; }
.pt-ad-tile-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pt-ad-tile-title { font-size: 0.9375rem; font-weight: 700; }
.pt-ad-tile-sub { font-size: 0.8125rem; color: #475569; }
.pt-ad-tile-help { display: block; margin-top: 8px; font-size: 0.8125rem; line-height: 1.45; color: var(--pt-muted); }
.pt-ad-tile-remove {
    position: absolute;
    top: 6px;
    inset-inline-end: 6px;
    width: 32px;
    height: 32px;
    border: 1px solid var(--pt-border);
    border-radius: 999px;
    background: #fff;
    color: #334155;
    font: inherit;
    font-size: 1.125rem;
    line-height: 1;
    cursor: pointer;
}
.pt-ad-tile-remove:hover { color: var(--pt-err-ink); border-color: var(--pt-err-border); }

/* Brand color */
.pt-ad-colors { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pt-ad-swatch {
    position: relative;
    width: 36px;
    height: 36px;
    border-radius: 999px;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px var(--pt-border);
    padding: 0;
    cursor: pointer;
    transition: box-shadow 0.15s ease;
}
.pt-ad-swatch.is-active { box-shadow: 0 0 0 2px var(--pt-primary); }
.pt-ad-swatch-custom {
    display: inline-block;
    background: conic-gradient(#ef4444, #f59e0b, #22c55e, #06b6d4, #6366f1, #d946ef, #ef4444);
    overflow: hidden;
}
.pt-ad-color-input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; border: 0; padding: 0; }
.pt-ad-from-logo { margin: 0; font-size: 0.875rem; color: #334155; }

/* Size chips with a ratio glyph */
.pt-ad-sizes .pt-chip { display: inline-flex; align-items: center; gap: 8px; }
.pt-ad-ratio {
    display: inline-block;
    height: 16px;
    border: 1.5px solid currentColor;
    border-radius: 3px;
}

/* More options */
.pt-ad-more {
    margin-bottom: 20px;
    border: 1px solid var(--pt-border);
    border-radius: 14px;
    background: #fff;
}
.pt-ad-more summary {
    padding: 12px 16px;
    min-height: 44px;
    display: flex;
    align-items: center;
    font-size: 0.875rem;
    font-weight: 700;
    color: #334155;
    cursor: pointer;
    border-radius: 14px;
}
.pt-ad-more[open] summary { border-bottom: 1px solid var(--pt-border); border-radius: 14px 14px 0 0; }
.pt-ad-more-body { padding: 16px 16px 0; }
.pt-ad-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }

/* Submit */
.pt-ad-submit { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-bottom: 12px; }
.pt-ad-run { min-height: 48px; padding-inline: 28px; font-weight: 700; }
.pt-ad-form .pt-status.is-busy {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}
.pt-ad-remaining { margin: 0; font-size: 0.875rem; color: var(--pt-muted); }
.pt-ad-limit {
    margin-top: 12px;
    padding: 16px;
    border-radius: 14px;
    background: var(--pt-primary-soft);
    border: 1px solid #ddd6fe;
}
.pt-ad-limit p { margin: 0 0 12px; font-size: 0.875rem; color: #334155; line-height: 1.55; }

/* Preview stage */
.pt-ad-preview { position: sticky; top: 88px; }
.pt-ad-preview:has(.has-result) { position: static; }
.pt-ad-stage { display: flex; flex-direction: column; gap: 16px; }
.pt-ad-frame {
    width: 100%;
    max-width: 420px;
    max-height: 640px;
    border-radius: 16px;
    border: 1px dashed #c4b5fd;
    background: var(--pt-primary-soft);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 24px;
    text-align: center;
    margin-inline: auto;
}
.pt-ad-frame[style*="9/16"] { max-width: 340px; }
.pt-ad-frame-title { font-size: 1.125rem; font-weight: 700; color: var(--pt-ink); }
.pt-ad-frame-sub { font-size: 0.875rem; color: #475569; line-height: 1.5; }
.pt-ad-frame.is-busy {
    border-style: solid;
    border-color: #ddd6fe;
    background:
        linear-gradient(100deg, rgba(255, 255, 255, 0) 30%, rgba(255, 255, 255, 0.7) 50%, rgba(255, 255, 255, 0) 70%) var(--pt-primary-soft);
    background-size: 220% 100%;
    animation: pt-ad-sheen 1.8s ease-in-out infinite;
}
@keyframes pt-ad-sheen { from { background-position: 120% 0; } to { background-position: -120% 0; } }
@media (prefers-reduced-motion: reduce) { .pt-ad-frame.is-busy { animation: none; } }

.pt-ad-steps { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-direction: column; gap: 12px; text-align: start; }
.pt-ad-steps li { display: flex; align-items: center; gap: 12px; font-size: 0.9375rem; color: #475569; }
.pt-ad-steps li.is-now { color: var(--pt-ink); font-weight: 700; }
.pt-ad-steps li.is-done { color: #334155; }
.pt-ad-step-dot {
    width: 12px;
    height: 12px;
    border-radius: 999px;
    border: 2px solid #c4b5fd;
    flex: none;
}
.pt-ad-steps li.is-now .pt-ad-step-dot { border-color: var(--pt-primary); background: var(--pt-primary); box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.18); }
.pt-ad-steps li.is-done .pt-ad-step-dot { border-color: var(--pt-primary); background: var(--pt-primary); }

/* Field errors and connection note */
.pt-ad-field-error { margin: 8px 0 0; font-size: 0.875rem; font-weight: 500; color: var(--pt-err-ink); }
.pt-ad .pt-input[aria-invalid="true"],
.pt-ad .pt-textarea[aria-invalid="true"] { border-color: var(--pt-err-ink); box-shadow: 0 0 0 3px rgba(159, 18, 57, 0.12); }
.pt-ad-reconnect {
    margin: 12px auto 0;
    max-width: 420px;
    padding: 10px 14px;
    border-radius: 12px;
    background: var(--pt-warn-bg);
    border: 1px solid var(--pt-warn-border);
    color: var(--pt-warn-ink);
    font-size: 0.875rem;
    line-height: 1.5;
    text-align: center;
}

/* Result */
.pt-ad-result { width: 100%; display: flex; flex-direction: column; gap: 16px; }
.pt-ad-result-img {
    display: block;
    width: 100%;
    max-height: 70vh;
    object-fit: contain;
    border-radius: 16px;
    background: #f8fafc;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
    cursor: zoom-in;
}
.pt-ad-result-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.pt-ad-result-actions .pt-btn { min-height: 44px; }
.pt-ad-colors-used { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; font-size: 0.875rem; color: #334155; }
.pt-ad-dot { width: 16px; height: 16px; border-radius: 999px; box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.15); }

.pt-ad .pt-ad-nudge {
    padding: 20px;
    border-radius: 16px;
    background: #1e1046;
    color: #fff;
}
.pt-ad .pt-ad-nudge-title { margin: 0 0 8px; font-size: 1.125rem; font-weight: 700; color: #fff; }
.pt-ad .pt-ad-nudge-body { margin: 0 0 16px; font-size: 0.9375rem; line-height: 1.6; color: #e4dcff; }
.pt-ad-nets { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.pt-ad-nets li {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px 6px 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    font-size: 0.8125rem;
    color: #fff;
}
[dir="rtl"] .pt-ad-nets li { padding: 6px 8px 6px 12px; }
.pt-ad-net-icon { display: inline-flex; width: 20px; height: 20px; }
.pt-ad-net-icon svg { width: 20px; height: 20px; }
.pt-ad-nudge-cta { width: 100%; min-height: 48px; text-align: center; font-weight: 700; background: #fff; border-color: #fff; color: #4c1d95; }
.pt-ad-nudge-cta:hover { background: #ede9fe; border-color: #ede9fe; color: #4c1d95; }

/* Earlier designs from this visit (memory only) */
.pt-ad-earlier { padding-top: 16px; border-top: 1px solid var(--pt-border); }
.pt-ad-earlier-title { margin: 0 0 8px; font-size: 0.8125rem; font-weight: 700; color: #475569; }
.pt-ad-earlier-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.pt-ad-earlier-item {
    display: block;
    width: 72px;
    height: 72px;
    padding: 0;
    border: 1px solid var(--pt-border);
    border-radius: 12px;
    overflow: hidden;
    background: #f8fafc;
    cursor: pointer;
    transition: border-color 0.15s ease, transform 0.15s ease;
}
.pt-ad-earlier-item:hover { border-color: var(--pt-primary); transform: translateY(-1px); }
.pt-ad-earlier-item:focus-visible { outline: 2px solid var(--pt-primary); outline-offset: 2px; }
.pt-ad-earlier-item img { width: 100%; height: 100%; object-fit: cover; display: block; }

@media (max-width: 960px) {
    .pt-ad-preview { position: static; }
}
@media (max-width: 520px) {
    .pt-ad-tiles,
    .pt-ad-pair { grid-template-columns: 1fr; }
    .pt-ad-run { width: 100%; }
    .pt-ad-frame { max-width: 100%; }
}

/* ── Ad calculators: campaign budget (adbudget) + CPA / ROAS (roascalc) ──
   Type scale: 12 refs and table heads · 13 labels and help · 15 body, inputs, sub heads · 18 block titles and stats · 32 headline. */
body.public-tools-page[data-tools-module="adbudget"] .public-tools-workbench,
body.public-tools-page[data-tools-module="adbudget"] .public-tools-workbench-body,
body.public-tools-page[data-tools-module="roascalc"] .public-tools-workbench,
body.public-tools-page[data-tools-module="roascalc"] .public-tools-workbench-body {
    overflow: visible;
}

.pt-adc {
    min-width: 0;
    --adc-sunk: #f8fafc;
    --adc-line: var(--pt-border, #e2e8f0);
    --adc-ink: var(--pt-ink, #0f172a);
    --adc-muted: #5b6474;
    --adc-accent: var(--pt-primary, #7c3aed);
    --adc-accent-soft: #f3edff;
    --adc-accent-line: #dccbff;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 32px;
    align-items: start;
    color: var(--adc-ink);
}

.pt-adc ::selection {
    background: #ddd6fe;
    color: var(--adc-ink);
}

.pt-adc-controls {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.pt-adc .pt-adc-block {
    padding-block: 24px;
    border-top: 1px solid var(--adc-line);
}

.pt-adc .pt-adc-block:first-child {
    padding-top: 0;
    border-top: 0;
}

.pt-adc .pt-adc-block-title,
.pt-adc .pt-adc-sub {
    font-family: inherit;
    letter-spacing: 0;
}

.pt-adc-block-title {
    margin: 0 0 16px;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.35;
    color: var(--adc-ink);
}

.pt-adc-field {
    margin-bottom: 16px;
    min-width: 0;
}

.pt-adc-field .pt-label {
    margin-bottom: 0;
    font-size: 13px;
    color: #334155;
}

.pt-adc-field-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 28px;
    margin-bottom: 6px;
}

.pt-adc-field > .pt-label {
    display: block;
    margin-bottom: 8px;
}

.pt-adc-row2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 16px;
}

.pt-adc-input-wrap {
    position: relative;
}

.pt-adc .pt-adc-input,
.pt-adc .pt-adc-select {
    min-height: 48px;
    font-size: 15px;
    border-radius: 12px;
}

.pt-adc .pt-adc-input {
    text-align: start;
    font-variant-numeric: tabular-nums lining-nums;
}

/* Numbers are typed left to right even on the Arabic page: keep the suffix on the right end. */
.pt-adc-input-wrap.has-suffix .pt-adc-input {
    padding-right: 56px;
}

.pt-adc-suffix {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 13px;
    font-weight: 700;
    color: var(--adc-muted);
    pointer-events: none;
}

.pt-adc-help {
    max-width: 75ch;
    margin: 8px 0 0;
    font-size: 13px;
    line-height: 1.6;
    color: var(--adc-muted);
}

.pt-adc-help-tight {
    margin: -6px 0 16px;
}

.pt-adc-reset {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-height: 28px;
    padding: 0 6px;
    margin-inline-end: -6px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    color: var(--adc-accent);
    cursor: pointer;
}

.pt-adc-reset:hover {
    background: var(--adc-accent-soft);
}

.pt-adc-reset .pt-adc-icon svg {
    width: 14px;
    height: 14px;
}

.pt-adc-icon {
    display: inline-flex;
    flex: none;
    line-height: 0;
}

/* Segmented choices */
.pt-adc-seg {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.pt-adc-seg-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 48px;
    padding: 8px 14px;
    border: 1px solid var(--adc-line);
    border-radius: 12px;
    background: #fff;
    font: inherit;
    font-size: 15px;
    font-weight: 500;
    color: #334155;
    text-align: start;
    cursor: pointer;
    transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.pt-adc-seg-btn:hover {
    border-color: #c4b5fd;
}

.pt-adc-seg-btn.is-on {
    border-color: var(--adc-accent);
    background: var(--adc-accent-soft);
    color: var(--adc-ink);
    font-weight: 700;
    box-shadow: inset 0 0 0 1px var(--adc-accent);
}

.pt-adc-seg-btn .pt-adc-icon {
    color: var(--adc-muted);
}

.pt-adc-seg-btn.is-on .pt-adc-icon {
    color: var(--adc-accent);
}

.pt-adc-seg-text {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-width: 0;
    line-height: 1.35;
}

.pt-adc-seg-meta {
    align-self: flex-start;
    font-size: 13px;
    font-weight: 700;
    color: var(--adc-muted);
}

.pt-adc-seg-btn.is-on .pt-adc-seg-meta {
    color: #5b21b6;
}

.pt-adc-seg-btn:focus-visible,
.pt-adc-reset:focus-visible,
.pt-adc-disclosure:focus-visible,
.pt-adc-ref:focus-visible,
.pt-adc-sources a:focus-visible {
    outline: 2px solid var(--adc-accent);
    outline-offset: 2px;
}

.pt-adc-disclosure {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    min-height: 44px;
    padding: 0;
    border: 0;
    background: transparent;
    font: inherit;
    font-size: 15px;
    font-weight: 700;
    color: var(--adc-ink);
    text-align: start;
    cursor: pointer;
}

.pt-adc-disclosure:hover {
    color: var(--adc-accent);
}

.pt-adc-chev {
    flex: none;
    width: 10px;
    height: 10px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    transition: transform 0.2s ease;
    margin-top: -4px;
}

.pt-adc-disclosure[aria-expanded="true"] .pt-adc-chev {
    transform: rotate(225deg);
    margin-top: 4px;
}

.pt-adc-funnel-fields {
    margin-top: 12px;
}

.pt-adc-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 24px;
    border-top: 1px solid var(--adc-line);
}

.pt-adc-print {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
}

/* Result */
.pt-adc-aside {
    min-width: 0;
    align-self: stretch;
}

.pt-adc-result {
    padding: 24px;
    border: 1px solid var(--adc-line);
    border-radius: 16px;
    background: var(--adc-sunk);
}

.pt-adc-head {
    padding-bottom: 20px;
    border-bottom: 1px solid var(--adc-line);
}

/* The headline stays in view while the rest of the result scrolls with the page. */
@media (min-width: 981px) {
    .pt-adc-head {
        position: sticky;
        top: 5.25rem;
        z-index: 2;
        margin: -24px -24px 0;
        padding: 24px 24px 20px;
        border-radius: 16px 16px 0 0;
        background: var(--adc-sunk);
    }
}

.pt-adc-doubt-tag {
    display: inline-block;
    margin-inline-start: 8px;
    padding: 1px 8px;
    border-radius: 999px;
    background: var(--pt-err-badge, #fce7ef);
    font-size: 13px;
    font-weight: 700;
    color: var(--pt-err-ink, #9f1239);
    vertical-align: 1px;
}

.pt-adc-result.is-doubtful .pt-adc-head-value,
.pt-adc-result.is-doubtful .pt-adc-stat dd,
.pt-adc-result.is-doubtful .pt-adc-funnel-n {
    color: #64748b;
}

.pt-adc-demo-note {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 0 0 16px;
    font-size: 13px;
    line-height: 1.6;
    color: var(--adc-muted);
}

.pt-adc-demo-note .pt-adc-icon {
    margin-top: 1px;
}

.pt-adc-head-split {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.pt-adc-head-label {
    margin: 0 0 4px;
    font-size: 13px;
    font-weight: 700;
    color: var(--adc-muted);
}

.pt-adc-head-value {
    margin: 0;
    font-size: 32px;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: var(--adc-ink);
    overflow-wrap: anywhere;
}

.pt-adc-head-unit {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0;
}

.pt-adc-head-sub {
    margin: 6px 0 0;
    font-size: 15px;
    color: #334155;
}

.pt-adc-head-value .pt-adc-num {
    white-space: normal;
}

.pt-adc-num {
    unicode-bidi: isolate;
    font-variant-numeric: tabular-nums lining-nums;
    white-space: nowrap;
}

.pt-adc-verdict-line {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 16px 0 0;
    font-size: 15px;
    font-weight: 700;
    color: var(--adc-ink);
}

.pt-adc-verdict-line .pt-adc-icon {
    margin-top: 2px;
    color: var(--adc-accent);
}

.pt-adc-verdict-line.is-neg {
    color: var(--pt-err-ink, #9f1239);
}

.pt-adc-verdict-line.is-neg .pt-adc-icon {
    color: currentColor;
}

/* Range bar: every published figure as a tick, the published span as a band, the visitor as a dot. */
.pt-adc-bar {
    margin-top: 20px;
}

.pt-adc-bar-legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 4px 16px;
    font-size: 13px;
    color: var(--adc-muted);
}

.pt-adc-bar-key.is-you {
    font-weight: 700;
    color: var(--adc-ink);
}

.pt-adc-bar-track {
    position: relative;
    height: 8px;
    margin: 14px 0 8px;
    border-radius: 999px;
    background: #e2e8f0;
}

.pt-adc-bar-band {
    position: absolute;
    top: 0;
    bottom: 0;
    border-radius: 999px;
    background: var(--adc-accent-line);
}

.pt-adc-bar-tick {
    position: absolute;
    top: -3px;
    width: 2px;
    height: 14px;
    margin-inline-start: -1px;
    border-radius: 1px;
    background: #7c6ba8;
}

.pt-adc-bar-you {
    position: absolute;
    top: -6px;
    width: 4px;
    height: 20px;
    margin-inline-start: -2px;
    border-radius: 2px;
    background: var(--adc-ink);
    outline: 2px solid var(--adc-sunk);
}

.pt-adc-bar-you.is-unreal_good,
.pt-adc-bar-you.is-unreal_bad {
    background: var(--pt-err-ink, #9f1239);
}

.pt-adc-bar-you.is-worse {
    background: var(--pt-warn-ink, #7c4a1a);
}

.pt-adc-bar-ends {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--adc-muted);
}

.pt-adc-sub {
    margin: 24px 0 12px;
    font-size: 15px;
    font-weight: 700;
    color: var(--adc-ink);
}

.pt-adc-funnel {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
    gap: 0;
    margin: 0;
    padding: 0;
    list-style: none;
    border: 1px solid var(--adc-line);
    border-radius: 12px;
    background: #fff;
}

.pt-adc-funnel li {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 12px;
    min-width: 0;
}

.pt-adc-funnel li + li {
    border-inline-start: 1px solid var(--adc-line);
}

.pt-adc-funnel-n {
    font-size: 18px;
    font-weight: 700;
}

.pt-adc-funnel-l {
    font-size: 13px;
    color: var(--adc-muted);
}

.pt-adc-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin: 20px 0 0;
}

.pt-adc-stat {
    min-width: 0;
}

.pt-adc-stat dt {
    font-size: 13px;
    color: var(--adc-muted);
}

.pt-adc-stat dd {
    margin: 2px 0 0;
    font-size: 18px;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.pt-adc-stat.is-neg dd {
    color: var(--pt-err-ink, #9f1239);
}

.pt-adc-ok {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 0;
    font-size: 15px;
    color: #334155;
}

.pt-adc-ok .pt-adc-icon {
    margin-top: 2px;
    color: var(--adc-accent);
}

.pt-adc-checks {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.pt-adc-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid var(--pt-miss-border, #e2e8f0);
    border-radius: 12px;
    background: #fff;
    font-size: 15px;
    line-height: 1.6;
    color: #334155;
}

.pt-adc-check p {
    margin: 0;
    min-width: 0;
}

.pt-adc-check .pt-adc-icon {
    margin-top: 3px;
    color: var(--adc-muted);
}

.pt-adc-check.is-bad {
    border-color: var(--pt-err-border, #e8c4cf);
    background: var(--pt-err-bg, #faf4f6);
    color: #4c0519;
}

.pt-adc-check.is-bad .pt-adc-icon {
    color: var(--pt-err-ink, #9f1239);
}

.pt-adc-check.is-warn {
    border-color: var(--pt-warn-border, #e7d3b5);
    background: var(--pt-warn-bg, #faf6f1);
    color: #4a2c0f;
}

.pt-adc-check.is-warn .pt-adc-icon {
    color: var(--pt-warn-ink, #7c4a1a);
}

.pt-adc-check .pt-adc-num {
    font-weight: 700;
}

.pt-adc-table-wrap {
    /* width 0 + min-width 100%: the wide table scrolls inside and never widens the page. */
    width: 0;
    min-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--adc-line);
    border-radius: 12px;
    background: #fff;
}

.pt-adc-scen,
.pt-adc-bench,
.pt-adc-all {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
}

.pt-adc-scen {
    border: 1px solid var(--adc-line);
    border-radius: 12px;
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
    background: #fff;
}

.pt-adc-scen th,
.pt-adc-scen td,
.pt-adc-bench th,
.pt-adc-bench td,
.pt-adc-all th,
.pt-adc-all td {
    padding: 10px 12px;
    text-align: start;
    vertical-align: top;
    border-bottom: 1px solid var(--adc-line);
}

.pt-adc-scen tbody tr:last-child > *,
.pt-adc-bench tbody tr:last-child > *,
.pt-adc-all tbody tr:last-child > * {
    border-bottom: 0;
}

.pt-adc-scen thead th,
.pt-adc-bench thead th,
.pt-adc-all thead th {
    font-size: 13px;
    font-weight: 700;
    color: var(--adc-muted);
    background: var(--adc-sunk);
    white-space: nowrap;
}

.pt-adc-scen tbody th,
.pt-adc-bench tbody th,
.pt-adc-all tbody th {
    font-weight: 500;
}

.pt-adc-scen tr.is-mid > * {
    font-weight: 700;
}

.pt-adc-row-note {
    display: block;
    margin-top: 2px;
    font-size: 13px;
    font-weight: 400;
    color: var(--adc-muted);
}

.pt-adc-verdict {
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    color: #334155;
}

.pt-adc-verdict.is-unreal_good,
.pt-adc-verdict.is-unreal_bad {
    color: var(--pt-err-ink, #9f1239);
}

.pt-adc-verdict.is-worse {
    color: var(--pt-warn-ink, #7c4a1a);
}

.pt-adc-verdict.is-better {
    color: #5b21b6;
}

.pt-adc-refs {
    display: inline-flex;
    gap: 2px;
    margin-inline-start: 4px;
    vertical-align: 1px;
}

.pt-adc-ref {
    position: relative;
    display: inline-grid;
    place-items: center;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: 999px;
    background: #eef1f5;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    color: #475569;
    text-decoration: none;
    font-variant-numeric: tabular-nums;
}

/* Footnote badges stay small but take a 30px tap. */
.pt-adc-ref::after {
    content: "";
    position: absolute;
    inset: -6px -3px;
}

.pt-adc-ref:hover {
    background: var(--adc-accent);
    color: #fff;
}

.pt-adc-updated {
    max-width: 75ch;
    margin: 16px 0 0;
    font-size: 13px;
    line-height: 1.6;
    color: var(--adc-muted);
}

.pt-adc-empty {
    padding: 24px 0;
}

.pt-adc-empty-title {
    margin: 0 0 4px;
    font-size: 18px;
    font-weight: 700;
}

/* Create the campaign in Adly: a white band across the result panel, right under the realism check. */
.pt-adc .pt-adc-launch {
    margin: 24px -24px 0;
    padding: 20px 24px;
    border-block: 1px solid var(--adc-line);
    background: #fff;
}

.pt-adc .pt-adc-launch-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-family: inherit;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: 0;
    color: var(--adc-ink);
}

.pt-adc-launch-line {
    margin: 6px 0 0;
    font-size: 15px;
    line-height: 1.6;
    color: #334155;
}

.pt-adc-launch-line .pt-adc-num {
    font-weight: 700;
    color: var(--adc-ink);
}

.pt-adc-launch-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 20px;
    margin-top: 16px;
}

.pt-adc .pt-adc-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 0 22px;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
}

.pt-adc-cta-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 44px;
    padding: 0;
    border: 0;
    background: transparent;
    font: inherit;
    font-size: 15px;
    font-weight: 700;
    color: var(--adc-accent);
    text-decoration: none;
    cursor: pointer;
}

.pt-adc-cta-link:hover span {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.pt-adc-cta:focus-visible,
.pt-adc-cta-link:focus-visible,
.pt-adc-inline-link:focus-visible {
    outline: 2px solid var(--adc-accent);
    outline-offset: 2px;
}

.pt-adc-launch-note {
    max-width: 62ch;
    margin: 12px 0 0;
    font-size: 13px;
    line-height: 1.6;
    color: var(--adc-muted);
}

.pt-adc-hint {
    margin: 16px 0 0;
    font-size: 13px;
    line-height: 1.6;
    color: var(--adc-muted);
}

.pt-adc-inline-link {
    padding: 0;
    border: 0;
    background: transparent;
    font: inherit;
    font-weight: 700;
    color: var(--adc-accent);
    text-decoration: underline;
    text-decoration-color: var(--adc-accent-line);
    text-underline-offset: 3px;
    cursor: pointer;
}

.pt-adc-inline-link:hover {
    text-decoration-color: currentColor;
}

/* Sources: full width under the tool */
.pt-adc-sources-host {
    grid-column: 1 / -1;
    min-width: 0;
}

.pt-adc .pt-adc-sources-wrap {
    padding-top: 32px;
    border-top: 1px solid var(--adc-line);
}

.pt-adc-sources-head .pt-adc-block-title {
    margin-bottom: 4px;
}

.pt-adc-sources-head .pt-adc-updated {
    margin: 0 0 16px;
}

.pt-adc-all-wrap {
    margin-bottom: 8px;
}

.pt-adc-sources-wrap > .pt-adc-help {
    max-width: 75ch;
}

.pt-adc-all {
    min-width: 760px;
}

.pt-adc-all caption {
    caption-side: top;
    padding: 12px;
    font-size: 13px;
    color: var(--adc-muted);
    text-align: start;
}

.pt-adc-all td {
    white-space: nowrap;
}

.pt-adc-cross {
    display: block;
    margin-top: 2px;
    font-size: 12px;
    font-weight: 700;
    color: var(--adc-muted);
    white-space: nowrap;
}

.pt-adc-all tr.is-country > * {
    background: var(--adc-sunk);
    font-weight: 700;
}

.pt-adc-all td.is-empty {
    color: var(--adc-muted);
}

.pt-adc-all tr.is-current > * {
    background: var(--adc-accent-soft);
}

.pt-adc-all tr.is-current th {
    font-weight: 700;
}

.pt-adc-sources {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 32px;
    margin: 24px 0 0;
    padding: 0;
    list-style: none;
    counter-reset: adcsrc;
}

.pt-adc-sources li {
    position: relative;
    padding-inline-start: 32px;
    counter-increment: adcsrc;
    scroll-margin-top: 6rem;
}

.pt-adc-sources li::before {
    content: counter(adcsrc);
    position: absolute;
    inset-inline-start: 0;
    top: 1px;
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border-radius: 999px;
    background: var(--adc-accent-soft);
    font-size: 12px;
    font-weight: 700;
    color: #5b21b6;
}

.pt-adc-sources li:target::before {
    background: var(--adc-accent);
    color: #fff;
}

.pt-adc-sources p {
    margin: 0;
}

.pt-adc-src-title {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.45;
}

.pt-adc-src-title a {
    color: var(--adc-ink);
    text-decoration: underline;
    text-decoration-color: var(--adc-accent-line);
    text-underline-offset: 3px;
}

.pt-adc-src-title a:hover {
    color: var(--adc-accent);
    text-decoration-color: currentColor;
}

.pt-adc-src-meta {
    margin-top: 2px !important;
    font-size: 13px;
    font-weight: 700;
    color: #475569;
}

.pt-adc-src-covers {
    margin-top: 4px !important;
    font-size: 13px;
    line-height: 1.6;
    color: var(--adc-muted);
}

@media (max-width: 980px) {
    /* Phone order: platform and goal, then the result, then the rest of the inputs. */
    .pt-adc {
        display: flex;
        flex-direction: column;
        gap: 0;
    }

    .pt-adc-controls {
        display: contents;
    }

    .pt-adc .pt-adc-block.is-early {
        order: 1;
    }

    .pt-adc-aside {
        order: 2;
        margin-bottom: 24px;
    }

    .pt-adc .pt-adc-block:not(.is-early),
    .pt-adc-actions {
        order: 3;
    }

    .pt-adc-sources-host {
        order: 4;
        margin-top: 32px;
    }

    .pt-adc-aside {
        position: static;
        max-height: none;
        overflow: visible;
    }

    .pt-adc-sources {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 560px) {
    .pt-adc-row2 {
        grid-template-columns: minmax(0, 1fr);
    }

    .pt-adc-result {
        padding: 18px 16px;
    }

    .pt-adc-head-value {
        font-size: 28px;
    }

    .pt-adc .pt-adc-launch {
        margin-inline: -16px;
        padding: 18px 16px;
    }

    .pt-adc .pt-adc-cta {
        width: 100%;
    }

    .pt-adc-funnel {
        grid-auto-flow: row;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .pt-adc-funnel li + li {
        border-inline-start: 0;
    }

    .pt-adc-funnel li:nth-child(even) {
        border-inline-start: 1px solid var(--adc-line);
    }

    .pt-adc-funnel li:nth-child(n + 3) {
        border-top: 1px solid var(--adc-line);
    }

    .pt-adc-funnel.is-n3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .pt-adc-funnel.is-n3 li:nth-child(n + 3) {
        border-top: 0;
        border-inline-start: 1px solid var(--adc-line);
    }

    .pt-adc-funnel.is-n3 .pt-adc-funnel-n {
        font-size: 15px;
    }

    /* Comparison table: one card-like row per metric, name on its own line. */
    .pt-adc-bench thead {
        display: none;
    }

    .pt-adc-bench tbody tr {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 2px 8px;
        padding: 12px;
        border-bottom: 1px solid var(--adc-line);
    }

    .pt-adc-bench tbody tr:last-child {
        border-bottom: 0;
    }

    .pt-adc-bench tbody th {
        grid-column: 1 / -1;
        padding: 0 0 4px;
        border: 0;
        font-weight: 700;
    }

    .pt-adc-bench tbody td {
        padding: 0;
        border: 0;
        font-size: 13px;
    }

    .pt-adc-bench tbody td::before {
        content: attr(data-h);
        display: block;
        font-weight: 400;
        font-size: 13px;
        color: var(--adc-muted);
    }
}

@media (prefers-reduced-motion: reduce) {
    .pt-adc-chev,
    .pt-adc-seg-btn {
        transition: none;
    }
}

@media print {
    body.public-tools-page[data-tools-module="adbudget"] header,
    body.public-tools-page[data-tools-module="adbudget"] footer,
    body.public-tools-page[data-tools-module="adbudget"] .top-aurora-wrap,
    body.public-tools-page[data-tools-module="adbudget"] .public-tools-portfolio,
    body.public-tools-page[data-tools-module="adbudget"] .public-tools-section,
    body.public-tools-page[data-tools-module="adbudget"] .public-tools-cta-band,
    body.public-tools-page[data-tools-module="adbudget"] .public-tools-workbench-head,
    body.public-tools-page[data-tools-module="roascalc"] header,
    body.public-tools-page[data-tools-module="roascalc"] footer,
    body.public-tools-page[data-tools-module="roascalc"] .top-aurora-wrap,
    body.public-tools-page[data-tools-module="roascalc"] .public-tools-portfolio,
    body.public-tools-page[data-tools-module="roascalc"] .public-tools-section,
    body.public-tools-page[data-tools-module="roascalc"] .public-tools-cta-band,
    body.public-tools-page[data-tools-module="roascalc"] .public-tools-workbench-head,
    .pt-adc-actions,
    .pt-adc-reset,
    .pt-adc-all-wrap {
        display: none !important;
    }

    .pt-adc {
        display: block;
    }

    .pt-adc-aside {
        position: static;
        max-height: none;
        overflow: visible;
        margin-top: 16px;
        break-inside: avoid;
    }
}


/* Calculator source figures: one line per row, only the figures that exist. */
.pt-adc .pt-adc-all {
    min-width: 0;
    width: 100%;
}

.pt-adc-all-cap {
    margin: 0;
    padding: 12px 16px;
    border-bottom: 1px solid var(--adc-line);
    font-size: 13px;
    line-height: 1.6;
    color: var(--adc-muted);
}

.pt-adc-rows {
    margin: 0;
    padding: 0;
    list-style: none;
}

.pt-adc-row {
    display: grid;
    grid-template-columns: minmax(150px, 220px) minmax(0, 1fr);
    gap: 6px 20px;
    align-items: baseline;
    padding: 12px 16px;
    border-bottom: 1px solid var(--adc-line);
}

.pt-adc-row:last-child {
    border-bottom: 0;
}

.pt-adc-row.is-country {
    background: var(--adc-sunk);
}

.pt-adc-row.is-current {
    background: var(--adc-accent-soft);
}

.pt-adc-row-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--adc-ink);
}

.pt-adc-pairs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 24px;
}

.pt-adc-pair {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 2px 6px;
    font-size: 15px;
}

.pt-adc-pair-k {
    font-size: 13px;
    color: var(--adc-muted);
}

.pt-adc-pair-v {
    font-weight: 700;
    color: var(--adc-ink);
}

.pt-adc-pair .pt-adc-cross {
    display: inline;
}

@media (max-width: 560px) {
    .pt-adc-row {
        grid-template-columns: minmax(0, 1fr);
    }
}
