/* =========================================================
   PixelTruth — shared.css v6 (Premium Centered & Red Accents)
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&family=Space+Grotesk:wght@600;700;800&display=swap');

:root {
  /* Light Matte Palette */
  --bg:        #eef1f5;
  --bg-glass:  rgba(255, 255, 255, 0.42);
  --bg-panel:  rgba(255, 255, 255, 0.75);
  --bg-card:   rgba(255, 255, 255, 0.65);

  /* Borders & Dividers */
  --border:    rgba(255, 255, 255, 0.65);
  --border-2:  rgba(0, 0, 0, 0.07);

  /* Deep & Bright Crimson (Vibrant Accents) */
  --red:        #b91c1c;
  --red-bright: #e61919; 
  --red-glow:   rgba(230, 25, 25, 0.15);
  --red-text:   #991111;

  /* Typography */
  --text:    #1e293b;
  --text-2:  #576574;
  --text-3:  #8c99a6;
  --safe:    #16a34a;

  --fd:  'Space Grotesk', system-ui, sans-serif;
  --fb:  'Inter', system-ui, sans-serif;
  --fm:  'JetBrains Mono', monospace;

  --max-w:  900px; /* Slightly wider for the 4-col footer */
  --nav-h:  56px;
  --r:      6px;
  --r-lg:   14px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  min-height: 100vh;
  background-color: var(--bg);
  background-image:
    radial-gradient(circle at 50% 50%, rgba(230, 25, 25, 0.12) 0%, rgba(230, 25, 25, 0.03) 35%, transparent 65%),
    linear-gradient(180deg, rgba(255,255,255,0.5) 0%, rgba(230,235,242,0) 100%);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--fb);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Intensified Square-like Red Pixel Scatter */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(3px 3px at 15% 25%, rgba(230,25,25,0.7) 50%, transparent 100%),
    radial-gradient(2px 2px at 22% 35%, rgba(200,10,10,0.6) 50%, transparent 100%),
    radial-gradient(4px 4px at 10% 45%, rgba(240,30,30,0.8) 50%, transparent 100%),
    radial-gradient(2px 2px at 28% 55%, rgba(210,15,15,0.5) 50%, transparent 100%),
    radial-gradient(3px 3px at 18% 65%, rgba(230,25,25,0.7) 50%, transparent 100%),
    radial-gradient(3px 3px at 35% 15%, rgba(220,20,20,0.6) 50%, transparent 100%),
    radial-gradient(2px 2px at 85% 20%, rgba(230,25,25,0.7) 50%, transparent 100%),
    radial-gradient(4px 4px at 78% 32%, rgba(240,30,30,0.8) 50%, transparent 100%),
    radial-gradient(3px 3px at 90% 45%, rgba(200,10,10,0.5) 50%, transparent 100%),
    radial-gradient(2px 2px at 72% 55%, rgba(220,20,20,0.6) 50%, transparent 100%),
    radial-gradient(3px 3px at 82% 65%, rgba(230,25,25,0.7) 50%, transparent 100%),
    radial-gradient(4px 4px at 65% 18%, rgba(240,30,30,0.8) 50%, transparent 100%),
    radial-gradient(2px 2px at 45% 12%, rgba(200,10,10,0.5) 50%, transparent 100%),
    radial-gradient(3px 3px at 55% 82%, rgba(220,20,20,0.6) 50%, transparent 100%),
    radial-gradient(4px 4px at 12% 78%, rgba(230,25,25,0.8) 50%, transparent 100%),
    radial-gradient(2px 2px at 88% 80%, rgba(210,15,15,0.7) 50%, transparent 100%);
  pointer-events: none;
  z-index: 0;
}

.site-nav, main, .site-footer { position: relative; z-index: 1; }
img { display: block; max-width: 100%; }
a { color: var(--red-bright); text-decoration: none; }
a:hover { text-decoration: underline; }

h1 { font-family: var(--fd); font-weight: 800; font-size: clamp(1.85rem, 4.8vw, 2.9rem); line-height: 1.1; letter-spacing: -0.03em; color: #111; text-align: center; }
h2 { font-family: var(--fd); font-weight: 700; font-size: clamp(1.15rem, 2.5vw, 1.65rem); line-height: 1.25; letter-spacing: -0.02em; color: var(--text); text-align: center; }
h3 { font-family: var(--fd); font-weight: 700; font-size: 0.95rem; color: var(--text); }
p  { max-width: 68ch; color: var(--text-2); text-align: center; margin: 0 auto; }

.eyebrow { font-family: var(--fm); font-size: 0.65rem; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--red-bright); display: block; margin-bottom: 0.6rem; text-align: center; }

/* Nav */
.site-nav {
  height: var(--nav-h); background: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(24px); border-bottom: 1px solid var(--border);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.02); display: flex; align-items: center;
  padding: 0 clamp(1rem, 4vw, 2rem); position: sticky; top: 0; z-index: 500;
}
.site-nav__inner { display: flex; align-items: center; justify-content: space-between; width: 100%; max-width: var(--max-w); margin: 0 auto; }
.nav-brand { display: flex; align-items: center; gap: 8px; font-family: var(--fd); font-weight: 800; font-size: 0.95rem; letter-spacing: 0.03em; color: #111; }
.brand-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--red-bright); box-shadow: 0 0 8px var(--red-glow); }

.nav-hub-btn {
  font-family: var(--fm); font-size: 0.65rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: #4b5563;
  background: linear-gradient(180deg, #ffffff 0%, #e4e8ec 100%);
  border: 1px solid rgba(0, 0, 0, 0.14); border-radius: 20px; padding: 7px 18px;
  box-shadow: inset 0 1px 0px #ffffff, 0 1px 2px rgba(0, 0, 0, 0.06); transition: all .2s;
}
.nav-hub-btn:hover { transform: translateY(-1px); border-color: rgba(0,0,0,0.22); color: #111; text-decoration: none; }

/* Hero */
.hero { padding: clamp(4rem, 9vw, 6.5rem) clamp(1rem, 4vw, 2rem) 0; text-align: center; margin-bottom: 5rem; }
.hero__pre { font-family: var(--fm); font-size: 0.68rem; font-weight: 600; letter-spacing: 0.25em; color: var(--text-3); margin-bottom: 1.2rem; }
.hero__title { margin-bottom: 1.1rem; }
.hero__title .accent { color: var(--red-bright); text-shadow: 0 2px 24px rgba(230,25,25,0.2); }
.hero__sub { font-size: 0.9rem; color: var(--text-2); max-width: 52ch; }
/* =========================================================
   Tool card — modern, centered, in-place preview
   ========================================================= */

.tool-wrap {
  max-width: 760px;
  margin: 3rem auto 0;
  border-radius: 28px;
  border: 1px solid var(--border);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.72), rgba(255,255,255,0.42));
  backdrop-filter: blur(28px);
  box-shadow:
    0 16px 44px rgba(0,0,0,0.05),
    0 36px 90px rgba(185,28,28,0.07),
    inset 0 1px 0 rgba(255,255,255,0.85);
  overflow: hidden;
}

#drop-zone {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 420px;
  padding: 2rem;
  cursor: pointer;
  text-align: center;
  transition: background .25s ease, transform .25s ease, box-shadow .25s ease;
}

#drop-zone:hover,
#drop-zone.dz--over {
  background: rgba(255,255,255,0.62);
}

#drop-zone.dz--locked {
  cursor: progress;
  opacity: 0.96;
}

#file-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}

.dz-empty {
  display: grid;
  place-items: center;
  gap: 0.8rem;
  padding: 2rem 1rem;
}

.dz-icon {
  width: 76px;
  height: 76px;
  border-radius: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    linear-gradient(145deg, rgba(255,255,255,0.98), rgba(232,236,241,0.95));
  border: 1px solid rgba(0,0,0,0.08);
  box-shadow:
    0 10px 24px rgba(185,28,28,0.10),
    inset 0 1px 0 #fff;
}

.dz-icon svg {
  width: 30px;
  height: 30px;
  stroke: var(--red-bright);
}

.dz-headline {
  font-family: var(--fd);
  font-size: clamp(1.25rem, 2.8vw, 1.7rem);
  font-weight: 800;
  color: #111;
}

.dz-sub {
  font-family: var(--fm);
  font-size: 0.76rem;
  letter-spacing: 0.02em;
  color: var(--text-2);
}

.dz-preview {
  width: 100%;
  padding: 1.25rem 1.25rem 0.25rem;
}

#preview-img {
  width: 100%;
  max-height: 420px;
  object-fit: contain;
  border-radius: 22px;
  background: rgba(255,255,255,0.34);
  border: 1px solid rgba(0,0,0,0.07);
  box-shadow: 0 16px 34px rgba(0,0,0,0.08);
}

/* Status bars */
.tool-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.95rem 1.4rem;
  background: rgba(255,255,255,0.38);
  border-top: 1px solid var(--border);
}

#status-line {
  font-family: var(--fm);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--red-bright);
}

#model-badge {
  font-family: var(--fm);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.9);
  border: 1px solid rgba(0,0,0,0.12);
  color: var(--text-2);
  white-space: nowrap;
}

#model-badge[data-state="ready"] {
  border-color: rgba(22,163,74,0.28);
  color: var(--safe);
  background: rgba(22,163,74,0.06);
}

#load-bar-section {
  background: rgba(255,255,255,0.38);
  border-top: 1px solid var(--border);
  padding: 0 1.4rem 0.85rem;
}

.load-track {
  height: 4px;
  background: rgba(0,0,0,0.06);
  border-radius: 999px;
  overflow: hidden;
}

#progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--red-bright), var(--red));
  transition: width .2s ease;
}

#phase-bar-section {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1.4rem;
  background: rgba(255,255,255,0.38);
  border-top: 1px solid var(--border);
}

#phase-text {
  font-family: var(--fm);
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--red-bright);
  white-space: nowrap;
}

.phase-track {
  flex: 1;
  height: 3px;
  border-radius: 999px;
  background: rgba(0,0,0,0.06);
  position: relative;
  overflow: hidden;
}

.phase-track::after {
  content: '';
  position: absolute;
  top: 0;
  left: -50%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, var(--red-bright), transparent);
  animation: scan 1s linear infinite;
}

@keyframes scan {
  to { left: 150%; }
}

/* Verdict / result panel */
#result-panel {
  border-top: 1px solid rgba(230,25,25,0.12);
  background: rgba(255,255,255,0.52);
  padding: 1.4rem;
}

.result-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.2rem;
}

.result-copy {
  min-width: 0;
  text-align: left;
}

.result-label {
  display: block;
  margin-bottom: 0.45rem;
  font-family: var(--fm);
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  color: var(--text-3);
}

#verdict-tag {
  font-family: var(--fd);
  font-size: clamp(1.45rem, 4vw, 2.2rem);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #111;
}

#verdict-tag[data-verdict="real"] {
  color: var(--safe);
}

#verdict-tag[data-verdict="uncertain"] {
  color: #d97706;
}

#verdict-tag[data-verdict="ai"] {
  color: var(--red-bright);
}

#verdict-detail {
  margin-top: 0.55rem;
  font-size: 0.92rem;
  text-align: left;
  color: var(--text-2);
}

.result-score {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.25rem;
  flex-shrink: 0;
}

#verdict-pct {
  font-family: var(--fd);
  font-size: clamp(2rem, 4.8vw, 2.8rem);
  line-height: 1;
  font-weight: 800;
}

#verdict-pct[data-verdict="real"] { color: var(--safe); }
#verdict-pct[data-verdict="uncertain"] { color: #d97706; }
#verdict-pct[data-verdict="ai"] { color: var(--red-bright); }

.result-score__meta {
  font-family: var(--fm);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
}

.confidence-wrap {
  margin-top: 1rem;
}

.confidence-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.45rem;
  font-family: var(--fm);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--text-2);
}

.confidence-bar {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: rgba(0,0,0,0.06);
  overflow: hidden;
  border: 1px solid rgba(0,0,0,0.06);
}

.confidence-fill {
  height: 100%;
  width: 0%;
  transition: width .35s ease;
}

.confidence-real { background: linear-gradient(90deg, #22c55e, #16a34a); }
.confidence-uncertain { background: linear-gradient(90deg, #f59e0b, #d97706); }
.confidence-ai { background: linear-gradient(90deg, #ef4444, #dc2626); }

.refresh-btn {
  width: 100%;
  margin-top: 1rem;
  padding: 0.92rem 1rem;
  border: 1px solid rgba(0,0,0,0.10);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.96), rgba(228,232,237,0.96));
  font-family: var(--fm);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #3f3f46;
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 #fff,
    0 6px 16px rgba(0,0,0,0.06);
  transition: transform .18s ease, border-color .18s ease;
}

.refresh-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(0,0,0,0.18);
}

.refresh-btn:active {
  transform: translateY(0);
}

/* Responsive */
@media (max-width: 700px) {
  .tool-wrap {
    border-radius: 22px;
  }

  #drop-zone {
    min-height: 340px;
    padding: 1.4rem;
  }

  .result-top {
    flex-direction: column;
    align-items: stretch;
  }

  .result-score {
    align-items: flex-start;
  }

  .tool-bar,
  #load-bar-section,
  #phase-bar-section,
  #result-panel {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}
/* Sections */
.section { padding: clamp(4rem, 8vw, 6rem) clamp(1rem, 4vw, 2rem); }
.section__inner { max-width: var(--max-w); margin: 0 auto; }
.section--glass { background: rgba(255, 255, 255, 0.25); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.stitle { margin-bottom: 3rem; }
.stitle p { margin-top: 0.8rem; }

/* Centered Grid Cards */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: rgba(0,0,0,0.05); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; box-shadow: 0 4px 24px rgba(230,25,25,0.02); }
.grid-cell { background: var(--bg-card); padding: 2rem; backdrop-filter: blur(10px); transition: background .2s; text-align: center; }
.grid-cell:hover { background: rgba(255,255,255,0.95); }
.grid-cell__label { font-family: var(--fm); font-size: 0.65rem; font-weight: 600; color: var(--red-bright); margin-bottom: 0.6rem; display: block; }
.grid-cell__title { font-size: 1.05rem; margin-bottom: 0.5rem; }

/* Lists */
.stack-list, .faq-list { border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; background: var(--bg-card); }
.stack-item, .faq-item { padding: 1.5rem; border-bottom: 1px solid rgba(0,0,0,0.04); text-align: center; }
.stack-item { display: flex; flex-direction: column; align-items: center; gap: 1rem; }
.stack-num { font-family: var(--fm); font-size: 0.75rem; font-weight: 600; color: #fff; background: var(--red-bright); width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 12px rgba(230,25,25,0.2); }

/* 4-Column Footer */
.site-footer { background: rgba(255,255,255,0.6); backdrop-filter: blur(20px); border-top: 1px solid var(--border); padding: 4rem 2rem 2rem; }
.site-footer__grid { max-width: var(--max-w); margin: 0 auto; display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 3rem; text-align: left; }
.footer-brand__name { font-family: var(--fd); font-weight: 800; font-size: 1rem; color: #111; display: flex; align-items: center; gap: 8px; margin-bottom: 1rem; }
.footer-brand__desc { font-size: 0.85rem; margin-bottom: 1.5rem; text-align: left; }
.footer-col__heading { font-family: var(--fm); font-size: .65rem; font-weight: 600; letter-spacing: .15em; color: var(--red-bright); margin-bottom: 1.2rem; display: block; text-transform: uppercase; }
.footer-col__links { list-style: none; display: flex; flex-direction: column; gap: 0.8rem; }
.footer-col__links a { color: var(--text-2); font-size: 0.9rem; }
.footer-col__links a:hover { color: var(--red-bright); }
.footer-bottom { max-width: var(--max-w); margin: 3rem auto 0; padding-top: 1.5rem; border-top: 1px solid rgba(0,0,0,0.08); text-align: center; }

@media (max-width: 860px) {
  .site-footer__grid { grid-template-columns: 1fr 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 500px) {
  .site-footer__grid { grid-template-columns: 1fr; text-align: center; }
  .footer-brand__name { justify-content: center; }
  .footer-brand__desc { text-align: center; margin: 0 auto 1.5rem; }
}