/* ===========================================================================
   Tidal Wave Dev — deep-ocean theme
   A dark, single-surface site: one ambient background, translucent "glass"
   chrome floating on top of it, and a cyan/violet accent reserved for the
   things that are actually interactive.
   =========================================================================== */

:root {
    /* Ground -------------------------------------------------------------- */
    --twd-bg: #061320;
    --twd-bg-deep: #030b14;

    /* Panels sit on the ground as translucent glass rather than solid fills,
       so the ambient glows behind them still read through. */
    --twd-panel: rgba(255, 255, 255, 0.045);
    --twd-panel-hover: rgba(255, 255, 255, 0.07);
    --twd-border: rgba(255, 255, 255, 0.09);
    --twd-border-strong: rgba(255, 255, 255, 0.16);

    /* Ink ----------------------------------------------------------------- */
    --twd-ink: #f2f8fc;
    --twd-ink-2: #b6cddd;
    --twd-muted: #86a3b8;

    /* Accent -------------------------------------------------------------- */
    --twd-accent: #4fb6ff;
    --twd-accent-soft: #8ed2ff;
    --twd-violet: #7b6bff;
    --twd-amber: #f2952f;
    --twd-live: #5fd89a;

    /* Quick out of the gate, long settle: the curve every entrance uses. */
    --twd-ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
    /* Overshoots slightly before settling, for things that should feel sprung. */
    --twd-ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

    --twd-radius-sm: 0.75rem;

    --twd-page-max: 78rem;
    --twd-page-pad: 1.5rem;
}

html {
    background-color: var(--twd-bg);
    color-scheme: dark;
}

html, body {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

body {
    margin: 0;
    min-height: 100vh;
    background-color: transparent;
    color: var(--twd-ink);
    -webkit-font-smoothing: antialiased;
}

/* Ambient light. Fixed so the glows stay put while the page scrolls past
   them, which is what makes the surface read as one continuous space. */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(58rem 34rem at 18% -6%, rgba(28, 96, 158, 0.55), transparent 62%),
        radial-gradient(46rem 30rem at 96% 4%, rgba(196, 104, 44, 0.30), transparent 60%),
        radial-gradient(52rem 36rem at 88% 62%, rgba(24, 84, 140, 0.38), transparent 64%),
        radial-gradient(40rem 28rem at 4% 78%, rgba(20, 70, 120, 0.34), transparent 66%),
        linear-gradient(175deg, var(--twd-bg) 0%, var(--twd-bg-deep) 100%);
}

a {
    color: var(--twd-accent);
    text-underline-offset: 0.2em;
}

a:hover {
    color: var(--twd-accent-soft);
}

h1, h2, h3, h4 {
    color: var(--twd-ink);
    letter-spacing: -0.015em;
}

/* Bootstrap ships these against a light page; re-point them at the dark one. */
.text-muted {
    color: var(--twd-muted) !important;
}

code {
    color: var(--twd-accent-soft);
}

hr {
    border-color: var(--twd-border);
}

::selection {
    background: rgba(79, 182, 255, 0.28);
}

:focus-visible {
    outline: 2px solid var(--twd-accent);
    outline-offset: 3px;
}

/* Routing focuses the page heading on every navigation for screen readers.
   That is not a sighted user asking for focus, so it draws no ring. */
h1:focus,
h1:focus-visible {
    outline: none;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.2rem rgba(79, 182, 255, 0.45);
}

/* Shared page rhythm ------------------------------------------------------ */
.twd-wrap {
    width: 100%;
    max-width: var(--twd-page-max);
    margin-inline: auto;
    padding-inline: var(--twd-page-pad);
}

.twd-section-title {
    margin: 0 0 1.25rem;
    font-size: 1.5rem;
    font-weight: 600;
}

/* A short bar of the accent under each section heading. */
.twd-section-title::after {
    content: "";
    display: block;
    width: 2.75rem;
    height: 3px;
    margin-top: 0.65rem;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--twd-accent), var(--twd-violet));
    transform-origin: left center;
}

/* In-page links land below the sticky header rather than underneath it. */
[id] {
    scroll-margin-top: 6.5rem;
}

/* A section is focused after an in-page jump so that Tab carries on from
   there. Nobody asked to see a ring around the whole section. */
section[tabindex="-1"]:focus {
    outline: none;
}

/* Glass panels carry a soft light that follows the pointer (app.js feeds it
   --mx/--my). Without the script it rests at the top edge. */
.twd-card,
.twd-stats,
.twd-about-panel {
    position: relative;
    isolation: isolate;
}

.twd-card::before,
.twd-stats::before,
.twd-about-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    border-radius: inherit;
    background: radial-gradient(20rem circle at var(--mx, 50%) var(--my, 0%), rgba(79, 182, 255, 0.15), transparent 62%);
    opacity: 0;
    transition: opacity 0.35s ease;
    pointer-events: none;
}

.twd-card:hover::before,
.twd-stats:hover::before,
.twd-about-panel:hover::before {
    opacity: 1;
}

/* ===========================================================================
   Hero
   =========================================================================== */
.twd-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    align-items: center;
    gap: 2rem;
    padding: 3.5rem 0 4rem;
}

.twd-hero h1 {
    margin: 0 0 1.25rem;
    font-size: clamp(2.1rem, 4.4vw, 3.35rem);
    line-height: 1.14;
    font-weight: 400;
}

.twd-hero-accent {
    font-weight: 700;
    /* Set in sentence case in the markup and shouted here, so screen readers
       are not handed an acronym to spell out. */
    text-transform: uppercase;
    color: var(--twd-accent);
}

/* The accent words are painted with a gradient that is the accent colour end
   to end except for one pale band in the middle. The window onto it is a third
   of its width and rests on a plain stretch; the motion block slides it across
   so a glint passes over the letters. */
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
    .twd-hero-accent {
        background-image: linear-gradient(100deg,
            var(--twd-accent) 0%, var(--twd-accent) 40%,
            #e4f8ff 50%,
            var(--twd-accent) 60%, var(--twd-accent) 100%);
        background-size: 300% 100%;
        background-position: 100% 0;
        -webkit-background-clip: text;
        background-clip: text;
        -webkit-text-fill-color: transparent;
    }
}

/* Status line above the headline. */
.twd-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    margin: 0 0 1.25rem;
    padding: 0.35rem 0.9rem 0.35rem 0.75rem;
    border: 1px solid var(--twd-border);
    border-radius: 999px;
    background: var(--twd-panel);
    font-size: 0.8125rem;
    letter-spacing: 0.02em;
    color: var(--twd-ink-2);
}

.twd-eyebrow-dot {
    flex: none;
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: var(--twd-live);
}

.twd-hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.85rem;
}

.twd-hero-lead {
    max-width: 34rem;
    margin: 0 0 2rem;
    font-size: 1.0625rem;
    line-height: 1.65;
    color: var(--twd-ink-2);
}

.twd-hero-art {
    justify-self: center;
    width: 100%;
    max-width: 34rem;
}

/* The spark that runs along the pulse exists only in motion; held still it
   would just be a stray bright segment. */
.twd-art-spark {
    opacity: 0;
}

/* Call to action ---------------------------------------------------------- */
.twd-cta {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    overflow: hidden;
    padding: 0.9rem 2.1rem;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 999px;
    background: linear-gradient(100deg, var(--twd-violet) 0%, #3f7fe0 46%, var(--twd-accent) 100%);
    box-shadow: 0 0 0 1px rgba(79, 182, 255, 0.18), 0 0.75rem 2.25rem rgba(63, 127, 224, 0.45);
    color: #fff;
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    text-decoration: none;
    transition: transform 0.2s var(--twd-ease-out), box-shadow 0.2s ease,
                background-color 0.2s ease, border-color 0.2s ease;
}

.twd-cta:hover {
    color: #fff;
    box-shadow: 0 0 0 1px rgba(79, 182, 255, 0.32), 0 1rem 2.75rem rgba(63, 127, 224, 0.6);
}

.twd-cta-arrow {
    display: inline-block;
}

/* The quieter of two actions: glass rather than the gradient. */
.twd-cta-ghost {
    border-color: var(--twd-border-strong);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: none;
    color: var(--twd-ink);
}

.twd-cta-ghost:hover {
    border-color: rgba(142, 210, 255, 0.55);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0.75rem 2rem rgba(2, 10, 20, 0.45);
}

/* ===========================================================================
   Featured apps
   The stats panel is a sibling of the cards, not a card itself, and follows the
   last card. Every column is card width: a narrower fourth column used to suit
   three cards plus the panel, but with more cards it took a card instead, and
   squeezed it. Five cards and the panel fill two rows of three exactly.
   =========================================================================== */
.twd-featured {
    padding-bottom: 3.5rem;
}

.twd-featured-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
    gap: 1.25rem;
}

.twd-card {
    display: flex;
    flex-direction: column;
    padding: 1.25rem 1.25rem 1.35rem;
    border: 1px solid var(--twd-border);
    border-radius: var(--twd-radius-sm);
    background: var(--twd-panel);
    backdrop-filter: blur(14px);
    transition: transform 0.3s var(--twd-ease-out), border-color 0.3s ease,
                background-color 0.3s ease, box-shadow 0.3s ease;
}

.twd-card:hover {
    border-color: rgba(79, 182, 255, 0.42);
    background: var(--twd-panel-hover);
    box-shadow: 0 1.25rem 2.75rem rgba(2, 10, 20, 0.5), 0 0 2.5rem rgba(79, 182, 255, 0.1);
}

.twd-card-head {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    margin-bottom: 0.9rem;
}

.twd-card-icon {
    flex: none;
    display: grid;
    place-items: center;
    width: 3rem;
    height: 3rem;
    border-radius: 0.65rem;
    border: 1px solid var(--twd-border);
    background: linear-gradient(150deg, rgba(79, 182, 255, 0.22), rgba(123, 107, 255, 0.14));
    font-size: 1.5rem;
    transition: transform 0.45s var(--twd-ease-spring), border-color 0.3s ease, box-shadow 0.3s ease;
}

.twd-card:hover .twd-card-icon {
    border-color: rgba(79, 182, 255, 0.45);
    box-shadow: 0 0.5rem 1.25rem rgba(79, 182, 255, 0.2);
}

.twd-card-icon-idle {
    background: rgba(255, 255, 255, 0.06);
    color: var(--twd-muted);
}

.twd-card-titles {
    flex: 1;
    min-width: 0;
}

.twd-card-title {
    margin: 0;
    font-size: 1.1875rem;
    font-weight: 600;
    line-height: 1.25;
}

/* A live app's title links through to its page on this site. It inherits the
   heading's colour so the card still reads as a card, and only picks up the
   accent when hovered or focused. */
.twd-card-title-link {
    color: inherit;
    text-decoration: none;
    transition: color 0.16s ease;
}

.twd-card-title-link:hover,
.twd-card-title-link:focus-visible {
    color: var(--twd-accent);
    text-decoration: underline;
}

.twd-card-platform {
    margin: 0;
    font-size: 1.0625rem;
    color: var(--twd-ink-2);
}

.twd-card-flag {
    display: block;
    margin-bottom: 0.15rem;
    font-size: 0.9375rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--twd-amber);
}

.twd-card-flag::before {
    content: "";
    display: inline-block;
    width: 0.45rem;
    height: 0.45rem;
    margin-right: 0.45rem;
    border-radius: 50%;
    background: currentColor;
    vertical-align: 0.1em;
}

.twd-card-mark {
    flex: none;
    color: var(--twd-ink-2);
    opacity: 0.75;
}

.twd-card-text {
    margin: 0 0 1rem;
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--twd-ink-2);
}

/* Pins the store link to the bottom edge, so cards with unequal copy still
   line their links up with one another. */
.twd-card-foot {
    margin-top: auto;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.twd-card-link {
    font-size: 0.9375rem;
    color: var(--twd-accent);
}

/* inline-block keeps the link's underline from running on under the arrow. */
.twd-card-link::after {
    content: "\2192";
    display: inline-block;
    margin-left: 0.3rem;
    transition: transform 0.2s var(--twd-ease-out);
}

/* Apps on both stores show two links side by side. */
.twd-card-link + .twd-card-link {
    margin-left: 0.65rem;
}

.twd-card-pending {
    font-size: 0.875rem;
    color: var(--twd-muted);
}

.twd-card-chip {
    display: grid;
    place-items: center;
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 999px;
    border: 1px solid var(--twd-border);
    background: rgba(255, 255, 255, 0.06);
    color: var(--twd-ink-2);
}

.twd-support-note {
    margin: 1.75rem 0 0;
    text-align: center;
    font-size: 0.9375rem;
    color: var(--twd-muted);
}

/* ===========================================================================
   About
   =========================================================================== */
.twd-about {
    padding-bottom: 3.5rem;
}

.twd-about-panel {
    max-width: 52rem;
    padding: 1.5rem 1.75rem;
    border: 1px solid var(--twd-border);
    border-radius: var(--twd-radius-sm);
    background: var(--twd-panel);
    backdrop-filter: blur(14px);
    color: var(--twd-ink-2);
    line-height: 1.7;
}

.twd-about-panel p:last-child {
    margin-bottom: 0;
}

.twd-about-panel strong {
    color: var(--twd-ink);
}

/* ===========================================================================
   Visitor stats panel
   =========================================================================== */
.twd-stats {
    display: flex;
    flex-direction: column;
    padding: 1.1rem 1.15rem 1rem;
    border: 1px solid var(--twd-border);
    border-radius: var(--twd-radius-sm);
    background: var(--twd-panel);
    backdrop-filter: blur(14px);
}

.twd-stats-list {
    margin: 0;
}

.twd-stat {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.42rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.twd-stat:last-of-type {
    border-bottom: 0;
}

.twd-stat dt {
    font-size: 0.875rem;
    font-weight: 400;
    color: var(--twd-ink-2);
}

.twd-stat dd {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: var(--twd-ink);
}

.twd-spark {
    display: block;
    width: 100%;
    height: auto;
    margin-top: auto;
    padding-top: 0.75rem;
}

.twd-stats-note {
    margin: 0.65rem 0 0;
    font-size: 0.8125rem;
    line-height: 1.5;
    color: var(--twd-muted);
}

/* The same numbers, without relying on the sparkline shape or its color. */
.twd-tableview {
    margin-top: 0.75rem;
    font-size: 0.8125rem;
    color: var(--twd-ink-2);
}

.twd-tableview > summary {
    cursor: pointer;
    color: var(--twd-muted);
}

.twd-tableview table {
    width: 100%;
    margin-top: 0.6rem;
    border-collapse: collapse;
}

.twd-tableview th,
.twd-tableview td {
    padding: 0.3rem 0.5rem 0.3rem 0;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.twd-tableview td,
.twd-tableview thead th {
    font-variant-numeric: tabular-nums;
}

.twd-tableview thead th {
    color: var(--twd-muted);
    font-weight: 600;
}

.twd-tableview tbody th {
    font-weight: 400;
}

/* ===========================================================================
   Interior pages (privacy, error, 404)
   =========================================================================== */
.twd-page {
    max-width: 48rem;
    margin-inline: auto;
    padding: 3rem 0 3.5rem;
    color: var(--twd-ink-2);
    line-height: 1.7;
}

.twd-page h1 {
    margin-bottom: 0.35rem;
    font-size: clamp(1.9rem, 3.6vw, 2.6rem);
}

.twd-page h2 {
    margin-top: 2.25rem;
    margin-bottom: 0.6rem;
    font-size: 1.25rem;
    color: var(--twd-accent-soft);
}

.twd-page h3 {
    margin-top: 1.75rem;
    font-size: 1.0625rem;
}

.twd-page li {
    margin-bottom: 0.4rem;
}

.twd-page strong {
    color: var(--twd-ink);
}

.twd-page-lede {
    color: var(--twd-muted);
}

.twd-page-nav {
    margin-bottom: 1.5rem;
}

.twd-back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.9375rem;
    color: var(--twd-accent);
    text-decoration: none;
    transition: color 0.15s ease, transform 0.2s var(--twd-ease-out);
}

.twd-back-link:hover {
    color: var(--twd-accent-soft);
    text-decoration: underline;
}

.twd-policy-card {
    margin: 1.5rem 0 2rem;
    padding: 1.25rem 1.5rem;
    border: 1px solid var(--twd-border);
    border-radius: var(--twd-radius-sm);
    background: var(--twd-panel);
    backdrop-filter: blur(14px);
}

.twd-policy-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem 1.25rem;
    font-size: 0.9375rem;
}

.twd-policy-hub-section {
    margin: 2rem 0 2.5rem;
    padding: 1.25rem 1.5rem;
    border: 1px solid var(--twd-border-strong);
    border-radius: var(--twd-radius-sm);
    background: var(--twd-panel);
    backdrop-filter: blur(14px);
}

.twd-policy-hub-section h2 {
    margin-top: 0;
    font-size: 1.2rem;
}

.twd-policy-hub-list {
    list-style: none;
    padding: 0;
    margin: 1rem 0 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.twd-policy-hub-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    border: 1px solid var(--twd-border);
    border-radius: 0.5rem;
    background: rgba(255, 255, 255, 0.03);
    text-decoration: none;
    color: var(--twd-ink);
    transition: background 0.15s ease, border-color 0.15s ease;
}

.twd-policy-hub-item:hover {
    background: var(--twd-panel-hover);
    border-color: var(--twd-accent);
    color: var(--twd-ink);
    text-decoration: none;
}

.twd-policy-hub-item strong {
    color: var(--twd-accent);
}

/* The trailing arrow. */
.twd-policy-hub-item > span:last-child {
    flex: none;
    margin-left: 1rem;
    color: var(--twd-muted);
    transition: transform 0.2s var(--twd-ease-out), color 0.2s ease;
}

.twd-policy-hub-item:hover > span:last-child {
    color: var(--twd-accent);
}

.twd-policy-hub-desc {
    font-size: 0.875rem;
    color: var(--twd-muted);
}

.blazor-error-boundary {
    background: #b32121;
    padding: 1rem;
    color: white;
}

.blazor-error-boundary::after {
    content: "An error has occurred."
}

/* ===========================================================================
   Breakpoints
   =========================================================================== */
@media (max-width: 1100px) {
    /* Cards drop to two-up first; the stats panel takes a full row of its own
       rather than being squeezed into a card-width column. */
    .twd-featured-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .twd-stats {
        grid-column: 1 / -1;
    }

    .twd-spark {
        max-height: 5rem;
    }
}

@media (max-width: 900px) {
    .twd-hero {
        grid-template-columns: minmax(0, 1fr);
        gap: 1rem;
        padding: 2.25rem 0 3rem;
        text-align: center;
    }

    .twd-hero-lead {
        margin-inline: auto;
    }

    .twd-hero-actions {
        justify-content: center;
    }

    .twd-hero-art {
        order: -1;
        max-width: 26rem;
    }
}

@media (max-width: 640px) {
    :root {
        --twd-page-pad: 1.15rem;
    }

    .twd-featured-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* ===========================================================================
   Motion
   Everything that moves lives in this one block, behind the reader's own
   setting. With reduced motion the page keeps its colour and hover changes and
   simply holds still; nothing above depends on anything in here.

   Entrances are written as a "from" keyframe only and fill backwards, never
   forwards: an animation that held its last frame would pin the transform and
   stop the hover lift from ever applying afterwards.
   =========================================================================== */
@media (prefers-reduced-motion: no-preference) {
    /* Hover movement ------------------------------------------------------ */
    .twd-cta:hover {
        transform: translateY(-2px);
    }

    .twd-cta:active {
        transform: translateY(0);
    }

    /* A band of light crosses the button on the way in and resets unseen on
       the way out, which is why the transition exists only on :hover. */
    .twd-cta::after {
        content: "";
        position: absolute;
        inset: 0;
        background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.32) 50%, transparent 65%);
        transform: translateX(-110%);
        pointer-events: none;
    }

    .twd-cta:hover::after {
        transform: translateX(110%);
        transition: transform 0.75s ease;
    }

    .twd-cta:hover .twd-cta-arrow {
        animation: twd-nudge-down 0.9s ease-in-out infinite;
    }

    .twd-card:hover {
        transform: translateY(-5px);
    }

    .twd-card:hover .twd-card-icon {
        transform: translateY(-2px) rotate(-7deg) scale(1.1);
    }

    .twd-card-link:hover::after,
    .twd-policy-hub-item:hover > span:last-child {
        transform: translateX(4px);
    }

    .twd-back-link:hover {
        transform: translateX(-3px);
    }

    /* Idle signals ---------------------------------------------------------- */
    .twd-eyebrow-dot {
        animation: twd-ping 2.4s ease-out infinite;
    }

    .twd-card-flag::before {
        animation: twd-blink 2.2s ease-in-out infinite;
    }

    .twd-hero-accent {
        animation: twd-glint 6.5s ease-in-out 1.6s infinite;
    }

    /* Entrances ------------------------------------------------------------- */
    .twd-hero-copy > * {
        animation: twd-rise 0.85s var(--twd-ease-out) backwards;
    }

    .twd-hero-copy > :nth-child(1) { animation-delay: 0.05s; }
    .twd-hero-copy > :nth-child(2) { animation-delay: 0.16s; }
    .twd-hero-copy > :nth-child(3) { animation-delay: 0.28s; }
    .twd-hero-copy > :nth-child(4) { animation-delay: 0.4s; }

    .twd-page {
        animation: twd-rise 0.7s var(--twd-ease-out) backwards;
    }

    /* Scroll reveals. Held back only once app.js has marked the document, so
       nothing is ever hidden without something there to bring it in. The
       script sets each element's delay so that a row arrives in sequence. */
    .twd-js [data-reveal]:not(.is-in) {
        opacity: 0;
    }

    .twd-js [data-reveal].is-in {
        animation: twd-rise 0.8s var(--twd-ease-out) backwards;
    }

    .twd-js .twd-section-title[data-reveal].is-in::after {
        animation: twd-grow 0.7s 0.3s var(--twd-ease-out) backwards;
    }

    /* The trend line is uncovered left to right, the way it would be drawn. */
    .twd-js .twd-stats[data-reveal].is-in .twd-spark {
        animation: twd-wipe 1.5s 0.45s cubic-bezier(0.65, 0, 0.2, 1) backwards;
    }

    /* Hero illustration ------------------------------------------------------- */
    /* Each stroke is one dash as long as the path, slid fully off and drawn
       back on. Dash and offset run a hair past the path's length so that no
       rounded cap pokes out at the start before the stroke arrives. */
    .twd-art-draw {
        stroke-dasharray: 1.01 2;
        animation: twd-art-draw 1.5s cubic-bezier(0.6, 0.05, 0.25, 1) var(--twd-d, 0s) backwards;
    }

    .twd-art-glow {
        animation: twd-art-fade 1.6s 0.8s ease backwards;
    }

    .twd-art-halo,
    .twd-art-pop,
    .twd-art-surf,
    .twd-art-spray {
        transform-box: fill-box;
        transform-origin: center;
    }

    .twd-art-halo {
        animation: twd-art-fade 1.4s ease backwards,
                   twd-art-breathe 7s 1.4s ease-in-out infinite alternate;
    }

    .twd-art-pop {
        animation: twd-art-pop 0.85s var(--twd-ease-out) var(--twd-d, 0s) backwards;
    }

    .twd-art-float {
        animation: twd-art-float var(--twd-float, 7s) ease-in-out infinite alternate;
    }

    .twd-art-surf {
        transform-origin: 50% 100%;
        animation: twd-art-surf 5s ease-in-out infinite alternate;
    }

    .twd-art-spray {
        animation: twd-art-spray 3.6s ease-out var(--twd-d, 0s) infinite backwards;
    }

    .twd-art-spark {
        opacity: 0.95;
        stroke-dasharray: 0.12 0.88;
        animation: twd-art-spark 2.6s linear infinite;
    }

    .twd-hero-art.is-paused * {
        animation-play-state: paused;
    }
}

/* Ambient light, wide screens only. Every glass panel blurs what is behind it,
   and a backdrop that never stops moving makes each of them re-blur on every
   frame: fine on a desktop, a poor trade for a phone's battery. The layers are
   scaled up and only ever shifted by less than the overscan, so an edge never
   comes into view. */
@media (prefers-reduced-motion: no-preference) and (min-width: 901px) {
    body::before {
        animation: twd-drift 38s ease-in-out infinite alternate;
    }

    body::after {
        content: "";
        position: fixed;
        inset: 0;
        z-index: -1;
        pointer-events: none;
        background: radial-gradient(34rem 26rem at 38% 34%, rgba(79, 182, 255, 0.13), transparent 68%);
        animation: twd-caustic 26s ease-in-out infinite alternate;
    }
}

@keyframes twd-rise {
    from {
        opacity: 0;
        transform: translateY(1.35rem);
    }
}

@keyframes twd-grow {
    from {
        transform: scaleX(0);
    }
}

@keyframes twd-wipe {
    from {
        clip-path: inset(0 100% 0 0);
    }

    to {
        clip-path: inset(0 0 0 0);
    }
}

@keyframes twd-glint {
    0%, 45% {
        background-position: 100% 0;
    }

    100% {
        background-position: 0 0;
    }
}

@keyframes twd-ping {
    0% {
        box-shadow: 0 0 0 0 rgba(95, 216, 154, 0.55);
    }

    70%, 100% {
        box-shadow: 0 0 0 0.5rem rgba(95, 216, 154, 0);
    }
}

@keyframes twd-blink {
    50% {
        opacity: 0.35;
    }
}

@keyframes twd-nudge-down {
    50% {
        transform: translateY(3px);
    }
}

@keyframes twd-drift {
    from {
        transform: translate3d(-2.5%, 2%, 0) scale(1.12);
    }

    to {
        transform: translate3d(2.5%, -2.5%, 0) scale(1.12);
    }
}

@keyframes twd-caustic {
    from {
        transform: translate3d(-9%, -6%, 0) scale(1.25);
    }

    to {
        transform: translate3d(9%, 8%, 0) scale(1.25);
    }
}

@keyframes twd-art-draw {
    from {
        stroke-dashoffset: 1.03;
    }

    to {
        stroke-dashoffset: 0;
    }
}

@keyframes twd-art-fade {
    from {
        opacity: 0;
    }
}

@keyframes twd-art-breathe {
    from {
        opacity: 1;
        transform: scale(1);
    }

    to {
        opacity: 0.6;
        transform: scale(1.07);
    }
}

@keyframes twd-art-pop {
    from {
        opacity: 0;
        transform: translateY(16px) scale(0.94);
    }
}

@keyframes twd-art-float {
    from {
        transform: translateY(-4px);
    }

    to {
        transform: translateY(5px);
    }
}

@keyframes twd-art-surf {
    from {
        transform: translate(-3px, 2px) rotate(-5deg);
    }

    to {
        transform: translate(4px, -3px) rotate(6deg);
    }
}

@keyframes twd-art-spray {
    0% {
        opacity: 0;
        transform: translate(-10px, 9px) scale(0.5);
    }

    25% {
        opacity: 0.9;
    }

    100% {
        opacity: 0;
        transform: translate(16px, -14px) scale(1.1);
    }
}

@keyframes twd-art-spark {
    from {
        stroke-dashoffset: 1;
    }

    to {
        stroke-dashoffset: 0;
    }
}

/* ---------------------------------------------------------------------------
   Moderation queue
   ---------------------------------------------------------------------------
   Behind a password and never linked from anywhere, so this is styled to be read
   rather than to sell: the facts of a report laid out plainly, and the decisions
   as buttons with room around them. */

.twd-muted {
    color: var(--twd-muted);
}

.twd-notice {
    margin: 1.25rem 0;
    padding: 1rem 1.25rem;
    border: 1px solid var(--twd-border);
    border-radius: var(--twd-radius-sm);
    background: var(--twd-panel);
    color: var(--twd-ink-2);
}

.twd-notice-error {
    border-color: rgba(255, 120, 120, 0.45);
    background: rgba(255, 90, 90, 0.1);
    color: var(--twd-ink);
}

.twd-mod-card {
    margin: 1.25rem 0;
    padding: 1.25rem 1.5rem;
    border: 1px solid var(--twd-border);
    border-radius: var(--twd-radius-sm);
    background: var(--twd-panel);
    backdrop-filter: blur(14px);
}

.twd-mod-card header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    font-size: 1.0625rem;
}

.twd-mod-card dl {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 0.4rem 1.25rem;
    margin: 0 0 1rem;
    font-size: 0.9375rem;
}

.twd-mod-card dt {
    color: var(--twd-muted);
}

.twd-mod-card dd {
    margin: 0;
    color: var(--twd-ink-2);
    overflow-wrap: anywhere;
}

.twd-mod-status {
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 0.75rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.08);
    color: var(--twd-ink-2);
}

.twd-mod-open {
    background: rgba(242, 149, 47, 0.18);
    color: var(--twd-amber);
}

.twd-mod-upheld {
    background: rgba(255, 90, 90, 0.18);
    color: #ff9a9a;
}

.twd-mod-rejected {
    background: rgba(80, 200, 140, 0.16);
    color: #7fd7a4;
}

.twd-mod-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem;
    margin-top: 0.6rem;
}

.twd-mod-actions form {
    display: flex;
    gap: 0.6rem;
    margin: 0;
}

.twd-mod-actions input {
    padding: 0.5rem 0.7rem;
    border: 1px solid var(--twd-border-strong);
    border-radius: var(--twd-radius-sm);
    background: rgba(0, 0, 0, 0.25);
    color: var(--twd-ink);
    font: inherit;
    font-size: 0.9375rem;
    min-width: 16rem;
}

.twd-mod-actions button {
    padding: 0.55rem 1.1rem;
    border: 1px solid var(--twd-border-strong);
    border-radius: var(--twd-radius-sm);
    background: var(--twd-panel-hover);
    color: var(--twd-ink);
    font: inherit;
    font-size: 0.9375rem;
    cursor: pointer;
}

.twd-mod-actions button:hover {
    border-color: var(--twd-accent);
    color: var(--twd-accent-soft);
}

.twd-mod-actions .twd-danger:hover {
    border-color: #ff7676;
    color: #ffb3b3;
}


/* Store buttons on an app's own page. */
.twd-store-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 1.25rem 0 0;
}
