/* ============================================================
   شور+ — Editorial Brutalism × Saudi Heritage
   ============================================================ */

:root {
  /* PAPER & INK */
  --paper: #F2E9D5;
  --paper-deep: #E8DCC0;
  --paper-light: #FAF3E3;
  --paper-warm: #F7EFDC;

  --ink: #1A1612;
  --ink-soft: #3D332A;
  --ink-mute: #6E5D4A;
  --ink-faint: #A8957B;
  
  /* BRAND COLORS — bold, characterful */
  --forest: #1B4332;          /* primary dark */
  --forest-deep: #0F2E22;
  --forest-light: #2D6A4F;
  
  --rust: #B83D1F;            /* primary accent */
  --rust-deep: #8C2E17;
  --rust-light: #D55C3D;
  
  --ochre: #C58814;           /* warning / accent 2 */
  --ochre-deep: #8B5E0A;
  --ochre-light: #E5A634;
  
  --plum: #4A2C5C;            /* info / decision */
  --plum-deep: #2F1B3D;
  --plum-light: #6B4280;
  
  --terra: #9B2C2C;           /* danger */
  --terra-deep: #6B1C1C;
  
  --olive: #6B7345;           /* neutral accent */
  --olive-light: #8A9266;
  
  /* shadows that feel printed */
  --shadow-stamp: 4px 4px 0 var(--ink);
  --shadow-soft: 0 1px 0 var(--ink-faint), 0 8px 24px rgba(26, 22, 18, 0.06);
  --shadow-card: 0 2px 0 var(--ink-faint), 0 12px 40px rgba(26, 22, 18, 0.08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Readex Pro', 'Tajawal', system-ui, sans-serif;
  font-weight: 400;
  background: var(--paper);
  color: var(--ink);
  min-height: 100vh;
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  position: relative;
}

/* Paper grain texture */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: 
    radial-gradient(circle at 20% 80%, rgba(184, 61, 31, 0.04) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(27, 67, 50, 0.04) 0%, transparent 50%),
    url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.06 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 1;
}

main, nav, .screen { position: relative; z-index: 2; }

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
.font-display { font-family: 'Readex Pro', 'Readex Pro', sans-serif; font-weight: 600; letter-spacing: -0.02em; line-height: 1.05; }
.font-serif { font-family: 'Amiri', serif; }
.font-num { font-family: 'Space Grotesk', 'Readex Pro', sans-serif; font-feature-settings: 'tnum'; direction: ltr; unicode-bidi: embed; display: inline-block; }

/* All large numbers stay LTR for correct ordering of digits, %, /, etc. */
.gauge-number,
.mini-meter-value,
.decision-score,
.breakdown-num,
.how-num,
.hero-meta-value,
.tpl-uses,
.bento-corner,
.section-meta { direction: ltr; unicode-bidi: embed; }

h1, h2, h3, h4 {
  font-family: 'Readex Pro', sans-serif;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

/* ============================================================
   LAYOUT
   ============================================================ */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

.screen { display: none; animation: pageIn 0.5s cubic-bezier(0.2, 0.8, 0.2, 1); }
.screen.active { display: block; }

@keyframes pageIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes stamp {
  0% { opacity: 0; transform: scale(1.4) rotate(-4deg); }
  60% { transform: scale(0.96) rotate(0); }
  100% { opacity: 1; transform: scale(1) rotate(0); }
}

/* ============================================================
   TOP NAV — minimal, editorial
   ============================================================ */
.topnav {
  border-bottom: 1.5px solid var(--ink);
  padding: 18px 0;
  background: var(--paper);
  position: sticky;
  top: 0;
  z-index: 50;
}

.topnav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand-mark {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  text-decoration: none;
  color: var(--ink);
}

.brand-glyph {
  width: 44px;
  height: 44px;
  background: var(--ink);
  color: var(--paper-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Readex Pro';
  font-weight: 700;
  font-size: 24px;
  position: relative;
  border-radius: 4px;
}

.brand-glyph::after {
  content: '+';
  position: absolute;
  top: -8px;
  left: -8px;
  width: 22px;
  height: 22px;
  background: var(--rust);
  color: var(--paper-light);
  border-radius: 50%;
  font-family: 'Readex Pro';
  font-weight: 700;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  border: 2px solid var(--paper);
}

.brand-name {
  font-family: 'Readex Pro';
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.02em;
}

.brand-tag {
  font-family: 'Amiri', serif;
  font-style: italic;
  font-size: 13px;
  color: var(--ink-mute);
  margin-right: 8px;
  padding-right: 12px;
  border-right: 1px solid var(--ink-faint);
}

.topnav-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.nav-link {
  font-family: 'Readex Pro';
  font-weight: 500;
  font-size: 14.5px;
  color: var(--ink-soft);
  text-decoration: none;
  cursor: pointer;
  transition: color 0.15s;
}

.nav-link:hover { color: var(--ink); }

.btn-stamp {
  background: var(--ink);
  color: var(--paper-light);
  border: 1.5px solid var(--ink);
  padding: 11px 22px;
  font-family: 'Readex Pro';
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.15s;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-stamp:hover {
  background: var(--rust);
  border-color: var(--rust);
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0 var(--ink);
}

.btn-stamp.alt {
  background: var(--rust);
  border-color: var(--rust);
}

.btn-stamp.outline {
  background: transparent;
  color: var(--ink);
}

.btn-stamp.outline:hover {
  background: var(--ink);
  color: var(--paper-light);
}

/* ============================================================
   HERO — Editorial Brutalist
   ============================================================ */
.hero {
  padding: 56px 0 32px;
  position: relative;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 60px;
  align-items: flex-end;
  margin-bottom: 48px;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'Amiri', serif;
  font-style: italic;
  font-size: 17px;
  color: var(--rust);
  margin-bottom: 18px;
  animation: rise 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.eyebrow-dash {
  width: 32px;
  height: 1.5px;
  background: var(--rust);
}

.hero-title {
  font-family: 'Readex Pro';
  font-weight: 700;
  font-size: clamp(56px, 9vw, 124px);
  line-height: 0.92;
  letter-spacing: -0.04em;
  color: var(--ink);
  animation: rise 0.8s 0.05s both cubic-bezier(0.2, 0.8, 0.2, 1);
}

.hero-title .accent {
  color: var(--rust);
  position: relative;
  display: inline-block;
}

.hero-title .underline {
  display: inline-block;
  position: relative;
}

.hero-title .underline::after {
  content: '';
  position: absolute;
  bottom: 0.08em;
  right: 0;
  left: 0;
  height: 0.12em;
  background: var(--ochre);
  z-index: -1;
}

.hero-meta {
  text-align: left;
  border-right: 1.5px solid var(--ink);
  padding-right: 24px;
}

.hero-meta-label {
  font-family: 'Amiri';
  font-style: italic;
  font-size: 13px;
  color: var(--ink-mute);
  margin-bottom: 6px;
  letter-spacing: 0.02em;
}

.hero-meta-value {
  font-family: 'Readex Pro';
  font-weight: 600;
  font-size: 22px;
  color: var(--ink);
}

.hero-meta-sub {
  font-family: 'Readex Pro';
  font-size: 13px;
  color: var(--ink-mute);
  margin-top: 4px;
}

.hero-description {
  max-width: 640px;
  font-size: 19px;
  line-height: 1.6;
  color: var(--ink-soft);
  margin-top: 16px;
  animation: rise 0.9s 0.1s both cubic-bezier(0.2, 0.8, 0.2, 1);
}

.hero-description em {
  font-family: 'Amiri', serif;
  font-style: italic;
  color: var(--rust);
  font-size: 21px;
}

/* ============================================================
   SMART INPUT — bold, letter-like
   ============================================================ */
.smart-input-block {
  margin-top: 48px;
  animation: rise 1s 0.2s both cubic-bezier(0.2, 0.8, 0.2, 1);
}

.smart-input-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding: 0 4px;
}

.smart-input-label {
  font-family: 'Readex Pro';
  font-weight: 600;
  font-size: 16px;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 8px;
}

.smart-input-label::before {
  content: '';
  width: 8px;
  height: 8px;
  background: var(--rust);
  border-radius: 50%;
}

.privacy-stamp {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  background: var(--forest);
  color: var(--paper-light);
  font-family: 'Readex Pro';
  font-size: 12px;
  font-weight: 500;
  border-radius: 100px;
}

.smart-input-card {
  background: var(--paper-light);
  border: 2px solid var(--ink);
  border-radius: 6px;
  padding: 0;
  position: relative;
  box-shadow: 6px 6px 0 var(--ink);
  transition: all 0.2s;
}

.smart-input-card:focus-within {
  transform: translate(-2px, -2px);
  box-shadow: 8px 8px 0 var(--rust);
}

.smart-input {
  width: 100%;
  background: transparent;
  border: none;
  color: var(--ink);
  font-family: 'Readex Pro';
  font-size: 19px;
  padding: 26px 28px 10px;
  resize: none;
  outline: none;
  line-height: 1.6;
  min-height: 100px;
}

.smart-input::placeholder {
  color: var(--ink-faint);
  font-family: 'Amiri', serif;
  font-style: italic;
  font-size: 20px;
}

.smart-input-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-top: 1.5px dashed var(--ink-faint);
}

.toolbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink-mute);
  font-size: 13px;
}

.kbd {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 7px;
  background: var(--paper-deep);
  border: 1px solid var(--ink-faint);
  border-radius: 4px;
  font-family: 'Space Grotesk';
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-soft);
}

.send-stamp {
  background: var(--rust);
  color: var(--paper-light);
  border: 2px solid var(--ink);
  padding: 12px 24px;
  font-family: 'Readex Pro';
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: all 0.15s;
  border-radius: 4px;
  position: relative;
  box-shadow: 3px 3px 0 var(--ink);
}

.send-stamp:hover {
  transform: translate(-1px, -1px);
  box-shadow: 5px 5px 0 var(--ink);
  background: var(--rust-deep);
}

.send-stamp:active {
  transform: translate(2px, 2px);
  box-shadow: 0 0 0 var(--ink);
}

/* Example chips */
.examples-row {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  animation: rise 1.1s 0.3s both cubic-bezier(0.2, 0.8, 0.2, 1);
}

.examples-label {
  font-family: 'Amiri', serif;
  font-style: italic;
  font-size: 14px;
  color: var(--ink-mute);
  margin-left: 4px;
}

.example-tag {
  padding: 9px 16px;
  background: var(--paper-light);
  border: 1.5px solid var(--ink);
  color: var(--ink);
  font-family: 'Readex Pro';
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border-radius: 100px;
  transition: all 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.example-tag:hover {
  background: var(--ink);
  color: var(--paper-light);
  transform: translateY(-2px);
}

/* ============================================================
   BENTO GRID — Six modes, varied sizes, varied colors
   ============================================================ */
.bento-section {
  padding: 96px 0 64px;
}

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 36px;
  border-bottom: 1.5px solid var(--ink);
  padding-bottom: 20px;
  gap: 24px;
  flex-wrap: wrap;
}

.section-eyebrow {
  font-family: 'Amiri', serif;
  font-style: italic;
  color: var(--rust);
  font-size: 16px;
  margin-bottom: 8px;
}

.section-title {
  font-family: 'Readex Pro';
  font-weight: 700;
  font-size: clamp(32px, 5vw, 52px);
  letter-spacing: -0.025em;
  line-height: 1.05;
  max-width: 700px;
}

.section-meta {
  font-family: 'Space Grotesk';
  font-weight: 500;
  font-size: 14px;
  color: var(--ink-mute);
  text-align: left;
  white-space: nowrap;
}

.bento-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: minmax(200px, auto);
  gap: 14px;
}

.bento-card {
  border: 2px solid var(--ink);
  border-radius: 6px;
  padding: 28px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 4px 4px 0 var(--ink);
}

.bento-card:hover {
  transform: translate(-3px, -3px);
  box-shadow: 7px 7px 0 var(--ink);
}

.bento-card:active {
  transform: translate(2px, 2px);
  box-shadow: 0 0 0 var(--ink);
}

/* sizes */
.bento-large { grid-column: span 6; grid-row: span 2; }
.bento-medium { grid-column: span 4; grid-row: span 2; }
.bento-tall { grid-column: span 4; grid-row: span 2; }
.bento-wide { grid-column: span 6; }
.bento-small { grid-column: span 4; }
.bento-mid { grid-column: span 6; }

@media (max-width: 920px) {
  .bento-large, .bento-medium, .bento-tall, .bento-wide, .bento-small, .bento-mid {
    grid-column: span 12;
    grid-row: auto;
  }
}

/* color variants */
.bento-paper { background: var(--paper-light); color: var(--ink); }
.bento-forest { background: var(--forest); color: var(--paper-light); }
.bento-rust { background: var(--rust); color: var(--paper-light); }
.bento-ochre { background: var(--ochre); color: var(--ink); }
.bento-plum { background: var(--plum); color: var(--paper-light); }
.bento-ink { background: var(--ink); color: var(--paper-light); }
.bento-olive { background: var(--olive); color: var(--paper-light); }

.bento-num {
  font-family: 'Readex Pro';
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.08em;
  opacity: 0.6;
}

.bento-icon {
  margin-bottom: 16px;
}

.bento-icon svg {
  width: 64px;
  height: 64px;
  stroke-width: 1.5;
}

.bento-large .bento-icon svg { width: 88px; height: 88px; }
.bento-tall .bento-icon svg { width: 76px; height: 76px; }

.bento-title {
  font-family: 'Readex Pro';
  font-weight: 600;
  font-size: 28px;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 10px;
}

.bento-large .bento-title { font-size: 42px; }

.bento-desc {
  font-family: 'Readex Pro';
  font-size: 15.5px;
  line-height: 1.6;
  opacity: 0.85;
  max-width: 90%;
}

.bento-large .bento-desc { font-size: 17px; max-width: 80%; }

.bento-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 20px;
}

.bento-cta {
  font-family: 'Amiri', serif;
  font-style: italic;
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1.5px;
}

/* Decorative element corner */
.bento-corner {
  position: absolute;
  top: 18px;
  left: 18px;
  opacity: 0.5;
  font-family: 'Space Grotesk';
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.1em;
}

/* ============================================================
   "HOW IT WORKS" — Editorial 3-column
   ============================================================ */
.how-section {
  padding: 64px 0;
  border-top: 1.5px solid var(--ink);
  border-bottom: 1.5px solid var(--ink);
  background: var(--paper-warm);
  margin: 32px 0;
}

.how-section .container {
  background: transparent;
}

.how-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin-top: 40px;
}

.how-col {
  padding: 0 32px;
  position: relative;
}

.how-col:not(:last-child) {
  border-left: 1.5px solid var(--ink);
}

.how-col:first-child { padding-right: 0; }
.how-col:last-child { padding-left: 0; }

.how-num {
  font-family: 'Readex Pro';
  font-weight: 700;
  font-size: 92px;
  line-height: 1;
  color: var(--rust);
  letter-spacing: -0.04em;
  margin-bottom: 16px;
  position: relative;
}

.how-num::after {
  content: '';
  position: absolute;
  width: 36px;
  height: 1.5px;
  background: var(--ink);
  bottom: 8px;
  right: 100%;
  margin-right: 8px;
}

.how-title {
  font-family: 'Readex Pro';
  font-weight: 600;
  font-size: 24px;
  margin-bottom: 12px;
}

.how-desc {
  font-family: 'Readex Pro';
  font-size: 15.5px;
  line-height: 1.65;
  color: var(--ink-soft);
}

@media (max-width: 768px) {
  .how-grid { grid-template-columns: 1fr; gap: 32px; }
  .how-col { padding: 0; border: none !important; }
  .how-col:not(:last-child) { border-bottom: 1.5px solid var(--ink) !important; padding-bottom: 32px; }
}

/* ============================================================
   PROMISE — Heritage-feel
   ============================================================ */
.promise-section {
  padding: 80px 0;
}

.promise-card {
  background: var(--ink);
  color: var(--paper-light);
  border-radius: 8px;
  padding: 56px 48px;
  position: relative;
  overflow: hidden;
  border: 2px solid var(--ink);
  box-shadow: 6px 6px 0 var(--rust);
}

.promise-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.promise-eyebrow {
  font-family: 'Amiri';
  font-style: italic;
  color: var(--ochre-light);
  font-size: 17px;
  margin-bottom: 14px;
}

.promise-title {
  font-family: 'Readex Pro';
  font-weight: 700;
  font-size: clamp(32px, 4vw, 44px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 18px;
}

.promise-text {
  font-size: 17px;
  line-height: 1.7;
  color: rgba(250, 243, 227, 0.8);
}

.promise-list {
  list-style: none;
  display: grid;
  gap: 16px;
}

.promise-list li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  font-size: 15.5px;
  line-height: 1.6;
}

.promise-list-num {
  font-family: 'Space Grotesk';
  font-weight: 600;
  font-size: 13px;
  color: var(--ochre-light);
  padding-top: 3px;
  white-space: nowrap;
  min-width: 30px;
}

@media (max-width: 820px) {
  .promise-grid { grid-template-columns: 1fr; gap: 28px; }
  .promise-card { padding: 36px 28px; }
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  border-top: 1.5px solid var(--ink);
  padding: 32px 0;
  background: var(--paper-deep);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-tag {
  font-family: 'Amiri', serif;
  font-style: italic;
  font-size: 14px;
  color: var(--ink-mute);
}

/* ============================================================
   RESULT PAGE — Editorial "Verdict"
   ============================================================ */
.result-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 24px 96px;
}

.result-breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-mute);
  text-decoration: none;
  margin-bottom: 28px;
  font-family: 'Readex Pro';
  font-size: 14px;
  cursor: pointer;
  transition: color 0.15s;
}

.result-breadcrumb:hover { color: var(--ink); }

.result-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  font-family: 'Space Grotesk';
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--ink-mute);
  text-transform: uppercase;
}

.result-meta-divider {
  border-bottom: 1.5px solid var(--ink);
  margin-bottom: 32px;
}

/* The original message — as a quoted "letter" */
.quote-block {
  position: relative;
  padding: 24px 32px;
  background: var(--paper-light);
  border: 1.5px solid var(--ink);
  border-radius: 6px;
  margin-bottom: 32px;
  font-family: 'Amiri', serif;
  font-style: italic;
  font-size: 21px;
  line-height: 1.6;
  color: var(--ink-soft);
}

.quote-block::before {
  content: '"';
  position: absolute;
  top: -8px;
  right: 18px;
  font-family: 'Amiri', serif;
  font-size: 42px;
  color: var(--rust);
  opacity: 0.25;
  line-height: 1;
  background: var(--paper);
  padding: 0 6px;
  pointer-events: none;
}

.quote-label {
  font-family: 'Readex Pro';
  font-style: normal;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-mute);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

/* THE VERDICT — Editorial centerpiece */
.verdict {
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: 56px 48px;
  margin-bottom: 32px;
  position: relative;
  overflow: hidden;
  box-shadow: 6px 6px 0 var(--ink);
}

.verdict-danger { background: var(--terra); color: var(--paper-light); }
.verdict-warn { background: var(--ochre); color: var(--ink); box-shadow: 6px 6px 0 var(--ink); }
.verdict-go { background: var(--forest); color: var(--paper-light); }
.verdict-think { background: var(--plum); color: var(--paper-light); }

.verdict-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 48px;
  align-items: center;
}

@media (max-width: 820px) {
  .verdict { padding: 36px 28px; }
  .verdict-grid { grid-template-columns: 1fr; gap: 36px; }
}

.verdict-eyebrow {
  font-family: 'Amiri', serif;
  font-style: italic;
  font-size: 16px;
  margin-bottom: 12px;
  opacity: 0.85;
  display: flex;
  align-items: center;
  gap: 12px;
}

.verdict-eyebrow::before {
  content: '';
  width: 32px;
  height: 1.5px;
  background: currentColor;
}

.verdict-statement {
  font-family: 'Readex Pro';
  font-weight: 700;
  font-size: clamp(40px, 6vw, 68px);
  line-height: 0.95;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}

.verdict-reason {
  font-size: 18px;
  line-height: 1.6;
  opacity: 0.9;
  max-width: 95%;
}

/* The Big Number gauge */
.big-gauge {
  text-align: center;
  position: relative;
}

.gauge-number {
  font-family: 'Readex Pro';
  font-weight: 700;
  font-size: clamp(120px, 18vw, 220px);
  line-height: 0.85;
  letter-spacing: -0.06em;
  color: currentColor;
  animation: stamp 0.9s cubic-bezier(0.2, 0.8, 0.2, 1);
  position: relative;
  display: inline-block;
}

.gauge-percent {
  font-family: 'Readex Pro';
  font-weight: 600;
  font-size: 32%;
  opacity: 0.6;
  margin-right: 4px;
  vertical-align: 60%;
}

.gauge-label {
  font-family: 'Amiri', serif;
  font-style: italic;
  font-size: 18px;
  margin-top: 12px;
  opacity: 0.9;
}

.gauge-sublabel {
  font-family: 'Space Grotesk';
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.5;
  margin-top: 6px;
}

/* Mini meter row */
.mini-meters {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 32px;
}

@media (max-width: 700px) {
  .mini-meters { grid-template-columns: 1fr; }
}

.mini-meter {
  background: var(--paper-light);
  border: 1.5px solid var(--ink);
  border-radius: 6px;
  padding: 20px 22px;
  position: relative;
}

.mini-meter-label {
  font-family: 'Readex Pro';
  font-size: 13px;
  color: var(--ink-mute);
  font-weight: 500;
  margin-bottom: 8px;
}

.mini-meter-value {
  font-family: 'Readex Pro';
  font-weight: 700;
  font-size: 48px;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.mini-meter-value .suffix {
  font-size: 50%;
  color: var(--ink-mute);
  font-weight: 500;
}

.mini-meter-bar {
  height: 4px;
  background: var(--paper-deep);
  border-radius: 100px;
  margin-top: 12px;
  overflow: hidden;
}

.mini-meter-fill {
  height: 100%;
  border-radius: 100px;
  transition: width 1.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.fill-danger { background: var(--terra); }
.fill-warn { background: var(--ochre); }
.fill-go { background: var(--forest); }

/* Result section blocks */
.result-block {
  background: var(--paper-light);
  border: 1.5px solid var(--ink);
  border-radius: 6px;
  padding: 32px;
  margin-bottom: 18px;
  position: relative;
}

.block-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1.5px dashed var(--ink-faint);
}

.block-num {
  font-family: 'Readex Pro';
  font-weight: 700;
  font-size: 14px;
  color: var(--paper-light);
  background: var(--ink);
  padding: 6px 10px;
  border-radius: 4px;
  letter-spacing: 0.05em;
}

.block-title {
  font-family: 'Readex Pro';
  font-weight: 600;
  font-size: 22px;
  letter-spacing: -0.015em;
  flex: 1;
}

.block-meta {
  font-family: 'Amiri', serif;
  font-style: italic;
  font-size: 14px;
  color: var(--ink-mute);
}

/* Situation reading — varied tags */
.reading-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

.reading-item {
  padding: 16px 18px;
  border: 1.5px solid var(--ink);
  border-radius: 4px;
  background: var(--paper);
}

.reading-label {
  font-family: 'Amiri', serif;
  font-style: italic;
  font-size: 13px;
  color: var(--ink-mute);
  margin-bottom: 4px;
}

.reading-value {
  font-family: 'Readex Pro';
  font-weight: 600;
  font-size: 18px;
  color: var(--ink);
}

.reading-value.hot { color: var(--terra); }
.reading-value.warm { color: var(--rust); }
.reading-value.cool { color: var(--forest); }

/* Danger sentence callout */
.danger-callout {
  background: var(--ink);
  color: var(--paper-light);
  border-radius: 6px;
  padding: 24px 28px;
  font-family: 'Amiri', serif;
  font-style: italic;
  font-size: 22px;
  line-height: 1.5;
  position: relative;
  border: 2px solid var(--terra);
}

.danger-callout::before {
  content: '⚠ خطر';
  position: absolute;
  top: -12px;
  right: 20px;
  background: var(--terra);
  color: var(--paper-light);
  padding: 4px 12px;
  font-family: 'Readex Pro';
  font-style: normal;
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.08em;
  border-radius: 4px;
}

.safe-callout {
  background: var(--forest);
  color: var(--paper-light);
  border-radius: 6px;
  padding: 24px 28px;
  margin-top: 14px;
  font-size: 19px;
  line-height: 1.55;
  font-family: 'Amiri', serif;
  font-style: italic;
  position: relative;
  border: 2px solid var(--forest);
}

.safe-callout::before {
  content: '✓ آمن';
  position: absolute;
  top: -12px;
  right: 20px;
  background: var(--forest-light);
  color: var(--paper-light);
  padding: 4px 12px;
  font-family: 'Readex Pro';
  font-style: normal;
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.08em;
  border-radius: 4px;
}

.callout-explain {
  font-family: 'Readex Pro';
  font-size: 15px;
  color: var(--ink-soft);
  line-height: 1.65;
  margin-top: 14px;
  font-style: normal;
}

/* Action list */
.actions-list {
  display: grid;
  gap: 14px;
}

.action-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 20px;
  align-items: center;
  padding: 20px 24px;
  background: var(--paper);
  border: 1.5px solid var(--ink);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.action-item:hover {
  background: var(--ink);
  color: var(--paper-light);
  transform: translateX(-4px);
}

.action-item:hover .action-num,
.action-item:hover .action-detail { color: var(--paper-light); opacity: 0.7; }

.action-num {
  font-family: 'Readex Pro';
  font-weight: 700;
  font-size: 32px;
  color: var(--rust);
  letter-spacing: -0.02em;
  line-height: 1;
  min-width: 40px;
}

.action-content {
  flex: 1;
}

.action-title {
  font-family: 'Readex Pro';
  font-weight: 600;
  font-size: 18px;
  margin-bottom: 4px;
}

.action-detail {
  font-family: 'Readex Pro';
  font-size: 14.5px;
  color: var(--ink-mute);
  line-height: 1.55;
}

.action-arrow {
  opacity: 0.4;
  transition: all 0.2s;
}

.action-item:hover .action-arrow {
  opacity: 1;
  transform: translateX(-4px);
}

/* Tone tabs and replies */
.tone-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.tone-pill {
  padding: 9px 18px;
  background: transparent;
  border: 1.5px solid var(--ink);
  color: var(--ink);
  font-family: 'Readex Pro';
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border-radius: 100px;
  transition: all 0.15s;
}

.tone-pill:hover { background: var(--paper-deep); }

.tone-pill.active {
  background: var(--ink);
  color: var(--paper-light);
  border-color: var(--ink);
  font-weight: 600;
}

.reply-display {
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 6px;
  padding: 28px 32px;
  position: relative;
  margin-bottom: 16px;
  box-shadow: 3px 3px 0 var(--ink);
}

.reply-score-badge {
  position: absolute;
  top: -12px;
  left: 20px;
  background: var(--forest);
  color: var(--paper-light);
  padding: 4px 12px;
  font-family: 'Space Grotesk';
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.05em;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.reply-text {
  font-family: 'Amiri', serif;
  font-size: 21px;
  line-height: 1.65;
  color: var(--ink);
}

.reply-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.ctrl-btn {
  background: transparent;
  border: 1.5px solid var(--ink-faint);
  padding: 8px 16px;
  font-family: 'Readex Pro';
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink-soft);
  cursor: pointer;
  border-radius: 100px;
  transition: all 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.ctrl-btn:hover {
  background: var(--ink);
  color: var(--paper-light);
  border-color: var(--ink);
}

.ctrl-btn.primary {
  background: var(--rust);
  color: var(--paper-light);
  border-color: var(--rust);
  font-weight: 600;
}

.ctrl-btn.primary:hover {
  background: var(--ink);
  border-color: var(--ink);
}

/* Checklist */
.check-list {
  list-style: none;
  display: grid;
  gap: 10px;
}

.check-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: center;
  padding: 16px 20px;
  background: var(--paper);
  border: 1.5px solid var(--ink-faint);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s;
}

.check-item:hover { border-color: var(--ink); background: var(--paper-warm); }

.check-box {
  width: 26px;
  height: 26px;
  border: 1.5px solid var(--ink);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--paper-light);
  flex-shrink: 0;
  transition: all 0.15s;
}

.check-item.checked .check-box {
  background: var(--forest);
  border-color: var(--forest);
  color: var(--paper-light);
}

.check-item.checked .check-text {
  color: var(--ink-faint);
  text-decoration: line-through;
}

.check-text {
  font-family: 'Readex Pro';
  font-size: 15.5px;
  line-height: 1.55;
}

/* ============================================================
   DECISION METER — Editorial Score
   ============================================================ */
.decision-hero {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 56px;
  align-items: center;
  background: var(--paper-light);
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: 56px 48px;
  margin-bottom: 24px;
  box-shadow: 6px 6px 0 var(--ink);
}

@media (max-width: 820px) {
  .decision-hero { grid-template-columns: 1fr; padding: 36px 28px; gap: 36px; }
}

.decision-ring {
  position: relative;
  width: 280px;
  height: 280px;
  margin: 0 auto;
}

.decision-ring svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.decision-ring-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.decision-score {
  font-family: 'Readex Pro';
  font-weight: 700;
  font-size: 110px;
  line-height: 0.9;
  letter-spacing: -0.05em;
  color: var(--ink);
}

.decision-of {
  font-family: 'Amiri';
  font-style: italic;
  font-size: 14px;
  color: var(--ink-mute);
  margin-top: 4px;
}

.decision-meta {
  font-family: 'Amiri', serif;
  font-style: italic;
  color: var(--rust);
  font-size: 17px;
  margin-bottom: 12px;
}

.decision-verdict-title {
  font-family: 'Readex Pro';
  font-weight: 700;
  font-size: clamp(32px, 4.5vw, 48px);
  line-height: 1;
  letter-spacing: -0.025em;
  margin-bottom: 18px;
}

.decision-verdict-sub {
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink-soft);
}

/* Breakdown bars */
.breakdown-stack {
  display: grid;
  gap: 14px;
}

.breakdown-row {
  display: grid;
  grid-template-columns: 1fr 100px 50px;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
  background: var(--paper);
  border: 1.5px solid var(--ink-faint);
  border-radius: 6px;
  transition: border-color 0.15s;
}

.breakdown-row:hover { border-color: var(--ink); }

.breakdown-name {
  font-family: 'Readex Pro';
  font-size: 15px;
  font-weight: 500;
}

.breakdown-bar-wrap {
  height: 8px;
  background: var(--paper-deep);
  border-radius: 100px;
  overflow: hidden;
  border: 1px solid var(--ink-faint);
}

.breakdown-fill-anim {
  height: 100%;
  border-radius: 100px;
  background: var(--forest);
  transition: width 1.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.breakdown-num {
  font-family: 'Readex Pro';
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.02em;
  text-align: left;
}

/* Insight cards */
.insight-stack { display: grid; gap: 14px; }

.insight-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  padding: 22px 24px;
  background: var(--paper);
  border: 1.5px solid var(--ink-faint);
  border-radius: 6px;
  align-items: flex-start;
}

.insight-stamp {
  font-family: 'Readex Pro';
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.1em;
  padding: 6px 12px;
  color: var(--paper-light);
  border-radius: 4px;
  white-space: nowrap;
  margin-top: 2px;
}

.insight-stamp.pro { background: var(--forest); }
.insight-stamp.con { background: var(--terra); }
.insight-stamp.warn { background: var(--ochre); color: var(--ink); }
.insight-stamp.ask { background: var(--plum); }
.insight-stamp.try { background: var(--rust); }

.insight-content { flex: 1; }
.insight-content strong {
  font-family: 'Readex Pro';
  font-weight: 600;
  font-size: 17px;
  display: block;
  margin-bottom: 6px;
}
.insight-content p {
  font-family: 'Readex Pro';
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink-soft);
}

/* ============================================================
   TEMPLATES LIBRARY
   ============================================================ */
.templates-hero {
  padding: 56px 0 32px;
}

.templates-search-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  margin: 32px 0 24px;
  max-width: 700px;
}

.templates-search-input {
  background: var(--paper-light);
  border: 1.5px solid var(--ink);
  border-radius: 6px;
  padding: 14px 18px;
  font-family: 'Readex Pro';
  font-size: 16px;
  color: var(--ink);
  outline: none;
  transition: all 0.15s;
  box-shadow: 3px 3px 0 var(--ink);
}

.templates-search-input:focus {
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 var(--rust);
}

.templates-search-input::placeholder { color: var(--ink-faint); }

.cat-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
  margin-bottom: 32px;
  scrollbar-width: none;
}
.cat-row::-webkit-scrollbar { display: none; }

.cat-pill {
  padding: 9px 18px;
  background: transparent;
  border: 1.5px solid var(--ink);
  color: var(--ink);
  font-family: 'Readex Pro';
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border-radius: 100px;
  white-space: nowrap;
  transition: all 0.15s;
}

.cat-pill:hover { background: var(--paper-deep); }

.cat-pill.active {
  background: var(--ink);
  color: var(--paper-light);
  border-color: var(--ink);
  font-weight: 600;
}

.template-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.tpl-card {
  background: var(--paper-light);
  border: 1.5px solid var(--ink);
  border-radius: 6px;
  padding: 24px;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  box-shadow: 4px 4px 0 var(--ink);
}

.tpl-card:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--rust);
}

.tpl-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.tpl-tag {
  font-family: 'Readex Pro';
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.05em;
  padding: 4px 10px;
  border-radius: 100px;
}

.tpl-tag.rust { background: var(--rust); color: var(--paper-light); }
.tpl-tag.forest { background: var(--forest); color: var(--paper-light); }
.tpl-tag.ochre { background: var(--ochre); color: var(--ink); }
.tpl-tag.plum { background: var(--plum); color: var(--paper-light); }
.tpl-tag.ink { background: var(--ink); color: var(--paper-light); }

.tpl-uses {
  font-family: 'Space Grotesk';
  font-weight: 500;
  font-size: 12px;
  color: var(--ink-mute);
}

.tpl-title {
  font-family: 'Readex Pro';
  font-weight: 600;
  font-size: 19px;
  margin-bottom: 10px;
  line-height: 1.25;
}

.tpl-preview {
  font-family: 'Amiri', serif;
  font-style: italic;
  font-size: 16px;
  color: var(--ink-mute);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ============================================================
   MOBILE BOTTOM NAV
   ============================================================ */
.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--paper-light);
  border-top: 1.5px solid var(--ink);
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  z-index: 60;
}

.bottom-nav-grid {
  display: grid;
  grid-template-columns: 1fr 1fr auto 1fr 1fr;
  gap: 4px;
  align-items: end;
  max-width: 500px;
  margin: 0 auto;
}

.bn-item {
  background: none;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 6px 4px;
  color: var(--ink-mute);
  font-family: 'Readex Pro';
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  border-radius: 8px;
}

.bn-item.active { color: var(--ink); font-weight: 600; }
.bn-item svg { width: 22px; height: 22px; }

.bn-fab {
  background: var(--rust);
  color: var(--paper-light);
  border: 2px solid var(--ink);
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: -22px;
  box-shadow: 3px 3px 0 var(--ink);
  cursor: pointer;
}

.bn-fab:active {
  transform: translate(2px, 2px);
  box-shadow: 0 0 0 var(--ink);
}

@media (max-width: 768px) {
  .bottom-nav { display: block; }
  body { padding-bottom: 88px; }
  .hero { padding: 32px 0 16px; }
  .hero-grid { grid-template-columns: 1fr; gap: 24px; }
  .hero-meta { border-right: none; padding-right: 0; padding-top: 16px; border-top: 1.5px solid var(--ink); text-align: right; }
  .bento-section { padding: 56px 0 32px; }
  .container { padding: 0 18px; }
  .nav-link { display: none; }
  .brand-tag { display: none; }
  .result-wrap { padding: 28px 18px 110px; }
  .verdict-grid { grid-template-columns: 1fr; gap: 28px; text-align: center; }
  .gauge-number { font-size: 140px; }
  .result-block { padding: 24px 20px; }
  .verdict { padding: 32px 24px; }
  .promise-card { box-shadow: 4px 4px 0 var(--rust); }
}

/* ============================================================
   ANIMATED REVEAL
   ============================================================ */
.reveal { animation: rise 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) backwards; }
.reveal:nth-child(1) { animation-delay: 0s; }
.reveal:nth-child(2) { animation-delay: 0.08s; }
.reveal:nth-child(3) { animation-delay: 0.16s; }
.reveal:nth-child(4) { animation-delay: 0.24s; }
.reveal:nth-child(5) { animation-delay: 0.32s; }
.reveal:nth-child(6) { animation-delay: 0.4s; }

/* scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--paper); }
::-webkit-scrollbar-thumb { background: var(--ink-faint); border-radius: 100px; border: 2px solid var(--paper); }
::-webkit-scrollbar-thumb:hover { background: var(--ink-mute); }

::selection { background: var(--rust); color: var(--paper-light); }
/* ============================================================
   ✦ POST-V1 OVERRIDES — Brand font, mobile fixes, layout polish
   ============================================================ */

/* اسم البراند فقط بـReem Kufi */
.brand-name,
.brand-glyph,
.brand-mark .brand-name span {
  font-family: 'Reem Kufi', 'Readex Pro', sans-serif !important;
  letter-spacing: -0.02em;
}

/* الجسم الكامل — منع scroll أفقي على الجوال */
html, body {
  overflow-x: hidden !important;
  max-width: 100vw;
  position: relative;
}

* {
  max-width: 100vw;
}

img, svg, video, iframe {
  max-width: 100%;
  height: auto;
}

/* تحسين تباعد العناوين بشكل عام */
.hero-title,
.verdict-statement,
.decision-verdict-title,
.block-title,
.tpl-title {
  line-height: 1.25 !important;
  word-break: break-word;
}

/* عناوين الـhero — تكبير المساحات */
.hero-title {
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-bottom: 24px;
}

@media (max-width: 768px) {
  .hero-title { font-size: clamp(36px, 9vw, 60px) !important; }
  .hero-description { font-size: 17px; line-height: 1.7; }
  .container { padding-inline: 16px !important; }
  
  .verdict-statement {
    font-size: clamp(28px, 7vw, 44px) !important;
    line-height: 1.3 !important;
  }
  
  .gauge-number {
    font-size: clamp(80px, 22vw, 140px) !important;
  }
  
  .decision-score {
    font-size: clamp(80px, 22vw, 140px) !important;
  }
  
  /* صف النبرات — تمرير أفقي محصور داخل الكرت */
  .tone-row {
    overflow-x: auto;
    flex-wrap: nowrap !important;
    padding-bottom: 8px;
    scrollbar-width: none;
  }
  .tone-row::-webkit-scrollbar { display: none; }
  
  .tone-pill { flex-shrink: 0; white-space: nowrap; }
  
  /* صف التحكم — wrap */
  .reply-controls {
    flex-wrap: wrap;
    gap: 8px;
  }
  .reply-controls .ctrl-btn { flex: 1 1 calc(50% - 4px); justify-content: center; }
  
  /* category pills — wrap */
  .cat-row {
    overflow-x: auto;
    flex-wrap: nowrap !important;
    padding-bottom: 8px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .cat-row::-webkit-scrollbar { display: none; }
  .cat-pill { flex-shrink: 0; white-space: nowrap; }
  
  /* Bento grid — column on mobile */
  .bento-grid {
    grid-template-columns: 1fr !important;
    grid-auto-rows: auto !important;
  }
  .bento-card { min-height: 200px; grid-column: span 1 !important; grid-row: span 1 !important; }
  
  /* Hero meta — تحت الـtitle */
  .hero-grid {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
  }
  
  /* Verdict grid — column */
  .verdict-grid {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
    text-align: center;
  }
  .big-gauge { margin: 0 auto; }
  
  /* Decision hero — column */
  .decision-hero {
    grid-template-columns: 1fr !important;
    gap: 24px;
    text-align: center;
  }
  
  /* Mini meters — column */
  .mini-meters {
    grid-template-columns: 1fr !important;
  }
  
  /* Reading grid — 2 columns on mobile */
  .reading-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  
  /* Insight rows — stack */
  .insight-row {
    grid-template-columns: 1fr !important;
  }
  
  /* Templates grid — single column */
  .template-cards {
    grid-template-columns: 1fr !important;
  }
  
  /* Result wrap padding */
  .result-wrap {
    padding-inline: 16px !important;
  }
  
  /* الـtopnav أصغر على الجوال */
  .topnav-actions .nav-link { display: none; }
  .topnav-actions .btn-stamp.outline { display: none; }
  
  /* breakdown rows on mobile */
  .breakdown-row {
    grid-template-columns: 120px 1fr 40px !important;
    gap: 8px !important;
    font-size: 13px;
  }
  
  /* action items on mobile */
  .action-item {
    grid-template-columns: 50px 1fr !important;
  }
  .action-arrow { display: none; }
  
  /* hide topnav glyph small */
  .brand-tag { display: none; }
  
  /* example tags wrap */
  .example-tags {
    flex-wrap: wrap;
  }
  
  /* smart input full width */
  .smart-input-row { flex-direction: column; align-items: stretch; }
  .send-stamp { width: 100%; justify-content: center; }
  
  /* bottom nav safe area */
  .bottom-nav {
    padding-bottom: env(safe-area-inset-bottom, 0);
  }
}

/* ─────── Fixed Verdict Summary Bar (result page top) ─────── */
.verdict-summary-card {
  position: sticky;
  top: 14px;
  z-index: 50;
  background: var(--paper-light);
  border: 2px solid var(--ink);
  border-radius: 10px;
  box-shadow: 4px 4px 0 var(--ink);
  padding: 18px 22px;
  margin-bottom: 28px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
}

.vs-content { min-width: 0; }
.vs-eyebrow {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--ink-mute);
  margin-bottom: 6px;
}
.vs-title {
  font-family: 'Readex Pro', sans-serif;
  font-weight: 700;
  font-size: clamp(18px, 3vw, 24px);
  color: var(--ink);
  line-height: 1.3;
  margin: 0;
}
.vs-meta {
  display: flex;
  gap: 14px;
  margin-top: 8px;
  font-size: 13px;
  color: var(--ink-mute);
  flex-wrap: wrap;
}
.vs-meta span { display: inline-flex; align-items: center; gap: 4px; }

.vs-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.vs-action-btn {
  width: 38px;
  height: 38px;
  border: 1.5px solid var(--ink);
  background: var(--paper-light);
  border-radius: 8px;
  cursor: pointer;
  display: grid;
  place-items: center;
  color: var(--ink);
  transition: all 0.15s;
}
.vs-action-btn:hover {
  background: var(--ink);
  color: var(--paper-light);
  transform: translateY(-1px);
}
.vs-action-btn.primary {
  background: var(--forest);
  color: var(--paper-light);
  border-color: var(--forest);
}

@media (max-width: 640px) {
  .verdict-summary-card {
    grid-template-columns: 1fr;
    padding: 14px 16px;
    position: relative;
    top: 0;
  }
  .vs-actions {
    border-top: 1px dashed var(--ink-faint);
    padding-top: 10px;
    justify-content: flex-end;
  }
}

/* ─────── Tone tabs CENTERED above reply card ─────── */
.tone-row {
  justify-content: center;
  margin-bottom: 14px !important;
}

/* ─────── Quick actions BELOW reply card ─────── */
.reply-controls {
  margin-top: 14px;
  justify-content: center;
}

/* ─────── Disclaimer footer note ─────── */
.disclaimer-block {
  margin: 40px auto 24px;
  padding: 16px 20px;
  max-width: 760px;
  background: var(--paper);
  border: 1px dashed var(--ink-faint);
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink-mute);
  text-align: center;
}
.disclaimer-block strong { color: var(--ink); font-weight: 600; }
.disclaimer-block .disc-icon {
  display: inline-block;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--ochre);
  color: var(--ink);
  font-weight: 700;
  margin-left: 4px;
  font-family: 'Space Grotesk', sans-serif;
  line-height: 24px;
  text-align: center;
  font-size: 14px;
}

/* ─────── New + button label ─────── */
.bn-fab-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.bn-fab-label {
  font-size: 9px;
  color: var(--ink-mute);
  font-weight: 600;
  margin-top: 2px;
}

/* ─────── Scroll cue arrow on home ─────── */
.scroll-cue {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin: 16px auto 0;
  color: var(--ink-mute);
  font-size: 12px;
  letter-spacing: 0.1em;
  animation: bounce-cue 2s ease-in-out infinite;
}
@keyframes bounce-cue {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

/* ─────── Login/Register/Account links ─────── */
.user-greeting {
  font-family: 'Readex Pro', sans-serif;
  font-size: 14px;
  color: var(--ink);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.user-greeting .user-dot {
  width: 7px; height: 7px;
  background: var(--forest);
  border-radius: 50%;
}

/* ─────── Save banner (encourage registration) ─────── */
.save-banner {
  margin: 20px 0;
  padding: 14px 18px;
  background: linear-gradient(180deg, rgba(27,67,50,0.06) 0%, rgba(27,67,50,0.02) 100%);
  border: 1.5px solid var(--forest);
  border-radius: 8px;
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}
.save-banner-text {
  font-size: 14px;
  color: var(--ink);
  line-height: 1.5;
}
.save-banner-text strong { color: var(--forest); }
.save-banner-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: var(--forest);
  color: var(--paper-light);
  border: 2px solid var(--ink);
  border-radius: 6px;
  font-weight: 600;
  font-size: 13px;
  text-decoration: none;
  font-family: 'Readex Pro', sans-serif;
}
.save-banner-cta:hover { transform: translateY(-1px); }

/* ─────── Login/Register pages ─────── */
.auth-wrap {
  max-width: 440px;
  margin: 60px auto;
  padding: 36px;
  background: var(--paper-light);
  border: 2px solid var(--ink);
  border-radius: 10px;
  box-shadow: 6px 6px 0 var(--ink);
}
.auth-title {
  font-family: 'Readex Pro', sans-serif;
  font-weight: 700;
  font-size: 32px;
  color: var(--ink);
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}
.auth-sub {
  font-family: 'Amiri', serif;
  font-style: italic;
  color: var(--ink-mute);
  font-size: 16px;
  margin-bottom: 28px;
}
.auth-field {
  margin-bottom: 18px;
}
.auth-field label {
  display: block;
  font-size: 13px;
  color: var(--ink-mute);
  font-weight: 500;
  margin-bottom: 6px;
}
.auth-field input {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--ink-faint);
  background: var(--paper);
  border-radius: 6px;
  font-family: 'Readex Pro', sans-serif;
  font-size: 15px;
  color: var(--ink);
  transition: border 0.2s;
}
.auth-field input:focus {
  outline: none;
  border-color: var(--forest);
  background: var(--paper-light);
}
.auth-submit {
  width: 100%;
  padding: 14px;
  background: var(--ink);
  color: var(--paper-light);
  border: 2px solid var(--ink);
  border-radius: 6px;
  font-family: 'Readex Pro', sans-serif;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  margin-top: 8px;
  box-shadow: 3px 3px 0 var(--forest);
  transition: transform 0.15s;
}
.auth-submit:hover { transform: translateY(-2px); box-shadow: 5px 5px 0 var(--forest); }
.auth-alt {
  text-align: center;
  margin-top: 20px;
  font-size: 14px;
  color: var(--ink-mute);
}
.auth-alt a { color: var(--forest); font-weight: 600; text-decoration: none; }
.auth-error {
  background: rgba(184, 61, 31, 0.08);
  border: 1px solid var(--terra);
  color: var(--terra);
  padding: 10px 14px;
  border-radius: 6px;
  margin-bottom: 18px;
  font-size: 14px;
}
.auth-guest-note {
  text-align: center;
  margin-top: 18px;
  padding: 12px;
  background: var(--paper);
  border: 1px dashed var(--ink-faint);
  border-radius: 6px;
  font-size: 13px;
  color: var(--ink-mute);
  line-height: 1.6;
}

/* Fix the broken divider on result page top */
.result-meta-divider { 
  display: none; /* This was causing the broken-looking line */
}
.result-meta-row {
  margin-bottom: 24px;
  padding-bottom: 14px;
  border-bottom: 1px dashed var(--ink-faint);
}

/* ─────── Tour highlight (first-time visitor) ─────── */
.tour-pulse {
  position: relative;
}
.tour-pulse::after {
  content: '';
  position: absolute;
  inset: -4px;
  border: 2px solid var(--rust);
  border-radius: inherit;
  animation: tour-pulse-anim 1.6s ease-in-out infinite;
  pointer-events: none;
}
@keyframes tour-pulse-anim {
  0%, 100% { opacity: 0; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.03); }
}

/* ─────── Welcome strip on home ─────── */
.welcome-strip {
  background: var(--ink);
  color: var(--paper-light);
  padding: 10px 20px;
  text-align: center;
  font-size: 13px;
  font-family: 'Readex Pro', sans-serif;
  position: relative;
}
.welcome-strip .ws-close {
  position: absolute;
  inset-inline-end: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: 0;
  color: var(--paper-light);
  font-size: 20px;
  cursor: pointer;
  opacity: 0.7;
}
.welcome-strip .ws-close:hover { opacity: 1; }
.welcome-strip strong { color: var(--ochre); font-weight: 700; }

/* ─────── Branded download card (for PDF/image export) ─────── */
.export-card {
  position: fixed;
  inset-inline-start: -9999px;
  width: 820px;
  background: var(--paper-light);
  padding: 50px 56px;
  font-family: 'Readex Pro', sans-serif;
}
.export-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 24px;
  border-bottom: 2px solid var(--ink);
  margin-bottom: 32px;
}
.export-logo {
  font-family: 'Reem Kufi', sans-serif;
  font-size: 36px;
  font-weight: 700;
  color: var(--ink);
}
.export-logo span { color: var(--rust); }
.export-meta {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 12px;
  color: var(--ink-mute);
  text-align: end;
}
.export-footer {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px dashed var(--ink-faint);
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--ink-mute);
  font-family: 'Space Grotesk', sans-serif;
}

/* ============================================================
   ✦ LOADING OVERLAY — Character + dynamic phrases
   ============================================================ */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: linear-gradient(180deg, var(--paper) 0%, var(--paper-deep) 100%);
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 24px;
  animation: overlayFadeIn 0.3s ease-out;
}
.loading-overlay.show { display: flex; }

@keyframes overlayFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.loading-content {
  max-width: 480px;
  width: 100%;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.loading-character {
  width: 220px;
  height: 220px;
  margin-bottom: 8px;
  filter: drop-shadow(4px 4px 0 var(--ink));
}
.loading-character svg { width: 100%; height: 100%; }

.loading-headline {
  font-family: 'Reem Kufi', 'Readex Pro', sans-serif;
  font-size: clamp(28px, 5vw, 38px);
  font-weight: 700;
  color: var(--ink);
  margin: 0;
  letter-spacing: -0.02em;
}
.loading-headline .dot {
  display: inline-block;
  color: var(--rust);
  animation: titleDot 1.4s ease-in-out infinite;
}
.loading-headline .dot:nth-child(2) { animation-delay: 0.2s; }
.loading-headline .dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes titleDot {
  0%, 100% { opacity: 0.3; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(-3px); }
}

.loading-phrase {
  font-family: 'Readex Pro', sans-serif;
  font-size: 17px;
  color: var(--ink-mute);
  margin: 0;
  min-height: 26px;
  transition: opacity 0.25s ease;
  font-weight: 400;
  line-height: 1.5;
}

.loading-progress-rail {
  width: 100%;
  max-width: 320px;
  height: 6px;
  background: var(--paper-light);
  border: 1.5px solid var(--ink);
  border-radius: 100px;
  overflow: hidden;
  margin-top: 8px;
  box-shadow: 2px 2px 0 var(--ink);
}
.loading-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--forest), var(--ochre), var(--rust));
  width: 0%;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 100px;
}

.loading-hint {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--ink-mute);
  margin-top: 4px;
  opacity: 0.7;
}

@media (max-width: 480px) {
  .loading-character { width: 170px; height: 170px; }
  .loading-headline { font-size: 26px; }
  .loading-phrase { font-size: 15px; }
}

/* ============================================================
   ✦ HERO — Live ticker of analyzed situations
   ============================================================ */
.hero-ticker-wrap {
  margin-top: 28px;
  padding: 14px 0;
  border-block: 1px dashed var(--ink-faint);
  overflow: hidden;
  position: relative;
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.hero-ticker-label {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 8px;
  padding-inline: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.hero-ticker-label::before {
  content: '';
  width: 7px;
  height: 7px;
  background: var(--forest);
  border-radius: 50%;
  animation: livePulse 1.5s ease-in-out infinite;
}
@keyframes livePulse {
  0%, 100% { opacity: 0.4; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.1); }
}

.hero-ticker {
  display: flex;
  gap: 14px;
  animation: tickerScroll 40s linear infinite;
  width: max-content;
}
.hero-ticker:hover { animation-play-state: paused; }

.ticker-card {
  flex-shrink: 0;
  background: var(--paper-light);
  border: 1.5px solid var(--ink);
  border-radius: 8px;
  padding: 10px 16px;
  font-family: 'Readex Pro', sans-serif;
  font-size: 13px;
  color: var(--ink);
  box-shadow: 2px 2px 0 var(--ink);
  display: flex;
  align-items: center;
  gap: 10px;
}
.ticker-card .tag {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  background: var(--ink);
  color: var(--paper-light);
  padding: 2px 7px;
  border-radius: 100px;
  font-family: 'Space Grotesk', sans-serif;
}
.ticker-card .tag.forest { background: var(--forest); }
.ticker-card .tag.rust { background: var(--rust); }
.ticker-card .tag.ochre { background: var(--ochre-deep); }
.ticker-card .tag.plum { background: var(--plum); }
.ticker-card .arrow { color: var(--ink-mute); font-size: 12px; }

@keyframes tickerScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ============================================================
   ✦ MY SHOR — User history page
   ============================================================ */
.my-shor-wrap {
  max-width: 880px;
  margin: 36px auto 60px;
  padding-inline: 20px;
}

.my-shor-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 28px;
  padding-bottom: 18px;
  border-bottom: 2px solid var(--ink);
  gap: 16px;
  flex-wrap: wrap;
}
.my-shor-header h1 {
  font-family: 'Reem Kufi', 'Readex Pro', sans-serif;
  font-size: clamp(34px, 6vw, 58px);
  font-weight: 700;
  color: var(--ink);
  margin: 0;
  letter-spacing: -0.025em;
  line-height: 1.1;
}
.my-shor-header h1 em {
  font-family: 'Amiri', serif;
  font-style: italic;
  color: var(--rust);
}
.my-shor-stat {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--ink-mute);
  text-align: end;
}
.my-shor-stat strong {
  display: block;
  font-size: 32px;
  color: var(--ink);
  letter-spacing: -0.02em;
  margin-bottom: 2px;
  direction: ltr;
}

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

.shor-list-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 16px;
  align-items: start;
  padding: 18px 20px;
  background: var(--paper-light);
  border: 1.5px solid var(--ink);
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  box-shadow: 3px 3px 0 var(--ink);
  transition: transform 0.18s, box-shadow 0.18s;
}
.shor-list-item:hover {
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0 var(--ink);
}

.shor-list-num {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 11px;
  color: var(--ink-mute);
  letter-spacing: 0.1em;
  min-width: 28px;
  padding-top: 3px;
  direction: ltr;
}

.shor-list-content {
  min-width: 0;
}
.shor-list-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.shor-mode-tag {
  font-size: 11px;
  background: var(--ink);
  color: var(--paper-light);
  padding: 3px 9px;
  border-radius: 100px;
  font-family: 'Space Grotesk', sans-serif;
  letter-spacing: 0.05em;
}
.shor-mode-tag.forest { background: var(--forest); }
.shor-mode-tag.rust { background: var(--rust); }
.shor-mode-tag.ochre { background: var(--ochre-deep); }
.shor-mode-tag.plum { background: var(--plum); }

.shor-list-date {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 11px;
  color: var(--ink-mute);
  letter-spacing: 0.05em;
}

.shor-list-preview {
  font-family: 'Readex Pro', sans-serif;
  font-size: 15px;
  color: var(--ink);
  line-height: 1.55;
  margin: 0 0 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.shor-list-rec {
  font-family: 'Amiri', serif;
  font-style: italic;
  font-size: 14px;
  color: var(--ink-mute);
  margin: 0;
}

.shor-list-arrow {
  color: var(--ink-mute);
  align-self: center;
  flex-shrink: 0;
}

.shor-empty {
  text-align: center;
  padding: 60px 24px;
  background: var(--paper-light);
  border: 2px dashed var(--ink-faint);
  border-radius: 12px;
}
.shor-empty-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
  opacity: 0.65;
}
.shor-empty h3 {
  font-family: 'Reem Kufi', 'Readex Pro', sans-serif;
  font-size: 24px;
  color: var(--ink);
  margin: 0 0 10px;
}
.shor-empty p {
  font-family: 'Amiri', serif;
  font-style: italic;
  color: var(--ink-mute);
  margin: 0 0 20px;
  font-size: 16px;
}

@media (max-width: 640px) {
  .shor-list-item {
    grid-template-columns: 1fr auto;
  }
  .shor-list-num { display: none; }
}

/* ============================================================
   ✦ HERO BACKGROUND DECORATION — ضباب ملوّن + حروف طافية
   ============================================================ */
.hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.hero > .container,
.hero > * { position: relative; z-index: 1; }

.hero-bg-decor {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

/* ━━━━━ ضباب ملوّن (blobs) ━━━━━ */
.hero-bg-decor .blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.16;
  will-change: transform;
}

.hero-bg-decor .blob-1 {
  top: -120px;
  right: -100px;
  width: 420px;
  height: 420px;
  background: var(--forest);
  animation: blobDrift1 28s ease-in-out infinite;
}

.hero-bg-decor .blob-2 {
  top: 35%;
  left: -180px;
  width: 380px;
  height: 380px;
  background: var(--rust);
  animation: blobDrift2 36s ease-in-out infinite;
}

.hero-bg-decor .blob-3 {
  bottom: -150px;
  right: 25%;
  width: 320px;
  height: 320px;
  background: var(--ochre);
  animation: blobDrift3 32s ease-in-out infinite;
}

.hero-bg-decor .blob-4 {
  top: 20%;
  right: 35%;
  width: 240px;
  height: 240px;
  background: var(--plum);
  animation: blobDrift1 40s ease-in-out infinite;
  animation-delay: -10s;
  opacity: 0.1;
}

@keyframes blobDrift1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(-50px, 40px) scale(1.15); }
  66% { transform: translate(30px, -30px) scale(0.9); }
}

@keyframes blobDrift2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(60px, -40px) scale(1.1); }
}

@keyframes blobDrift3 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(-30px, -50px) scale(1.08); }
  75% { transform: translate(40px, 20px) scale(0.95); }
}

/* ━━━━━ حروف طافية شفافة (watermark) ━━━━━ */
.hero-bg-decor .float-letter {
  position: absolute;
  font-family: 'Reem Kufi', 'Readex Pro', sans-serif;
  font-weight: 700;
  color: var(--ink);
  opacity: 0.05;
  user-select: none;
  pointer-events: none;
  line-height: 1;
  will-change: transform;
}

.hero-bg-decor .letter-1 {
  top: 8%;
  right: 4%;
  font-size: 220px;
  animation: letterFloat 18s ease-in-out infinite;
}

.hero-bg-decor .letter-2 {
  bottom: 18%;
  left: 6%;
  font-size: 180px;
  color: var(--rust);
  opacity: 0.07;
  animation: letterFloat 22s ease-in-out infinite;
  animation-delay: -6s;
}

.hero-bg-decor .letter-3 {
  top: 55%;
  right: 45%;
  font-size: 140px;
  animation: letterFloat 16s ease-in-out infinite;
  animation-delay: -3s;
  color: var(--forest);
  opacity: 0.07;
}

.hero-bg-decor .letter-4 {
  top: 25%;
  left: 35%;
  font-size: 110px;
  font-family: 'Amiri', serif;
  font-style: italic;
  color: var(--ochre-deep);
  opacity: 0.06;
  animation: letterFloat 20s ease-in-out infinite;
  animation-delay: -9s;
}

@keyframes letterFloat {
  0%, 100% { transform: translate(0, 0) rotate(-4deg); }
  50% { transform: translate(15px, -25px) rotate(4deg); }
}

/* ━━━━━ Sparkles خفيفة ━━━━━ */
.hero-bg-decor .spark {
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--ink);
  border-radius: 50%;
  opacity: 0;
  animation: sparkle 5s ease-in-out infinite;
}

.hero-bg-decor .spark-1 { top: 20%; right: 25%; animation-delay: 0s; }
.hero-bg-decor .spark-2 { top: 60%; right: 60%; animation-delay: 1.5s; background: var(--rust); }
.hero-bg-decor .spark-3 { top: 35%; left: 20%; animation-delay: 3s; background: var(--forest); }
.hero-bg-decor .spark-4 { bottom: 30%; right: 15%; animation-delay: 2s; background: var(--ochre); }

@keyframes sparkle {
  0%, 100% { opacity: 0; transform: scale(0); }
  50% { opacity: 0.5; transform: scale(1.5); }
}

@media (max-width: 768px) {
  .hero-bg-decor .blob { filter: blur(50px); opacity: 0.12; }
  .hero-bg-decor .letter-1 { font-size: 140px; }
  .hero-bg-decor .letter-2 { font-size: 110px; }
  .hero-bg-decor .letter-3 { font-size: 90px; }
  .hero-bg-decor .letter-4 { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-bg-decor * { animation: none !important; }
}

/* ============================================================
   ✦ EXPORT CARD — ألوان صريحة (CSS vars قد لا تشتغل في html2canvas)
   ============================================================ */
.export-card {
  position: fixed;
  inset-inline-start: -9999px;
  top: 0;
  width: 820px;
  background: #F8F1DD;
  padding: 50px 56px;
  font-family: 'Readex Pro', 'Tajawal', sans-serif;
  color: #1F1A14;
  box-sizing: border-box;
  z-index: -1;
}

.export-card.is-rendering {
  inset-inline-start: 0;
  z-index: 9999;
  visibility: hidden;
}

/* ============================================================
   ✦ PRINT MODE — يستخدم زر "تحميل PDF" (window.print)
   ============================================================ */
@media print {
  /* خفِّ كل شي عدا الكرت */
  body * { visibility: hidden !important; }
  
  /* الكرت + كل اللي جواه يظهر */
  #exportCard, #exportCard * { visibility: visible !important; }
  
  /* الكرت يتموضع طبيعي */
  #exportCard {
    position: absolute !important;
    inset-inline-start: 0 !important;
    inset-inline-end: 0 !important;
    top: 0 !important;
    margin: 0 auto !important;
    width: 100% !important;
    max-width: none !important;
    z-index: 1 !important;
    background: #F8F1DD !important;
    padding: 30px 36px !important;
    box-shadow: none !important;
    border: none !important;
  }
  
  /* إخفاء عناصر الواجهة عند الطباعة */
  .topnav, .bottom-nav, .welcome-strip, .disclaimer-block,
  .verdict-summary-card, .save-banner, .result-breadcrumb {
    display: none !important;
  }
  
  /* إعداد الصفحة */
  @page {
    size: A4;
    margin: 8mm;
  }
  
  html, body {
    background: #F8F1DD !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  
  /* تجنب كسر الكرت بين صفحتين */
  #exportCard > * {
    page-break-inside: avoid !important;
  }
}

/* ============================================================
   ✦ SAVE-CONTENT TOGGLE (للمسجّلين فقط)
   ============================================================ */
.save-toggle-row {
  margin-top: 14px;
  padding: 12px 16px;
  background: rgba(27, 67, 50, 0.04);
  border: 1px solid rgba(27, 67, 50, 0.15);
  border-radius: 8px;
}

.save-toggle-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  user-select: none;
}

.save-toggle-label input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.save-toggle-switch {
  flex-shrink: 0;
  width: 40px;
  height: 22px;
  background: var(--paper-deep);
  border: 1.5px solid var(--ink);
  border-radius: 100px;
  position: relative;
  transition: background 0.2s;
  margin-top: 1px;
}
.save-toggle-switch::before {
  content: '';
  position: absolute;
  top: 2px;
  inset-inline-end: 2px;
  width: 14px;
  height: 14px;
  background: var(--ink);
  border-radius: 50%;
  transition: all 0.2s;
}
.save-toggle-label input:checked + .save-toggle-switch {
  background: var(--forest);
  border-color: var(--forest);
}
.save-toggle-label input:checked + .save-toggle-switch::before {
  background: var(--paper-light);
  inset-inline-end: 21px;
}

.save-toggle-text {
  font-family: 'Readex Pro', sans-serif;
  font-size: 13px;
  color: var(--ink);
  line-height: 1.5;
  flex: 1;
}
.save-toggle-text strong { display: block; margin-bottom: 2px; font-weight: 600; }
.save-toggle-hint {
  display: block;
  font-size: 12px;
  color: var(--ink-mute);
  margin-top: 2px;
  font-weight: 400;
}

/* ============================================================
   ✦ DELETE BUTTON على صفحة النتيجة
   ============================================================ */
.delete-shor-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: transparent;
  border: 1.5px solid var(--terra);
  color: var(--terra);
  border-radius: 6px;
  font-family: 'Readex Pro', sans-serif;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}
.delete-shor-btn:hover {
  background: var(--terra);
  color: var(--paper-light);
}

/* ============================================================
   ✦ LOGO IMAGE في الـtopnav — fallback صلب
   ============================================================ */
.brand-logo-img {
  width: 42px;
  height: 42px;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
}

/* لو الصورة فشلت في التحميل، الـalt يطلع كنص في مربع */
.brand-logo-img::after {
  content: 'ش';
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: var(--paper-light);
  font-family: 'Reem Kufi', sans-serif;
  font-size: 22px;
  font-weight: 700;
}

/* ============================================================
   ✦ PAGE FOOTER — لوقو + معلومات + زر تثبيت
   ============================================================ */
.page-footer {
  margin-top: 60px;
  padding: 48px 0 24px;
  background: linear-gradient(180deg, transparent 0%, var(--paper) 30%, var(--paper-deep) 100%);
  border-top: 1px dashed var(--ink-faint);
  position: relative;
}

.page-footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  text-align: center;
}

/* اللوقو والاسم */
.footer-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}
.footer-logo {
  width: 56px;
  height: 56px;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
}
.footer-glyph {
  width: 56px;
  height: 56px;
  background: var(--ink);
  color: var(--paper-light);
  font-family: 'Reem Kufi', sans-serif;
  font-size: 28px;
  font-weight: 700;
  border-radius: 10px;
  place-items: center;
}
.footer-brand-text {
  text-align: start;
}
.footer-brand-name {
  font-family: 'Reem Kufi', 'Readex Pro', sans-serif;
  font-weight: 700;
  font-size: 28px;
  color: var(--ink);
  letter-spacing: -0.02em;
  line-height: 1;
}
.footer-brand-tagline {
  font-family: 'Amiri', serif;
  font-style: italic;
  color: var(--ink-mute);
  font-size: 14px;
  margin-top: 4px;
}

/* زر التثبيت */
.footer-install-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  background: var(--forest);
  color: var(--paper-light);
  border: 2px solid var(--ink);
  border-radius: 8px;
  font-family: 'Readex Pro', sans-serif;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  box-shadow: 4px 4px 0 var(--ink);
  transition: transform 0.15s, box-shadow 0.15s;
}
.footer-install-btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--ink);
}
.footer-install-btn:active {
  transform: translate(0, 0);
  box-shadow: 2px 2px 0 var(--ink);
}

/* روابط سريعة */
.footer-links {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: center;
  font-family: 'Readex Pro', sans-serif;
  font-size: 13px;
}
.footer-links a {
  color: var(--ink-mute);
  text-decoration: none;
  padding: 4px 8px;
  border-radius: 4px;
  transition: color 0.15s, background 0.15s;
}
.footer-links a:hover {
  color: var(--forest);
  background: rgba(27, 67, 50, 0.05);
}
.footer-dot {
  color: var(--ink-faint);
  font-size: 14px;
}

/* حقوق */
.footer-copyright {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 11px;
  color: var(--ink-mute);
  letter-spacing: 0.06em;
  margin-top: 4px;
}

/* موبايل */
@media (max-width: 640px) {
  .footer-brand { flex-direction: column; gap: 10px; }
  .footer-brand-text { text-align: center; }
  .footer-install-btn { width: 100%; max-width: 320px; justify-content: center; }
  .page-footer { padding: 32px 0 100px; }  /* مساحة للـbottom-nav */
}

/* إخفاء الفوتر في الـprint */
@media print {
  .page-footer, .disclaimer-block { display: none !important; }
}

/* ============================================================
   ✦ INSTALL BUTTON في فوتر index.php (موبايل فقط)
   ============================================================ */
.footer-install-mobile {
  display: none;  /* مخفي على الديسكتوب */
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: var(--forest);
  color: var(--paper-light);
  border: 1.5px solid var(--ink);
  border-radius: 6px;
  font-family: 'Readex Pro', sans-serif;
  font-weight: 600;
  font-size: 12px;
  cursor: pointer;
  box-shadow: 2px 2px 0 var(--ink);
  transition: transform 0.15s;
}
.footer-install-mobile:hover {
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0 var(--ink);
}

/* يطلع على الجوال والتابلت فقط */
@media (max-width: 900px) {
  .footer-install-mobile {
    display: inline-flex;
  }
}

/* يختفي لو التطبيق مثبت أصلاً */
@media (display-mode: standalone) {
  .footer-install-mobile { display: none !important; }
}

/* ============================================================
   ✦ زر "خذ شور+" — منع التفاف السطر على الجوال
   ============================================================ */
.send-stamp {
  white-space: nowrap;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .send-stamp {
    padding: 11px 16px !important;
    font-size: 14px !important;
    gap: 6px !important;
  }
  .send-stamp svg {
    width: 16px !important;
    height: 16px !important;
  }
  .smart-input-toolbar .toolbar-left {
    font-size: 11px !important;
    flex-wrap: wrap !important;
    gap: 4px !important;
  }
}

/* ============================================================
   ✦ منع التفاف الـtoolbar على الجوال
   ============================================================ */
@media (max-width: 480px) {
  .smart-input-toolbar {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
  }
  .smart-input-toolbar .toolbar-left {
    justify-content: center;
    font-size: 11px;
  }
  .send-stamp {
    width: 100%;
    justify-content: center;
  }
}
