/* ===================================================== public-site additions */
.top .ghost-btn { text-decoration: none; white-space: nowrap; }

/* warning banner */
.caution {
  display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: start;
  background: color-mix(in srgb, var(--warn) 13%, var(--sheet)); border: 1.5px solid color-mix(in srgb, var(--warn) 55%, transparent);
  border-radius: var(--radius); padding: 14px 18px; margin-bottom: 20px;
}
.caution-ic { width: 30px; height: 30px; border-radius: 50%; background: var(--warn); color: #fff; font-weight: 900; display: grid; place-items: center; font-size: 18px; margin-top: 2px; }
.caution b { font-size: var(--s3); display: block; line-height: 1.5; }
.caution p { margin: 4px 0 0; font-size: var(--s1); color: var(--ink); opacity: .85; max-width: 110ch; }
.verdict-caution { font-size: 12.5px; color: var(--muted); margin: -10px 4px 18px; line-height: 1.6; }
.verdict-caution b { color: var(--warn); }

/* intake side notes */
.intake { grid-template-columns: 1.3fr 1fr !important; }
.promises { list-style: none; margin: 0; padding: 18px 20px; background: var(--sheet); border: 1px solid var(--line); border-radius: var(--radius);
  display: flex; flex-direction: column; justify-content: center; gap: 10px; font-size: var(--s1); color: var(--muted); }
.promises li { position: relative; padding-inline-start: 22px; }
.promises li::before { content: ""; position: absolute; right: 0; top: .55em; width: 10px; height: 10px; border-radius: 50%; background: var(--tape); }
.promises b { color: var(--ink); }
.queue-box { background: var(--paper); border-radius: 8px; padding: 12px 14px; margin: 6px 0 10px; font-size: var(--s1); }
.queue-box b { font-size: var(--s4); font-weight: 900; display: block; line-height: 1.3; }
.expiry { font-size: 12.5px; color: var(--muted); margin: 14px 0 0; }

/* survey */
.survey { background: var(--sheet); border: 2px solid var(--tape); border-radius: var(--radius); padding: 20px 24px; margin-top: 20px; }
.survey h2 { font-size: var(--s4); }
.survey .sub { margin: 2px 0 14px; color: var(--muted); font-size: var(--s1); }
.q { margin: 14px 0 0; }
.q > span { display: block; font-weight: 700; margin-bottom: 8px; }
.chips-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1.5px solid var(--line); background: var(--sheet); color: var(--ink); border-radius: 999px; padding: 6px 16px; font-size: var(--s1); font-weight: 500; }
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--sheet); border-color: var(--ink); }
.stars { display: inline-flex; gap: 4px; }
.stars button { background: none; border: none; padding: 2px; color: var(--line); }
.stars button svg { width: 34px; height: 34px; fill: currentColor; display: block; }
.stars button.on { color: var(--tape); }
.stars button:hover { transform: scale(1.08); }
.survey textarea { width: 100%; min-height: 76px; resize: vertical; font: inherit; font-size: var(--s1); color: var(--ink); background: var(--paper);
  border: 1.5px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.survey textarea:focus { outline: none; border-color: var(--ink); }
.survey .actions { margin-top: 14px; }
.survey .thanks { display: flex; align-items: center; gap: 10px; color: var(--ok); font-weight: 700; }
.survey .thanks i { width: 26px; height: 26px; border-radius: 50%; background: var(--ok); display: grid; place-items: center; flex: none; }
.survey .thanks i::after { content: ""; width: 6px; height: 11px; border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg) translate(-1px, -1px); }
.counter { font-size: 12px; color: var(--muted); margin-top: 4px; }

/* about */
.about { background: var(--table); color: var(--table-ink); border-radius: var(--radius); padding: 26px 28px; margin-top: 28px; }
.about h2 { color: #fff; }
.about h3 { color: var(--tape); margin: 0 0 6px; }
.about-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin-top: 16px; }
.about p { margin: 0 0 10px; font-size: var(--s1); color: #C4D0D3; }
.about .formula { color: #fff; }
.facts-list { list-style: none; margin: 0; padding: 0; font-size: var(--s1); color: #C4D0D3; }
.facts-list li { padding: 0 0 10px; }
.facts-list b { color: #fff; }

/* footer with developer credit */
.site-foot { max-width: 1280px; margin: 10px auto 0; padding: 26px 20px 30px; border-top: 1.5px solid var(--line); }
.foot-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.foot-brand { display: flex; align-items: center; gap: 12px; }
.foot-brand b { display: block; font-weight: 900; }
.foot-brand span { display: block; font-size: var(--s1); color: var(--muted); }
.loupe.sm { width: 34px; height: 34px; }
.dev-card {
  display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--table-ink);
  background: var(--table); border-radius: 14px; padding: 10px 14px 10px 18px; position: relative; overflow: hidden;
  box-shadow: 0 8px 26px rgba(15, 25, 32, .18); transition: transform .18s, box-shadow .18s;
}
.dev-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: linear-gradient(90deg, var(--ai), var(--edit), var(--tape)); }
.dev-card:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(15, 25, 32, .26); }
.dev-avatar { width: 46px; height: 46px; border-radius: 12px; background: var(--tape); display: grid; place-items: center; flex: none; }
.dev-avatar svg { width: 26px; height: 26px; fill: none; stroke: var(--tape-ink); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.dev-text { display: flex; flex-direction: column; line-height: 1.35; }
.dev-text small { font-size: 12px; color: #9FB0B6; }
.dev-text b { font-size: var(--s3); color: #fff; }
.dev-text span { font-size: 12.5px; color: var(--tape); letter-spacing: .3px; }
.dev-arrow svg { width: 20px; height: 20px; fill: none; stroke: #9FB0B6; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; transition: transform .18s; }
.dev-card:hover .dev-arrow svg { transform: translateX(-4px); stroke: #fff; }
.foot-note { text-align: center; color: var(--muted); font-size: 12px; margin: 22px 0 0; }

@media (max-width: 980px) {
  .intake { grid-template-columns: 1fr !important; }
  .about-grid { grid-template-columns: 1fr; gap: 14px; }
}
@media (max-width: 620px) {
  .caution { padding: 12px 14px; }
  .caution b { font-size: var(--s2); }
  .about { padding: 20px 18px; }
  .foot-inner { justify-content: center; text-align: center; }
  .foot-brand { flex-direction: column; }
  .stars button svg { width: 30px; height: 30px; }
}
@media print { .caution, .survey, .about, .site-foot { display: none !important; } }
.drop.busy { opacity: .6; pointer-events: none; }
.drop.busy strong::after { content: var(--busy-text, " …"); font-weight: 500; }

/* ===================================================== admin */
.admin main { padding-top: 4px; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 20px; }
.card { background: var(--sheet); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.card span { display: block; color: var(--muted); font-size: var(--s1); }
.card b { display: block; font-size: var(--s6); font-weight: 900; line-height: 1.2; font-variant-numeric: tabular-nums; }
.card em { display: block; font-style: normal; font-size: 12.5px; color: var(--muted); }
.adm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
.adm-grid .sheet { margin: 0; }
.hbars { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.hbar { display: grid; grid-template-columns: 110px 1fr 54px; gap: 10px; align-items: center; font-size: var(--s1); }
.hbar .track { height: 14px; background: var(--paper); border-radius: 4px; overflow: hidden; }
.hbar .track i { display: block; height: 100%; background: var(--c, var(--ink)); border-radius: 4px; }
.hbar .n { text-align: left; font-variant-numeric: tabular-nums; color: var(--muted); }
.daily { display: flex; align-items: flex-end; gap: 4px; height: 150px; margin-top: 16px; border-bottom: 1.5px solid var(--line); direction: ltr; }
.daily div { flex: 1; background: var(--tape); border-radius: 3px 3px 0 0; min-height: 2px; position: relative; }
.daily div:hover::after { content: attr(data-t); position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--sheet);
  font-size: 11px; padding: 2px 6px; border-radius: 4px; white-space: nowrap; margin-bottom: 4px; direction: rtl; }
.mx { border-collapse: collapse; width: 100%; font-size: var(--s1); margin-top: 12px; }
.mx th, .mx td { padding: 8px; text-align: center; border: 1px solid var(--line); }
.mx th { color: var(--muted); font-weight: 500; background: var(--paper); }
.mx td.hit { background: color-mix(in srgb, var(--ok) 18%, transparent); font-weight: 700; }
.fb-table { width: 100%; border-collapse: collapse; font-size: var(--s1); }
.fb-table th, .fb-table td { padding: 8px 6px; border-bottom: 1px solid var(--line); text-align: right; vertical-align: top; }
.fb-table th { color: var(--muted); font-weight: 500; }
.fb-table td.c { max-width: 420px; white-space: pre-wrap; word-break: break-word; }
.pill { display: inline-block; padding: 0 9px; border-radius: 99px; font-size: 12px; font-weight: 700; color: #fff; background: var(--info); }
.pill.yes, .pill.original { background: var(--ok); } .pill.no { background: var(--edit); } .pill.unsure, .pill.unknown { background: var(--info); }
.pill.edited { background: var(--edit); } .pill.ai { background: var(--ai); } .pill.suspicious { background: var(--warn); } .pill.clean { background: var(--ok); }
@media (max-width: 980px) { .cards { grid-template-columns: 1fr 1fr; } .adm-grid { grid-template-columns: 1fr; } }

/* ===================================================== language switch + LTR (English) */
.i18n-pending body { visibility: hidden; }
.top-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.lang-btn { display: inline-flex; align-items: center; gap: 7px; background: var(--ink); color: var(--sheet); border: none;
  border-radius: 999px; padding: 6px 14px 6px 12px; font-size: var(--s1); font-weight: 700; }
.lang-btn .flag { width: 22px; height: 14px; border-radius: 3px; display: block; flex: none;
  box-shadow: 0 0 0 1.5px rgba(255,255,255,.55); }
html[lang="fa"] .lang-btn .flag-fa, html[lang="en"] .lang-btn .flag-en { display: none; }
.lang-btn:hover { background: color-mix(in srgb, var(--ink) 85%, var(--tape)); }
.lang-btn[lang="fa"] span { font-family: "Vazirmatn", Tahoma, sans-serif; }
.switch em { font-style: normal; }

.about-grid { grid-template-columns: repeat(2, 1fr) !important; }
.about-card { background: var(--table-2); border-radius: 10px; padding: 18px 20px; }
.about-ic { width: 38px; height: 38px; border-radius: 10px; background: var(--tape); display: grid; place-items: center; margin-bottom: 10px; }
.about-ic svg { width: 21px; height: 21px; fill: none; stroke: var(--tape-ink); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.about-card h3 { color: #fff !important; }
.facts-list li { position: relative; padding-inline-start: 16px; }
.facts-list li::before { content: ""; position: absolute; inset-inline-start: 0; top: .7em; width: 6px; height: 6px; border-radius: 50%; background: var(--tape); }
@media (max-width: 980px) { .about-grid { grid-template-columns: 1fr !important; } }

[dir="ltr"] body { font-family: "Vazirmatn", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; line-height: 1.65; }
[dir="ltr"] .switch span::after { right: auto; left: 2px; }
[dir="ltr"] .switch input:checked + span::after { transform: translateX(15px); }
[dir="ltr"] .case-chip, [dir="ltr"] .row-main, [dir="ltr"] .sample, [dir="ltr"] .kv th,
[dir="ltr"] .cmp td:first-child, [dir="ltr"] .cmp th:first-child { text-align: left; }
[dir="ltr"] .raw .copy { left: auto; right: 0; }
[dir="ltr"] .promises li::before { right: auto; left: 0; }
[dir="ltr"] .dev-card { padding: 10px 18px 10px 14px; }
[dir="ltr"] .dev-arrow svg { transform: scaleX(-1); }
[dir="ltr"] .dev-card:hover .dev-arrow svg { transform: scaleX(-1) translateX(-4px); }
[dir="ltr"] .stamp { transform: rotate(1.6deg); }
[dir="ltr"] .caution p, [dir="ltr"] .about p { line-height: 1.6; }

/* real camera photo with AI processing */
:root { --camai: #1F7A8C; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --camai: #4FB3C4; } }
.stamp.camera_ai { --c: var(--camai); }
.stamp.camera_ai .v { font-size: 22px; }
.dot.camera_ai { background: var(--camai); }
.pill.camera_ai { background: var(--camai); }
