/* ============================================================
   Report URI Demo Site — Main Stylesheet
   ============================================================ */

/* ------------------------------------------------------------
   CSS Custom Properties
   ------------------------------------------------------------ */
:root {
    --brand:          #fa4616;
    --brand-dark:     #c73810;
    --brand-light:    #fff2ee;
    --dark:           #161c2d;
    --text:           #212529;
    --text-muted:     #6b7280;
    --bg:             #ffffff;
    --bg-subtle:      #f8f9fa;
    --border:         #e5e7eb;

    --danger:         #dc2626;
    --danger-dark:    #991b1b;
    --danger-bg:      #fef2f2;
    --danger-border:  #fecaca;

    --success:        #16a34a;
    --success-dark:   #14532d;
    --success-bg:     #f0fdf4;
    --success-border: #bbf7d0;

    --warning:        #d97706;
    --warning-bg:     #fffbeb;
    --warning-border: #fde68a;

    --font:      -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    --font-mono: 'SF Mono', 'Fira Code', 'Fira Mono', Consolas, 'Liberation Mono', monospace;

    --radius:    6px;
    --radius-lg: 12px;
    --shadow:    0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
    --shadow-md: 0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.06);
    --shadow-lg: 0 10px 15px rgba(0,0,0,.1), 0 4px 6px rgba(0,0,0,.05);

    --nav-height: 60px;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
code, pre { font-family: var(--font-mono); }

/* ------------------------------------------------------------
   Layout
   ------------------------------------------------------------ */
.container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

.container--narrow { max-width: 760px; }
.container--wide   { max-width: 1300px; }

/* ------------------------------------------------------------
   Typography
   ------------------------------------------------------------ */
h1, h2, h3, h4, h5 {
    color: var(--dark);
    line-height: 1.2;
    font-weight: 700;
}

h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.05rem; }

p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

.lead {
    font-size: 1.15rem;
    color: var(--text-muted);
    line-height: 1.7;
}

.text-muted  { color: var(--text-muted); }
.text-brand  { color: var(--brand); }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.text-center { text-align: center; }

/* ------------------------------------------------------------
   Navigation
   ------------------------------------------------------------ */
.nav {
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--nav-height);
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.nav__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.nav__brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1rem;
    color: var(--dark);
    text-decoration: none;
}

.nav__brand:hover { text-decoration: none; }

.nav__brand-logo {
    height: 28px;
    width: auto;
}

.nav__brand-divider {
    width: 1px;
    height: 20px;
    background: var(--border);
}

.nav__brand-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.02em;
}

.nav__menu {
    position: relative;
}

.nav__links {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 220px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    flex-direction: column;
    padding: 6px;
    gap: 2px;
    z-index: 99;
    list-style: none;
}

.nav__links.is-open { display: flex; }

.nav__links a {
    display: block;
    padding: 10px 12px;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-muted);
    border-radius: var(--radius);
    transition: color .15s, background .15s;
    text-decoration: none;
}

.nav__links a:hover,
.nav__links a.active {
    color: var(--brand);
    background: var(--brand-light);
}

.nav__hamburger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    border-radius: var(--radius);
    transition: background .15s;
}

.nav__hamburger:hover { background: var(--bg-subtle); }

.nav__hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: transform .2s, opacity .2s;
    transform-origin: center;
}

.nav__hamburger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__hamburger.is-open span:nth-child(2) { opacity: 0; }
.nav__hamburger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ------------------------------------------------------------
   Footer
   ------------------------------------------------------------ */
.footer {
    margin-top: auto;
    padding: 32px 0;
    border-top: 1px solid var(--border);
    background: var(--bg-subtle);
}

.footer__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.footer__copy {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.footer__links {
    display: flex;
    gap: 20px;
    list-style: none;
}

.footer__links a {
    font-size: 0.85rem;
    color: var(--text-muted);
    transition: color .15s;
}

.footer__links a:hover { color: var(--brand); text-decoration: none; }

/* ------------------------------------------------------------
   Buttons
   ------------------------------------------------------------ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: var(--radius);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all .15s;
    text-decoration: none;
    line-height: 1;
    white-space: nowrap;
}

.btn:hover { text-decoration: none; }

.btn--primary {
    background: var(--brand);
    color: #fff;
    border-color: var(--brand);
}
.btn--primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }

.btn--outline {
    background: transparent;
    color: var(--brand);
    border-color: var(--brand);
}
.btn--outline:hover { background: var(--brand); color: #fff; }

.btn--danger {
    background: var(--danger);
    color: #fff;
    border-color: var(--danger);
}
.btn--danger:hover { background: var(--danger-dark); border-color: var(--danger-dark); color: #fff; }

.btn--success {
    background: var(--success);
    color: #fff;
    border-color: var(--success);
}
.btn--success:hover { background: var(--success-dark); border-color: var(--success-dark); color: #fff; }

.btn--ghost {
    background: transparent;
    color: var(--text-muted);
    border-color: var(--border);
}
.btn--ghost:hover { background: var(--bg-subtle); color: var(--text); }

.btn--sm { padding: 6px 14px; font-size: 0.8rem; }
.btn--lg { padding: 14px 28px; font-size: 1rem; }

/* ------------------------------------------------------------
   Badges / Pills
   ------------------------------------------------------------ */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 100px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.badge--brand   { background: var(--brand-light); color: var(--brand); }
.badge--danger  { background: var(--danger-bg);   color: var(--danger); }
.badge--success { background: var(--success-bg);  color: var(--success); }
.badge--neutral { background: var(--bg-subtle);   color: var(--text-muted); border: 1px solid var(--border); }

/* ------------------------------------------------------------
   Cards
   ------------------------------------------------------------ */
.card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.card__body  { padding: 24px; }
.card__header {
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.card__title { font-size: 0.9rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }

/* ------------------------------------------------------------
   Alerts
   ------------------------------------------------------------ */
.alert {
    padding: 14px 18px;
    border-radius: var(--radius);
    border-left: 4px solid;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.alert--danger  { background: var(--danger-bg);  border-color: var(--danger);  color: var(--danger-dark); }
.alert--success { background: var(--success-bg); border-color: var(--success); color: var(--success-dark); }
.alert--warning { background: var(--warning-bg); border-color: var(--warning); color: var(--warning); }
.alert--info    { background: var(--brand-light); border-color: var(--brand);   color: var(--brand-dark); }

/* ------------------------------------------------------------
   Code blocks
   ------------------------------------------------------------ */
code {
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 0.85em;
    color: var(--brand-dark);
}

pre {
    background: var(--dark);
    color: #e2e8f0;
    border-radius: var(--radius);
    padding: 20px;
    overflow-x: auto;
    font-size: 0.85rem;
    line-height: 1.6;
}

pre code {
    background: none;
    border: none;
    padding: 0;
    color: inherit;
    font-size: inherit;
}

/* ------------------------------------------------------------
   Demo layout — shared across all demo pages
   ------------------------------------------------------------ */
.demo-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.demo-header {
    padding: 40px 0 32px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-subtle);
}

.demo-header__meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.demo-header__back {
    font-size: 0.85rem;
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.demo-header__back:hover { color: var(--brand); text-decoration: none; }

.demo-header__title { margin-bottom: 8px; }

.demo-header__desc {
    font-size: 1.05rem;
    color: var(--text-muted);
    max-width: 640px;
}

.demo-toggle {
    display: inline-flex;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    margin-top: 20px;
    box-shadow: var(--shadow);
}

.demo-toggle__btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .15s;
    border: none;
    background: var(--bg);
    color: var(--text-muted);
    text-decoration: none;
}

.demo-toggle__btn:hover { text-decoration: none; }

.demo-toggle__btn--active.is-danger {
    background: var(--danger);
    color: #fff;
}

.demo-toggle__btn--active.is-success {
    background: var(--success);
    color: #fff;
}

.demo-toggle__btn + .demo-toggle__btn {
    border-left: 1px solid var(--border);
}

/* Protected/unprotected state indicator */
.state-banner {
    padding: 10px 0;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.03em;
}

.state-banner--danger  { background: var(--danger);  color: #fff; }
.state-banner--success { background: var(--success); color: #fff; }

/* ------------------------------------------------------------
   CSP / PP Violation Banner
   ------------------------------------------------------------ */
#csp-violation-banner,
#pp-violation-banner {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    max-width: 380px;
    width: calc(100% - 48px);
    background: var(--dark);
    color: #fff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    display: none;
    animation: slide-up .3s ease;
}

@keyframes slide-up {
    from { transform: translateY(20px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

.violation-banner__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: var(--success);
}

.violation-banner__title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 700;
}

.violation-banner__count {
    background: rgba(255,255,255,0.25);
    border-radius: 100px;
    padding: 2px 8px;
    font-size: 0.8rem;
    font-weight: 700;
    min-width: 24px;
    text-align: center;
}

.violation-banner__close {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    font-size: 1.1rem;
    opacity: 0.8;
    padding: 0;
    line-height: 1;
}

.violation-banner__close:hover { opacity: 1; }

.violation-banner__list {
    max-height: 240px;
    overflow-y: auto;
    padding: 12px 16px;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.violation-banner__item {
    font-size: 0.8rem;
    line-height: 1.4;
    padding: 8px 10px;
    background: rgba(255,255,255,0.07);
    border-radius: var(--radius);
    border-left: 3px solid var(--success);
}

.violation-banner__item-directive {
    font-weight: 700;
    color: #86efac;
    font-family: var(--font-mono);
    font-size: 0.75rem;
}

.violation-banner__item-url {
    color: #9ca3af;
    font-family: var(--font-mono);
    font-size: 0.73rem;
    word-break: break-all;
    margin-top: 2px;
}

/* ------------------------------------------------------------
   Demo scene containers
   ------------------------------------------------------------ */
.demo-content {
    padding: 40px 0;
    flex: 1;
}

.demo-scene {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    margin-bottom: 32px;
}

.demo-scene--danger  { border-color: var(--danger-border); }
.demo-scene--success { border-color: var(--success-border); }

.demo-scene__bar {
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.03em;
}

.demo-scene__bar--danger  { background: var(--danger-bg);  color: var(--danger); }
.demo-scene__bar--success { background: var(--success-bg); color: var(--success); }

.demo-scene__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.demo-scene__dot--danger  { background: var(--danger);  animation: pulse-danger 1.5s infinite; }
.demo-scene__dot--success { background: var(--success); }

@keyframes pulse-danger {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.4; }
}

.demo-scene__body { padding: 32px; }

/* Explanation panel below each demo scene */
.demo-explanation {
    padding: 24px;
    background: var(--bg-subtle);
    border-top: 1px solid var(--border);
}

.demo-explanation__heading {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.demo-explanation p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 0;
}

/* ------------------------------------------------------------
   Forms (used in demos)
   ------------------------------------------------------------ */
.form-group { margin-bottom: 16px; }

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
}

.form-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-family: var(--font);
    color: var(--text);
    background: var(--bg);
    transition: border-color .15s, box-shadow .15s;
    outline: none;
}

.form-input:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(250,70,22,.1);
}

/* ------------------------------------------------------------
   404 page
   ------------------------------------------------------------ */
.error-page {
    text-align: center;
    padding: 80px 0;
}

.error-page__code {
    font-size: clamp(5rem, 20vw, 9rem);
    font-weight: 900;
    color: var(--brand);
    line-height: 1;
    margin-bottom: 16px;
    opacity: 0.2;
}

.error-page__title {
    font-size: clamp(1.5rem, 4vw, 2.2rem);
    margin-bottom: 12px;
}

.error-page__desc {
    color: var(--text-muted);
    max-width: 480px;
    margin: 0 auto 32px;
}

.error-page__actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

/* ------------------------------------------------------------
   Homepage — Hero
   ------------------------------------------------------------ */
.hero {
    padding: 80px 0 72px;
    text-align: center;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(180deg, var(--bg-subtle) 0%, var(--bg) 100%);
}

.hero__eyebrow {
    margin-bottom: 16px;
}

.hero__title {
    margin-bottom: 20px;
}

.hero__title span {
    color: var(--brand);
}

.hero__desc {
    max-width: 560px;
    margin: 0 auto 32px;
}

.hero__actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ------------------------------------------------------------
   Homepage — Demo grid
   ------------------------------------------------------------ */
.demos-section {
    padding: 64px 0;
}

.section-heading {
    margin-bottom: 40px;
}

.section-heading h2 { margin-bottom: 8px; }

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

.demo-card {
    display: flex;
    flex-direction: column;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: box-shadow .2s, transform .2s;
    text-decoration: none;
    color: inherit;
}

.demo-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
    text-decoration: none;
    color: inherit;
}

.demo-card__icon {
    padding: 24px 24px 0;
    font-size: 2rem;
}

.demo-card__body { padding: 16px 24px 24px; flex: 1; }

.demo-card__title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 8px;
}

.demo-card__desc {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin: 0;
}

.demo-card__footer {
    padding: 14px 24px;
    border-top: 1px solid var(--border);
    background: var(--bg-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.demo-card__cta {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--brand);
}

/* Demo sub-cards for the 4 CSP demos */
.csp-demos-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 12px;
}

.csp-demo-link {
    font-size: 0.8rem;
    color: var(--text-muted);
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-decoration: none;
    transition: all .15s;
    display: block;
}

.csp-demo-link:hover {
    border-color: var(--brand);
    color: var(--brand);
    text-decoration: none;
    background: var(--brand-light);
}

/* ------------------------------------------------------------
   Divider
   ------------------------------------------------------------ */
.divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 32px 0;
}

/* ------------------------------------------------------------
   Utility
   ------------------------------------------------------------ */
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mt-5 { margin-top: 48px; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 16px; }
.text-sm { font-size: 0.875rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }

/* ------------------------------------------------------------
   Demo scene — typography helpers
   ------------------------------------------------------------ */
.demo-scene__title { margin-bottom: 4px; }

.demo-scene__lead {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 20px;
}

/* ------------------------------------------------------------
   Injected-code snippet (Demo 1)
   ------------------------------------------------------------ */
.injected-code {
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-muted);
}

.injected-code__comment { color: var(--danger); margin-bottom: 4px; }
.injected-code__string  { color: var(--success); }

/* ------------------------------------------------------------
   Payment / checkout form layout (Demo 2)
   ------------------------------------------------------------ */
.payment-form { display: grid; gap: 14px; max-width: 420px; }

/* Login form layout (Demo 3) */
.login-form { display: grid; gap: 0; max-width: 380px; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.form-group--tight { margin-bottom: 0; }

/* ------------------------------------------------------------
   Header display box
   ------------------------------------------------------------ */
.header-display {
    margin-top: 20px;
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
}

.header-label {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.header-pre {
    margin: 0;
    padding: 0;
    background: none;
    border-radius: 0;
    color: var(--text);
    font-size: 0.78rem;
    white-space: pre-wrap;
    word-break: break-all;
    overflow-x: visible;
}

/* ------------------------------------------------------------
   Network tab hint (unprotected mode)
   ------------------------------------------------------------ */
.demo-network-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 16px;
    padding: 8px 12px;
    background: var(--bg-subtle);
    border-radius: var(--radius);
    border-left: 3px solid var(--border);
}

.demo-network-hint code {
    font-size: 0.78rem;
}

/* ------------------------------------------------------------
   Comment box (Demo 4 — XSS)
   ------------------------------------------------------------ */
.comment-box {
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 20px;
}

.comment-box__meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.comment-box__author {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text);
}

.comment-box__time {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.comment-box__content {
    font-size: 0.9rem;
    color: var(--text);
    line-height: 1.5;
}

.xss-payload-label {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 8px;
}

/* ------------------------------------------------------------
   Demo navigation bar (prev / next between CSP demos)
   ------------------------------------------------------------ */
.demo-nav {
    padding-top: 24px;
    padding-bottom: 48px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.demo-nav__pages { display: flex; gap: 6px; }

/* ------------------------------------------------------------
   Homepage — How it works section
   ------------------------------------------------------------ */
.how-it-works { padding: 0 0 64px; }

.how-it-works__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
    margin-top: 40px;
}

.how-it-works__step { text-align: center; padding: 0 16px; }
.how-it-works__step h3 { margin-bottom: 8px; }

.step-icon { font-size: 2rem; margin-bottom: 12px; }

.how-it-works__cta { text-align: center; margin-top: 40px; }

/* Static demo card (no hover lift) */
.demo-card--static { cursor: default; }
.demo-card--static:hover { box-shadow: var(--shadow); transform: none; }

/* ------------------------------------------------------------
   Permissions Policy — feature grid
   ------------------------------------------------------------ */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 8px;
}

.feature-card {
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 16px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.feature-card__icon { font-size: 1.8rem; }

.feature-card__label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text);
}

.feature-card__status {
    font-size: 0.8rem;
    color: var(--text-muted);
    min-height: 1.2em;
}

.feature-card__status--pending { color: var(--text-muted); }
.feature-card__status--blocked { color: var(--success); font-weight: 600; }
.feature-card__status--allowed { color: var(--danger);  font-weight: 600; }

/* ------------------------------------------------------------
   NEL — layout helpers
   ------------------------------------------------------------ */
.nel-headers { display: grid; gap: 16px; }

.nel-header-block {
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 16px;
}

.trigger-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 8px;
}

.trigger-grid--single {
    grid-template-columns: 1fr;
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
}

.trigger {
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.trigger__label {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text);
}

.trigger__desc {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.4;
    margin: 0;
}

.trigger__result {
    font-size: 0.8rem;
    font-weight: 600;
    min-height: 1.2em;
}

.trigger__result--ok      { color: var(--success); }
.trigger__result--warn    { color: var(--warning); }
.trigger__result--pending { color: var(--text-muted); }

.report-example {
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    margin-top: 32px;
}

.report-pre {
    margin: 0;
    padding: 0;
    background: none;
    border-radius: 0;
    color: var(--text);
    font-size: 0.78rem;
    white-space: pre-wrap;
    word-break: break-all;
    overflow-x: visible;
}

/* ------------------------------------------------------------
   Crash option cards
   ------------------------------------------------------------ */
.crash-options {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin: 20px 0;
}

.crash-option {
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
}

.crash-option__label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    margin-bottom: 6px;
}

.crash-option__type {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: var(--danger);
    color: #fff;
    padding: 2px 7px;
    border-radius: 4px;
}

.crash-option__type--oom {
    background: #d97706;
}

.crash-option__type--hang {
    background: #7c3aed;
}

.crash-option__desc {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin: 0 0 12px;
}

/* ------------------------------------------------------------
   COEP / COOP — test widgets
   ------------------------------------------------------------ */
.coep-embed-test {
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    margin-top: 8px;
}

.coep-embed-test__label {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.coep-embed-test__frame {
    background: #fff;
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    overflow: hidden;
}

.coep-result {
    font-size: 0.85rem;
    font-weight: 600;
    padding: 8px 12px;
    border-radius: var(--radius);
    margin-top: 8px;
}

.coep-result--hidden  { display: none; }
.coep-result--pending { background: var(--bg-subtle); color: var(--text-muted); }
.coep-result--success { background: var(--success-bg); color: var(--success-dark); }
.coep-result--danger  { background: var(--danger-bg);  color: var(--danger-dark); }
.coep-result--warn    { background: var(--warning-bg); color: var(--warning); }

.coop-test {
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.coop-test__label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text);
}

/* ------------------------------------------------------------
   Responsive
   ------------------------------------------------------------ */
@media (max-width: 768px) {
    .demo-toggle {
        flex-direction: column;
        width: 100%;
    }

    .demo-toggle__btn + .demo-toggle__btn {
        border-left: none;
        border-top: 1px solid var(--border);
    }

    .csp-demos-grid { grid-template-columns: 1fr; }

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

    #csp-violation-banner,
    #pp-violation-banner {
        bottom: 0;
        right: 0;
        max-width: 100%;
        width: 100%;
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    }

    /* Demo scene body padding */
    .demo-scene__body { padding: 20px; }

    /* Payment form full-width on mobile */
    .payment-form { max-width: 100%; }

    /* Single-column form row on mobile */
    .form-row { grid-template-columns: 1fr; }

    /* Login form full-width */
    .login-form { max-width: 100%; }

    /* Feature grid stacks on mobile */
    .feature-grid { grid-template-columns: 1fr; }

    /* NEL trigger grid stacks */
    .trigger-grid { grid-template-columns: 1fr; }

    /* Demo nav wraps naturally — just reduce padding */
    .demo-nav { padding-top: 16px; padding-bottom: 32px; }

    /* How it works step text */
    .how-it-works__step { padding: 0; }

    /* Demo header */
    .demo-header { padding: 24px 0 20px; }
}
