/* =========================================================
   ReadBySight - site.css
   Clean layout shell with banner, rails, and sheet
   ========================================================= */

/* -------------------------
   Root variables
   ------------------------- */
:root {
    --rbs-gray: #f2f4f6;
    --rbs-rail-a: #E8C11C;
    --rbs-rail-b: #CF5044;
    --rbs-rail-c: #699C52;
    --rbs-rail-w: 6px;
    --rbs-sheet-max: 720px;
    --rbs-accent: #CF5044;
}

html {
    height: 100%;
}

body {
    margin: 0;
    min-height: 100%;
    min-height: 100dvh;
    /* Grid is more reliable than flex here: banner + shell fills exactly one viewport when content is short. */
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    background: #fff;
    color: #111;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

/* =========================================================
   Banner
   ========================================================= */

.rbs-header {
    width: 100%;
}

.rbs-banner {
    background: #000;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 14px 0;
    overflow: hidden;
}

    .rbs-banner img {
        width: 360px; /* lock width */
        height: auto; /* preserve aspect ratio */
        display: block;
    }

/* =========================================================
   Gray shell + rails
   ========================================================= */

.rbs-shell {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
    background: var(--rbs-gray);
}

.rbs-railswrap {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    width: min(var(--rbs-sheet-max), calc(100% - 48px));
    margin: 0 auto;
    position: relative;
    min-height: 0;
}

.rbs-railswrap::before,
.rbs-railswrap::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: var(--rbs-rail-w);
    background: linear-gradient(to bottom, var(--rbs-rail-a), var(--rbs-rail-b), var(--rbs-rail-c));
}

.rbs-railswrap::before {
    left: 0;
}

.rbs-railswrap::after {
    right: 0;
}

.rbs-sheet {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    background: #fff;
    margin-left: var(--rbs-rail-w);
    margin-right: var(--rbs-rail-w);
}

/* Keep rails visible on mobile too (just a touch thinner) */
@media (max-width: 480px) {
    :root {
        --rbs-rail-w: 5px;
    }
}

@media (max-width: 480px) {
    .rbs-railswrap {
        width: min(var(--rbs-sheet-max), calc(100% - 24px));
    }
}

.rbs-no-rails::before,
.rbs-no-rails::after {
    display: none !important;
}

@media (min-width: 900px) {
    .rbs-no-rails .rbs-sheet {
        margin-left: 0;
        margin-right: 0;
    }
}

/* =========================================================
   Navigation
   ========================================================= */

.rbs-navrow {
    flex-shrink: 0;
    border-bottom: 1px solid #e7e7e7;
    padding: 14px 24px;
}

.rbs-nav {
    display: flex;
    justify-content: flex-end;
    gap: 18px;
    flex-wrap: wrap;
}

.rbs-navlink {
    text-decoration: none;
    color: #2b2b2b;
    font-size: 14px;
}

    .rbs-navlink:hover {
        text-decoration: underline;
    }

/* =========================================================
   Main content
   ========================================================= */

.rbs-main {
    flex: 1 1 auto;
    min-height: 0;
    padding: 28px 24px 40px 24px;
}

/* =========================================================
   Footer
   ========================================================= */

.rbs-footer {
    flex-shrink: 0;
    border-top: 1px solid #e7e7e7;
    padding: 16px 24px;
    color: #666;
    font-size: 12px;
    text-align: center;
}

.rbs-footer-link {
    color: #666;
    text-decoration: none;
}

.rbs-footer-link:hover {
    text-decoration: underline;
}

.rbs-footer-sep {
    margin: 0 6px;
    color: #999;
}

/* =========================================================
   Buttons
   ========================================================= */

.rbs-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 15px;
    line-height: 1;
    border: 1px solid transparent;
    user-select: none;
}

.rbs-btn-primary {
    background: var(--rbs-accent);
    color: #fff;
}

    .rbs-btn-primary:hover {
        filter: brightness(0.95);
    }

    .rbs-btn-primary:active {
        filter: brightness(0.92);
    }

.rbs-btn-wide {
    min-width: 260px;
}

/* =========================================================
   Home (Index)
   ========================================================= */

.rbs-home-title {
    font-family: Georgia, "Times New Roman", Times, serif;
    font-size: 34px;
    line-height: 1.15;
    letter-spacing: -0.2px;
    font-weight: 400;
    margin: 0 0 14px 0;
}

.rbs-home-paragraph {
    font-size: 16px;
    line-height: 1.6;
    margin: 0 0 18px 0;
    color: #1a1a1a;
}

.rbs-home-paragraph sup {
    font-size: 0.65em;
    vertical-align: super;
    line-height: 0;
}

.rbs-inline-link {
    color: var(--rbs-accent);
    text-decoration: none;
    font-weight: 600;
    margin-left: 4px;
}

    .rbs-inline-link:hover {
        text-decoration: underline;
    }

.rbs-video-thumb {
    display: block;
    margin: 18px 0;
    width: min(360px, 100%);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    border: 1px solid #e7e7e7;
    background: #fff;
    text-decoration: none;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

    .rbs-video-thumb img {
        width: 100%;
        height: auto;
        display: block;
    }

.rbs-play {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
}

    .rbs-play::before {
        content: "";
        width: 64px;
        height: 64px;
        border-radius: 999px;
        background: rgba(0,0,0,0.55);
    }

    .rbs-play::after {
        content: "";
        position: absolute;
        width: 0;
        height: 0;
        border-left: 18px solid #fff;
        border-top: 12px solid transparent;
        border-bottom: 12px solid transparent;
        margin-left: 5px;
    }

.rbs-important-label {
    color: var(--rbs-accent);
    font-weight: 700;
}
.rbs-signup-wrap {
    margin-top: 18px;
    text-align: left;
}

.rbs-privacy-date {
    margin-top: -8px;
    margin-bottom: 24px;
    font-size: 14px;
    color: #666;
}

/* Table of contents (e.g. Terms page) */
.rbs-toc {
    margin: 0 0 24px 0;
    padding: 16px 20px;
    background: #f8f8f8;
    border-radius: 8px;
    border: 1px solid #e7e7e7;
}

.rbs-toc-title {
    margin: 0 0 8px 0;
    font-size: 14px;
    color: #1a1a1a;
}

.rbs-toc-list {
    margin: 0;
    padding-left: 20px;
    font-size: 15px;
    line-height: 1.8;
}

.rbs-toc-list li {
    margin-bottom: 4px;
}

/* Section headings on content pages (e.g. Privacy) */
.rbs-page-h2 {
    font-size: 20px;
    font-weight: 600;
    margin: 28px 0 10px 0;
    color: #1a1a1a;
}

.rbs-page-h2:first-of-type {
    margin-top: 0;
}

@media (max-width: 480px) {
    .rbs-home-title {
        font-size: 28px;
    }
}

/* =========================================================
   Auth (Login / Sign Up)
   ========================================================= */

/* Simple auth block: no card, content flows in the sheet (e.g. Login / magic link) */
.rbs-auth-simple {
    width: 100%;
    max-width: 420px;
}

.rbs-auth-simple .rbs-auth-title { margin: 0; font-size: 26px; }
.rbs-auth-simple .rbs-auth-sub { margin: 6px 0 18px 0; font-size: 14px; color: #666; }

/* Content block used everywhere: no card (no border/radius/box). Visual consistency. */
.rbs-content {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 0;
}

.rbs-auth-title {
    margin: 0;
    font-size: 26px;
}

.rbs-auth-sub {
    margin: 6px 0 18px 0;
    font-size: 14px;
    color: #666;
}

.rbs-form-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px;
}

    .rbs-form-row label {
        font-size: 13px;
        color: #333;
    }

.rbs-input {
    height: 38px;
    border: 1px solid #d9d9d9;
    border-radius: 8px;
    padding: 0 10px;
    font-size: 14px;
}

.rbs-auth-actions {
    margin-top: 10px;
    display: flex;
    justify-content: flex-end;
}

.rbs-auth-alt {
    margin-top: 16px;
    font-size: 13px;
    color: #666;
    text-align: center;
}

    .rbs-auth-alt a {
        font-weight: 600;
        color: #111;
        text-decoration: none;
    }

        .rbs-auth-alt a:hover {
            text-decoration: underline;
        }

/* Optional: make Sign Up look like the primary nav item */
.rbs-primary {
    font-weight: 700;
}

/* POST Test page */
.rbs-posttest {
    max-width: 640px;
}
.rbs-posttest h1 {
    font-size: 22px;
    margin-bottom: 8px;
}
.rbs-posttest p {
    margin-bottom: 16px;
    font-size: 14px;
    color: #444;
}
.rbs-posttest code {
    background: #eee;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 13px;
}
.rbs-posttest-row {
    margin-bottom: 12px;
}
.rbs-posttest-row label {
    display: block;
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 4px;
}
.rbs-posttest-input {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 8px 10px;
    font-family: inherit;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 6px;
}
.rbs-posttest-response {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    min-height: 120px;
    padding: 12px;
    font-family: ui-monospace, monospace;
    font-size: 12px;
    white-space: pre-wrap;
    word-break: break-all;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    margin: 0;
}
.rbs-posttest-response.rbs-posttest-error {
    background: #fff5f5;
    border-color: #f5c6cb;
    color: #721c24;
}
