:root {
    --ra-bg: #f6f1ea;
    --ra-surface: #fffdf9;
    --ra-raised: #ffffff;
    --ra-ink: #1f2523;
    --ra-muted: #68716d;
    --ra-border: rgba(31, 37, 35, 0.12);
    --ra-coral: #e65f4d;
    --ra-green: #2e7d56;
    --ra-brass: #b7832f;
    --ra-blue: #376f9f;
    --ra-plum: #7b4fa3;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body.ra-public {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--ra-ink);
    background:
        linear-gradient(90deg, rgba(31, 37, 35, 0.035) 1px, transparent 1px),
        linear-gradient(0deg, rgba(31, 37, 35, 0.03) 1px, transparent 1px),
        var(--ra-bg);
    background-size: 44px 44px;
}

a {
    color: inherit;
}

.ra-public-topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 22px;
    padding: 16px 28px;
    border-bottom: 1px solid var(--ra-border);
    background: rgba(246, 241, 234, 0.9);
    backdrop-filter: blur(18px);
}

.ra-public-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 180px;
    text-decoration: none;
}

.ra-public-brand__mark {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--ra-coral), #b94337);
    color: #fff;
    font-weight: 900;
}

.ra-public-brand strong,
.ra-public-brand em {
    display: block;
    line-height: 1.15;
}

.ra-public-brand strong {
    font-size: 15px;
}

.ra-public-brand em {
    color: var(--ra-muted);
    font-size: 12px;
    font-style: normal;
}

.ra-public-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    flex: 1;
}

.ra-public-nav a,
.ra-public-link {
    color: var(--ra-muted);
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
}

.ra-public-nav a:hover,
.ra-public-link:hover {
    color: var(--ra-ink);
}

.ra-public-actions,
.ra-hero__cta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.ra-public-button {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 14px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--ra-coral), #b94337);
    color: #fff;
    font-size: 13px;
    font-weight: 900;
    text-decoration: none;
    transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.ra-public-button:hover {
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 16px 32px rgba(185, 67, 55, 0.22);
}

.ra-public-button--ghost {
    background: rgba(255, 253, 249, 0.75);
    border-color: var(--ra-border);
    color: var(--ra-ink);
}

.ra-public-button--ghost:hover {
    color: var(--ra-ink);
    box-shadow: 0 14px 30px rgba(31, 37, 35, 0.1);
}

.ra-public-button--lg {
    min-height: 50px;
    padding: 13px 18px;
}

.ra-hero {
    min-height: calc(100vh - 74px);
    display: grid;
    grid-template-columns: minmax(0, 0.92fr) minmax(480px, 1.08fr);
    gap: 34px;
    align-items: center;
    max-width: 1280px;
    margin: 0 auto;
    padding: 70px 28px;
}

.ra-hero__copy,
.ra-section__head,
.ra-intel > div:first-child {
    animation: ra-rise 680ms ease both;
}

.ra-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    border: 1px solid var(--ra-border);
    border-radius: 8px;
    background: rgba(255, 253, 249, 0.72);
    color: #ad4438;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.ra-hero h1,
.ra-section h2,
.ra-intel h2 {
    margin: 18px 0 0;
    color: var(--ra-ink);
    font-size: 56px;
    line-height: 1.02;
    font-weight: 900;
    letter-spacing: 0;
}

.ra-section h2,
.ra-intel h2 {
    font-size: 40px;
}

.ra-hero p,
.ra-section__head p,
.ra-intel p {
    margin: 18px 0 0;
    max-width: 680px;
    color: var(--ra-muted);
    font-size: 16px;
    line-height: 1.75;
}

.ra-hero__cta {
    margin-top: 26px;
}

.ra-hero__stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    max-width: 560px;
    margin-top: 30px;
}

.ra-hero__stats div {
    padding: 14px;
    border: 1px solid var(--ra-border);
    border-radius: 8px;
    background: rgba(255, 253, 249, 0.72);
}

.ra-hero__stats strong,
.ra-hero__stats span {
    display: block;
}

.ra-hero__stats strong {
    font-size: 28px;
    line-height: 1;
}

.ra-hero__stats span {
    margin-top: 6px;
    color: var(--ra-muted);
    font-size: 12px;
    font-weight: 800;
}

.ra-hero__visual {
    animation: ra-rise 760ms 120ms ease both;
}

.ra-preview {
    position: relative;
    overflow: hidden;
    padding: 18px;
    border: 1px solid rgba(255, 253, 249, 0.16);
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(31, 37, 35, 0.98), rgba(33, 48, 41, 0.96)),
        repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px 32px);
    box-shadow: 0 26px 100px rgba(31, 37, 35, 0.28);
}

.ra-preview__bar {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 16px;
}

.ra-preview__bar span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.35);
}

.ra-preview__bar strong {
    margin-left: auto;
    color: rgba(255, 253, 249, 0.78);
    font-size: 12px;
}

.ra-preview__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.ra-preview-card {
    min-height: 160px;
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    color: #fffdf9;
}

.ra-preview-card--wide {
    grid-column: span 2;
}

.ra-card-label {
    display: block;
    color: rgba(255, 253, 249, 0.62);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.ra-pos-line {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    margin-top: 14px;
    align-items: center;
}

.ra-pos-line b,
.ra-pos-line strong {
    font-size: 22px;
}

.ra-pos-line em {
    grid-column: 1;
    color: rgba(255, 253, 249, 0.58);
    font-size: 12px;
    font-style: normal;
}

.ra-pos-line strong {
    grid-row: span 2;
}

.ra-pos-items,
.ra-ticket-lane {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.ra-pos-items span,
.ra-ticket-lane span {
    padding: 8px 10px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 253, 249, 0.78);
    font-size: 12px;
    font-weight: 800;
}

.ra-ticket-lane {
    flex-direction: column;
}

.ra-ticket-lane span {
    border-left: 4px solid var(--ra-coral);
    animation: ra-ticket 2.7s ease-in-out infinite;
}

.ra-ticket-lane span:nth-child(2) {
    border-color: var(--ra-brass);
    animation-delay: 180ms;
}

.ra-ticket-lane span:nth-child(3) {
    border-color: var(--ra-green);
    animation-delay: 320ms;
}

.ra-qr-card {
    height: 110px;
    display: grid;
    place-items: center;
    margin-top: 14px;
    border-radius: 8px;
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px),
        linear-gradient(0deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
    background-size: 14px 14px;
}

.ra-qr-card i {
    font-size: 36px;
}

.ra-qr-card b {
    font-size: 13px;
}

.ra-table-map {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
    margin-top: 14px;
    padding: 14px;
    border-radius: 8px;
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px),
        linear-gradient(0deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
    background-size: 24px 24px;
}

.ra-table-dot {
    min-height: 54px;
    border-radius: 8px;
    border: 2px solid rgba(255, 255, 255, 0.18);
}

.ra-table-dot--ok { border-color: rgba(74, 178, 122, 0.85); }
.ra-table-dot--hot { border-color: rgba(230, 95, 77, 0.92); animation: ra-pulse 1.9s ease-in-out infinite; }
.ra-table-dot--bill { border-color: rgba(55, 111, 159, 0.92); }
.ra-table-dot--dirty { border-color: rgba(183, 131, 47, 0.92); }
.ra-table-dot--ready { border-color: rgba(123, 79, 163, 0.92); }
.ra-table-dot--hold { border-color: rgba(255, 211, 139, 0.88); }

.ra-section {
    max-width: 1280px;
    margin: 0 auto;
    padding: 78px 28px;
}

.ra-section--band {
    max-width: none;
    border-top: 1px solid var(--ra-border);
    border-bottom: 1px solid var(--ra-border);
    background: rgba(255, 253, 249, 0.58);
}

.ra-section--band > * {
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
}

.ra-module-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
    margin-top: 32px;
}

.ra-module-card {
    min-height: 178px;
    padding: 18px;
    border: 1px solid var(--ra-border);
    border-top: 4px solid var(--ra-coral);
    border-radius: 8px;
    background: var(--ra-surface);
    box-shadow: 0 14px 36px rgba(31, 37, 35, 0.08);
    transition: transform 160ms ease, box-shadow 160ms ease;
}

.ra-module-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 22px 54px rgba(31, 37, 35, 0.12);
}

.ra-module-card i {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: rgba(230, 95, 77, 0.1);
    color: var(--ra-coral);
    font-size: 18px;
}

.ra-module-card h3 {
    margin: 16px 0 0;
    font-size: 17px;
    line-height: 1.25;
}

.ra-module-card p {
    margin: 10px 0 0;
    color: var(--ra-muted);
    font-size: 13px;
    line-height: 1.58;
}

.ra-module-card--green { border-top-color: var(--ra-green); }
.ra-module-card--green i { background: rgba(46, 125, 86, 0.1); color: var(--ra-green); }
.ra-module-card--blue { border-top-color: var(--ra-blue); }
.ra-module-card--blue i { background: rgba(55, 111, 159, 0.1); color: var(--ra-blue); }
.ra-module-card--brass { border-top-color: var(--ra-brass); }
.ra-module-card--brass i { background: rgba(183, 131, 47, 0.12); color: var(--ra-brass); }
.ra-module-card--plum { border-top-color: var(--ra-plum); }
.ra-module-card--plum i { background: rgba(123, 79, 163, 0.11); color: var(--ra-plum); }

.ra-flow {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
    margin-top: 32px;
}

.ra-flow-step {
    position: relative;
    min-height: 150px;
    padding: 16px;
    border: 1px solid var(--ra-border);
    border-radius: 8px;
    background: var(--ra-surface);
}

.ra-flow-step:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 35px;
    right: -10px;
    width: 18px;
    height: 2px;
    background: var(--ra-coral);
}

.ra-flow-step span {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: var(--ra-ink);
    color: #fff;
    font-weight: 900;
}

.ra-flow-step h3 {
    margin: 16px 0 0;
    font-size: 16px;
}

.ra-flow-step p {
    margin: 8px 0 0;
    color: var(--ra-muted);
    font-size: 13px;
    line-height: 1.55;
}

.ra-intel {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(420px, 1.05fr);
    gap: 28px;
    align-items: center;
}

.ra-chart-board {
    min-height: 360px;
    padding: 22px;
    border: 1px solid var(--ra-border);
    border-radius: 8px;
    background: var(--ra-surface);
    box-shadow: 0 20px 64px rgba(31, 37, 35, 0.12);
}

.ra-chart-line {
    height: 130px;
    border-radius: 8px;
    background:
        linear-gradient(135deg, transparent 54%, rgba(230, 95, 77, 0.18) 54%),
        linear-gradient(22deg, transparent 45%, var(--ra-coral) 45%, var(--ra-coral) 47%, transparent 47%),
        linear-gradient(90deg, rgba(31, 37, 35, 0.06) 1px, transparent 1px),
        linear-gradient(0deg, rgba(31, 37, 35, 0.06) 1px, transparent 1px);
    background-size: 100% 100%, 100% 100%, 28px 28px, 28px 28px;
}

.ra-chart-bars {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    align-items: end;
    gap: 12px;
    height: 120px;
    margin-top: 18px;
}

.ra-chart-bars span {
    border-radius: 8px 8px 0 0;
    background: linear-gradient(180deg, var(--ra-blue), rgba(55, 111, 159, 0.38));
    animation: ra-bar 900ms ease both;
}

.ra-chart-bars span:nth-child(1) { height: 52%; }
.ra-chart-bars span:nth-child(2) { height: 76%; animation-delay: 80ms; }
.ra-chart-bars span:nth-child(3) { height: 44%; animation-delay: 120ms; }
.ra-chart-bars span:nth-child(4) { height: 88%; animation-delay: 160ms; }
.ra-chart-bars span:nth-child(5) { height: 64%; animation-delay: 200ms; }

.ra-severity-rail {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-top: 18px;
}

.ra-severity-rail span {
    height: 12px;
    border-radius: 999px;
    background: var(--ra-green);
}

.ra-severity-rail span:nth-child(2) { background: var(--ra-blue); }
.ra-severity-rail span:nth-child(3) { background: var(--ra-brass); }
.ra-severity-rail span:nth-child(4) { background: var(--ra-coral); animation: ra-pulse 1.8s ease-in-out infinite; }

.ra-public-footer {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 14px;
    padding: 26px 28px 36px;
    border-top: 1px solid var(--ra-border);
    color: var(--ra-muted);
    font-size: 13px;
    font-weight: 800;
}

.ra-public-footer a {
    color: var(--ra-coral);
    text-decoration: none;
}

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

@keyframes ra-ticket {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(5px); }
}

@keyframes ra-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(230, 95, 77, 0.28); }
    50% { box-shadow: 0 0 0 8px rgba(230, 95, 77, 0); }
}

@keyframes ra-bar {
    from { transform: scaleY(0.2); opacity: 0; }
    to { transform: scaleY(1); opacity: 1; }
}

@media (max-width: 1100px) {
    .ra-hero,
    .ra-intel {
        grid-template-columns: 1fr;
    }

    .ra-module-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ra-flow {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .ra-public-topbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .ra-public-nav {
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .ra-hero {
        padding-top: 42px;
    }

    .ra-hero h1 {
        font-size: 38px;
    }

    .ra-section h2,
    .ra-intel h2 {
        font-size: 30px;
    }

    .ra-hero__stats,
    .ra-module-grid,
    .ra-flow {
        grid-template-columns: 1fr;
    }

    .ra-preview__grid {
        grid-template-columns: 1fr;
    }

    .ra-preview-card--wide {
        grid-column: auto;
    }

    .ra-flow-step:not(:last-child)::after {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.001ms !important;
    }
}

/* Minimal graphical public showcase refresh. */
.ra-hero {
    min-height: auto;
    grid-template-columns: minmax(0, 0.92fr) minmax(420px, 0.9fr);
    gap: 28px;
    padding-top: clamp(42px, 6vw, 66px);
    padding-bottom: clamp(38px, 5vw, 58px);
}

.ra-hero h1 {
    max-width: 650px;
    font-size: clamp(38px, 5.2vw, 58px);
    line-height: 1.04;
}

.ra-section h2,
.ra-intel h2 {
    font-size: clamp(30px, 3.8vw, 42px);
}

.ra-preview,
.ra-chart-board {
    border-color: var(--ra-border);
    background:
        linear-gradient(90deg, rgba(31, 37, 35, 0.055) 1px, transparent 1px),
        linear-gradient(0deg, rgba(31, 37, 35, 0.045) 1px, transparent 1px),
        #fffdf9;
    background-size: 24px 24px;
    box-shadow: 0 18px 46px rgba(31, 37, 35, 0.1);
}

.ra-preview__bar strong,
.ra-card-label,
.ra-pos-line b,
.ra-pos-line strong,
.ra-qr-card b,
.ra-preview-card h3 {
    color: var(--ra-ink);
}

.ra-preview__bar span {
    background: rgba(31, 37, 35, 0.22);
}

.ra-preview-card {
    border-color: var(--ra-border);
    background: #fff;
    box-shadow: 0 12px 26px rgba(31, 37, 35, 0.07);
}

.ra-pos-line,
.ra-ticket-lane span,
.ra-pos-items span {
    background: rgba(31, 37, 35, 0.045);
    color: var(--ra-muted);
}

.ra-qr-card {
    border-color: rgba(55, 111, 159, 0.28);
    background: rgba(55, 111, 159, 0.06);
    color: var(--ra-blue);
}

.ra-module-card,
.ra-flow-step {
    box-shadow: 0 12px 32px rgba(31, 37, 35, 0.06);
}

.ra-flow-step:not(:last-child)::after {
    background: var(--ra-border);
}
