/* ---------------------------------------------------------------
   Marginal — design tokens
   Palette grounded in the product itself: paper + ink, with a
   highlighter-yellow accent standing in for the marked-up matches
   the tool actually produces. Green/rust carry the same meaning
   they do in the report (original / flagged) everywhere else.
------------------------------------------------------------------ */
:root {
  --paper: #ffffff;
  --paper-alt: #f6f5f2;
  --ink: #14181f;
  --ink-soft: #4a4f58;
  --rule: #dedbd1;
  --mark: #ffc93c;
  --gray:#efedea;
  --mark-ink: #6b4e00;
  --verified: #2f6f4e;
  --flagged: #c2410c;
  --radius: 3px;

  --font-display: "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-body: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.5em;
}

h1 { font-size: 2.4rem; }
h2 { font-size: 1.7rem; }
h3 { font-size: 1.15rem; }

p { margin: 0 0 1em; color: var(--ink-soft); }

a { color: var(--ink); }

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

.wrap-narrow {
  max-width: 440px;
  margin: 0 auto;
  padding: 64px 24px;
}

/* ---------------- Header ---------------- */
.site-header {
  border-bottom: 1px solid var(--rule);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
}

.wordmark {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--ink);
} 
.wordmark {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    color: var(--ink);
    line-height: 0;
}

.wordmark img {
    display: block;
    width: 150px;
    height: auto;
    max-width: 100%;
    -webkit-user-drag: none;
    user-drag: none;
    user-select: none;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.main-nav a {
  text-decoration: none;
  font-size: 0.95rem;
  color: var(--ink-soft);
}

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

.nav-cta {
  background: var(--mark);
  color: var(--mark-ink) !important;
  padding: 8px 16px;
  border-radius: var(--radius);
  font-weight: 600;
}

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
}

.btn-primary {
  background: var(--mark);
  color: var(--mark-ink);
}

.btn-primary:hover { background: #ffbe1a; }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}

.btn-ghost:hover { background: var(--paper-alt); }

/* ---------------- Hero ---------------- */
.hero {
  padding: 72px 0;
  border-bottom: 1px solid var(--rule);
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}

.hero-copy .lede {
  font-size: 1.15rem;
  max-width: 46ch;
}

.hero-actions {
  display: flex;
  gap: 12px;
  margin-top: 28px;
}

.sample-card {
  background: var(--paper-alt);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 28px;
}

.sample-text {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--ink);
  margin-bottom: 20px;
}

.hl {
  padding: 0.05em 0.15em;
  border-radius: 2px;
}

.hl-flag {
  background: var(--mark);
  color: var(--mark-ink);
}

.hl-ok {
  background: transparent;
  border-bottom: 2px solid var(--verified);
}

.sample-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--rule);
  padding-top: 16px;
}

.score-badge {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.score-num {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
}

.score-label {
  font-size: 0.75rem;
  color: var(--ink-soft);
}

.score-badge-lg .score-num { font-size: 2.6rem; }

.sample-legend {
  display: flex;
  gap: 16px;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 6px;
}

.dot-flag { background: var(--mark); }
.dot-ok { background: var(--verified); }

/* ---------------- How it works ---------------- */
.how {
  padding: 72px 0;
  border-bottom: 1px solid var(--rule);
}

.how-steps {
  list-style: none;
  margin: 36px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.how-steps li {
  border-left: 2px solid var(--rule);
  padding-left: 20px;
}

.step-num {
  font-family: var(--font-display);
  font-size: 0.85rem;
  color: var(--ink-soft);
  display: block;
  margin-bottom: 8px;
}

/* ---------------- CTA band ---------------- */
.cta-band { padding: 56px 0; }

.cta-band-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.cta-band-inner h2 { margin-bottom: 4px; }
.cta-band-inner p { margin: 0; }

/* ---------------- Auth ---------------- */
.auth-form p { margin-bottom: 14px; }

.auth-form input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 1rem;
}

.auth-form label {
  display: block;
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin-bottom: 4px;
}

.auth-switch {
  margin-top: 20px;
  font-size: 0.9rem;
}

/* ---------------- Pricing ---------------- */
.pricing-section { padding: 64px 0 96px; }

.pricing-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 40px;
}

.price-card {
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 32px;
}

.price-card-alt { background: var(--paper-alt); }

.price-amount {
  font-family: var(--font-display);
  font-size: 2.1rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 6px;
}

.price-amount span {
  font-size: 1rem;
  font-weight: 400;
  color: var(--ink-soft);
  font-family: var(--font-body);
}

.price-features {
  list-style: none;
  padding: 0;
  margin: 20px 0 28px;
  font-size: 0.92rem;
  color: var(--ink-soft);
}

.price-features li {
  padding: 8px 0;
  border-top: 1px solid var(--rule);
}

/* ---------------- Dashboard ---------------- */
.dashboard-section { padding: 48px 0 96px; }

.dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 12px;
}

.credit-pill {
  background: var(--paper-alt);
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 8px 18px;
  font-size: 0.9rem;
}

.credit-pill a { color: var(--flagged); text-decoration: none; font-weight: 600; }

.upload-form {
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 40px;
  background: var(--paper-alt);
}

.upload-form .input-title {
  width: 100%;
  padding: 10px 12px;
  margin-bottom: 10px;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  font-family: var(--font-body);
}

.upload-form textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  font-family: var(--font-body);
  resize: vertical;
}

.upload-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  gap: 12px;
  flex-wrap: wrap;
}

.doc-list { border-top: 1px solid var(--rule); }

.doc-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 4px;
  border-bottom: 1px solid var(--rule);
  text-decoration: none;
  color: var(--ink);
  gap: 16px;
}

.doc-title { font-weight: 600; flex: 1; }

.doc-status {
  font-size: 0.85rem;
  color: var(--ink-soft);
  white-space: nowrap;
}

.status-completed { color: var(--verified); font-weight: 600; }
.status-failed { color: var(--flagged); font-weight: 600; }

.doc-date {
  font-size: 0.85rem;
  color: var(--ink-soft);
  white-space: nowrap;
}

.empty-state {
  padding: 32px 4px;
  color: var(--ink-soft);
}

/* ---------------- Result page ---------------- */
.result-section { padding: 48px 0 96px;min-height: calc(100vh - 160px);
    background:
        radial-gradient(circle at 90% 0%, rgba(255, 201, 60, 0.10), transparent 30%),
        var(--paper);
}

.result-section .wrap {
    max-width: 1080px;
}


.back-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 28px;
    color: var(--ink-soft);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease, transform 0.2s ease;
}

.back-link:hover {
    color: var(--ink);
    transform: translateX(-2px);
}

.result-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 24px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}
.result-header h1 {
    margin: 0;
    max-width: 620px;
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3.25rem);
    line-height: 1.04;
    letter-spacing: -0.035em;
    color: var(--ink);
    overflow-wrap: anywhere;
}
.result-body {
  max-width: 720px;
  border: 1px solid var(--rule);
    border-radius: 8px;
    background: var(--paper);
    overflow: hidden;
    box-shadow: 0 10px 35px rgba(20, 24, 31, 0.045);
}

.result-chunk {
    position: relative;
    padding: 25px 28px;
    border-bottom: 1px solid var(--rule);
    transition: background 0.2s ease;
}

.result-chunk:last-child {
    border-bottom: 0;
}
.result-chunk:hover {
    background: #fcfcfa;
}
.result-chunk p {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.05rem;
}

.chunk-flagged {
  background:
        linear-gradient(
            90deg,
            rgba(194, 65, 12, 0.055),
            transparent 45%
        );
  border-left: 3px solid var(--mark);
  padding-left: 16px;
}
.result-chunk.chunk-flagged::before {
    content: "SIMILARITY";
    position: absolute;
    top: 14px;
    right: 18px;
    color: var(--flagged);
    font-size: 0.6rem;
    font-weight: 800;
    letter-spacing: 0.1em;
}
/* AI flagged chunk
--------------------------------------------------------- */

.result-chunk.chunk-ai-flagged {
    background:
        linear-gradient(
            90deg,
            rgba(255, 201, 60, 0.09),
            transparent 45%
        );
}

.result-chunk.chunk-ai-flagged:not(.chunk-flagged) {
    border-left: 4px solid var(--mark);
    padding-left: 24px;
}

/* Chunk meta
--------------------------------------------------------- */

.chunk-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
}

.ai-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 9px;
    border: 1px solid #eadfb9;
    border-radius: 4px;
    background: #fff9e8;
    color: #795d00;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.ai-tag::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--mark);
}
.chunk-matches {
  margin-top: 8px;
  display: grid;
  gap: 8px;
  padding-top: 14px;
  border-top: 1px dashed var(--rule);
}

.match-note {
    display: grid;
    grid-template-columns: auto auto 1fr;
    align-items: center;
    gap: 9px;
    padding: 10px 12px;
    border: 1px solid var(--rule);
    border-radius: 5px;
    background: var(--paper-alt);
    font-size: 0.73rem;
}

.match-type {
    display: inline-flex;
    align-items: center;
    min-height: 23px;
    padding: 3px 7px;
    border-radius: 3px;
    font-weight: 700;
    white-space: nowrap;
}

.match-type-fingerprint { color: var(--flagged); background: rgba(194, 65, 12, 0.10);}
.match-type-semantic { color: var(--mark-ink); background: #fff6df; }
.match-type-paraphrase {
    background: rgba(255, 201, 60, 0.20);
    color: var(--mark-ink);
}
.match-similarity {
    color: var(--ink);
    font-weight: 700;
    white-space: nowrap;
}

.match-source {
    min-width: 0;
    color: var(--ink-soft);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
/* Failed state
--------------------------------------------------------- */

.status-note {
    max-width: 720px;
    margin: 20px 0 0;
    padding: 18px 20px;
    border: 1px solid rgba(194, 65, 12, 0.22);
    border-left: 4px solid var(--flagged);
    border-radius: 6px;
    background: rgba(194, 65, 12, 0.055);
    color: var(--ink-soft);
    font-size: 0.9rem;
    line-height: 1.7;
}

/* Score row
--------------------------------------------------------- */

.score-row {
    display: flex;
    align-items: stretch;
    gap: 12px;
    flex-shrink: 0;
}

.score-badge {
    position: relative;
    min-width: 150px;
    padding: 17px 20px 16px;
    border: 1px solid var(--rule);
    border-radius: 8px;
    background: var(--paper);
    box-shadow: 0 5px 20px rgba(20, 24, 31, 0.05);
    overflow: hidden;
}

.score-badge::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--verified);
}

.score-badge-ai::before {
    background: var(--mark);
}

.score-num {
    display: block;
    font-family: var(--font-display);
    font-size: 2rem;
    line-height: 1;
    font-weight: 700;
    letter-spacing: -0.04em;
    color: var(--ink);
}

.score-label {
    display: block;
    margin-top: 8px;
    color: var(--ink-soft);
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.07em;
}
/* AI caveat
--------------------------------------------------------- */

.ai-caveat {
    position: relative;
    margin: 22px 0 42px;
    padding: 15px 18px 15px 20px;
    border: 1px solid #eadfb9;
    border-radius: 6px;
    background: #fffaf0;
    color: #665a3e;
    font-size: 0.82rem;
    line-height: 1.65;
}

.ai-caveat::before {
    content: "i";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    margin-right: 8px;
    border: 1px solid #d7c990;
    border-radius: 50%;
    color: var(--mark-ink);
    font-size: 0.7rem;
    font-weight: 700;
}
/* Section title
--------------------------------------------------------- */

.section-label {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0 0 16px;
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.section-label::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--rule);
}

/* ---------------- Flash messages ---------------- */
.flash {
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 0.9rem;
}

.flash-success { background: #eaf5ef; color: var(--verified); }
.flash-warning { background: #fff6df; color: var(--mark-ink); }
.flash-error { background: #fdece4; color: var(--flagged); }

/* ---------------- Footer ---------------- */
/* =========================================================
   STANDARD SAAS FOOTER
========================================================= */

.site-footer {
    margin-top: 0;
    border-top: 1px solid var(--rule);
    background: var(--paper-alt);
}

.footer-main {
    display: grid;
    grid-template-columns: 1.7fr 1fr 1fr 1fr;
    gap: 50px;
    padding: 64px 0 52px;
}

.footer-brand {
    max-width: 310px;
}

.footer-logo {
    display: inline-block;
    font-family: var(--font-display);
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--ink);
    text-decoration: none;
    margin-bottom: 15px;
}

.footer-brand p {
    font-size: 0.88rem;
    line-height: 1.65;
    margin-bottom: 20px;
}

.footer-check-link {
    display: inline-block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--ink);
    text-decoration: none;
}

.footer-check-link:hover {
    text-decoration: underline;
}


/* Footer columns */

.footer-column {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.footer-column h3 {
    font-family: var(--font-body);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 0 0 18px;
    color: var(--ink);
}

.footer-column a {
    font-size: 0.84rem;
    color: var(--ink-soft);
    text-decoration: none;
    margin-bottom: 10px;
    transition: color 0.15s ease;
}

.footer-column a:hover {
    color: var(--ink);
    text-decoration: underline;
}


/* Footer bottom */

.footer-bottom {
    border-top: 1px solid var(--rule);
    padding: 22px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.footer-bottom p {
    margin: 0;
    font-size: 0.76rem;
    color: var(--ink-soft);
}

.footer-bottom-links {
    display: flex;
    gap: 20px;
}

.footer-bottom-links a {
    font-size: 0.76rem;
    color: var(--ink-soft);
    text-decoration: none;
}

.footer-bottom-links a:hover {
    color: var(--ink);
    text-decoration: underline;
}


/* =========================================================
   LEGAL / ABOUT HERO
========================================================= */

.legal-hero {
    padding: 80px 0 72px;
    border-bottom: 1px solid var(--rule);
}

.legal-hero-small {
    padding: 64px 0 56px;
}

.legal-hero h1 {
    font-size: 3rem;
    max-width: 750px;
    margin-bottom: 18px;
}

.legal-hero p {
    max-width: 620px;
    font-size: 1.08rem;
}

.legal-updated {
    display: inline-block;
    margin-top: 8px;
    font-size: 0.75rem;
    color: var(--ink-soft);
}


/* =========================================================
   CONTENT PAGES
========================================================= */

.content-page {
    padding: 70px 0 100px;
}

.content-page-grid {
    display: grid;
    grid-template-columns: minmax(0, 760px) 240px;
    justify-content: space-between;
    gap: 60px;
}

.content-main h2 {
    font-size: 1.45rem;
    margin-top: 42px;
    margin-bottom: 12px;
}

.content-main h2:first-child {
    margin-top: 0;
}

.content-main p {
    max-width: 72ch;
    font-size: 0.98rem;
    line-height: 1.8;
}

.content-sidebar {
    padding-top: 5px;
}

.sidebar-card {
    border: 1px solid var(--rule);
    background: var(--paper-alt);
    padding: 22px;
}

.sidebar-card strong {
    display: block;
    font-family: var(--font-display);
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.sidebar-card p {
    font-size: 0.82rem;
    margin: 0;
    line-height: 1.6;
}


/* =========================================================
   FOOTER + CONTENT RESPONSIVE
========================================================= */

@media (max-width: 960px) {

    .footer-main {
        grid-template-columns: 1.5fr 1fr 1fr;
        gap: 35px;
    }

    .footer-brand {
        grid-column: 1 / -1;
        max-width: 500px;
    }

    .content-page-grid {
        grid-template-columns: 1fr;
    }

    .content-sidebar {
        display: none;
    }

    .legal-hero h1 {
        font-size: 2.5rem;
    }

}


@media (max-width: 640px) {

    .footer-main {
        grid-template-columns: 1fr 1fr;
        gap: 36px 20px;
        padding: 48px 0 38px;
    }

    .footer-brand {
        grid-column: 1 / -1;
    }

    .footer-column h3 {
        margin-bottom: 14px;
    }

    .footer-column a {
        font-size: 0.82rem;
        margin-bottom: 9px;
    }

    .footer-bottom {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
    }

    .footer-bottom-links {
        gap: 16px;
    }

    .legal-hero {
        padding: 52px 0 48px;
    }

    .legal-hero-small {
        padding: 48px 0 42px;
    }

    .legal-hero h1 {
        font-size: 2.1rem;
    }

    .legal-hero p {
        font-size: 0.95rem;
    }

    .content-page {
        padding: 48px 0 70px;
    }

    .content-main h2 {
        font-size: 1.25rem;
        margin-top: 34px;
    }

    .content-main p {
        font-size: 0.92rem;
        line-height: 1.75;
    }

}

/* ---------------------------------------------------------------
   Responsive breakpoints
------------------------------------------------------------------ */
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; }
  .how-steps { grid-template-columns: 1fr 1fr; }
  .pricing-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  h1 { font-size: 1.9rem; }
  h2 { font-size: 1.4rem; }
  .header-inner { flex-direction: column; gap: 12px; align-items: flex-start; }
  .main-nav { gap: 16px; flex-wrap: wrap; }
  .how-steps { grid-template-columns: 1fr; }
  .hero { padding: 48px 0; }
  .result-header { flex-direction: column; }
  .doc-row { flex-wrap: wrap; }
  .wrap-narrow { padding: 40px 20px; }
}
.logout-link {
    background: #000;
    border: none;
    padding: 7px;
    color: #ffffff;
    /* text-decoration: underline; */
    cursor: pointer;
    font: inherit;
    border-radius: 5px;
}
@media (max-width: 640px) {
    .logout-link {
        padding: 6px 9px;
        font-size: 0.8rem;
        border-radius: 4px;
    }
}
@media (max-width: 400px) {
    .logout-link {
        padding: 5px 8px;
        font-size: 0.75rem;
    }
}
.doc-list-header {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 8px;
}
/* =========================================================
   DOCUMENT UPLOAD
   ========================================================= */

.upload-controls {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 14px;
    align-items: stretch;
    margin-top: 16px;
}

/* Custom file input */

.file-dropzone {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 76px;
    padding: 12px 16px;
    border: 1px dashed #c9c6bd;
    border-radius: 7px;
    background: var(--paper-alt);
    cursor: pointer;
    transition:
        border-color 0.2s ease,
        background 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.2s ease;
}

.file-dropzone:hover {
    border-color: var(--ink);
    background: #fff;
    box-shadow: 0 6px 20px rgba(20, 24, 31, 0.05);
    transform: translateY(-1px);
}

.file-dropzone.dragover {
    border-color: var(--mark);
    background: #fffaf0;
    box-shadow: 0 0 0 3px rgba(255, 201, 60, 0.12);
}

/* Hide native input */

.file-dropzone input[type="file"] {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

/* Upload icon */

.file-drop-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    border: 1px solid var(--rule);
    border-radius: 6px;
    background: var(--paper);
    color: var(--ink);
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1;
    transition: transform 0.2s ease;
}

.file-dropzone:hover .file-drop-icon {
    transform: translateY(-2px);
}

/* Text */

.file-drop-content {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.file-drop-content strong {
    color: var(--ink);
    font-size: 0.85rem;
    font-weight: 700;
}

.file-drop-content small {
    margin-top: 4px;
    color: var(--ink-soft);
    font-size: 0.72rem;
    line-height: 1.4;
}

/* Selected filename */

.file-selected {
    margin-left: auto;
    max-width: 190px;
    overflow: hidden;
    color: var(--ink-soft);
    font-size: 0.72rem;
    font-weight: 600;
    text-align: right;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-selected.has-file {
    color: var(--verified);
}

/* Submit button */

.upload-submit {
    min-width: 135px;
    min-height: 76px;
    position: relative;
    overflow: hidden;
}

.upload-submit .btn-loading {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.upload-submit.is-loading {
    pointer-events: none;
    cursor: wait;
}

.upload-submit.is-loading .btn-text {
    display: none;
}

.upload-submit.is-loading .btn-loading {
    display: inline-flex;
}

/* Spinner */

.loading-spinner {
    width: 15px;
    height: 15px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: uploadSpin 0.7s linear infinite;
}

@keyframes uploadSpin {
    to {
        transform: rotate(360deg);
    }
}

/* Upload progress shimmer */

.upload-submit.is-loading::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        110deg,
        transparent 20%,
        rgba(255, 255, 255, 0.15) 45%,
        transparent 70%
    );
    transform: translateX(-100%);
    animation: uploadShimmer 1.2s ease-in-out infinite;
    pointer-events: none;
}

@keyframes uploadShimmer {
    to {
        transform: translateX(100%);
    }
}

/* File selected animation */

.file-dropzone.file-added {
    animation: fileAdded 0.45s ease;
}

@keyframes fileAdded {
    0% {
        transform: scale(1);
    }

    45% {
        transform: scale(1.015);
    }

    100% {
        transform: scale(1);
    }
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 700px) {

    .upload-controls {
        grid-template-columns: 1fr;
    }

    .file-dropzone {
        min-height: 72px;
    }

    .upload-submit {
        width: 100%;
        min-height: 52px;
    }

    .file-selected {
        max-width: 130px;
    }
}

@media (max-width: 480px) {

    .file-dropzone {
        padding: 12px;
        gap: 10px;
    }

    .file-drop-icon {
        flex-basis: 36px;
        width: 36px;
        height: 36px;
    }

    .file-drop-content small {
        font-size: 0.67rem;
    }

    .file-selected {
        position: absolute;
        left: 59px;
        bottom: 8px;
        max-width: calc(100% - 75px);
        font-size: 0.65rem;
    }
}
/* =========================================================
   FEEDBACK WIDGET
   ========================================================= */

.feedback-widget {
    position: fixed;
    top: 88px;
    right: 24px;
    z-index: 9990;
}

/* Trigger button
--------------------------------------------------------- */

.feedback-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 13px;
    border: 1px solid var(--rule);
    border-radius: 5px;
    background: var(--paper);
    color: var(--ink);
    box-shadow: 0 5px 20px rgba(20, 24, 31, 0.08);
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    transition:
        background 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.feedback-trigger:hover {
    background: var(--ink);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(20, 24, 31, 0.13);
}

.feedback-trigger-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
}

/* Drawer
--------------------------------------------------------- */

.feedback-drawer {
    position: absolute;
    top: 48px;
    right: 0;

    width: 370px;
    max-width: calc(100vw - 32px);

    border: 1px solid var(--rule);
    border-radius: 8px;
    background: var(--paper);

    box-shadow:
        0 25px 70px rgba(20, 24, 31, 0.16),
        0 5px 20px rgba(20, 24, 31, 0.07);

    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px) scale(0.98);
    transform-origin: top right;

    transition:
        opacity 0.2s ease,
        visibility 0.2s ease,
        transform 0.2s ease;
}

.feedback-drawer.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* Header
--------------------------------------------------------- */

.feedback-drawer-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;

    padding: 20px 20px 17px;
    border-bottom: 1px solid var(--rule);
}

.feedback-eyebrow {
    display: block;
    margin-bottom: 5px;

    color: var(--verified);
    font-size: 0.6rem;
    font-weight: 800;
    letter-spacing: 0.11em;
}

.feedback-drawer-header h3 {
    margin: 0;

    font-family: var(--font-display);
    font-size: 1.4rem;
    line-height: 1.1;
    letter-spacing: -0.025em;
    color: var(--ink);
}

.feedback-close {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 28px;
    height: 28px;

    padding: 0;
    border: 1px solid var(--rule);
    border-radius: 4px;

    background: var(--paper);
    color: var(--ink-soft);

    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;

    transition:
        background 0.2s ease,
        color 0.2s ease;
}

.feedback-close:hover {
    background: var(--paper-alt);
    color: var(--ink);
}

/* Body
--------------------------------------------------------- */

.feedback-drawer-body {
    padding: 20px;
}

.feedback-description {
    margin: 0 0 14px;

    color: var(--ink-soft);
    font-size: 0.82rem;
    line-height: 1.6;
}

/* Notice
--------------------------------------------------------- */

.feedback-notice {
    margin-bottom: 18px;
    padding: 11px 12px;

    border: 1px solid #e8dfbd;
    border-radius: 5px;

    background: #fffaf0;
    color: #6c5d35;

    font-size: 0.7rem;
    line-height: 1.55;
}

.feedback-notice strong {
    color: var(--mark-ink);
}

/* Form
--------------------------------------------------------- */

.feedback-form label {
    display: block;
    margin-bottom: 7px;

    color: var(--ink);
    font-size: 0.72rem;
    font-weight: 700;
}

.feedback-form textarea {
    display: block;

    width: 100%;
    min-height: 135px;
    resize: vertical;

    padding: 12px;

    border: 1px solid var(--rule);
    border-radius: 5px;

    background: #fff;
    color: var(--ink);

    font-family: var(--font-body);
    font-size: 0.82rem;
    line-height: 1.6;

    outline: none;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.feedback-form textarea::placeholder {
    color: #999b9f;
}

.feedback-form textarea:focus {
    border-color: var(--ink);
    box-shadow: 0 0 0 3px rgba(20, 24, 31, 0.06);
}

/* Footer */

.feedback-form-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 10px;
    margin-top: 10px;
}

.feedback-count {
    color: var(--ink-soft);
    font-size: 0.65rem;
}

/* Submit */

.feedback-submit {
    position: relative;

    min-width: 112px;
    padding: 9px 14px;

    border: 1px solid var(--ink);
    border-radius: 5px;

    background: var(--ink);
    color: #fff;

    font-family: var(--font-body);
    font-size: 0.73rem;
    font-weight: 700;

    cursor: pointer;

    transition:
        opacity 0.2s ease,
        transform 0.2s ease;
}

.feedback-submit:hover {
    opacity: 0.88;
    transform: translateY(-1px);
}

.feedback-submit:disabled {
    opacity: 0.65;
    cursor: wait;
    transform: none;
}

.feedback-submit-loading {
    display: none;
}

.feedback-submit.is-loading .feedback-submit-text {
    display: none;
}

.feedback-submit.is-loading .feedback-submit-loading {
    display: inline;
}

/* Response message */

.feedback-message {
    display: none;

    margin-top: 12px;
    padding: 9px 11px;

    border-radius: 4px;

    font-size: 0.7rem;
    line-height: 1.5;
}

.feedback-message.success {
    display: block;
    border: 1px solid rgba(47, 111, 78, 0.2);
    background: rgba(47, 111, 78, 0.07);
    color: var(--verified);
}

.feedback-message.error {
    display: block;
    border: 1px solid rgba(194, 65, 12, 0.2);
    background: rgba(194, 65, 12, 0.06);
    color: var(--flagged);
}

/* Success state */

.feedback-form.is-success textarea {
    opacity: 0.6;
}

/* =========================================================
   DESKTOP ONLY
   Hide feedback on mobile
   ========================================================= */

@media (max-width: 640px) {
    .feedback-widget {
        display: none;
    }
}
.upload-submit:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
}

.upload-submit:not(:disabled) {
    opacity: 1;
    cursor: pointer;
}


.checking-quote {
    margin-top: 22px;
    text-align: center;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
}

.checking-quote p {
    margin: 0;
    color: #77777d;
    font-size: 14px;
    line-height: 1.6;
    font-weight: 500;
    transition: opacity .25s ease, transform .25s ease;
}

.checking-quote p.quote-changing {
    opacity: 0;
    transform: translateY(5px);
}


/* =========================================================
   Homepage Expansion
========================================================= */

/* ---------------- Section Intro ---------------- */

.section-intro {
    max-width: 650px;
    margin-bottom: 42px;
}

.section-intro.centered {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.eyebrow {
    display: inline-block;
    margin-bottom: 12px;
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    font-weight: 700;
    color: var(--ink-soft);
}

.section-intro h2 {
    font-size: 2.25rem;
    margin-bottom: 12px;
}

.section-intro p {
    max-width: 60ch;
}


/* =========================================================
   Detection Workspace
========================================================= */

.workspace-section {
    padding: 88px 0;
    border-bottom: 1px solid var(--rule);
}

.workspace-mockup {
    border: 1px solid var(--rule);
    background: var(--paper);
    box-shadow: 0 18px 50px rgba(20, 24, 31, 0.08);
}


/* Top browser-like bar */

.mockup-topbar {
    display: flex;
    align-items: center;
    gap: 20px;
    min-height: 52px;
    padding: 0 18px;
    border-bottom: 1px solid var(--rule);
    background: var(--paper-alt);
}

.mockup-dots {
    display: flex;
    gap: 5px;
}

.mockup-dots span {
    width: 7px;
    height: 7px;
    border: 1px solid var(--ink-soft);
    border-radius: 50%;
}

.mockup-file {
    flex: 1;
    font-size: 0.8rem;
    color: var(--ink-soft);
}

.mockup-status {
    font-size: 0.75rem;
    color: var(--verified);
    font-weight: 600;
}


/* Workspace */

.workspace-grid {
    display: grid;
    grid-template-columns: 1.5fr 0.75fr;
}

.workspace-document {
    padding: 32px;
    border-right: 1px solid var(--rule);
}

.document-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--rule);
}

.document-label {
    display: block;
    margin-bottom: 5px;
    font-size: 0.68rem;
    letter-spacing: 0.12em;
    font-weight: 700;
    color: var(--ink-soft);
}

.document-header h3 {
    font-size: 1.2rem;
    margin: 0;
}

.document-pages {
    font-size: 0.78rem;
    color: var(--ink-soft);
    white-space: nowrap;
}

.document-content {
    padding: 30px 0;
}

.document-content p {
    color: var(--ink);
    font-family: var(--font-display);
    font-size: 1.08rem;
    line-height: 1.8;
    margin-bottom: 22px;
}

.highlight-warning {
    background: var(--mark);
    color: var(--mark-ink);
    padding: 2px 4px;
}

.highlight-danger {
    background: #fdece4;
    color: var(--flagged);
    padding: 2px 4px;
}

.document-footer {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    padding-top: 18px;
    border-top: 1px solid var(--rule);
    font-size: 0.78rem;
    color: var(--ink-soft);
}

.status-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    margin-right: 5px;
}

.status-yellow {
    background: var(--mark);
}

.status-green {
    background: var(--verified);
}


/* Analysis panel */

.analysis-panel {
    padding: 28px;
    background: var(--paper-alt);
}

.analysis-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--rule);
}

.analysis-title span {
    font-size: 0.68rem;
    letter-spacing: 0.12em;
    font-weight: 700;
}

.analysis-title strong {
    font-size: 0.75rem;
    color: var(--verified);
}


.analysis-score {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 28px 0;
    border-bottom: 1px solid var(--rule);
}

.score-circle {
    width: 92px;
    height: 92px;
    flex: 0 0 92px;
    border: 5px solid var(--verified);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.score-circle strong {
    font-family: var(--font-display);
    font-size: 1.5rem;
    line-height: 1;
}

.score-circle span {
    font-size: 0.65rem;
    color: var(--ink-soft);
    margin-top: 4px;
}

.score-description strong {
    font-size: 0.95rem;
}

.score-description p {
    font-size: 0.78rem;
    margin: 4px 0 0;
}


.analysis-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    background: var(--rule);
    margin: 24px 0;
    border: 1px solid var(--rule);
}

.analysis-stat {
    background: var(--paper);
    padding: 14px;
}

.analysis-stat:last-child {
    grid-column: 1 / -1;
}

.analysis-stat span,
.analysis-stat small {
    display: block;
}

.analysis-stat span {
    font-size: 0.72rem;
    color: var(--ink-soft);
}

.analysis-stat strong {
    display: block;
    font-family: var(--font-display);
    font-size: 1.35rem;
    margin: 2px 0;
}

.analysis-stat small {
    font-size: 0.65rem;
    color: var(--ink-soft);
}


.ai-meter-card {
    border-top: 1px solid var(--rule);
    padding-top: 20px;
}

.meter-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    margin-bottom: 8px;
}

.meter {
    height: 6px;
    background: var(--rule);
    overflow: hidden;
}

.meter span {
    display: block;
    height: 100%;
    background: var(--flagged);
}

.ai-meter-card p {
    font-size: 0.72rem;
    margin: 10px 0 18px;
}

.analysis-button {
    width: 100%;
    text-align: center;
}


/* =========================================================
   Report Section
========================================================= */

.report-section {
    padding: 96px 0;
    border-bottom: 1px solid var(--rule);
}

.report-layout {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: 70px;
    align-items: center;
}

.report-copy h2 {
    font-size: 2.3rem;
    max-width: 12ch;
}

.report-copy > p {
    max-width: 48ch;
}


.report-points {
    margin-top: 35px;
}

.report-point {
    display: flex;
    gap: 18px;
    padding: 18px 0;
    border-top: 1px solid var(--rule);
}

.report-point:last-child {
    border-bottom: 1px solid var(--rule);
}

.report-number {
    font-family: var(--font-display);
    font-size: 0.85rem;
    color: var(--ink-soft);
}

.report-point h3 {
    font-size: 1rem;
    margin-bottom: 4px;
}

.report-point p {
    font-size: 0.85rem;
    margin: 0;
}


/* Report mockup */

.report-mockup {
    border: 1px solid var(--rule);
    background: var(--paper);
    box-shadow: 0 18px 50px rgba(20, 24, 31, 0.07);
}

.report-mockup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid var(--rule);
}

.report-mockup-header span:first-child {
    display: block;
    font-size: 0.65rem;
    letter-spacing: 0.12em;
    color: var(--ink-soft);
}

.report-mockup-header strong {
    display: block;
    margin-top: 3px;
    font-size: 0.9rem;
}

.report-complete {
    font-size: 0.65rem;
    color: var(--verified);
    font-weight: 700;
}


.report-score-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
    padding: 28px 20px;
    background: var(--paper-alt);
    border-bottom: 1px solid var(--rule);
}

.big-report-score strong {
    display: block;
    font-family: var(--font-display);
    font-size: 3.2rem;
    line-height: 1;
}

.big-report-score span {
    color: var(--ink-soft);
    font-size: 0.75rem;
}


.report-mini-stats {
    display: flex;
    gap: 30px;
}

.report-mini-stats div {
    min-width: 100px;
}

.report-mini-stats span {
    display: block;
    color: var(--ink-soft);
    font-size: 0.7rem;
}

.report-mini-stats strong {
    font-family: var(--font-display);
    font-size: 1.5rem;
}


.source-list {
    padding: 10px 20px;
}

.source-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid var(--rule);
}

.source-color {
    width: 8px;
    height: 34px;
}

.source-yellow {
    background: var(--mark);
}

.source-orange {
    background: var(--flagged);
}

.source-green {
    background: var(--verified);
}

.source-info {
    flex: 1;
}

.source-info strong,
.source-info span {
    display: block;
}

.source-info strong {
    font-size: 0.8rem;
}

.source-info span {
    font-size: 0.7rem;
    color: var(--ink-soft);
}

.source-item > strong {
    font-family: var(--font-display);
}


.report-text-preview {
    padding: 22px 20px;
}

.report-text-preview p {
    font-family: var(--font-display);
    color: var(--ink);
    line-height: 1.7;
    font-size: 0.95rem;
}

.report-text-preview span {
    background: var(--mark);
    color: var(--mark-ink);
    padding: 2px 4px;
}


/* =========================================================
   Audience Section
========================================================= */

.audience-section {
    padding: 90px 0;
    background: var(--paper-alt);
    border-bottom: 1px solid var(--rule);
}

.audience-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.audience-card {
    background: var(--paper);
    border: 1px solid var(--rule);
    padding: 30px;
    min-height: 260px;
    display: flex;
    flex-direction: column;
}

.audience-card-featured {
    border-color: var(--ink);
}

.audience-icon {
    font-family: var(--font-display);
    font-size: 0.85rem;
    color: var(--ink-soft);
    margin-bottom: 28px;
}

.audience-card h3 {
    font-size: 1.3rem;
}

.audience-card p {
    font-size: 0.9rem;
}

.audience-card a {
    margin-top: auto;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
}

.audience-card a:hover {
    text-decoration: underline;
}


/* =========================================================
   Final CTA
========================================================= */

.final-cta {
    padding: 90px 0;
}

.final-cta-inner {
    border: 1px solid var(--ink);
    padding: 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 40px;
    background: var(--paper);
}

.final-cta-inner h2 {
    font-size: 2.5rem;
}

.final-cta-inner p {
    margin-bottom: 0;
}

.final-cta-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}


/* =========================================================
   Responsive
========================================================= */

@media (max-width: 960px) {

    .workspace-grid {
        grid-template-columns: 1fr;
    }

    .workspace-document {
        border-right: 0;
        border-bottom: 1px solid var(--rule);
    }

    .report-layout {
        grid-template-columns: 1fr;
        gap: 50px;
    }

    .report-copy h2 {
        max-width: none;
    }

    .audience-grid {
        grid-template-columns: 1fr;
    }

    .final-cta-inner {
        flex-direction: column;
        align-items: flex-start;
    }

}


@media (max-width: 640px) {

    .workspace-section,
    .report-section,
    .audience-section,
    .final-cta {
        padding: 60px 0;
    }

    .section-intro h2 {
        font-size: 1.8rem;
    }

    .workspace-document {
        padding: 20px;
    }

    .analysis-panel {
        padding: 20px;
    }

    .document-header {
        flex-direction: column;
        gap: 8px;
    }

    .document-content p {
        font-size: 0.95rem;
    }

    .document-footer {
        flex-direction: column;
        gap: 8px;
    }

    .report-score-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .report-mini-stats {
        width: 100%;
        justify-content: space-between;
    }

    .final-cta-inner {
        padding: 30px 22px;
    }

    .final-cta-inner h2 {
        font-size: 2rem;
    }

    .final-cta-actions {
        width: 100%;
        flex-direction: column;
    }

    .final-cta-actions .btn {
        text-align: center;
        width: 100%;
    }

}
/* =========================================================
   Newsletter Signup
========================================================= */

.newsletter-section {
    padding: 72px 0;
    background-color: var(--gray)
}

.newsletter-inner {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 70px;
    align-items: center;
    border: 1px solid var(--ink);
    padding: 48px;
    background: var(--paper);
}

.newsletter-copy {
    max-width: 500px;
}

.newsletter-copy h2 {
    font-size: 2.25rem;
    margin-bottom: 14px;
}

.newsletter-copy p {
    max-width: 48ch;
    margin-bottom: 0;
}


/* Form */

.newsletter-form-wrap {
    width: 100%;
}

.newsletter-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    align-items: end;
}

.newsletter-field {
    display: flex;
    flex-direction: column;
}

.newsletter-field label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--ink);
}

.newsletter-field input {
    width: 100%;
    height: 46px;
    padding: 10px 12px;
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 0.95rem;
    outline: none;
    transition:
        border-color 0.15s ease,
        box-shadow 0.15s ease;
}

.newsletter-field input::placeholder {
    color: #8a8d93;
}

.newsletter-field input:focus {
    border-color: var(--ink);
    box-shadow: 0 0 0 2px rgba(20, 24, 31, 0.06);
}

.newsletter-submit {
    width: 100%;
    min-height: 46px;
}


/* Message */

.newsletter-message {
    display: none;
    margin-top: 14px;
    padding: 11px 14px;
    border-radius: var(--radius);
    font-size: 0.85rem;
    line-height: 1.45;
}

.newsletter-message.success {
    display: block;
    background: #eaf5ef;
    color: var(--verified);
    border: 1px solid #cfe7d9;
}

.newsletter-message.error {
    display: block;
    background: #fdece4;
    color: var(--flagged);
    border: 1px solid #f2cfc0;
}

.newsletter-note {
    margin: 12px 0 0;
    font-size: 0.75rem;
    color: var(--ink-soft);
}


/* Loading state */

.newsletter-submit.is-loading {
    opacity: 0.65;
    cursor: wait;
}


/* Mobile */

@media (max-width: 960px) {

    .newsletter-inner {
        grid-template-columns: 1fr;
        gap: 36px;
    }

    .newsletter-copy {
        max-width: 650px;
    }

}


@media (max-width: 640px) {

    .newsletter-section {
        padding: 55px 0;
    }

    .newsletter-inner {
        padding: 30px 22px;
        gap: 30px;
    }

    .newsletter-copy h2 {
        font-size: 1.8rem;
    }

    .newsletter-fields {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .newsletter-submit {
        margin-top: 2px;
    }

}
/* =========================================================
   Pillars / Four Checks
========================================================= */

.pillars {
    padding: 88px 0;
    border-bottom: 1px solid var(--rule);
}

.pillars h2 {
    font-size: 2.25rem;
    margin-bottom: 42px;
    max-width: 650px;
}

.pillar-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    border-top: 1px solid var(--rule);
    border-left: 1px solid var(--rule);
}

.pillar {
    min-height: 240px;
    padding: 30px 26px;
    border-right: 1px solid var(--rule);
    border-bottom: 1px solid var(--rule);
    background: var(--paper);
    transition:
        background 0.2s ease,
        transform 0.2s ease;
}

.pillar:hover {
    background: var(--paper-alt);
}

.pillar h3 {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 600;
    line-height: 1.25;
    margin: 0 0 14px;
}

.pillar p {
    font-size: 0.9rem;
    line-height: 1.7;
    margin: 0;
    max-width: 30ch;
}


/* Small numbered marker */

.pillar::before {
    display: block;
    margin-bottom: 28px;
    font-family: var(--font-display);
    font-size: 0.8rem;
    color: var(--ink-soft);
}

.pillar:nth-child(1)::before {
    content: "01";
}

.pillar:nth-child(2)::before {
    content: "02";
}

.pillar:nth-child(3)::before {
    content: "03";
}

.pillar:nth-child(4)::before {
    content: "04";
}


/* =========================================================
   Pillars Responsive
========================================================= */

@media (max-width: 960px) {

    .pillars {
        padding: 72px 0;
    }

    .pillars h2 {
        font-size: 2rem;
        margin-bottom: 36px;
    }

    .pillar-grid {
        grid-template-columns: 1fr 1fr;
    }

    .pillar {
        min-height: 220px;
        padding: 26px 24px;
    }

}


@media (max-width: 640px) {

    .pillars {
        padding: 60px 0;
    }

    .pillars h2 {
        font-size: 1.8rem;
        margin-bottom: 30px;
    }

    .pillar-grid {
        grid-template-columns: 1fr;
    }

    .pillar {
        min-height: auto;
        padding: 26px 22px;
    }

    .pillar::before {
        margin-bottom: 20px;
    }

    .pillar h3 {
        font-size: 1.15rem;
    }

    .pillar p {
        max-width: none;
        font-size: 0.88rem;
    }

}
/* =========================================================
   Back To Top
========================================================= */

.back-to-top {
    position: fixed;
    right: 24px;
    bottom: 24px;
    width: 44px;
    height: 44px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 1px solid var(--ink);
    border-radius: var(--radius);

    background: var(--ink);
    color: var(--paper);

    font-family: var(--font-body);
    font-size: 1.2rem;
    line-height: 1;

    cursor: pointer;
    z-index: 999;

    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);

    transition:
        opacity 0.2s ease,
        visibility 0.2s ease,
        transform 0.2s ease,
        background 0.2s ease;
}

.back-to-top:hover {
    background: var(--mark);
    color: var(--mark-ink);
    border-color: var(--mark);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

@media (max-width: 640px) {

    .back-to-top {
        right: 16px;
        bottom: 16px;
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }

}
/* =========================================================
   Timed CTA Popup
========================================================= */

.cta-popup {
    position: fixed;
    inset: 0;
    z-index: 9999;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 24px;

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transition:
        opacity 0.25s ease,
        visibility 0.25s ease;
}

.cta-popup.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}


/* ---------------- Backdrop ---------------- */

.cta-popup-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(20, 24, 31, 0.58);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}


/* ---------------- Popup Card ---------------- */

.cta-popup-card {
    position: relative;
    z-index: 1;

    width: min(100%, 560px);

    padding: 48px;

    background: var(--paper);
    border: 1px solid var(--ink);

    box-shadow:
        0 24px 80px rgba(20, 24, 31, 0.2);

    transform: translateY(20px) scale(0.97);

    transition:
        transform 0.3s ease;
}

.cta-popup.is-visible .cta-popup-card {
    transform: translateY(0) scale(1);
}


/* ---------------- Close Button ---------------- */

.cta-popup-close {
    position: absolute;
    top: 16px;
    right: 16px;

    width: 38px;
    height: 38px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 0;

    border: 1px solid var(--rule);
    border-radius: 50%;

    background: var(--paper);
    color: var(--ink);

    font-family: Arial, sans-serif;
    font-size: 24px;
    font-weight: 300;
    line-height: 1;

    cursor: pointer;

    transition:
        background 0.15s ease,
        border-color 0.15s ease;
}

.cta-popup-close:hover {
    background: var(--paper-alt);
    border-color: var(--ink);
}


/* ---------------- Content ---------------- */

.cta-popup-mark {
    display: inline-block;

    margin-bottom: 24px;

    padding: 5px 9px;

    background: var(--mark);
    color: var(--mark-ink);

    font-family: var(--font-display);
    font-size: 0.82rem;
    font-weight: 700;
}

.cta-popup-eyebrow {
    display: block;

    margin-bottom: 10px;

    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.11em;
    text-transform: uppercase;

    color: var(--ink-soft);
}

.cta-popup-card h2 {
    max-width: 440px;

    margin: 0 0 14px;

    font-family: var(--font-display);
    font-size: 2.35rem;
    font-weight: 600;
    line-height: 1.12;
    color: var(--ink);
}

.cta-popup-card > p {
    max-width: 470px;

    margin: 0;

    font-size: 0.98rem;
    line-height: 1.7;
    color: var(--ink-soft);
}


/* ---------------- Actions ---------------- */

.cta-popup-actions {
    display: flex;
    align-items: center;
    gap: 18px;

    margin-top: 30px;
}

.cta-popup-actions .btn {
    min-width: 145px;
    text-align: center;
}

.cta-popup-later {
    padding: 8px 0;

    border: 0;
    background: transparent;

    color: var(--ink-soft);

    font-family: var(--font-body);
    font-size: 0.88rem;

    cursor: pointer;
}

.cta-popup-later:hover {
    color: var(--ink);
    text-decoration: underline;
}


/* ---------------- Note ---------------- */

.cta-popup-note {
    margin-top: 22px;
    padding-top: 16px;

    border-top: 1px solid var(--rule);

    font-size: 0.75rem;
    color: var(--ink-soft);
}


/* =========================================================
   Popup Responsive
========================================================= */

@media (max-width: 640px) {

    .cta-popup {
        padding: 18px;
    }

    .cta-popup-card {
        padding: 38px 24px 28px;
    }

    .cta-popup-card h2 {
        font-size: 1.9rem;
    }

    .cta-popup-card > p {
        font-size: 0.9rem;
    }

    .cta-popup-actions {
        align-items: stretch;
        flex-direction: column;
        gap: 12px;
    }

    .cta-popup-actions .btn {
        width: 100%;
    }

    .cta-popup-later {
        align-self: center;
    }

}
/* =========================================
   COOKIE BANNER
========================================= */

.cookie-banner {
    position: fixed;
    left: 24px;
    bottom: 24px;
    z-index: 9998;

    width: min(420px, calc(100% - 48px));

    background: var(--paper);
    color: var(--ink);

    border: 1px solid var(--ink);

    box-shadow:
        0 16px 45px rgba(20, 24, 31, 0.16);

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transform: translateY(20px);

    transition:
        opacity 0.25s ease,
        visibility 0.25s ease,
        transform 0.25s ease;
}

.cookie-banner.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

.cookie-banner-inner {
    padding: 24px;
}

.cookie-banner-content {
    padding-right: 28px;
}

.cookie-banner-label {
    display: inline-block;

    margin-bottom: 12px;
    padding: 4px 8px;

    background: var(--mark);
    color: var(--mark-ink);

    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1;

    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.cookie-banner-content h3 {
    margin: 0 0 8px;

    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 600;
    line-height: 1.2;

    color: var(--ink);
}

.cookie-banner-content p {
    margin: 0;

    font-family: var(--font-body);
    font-size: 0.82rem;
    line-height: 1.6;

    color: var(--ink-soft);
}

.cookie-banner-link {
    display: inline-block;

    margin-top: 10px;

    color: var(--ink);
    font-size: 0.78rem;
    font-weight: 600;

    text-decoration: underline;
    text-underline-offset: 3px;
}

.cookie-banner-link:hover {
    color: var(--mark-ink);
}

.cookie-banner-actions {
    display: flex;
    align-items: center;
    gap: 10px;

    margin-top: 20px;
}

.cookie-btn {
    min-height: 38px;
    padding: 9px 18px;

    border: 1px solid var(--ink);
    border-radius: var(--radius);

    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 600;

    cursor: pointer;

    transition:
        background 0.15s ease,
        color 0.15s ease,
        border-color 0.15s ease;
}

.cookie-btn-primary {
    background: var(--ink);
    color: var(--paper);
}

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

.cookie-btn-secondary {
    background: transparent;
    color: var(--ink);
}

.cookie-btn-secondary:hover {
    background: var(--paper-alt);
}


/* =========================================
   MOBILE
========================================= */

@media (max-width: 640px) {

    .cookie-banner {
        left: 14px;
        right: 14px;
        bottom: 14px;

        width: auto;
    }

    .cookie-banner-inner {
        padding: 20px;
    }

    .cookie-banner-content {
        padding-right: 0;
    }

    .cookie-banner-content h3 {
        font-size: 1.2rem;
    }

    .cookie-banner-content p {
        font-size: 0.78rem;
    }

    .cookie-banner-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .cookie-btn {
        width: 100%;
    }
}
/* ---------------- Checking / liveness animation ---------------- */
.checking-card {
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 32px;
  background: var(--paper-alt);
  margin-top: 16px;
}

.checking-lines {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 20px;
}

.checking-line {
  position: relative;
  height: 14px;
  background: #e9e7e1;
  border-radius: 2px;
  overflow: hidden;
  width: 100%;
}

.checking-line.short { width: 60%; }

.checking-line .sweep {
  position: absolute;
  top: 0;
  left: -40%;
  width: 40%;
  height: 100%;
  background: var(--mark);
  opacity: 0.85;
  animation: sweep 1.6s ease-in-out infinite;
}

.checking-line:nth-child(2) .sweep { animation-delay: 0.15s; }
.checking-line:nth-child(3) .sweep { animation-delay: 0.3s; }

@keyframes sweep {
  0% { left: -40%; }
  100% { left: 100%; }
}

.checking-label {
  font-size: 0.9rem;
  color: var(--ink-soft);
  margin: 0;
}

.pulse-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--mark);
  margin-right: 6px;
  animation: pulse 1.2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.35; transform: scale(0.85); }
  50% { opacity: 1; transform: scale(1.1); }
}
@media (max-width: 960px) {

    .result-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .score-row {
        width: 100%;
    }

    .score-badge {
        flex: 1;
    }
}

@media (max-width: 640px) {

    .result-section {
        padding: 28px 0 55px;
    }

    .back-link {
        margin-bottom: 22px;
    }

    .result-header {
        gap: 22px;
        padding-bottom: 22px;
    }

    .result-header h1 {
        font-size: 2rem;
    }

    .score-row {
        display: grid;
        grid-template-columns: 1fr 1fr;
        width: 100%;
        gap: 9px;
    }

    .score-badge {
        min-width: 0;
        padding: 15px;
    }

    .score-num {
        font-size: 1.65rem;
    }

    .score-label {
        font-size: 0.63rem;
    }

    .ai-caveat {
        margin: 18px 0 30px;
        padding: 13px 14px;
        font-size: 0.76rem;
    }

    .section-label {
        margin-bottom: 12px;
        font-size: 0.68rem;
    }

    .result-chunk {
        padding: 20px 17px;
    }

    .result-chunk.chunk-flagged,
    .result-chunk.chunk-ai-flagged:not(.chunk-flagged) {
        padding-left: 17px;
    }

    .result-chunk.chunk-flagged::before {
        position: static;
        display: inline-block;
        margin-bottom: 9px;
    }

    .result-chunk p {
        font-size: 0.88rem;
        line-height: 1.75;
    }

    .match-note {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .match-source {
        white-space: normal;
        overflow-wrap: anywhere;
    }

    .checking-card {
        padding: 22px 18px;
    }
}

/* Very small screens */

@media (max-width: 400px) {

    .score-row {
        grid-template-columns: 1fr;
    }

    .score-badge {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 15px;
    }

    .score-label {
        margin-top: 0;
    }
}

.website-checker-page {
    width: 100%;
    padding: 70px 20px 100px;
}

.checker-container {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
}


/* Header */

.checker-header {
    text-align: center;
    max-width: 720px;
    margin: 0 auto 42px;
}

.checker-eyebrow {
    display: inline-block;
    margin-bottom: 16px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.8px;
    color: var(--brand-color, #04b2b2);
}

.checker-header h1 {
    margin: 0;
    font-size: clamp(34px, 5vw, 56px);
    line-height: 1.08;
    letter-spacing: -2px;
    font-weight: 750;
    color: var(--ink, #111);
}

.checker-header h1 span {
    display: block;
    color: var(--brand-color, #04b2b2);
}

.checker-header p {
    max-width: 620px;
    margin: 20px auto 0;
    color: #707070;
    font-size: 16px;
    line-height: 1.7;
}


/* Main card */

.checker-card {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 22px;
    padding: 30px;
    box-shadow:
        0 15px 50px rgba(0, 0, 0, 0.06);
}


/* Form */

.url-field label {
    display: block;
    margin-bottom: 9px;
    font-size: 13px;
    font-weight: 650;
    color: #222;
}

.url-input-wrap {
    position: relative;
}

.url-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;

    width: 36px;
    height: 36px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 10px;

    background: #f1fafa;
    color: var(--brand-color, #04b2b2);

    pointer-events: none;
}

.url-input-wrap input {
    width: 100%;
    height: 62px;

    padding: 0 18px 0 64px;

    border: 1px solid #ddd;
    border-radius: 14px;

    outline: none;

    background: #fafafa;

    color: #171717;

    font-size: 15px;

    transition:
        border-color .2s ease,
        box-shadow .2s ease,
        background .2s ease;
}

.url-input-wrap input:focus {
    background: #fff;

    border-color: var(--brand-color, #04b2b2);

    box-shadow:
        0 0 0 4px rgba(4, 178, 178, .10);
}

.url-input-wrap input::placeholder {
    color: #aaa;
}


/* Button */

.scan-button {
    width: 100%;
    height: 58px;

    margin-top: 16px;

    border: 0;
    border-radius: 13px;

    background: var(--brand-color, #04b2b2);
    color: #fff;

    font-size: 15px;
    font-weight: 700;

    cursor: pointer;

    display: flex;
    align-items: center;
    justify-content: center;

    transition:
        transform .2s ease,
        opacity .2s ease,
        box-shadow .2s ease;
}

.scan-button:hover {
    transform: translateY(-1px);

    box-shadow:
        0 10px 25px rgba(4, 178, 178, .22);
}

.scan-button:active {
    transform: translateY(0);
}

.scan-button:disabled {
    opacity: .75;
    cursor: wait;
}

.button-content,
.button-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
}

.button-loading {
    display: none;
}


/* Loading */

.loading-spinner {
    width: 17px;
    height: 17px;

    border: 2px solid rgba(255,255,255,.35);
    border-top-color: #fff;

    border-radius: 50%;

    animation: checkerSpin .7s linear infinite;
}

@keyframes checkerSpin {
    to {
        transform: rotate(360deg);
    }
}


/* Note */

.checker-note {
    display: flex;
    align-items: center;
    justify-content: center;

    gap: 7px;

    margin-top: 18px;

    color: #888;

    font-size: 12px;
}

.checker-note i {
    color: #04a878;
    font-size: 16px;
}


/* Errors */

.form-error {
    margin-top: 8px;
    color: #d63636;
    font-size: 12px;
}


/* Checks */

.checks-section {
    margin-top: 55px;
}

.checks-title {
    text-align: center;
    margin-bottom: 20px;

    color: #999;

    font-size: 10px;
    font-weight: 750;

    letter-spacing: 1.8px;
}

.checks-grid {
    display: grid;

    grid-template-columns:
        repeat(3, 1fr);

    gap: 15px;
}

.check-item {
    display: flex;
    gap: 14px;

    padding: 22px;

    border: 1px solid #ededed;
    border-radius: 17px;

    background: #fff;
}

.check-icon {
    flex-shrink: 0;

    width: 42px;
    height: 42px;

    border-radius: 12px;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 20px;
}

.plagiarism-icon {
    background: #f0f4ff;
    color: #5268d8;
}

.ai-icon {
    background: #f5f0ff;
    color: #8055c9;
}

.content-icon {
    background: #effaf7;
    color: #149b76;
}

.check-item h3 {
    margin: 1px 0 6px;

    font-size: 14px;
    font-weight: 700;

    color: #222;
}

.check-item p {
    margin: 0;

    color: #888;

    font-size: 12px;
    line-height: 1.55;
}


/* Example */

.example-section {
    margin-top: 30px;

    display: flex;
    align-items: center;
    justify-content: center;

    gap: 10px;

    font-size: 12px;
}

.example-label {
    display: flex;
    align-items: center;
    gap: 5px;

    color: #999;
}

.example-url {
    border: 0;
    background: transparent;

    padding: 0;

    color: var(--brand-color, #04b2b2);

    font-size: 12px;

    cursor: pointer;

    text-decoration: underline;
    text-decoration-color: rgba(4,178,178,.3);
    text-underline-offset: 3px;
}


/* Mobile */

@media (max-width: 760px) {

    .website-checker-page {
        padding: 45px 16px 70px;
    }

    .checker-header {
        margin-bottom: 30px;
    }

    .checker-header h1 {
        font-size: 35px;
        letter-spacing: -1.3px;
    }

    .checker-header p {
        font-size: 14px;
    }

    .checker-card {
        padding: 20px;
        border-radius: 18px;
    }

    .url-input-wrap input {
        height: 57px;
        font-size: 14px;
    }

    .checks-grid {
        grid-template-columns: 1fr;
    }

    .check-item {
        padding: 18px;
    }

    .example-section {
        flex-direction: column;
        gap: 6px;
    }
}
/* =========================================
   PAGE
========================================= */

.scan-page {
    width: 100%;
    padding: 65px 20px 100px;
}

.scan-container {
    width: 100%;
    max-width: 980px;
    margin: 0 auto;
}


/* =========================================
   LOADING
========================================= */

.scan-loading {
    display: flex;
    justify-content: center;
}

.scan-loading-card {
    width: 100%;
    max-width: 720px;
    text-align: center;
}

.scan-orb {
    position: relative;

    width: 130px;
    height: 130px;

    margin: 0 auto 35px;

    display: flex;
    align-items: center;
    justify-content: center;
}

.scan-orb-icon {
    position: relative;
    z-index: 5;

    width: 66px;
    height: 66px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 20px;

    background: #fff;

    color: var(--brand-color, #04b2b2);

    font-size: 30px;

    box-shadow:
        0 10px 40px rgba(0,0,0,.08);
}

.scan-ring {
    position: absolute;

    border: 1px solid rgba(4,178,178,.22);

    border-radius: 50%;
}

.ring-one {
    width: 90px;
    height: 90px;

    animation: scanPulse 2s infinite;
}

.ring-two {
    width: 115px;
    height: 115px;

    animation: scanPulse 2s .4s infinite;
}

.ring-three {
    width: 140px;
    height: 140px;

    animation: scanPulse 2s .8s infinite;
}

@keyframes scanPulse {

    0% {
        transform: scale(.85);
        opacity: .2;
    }

    50% {
        opacity: 1;
    }

    100% {
        transform: scale(1.08);
        opacity: 0;
    }
}

.scan-line {
    position: absolute;
    z-index: 8;

    width: 82px;
    height: 2px;

    background: var(--brand-color, #04b2b2);

    opacity: .7;

    box-shadow:
        0 0 12px rgba(4,178,178,.6);

    animation: scanLine 1.8s ease-in-out infinite;
}

@keyframes scanLine {

    0% {
        transform: translateY(-35px);
    }

    50% {
        transform: translateY(35px);
    }

    100% {
        transform: translateY(-35px);
    }
}

.scan-eyebrow,
.result-eyebrow,
.section-eyebrow {
    display: block;

    margin-bottom: 10px;

    color: var(--brand-color, #04b2b2);

    font-size: 10px;
    font-weight: 750;

    letter-spacing: 1.8px;
}

.scan-loading-content h1 {
    margin: 0;

    font-size: 34px;
    letter-spacing: -1.2px;
    color: #151515;
}

.scan-loading-content > p {
    margin: 12px auto 20px;

    max-width: 560px;

    color: #858585;

    font-size: 14px;
    line-height: 1.6;
}


/* URL */

.scanning-url {
    display: inline-flex;
    align-items: center;
    gap: 8px;

    max-width: 100%;

    padding: 9px 14px;

    border: 1px solid #e9e9e9;
    border-radius: 10px;

    background: #fafafa;

    color: #777;

    font-size: 12px;
}

.scanning-url span {
    max-width: 500px;

    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}


/* Progress */

.scan-progress {
    margin: 35px auto 30px;

    max-width: 650px;

    text-align: left;
}

.scan-progress-top {
    display: flex;
    justify-content: space-between;

    margin-bottom: 9px;

    color: #777;

    font-size: 11px;
    font-weight: 650;
}

.progress-track {
    height: 6px;

    overflow: hidden;

    border-radius: 20px;

    background: #eeeeee;
}

.progress-fill {
    height: 100%;

    border-radius: inherit;

    background: var(--brand-color, #04b2b2);

    transition: width .6s ease;
}


/* Steps */

.scan-steps {
    max-width: 650px;

    margin: 0 auto;

    text-align: left;

    border: 1px solid #ededed;

    border-radius: 17px;

    overflow: hidden;

    background: #fff;
}

.scan-step {
    display: flex;
    align-items: center;

    gap: 13px;

    padding: 14px 16px;

    border-bottom: 1px solid #f0f0f0;

    opacity: .45;

    transition:
        opacity .3s ease,
        background .3s ease;
}

.scan-step:last-child {
    border-bottom: 0;
}

.scan-step.active {
    opacity: 1;
    background: #fbfefe;
}

.scan-step.completed {
    opacity: 1;
}

.step-icon {
    width: 36px;
    height: 36px;

    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 10px;

    background: #f3f3f3;

    color: #888;
}

.scan-step.active .step-icon {
    background: #e9fafa;
    color: var(--brand-color, #04b2b2);
}

.scan-step.completed .step-icon {
    background: #eaf8f2;
    color: #149b76;
}

.step-text {
    flex: 1;
}

.step-text strong {
    display: block;

    color: #333;

    font-size: 12px;
}

.step-text span {
    display: block;

    margin-top: 2px;

    color: #999;

    font-size: 11px;
}

.step-status {
    width: 20px;
    height: 20px;

    display: flex;
    align-items: center;
    justify-content: center;
}

.step-spinner {
    width: 15px;
    height: 15px;

    border: 2px solid #d5eeee;
    border-top-color: var(--brand-color, #04b2b2);

    border-radius: 50%;

    animation: checkerSpin .7s linear infinite;
}

.scan-step.completed .step-status::after {
    content: "✓";

    display: flex;
    align-items: center;
    justify-content: center;

    width: 20px;
    height: 20px;

    border-radius: 50%;

    background: #eaf8f2;

    color: #149b76;

    font-size: 11px;
    font-weight: 700;
}


/* =========================================
   RESULT
========================================= */

.result-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;

    gap: 30px;

    margin-bottom: 32px;
}

.result-header h1 {
    margin: 0 0 10px;

    color: #151515;

    font-size: 38px;
    line-height: 1.1;

    letter-spacing: -1.5px;
}

.result-url {
    display: flex;
    align-items: center;
    gap: 7px;

    max-width: 650px;

    color: #888;

    font-size: 12px;
}

.result-url a {
    overflow: hidden;

    color: #777;

    text-overflow: ellipsis;
    white-space: nowrap;

    text-decoration: none;
}

.result-url a:hover {
    color: var(--brand-color, #04b2b2);
}

.new-scan-button,
.try-again-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 8px;

    padding: 11px 16px;

    border-radius: 10px;

    background: #151515;
    color: #fff;

    font-size: 12px;
    font-weight: 650;

    text-decoration: none;

    white-space: nowrap;

    transition: transform .2s ease;
}

.new-scan-button:hover,
.try-again-button:hover {
    transform: translateY(-1px);
}


/* Score grid */

.score-grid {
    display: grid;

    grid-template-columns:
        repeat(3, 1fr);

    gap: 16px;
}

.score-card {
    padding: 23px;

    border: 1px solid #e8e8e8;

    border-radius: 18px;

    background: #fff;

    box-shadow:
        0 8px 30px rgba(0,0,0,.035);
}

.score-card-top {
    display: flex;
    align-items: center;

    gap: 10px;

    margin-bottom: 22px;
}

.score-icon {
    width: 38px;
    height: 38px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 11px;

    font-size: 18px;
}

.originality-card .score-icon {
    background: #eef2ff;
    color: #5268d8;
}

.ai-card .score-icon {
    background: #f5efff;
    color: #8055c9;
}

.content-card .score-icon {
    background: #edf9f5;
    color: #149b76;
}

.score-label {
    color: #999;

    font-size: 9px;
    font-weight: 750;

    letter-spacing: 1.3px;
}

.score-number-row {
    display: flex;
    align-items: baseline;

    gap: 7px;
}

.score-number-row strong {
    color: #171717;

    font-size: 39px;
    line-height: 1;

    letter-spacing: -1.5px;
}

.score-number-row span {
    color: #999;

    font-size: 11px;
}

.score-bar {
    height: 5px;

    margin: 18px 0 14px;

    overflow: hidden;

    border-radius: 10px;

    background: #eeeeee;
}

.score-bar-fill {
    height: 100%;

    border-radius: inherit;

    transition: width .7s ease;
}

.originality-fill {
    background: #5268d8;
}

.ai-fill {
    background: #8055c9;
}

.score-card p {
    margin: 0;

    color: #999;

    font-size: 11px;
    line-height: 1.55;
}

.content-stat {
    margin: 17px 0 14px;

    font-size: 11px;
    color: #149b76;
}

.content-stat span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}


/* Results section */

.results-section {
    margin-top: 45px;
}

.section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;

    margin-bottom: 18px;
}

.section-heading h2 {
    margin: 0;

    color: #171717;

    font-size: 22px;
    letter-spacing: -.5px;
}

.section-heading .section-eyebrow {
    margin-bottom: 5px;
}

.match-count {
    color: #999;

    font-size: 11px;
}


/* Match */

.matches-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.match-card {
    display: flex;
    align-items: center;

    gap: 15px;

    padding: 17px;

    border: 1px solid #e8e8e8;

    border-radius: 14px;

    background: #fff;
}

.match-card-icon {
    width: 40px;
    height: 40px;

    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 11px;

    background: #f3f4ff;

    color: #5268d8;
}

.match-content {
    flex: 1;

    min-width: 0;
}

.match-source {
    display: inline-flex;
    align-items: center;
    gap: 5px;

    max-width: 100%;

    color: #333;

    font-size: 12px;
    font-weight: 650;

    text-decoration: none;

    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.match-source:hover {
    color: var(--brand-color, #04b2b2);
}

.match-content p {
    margin: 5px 0 0;

    color: #999;

    font-size: 11px;
    line-height: 1.5;
}

.match-percent {
    min-width: 75px;

    text-align: right;
}

.match-percent strong {
    display: block;

    color: #5268d8;

    font-size: 16px;
}

.match-percent span {
    color: #aaa;

    font-size: 9px;
}


/* No matches */

.no-matches {
    display: flex;
    align-items: center;

    gap: 15px;

    padding: 22px;

    border: 1px solid #e5eee9;

    border-radius: 15px;

    background: #fbfefc;
}

.no-match-icon {
    width: 40px;
    height: 40px;

    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: #e8f8f0;

    color: #149b76;
}

.no-matches strong {
    display: block;

    color: #333;

    font-size: 13px;
}

.no-matches p {
    margin: 4px 0 0;

    color: #999;

    font-size: 11px;
}


/* AI notice */

.ai-notice {
    display: flex;

    gap: 13px;

    margin-top: 30px;

    padding: 18px;

    border: 1px solid #e7e2f2;

    border-radius: 14px;

    background: #fbfaff;
}

.ai-notice-icon {
    width: 34px;
    height: 34px;

    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 9px;

    background: #eee7fb;

    color: #8055c9;
}

.ai-notice strong {
    display: block;

    color: #4d4160;

    font-size: 12px;
}

.ai-notice p {
    margin: 5px 0 0;

    color: #8c8398;

    font-size: 11px;
    line-height: 1.6;
}


/* Report footer */

.report-footer {
    display: flex;
    justify-content: space-between;

    margin-top: 25px;
    padding-top: 18px;

    border-top: 1px solid #ededed;

    color: #aaa;

    font-size: 10px;
}

.report-footer span {
    display: flex;
    align-items: center;
    gap: 5px;
}


/* =========================================
   FAILED
========================================= */

.scan-failed {
    display: flex;
    justify-content: center;
}

.failed-card {
    width: 100%;
    max-width: 600px;

    padding: 55px 35px;

    text-align: center;

    border: 1px solid #eee;

    border-radius: 22px;

    background: #fff;
}

.failed-icon {
    width: 62px;
    height: 62px;

    margin: 0 auto 20px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 18px;

    background: #fff1f1;

    color: #d54a4a;

    font-size: 28px;
}

.failed-card h1 {
    margin: 0;

    color: #222;

    font-size: 27px;

    letter-spacing: -.7px;
}

.failed-card p {
    max-width: 500px;

    margin: 12px auto 25px;

    color: #999;

    font-size: 13px;

    line-height: 1.6;
}


/* =========================================
   ANIMATION
========================================= */

@keyframes checkerSpin {

    to {
        transform: rotate(360deg);
    }
}


/* =========================================
   MOBILE
========================================= */

@media (max-width: 800px) {

    .scan-page {
        padding: 45px 16px 70px;
    }

    .score-grid {
        grid-template-columns: 1fr;
    }

    .result-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 20px;
    }

    .result-header h1 {
        font-size: 31px;
    }

    .new-scan-button {
        width: 100%;
    }

    .match-card {
        align-items: flex-start;
    }

    .match-percent {
        min-width: 60px;
    }
}


@media (max-width: 560px) {

    .scan-loading-content h1 {
        font-size: 28px;
    }

    .scan-orb {
        margin-bottom: 25px;
    }

    .scan-step {
        padding: 12px;
    }

    .step-text span {
        font-size: 10px;
    }

    .match-card {
        display: grid;

        grid-template-columns: 40px 1fr;
    }

    .match-percent {
        grid-column: 2;

        text-align: left;
    }

    .ai-notice {
        align-items: flex-start;
    }

    .report-footer {
        flex-direction: column;
        gap: 7px;
    }

}


.code-input {
  width: 100%;
  padding: 14px 12px;
  margin-bottom: 14px;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-size: 1.6rem;
  letter-spacing: 8px;
  text-align: center;
}

.btn-link {
  background: none;
  border: none;
  color: var(--ink-soft);
  font-size: 0.9rem;
  text-decoration: underline;
  cursor: pointer;
  padding: 8px 0;
}

.btn-danger-solid {
  background: var(--flagged);
  color: #fff;
  border: none;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-weight: 600;
  cursor: pointer;
  margin-top:10px;
}

.btn-danger-solid:hover { background: #a3390f; }

.account-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 24px;
}

.account-link {
  display: block;
  padding: 14px 16px;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
}

.account-link:hover { background: var(--paper-alt); }

.account-link-danger { color: var(--flagged); border-color: #f0c4b0; }

.billing-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  padding: 24px 0;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 20px;
}

.billing-label {
  display: block;
  font-size: 0.8rem;
  color: var(--ink-soft);
  margin-bottom: 4px;
}

.billing-value {
  display: block;
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--ink);
}

.billing-actions {
  display: flex;
  gap: 12px;
  margin-bottom: 40px;
}
.billing-sublabel {
  display: block;
  font-size: 0.78rem;
  color: var(--ink-soft);
  margin-top: 2px;
}

/* Base banner */
    .testing-banner {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      z-index: 9999;

      display: flex;
      align-items: center;
      justify-content: center;
      gap: 16px;

      padding: 12px 50px 12px 20px;
      background: #fff3cd;
      color: #664d03;
      border-bottom: 1px solid #ffecb5;

      font-family: Arial, sans-serif;
      font-size: 15px;
      line-height: 1.4;

      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    }

    .testing-banner strong {
      font-weight: 700;
    }

    /* Close button */
    .testing-banner__close {
      position: absolute;
      right: 16px;
      top: 50%;
      transform: translateY(-50%);

      width: 30px;
      height: 30px;

      border: 0;
      border-radius: 50%;
      background: transparent;
      color: #664d03;

      font-size: 22px;
      line-height: 1;
      cursor: pointer;
    }

    .testing-banner__close:hover {
      background: rgba(0, 0, 0, 0.08);
    }

    .testing-banner__close:focus-visible {
      outline: 2px solid #664d03;
      outline-offset: 2px;
    }

    /* Mobile */
    @media (max-width: 600px) {
      .testing-banner {
        justify-content: flex-start;
        padding: 12px 50px 12px 16px;
        font-size: 14px;
      }
    }