/* ═══════════════════════════════════════════════════════════════════
   RAMWORLD — UI/UX AUDIT TOOL  •  Complete Design System  •  v4.0
   Brand: Deep Navy #0B1E3D  |  Cyan #2DB9DB  |  Gold #F4A20C
   ═══════════════════════════════════════════════════════════════════ */

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --ram-navy:       #0B1E3D;
  --ram-navy-mid:   #112952;
  --ram-navy-light: #1a3a6e;
  --ram-cyan:       #2DB9DB;
  --ram-cyan-dark:  #1a9ab8;
  --ram-cyan-glow:  rgba(45,185,219,.16);
  --ram-gold:       #F4A20C;
  --bg:          #07131f;
  --bg2:         #0d1f35;
  --card:        #0f2540;
  --card2:       #122d4a;
  --border:      rgba(45,185,219,.12);
  --border2:     rgba(45,185,219,.22);
  --text:        #e8f4fd;
  --text-muted:  #7ea8c4;
  --text-faint:  #3a5e7a;
  --accent:      #2DB9DB;
  --accent2:     #F4A20C;
  --shadow:      0 4px 24px rgba(0,0,0,.4);
  --shadow-lg:   0 12px 48px rgba(0,0,0,.55);
  --radius:      14px;
  --c-pass: #22d355; --c-pass-bg: rgba(34,211,85,.1);
  --c-warn: #f59e0b; --c-warn-bg: rgba(245,158,11,.1);
  --c-fail: #ef4444; --c-fail-bg: rgba(239,68,68,.1);
}

body.day-mode {
  --bg: #eef4fb; --bg2: #dde9f6; --card: #ffffff; --card2: #f4f9ff;
  --border: rgba(11,30,61,.09); --border2: rgba(11,30,61,.16);
  --text: #0B1E3D; --text-muted: #3a6080; --text-faint: #8aabcc;
  --shadow: 0 4px 24px rgba(11,30,61,.09); --shadow-lg: 0 12px 48px rgba(11,30,61,.13);
  --ram-cyan-glow: rgba(45,185,219,.10);
}

::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 3px; }
html { scroll-behavior: smooth; }

body, body.rtl {
  font-family: 'Inter', 'IBM Plex Sans Arabic', system-ui, -apple-system, sans-serif;
  background: var(--bg); color: var(--text);
  min-height: 100vh; line-height: 1.6;
  transition: background .3s, color .3s; overflow-x: hidden;
}

/* Ramworld pattern bg */
body::before {
  content: ""; position: fixed; inset: 0; z-index: 0;
  background-image: url('/logo/Ramworld AI pattern1.png');
  background-size: 440px; background-repeat: repeat;
  opacity: .032; filter: grayscale(20%); pointer-events: none;
}
body.day-mode::before { opacity: .038; }

.grid-bg {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(45,185,219,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(45,185,219,.04) 1px, transparent 1px);
  background-size: 56px 56px;
}
.site-header, .main-content, .site-footer { position: relative; z-index: 1; }


/* ═══════════════ HEADER ════════════════════════════════════════════ */
.site-header {
  position: sticky; top: 0; z-index: 200;
  background: rgba(7,19,31,.9);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid var(--border2);
  box-shadow: 0 2px 24px rgba(0,0,0,.35);
}
body.day-mode .site-header { background: rgba(255,255,255,.92); box-shadow: 0 2px 20px rgba(11,30,61,.08); }

.header-inner {
  max-width: 1340px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 28px; height: 62px;
}
.logo img { height: 30px; object-fit: contain; display: block; }
.header-nav { display: flex; align-items: center; gap: 4px; }

.nav-link {
  padding: 6px 16px; border-radius: 8px;
  font-size: .875rem; font-weight: 600; color: var(--text-muted);
  text-decoration: none; transition: color .15s, background .15s;
}
.nav-link:hover { color: var(--text); background: var(--ram-cyan-glow); }
.nav-link.active { color: var(--accent); background: var(--ram-cyan-glow); }

.header-actions {
  display: flex; align-items: center; gap: 6px;
}
.btn-back {
  padding: 6px 14px; border-radius: 8px; font-size: .8rem; font-weight: 600;
  color: var(--text-muted); background: var(--card); border: 1px solid var(--border2);
  text-decoration: none; white-space: nowrap; transition: color .15s, border-color .15s;
}
.btn-back:hover { color: var(--accent); border-color: var(--accent); }
.btn-consult {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 16px; border-radius: 8px; font-size: .82rem; font-weight: 700;
  background: linear-gradient(135deg, #25d366, #128c7e);
  color: #fff; text-decoration: none; white-space: nowrap; transition: opacity .2s;
}
.btn-consult:hover { opacity: .88; }
.btn-lang {
  padding: 6px 14px; border-radius: 8px; font-size: .82rem; font-weight: 700;
  background: var(--ram-cyan); color: #fff; border: none; cursor: pointer;
  transition: opacity .2s; white-space: nowrap;
}
.btn-lang:hover { opacity: .85; }
.logo-wide { opacity: .8; }
body.day-mode .logo-wide { filter: none; }
body:not(.day-mode) .logo-wide { filter: brightness(0) invert(1); }

.theme-toggle-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: 8px;
  background: var(--card); border: 1px solid var(--border2);
  color: var(--text-muted); font-size: .8rem; font-weight: 600;
  cursor: pointer; transition: border-color .15s, color .15s;
}
.theme-toggle-btn:hover { border-color: var(--accent); color: var(--accent); }

/* ── RTL / Arabic support ─────────────────────────────────────────── */
/* ── RTL overrides ─────────────────────────────────────────────────
   IMPORTANT: <html dir="rtl"> already makes flex flow right-to-left
   via inherited direction. Do NOT use flex-direction:row-reverse here
   as it would double-reverse and undo RTL. Use direction:rtl instead.
─────────────────────────────────────────────────────────────────── */
[dir="rtl"] body { font-family: 'IBM Plex Sans Arabic', 'Inter', system-ui, sans-serif; }

/* Header */
[dir="rtl"] .site-header { direction: rtl; }
[dir="rtl"] .header-inner { direction: rtl; }
[dir="rtl"] .header-nav { direction: rtl; }
[dir="rtl"] .header-actions { direction: rtl; }
[dir="rtl"] .btn-back { direction: ltr; }

/* Input area */
[dir="rtl"] .hero-text { text-align: right; direction: rtl; }
[dir="rtl"] .hero-text h1 { text-align: center; }
[dir="rtl"] .hero-sub { text-align: center; direction: rtl; }
[dir="rtl"] .input-hint { text-align: right; direction: rtl; }
[dir="rtl"] .input-row { direction: rtl; }
[dir="rtl"] .domain-wrap { direction: rtl; }
[dir="rtl"] .domain-prefix { border-right: none; border-left: 1px solid var(--border2); }
[dir="rtl"] #url-input { text-align: left; direction: ltr; }

/* Pills */
[dir="rtl"] .criteria-pills { direction: rtl; justify-content: center; }
[dir="rtl"] .pill { direction: rtl; }

/* Results */
[dir="rtl"] .score-hero { direction: rtl; }
[dir="rtl"] .score-meta { text-align: right; }
[dir="rtl"] .result-actions { direction: rtl; }
[dir="rtl"] .detail-topbar { direction: rtl; }
[dir="rtl"] .detail-topbar-center { text-align: center; }
[dir="rtl"] .results-tabs-nav { direction: rtl; }

/* Progress */
[dir="rtl"] .progress-header { direction: rtl; }
[dir="rtl"] .progress-steps { direction: rtl; text-align: right; }

/* Misc */
[dir="rtl"] .share-link-box { direction: rtl; }
[dir="rtl"] .history-panel { direction: rtl; }
[dir="rtl"] .section-title { text-align: right; }

/* Footer */
[dir="rtl"] .site-footer { direction: rtl; }
[dir="rtl"] .site-footer .footer-inner { direction: rtl; }
[dir="rtl"] .footer-brand { direction: rtl; }

/* Keep score ring & URL inputs left-to-right */
[dir="rtl"] .score-ring-wrap { direction: ltr; }
@media (max-width: 700px) {
  .btn-back { display: none; }
  .btn-consult { font-size: .75rem; padding: 6px 10px; }
  .header-actions { gap: 4px; }
}


/* ═══════════════ MAIN ══════════════════════════════════════════════ */
.main-content {
  max-width: 1340px; margin: 0 auto;
  padding: 36px 28px 80px;
  display: flex; flex-direction: column; gap: 32px;
}


/* ═══════════════ HERO / INPUT PANEL ════════════════════════════════ */
.hero-panel {
  display: flex; flex-direction: column; align-items: center;
  text-align: center; gap: 32px; padding: 72px 24px 60px;
  position: relative; overflow: hidden;
}
.hero-panel::before {
  content: "";
  position: absolute; top: -140px; left: 50%; transform: translateX(-50%);
  width: 800px; height: 600px; border-radius: 50%;
  background: radial-gradient(ellipse, rgba(45,185,219,.11) 0%, transparent 68%);
  pointer-events: none;
}

.hero-text { position: relative; z-index: 1; }

/* Logo badge above title */
.hero-text::before {
  content: "";
  display: block; margin: 0 auto 22px;
  width: 70px; height: 70px;
  background: url('Ramworld_ui_ux_audit_logo.png') center/contain no-repeat;
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(45,185,219,.28), 0 0 0 1px var(--border2),
              inset 0 1px 0 rgba(255,255,255,.06);
  background-color: var(--card);
}

.hero-text h1 {
  font-size: clamp(1.9rem, 4vw, 3.1rem);
  font-weight: 900; line-height: 1.13; letter-spacing: -.03em;
  background: linear-gradient(140deg, #e8f4fd 10%, var(--ram-cyan) 55%, var(--ram-gold) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  margin-bottom: 16px;
}
body.day-mode .hero-text h1 {
  background: linear-gradient(140deg, var(--ram-navy) 10%, var(--ram-cyan-dark) 55%, var(--ram-gold) 100%);
  -webkit-background-clip: text; background-clip: text;
}
.hero-sub {
  font-size: 1.05rem; color: var(--text-muted);
  max-width: 580px; margin: 0 auto; line-height: 1.75;
}

/* Input Card */
.input-card {
  width: 100%; max-width: 800px;
  background: var(--card); border: 1px solid var(--border2);
  border-radius: 22px; padding: 28px 28px 22px;
  box-shadow: var(--shadow-lg), 0 0 0 1px var(--border), inset 0 1px 0 rgba(255,255,255,.04);
  position: relative; z-index: 1;
}
.input-card::before {
  content: ""; position: absolute; top: 0; left: 10%; right: 10%; height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
}

.input-row { display: flex; gap: 10px; align-items: stretch; flex-wrap: wrap; }

.domain-wrap {
  flex: 1; min-width: 260px;
  display: flex; align-items: center;
  background: var(--bg2); border: 1.5px solid var(--border2);
  border-radius: 12px; overflow: hidden; transition: border-color .2s, box-shadow .2s;
}
.domain-wrap:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--ram-cyan-glow); }
.domain-prefix {
  padding: 0 13px; font-size: 1rem; color: var(--text-muted);
  border-right: 1px solid var(--border2); display: flex; align-items: center;
}
#website-url {
  flex: 1; background: none; border: none; outline: none;
  padding: 14px 14px 14px 12px; font-size: .975rem; font-family: inherit; color: var(--text);
}
#website-url::placeholder { color: var(--text-faint); }

#max-pages {
  background: var(--bg2); border: 1.5px solid var(--border2);
  border-radius: 12px; padding: 0 32px 0 14px;
  color: var(--text); font-family: inherit; font-size: .9rem;
  cursor: pointer; outline: none; min-width: 110px; transition: border-color .2s;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='7'%3E%3Cpath d='M1 1l4.5 4.5L10 1' stroke='%237ea8c4' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 11px center;
}
#max-pages:focus { border-color: var(--accent); }

.btn-audit {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 14px 28px;
  background: linear-gradient(135deg, var(--ram-cyan) 0%, var(--ram-cyan-dark) 100%);
  color: #fff; font-size: .975rem; font-weight: 700; font-family: inherit;
  border: none; border-radius: 12px; cursor: pointer;
  box-shadow: 0 4px 20px rgba(45,185,219,.35), inset 0 1px 0 rgba(255,255,255,.15);
  transition: transform .15s, box-shadow .15s; white-space: nowrap;
}
.btn-audit:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(45,185,219,.45); }
.btn-icon { transition: transform .2s; }
.btn-audit:hover .btn-icon { transform: translateX(4px); }

.input-hint { margin-top: 12px; font-size: .8rem; color: var(--text-faint); }
.input-hint code {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 4px; padding: 1px 7px; font-size: .8rem; color: var(--accent);
}

/* Pills */
.criteria-pills {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 9px;
  max-width: 800px; position: relative; z-index: 1;
}
.pill {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 16px;
  background: var(--card); border: 1px solid var(--border2);
  border-radius: 100px; font-size: .825rem; font-weight: 500; color: var(--text-muted);
  transition: background .15s, border-color .15s, color .15s, transform .15s;
}
.pill:hover {
  background: var(--ram-cyan-glow); border-color: var(--accent);
  color: var(--accent); transform: translateY(-2px);
}
.pill-icon { font-size: .95rem; }


/* ═══════════════ PROGRESS ══════════════════════════════════════════ */
.progress-panel { display: flex; justify-content: center; padding: 60px 20px; }
.progress-card {
  width: 100%; max-width: 560px;
  background: var(--card); border: 1px solid var(--border2);
  border-radius: 22px; padding: 36px; box-shadow: var(--shadow-lg);
}
.progress-header { display: flex; align-items: center; gap: 18px; margin-bottom: 24px; }
.progress-header h2 { font-size: 1.1rem; font-weight: 800; color: var(--text); }
.progress-header p { font-size: .875rem; color: var(--text-muted); margin-top: 2px; }

.pulse-ring {
  width: 48px; height: 48px; flex-shrink: 0;
  background: var(--ram-cyan-glow); border: 2px solid var(--accent);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  animation: pulseRing 1.8s ease-in-out infinite;
}
@keyframes pulseRing {
  0%,100% { box-shadow: 0 0 0 0 var(--ram-cyan-glow); }
  50%      { box-shadow: 0 0 0 14px transparent; }
}
.pulse-dot {
  width: 16px; height: 16px; border-radius: 50%; background: var(--accent);
  animation: pulseDot 1.8s ease-in-out infinite;
}
@keyframes pulseDot {
  0%,100% { opacity: 1; transform: scale(1); }
  50%      { opacity: .65; transform: scale(.78); }
}
.progress-bar-wrap { height: 8px; background: var(--bg2); border-radius: 8px; overflow: hidden; margin-bottom: 20px; }
.progress-bar {
  height: 100%; border-radius: 8px; width: 0;
  background: linear-gradient(90deg, var(--ram-cyan), var(--ram-gold));
  transition: width .4s ease; box-shadow: 0 0 10px rgba(45,185,219,.5);
}
.step-label { font-size: .875rem; color: var(--accent); font-weight: 500; }


/* ═══════════════ RESULTS / SCORE HERO ══════════════════════════════ */
.results-panel { display: flex; flex-direction: column; gap: 28px; }

.score-hero {
  display: grid; grid-template-columns: auto 1fr; gap: 36px; align-items: center;
  background: var(--card); border: 1px solid var(--border2);
  border-radius: 24px; padding: 36px 40px; box-shadow: var(--shadow-lg);
  position: relative; overflow: hidden;
}
.score-hero::before {
  content: ""; position: absolute; inset: 0;
  background: url('/logo/Ramworld AI pattern1.png') center/320px repeat;
  opacity: .025; pointer-events: none;
}
.score-hero::after {
  content: ""; position: absolute;
  top: -80px; right: -80px; width: 300px; height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(45,185,219,.07) 0%, transparent 70%);
  pointer-events: none;
}

.score-ring-wrap { position: relative; width: 140px; height: 140px; flex-shrink: 0; }
.score-ring { width: 140px; height: 140px; transform: rotate(-90deg); display: block; }
.ring-bg   { fill: none; stroke: var(--bg2); stroke-width: 10; }
.ring-fill {
  fill: none; stroke-width: 10; stroke-linecap: round;
  stroke: var(--accent);
  transition: stroke-dashoffset 1.4s cubic-bezier(.4,0,.2,1);
}
.score-center {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.score-num  { font-size: 2.7rem; font-weight: 900; color: var(--text); line-height: 1; }
.score-label { font-size: .7rem; color: var(--text-muted); font-weight: 600; letter-spacing: .04em; }

.score-meta h2 { font-size: 1.35rem; font-weight: 800; color: var(--text); margin-bottom: 4px; }
#result-pages  { font-size: .875rem; color: var(--text-muted); margin-bottom: 16px; }
.score-grade {
  display: inline-block; padding: 5px 18px; border-radius: 100px;
  font-size: .9rem; font-weight: 700; border: 1px solid var(--border2);
  background: var(--ram-cyan-glow); color: var(--accent); margin-bottom: 22px;
}

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

.btn-secondary {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 10px 20px; border-radius: 10px;
  background: linear-gradient(135deg, var(--ram-cyan), var(--ram-cyan-dark));
  color: #fff; font-size: .875rem; font-weight: 700; font-family: inherit;
  border: none; cursor: pointer;
  box-shadow: 0 4px 16px rgba(45,185,219,.25);
  transition: transform .15s, box-shadow .15s;
}
.btn-secondary:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(45,185,219,.38); }
.btn-secondary.btn-share {
  background: var(--card2); border: 1px solid var(--border2);
  box-shadow: none; color: var(--text-muted);
}
.btn-secondary.btn-share:hover { color: var(--text); border-color: var(--accent); }

.btn-outline {
  padding: 10px 20px; border-radius: 10px;
  background: transparent; border: 1.5px solid var(--border2);
  color: var(--text-muted); font-size: .875rem; font-weight: 600; font-family: inherit;
  cursor: pointer; transition: border-color .15s, color .15s;
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }

#share-link-box {
  display: flex; gap: 10px; align-items: center;
  background: var(--card); border: 1px solid var(--border2); border-radius: 12px; padding: 14px 18px;
}
#share-link-box.hidden { display: none; }
#share-link-input {
  flex: 1; background: var(--bg2); border: 1px solid var(--border2);
  border-radius: 8px; padding: 8px 12px; color: var(--text); font-size: .85rem; outline: none;
}
#btn-copy-link {
  padding: 8px 18px; background: var(--accent); color: #fff;
  border: none; border-radius: 8px; font-size: .85rem; font-weight: 700; cursor: pointer;
}


/* ═══════════════ CRITERIA GRID ═════════════════════════════════════ */
.criteria-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.criteria-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 14px; padding: 18px 18px 14px;
  transition: transform .18s, border-color .18s, box-shadow .18s;
  position: relative; overflow: hidden;
}
.criteria-card::after {
  content: ""; position: absolute; bottom: 0; left: 0; right: 0; height: 3px;
  background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .25s;
}
.criteria-card:hover { transform: translateY(-3px); border-color: var(--border2); box-shadow: var(--shadow); }
.criteria-card:hover::after { transform: scaleX(1); }
.criteria-card .card-icon { font-size: 1.45rem; margin-bottom: 8px; }
.criteria-card .card-name { font-size: .865rem; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.criteria-card .card-score { font-size: 1.3rem; font-weight: 900; color: var(--accent); }
.criteria-card .card-bar { height: 4px; background: var(--bg2); border-radius: 4px; overflow: hidden; margin-top: 8px; }
.criteria-card .card-bar-fill {
  height: 100%; border-radius: 4px;
  background: linear-gradient(90deg, var(--accent), var(--ram-gold));
  transition: width 1s cubic-bezier(.4,0,.2,1);
}


/* ── crit-card (generated by app.js criteria grid) ─────────────────── */
.crit-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 12px; padding: 16px;
  display: flex; flex-direction: column; gap: 8px;
  transition: transform .18s, box-shadow .18s;
}
.crit-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.crit-header { display: flex; justify-content: space-between; align-items: center; }
.crit-title { font-size: .82rem; font-weight: 700; color: var(--text); display: flex; align-items: center; gap: 6px; }
.crit-emoji { font-size: 1rem; }
.crit-score-badge { font-size: .78rem; font-weight: 800; border-radius: 20px; padding: 2px 8px; white-space: nowrap; }
.badge-green { background: #d1fae5; color: #065f46; }
.badge-amber { background: #fef3c7; color: #92400e; }
.badge-red   { background: #fee2e2; color: #991b1b; }
.crit-bar-wrap { height: 5px; background: var(--bg2); border-radius: 4px; overflow: hidden; }
.crit-bar { height: 100%; border-radius: 4px; transition: width 1s cubic-bezier(.4,0,.2,1); }
.bar-green { background: #10b981; }
.bar-amber { background: #f59e0b; }
.bar-red   { background: #ef4444; }

/* ═══════════════ SECTION-DETAIL — 5-TAB SYSTEM ═════════════════════ */
.detail-panel { padding: 0 0 72px; }
.detail-panel.hidden { display: none !important; }

/* Topbar */
.detail-topbar {
  display: flex; align-items: center; gap: 14px;
  padding: 0 28px; height: 62px;
  background: var(--card); border-bottom: 1px solid var(--border2);
  position: sticky; top: 62px; z-index: 90;
  box-shadow: 0 4px 20px rgba(0,0,0,.18);
  backdrop-filter: blur(10px); flex-wrap: nowrap;
}
body.day-mode .detail-topbar { box-shadow: 0 2px 12px rgba(11,30,61,.08); }

.btn-back {
  display: inline-flex; align-items: center; gap: 7px; padding: 7px 15px;
  border-radius: 9px; background: var(--bg2); border: 1px solid var(--border2);
  color: var(--text-muted); font-size: .85rem; font-weight: 600; font-family: inherit;
  cursor: pointer; transition: background .15s, color .15s, border-color .15s; white-space: nowrap; flex-shrink: 0;
}
.btn-back:hover { border-color: var(--accent); color: var(--accent); background: var(--ram-cyan-glow); }

.detail-topbar-center { flex: 1; display: flex; align-items: center; gap: 12px; overflow: hidden; min-width: 0; }
.detail-title { font-size: 1.05rem; font-weight: 800; color: var(--text); white-space: nowrap; margin: 0; }
.detail-url-chip {
  display: inline-flex; align-items: center;
  background: var(--bg2); border: 1px solid var(--border2); border-radius: 100px;
  padding: 3px 13px; font-size: .78rem; color: var(--text-muted);
  max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.detail-topbar-actions { flex-shrink: 0; display: flex; align-items: center; gap: 10px; }
.detail-export-btn {
  display: inline-flex; align-items: center; gap: 7px; padding: 8px 18px; border-radius: 9px;
  background: linear-gradient(135deg, var(--ram-navy-light), var(--ram-cyan-dark));
  color: #fff; border: 1px solid var(--border2); font-size: .85rem; font-weight: 700; font-family: inherit;
  cursor: pointer; box-shadow: 0 4px 14px rgba(45,185,219,.2);
  transition: transform .15s, box-shadow .15s; white-space: nowrap;
}
.detail-export-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(45,185,219,.3); }

/* Tab Card */
.results-tab-card {
  background: var(--card); border-radius: 0 0 20px 20px;
  border: 1px solid var(--border2); border-top: none; overflow: hidden;
}

/* Tab Nav */
.results-tabs-nav {
  display: flex; align-items: stretch;
  background: var(--bg2); border-bottom: 2px solid var(--border2);
  overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none;
  padding: 0 14px; position: relative;
}
.results-tabs-nav::-webkit-scrollbar { display: none; }

.results-tab-btn {
  display: flex; align-items: center; gap: 8px;
  padding: 16px 22px 14px; flex-shrink: 0;
  background: none; border: none; border-bottom: 3px solid transparent; margin-bottom: -2px;
  color: var(--text-muted); font-size: .875rem; font-weight: 600; font-family: inherit;
  cursor: pointer; white-space: nowrap; position: relative; z-index: 1;
  transition: color .18s, border-color .18s, background .18s;
}
.results-tab-btn:hover { color: var(--text); background: rgba(45,185,219,.05); }
.results-tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); background: rgba(45,185,219,.06); }

.rtb-icon  { font-size: 1.1em; line-height: 1; }
.rtb-label { font-weight: 600; }
.rtb-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 22px; height: 20px; padding: 0 7px; border-radius: 10px;
  font-size: .7rem; font-weight: 700; background: var(--bg); color: var(--text-muted);
  line-height: 1; transition: background .18s, color .18s;
}
.rtb-badge:empty { display: none; }
.rtb-badge--danger { background: var(--c-fail-bg); color: var(--c-fail); }
.results-tab-btn.active .rtb-badge { background: var(--ram-cyan-glow); color: var(--accent); }
.results-tab-btn.active .rtb-badge--danger { background: var(--c-fail-bg); color: var(--c-fail); }

/* Panel animation */
.report-tab-panel { animation: tabFadeIn .22s ease both; }
@keyframes tabFadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.tab-panel-inner { padding: 32px 32px 44px; }

/* Empty state */
.tab-empty-state {
  display: flex; flex-direction: column; align-items: center;
  padding: 80px 32px; text-align: center; gap: 14px;
}
.tab-empty-icon  { font-size: 3.2rem; }
.tab-empty-title { font-size: 1.2rem; font-weight: 800; color: var(--text); }
.tab-empty-sub   { color: var(--text-muted); max-width: 360px; line-height: 1.7; margin: 0; font-size: .9rem; }


/* ═══════════════ SCORE SUMMARY CARD ════════════════════════════════ */
.score-summary-card {
  display: flex; align-items: center; gap: 28px;
  background: var(--card2); border: 1px solid var(--border2);
  border-radius: 18px; padding: 24px 28px; margin-bottom: 28px;
  position: relative; overflow: hidden;
}
.score-summary-card::before {
  content: ""; position: absolute; inset: 0;
  background: url('/logo/Ramworld AI pattern1.png') center/300px repeat;
  opacity: .02; pointer-events: none;
}
.score-summary-card.score-high { border-left: 5px solid var(--c-pass); }
.score-summary-card.score-mid  { border-left: 5px solid var(--c-warn); }
.score-summary-card.score-low  { border-left: 5px solid var(--c-fail); }

.score-summary-left { flex-shrink: 0; }
.score-dial { position: relative; width: 88px; height: 88px; }
.score-ring { width: 88px; height: 88px; transform: rotate(-90deg); display: block; }
.score-ring-bg   { fill: none; stroke: var(--bg2); stroke-width: 5; }
.score-ring-fill { fill: none; stroke-width: 5; stroke-linecap: round; transition: stroke-dasharray 1.2s cubic-bezier(.4,0,.2,1); }
.score-high .score-ring-fill { stroke: var(--c-pass); }
.score-mid  .score-ring-fill { stroke: var(--c-warn); }
.score-low  .score-ring-fill { stroke: var(--c-fail); }
.score-dial-num {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; font-weight: 900; color: var(--text);
}
.score-summary-right { flex: 1; }
.score-summary-label { font-size: .88rem; color: var(--text-muted); font-weight: 600; margin-bottom: 4px; }
.score-summary-grade { font-size: 1.5rem; font-weight: 900; letter-spacing: -.02em; margin-bottom: 8px; }
.score-grade-high { color: var(--c-pass); }
.score-grade-mid  { color: var(--c-warn); }
.score-grade-low  { color: var(--c-fail); }
.score-summary-sub { font-size: .84rem; color: var(--text-muted); display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.stat-pass { color: var(--c-pass); font-weight: 700; }
.stat-warn { color: var(--c-warn); font-weight: 700; }
.stat-fail { color: var(--c-fail); font-weight: 700; }

.score-mini-bars { display: flex; align-items: flex-end; gap: 3px; height: 28px; margin-top: 12px; }
.score-mini-bar-item {
  flex: 1; max-width: 10px; height: 100%; background: var(--bg2); border-radius: 2px;
  overflow: hidden; display: flex; align-items: flex-end;
}
.score-mini-bar-fill { width: 100%; border-radius: 2px; transition: height 1s cubic-bezier(.4,0,.2,1); }
.score-mini-bar-fill.high { background: var(--c-pass); }
.score-mini-bar-fill.mid  { background: var(--c-warn); }
.score-mini-bar-fill.low  { background: var(--c-fail); }


/* ═══════════════ AUDIT TABLE ════════════════════════════════════════ */
h3#audit-report-heading, .tab-panel-inner > h3 {
  font-size: 1.05rem; font-weight: 800; color: var(--text);
  margin-bottom: 18px; display: flex; align-items: center; gap: 10px;
}
.report-page-label {
  font-size: .8rem; font-weight: 500; color: var(--text-muted);
  background: var(--bg2); border: 1px solid var(--border); border-radius: 6px; padding: 2px 10px;
}
.audit-table-wrap {
  overflow-x: auto; border-radius: 14px; border: 1px solid var(--border2);
  box-shadow: 0 2px 16px rgba(0,0,0,.12);
}
.audit-table { width: 100%; border-collapse: collapse; table-layout: auto; min-width: 540px; }
.audit-table thead tr { background: linear-gradient(135deg, var(--ram-navy-mid), var(--ram-navy-light)); }
body.day-mode .audit-table thead tr { background: linear-gradient(135deg, #ddeaf7, #c8dff5); }
.audit-table thead th {
  padding: 13px 18px; text-align: left;
  font-size: .76rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em;
  color: var(--accent); border-bottom: 2px solid var(--border2); white-space: nowrap;
}
body.day-mode .audit-table thead th { color: var(--ram-navy); }
.audit-table tbody tr { border-bottom: 1px solid var(--border); transition: background .12s; }
.audit-table tbody tr:last-child { border-bottom: none; }
.audit-table tbody tr:nth-child(odd)  { background: var(--card); }
.audit-table tbody tr:nth-child(even) { background: var(--card2); }
.audit-table tbody tr:hover { background: var(--ram-cyan-glow) !important; box-shadow: inset 3px 0 0 var(--accent); }
.audit-table td {
  padding: 13px 18px; font-size: .875rem; color: var(--text);
  vertical-align: middle; line-height: 1.55;
}
.audit-table td:first-child { font-weight: 700; min-width: 160px; }

.pct-cell { width: 130px; }
.pct-badge { display: inline-block; padding: 3px 10px; border-radius: 100px; font-size: .77rem; font-weight: 800; margin-bottom: 5px; }
.pct-high { background: var(--c-pass-bg); color: var(--c-pass); }
.pct-mid  { background: var(--c-warn-bg); color: var(--c-warn); }
.pct-low  { background: var(--c-fail-bg); color: var(--c-fail); }
.pct-bar { height: 5px; background: var(--bg2); border-radius: 5px; overflow: hidden; min-width: 80px; }
.pct-bar-fill { height: 100%; border-radius: 5px; transition: width 1s cubic-bezier(.4,0,.2,1); }
.pct-bar-fill.high { background: linear-gradient(90deg, var(--c-pass), #4ade80); }
.pct-bar-fill.mid  { background: linear-gradient(90deg, var(--c-warn), #fcd34d); }
.pct-bar-fill.low  { background: linear-gradient(90deg, var(--c-fail), #fb923c); }

.details-td { max-width: 420px; }
.details-text { color: var(--text-muted); font-size: .85rem; }
.justification-text {
  font-size: .82rem; color: var(--text-muted);
  padding: 6px 10px; background: var(--bg2);
  border-left: 3px solid var(--accent); border-radius: 0 6px 6px 0; margin-bottom: 6px;
}
.status-td { text-align: center; font-size: 1.1rem; width: 54px; }

.view-details-btn, .toggle-detail-btn, .read-more {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 8px; padding: 5px 13px; border-radius: 7px;
  background: var(--bg2); border: 1px solid var(--border2);
  color: var(--accent); font-size: .8rem; font-weight: 600; font-family: inherit;
  cursor: pointer; transition: background .15s, border-color .15s;
}
.view-details-btn:hover, .toggle-detail-btn:hover, .read-more:hover {
  background: var(--ram-cyan-glow); border-color: var(--accent);
}
.headings-panel-row.hidden { display: none !important; }
.headings-panel-row td { background: var(--bg2) !important; padding: 0 !important; }
.detail-panel-content.collapsed, .mobile-audit-detail-inline.collapsed { display: none; }


/* ═══════════════ CRITICAL ISSUES ═══════════════════════════════════ */
.critical-issues-block {
  background: var(--card2); border: 1px solid rgba(239,68,68,.2);
  border-radius: 18px; overflow: hidden; margin-bottom: 28px;
}
.ci-header {
  padding: 20px 24px;
  background: linear-gradient(135deg, rgba(239,68,68,.07) 0%, transparent 100%);
  border-bottom: 1px solid rgba(239,68,68,.12);
  display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 12px;
}
.ci-title-row { display: flex; align-items: center; gap: 12px; }
.ci-icon  { font-size: 1.5rem; }
.ci-title { font-size: 1rem; font-weight: 800; color: var(--text); }
.ci-subtitle { font-size: .8rem; color: var(--text-muted); margin-top: 2px; }
.ci-top-badge {
  font-size: .8rem; color: var(--text-muted);
  background: var(--bg2); border: 1px solid var(--border2);
  border-radius: 100px; padding: 4px 14px; white-space: nowrap;
}
.ci-score-chip { display: inline-block; background: var(--c-fail-bg); color: var(--c-fail); border-radius: 100px; padding: 1px 8px; font-weight: 800; font-size: .82em; }
.ci-cards { display: flex; flex-direction: column; }
.ci-card { display: flex; align-items: stretch; border-bottom: 1px solid var(--border); transition: background .12s; }
.ci-card:last-child { border-bottom: none; }
.ci-card:hover { background: rgba(239,68,68,.03); }
.ci-card-rank {
  flex-shrink: 0; width: 46px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; font-weight: 900; color: var(--c-fail);
  background: var(--c-fail-bg); border-right: 1px solid var(--border);
}
.ci-card-body { flex: 1; padding: 14px 18px; }
.ci-card-top { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-bottom: 6px; }
.ci-criterion { font-weight: 700; color: var(--text); font-size: .95em; }
.ci-badges { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ci-impact-badge { font-size: .76em; font-weight: 700; padding: 3px 10px; border-radius: 100px; white-space: nowrap; }
.ci-score-badge  { font-size: .8em; font-weight: 800; padding: 3px 10px; border-radius: 100px; }
.ci-card-desc { font-size: .875rem; color: var(--text-muted); line-height: 1.55; margin-bottom: 8px; }
.ci-progress-bar { height: 4px; background: var(--bg2); border-radius: 4px; overflow: hidden; }


/* ═══════════════ MOBILE HERO ════════════════════════════════════════ */
.mobile-summary-hero {
  display: flex; align-items: center; gap: 28px;
  background: var(--card2); border: 1px solid var(--border2);
  border-radius: 18px; padding: 24px 28px; margin-bottom: 24px;
  position: relative; overflow: hidden;
}
.mobile-summary-hero::before {
  content: ""; position: absolute; inset: 0;
  background: url('/logo/Ramworld AI pattern1.png') center/280px repeat;
  opacity: .025; pointer-events: none;
}
.mobile-summary-hero.score-high { border-left: 5px solid var(--c-pass); }
.mobile-summary-hero.score-mid  { border-left: 5px solid var(--c-warn); }
.mobile-summary-hero.score-low  { border-left: 5px solid var(--c-fail); }
.mobile-hero-left { display: flex; align-items: center; gap: 16px; flex-shrink: 0; }
.mobile-hero-icon  { font-size: 2.4rem; }
.mobile-hero-score { font-size: 2.8rem; font-weight: 900; color: var(--text); line-height: 1; }
.mobile-hero-unit  { font-size: 1.4rem; font-weight: 600; opacity: .6; }
.mobile-hero-label { font-size: .82rem; color: var(--text-muted); font-weight: 600; margin-top: 3px; }
.mobile-hero-right  { flex: 1; }
.mobile-hero-grade  { font-size: 1.05rem; font-weight: 800; margin-bottom: 8px; }
.mobile-grade-high  { color: var(--c-pass); }
.mobile-grade-mid   { color: var(--c-warn); }
.mobile-grade-low   { color: var(--c-fail); }
.mobile-hero-stats  { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 4px; }
.mobile-hero-sub    { font-size: .8rem; color: var(--text-muted); }


/* ═══════════════ COMPARISON TABLE ══════════════════════════════════ */
.comparison-header-section { margin-bottom: 20px; }
.comparison-header-section h3 { font-size: 1.05rem; font-weight: 800; color: var(--text); margin-bottom: 4px; }
.comparison-subtitle { color: var(--text-muted); font-size: .875rem; }
.comparison-table-wrap { overflow-x: auto; border-radius: 14px; border: 1px solid var(--border2); box-shadow: 0 2px 16px rgba(0,0,0,.1); }
.comparison-table { width: 100%; border-collapse: collapse; table-layout: auto; min-width: 480px; }
.comparison-table thead tr { background: linear-gradient(135deg, var(--ram-navy-mid), var(--ram-navy-light)); }
body.day-mode .comparison-table thead tr { background: linear-gradient(135deg, #ddeaf7, #c8dff5); }
.comparison-table th {
  padding: 13px 16px; text-align: left;
  font-size: .75rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
  color: var(--accent); border-bottom: 2px solid var(--border2); white-space: nowrap;
}
body.day-mode .comparison-table th { color: var(--ram-navy); }
.comparison-table tbody tr { border-bottom: 1px solid var(--border); transition: background .12s; }
.comparison-table tbody tr.row-even { background: var(--card); }
.comparison-table tbody tr.row-odd  { background: var(--card2); }
.comparison-table tbody tr:hover { background: var(--ram-cyan-glow) !important; }
.comparison-table td { padding: 12px 16px; font-size: .875rem; color: var(--text); vertical-align: middle; }
.metric-name { font-weight: 700; }
.value-badge { display: inline-block; padding: 3px 11px; border-radius: 100px; font-size: .8rem; font-weight: 600; }
.mobile-badge  { background: rgba(96,165,250,.12); color: #60a5fa; }
.desktop-badge { background: rgba(167,139,250,.12); color: #a78bfa; }
.status-col    { white-space: nowrap; }
.status-badge  { display: inline-block; padding: 3px 10px; border-radius: 100px; font-size: .78rem; font-weight: 700; }
.status-good    .status-badge { background: var(--c-pass-bg); color: var(--c-pass); }
.status-warn    .status-badge { background: var(--c-warn-bg); color: var(--c-warn); }
.status-bad     .status-badge { background: var(--c-fail-bg); color: var(--c-fail); }
.status-neutral .status-badge { background: var(--bg2); color: var(--text-muted); }
.status-cell-inner { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.comparison-fix-btn {
  padding: 3px 10px; border-radius: 6px; background: var(--bg2);
  border: 1px solid var(--border2); color: var(--text-muted); font-size: .76rem; font-weight: 600;
  font-family: inherit; cursor: pointer; transition: background .15s, color .15s;
}
.comparison-fix-btn:hover { background: var(--ram-cyan-glow); color: var(--accent); border-color: var(--accent); }
.cfb-open { color: var(--accent); border-color: var(--accent); }
.comp-detail-td { padding: 0 !important; }
.comp-detail-reveal { display: flex; gap: 16px; padding: 16px 20px; background: var(--bg2); border-top: 1px solid var(--border); flex-wrap: wrap; }
.comp-detail-block { flex: 1; min-width: 200px; }
.comp-detail-label { font-size: .76rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 6px; }
.comp-detail-text  { font-size: .875rem; color: var(--text-muted); line-height: 1.6; }
.comp-problem   .comp-detail-label { color: var(--c-fail); }
.cpb-issue      .comp-detail-label { color: var(--c-fail); }
.cpb-warn       .comp-detail-label { color: var(--c-warn); }
.comp-solution  .comp-detail-label { color: var(--c-pass); }


/* ═══════════════ EXECUTIVE SUMMARY ════════════════════════════════ */
.exec-summary { display: flex; flex-direction: column; gap: 20px; }
.exec-status-banner {
  border-radius: 14px; padding: 20px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  border: 1px solid var(--border2);
}
.exec-banner--urgent { background: linear-gradient(135deg, rgba(239,68,68,.09), transparent); border-color: rgba(239,68,68,.28); }
.exec-banner--warn   { background: linear-gradient(135deg, rgba(245,158,11,.09), transparent); border-color: rgba(245,158,11,.28); }
.exec-banner--good   { background: linear-gradient(135deg, rgba(34,211,85,.09), transparent); border-color: rgba(34,211,85,.28); }
.exec-verdict-chip {
  display: inline-block; padding: 3px 12px; border-radius: 100px;
  font-size: .73rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 6px;
}
.exec-banner--urgent .exec-verdict-chip { background: var(--c-fail-bg); color: var(--c-fail); }
.exec-banner--warn   .exec-verdict-chip { background: var(--c-warn-bg); color: var(--c-warn); }
.exec-banner--good   .exec-verdict-chip { background: var(--c-pass-bg); color: var(--c-pass); }
.exec-headline  { font-size: 1.1rem; font-weight: 800; color: var(--text); line-height: 1.4; }
.exec-banner-icon { font-size: 2rem; flex-shrink: 0; }

.exec-metrics-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 12px; }
.exec-metric {
  background: var(--card2); border: 1px solid var(--border2); border-radius: 14px;
  padding: 16px 18px; text-align: center; transition: transform .15s;
}
.exec-metric:hover { transform: translateY(-2px); }
.exec-metric--good   { border-top: 3px solid var(--c-pass); }
.exec-metric--warn   { border-top: 3px solid var(--c-warn); }
.exec-metric--fail   { border-top: 3px solid var(--c-fail); }
.exec-metric--accent { border-top: 3px solid var(--accent); }
.exec-metric-num  { font-size: 2rem; font-weight: 900; color: var(--text); line-height: 1; margin-bottom: 4px; }
.exec-metric-unit { font-size: 1rem; opacity: .6; }
.exec-metric-label { font-size: .73rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); }
.exec-metric-sub   { font-size: .7rem; color: var(--text-faint); margin-top: 3px; }

.exec-content-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; }
.exec-content-card { background: var(--card2); border: 1px solid var(--border2); border-radius: 14px; padding: 20px; }
.exec-card--risks   { border-top: 3px solid var(--c-fail); }
.exec-card--killers { border-top: 3px solid var(--c-warn); }
.exec-card--wins    { border-top: 3px solid var(--c-pass); }
.exec-card-header { display: flex; align-items: center; gap: 10px; font-size: .95rem; font-weight: 800; color: var(--text); margin-bottom: 4px; }
.exec-card-icon     { font-size: 1.2rem; }
.exec-card-subtitle { font-size: .78rem; color: var(--text-muted); margin-bottom: 14px; }
.exec-list { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.exec-list-item { display: flex; align-items: flex-start; gap: 10px; font-size: .875rem; color: var(--text-muted); line-height: 1.55; }
.exec-list-dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 7px; flex-shrink: 0; }
.exec-dot--risk { background: var(--c-fail); }
.exec-list-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0;
  font-size: .72rem; font-weight: 800; margin-top: 1px;
  background: var(--c-warn-bg); color: var(--c-warn);
}
.exec-num--win { background: var(--c-pass-bg); color: var(--c-pass); }
.exec-impact-bar {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px;
  background: linear-gradient(135deg, var(--ram-navy-mid), var(--ram-navy-light));
  border: 1px solid var(--border2); border-radius: 14px; padding: 18px 22px;
}
.exec-impact-left  { display: flex; align-items: center; gap: 14px; }
.exec-impact-icon  { font-size: 1.5rem; }
.exec-impact-title { font-size: .77rem; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.exec-impact-value { font-size: .95rem; font-weight: 800; color: var(--accent); }
.exec-roi-pill {
  background: var(--ram-cyan-glow); border: 1px solid var(--border2);
  color: var(--accent); border-radius: 100px; padding: 6px 16px; font-size: .8rem; font-weight: 700; white-space: nowrap;
}
.exec-invest-box {
  display: flex; align-items: flex-start; gap: 14px;
  background: var(--card2); border: 1px solid var(--border2); border-radius: 14px; padding: 18px 22px;
}
.exec-invest-icon  { font-size: 1.4rem; flex-shrink: 0; margin-top: 2px; }
.exec-invest-title { font-size: .875rem; font-weight: 800; color: var(--text); margin-bottom: 6px; }
.exec-invest-text  { font-size: .875rem; color: var(--text-muted); line-height: 1.65; margin: 0; }
.exec-empty { display: flex; flex-direction: column; align-items: center; padding: 60px; text-align: center; gap: 10px; color: var(--text-muted); }
.exec-empty-icon { font-size: 2.5rem; }

/* Decision Engine V2 */
.eng2-section { margin-top: 24px; }
.eng2-section-head {
  display: flex; align-items: center; gap: 12px; padding: 16px 20px;
  background: var(--bg2); border: 1px solid var(--border2); border-radius: 12px 12px 0 0; border-bottom: none;
}
.eng2-section-icon  { font-size: 1.2rem; }
.eng2-section-title { font-size: .95rem; font-weight: 800; color: var(--text); }
.eng2-section-sub   { font-size: .78rem; color: var(--text-muted); margin-top: 2px; }
.eng2-issues-grid { display: flex; flex-direction: column; border: 1px solid var(--border2); border-radius: 0 0 12px 12px; overflow: hidden; }
.eng2-issue-card { padding: 16px 20px; border-bottom: 1px solid var(--border); background: var(--card); transition: background .12s; }
.eng2-issue-card:last-child { border-bottom: none; }
.eng2-issue-card:hover { background: var(--card2); }
.eng2-issue-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.eng2-issue-name { font-size: .9rem; font-weight: 700; color: var(--text); }
.eng2-issue-label { font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 3px; }
.eng2-issue-problem  .eng2-issue-label { color: var(--c-warn); }
.eng2-issue-solution .eng2-issue-label { color: var(--c-pass); }
.eng2-issue-text { font-size: .85rem; color: var(--text-muted); line-height: 1.6; }
.suggestion-badge { display: inline-block; padding: 3px 10px; border-radius: 100px; font-size: .76rem; font-weight: 700; }
.sug-warn { background: var(--c-warn-bg); color: var(--c-warn); }
.sug-fail { background: var(--c-fail-bg); color: var(--c-fail); }
.sug-pass { background: var(--c-pass-bg); color: var(--c-pass); }


/* ═══════════════ INNER DETAIL TABLES (headings/CTAs/etc) ════════════ */
.headings-inner-table, .sm-table, .cta-table {
  width: 100%; border-collapse: collapse; table-layout: auto; font-size: .85rem;
}
.headings-inner-table th, .sm-table th, .cta-table th {
  padding: 10px 14px; background: var(--bg2);
  font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  color: var(--accent); border-bottom: 1px solid var(--border2); text-align: left;
}
.headings-inner-table td, .sm-table td, .cta-table td {
  padding: 10px 14px; border-bottom: 1px solid var(--border);
  color: var(--text-muted); vertical-align: top; line-height: 1.5;
}
.headings-inner-table tr:hover td, .sm-table tr:hover td, .cta-table tr:hover td {
  background: var(--ram-cyan-glow);
}
.ps-card {
  background: var(--card2) !important; border: 1px solid var(--border2) !important;
  border-radius: 12px !important; padding: 16px !important; margin-top: 12px !important;
  box-shadow: none !important;
}


/* ═══════════════ HISTORY ════════════════════════════════════════════ */
.history-panel { padding: 8px 0 40px; }
.section-title { font-size: 1.25rem; font-weight: 800; color: var(--text); margin-bottom: 20px; }
.history-list  { display: flex; flex-direction: column; gap: 12px; }
.empty-msg     { color: var(--text-muted); font-size: .9rem; padding: 36px; text-align: center; }
.history-item {
  background: var(--card); border: 1px solid var(--border2); border-radius: 14px;
  padding: 18px 22px; display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; transition: transform .15s, box-shadow .15s;
}
.history-item:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--accent); }
.history-item-url   { font-weight: 700; color: var(--text); font-size: .9rem; word-break: break-all; }
.history-item-meta  { font-size: .78rem; color: var(--text-muted); margin-top: 3px; }
.history-item-score { font-size: 1.3rem; font-weight: 900; color: var(--accent); flex-shrink: 0; }


/* ═══════════════ LIGHTBOX ═══════════════════════════════════════════ */
.lightbox-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.85);
  display: flex; align-items: center; justify-content: center;
  z-index: 9999; opacity: 0; pointer-events: none; transition: opacity .2s;
}
.lightbox-overlay.active { opacity: 1; pointer-events: all; }
.lightbox-overlay img { max-width: 90vw; max-height: 90vh; border-radius: 12px; box-shadow: 0 16px 64px rgba(0,0,0,.7); }
.lightbox-close {
  position: absolute; top: 20px; right: 24px;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2);
  border-radius: 8px; color: #fff; font-size: 1.25rem;
  padding: .4rem .85rem; cursor: pointer; transition: background .15s;
}
.lightbox-close:hover { background: rgba(255,255,255,.22); }


/* ═══════════════ FOOTER ══════════════════════════════════════════════ */
/* ── Header WhatsApp button ─────────────────────────────────────────── */
.header-whatsapp-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 16px; border-radius: 8px;
  background: linear-gradient(135deg, #25d366, #128c7e);
  color: #fff !important; font-size: .8rem; font-weight: 700;
  text-decoration: none; white-space: nowrap;
  transition: opacity .2s, transform .15s;
  box-shadow: 0 2px 10px rgba(37,211,102,.25);
}
.header-whatsapp-btn:hover { opacity: .9; transform: translateY(-1px); }

.site-footer {
  padding: 24px 32px;
  border-top: 1px solid var(--border2); color: var(--text-muted); font-size: .82rem;
  position: relative; z-index: 1;
}
.footer-inner {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  max-width: 1200px; margin: 0 auto;
}
.footer-brand { display: flex; align-items: center; gap: 10px; }
.footer-brand-text { font-size: .8rem; color: var(--text-muted); }
.rw-footer-cta {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 22px;
  background: linear-gradient(135deg, #25d366, #128c7e);
  color: #fff; border-radius: 10px; font-size: .875rem; font-weight: 700;
  text-decoration: none; transition: opacity .2s, transform .15s;
  box-shadow: 0 4px 16px rgba(37,211,102,.22);
}
.rw-footer-cta:hover { opacity: .9; transform: translateY(-2px); }


/* ═══════════════ UTILITY ════════════════════════════════════════════ */
.hidden { display: none !important; }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn   { from { opacity: 0; } to { opacity: 1; } }


/* ═══════════════ RESPONSIVE ═════════════════════════════════════════ */
@media (max-width: 960px) {
  .main-content { padding: 24px 18px 60px; }
  .score-hero { grid-template-columns: 1fr; justify-items: center; text-align: center; padding: 28px 22px; }
  .result-actions { justify-content: center; }
  .exec-metrics-row { grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); }
}
@media (max-width: 640px) {
  .header-inner { padding: 0 16px; height: 54px; }
  .logo img { height: 24px; }
  .hero-panel { padding: 44px 16px 36px; }
  .hero-text::before { width: 56px; height: 56px; }
  .hero-text h1 { font-size: 1.75rem; }
  .input-card { padding: 18px 16px; }
  .input-row { flex-direction: column; }
  .domain-wrap { min-width: unset; }
  .btn-audit { width: 100%; justify-content: center; }
  .detail-topbar { height: auto; padding: 10px 14px; flex-wrap: wrap; gap: 8px; top: 54px; }
  .detail-title  { font-size: .95rem; }
  .detail-url-chip { max-width: 150px; font-size: .74rem; }
  .detail-export-btn { padding: 6px 12px; font-size: .78rem; }
  .results-tab-btn { padding: 12px 12px 10px; font-size: .8rem; gap: 5px; }
  .rtb-label { display: none; }
  .tab-panel-inner { padding: 16px 14px 32px; }
  .score-summary-card { flex-direction: column; align-items: flex-start; }
  .mobile-summary-hero { flex-direction: column; align-items: flex-start; gap: 14px; padding: 18px; }
  .exec-content-grid { grid-template-columns: 1fr; }
  .exec-impact-bar { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 400px) {
  .results-tab-btn { padding: 10px 9px 8px; }
  .rtb-icon { font-size: .9em; }
}
