/* Chayyek. Layout: one phone-first column (max 720px); navy hero band,
   then the checker card, result, current scams, verdict key, report form. */
:root {
  --navy: #0B2A4A;
  --coral: #FF8466;
  --bg: #F3F6F8;
  --surface: #FFFFFF;
  --ink: #0B2A4A;
  --muted: #526070;
  --line: #DCE3EA;
  --hero-bg: #0B2A4A;
  --hero-ink: #F3F6F8;
  --on-coral: #0B2A4A;
  --mark: #FFE3D9;

  --scam-fg: #B42318;   --scam-bg: #FDECEA;
  --notoff-fg: #8A4B08; --notoff-bg: #FDF1DC;
  --off-fg: #1D4E89;    --off-bg: #E5EEF8;
  --unsure-fg: #3F4C5A; --unsure-bg: #ECEFF3;

  --font-body: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, system-ui, sans-serif;
  --font-display: "Alexandria", "IBM Plex Sans Arabic", Tahoma, system-ui, sans-serif;
  --radius: 16px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0A1826; --surface: #10243A; --ink: #E8EEF4; --muted: #9AAABB; --line: #22384F;
    --hero-bg: #071421; --hero-ink: #E8EEF4; --coral: #FF8F75; --on-coral: #0B2A4A; --mark: #5A2A1E;
    --scam-fg: #FFB4A9; --scam-bg: #3A1512;
    --notoff-fg: #F7C97E; --notoff-bg: #3A2709;
    --off-fg: #A9CBF2; --off-bg: #12304F;
    --unsure-fg: #C5D0DB; --unsure-bg: #1E2A36;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0A1826; --surface: #10243A; --ink: #E8EEF4; --muted: #9AAABB; --line: #22384F;
  --hero-bg: #071421; --hero-ink: #E8EEF4; --coral: #FF8F75; --on-coral: #0B2A4A; --mark: #5A2A1E;
  --scam-fg: #FFB4A9; --scam-bg: #3A1512;
  --notoff-fg: #F7C97E; --notoff-bg: #3A2709;
  --off-fg: #A9CBF2; --off-bg: #12304F;
  --unsure-fg: #C5D0DB; --unsure-bg: #1E2A36;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font-body); font-size: 16px; line-height: 1.75;
}
[hidden] { display: none !important; }
img { max-width: 100%; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.35; text-wrap: balance; margin: 0; }
h2 { font-size: 1.35rem; }
p { margin: 0; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--coral); outline-offset: 2px; border-radius: 6px; }
.muted { color: var(--muted); }

.wrap {
  max-width: 720px; margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}

.preview-banner {
  background: var(--coral); color: var(--on-coral); font-size: .85rem; font-weight: 600;
  text-align: center; padding-block: 6px;
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
}

/* Top bar */
.topbar { background: var(--hero-bg); color: var(--hero-ink); }
.topbar-in { display: flex; align-items: center; justify-content: space-between; padding-block: 14px; }
.brand { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }
.brand .mark { width: 34px; height: 28px; color: var(--hero-ink); }
.brand .word { font-family: var(--font-display); font-weight: 800; font-size: 1.5rem; line-height: 1; }
.brand .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--coral); align-self: flex-end; margin-bottom: 4px; }
.lang {
  font: 600 .85rem/1 var(--font-body); color: var(--hero-ink); background: transparent;
  border: 1px solid color-mix(in srgb, var(--hero-ink) 35%, transparent); border-radius: 999px;
  padding: 8px 14px; cursor: pointer; min-height: 36px;
}

/* Hero */
.hero { background: var(--hero-bg); color: var(--hero-ink); position: relative; overflow: hidden; }
.hero::after {
  content: ""; position: absolute; inset-inline-start: -60px; bottom: -120px; width: 320px; height: 320px;
  border: 2px solid color-mix(in srgb, var(--hero-ink) 10%, transparent); border-radius: 50%; pointer-events: none;
}
.hero-in { display: flex; align-items: flex-end; gap: 12px; padding-block: 12px 0; position: relative; z-index: 1; }
.hero-copy { flex: 1; min-width: 0; padding-bottom: 28px; display: grid; gap: 8px; }
.eyebrow { font-size: .75rem; letter-spacing: .18em; font-weight: 600; color: var(--coral); }
.hero h1 { font-size: clamp(1.9rem, 7vw, 2.8rem); font-weight: 800; }
.hero h1 .accent { color: var(--coral); }
.lede { font-size: 1.05rem; color: color-mix(in srgb, var(--hero-ink) 85%, transparent); max-width: 30ch; }
.hero-fish { width: clamp(120px, 32vw, 210px); height: auto; flex-shrink: 0; margin-bottom: -6px; }

/* Cards */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.checker { display: grid; gap: 16px; padding-block: 20px 8px; }
.input-card { padding: 16px; display: grid; gap: 12px; }
.input-label { font-weight: 600; }
textarea, input[type="text"] {
  width: 100%; font: 400 1rem/1.7 var(--font-body); color: var(--ink); background: var(--bg);
  border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 14px; resize: vertical;
}
textarea:focus, input[type="text"]:focus { border-color: var(--navy); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--coral) 35%, transparent); }
.input-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.privacy { font-size: .85rem; color: var(--muted); flex: 1; min-width: 200px; }
.btn {
  font: 700 1.05rem/1 var(--font-display); border: 0; border-radius: 999px; padding: 14px 28px;
  cursor: pointer; min-height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  text-decoration: none;
}
.btn.primary { background: var(--coral); color: var(--on-coral); }
.btn.primary[disabled] { opacity: .6; cursor: progress; }
.btn.secondary { background: var(--ink); color: var(--surface); }
.btn.ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--line); }
.samples { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: .85rem; }
.samples-label { color: var(--muted); }
.chip {
  font: 500 .85rem/1 var(--font-body); color: var(--ink); background: var(--bg);
  border: 1px solid var(--line); border-radius: 999px; padding: 8px 12px; cursor: pointer; min-height: 34px;
}

/* Pills */
.pill { display: inline-block; font-weight: 700; font-size: .85rem; padding: 4px 12px; border-radius: 999px; white-space: nowrap; }
.v-scam { color: var(--scam-fg); background: var(--scam-bg); }
.v-not_official { color: var(--notoff-fg); background: var(--notoff-bg); }
.v-official { color: var(--off-fg); background: var(--off-bg); }
.v-unsure, .v-no_link { color: var(--unsure-fg); background: var(--unsure-bg); }

/* Result */
.result { display: grid; gap: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.r-head { display: flex; align-items: flex-end; gap: 12px; padding: 16px 16px 0; }
.r-head.v-scam, .r-head.v-not_official, .r-head.v-official, .r-head.v-unsure, .r-head.v-no_link { color: var(--ink); }
.r-head.v-scam { background: var(--scam-bg); }
.r-head.v-not_official { background: var(--notoff-bg); }
.r-head.v-official { background: var(--off-bg); }
.r-head.v-unsure, .r-head.v-no_link { background: var(--unsure-bg); }
.r-head-copy { flex: 1; min-width: 0; display: grid; gap: 6px; padding-bottom: 16px; }
.r-badge { justify-self: start; font-weight: 800; font-size: .9rem; padding: 4px 14px; border-radius: 999px; background: var(--surface); }
.r-head.v-scam .r-badge { color: var(--scam-fg); }
.r-head.v-not_official .r-badge { color: var(--notoff-fg); }
.r-head.v-official .r-badge { color: var(--off-fg); }
.r-head.v-unsure .r-badge, .r-head.v-no_link .r-badge { color: var(--unsure-fg); }
.r-title { font-size: 1.45rem; font-weight: 800; }
.r-quote { font-size: .95rem; color: var(--muted); }
.r-fish { width: 112px; height: auto; flex-shrink: 0; }
.r-body { padding: 16px; display: grid; gap: 18px; }
.r-section h3 { font-size: .95rem; font-weight: 700; margin-bottom: 6px; }
.sent {
  background: var(--bg); border: 1px dashed var(--line); border-radius: 12px; padding: 10px 12px;
  font-size: .95rem; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 200px; overflow: auto;
}
.sent mark { background: var(--mark); color: inherit; border-radius: 4px; padding-inline: 2px; box-shadow: inset 0 -2px 0 var(--coral); }
.flag-kinds { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.flag-kinds span { font-size: .8rem; background: var(--mark); border-radius: 999px; padding: 2px 10px; }
.links { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.links > li { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: grid; gap: 6px; }
.link-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.link-host { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: .9rem; direction: ltr; unicode-bidi: isolate; overflow-wrap: anywhere; min-width: 0; }
.reasons { margin: 0; padding-inline-start: 1.2em; display: grid; gap: 4px; font-size: .95rem; }
.todo { margin: 0; padding-inline-start: 1.2em; display: grid; gap: 6px; }
.bank-alert { border: 1.5px solid var(--scam-fg); color: var(--ink); background: var(--scam-bg); border-radius: 12px; padding: 10px 12px; font-weight: 600; }
.r-disclaimer { font-size: .85rem; color: var(--muted); background: var(--bg); border-radius: 12px; padding: 10px 12px; border-inline-start: 4px solid var(--coral); }
.r-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.r-actions .btn { font-size: .95rem; padding: 12px 18px; min-height: 44px; }

.copy-status { font-size: .85rem; color: var(--muted); align-self: center; }

/* Scams */
.scams { padding-block: 32px 8px; display: grid; gap: 16px; }
.section-head { display: flex; align-items: center; gap: 12px; }
.section-head img { width: 72px; height: auto; }
.scam-list { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .scam-list { grid-template-columns: 1fr 1fr; } }
.scam { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; display: grid; gap: 8px; align-content: start; min-width: 0; }
.scam-meta { display: flex; flex-wrap: wrap; gap: 6px; font-size: .78rem; color: var(--muted); }
.scam-meta span { background: var(--bg); border-radius: 999px; padding: 2px 10px; }
.scam h3 { font-size: 1.05rem; }
.scam dl { margin: 0; display: grid; gap: 6px; font-size: .92rem; }
.scam dt { font-weight: 700; font-size: .8rem; color: var(--muted); }
.scam dd { margin: 0; }
.scam dd.real { color: var(--ink); }
.scam .src { font-size: .8rem; color: var(--muted); }

/* How */
.how { padding-block: 32px 8px; display: grid; gap: 12px; }
.verdict-key { margin: 0; display: grid; gap: 10px; }
.verdict-key > div { display: grid; grid-template-columns: 7.5rem 1fr; gap: 12px; align-items: start; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.verdict-key dd { margin: 0; font-size: .95rem; min-width: 0; }
@media (max-width: 420px) { .verdict-key > div { grid-template-columns: 1fr; gap: 6px; } }

/* Report */
.report-section { padding-block: 32px; }
.report-card { padding: 16px; display: grid; gap: 10px; }
.report-form { display: grid; gap: 12px; }
fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
legend { font-weight: 600; margin-bottom: 4px; }
fieldset label { display: flex; align-items: center; gap: 8px; font-size: .95rem; }
fieldset input { width: 18px; height: 18px; accent-color: var(--navy); }
.field { display: grid; gap: 4px; font-size: .9rem; font-weight: 500; }
.hint { font-size: .8rem; color: var(--muted); margin-top: -8px; }
.report-form .btn { justify-self: start; }
.report-status { font-size: .9rem; font-weight: 600; min-height: 1.5em; }

/* Footer */
.footer { background: var(--hero-bg); color: var(--hero-ink); padding-block: 28px 36px; }
.footer .wrap { display: grid; gap: 8px; font-size: .9rem; }
.disclaimer-title { font-family: var(--font-display); font-weight: 700; color: var(--coral); }
.foot-meta { margin-top: 8px; color: color-mix(in srgb, var(--hero-ink) 70%, transparent); font-size: .85rem; }

[dir="ltr"] .hero h1, [dir="ltr"] h2 { letter-spacing: -.01em; }
@media (prefers-reduced-motion: no-preference) {
  .result:not([hidden]) { animation: rise .25s ease-out; }
  @keyframes rise { from { transform: translateY(6px); opacity: .4; } to { transform: none; opacity: 1; } }
}
