:root {
    --rs-bg: #f4f2eb;
    --rs-surface: #ffffff;
    --rs-surface-muted: #eef0eb;
    --rs-ink: #18201b;
    --rs-muted: #59645d;
    --rs-border: #aeb6a9;
    --rs-border-strong: #66705f;
    --rs-primary: #b83f26;
    --rs-primary-hover: #96321f;
    --rs-signal-subtle: #fff0e8;
    --rs-success: #27683c;
    --rs-focus: #2358d8;
    --rs-shadow: 0 16px 40px rgba(24, 32, 27, 0.10);
    --rs-radius: 12px;
    --rs-shell: 1440px;
}

html {
    scroll-behavior: smooth;
}

body.rallyside-home {
    margin: 0;
    overflow-x: hidden;
    background: var(--rs-bg);
    color: var(--rs-ink);
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.5;
    text-rendering: optimizeLegibility;
}

.rallyside-home *,
.rallyside-home *::before,
.rallyside-home *::after {
    box-sizing: border-box;
}

.rallyside-home img,
.rallyside-home svg {
    display: block;
}

.rallyside-home a {
    color: inherit;
}

.rs-shell {
    width: min(calc(100% - 48px), var(--rs-shell));
    margin-inline: auto;
}

.rs-skip-link {
    position: fixed;
    z-index: 100;
    inset: 12px auto auto 12px;
    padding: 10px 14px;
    border: 2px solid var(--rs-focus);
    background: var(--rs-surface);
    transform: translateY(-160%);
}

.rs-skip-link:focus {
    transform: translateY(0);
}

.rs-header {
    position: relative;
    z-index: 10;
    border-bottom: 1px solid var(--rs-border-strong);
    background: rgba(244, 242, 235, 0.97);
}

.rs-header-inner {
    min-height: 80px;
    display: grid;
    grid-template-columns: minmax(180px, 1fr) auto minmax(180px, 1fr);
    align-items: center;
    gap: 32px;
}

.rs-brand {
    width: min(220px, 100%);
}

.rs-brand img,
.rs-footer img {
    width: 100%;
    height: auto;
}

.rs-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
}

.rs-nav a {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    padding: 0 4px;
    color: var(--rs-ink);
    font-weight: 650;
    text-decoration: none;
    text-underline-offset: 5px;
}

.rs-nav a:hover {
    color: var(--rs-primary-hover);
    text-decoration: underline;
}

.rs-sign-in {
    justify-self: end;
}

.rs-button {
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 24px;
    border: 1px solid var(--rs-ink);
    border-radius: 2px;
    font-weight: 750;
    line-height: 1.2;
    text-decoration: none;
    transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease, transform 150ms ease;
}

.rs-button:hover {
    transform: translateY(-1px);
}

.rs-button:active {
    transform: translateY(1px);
}

.rs-button-primary {
    border-color: var(--rs-primary-hover);
    background: var(--rs-primary);
    color: #ffffff !important;
    box-shadow: inset 0 1px rgba(255,255,255,0.28);
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%);
}

.rs-button-primary:hover {
    background: var(--rs-primary-hover);
}

.rs-button-secondary {
    background: transparent;
    color: var(--rs-ink);
}

.rs-button-secondary:hover {
    border-color: var(--rs-primary-hover);
    color: var(--rs-primary-hover);
}

.rs-button-link {
    border-color: var(--rs-primary);
    background: var(--rs-surface);
    color: var(--rs-ink);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
}

.rs-button-link:hover {
    border-color: var(--rs-primary-hover);
    color: var(--rs-primary-hover);
}

.rallyside-home a:focus-visible {
    outline: 3px solid var(--rs-focus);
    outline-offset: 3px;
}

.rs-hero {
    border-bottom: 1px solid var(--rs-border-strong);
}

.rs-hero-grid {
    min-height: 620px;
    display: grid;
    grid-template-columns: minmax(0, 0.82fr) minmax(640px, 1.18fr);
    align-items: center;
    gap: clamp(40px, 6vw, 96px);
    padding-block: 56px;
}

.rs-hero-copy {
    max-width: 610px;
}

.rs-hero h1,
.rs-capabilities h2,
.rs-pricing h2 {
    margin: 0;
    color: var(--rs-ink);
    font-weight: 850;
    letter-spacing: -0.045em;
    line-height: 0.98;
}

.rs-hero h1 {
    max-width: 760px;
    font-size: clamp(3.4rem, 5.9vw, 6.25rem);
}

.rs-hero-copy > p {
    max-width: 650px;
    margin: 28px 0 0;
    color: var(--rs-ink);
    font-size: clamp(1.2rem, 1.9vw, 1.65rem);
    line-height: 1.45;
}

.rs-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 32px;
}

.rs-preview {
    overflow: hidden;
    border: 1px solid var(--rs-border-strong);
    border-radius: 18px 18px 4px 18px;
    background: var(--rs-surface);
    box-shadow: var(--rs-shadow);
}

.rs-preview-header {
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--rs-border);
}

.rs-preview-header h2,
.rs-preview-detail h3 {
    margin: 0;
    letter-spacing: -0.02em;
}

.rs-preview-header h2 {
    font-size: 1.35rem;
}

.rs-preview-header p {
    margin: 2px 0 0;
    color: var(--rs-muted);
    font-size: 0.85rem;
}

.rs-preview-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--rs-success);
    font-size: 0.82rem;
    font-weight: 750;
}

.rs-preview-status span {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--rs-success);
}

.rs-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin: 0;
    padding: 18px;
    background: var(--rs-surface-muted);
}

.rs-metric {
    min-height: 128px;
    padding: 16px;
    border: 1px solid var(--rs-border);
    background: var(--rs-surface);
}

.rs-metric dt {
    min-height: 42px;
    color: var(--rs-muted);
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.3;
}

.rs-metric dd {
    margin: 12px 0 0;
    color: var(--rs-ink);
    font-size: clamp(1.45rem, 2.2vw, 2rem);
    font-weight: 850;
    letter-spacing: -0.04em;
    line-height: 1.05;
}

.rs-metric dd strong {
    font: inherit;
}

.rs-metric dd span {
    display: block;
    margin-top: 4px;
    color: var(--rs-muted);
    font-size: 0.75rem;
    font-weight: 650;
    letter-spacing: 0;
}

.rs-preview-detail {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(230px, 0.75fr);
    gap: 16px;
    padding: 18px;
}

.rs-preview-detail > section {
    min-width: 0;
    padding: 16px;
    border: 1px solid var(--rs-border);
}

.rs-preview-detail h3 {
    margin-bottom: 12px;
    font-size: 0.9rem;
}

.rs-activity-list,
.rs-task-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.rs-activity-row {
    display: grid;
    grid-template-columns: minmax(100px, 1.1fr) minmax(120px, 1.25fr) auto auto;
    align-items: center;
    gap: 10px;
    min-height: 38px;
    border-top: 1px solid #dde1da;
    color: var(--rs-muted);
    font-size: 0.72rem;
}

.rs-activity-row:first-child {
    border-top: 0;
}

.rs-activity-row strong {
    overflow: hidden;
    color: var(--rs-ink);
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rs-activity-row time {
    font-variant-numeric: tabular-nums;
}

.rs-activity-row em {
    min-width: 52px;
    padding: 3px 7px;
    font-style: normal;
    font-weight: 750;
    text-align: center;
}

.rs-activity-row .is-paid {
    background: #e3f2e6;
    color: var(--rs-success);
}

.rs-activity-row .is-viewed {
    background: var(--rs-signal-subtle);
    color: #9b3a10;
}

.rs-task-list li {
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-top: 1px solid #dde1da;
    font-size: 0.72rem;
}

.rs-task-list li:first-child {
    border-top: 0;
}

.rs-task-list span {
    min-width: 0;
}

.rs-task-list strong {
    flex: 0 0 auto;
    color: var(--rs-primary-hover);
    font-size: 0.68rem;
}

.rs-capabilities {
    padding-block: 52px 60px;
    border-bottom: 1px solid var(--rs-border-strong);
    background: #fbfaf6;
}

.rs-capabilities h2 {
    font-size: clamp(2.25rem, 4vw, 4rem);
    text-align: center;
}

.rs-capability-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    margin-top: 44px;
}

.rs-capability {
    min-width: 0;
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 20px;
    padding: 0 36px;
    border-left: 1px solid var(--rs-border-strong);
}

.rs-capability:first-child {
    padding-left: 0;
    border-left: 0;
}

.rs-capability:last-child {
    padding-right: 0;
}

.rs-icon {
    width: 72px;
    height: 72px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--rs-ink);
    color: var(--rs-ink);
}

.rs-icon svg {
    width: 34px;
    height: 34px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.7;
}

.rs-capability h3 {
    margin: 2px 0 8px;
    font-size: 1.15rem;
    letter-spacing: -0.02em;
}

.rs-capability p {
    margin: 0;
    color: var(--rs-muted);
}

.rs-pricing {
    padding-block: 48px;
    background: var(--rs-bg);
}

.rs-pricing-heading { max-width: 720px; }

.rs-pricing h2 {
    font-size: clamp(2rem, 3.5vw, 3.35rem);
}

.rs-pricing p {
    max-width: 720px;
    margin: 14px 0 0;
    color: var(--rs-muted);
    font-size: 1.05rem;
}

.rs-pricing .rs-button {
    flex: 0 0 auto;
}

.rs-plan-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 30px; }
.rs-plan { display: flex; min-width: 0; flex-direction: column; padding: 28px; border: 1px solid var(--rs-border); border-radius: 16px 16px 4px; background: #fff; box-shadow: 0 12px 30px rgb(17 24 39 / 7%); }
.rs-plan.is-featured { border-color: var(--rs-blue); box-shadow: inset 0 4px 0 var(--rs-blue), 0 12px 30px rgb(17 24 39 / 7%); }
.rs-plan h3 { margin: 0; font-size: 1.55rem; }
.rs-plan > div > p { min-height: 3.2em; }
.rs-pricing .rs-plan-price { display: grid; margin: 22px 0 18px; }
.rs-plan-price strong { color: var(--rs-ink); font-size: 2.8rem; line-height: 1; letter-spacing: -.04em; }
.rs-plan-price span { margin-top: 4px; font-size: .86rem; }
.rs-plan ul { display: grid; gap: 9px; margin: 0 0 24px; padding: 0; list-style: none; }
.rs-plan li { display: flex; gap: 9px; }
.rs-plan li::before { color: var(--rs-green); content: "✓"; font-weight: 900; }
.rs-plan .rs-button { width: 100%; margin-top: auto; }
.rs-pricing .rs-pricing-more { max-width: none; margin-top: 20px; text-align: center; }
.rs-pricing-more a { color: var(--rs-blue); font-weight: 800; text-underline-offset: 4px; }

.rs-footer {
    padding-block: 40px;
    background: var(--rs-ink);
    color: #f7f6f1;
}

.rs-footer .rs-shell {
    display: grid;
    grid-template-columns: 170px minmax(0, 1fr) auto;
    align-items: center;
    gap: 32px;
}

.rs-footer p,
.rs-footer small {
    margin: 0;
}

.rs-footer p {
    color: #d8ddd7;
}

.rs-footer small {
    color: #aeb7ae;
}

@media (max-width: 1120px) {
    .rs-header-inner {
        grid-template-columns: minmax(180px, 1fr) auto auto;
        gap: 24px;
    }

    .rs-nav {
        gap: 24px;
    }

    .rs-hero-grid {
        grid-template-columns: 1fr;
        gap: 44px;
    }

    .rs-hero-copy {
        max-width: 820px;
    }

    .rs-hero h1 {
        max-width: 900px;
    }

    .rs-capability {
        grid-template-columns: 56px minmax(0, 1fr);
        gap: 16px;
        padding-inline: 24px;
    }

    .rs-icon {
        width: 56px;
        height: 56px;
    }

    .rs-icon svg {
        width: 28px;
        height: 28px;
    }
}

@media (max-width: 760px) {
    .rs-shell {
        width: min(calc(100% - 32px), var(--rs-shell));
    }

    .rs-header-inner {
        min-height: 0;
        grid-template-columns: minmax(150px, 1fr) auto;
        gap: 12px;
        padding-block: 12px;
    }

    .rs-brand {
        width: 180px;
    }

    .rs-nav {
        grid-column: 1 / -1;
        grid-row: 2;
        justify-content: space-between;
        gap: 8px;
        padding-top: 8px;
        border-top: 1px solid var(--rs-border);
    }

    .rs-nav a {
        min-height: 44px;
        padding-inline: 8px;
        font-size: 0.92rem;
    }

    .rs-sign-in {
        min-height: 44px;
        padding-inline: 18px;
    }

    .rs-hero-grid {
        min-height: 0;
        padding-block: 44px;
    }

    .rs-hero h1 {
        font-size: clamp(3rem, 14vw, 5rem);
    }

    .rs-hero-copy > p {
        margin-top: 24px;
        font-size: 1.2rem;
    }

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

    .rs-preview-detail {
        grid-template-columns: 1fr;
    }

    .rs-capability-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .rs-capability,
    .rs-capability:first-child,
    .rs-capability:last-child {
        padding: 0 0 28px;
        border: 0;
        border-bottom: 1px solid var(--rs-border);
    }

    .rs-capability:last-child {
        padding-bottom: 0;
        border-bottom: 0;
    }

    .rs-plan-grid { grid-template-columns: 1fr; }

    .rs-footer .rs-shell {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .rs-footer img {
        width: 160px;
    }
}

@media (max-width: 460px) {
    .rs-brand {
        width: 154px;
    }

    .rs-sign-in {
        padding-inline: 14px;
    }

    .rs-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .rs-actions .rs-button,
    .rs-pricing .rs-button {
        width: 100%;
    }

    .rs-preview {
        margin-inline: -4px;
        border-radius: 12px 12px 3px 12px;
    }

    .rs-metrics,
    .rs-preview-detail {
        padding: 12px;
    }

    .rs-metric {
        min-height: 118px;
        padding: 12px;
    }

    .rs-activity-row {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 4px 12px;
        padding-block: 8px;
    }

    .rs-activity-row strong,
    .rs-activity-row span {
        overflow: visible;
        text-overflow: clip;
        white-space: normal;
    }

    .rs-activity-row time {
        grid-column: 1;
    }

    .rs-activity-row em {
        grid-column: 2;
        grid-row: 1 / span 2;
    }

    .rs-capabilities {
        padding-block: 44px;
    }

    .rs-capabilities h2 {
        text-align: left;
    }

    .rs-capability {
        grid-template-columns: 48px minmax(0, 1fr);
        gap: 14px;
    }

    .rs-icon {
        width: 48px;
        height: 48px;
    }

    .rs-icon svg {
        width: 24px;
        height: 24px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .rs-button {
        transition: none;
    }
}
