:root {
    --ink: #1a2332;
    --ink-soft: #3b4a5e;
    --paper: #fdfbf7;
    --paper-warm: #f5efe4;
    --accent: #c85a3a;
    --accent-soft: #f4d9cf;
    --line: #e3dccd;
    --shadow: 0 2px 24px rgba(26, 35, 50, 0.06);
    --shadow-lifted: 0 8px 36px rgba(26, 35, 50, 0.1);
    --serif: ui-serif, Georgia, "Iowan Old Style", "Apple Garamond", Cambria, "Times New Roman", serif;
    --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--sans);
    font-size: 18px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

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

.container.narrow {
    max-width: 720px;
}

/* ---------- HERO ---------- */

.hero {
    background:
        radial-gradient(ellipse at 80% 0%, rgba(200, 90, 58, 0.08) 0%, transparent 60%),
        radial-gradient(ellipse at 0% 100%, rgba(26, 35, 50, 0.05) 0%, transparent 50%),
        var(--paper-warm);
    padding: 96px 0 112px;
    border-bottom: 1px solid var(--line);
}

.hero .container {
    max-width: 820px;
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 13px;
    font-weight: 600;
    color: var(--accent);
    margin: 0 0 20px;
}

.hero h1 {
    font-family: var(--serif);
    font-size: clamp(36px, 5.5vw, 60px);
    line-height: 1.1;
    font-weight: 600;
    margin: 0 0 28px;
    letter-spacing: -0.01em;
}

.accent {
    color: var(--accent);
    font-style: italic;
    font-weight: 500;
}

.lede {
    font-size: clamp(18px, 2vw, 21px);
    color: var(--ink-soft);
    margin: 0 0 36px;
    max-width: 640px;
}

.cta {
    display: inline-block;
    padding: 14px 26px;
    background: var(--ink);
    color: var(--paper);
    text-decoration: none;
    font-weight: 600;
    border-radius: 999px;
    font-size: 16px;
    transition: transform 0.15s ease, background 0.15s ease;
}

.cta:hover {
    background: var(--accent);
    transform: translateY(-1px);
}

/* ---------- SECTIONS ---------- */

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

.section.alt {
    background: var(--paper-warm);
}

.section.dark {
    background: var(--ink);
    color: var(--paper);
}

.section.dark h2,
.section.dark strong {
    color: var(--paper);
}

.step {
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 12px;
    font-weight: 700;
    color: var(--accent);
    margin: 0 0 16px;
}

.step.light {
    color: var(--accent-soft);
}

h2 {
    font-family: var(--serif);
    font-size: clamp(28px, 3.4vw, 38px);
    font-weight: 600;
    line-height: 1.2;
    margin: 0 0 24px;
    letter-spacing: -0.01em;
}

h2.centered {
    text-align: center;
}

.subtitle {
    text-align: center;
    color: var(--ink-soft);
    margin-top: -8px;
    margin-bottom: 40px;
}

p {
    margin: 0 0 18px;
}

.aside {
    font-size: 16px;
    color: var(--ink-soft);
    border-left: 3px solid var(--accent);
    padding: 4px 0 4px 18px;
    margin: 28px 0;
    font-style: italic;
}

.section.dark .aside {
    color: var(--accent-soft);
    border-left-color: var(--accent);
}

.callout {
    margin: 32px 0 0;
    padding: 24px 28px;
    background: var(--paper-warm);
    border-left: 4px solid var(--accent);
    border-radius: 4px;
}

.section.alt .callout {
    background: var(--paper);
}

.callout p {
    margin: 0;
}

.bullets {
    padding-left: 22px;
    margin: 0 0 24px;
}

.bullets li {
    margin-bottom: 8px;
}

/* ---------- DEMO (chat phone) ---------- */

.demo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    margin: 32px 0 24px;
}

.phone {
    width: 100%;
    max-width: 360px;
    background: #ece5d8;
    border-radius: 28px;
    box-shadow: var(--shadow-lifted);
    overflow: hidden;
    border: 1px solid var(--line);
    transition: background 0.4s ease;
}

.phone-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: #075e54;
    color: white;
}

.phone-back {
    font-size: 22px;
    line-height: 1;
}

.phone-title {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.phone-title strong {
    font-size: 15px;
    color: white;
}

.phone-title span {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.75);
}

.phone-body {
    padding: 16px 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 360px;
    background:
        radial-gradient(ellipse at 50% 0%, rgba(0,0,0,0.02) 0%, transparent 60%),
        #ece5d8;
    transition: background 0.4s ease;
}

.bubble {
    background: white;
    padding: 9px 12px 10px;
    border-radius: 8px 8px 8px 2px;
    max-width: 85%;
    font-size: 14.5px;
    line-height: 1.45;
    box-shadow: 0 1px 1px rgba(0,0,0,0.08);
    position: relative;
    transition: all 0.3s ease;
}

.bubble .from {
    display: block;
    color: #d6336c;
    font-weight: 600;
    font-size: 12.5px;
    margin-bottom: 2px;
}

.phone-footer {
    background: white;
    padding: 12px 18px;
    color: #999;
    font-size: 13.5px;
    border-top: 1px solid #ddd;
}

/* Agent view state */
.phone.agent-view {
    background: #14202e;
}

.phone.agent-view .phone-header {
    background: var(--accent);
}

.phone.agent-view .phone-body {
    background: #14202e;
}

.phone.agent-view .phone-footer {
    background: #14202e;
    color: #6b7a8d;
    border-top: 1px solid #2a3a4f;
}

.phone.agent-view .bubble {
    background: #1f2d3f;
    color: #e3e9f0;
    border: 1px solid rgba(200, 90, 58, 0.4);
    box-shadow: none;
    border-radius: 6px;
}

.phone.agent-view .bubble .from {
    color: var(--accent-soft);
}

.phone.agent-view .bubble::after {
    content: "▸ extracted: " attr(data-pii);
    display: block;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed rgba(200, 90, 58, 0.5);
    font-size: 11.5px;
    font-family: ui-monospace, Menlo, monospace;
    color: var(--accent);
    letter-spacing: 0.02em;
}

.view-toggle {
    background: var(--ink);
    color: var(--paper);
    border: none;
    padding: 12px 24px;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.2s ease, transform 0.15s ease;
}

.view-toggle:hover {
    background: var(--accent);
    transform: translateY(-1px);
}

.view-toggle.active {
    background: var(--accent);
}

.caption {
    text-align: center;
    color: var(--ink-soft);
    font-size: 15px;
    max-width: 540px;
    margin: 8px auto 0;
    font-style: italic;
    transition: color 0.3s ease;
}

/* ---------- EVIDENCE CARDS ---------- */

.evidence {
    display: grid;
    gap: 18px;
    margin: 32px 0;
}

@media (min-width: 720px) {
    .evidence {
        grid-template-columns: 1fr 1fr 1fr;
    }
}

.evidence-card {
    padding: 22px 24px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.section.alt .evidence-card {
    background: var(--paper-warm);
}

.evidence-card h3 {
    font-family: var(--serif);
    font-size: 18px;
    margin: 0 0 10px;
    color: var(--accent);
    font-weight: 600;
}

.evidence-card p {
    font-size: 15.5px;
    line-height: 1.55;
    margin: 0;
    color: var(--ink-soft);
}

/* ---------- ACTIONS LIST ---------- */

.actions {
    list-style: none;
    counter-reset: action;
    padding: 0;
    margin: 32px 0 0;
}

.actions li {
    counter-increment: action;
    position: relative;
    padding: 22px 24px 22px 76px;
    margin-bottom: 14px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 10px;
    border-left: 3px solid var(--accent);
}

.actions li::before {
    content: counter(action);
    position: absolute;
    left: 24px;
    top: 22px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent);
    color: white;
    border-radius: 50%;
    font-weight: 700;
    font-family: var(--serif);
    font-size: 17px;
}

.actions strong {
    display: block;
    margin-bottom: 4px;
    font-size: 17px;
}

/* ---------- FAQ ---------- */

.faq {
    margin-top: 24px;
}

.faq details {
    border-bottom: 1px solid var(--line);
    padding: 18px 0;
}

.faq details:first-of-type {
    border-top: 1px solid var(--line);
}

.faq summary {
    cursor: pointer;
    font-weight: 600;
    font-size: 17px;
    color: var(--ink);
    list-style: none;
    position: relative;
    padding-right: 32px;
    transition: color 0.15s ease;
}

.faq summary:hover {
    color: var(--accent);
}

.faq summary::-webkit-details-marker {
    display: none;
}

.faq summary::after {
    content: "+";
    position: absolute;
    right: 0;
    top: -2px;
    font-size: 24px;
    font-weight: 300;
    color: var(--accent);
    transition: transform 0.2s ease;
}

.faq details[open] summary::after {
    transform: rotate(45deg);
}

.faq details p {
    margin: 14px 0 0;
    color: var(--ink-soft);
    font-size: 16.5px;
}

/* ---------- SOURCES ---------- */

.sources-intro {
    color: var(--ink-soft);
}

.sources {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sources li {
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
}

.sources li:last-child {
    border-bottom: none;
}

.sources a {
    color: var(--ink);
    text-decoration: none;
    border-bottom: 1px solid var(--accent);
    padding-bottom: 1px;
    transition: color 0.15s ease;
}

.sources a:hover {
    color: var(--accent);
}

/* ---------- FOOTER ---------- */

footer {
    padding: 40px 0 56px;
    background: var(--paper-warm);
    text-align: center;
    color: var(--ink-soft);
    font-size: 14.5px;
    border-top: 1px solid var(--line);
}

footer p {
    margin: 0;
}

/* ---------- REVEAL ANIMATION ---------- */

.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.in {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    html {
        scroll-behavior: auto;
    }
}

/* ---------- MOBILE ---------- */

@media (max-width: 600px) {
    body {
        font-size: 17px;
    }
    .hero {
        padding: 64px 0 80px;
    }
    .section {
        padding: 64px 0;
    }
    .actions li {
        padding: 18px 18px 18px 64px;
    }
    .actions li::before {
        left: 16px;
        top: 18px;
    }
}

/* ---------- STORY & INJECTION STYLES ---------- */

/* The Incoming WhatsApp Message */
.story-bubble {
    background: white;
    padding: 16px 20px;
    border-radius: 12px;
    border-bottom-left-radius: 2px;
    margin: 24px 0;
    max-width: 90%;
    box-shadow: var(--shadow);
    border: 1px solid var(--line);
}

.story-bubble .from {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: var(--ink-soft);
    margin-bottom: 4px;
}

.muted {
    opacity: 0.5;
}

/* The Mock Browser Window */
.injection-card {
    background: white;
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
    margin: 32px 0 12px;
    box-shadow: var(--shadow-lifted);
}

.injection-header {
    background: var(--paper-warm);
    padding: 10px 16px;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    gap: 6px;
}

.injection-header .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--line);
}

.injection-header .url {
    margin-left: 12px;
    font-family: ui-monospace, monospace;
    font-size: 13px;
    color: var(--ink-soft);
}

.injection-body {
    padding: 24px;
}

.page-title {
    font-family: var(--serif);
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 12px;
}

.page-text {
    font-size: 16px;
    color: var(--ink-soft);
}

/* The Hidden Prompt Injection Text */
.hidden-text {
    margin-top: 20px;
    padding: 16px;
    background: #fff5f5; /* Light red alert bg */
    border: 1px dashed var(--accent);
    border-radius: 8px;
    color: var(--accent);
    font-family: ui-monospace, monospace;
    font-size: 14px;
    font-weight: 600;
    display: none; /* Hidden by default */
}

/* State when revealed via JS */
.injection-card.revealed .hidden-text {
    display: block;
    animation: fadeIn 0.4s ease;
}

/* The Action Button */
.reveal-btn {
    background: var(--ink);
    color: var(--paper);
    border: none;
    padding: 10px 20px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 32px;
    transition: all 0.2s ease;
}

.reveal-btn:hover {
    background: var(--accent);
}

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

/* ---------- MESSAGE GENERATOR ---------- */

.msg-form {
    margin: 32px 0 28px;
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.pill-group {
    border: none;
    padding: 0;
    margin: 0;
}

.pill-group legend {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--ink-soft);
    margin-bottom: 12px;
    padding: 0;
}

.pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

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

.pills label {
    display: inline-block;
    padding: 9px 18px;
    border: 1px solid var(--line);
    background: var(--paper);
    border-radius: 999px;
    font-size: 14.5px;
    font-weight: 500;
    color: var(--ink-soft);
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
    user-select: none;
}

.pills label:hover {
    border-color: var(--accent);
    color: var(--ink);
}

.pills input[type="radio"]:checked + label {
    background: var(--ink);
    color: var(--paper);
    border-color: var(--ink);
}

.pills input[type="radio"]:focus-visible + label {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.msg-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    color: var(--ink-soft);
    cursor: pointer;
    user-select: none;
}

.msg-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--accent);
    cursor: pointer;
}

.msg-card {
    background: var(--paper-warm);
    border: 1px solid var(--line);
    border-left: 4px solid var(--accent);
    border-radius: 10px;
    padding: 26px 28px 22px;
    margin: 8px 0 14px;
    box-shadow: var(--shadow);
}

.msg-output {
    font-size: 16.5px;
    line-height: 1.6;
    margin: 0 0 20px;
    color: var(--ink);
    white-space: pre-wrap;
}

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

.msg-btn {
    border: none;
    padding: 10px 20px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, transform 0.1s ease;
}

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

.msg-btn.primary:hover {
    background: var(--accent);
}

.msg-btn.primary.copied {
    background: #2f7a4f;
}

.msg-btn.ghost {
    background: transparent;
    color: var(--ink-soft);
    border: 1px solid var(--line);
}

.msg-btn.ghost:hover {
    color: var(--ink);
    border-color: var(--accent);
}

.msg-btn:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.msg-hint {
    font-size: 14px;
    color: var(--ink-soft);
    font-style: italic;
    margin: 0;
}

@media (max-width: 600px) {
    .msg-card {
        padding: 22px 20px 18px;
    }
    .msg-actions {
        flex-direction: column;
        align-items: stretch;
    }
    .msg-btn {
        width: 100%;
    }
}