/* =========================================================
   REDTECH One brand and UI system, for the live-demo pages.
   Tokens are copied from the REDTECH One Brand System (Appendix A):
   dark is the default on :root, light overrides the same properties on
   :root[data-theme="light"]. Components below reach only for tokens.
   ========================================================= */

:root {
    --brand: #e3161f;
    --brand-strong: #c0111a;
    --brand-soft: rgba(227, 22, 31, 0.14);
    --brand-line: rgba(227, 22, 31, 0.45);
    --brand-text: #ff4b54;
    --brand-ink: #ffd2d4;
    --gold: #f5b40a;
    --gold-soft: rgba(245, 180, 10, 0.14);
    --focus-ring: #f5b40a;
    --canvas: #050505;
    --surface: #0f0f10;
    --surface-2: #161617;
    --surface-3: #1f1f21;
    --line: #232325;
    --line-strong: #37373b;
    --ink: #ffffff;
    --ink-2: #c8c8cc;
    --ink-3: #8d8d93;
    --success: #4ade80;
    --warning: #f5b40a;
    --danger: #ff4d55;
    --info: #e4e4e7;
    --neutral: #a1a1aa;
    --success-soft: rgba(74, 222, 128, 0.13);
    --danger-soft: rgba(255, 77, 85, 0.13);
    --info-soft: rgba(228, 228, 231, 0.1);
    --neutral-soft: rgba(161, 161, 170, 0.12);
    --success-ink: #bdf3d1;
    --warning-ink: #f6dfa4;
    --danger-ink: #ff9a9f;
    --rejected-fg: #ff8f95;
    --rejected-bg: rgba(160, 24, 34, 0.25);
    --rejected-border: #a01822;
    --field-bg: var(--surface-2);
    --field-border: var(--line-strong);
    --field-border-hover: #55555b;
    --field-readonly-bg: var(--surface);
    --field-readonly-border: var(--line);
    --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-2: 0 6px 20px rgba(0, 0, 0, 0.45);
    --shadow-3: 0 18px 48px rgba(0, 0, 0, 0.55);
    --radius-ui: 8px;
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 24px;
    --space-6: 32px;
    --space-7: 48px;
    --space-8: 64px;
    --font-sans: "Inter", "Inter var", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-mono: "IBM Plex Mono", "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    --shell-max: 1400px;
    --sidebar-w: 256px;
    --topbar-h: 60px;
    --nav-text: #d4d4d8;
    --nav-ink: #ffffff;
    --nav-ink-2: rgba(255, 255, 255, 0.7);
    --nav-ink-3: rgba(255, 255, 255, 0.48);
    --nav-line: rgba(255, 255, 255, 0.1);
    --nav-surface: rgba(255, 255, 255, 0.06);
    --nav-bg: #000000;
    --nav-bg-2: #120304;
    --nav-active: #1c1c1e;
    --on-brand: #ffffff;
    --globe-opacity: 0.6;
    --canvas-art:
        radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.05) 1px, transparent 0) 0 0 / 24px 24px repeat,
        radial-gradient(1100px 620px at 100% -6%, rgba(227, 22, 31, 0.2), transparent 62%) no-repeat,
        radial-gradient(900px 560px at 0% 106%, rgba(227, 22, 31, 0.1), transparent 64%) no-repeat,
        linear-gradient(180deg, #0b0506 0%, #070304 52%, #050303 100%) no-repeat;
    color-scheme: dark;
}

:root[data-theme="light"] {
    --brand-soft: rgba(227, 22, 31, 0.08);
    --brand-line: rgba(227, 22, 31, 0.3);
    --brand-text: #c0111a;
    --brand-ink: #8f1016;
    --gold: #92600a;
    --gold-soft: rgba(146, 96, 10, 0.12);
    --focus-ring: #92600a;
    --canvas: #fbf3f4;
    --surface: #ffffff;
    --surface-2: #f8f1f2;
    --surface-3: #efe4e6;
    --line: #ebdfe1;
    --line-strong: #d8c9cc;
    --ink: #1a1618;
    --ink-2: #4a4247;
    --ink-3: #7a7177;
    --warning: #8a5c08;
    --info: #4a4247;
    --neutral: #6b636a;
    --success-soft: rgba(21, 122, 67, 0.1);
    --danger-soft: rgba(194, 31, 39, 0.1);
    --info-soft: rgba(74, 66, 71, 0.07);
    --neutral-soft: rgba(107, 99, 106, 0.1);
    --success-ink: #0f5132;
    --warning-ink: #6b4a06;
    --danger-ink: #8f1016;
    --rejected-fg: #7a0c13;
    --rejected-bg: rgba(160, 24, 34, 0.1);
    --field-bg: #ffffff;
    --field-border: #9a8d93;
    --field-border-hover: #6f6268;
    --field-readonly-bg: #f4eced;
    --field-readonly-border: #e3d7da;
    --shadow-1: 0 1px 2px rgba(30, 20, 20, 0.07);
    --shadow-2: 0 6px 20px rgba(30, 20, 20, 0.09);
    --shadow-3: 0 18px 48px rgba(30, 20, 20, 0.14);
    --nav-bg: #0b0607;
    --nav-bg-2: #1c0608;
    --nav-active: #241012;
    --globe-opacity: 0.7;
    --canvas-art:
        radial-gradient(circle at 1px 1px, rgba(120, 72, 82, 0.07) 1px, transparent 0) 0 0 / 24px 24px repeat,
        radial-gradient(900px 520px at 2% -10%, rgba(99, 122, 214, 0.09), transparent 64%) no-repeat,
        radial-gradient(1100px 620px at 100% -8%, rgba(227, 22, 31, 0.08), transparent 62%) no-repeat,
        linear-gradient(180deg, #fdf4f5 0%, #fbf1f2 46%, #faf6f6 100%) no-repeat;
    color-scheme: light;
}

/* ---------------------------------------------------------
   Base
   --------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--canvas-art), var(--canvas);
    background-attachment: fixed;
    color: var(--ink);
    font-family: var(--font-sans);
    font-size: 0.9375rem;
    line-height: 1.55;
    font-feature-settings: "cv02", "cv03", "cv04", "cv11";
    -webkit-font-smoothing: antialiased;
}

@media (max-width: 768px) { body { background-attachment: scroll; } }

img { display: block; max-width: 100%; }
a { color: inherit; }
button, input { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; color: var(--ink); }
h1 { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem); font-weight: 800; letter-spacing: -0.022em; line-height: 1.15; }
h2 { font-size: clamp(1.25rem, 1.1rem + 0.7vw, 1.5rem); font-weight: 700; letter-spacing: -0.018em; line-height: 1.2; }
h3 { font-size: 1.125rem; font-weight: 700; letter-spacing: -0.012em; line-height: 1.4; }
h4 { font-size: 1rem; font-weight: 700; letter-spacing: -0.008em; line-height: 1.45; }
p { margin: 0; }

:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; border-radius: var(--radius-ui); }

.mono { font-family: var(--font-mono); font-variant-ligatures: none; letter-spacing: -0.01em; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.rt-skip {
    position: absolute; left: var(--space-4); top: -60px; z-index: 100;
    padding: var(--space-2) var(--space-4); border-radius: var(--radius-ui);
    background: var(--brand); color: var(--on-brand); font-weight: 600; text-decoration: none;
}
.rt-skip:focus { top: var(--space-3); }

.rt-shell { width: 100%; max-width: var(--shell-max); margin: 0 auto; padding: 0 clamp(20px, 5vw, 64px); }
.rt-main { position: relative; flex: 1; }

/* ---------------------------------------------------------
   Type roles
   --------------------------------------------------------- */

.rt-eyebrow { display: inline-block; font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; color: var(--brand-text); }
.rt-micro { font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
.rt-hero-title { font-size: clamp(2rem, 1.2rem + 3.3vw, 3.25rem); font-weight: 800; letter-spacing: -0.035em; line-height: 1.06; }
.rt-hero-title span { display: block; color: var(--brand); }
.rt-hero-lead { font-size: clamp(1.0625rem, 0.98rem + 0.4vw, 1.3125rem); font-weight: 700; line-height: 1.4; color: var(--ink); }
.rt-lead { font-size: 1rem; line-height: 1.65; color: var(--ink-2); max-width: 65ch; }
.rt-body { color: var(--ink-2); line-height: 1.65; }
.rt-helper { font-size: 0.75rem; line-height: 1.45; color: var(--ink-3); }
.rt-subhead { font-weight: 700; text-decoration: underline; text-decoration-color: var(--brand); text-decoration-thickness: 2px; text-underline-offset: 0.3em; }

/* ---------------------------------------------------------
   Buttons
   --------------------------------------------------------- */

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    min-height: 36px; padding: 0.5rem 0.95rem;
    border: 1px solid transparent; border-radius: var(--radius-ui);
    font-size: 0.875rem; font-weight: 600; line-height: 1.2; white-space: nowrap;
    text-decoration: none; cursor: pointer;
    transition: background-color 0.12s ease, border-color 0.12s ease, color 0.12s ease, transform 0.06s ease;
}
.btn:active { transform: translateY(1px); }
.btn-sm { min-height: 28px; padding: 0.3rem 0.7rem; font-size: 0.8125rem; }
.btn-lg { min-height: 44px; padding: 0.65rem 1.25rem; font-size: 0.9375rem; }
.btn-hero { text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700; }
.btn-block { width: 100%; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.btn-primary:hover { background: var(--brand-strong); border-color: var(--brand-strong); }
.btn-outline { background: transparent; border-color: var(--line-strong); color: var(--ink); }
.btn-outline:hover { background: var(--surface-2); }
.btn-outline-brand { background: transparent; border-color: var(--brand); color: var(--brand-text); }
.btn-outline-brand:hover { background: var(--brand); color: var(--on-brand); }
.btn-ghost { background: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: var(--surface-2); color: var(--ink); }
.btn .bi { font-size: 1em; }

/* ---------------------------------------------------------
   Badges, alerts
   --------------------------------------------------------- */

.rt-badge {
    display: inline-flex; align-items: center; gap: 0.3rem;
    padding: 0.18rem 0.55rem; border: 1px solid; border-radius: 999px;
    font-size: 0.6875rem; font-weight: 700; line-height: 1.35; white-space: nowrap;
}
.rt-badge--success { color: var(--success-ink); background: var(--success-soft); border-color: var(--success-ink); }
.rt-badge--warning { color: var(--warning-ink); background: var(--gold-soft); border-color: var(--warning-ink); }
.rt-badge--danger { color: var(--danger-ink); background: var(--danger-soft); border-color: var(--danger-ink); }
.rt-badge--brand { color: var(--brand-ink); background: var(--brand-soft); border-color: var(--brand-line); }
.rt-badge--info { color: var(--ink-2); background: var(--info-soft); border-color: var(--line-strong); }
.rt-badge--neutral { color: var(--ink-3); background: var(--neutral-soft); border-color: var(--line-strong); }

.rt-alert {
    display: flex; gap: var(--space-3); align-items: flex-start;
    padding: 0.85rem 1rem; border: 1px solid; border-radius: var(--radius-ui);
    font-size: 0.875rem; line-height: 1.5;
}
.rt-alert > .bi { flex: none; font-size: 1.05rem; line-height: 1.3; }
.rt-alert strong { display: block; color: inherit; }
.rt-alert--brand { background: var(--brand-soft); border-color: var(--brand-line); color: var(--brand-ink); }
.rt-alert--brand > .bi { color: var(--brand-text); }
.rt-alert--warning { background: var(--gold-soft); border-color: var(--gold); color: var(--warning-ink); }
.rt-alert--warning > .bi { color: var(--gold); }
.rt-alert--info { background: var(--info-soft); border-color: var(--line-strong); color: var(--ink-2); }
.rt-alert--info > .bi { color: var(--ink-3); }

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

.rt-form { display: grid; gap: var(--space-4); }
.rt-field { display: grid; gap: 6px; }
.rt-label-row { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-3); }
.rt-label { font-size: 0.8125rem; font-weight: 600; color: var(--ink-2); }
.rt-req { color: var(--brand-text); margin-left: 2px; }
.rt-control { position: relative; display: block; }
.rt-control > .bi { position: absolute; left: 0.75rem; top: 50%; transform: translateY(-50%); color: var(--ink-3); font-size: 0.95rem; pointer-events: none; }

.rt-input {
    width: 100%; min-height: 38px; padding: 0.5rem 0.7rem;
    border: 1px solid var(--field-border); border-radius: var(--radius-ui);
    background: var(--field-bg); color: var(--ink);
    font-size: 0.875rem;
    transition: border-color 0.12s ease;
}
.rt-input::placeholder { color: var(--ink-3); }
.rt-input:hover { border-color: var(--field-border-hover); }
.rt-input:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.rt-control > .bi + .rt-input { padding-left: 2.25rem; }
.rt-control--reveal .rt-input { padding-right: 2.75rem; }

.rt-reveal {
    position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
    display: grid; place-items: center; width: 32px; height: 30px;
    border: 0; border-radius: var(--radius-ui); background: transparent; color: var(--ink-3); cursor: pointer;
}
.rt-reveal:hover { color: var(--ink); background: var(--surface-3); }

.rt-link { color: var(--brand-text); font-size: 0.8125rem; font-weight: 600; text-decoration: none; }
.rt-link:hover { text-decoration: underline; text-underline-offset: 3px; }

.rt-check { display: flex; align-items: center; gap: var(--space-2); font-size: 0.8125rem; color: var(--ink-2); cursor: pointer; }
.rt-check input { width: 16px; height: 16px; margin: 0; accent-color: var(--brand); }

.rt-form__note { display: flex; gap: 6px; align-items: center; justify-content: center; }

/* ---------------------------------------------------------
   Cards, tiles, auth card
   --------------------------------------------------------- */

.rt-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-ui); box-shadow: var(--shadow-1); overflow: hidden; }
.rt-card__head { display: flex; justify-content: space-between; align-items: center; gap: var(--space-3); padding: var(--space-3) var(--space-4); background: var(--surface-2); border-bottom: 1px solid var(--line); }
.rt-card__body { padding: var(--space-4); }

.rt-auth {
    width: 100%; max-width: 440px;
    padding: var(--space-6) var(--space-6) var(--space-5);
    background: var(--surface); border: 1px solid var(--line); border-top: 2px solid var(--brand);
    border-radius: var(--radius-ui); box-shadow: var(--shadow-2);
}
.rt-auth__head { margin-bottom: var(--space-5); }
.rt-auth__head h1, .rt-auth__head h2 { font-size: clamp(1.25rem, 1.1rem + 0.7vw, 1.5rem); }
.rt-auth__head p { margin-top: 6px; color: var(--ink-3); font-size: 0.875rem; }
.rt-auth__foot { margin-top: var(--space-5); padding-top: var(--space-4); border-top: 1px solid var(--line); text-align: center; font-size: 0.8125rem; color: var(--ink-3); }

.rt-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-3); }
.rt-tile { position: relative; padding: var(--space-4); background: var(--surface); border: 1px solid var(--line); border-left: 2px solid var(--brand); border-radius: var(--radius-ui); }
.rt-tile__label { font-size: 0.8125rem; color: var(--ink-2); line-height: 1.35; }
.rt-tile__value { display: block; margin: 6px 0 4px; font-family: var(--font-mono); font-size: 1.75rem; font-weight: 600; letter-spacing: -0.02em; line-height: 1; color: var(--ink); }
.rt-tile__note { font-size: 0.75rem; color: var(--ink-3); }
@media (max-width: 576px) { .rt-tiles { grid-template-columns: 1fr 1fr; } }

.rt-icon-tile {
    display: grid; place-items: center; flex: none;
    width: 38px; height: 38px; border-radius: var(--radius-ui);
    background: var(--brand-soft); border: 1px solid var(--brand-line); color: var(--brand-text);
    font-size: 1.05rem;
}

/* Entry cards: the routes into a product. */
.rt-entry {
    display: flex; flex-direction: column; gap: var(--space-2);
    padding: var(--space-5); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-ui);
    text-decoration: none; color: var(--ink);
    transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.rt-entry:hover { transform: translateY(-2px); border-color: var(--brand-line); box-shadow: var(--shadow-2); }
.rt-entry .rt-icon-tile { margin-bottom: var(--space-2); }
.rt-entry__title { font-size: 1rem; font-weight: 700; }
.rt-entry__note { font-size: 0.875rem; color: var(--ink-3); line-height: 1.5; }
.rt-entry__go { margin-top: auto; padding-top: var(--space-3); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--brand-text); }
.rt-entry__go .bi { display: inline-block; transition: transform 0.2s ease; }
.rt-entry:hover .rt-entry__go .bi { transform: translateX(4px); }

/* Tabs */
.rt-tabs { display: flex; flex-wrap: wrap; gap: var(--space-1); border-bottom: 1px solid var(--line); margin-bottom: var(--space-5); }
.rt-tab { padding: 0.6rem 0.9rem; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; background: transparent; color: var(--ink-3); font-size: 0.875rem; font-weight: 600; cursor: pointer; border-radius: var(--radius-ui) var(--radius-ui) 0 0; }
.rt-tab:hover { color: var(--ink); }
.rt-tab[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--brand); }

/* Tables */
.rt-table { width: 100%; border-collapse: collapse; font-size: 0.8125rem; }
.rt-table th { padding: 0.55rem 0.75rem; background: var(--surface-2); color: var(--ink-3); font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; text-align: left; border-bottom: 1px solid var(--line); }
.rt-table td { padding: 0.65rem 0.75rem; border-bottom: 1px solid var(--line); color: var(--ink-2); vertical-align: middle; }
.rt-table tr:last-child td { border-bottom: 0; }
.rt-table td:first-child { color: var(--ink); font-weight: 600; }

/* Chips */
.rt-chips { display: flex; flex-wrap: wrap; gap: var(--space-2); padding: 0; margin: 0; list-style: none; }
.rt-chip { display: inline-flex; align-items: center; gap: 6px; padding: 0.3rem 0.75rem; border-radius: 999px; background: var(--surface-3); border: 1px solid var(--line); color: var(--ink-2); font-size: 0.8125rem; }
.rt-chip .bi { color: var(--brand-text); }

/* ---------------------------------------------------------
   The rail: header and footer, dark in both themes
   --------------------------------------------------------- */

.rt-header {
    position: sticky; top: 0; z-index: 30;
    background: color-mix(in srgb, var(--nav-bg) 94%, transparent);
    -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--nav-line);
}
.rt-header__in { display: flex; align-items: center; gap: var(--space-4); height: 64px; }
.rt-header__nav { display: flex; align-items: center; gap: var(--space-2); margin-left: auto; }

.rt-lockup { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--nav-ink); }
.rt-lockup img { width: auto; height: 30px; }
.rt-lockup__text { display: grid; line-height: 1.1; }
.rt-lockup__text b { font-size: 0.9375rem; font-weight: 700; letter-spacing: -0.01em; }
.rt-lockup__text small { font-size: 0.625rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--nav-ink-3); }

.rt-railchip { display: inline-flex; align-items: center; gap: 7px; padding: 0.22rem 0.65rem; border-radius: 999px; background: var(--nav-surface); border: 1px solid var(--nav-line); color: var(--nav-ink-2); font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.rt-railchip i { width: 7px; height: 7px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 0 var(--brand-line); animation: rt-pulse 2s infinite; }
@keyframes rt-pulse { 70% { box-shadow: 0 0 0 6px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }

.rt-navlink { display: inline-flex; align-items: center; gap: 6px; padding: 0.45rem 0.7rem; border-radius: var(--radius-ui); color: var(--nav-text); font-size: 0.75rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; text-decoration: none; transition: background-color 0.12s ease, color 0.12s ease; }
.rt-navlink:hover { background: var(--nav-active); color: var(--nav-ink); }

.rt-theme { display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid var(--nav-line); border-radius: var(--radius-ui); background: var(--nav-surface); color: var(--nav-text); cursor: pointer; transition: background-color 0.12s ease, color 0.12s ease; }
.rt-theme:hover { background: var(--nav-active); color: var(--nav-ink); }
.rt-theme .bi-sun { display: none; }
:root[data-theme="light"] .rt-theme .bi-sun { display: inline; }
:root[data-theme="light"] .rt-theme .bi-moon-stars { display: none; }

@media (max-width: 768px) {
    .rt-header__in { gap: var(--space-2); }
    .rt-railchip, .rt-navlink span { display: none; }
    .rt-lockup__text small { display: none; }
}
@media (max-width: 420px) { .rt-header .btn-primary span { display: none; } }

.rt-footer { background: var(--nav-bg); color: var(--nav-text); border-top: 1px solid var(--nav-line); margin-top: auto; }
.rt-footer__grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: var(--space-6); padding-top: var(--space-7); padding-bottom: var(--space-6); }
.rt-footer__about { max-width: 34ch; margin-top: var(--space-4); font-size: 0.8125rem; line-height: 1.6; color: var(--nav-ink-2); }
.rt-footer__title { margin: 0 0 var(--space-3); font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--nav-ink-3); }
.rt-footer ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 0; }
.rt-footer li a { display: inline-block; padding: 5px 0; font-size: 0.8125rem; line-height: 1.35; color: var(--nav-text); text-decoration: none; }
.rt-footer li a:hover { color: var(--nav-ink); text-decoration: underline; text-underline-offset: 3px; }
.rt-footer li a[aria-current="page"] { color: var(--nav-ink); font-weight: 600; }
.rt-footer li a[aria-current="page"]::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 8px; border-radius: 50%; background: var(--brand); vertical-align: middle; }
.rt-footer__base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-3); padding-top: var(--space-4); padding-bottom: var(--space-5); border-top: 1px solid var(--nav-line); font-size: 0.75rem; color: var(--nav-ink-3); }
@media (max-width: 992px) { .rt-footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 576px) { .rt-footer__grid { grid-template-columns: 1fr; gap: var(--space-5); } }

/* ---------------------------------------------------------
   Sections, features, call to action
   --------------------------------------------------------- */

.rt-section { padding: clamp(56px, 6vw, 88px) 0; }
.rt-section__head { max-width: 720px; margin-bottom: var(--space-7); }
.rt-section__head h2 { margin-top: var(--space-2); }
.rt-section__head p { margin-top: var(--space-3); }
.rt-section--line { border-top: 1px solid var(--line); }

.rt-features { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-4); }
.rt-feature { display: flex; flex-direction: column; gap: var(--space-2); padding: var(--space-5); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-ui); transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease; }
.rt-feature:hover { transform: translateY(-2px); border-color: var(--brand-line); box-shadow: var(--shadow-2); }
.rt-feature .rt-icon-tile { margin-bottom: var(--space-2); }
.rt-feature h3 { font-size: 1rem; }
.rt-feature p { font-size: 0.875rem; color: var(--ink-3); line-height: 1.55; }
.rt-feature__n { font-family: var(--font-mono); font-size: 0.75rem; color: var(--ink-3); margin-left: auto; }
.rt-feature__top { display: flex; align-items: flex-start; }

/* Rows: grouped with hairlines instead of cards. */
.rt-features--rows { grid-template-columns: 1fr; gap: 0; border-top: 1px solid var(--line); }
.rt-features--rows .rt-feature { display: grid; grid-template-columns: 38px minmax(0, 1fr) minmax(0, 1.4fr); align-items: center; gap: var(--space-5); padding: var(--space-5) var(--space-2); background: transparent; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; }
.rt-features--rows .rt-feature:hover { transform: none; box-shadow: none; background: var(--brand-soft); }
.rt-features--rows .rt-feature .rt-icon-tile { margin: 0; }
.rt-features--rows .rt-feature__top { display: contents; }
.rt-features--rows .rt-feature__n { display: none; }

/* Bento: the first point leads. */
.rt-features--bento .rt-feature:first-child { grid-column: span 2; grid-row: span 2; justify-content: flex-end; background: linear-gradient(160deg, var(--surface), var(--brand-soft)); border-color: var(--brand-line); }
.rt-features--bento .rt-feature:first-child h3 { font-size: clamp(1.25rem, 1.1rem + 0.7vw, 1.5rem); }
.rt-features--bento .rt-feature:first-child p { font-size: 0.9375rem; color: var(--ink-2); max-width: 46ch; }

@media (max-width: 992px) {
    .rt-features { grid-template-columns: 1fr 1fr; }
    .rt-features--bento .rt-feature:first-child { grid-row: auto; }
}
@media (max-width: 640px) {
    .rt-features, .rt-features--rows { grid-template-columns: 1fr; }
    .rt-features--bento .rt-feature:first-child { grid-column: auto; }
    .rt-features--rows .rt-feature { grid-template-columns: 38px 1fr; }
    .rt-features--rows .rt-feature p { grid-column: 2; }
}

.rt-cta {
    position: relative; overflow: hidden;
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-5);
    margin-top: var(--space-7); padding: var(--space-6);
    background: var(--surface); border: 1px solid var(--brand-line); border-radius: var(--radius-ui); box-shadow: var(--shadow-1);
}
.rt-cta::before { content: ""; position: absolute; inset: 0; background: radial-gradient(600px 240px at 100% 0%, var(--brand-soft), transparent 70%); pointer-events: none; }
.rt-cta > * { position: relative; }
.rt-cta h2 { font-size: clamp(1.25rem, 1.1rem + 0.7vw, 1.5rem); }
.rt-cta p { margin-top: 6px; color: var(--ink-2); }
.rt-cta__actions { display: flex; flex-wrap: wrap; gap: var(--space-3); }

/* ---------------------------------------------------------
   The dot globe (public/js/demo-globe.js): background art only
   --------------------------------------------------------- */

.rt-globe {
    position: absolute; z-index: 0; pointer-events: none;
    aspect-ratio: 1; opacity: var(--globe-opacity);
    -webkit-mask-image: radial-gradient(circle at center, #000 48%, transparent 70%);
    mask-image: radial-gradient(circle at center, #000 48%, transparent 70%);
    animation: rt-globe-in 1.2s ease both;
}
@keyframes rt-globe-in { from { opacity: 0; transform: scale(0.96); } }
@media (max-width: 768px) { .rt-globe { opacity: 0.28; } }

/* ---------------------------------------------------------
   Demo prompt
   --------------------------------------------------------- */

.rt-modal { width: min(440px, calc(100vw - 32px)); padding: 0; border: 0; background: transparent; color: var(--ink); }
.rt-modal::backdrop { background: rgba(0, 0, 0, 0.62); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.rt-modal__card { padding: var(--space-6); background: var(--surface); border: 1px solid var(--line); border-top: 2px solid var(--brand); border-radius: var(--radius-ui); box-shadow: var(--shadow-3); text-align: center; }
.rt-modal__card .rt-icon-tile { margin: 0 auto var(--space-4); width: 48px; height: 48px; font-size: 1.3rem; }
.rt-modal__card h2 { font-size: clamp(1.25rem, 1.1rem + 0.7vw, 1.5rem); }
.rt-modal__card p { margin: var(--space-2) 0 var(--space-5); color: var(--ink-2); }
.rt-modal__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-3); }

/* ---------------------------------------------------------
   Scroll reveal
   --------------------------------------------------------- */

.js .reveal { opacity: 0; transform: translateY(12px); transition: opacity 0.5s ease var(--d, 0ms), transform 0.5s ease var(--d, 0ms); }
.js .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
    .js .reveal { opacity: 1; transform: none; }
}

/* ---------------------------------------------------------
   Demo page layouts
   --------------------------------------------------------- */

.rt-hero { position: relative; overflow: hidden; padding: clamp(40px, 6vw, 88px) 0; }
.rt-hero > .rt-shell { position: relative; z-index: 1; }
.rt-split { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 440px); gap: clamp(32px, 5vw, 72px); align-items: center; }
.rt-copy > * + * { margin-top: var(--space-4); }
.rt-copy .rt-hero-title { margin-top: var(--space-3); }
.rt-copy .rt-body { max-width: 41rem; text-align: justify; }
@media (max-width: 576px) { .rt-copy .rt-body { text-align: left; } }
@media (max-width: 992px) {
    .rt-split { grid-template-columns: minmax(0, 1fr); }
    .rt-split > .rt-auth, .rt-split > .rt-auth-col { order: -1; justify-self: center; }
}
.rt-auth-col { display: grid; gap: var(--space-4); justify-items: center; width: 100%; }
.rt-sample { display: inline-flex; align-items: center; gap: 6px; font-size: 0.75rem; color: var(--ink-3); }

/* A bento of five: the last point fills the row. */
.rt-features--bento .rt-feature:nth-child(5):last-child { grid-column: span 2; }
@media (max-width: 992px) { .rt-features--bento .rt-feature:nth-child(5):last-child { grid-column: auto; } }
@media (max-width: 576px) { .rt-auth { padding: var(--space-5) var(--space-4); } .rt-cta { padding: var(--space-5); } }
