/* RAMMIT website. Built from the app's own Dark theme (Production/RAMMIT-Stable/Src/Dark/CSS/Style.css):
   same colours, Segoe UI, tabbed #141414 panels with blue caps labels, flat square caps buttons,
   the green LAUNCH bar. No glows, gradients, drop shadows, mono labels or scroll animations. */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --Background: #0a0a0a;
    --Card: #141414;
    --Input: #1f1f1f;
    --Text: #ffffff;
    --TextDim: #888888;
    --TextMuted: #555555;
    --TextBody: #aaaaaa;
    --Accent: #0078d4;
    --AccentHover: #1e90ff;
    --Success: #28a745;
    --Danger: #dc3545;
    --Warning: #ffc107;
    --Border: #252525;
    --BorderLight: #333333;
    --EditButton: #1a6b3a;
    --EditButtonHover: #1f7d44;
    --NeutralButton: #222222;
    --Radius: 4px;
    --Font: 'Segoe UI', system-ui, -apple-system, 'Helvetica Neue', Arial, sans-serif;
    --PadX: clamp(16px, 5vw, 64px);
    --MaxW: 1160px;
    color-scheme: dark;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 76px;
}

body {
    background: var(--Background);
    color: var(--Text);
    font-family: var(--Font);
    font-size: 17px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

::selection {
    background: var(--Accent);
    color: var(--Text);
}

/* Visible only when focused from the keyboard */
.SkipLink {
    position: absolute;
    left: 16px;
    top: -60px;
    z-index: 100;
    padding: 10px 16px;
    background: var(--Accent);
    font-size: 15px;
    font-weight: 700;
}

.SkipLink:focus {
    top: 12px;
}

/* Images (and the logo links) can't be dragged off the page; Firefox is handled in JS/Site.js. */
img,
a {
    -webkit-user-drag: none;
}

/* Paints the safe-area band above the sticky nav on notched phones */
body::before {
    content: "";
    position: fixed;
    inset: 0 0 auto;
    height: env(safe-area-inset-top, 0px);
    z-index: 60;
    background: var(--Background);
}

img,
video {
    display: block;
    max-width: 100%;
    height: auto;
}

a {
    color: inherit;
    text-decoration: none;
}

strong {
    font-weight: 600;
    color: var(--Text);
}

/* Links inside running text */
.HeroNote a,
.FaqList p a,
.GetItCopy a,
.Footer a {
    color: var(--AccentHover);
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* ===== BUTTONS (the app's: flat, square, bold caps) ===== */

.Btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 15px 28px;
    font-size: 15px;
    font-weight: 700;
    text-transform: uppercase;
    white-space: nowrap;
    transition: background 0.15s;
}

.BtnLaunch {
    background: var(--EditButton);
}

.BtnLaunch:hover {
    background: var(--EditButtonHover);
}

.BtnNeutral {
    background: var(--NeutralButton);
}

.BtnNeutral:hover {
    background: var(--BorderLight);
}

.BtnSmall {
    padding: 9px 18px;
    font-size: 13px;
}

.Btn:focus-visible,
.NavLinks a:focus-visible,
.Brand:focus-visible,
summary:focus-visible,
a:focus-visible {
    outline: 2px solid var(--AccentHover);
    outline-offset: 3px;
}

/* Inline copies of the app's buttons, used in running text */
.UiBtn {
    display: inline-block;
    padding: 1px 9px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    white-space: nowrap;
    vertical-align: 1px;
}

.UiAdd { background: var(--Accent); }
.UiNeutral { background: var(--NeutralButton); }
.UiLaunch { background: var(--EditButton); }

/* ===== NAV ===== */

.Nav {
    position: sticky;
    top: env(safe-area-inset-top, 0px);
    z-index: 50;
    background: var(--Background);
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s;
}

.Nav.IsScrolled {
    border-bottom-color: var(--Border);
}

.NavInner {
    max-width: calc(var(--MaxW) + 2 * var(--PadX));
    margin: 0 auto;
    padding: 12px var(--PadX);
    display: flex;
    align-items: center;
    gap: 32px;
}

.Brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 700;
}

.Brand img {
    width: 28px;
    height: 28px;
}

.NavLinks {
    display: flex;
    gap: 26px;
    margin-left: auto;
}

.NavLinks a {
    font-size: 15px;
    color: var(--TextDim);
    transition: color 0.15s;
}

.NavLinks a:hover {
    color: var(--Text);
}

/* ===== HERO ===== */

.Hero {
    max-width: calc(var(--MaxW) + 2 * var(--PadX));
    margin: 0 auto;
    padding: clamp(40px, 7vw, 88px) var(--PadX) clamp(56px, 8vw, 104px);
    display: grid;
    grid-template-columns: minmax(0, 5.4fr) minmax(0, 6.6fr);
    gap: clamp(32px, 4vw, 56px);
    align-items: center;
}

.Hero h1 {
    font-size: clamp(40px, 4.4vw, 58px);
    font-weight: 700;
    line-height: 1.04;
    letter-spacing: -0.02em;
}

.Lead {
    margin-top: 22px;
    font-size: clamp(18px, 1.6vw, 20px);
    color: var(--TextDim);
    max-width: 34ch;
}

.HeroActions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 32px;
}

.HeroNote {
    margin-top: 18px;
    font-size: 14px;
    color: var(--TextDim);
    max-width: 40ch;
}

.AppWindow {
    position: relative;
    aspect-ratio: 1913 / 1893;
    border-radius: var(--Radius);
    overflow: hidden;
    border: 1px solid var(--Border);
    background: var(--Background);
}

.LaunchFrame {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
}

.LaunchFrame.IsActive {
    opacity: 1;
}

/* LaunchBtn box from the 1.1.1 capture manifest: css [437.8,62.9,289,41.5] in a 765x757 window */
.PressRing {
    position: absolute;
    left: 57.23%;
    top: 8.31%;
    width: 37.78%;
    height: 5.48%;
    pointer-events: none;
}

.PressRing.IsPressed {
    animation: Press 0.5s ease-out;
}

@keyframes Press {
    0% { background: rgba(255, 255, 255, 0.22); }
    100% { background: rgba(255, 255, 255, 0); }
}

.ShotCaption {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: 12px;
    font-size: 13px;
    color: var(--TextDim);
}

.CaptionStatus {
    font-weight: 700;
    color: var(--Text);
    white-space: nowrap;
}

.CaptionStatus.IsDone {
    color: var(--Success);
}

/* ===== PANELS (the app's tabbed section shape) ===== */

.Panel {
    max-width: calc(var(--MaxW) + 2 * var(--PadX));
    margin: 0 auto clamp(48px, 6vw, 72px);
    padding: 0 var(--PadX);
}

.PanelHead {
    display: flex;
    align-items: flex-end;
}

.PanelLabel {
    padding-bottom: 10px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--Accent);
}

/* The raised tab right of the label, with the inverted corner where it meets the label */
.PanelTab {
    flex: 1;
    height: 36px;
    margin-left: 10px;
    background: var(--Card);
    border-top-left-radius: 10px;
    border-top-right-radius: var(--Radius);
    position: relative;
}

.PanelTab::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: -10px;
    width: 10px;
    height: 10px;
    background: radial-gradient(circle at 0% 0%, transparent 10px, var(--Card) 10px);
}

.PanelBody {
    background: var(--Card);
    border-radius: var(--Radius) 0 var(--Radius) var(--Radius);
    padding: clamp(24px, 4vw, 48px);
}

.PanelMedia {
    padding: 0;
    overflow: hidden;
}

.PanelMedia video {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
}

.PanelLead {
    font-size: clamp(20px, 2vw, 24px);
    font-weight: 600;
    line-height: 1.35;
    max-width: 40ch;
    margin-bottom: 28px;
}

.Panel h3 {
    font-size: clamp(20px, 2vw, 24px);
    font-weight: 600;
    margin-bottom: 10px;
}

.Body {
    color: var(--TextDim);
    max-width: 46ch;
}

.BodyAfter {
    margin-top: 24px;
}

.Shot {
    border-radius: var(--Radius);
    border: 1px solid var(--Border);
}

.ShotNarrow {
    max-width: 420px;
    justify-self: center;
    width: 100%;
}

/* ===== HOW IT WORKS ===== */

.Steps {
    list-style: none;
    border-top: 1px solid var(--Border);
}

.Steps li {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 8px;
    padding: 20px 0;
    border-bottom: 1px solid var(--Border);
}

.StepNum {
    font-size: 20px;
    font-weight: 700;
    color: var(--Accent);
    line-height: 1.4;
}

.Steps p {
    color: var(--TextDim);
    max-width: 62ch;
    line-height: 1.75;
}

/* ===== LAUNCH OPTIONS ===== */

.Split {
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: clamp(28px, 4vw, 56px);
    align-items: start;
}

.SplitServer {
    margin-top: clamp(40px, 5vw, 64px);
    padding-top: clamp(32px, 4vw, 48px);
    border-top: 1px solid var(--Border);
    align-items: center;
}

/* Mirrors the app's Launch Configs list */
.Table {
    border-top: 1px solid var(--Border);
}

.TableHead,
.TableRow {
    display: grid;
    grid-template-columns: minmax(130px, 2fr) minmax(0, 3fr);
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid var(--Border);
}

.TableHead {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--TextDim);
}

.TableRow span:first-child {
    font-weight: 600;
}

.TableRow span:last-child {
    color: var(--TextDim);
}

.ModeList {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px 20px;
    margin-top: 22px;
    max-width: 46ch;
}

.ModeList dt {
    font-weight: 600;
}

.ModeList dd {
    color: var(--TextDim);
}

/* ===== SETTINGS (rows drawn like the app's settings panel) ===== */

.SettingList {
    display: grid;
    gap: 10px;
}

.SettingRow {
    display: grid;
    grid-template-columns: 200px 220px minmax(0, 1fr);
    gap: 20px;
    align-items: center;
}

.SettingName {
    font-weight: 600;
}

.SettingValue {
    position: relative;
    background: var(--Input);
    padding: 10px 16px;
}

/* The drop-down arrow the app draws on its select boxes */
.SettingValue.IsSelect::after {
    content: '';
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    border-right: 7px solid var(--Text);
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
}

.SettingRow p {
    color: var(--TextDim);
}

/* ===== FAQ ===== */

.FaqList {
    border-top: 1px solid var(--Border);
}

.FaqList details {
    border-bottom: 1px solid var(--Border);
}

.FaqList summary {
    list-style: none;
    cursor: pointer;
    padding: 18px 40px 18px 0;
    position: relative;
    font-size: 18px;
    font-weight: 600;
    transition: color 0.15s;
}

.FaqList summary::-webkit-details-marker {
    display: none;
}

/* The same left-pointing arrow as a closed drop-down in the app; it turns down when open */
.FaqList summary::after {
    content: '';
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    border-right: 7px solid var(--TextDim);
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
    transition: transform 0.15s;
}

.FaqList details[open] summary::after {
    transform: translateY(-50%) rotate(-90deg);
}

.FaqList summary:hover {
    color: var(--AccentHover);
}

.FaqList details p {
    padding: 0 40px 20px 0;
    color: var(--TextDim);
    max-width: 64ch;
}

/* ===== GET IT ===== */

.GetIt {
    max-width: calc(var(--MaxW) + 2 * var(--PadX));
    margin: clamp(64px, 8vw, 104px) auto 0;
    padding: 32px var(--PadX);
    display: flex;
    align-items: center;
    gap: 20px;
    border-top: 1px solid var(--Border);
}

.GetItCopy {
    flex: 1;
}

.GetIt h2 {
    font-size: clamp(24px, 2.6vw, 32px);
    font-weight: 700;
    line-height: 1.2;
}

.GetItCopy p {
    margin-top: 4px;
    font-size: 15px;
    color: var(--TextDim);
}

/* ===== FOOTER ===== */

.Footer {
    max-width: calc(var(--MaxW) + 2 * var(--PadX));
    margin: 0 auto;
    padding: 22px var(--PadX) 36px;
    display: grid;
    gap: 12px;
    border-top: 1px solid var(--Border);
    font-size: 14px;
    color: var(--TextDim);
}

.FooterTop {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 10px 24px;
}

/* Legal and support links: the nav's quiet style, not the underlined text-link style */
.Footer .FooterNav {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 22px;
}

.Footer .FooterNav a {
    color: var(--Text);
    text-decoration: none;
    transition: color 0.15s;
}

.Footer .FooterNav a:hover {
    color: var(--AccentHover);
}

.FooterNote {
    max-width: 90ch;
}

/* ===== LEGAL PAGES (privacy, terms, disclaimer, notices, security, support) ===== */

.LegalLayout {
    max-width: calc(var(--MaxW) + 2 * var(--PadX));
    margin: 0 auto;
    padding: clamp(32px, 5vw, 64px) var(--PadX) clamp(48px, 6vw, 80px);
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: clamp(28px, 4vw, 56px);
    align-items: start;
}

.LegalSide {
    position: sticky;
    top: 84px;
}

.LegalSideLabel {
    margin-bottom: 10px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--TextDim);
}

.LegalNav ul {
    list-style: none;
    display: grid;
    gap: 2px;
}

.LegalNav a {
    display: block;
    padding: 8px 12px;
    border-left: 2px solid var(--Border);
    font-size: 15px;
    color: var(--TextDim);
    transition: color 0.15s;
}

.LegalNav a:hover {
    color: var(--Text);
}

.LegalNav a[aria-current="page"] {
    border-left-color: var(--Accent);
    background: var(--Card);
    color: var(--Text);
    font-weight: 600;
}

.LegalBody h1 {
    font-size: clamp(30px, 3.4vw, 42px);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.01em;
}

.LegalMeta {
    margin-top: 10px;
    font-size: 14px;
    color: var(--TextDim);
}

.LegalLead {
    margin-top: 22px;
    font-size: clamp(18px, 1.6vw, 20px);
    color: var(--Text);
    max-width: 62ch;
}

.LegalBody h2 {
    margin-top: 44px;
    padding-top: 28px;
    border-top: 1px solid var(--Border);
    font-size: clamp(20px, 2vw, 23px);
    font-weight: 600;
    line-height: 1.3;
    scroll-margin-top: 84px;
}

.LegalBody h3 {
    margin-top: 26px;
    font-size: 17px;
    font-weight: 600;
    scroll-margin-top: 84px;
}

.LegalBody h2 + p,
.LegalBody h3 + p,
.LegalBody h2 + ul,
.LegalBody h3 + ul {
    margin-top: 12px;
}

.LegalBody p,
.LegalBody li,
.LegalBody dd {
    color: var(--TextBody);
    max-width: 72ch;
}

.LegalBody p + p,
.LegalBody ul + p,
.LegalBody ol + p,
.LegalBody p + ul,
.LegalBody p + ol,
.LegalBody .LegalTableWrap + p {
    margin-top: 14px;
}

.LegalBody ul,
.LegalBody ol {
    margin-left: 22px;
    display: grid;
    gap: 8px;
}

.LegalBody li::marker {
    color: var(--TextDim);
}

.LegalBody a {
    color: var(--AccentHover);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.LegalBody strong {
    color: var(--Text);
}

.LegalBody code {
    font-family: Consolas, 'Cascadia Mono', monospace;
    font-size: 0.9em;
    background: var(--Input);
    padding: 1px 6px;
    overflow-wrap: anywhere;
}

/* "On this page" list at the top of each document */
.Toc {
    margin-top: 28px;
    padding: 18px 22px;
    border: 1px solid var(--Border);
}

.Toc h2 {
    margin: 0;
    padding: 0;
    border: 0;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--TextDim);
}

.LegalBody .Toc ol {
    margin: 10px 0 0 20px;
    columns: 2 240px;
    column-gap: 32px;
    display: block;
}

.LegalBody .Toc li {
    margin-bottom: 6px;
    break-inside: avoid;
}

.LegalBody .Toc a {
    color: var(--Text);
    text-decoration: none;
}

.LegalBody .Toc a:hover {
    color: var(--AccentHover);
}

/* Short boxed notes; ReviewNote marks a fact the owner still has to supply or confirm */
.LegalNote,
.ReviewNote {
    margin-top: 20px;
    padding: 14px 18px;
    background: var(--Input);
    border-left: 3px solid var(--Accent);
    max-width: 76ch;
}

.ReviewNote {
    border-left-color: var(--Warning);
}

.NoteLabel {
    display: block;
    margin-bottom: 4px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--AccentHover);
}

.ReviewNote .NoteLabel {
    color: var(--Warning);
}

.LegalBody .LegalNote p,
.LegalBody .ReviewNote p {
    margin-top: 0;
}

.LegalBody .LegalNote p + p,
.LegalBody .ReviewNote p + p {
    margin-top: 8px;
}

/* Tables scroll inside their own box on narrow screens, never the page */
.LegalTableWrap {
    margin-top: 16px;
    overflow-x: auto;
}

.LegalTable {
    width: 100%;
    min-width: 560px;
    border-collapse: collapse;
    font-size: 15px;
}

.LegalTable th {
    padding: 10px 16px 10px 0;
    border-bottom: 1px solid var(--Border);
    text-align: left;
    vertical-align: bottom;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--TextDim);
}

.LegalTable td {
    padding: 12px 16px 12px 0;
    border-bottom: 1px solid var(--Border);
    vertical-align: top;
    color: var(--TextBody);
}

.LegalTable td:first-child {
    color: var(--Text);
    font-weight: 600;
}

/* The legal hub: one row per document */
.DocList {
    margin-top: 28px;
    border-top: 1px solid var(--Border);
}

.LegalBody .DocList {
    list-style: none;
    margin-left: 0;
    gap: 0;
}

.DocList li {
    display: grid;
    grid-template-columns: minmax(180px, 2fr) minmax(0, 5fr);
    gap: 6px 24px;
    padding: 16px 0;
    border-bottom: 1px solid var(--Border);
}

.LegalBody .DocList a {
    color: var(--Text);
    font-weight: 600;
    text-decoration: none;
}

.LegalBody .DocList a:hover {
    color: var(--AccentHover);
}

.DocList p {
    margin: 0;
}

/* Status chips next to each document on the hub and under each title */
.Status {
    display: inline-block;
    padding: 1px 8px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    vertical-align: 1px;
    border: 1px solid var(--BorderLight);
    color: var(--TextDim);
}

.Status.IsDraft {
    border-color: var(--Warning);
    color: var(--Warning);
}

.Status.IsCurrent {
    border-color: var(--Success);
    color: var(--Success);
}

/* The 404 page */
.NotFound {
    max-width: calc(var(--MaxW) + 2 * var(--PadX));
    margin: 0 auto;
    padding: clamp(56px, 9vw, 120px) var(--PadX);
}

.NotFound h1 {
    font-size: clamp(36px, 4.4vw, 52px);
    font-weight: 700;
    line-height: 1.05;
}

.NotFound p {
    margin-top: 16px;
    color: var(--TextDim);
    max-width: 52ch;
}

.NotFound .HeroActions {
    margin-top: 28px;
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .PressRing.IsPressed { animation: none; }
}

/* ===== RESPONSIVE ===== */

@media (max-width: 960px) {
    .Hero,
    .Split {
        grid-template-columns: minmax(0, 1fr);
    }

    .SettingRow {
        grid-template-columns: 170px 180px minmax(0, 1fr);
    }

    .LegalLayout {
        grid-template-columns: minmax(0, 1fr);
    }

    /* The document list becomes a wrapping row of tabs above the document */
    .LegalSide {
        position: static;
    }

    .LegalNav ul {
        display: flex;
        flex-wrap: wrap;
        gap: 4px 6px;
    }

    .LegalNav a {
        padding: 6px 10px;
        border-left: 0;
        border-bottom: 2px solid var(--Border);
    }

    .LegalNav a[aria-current="page"] {
        border-bottom-color: var(--Accent);
    }
}

@media (max-width: 720px) {
    .NavLinks {
        display: none;
    }

    .Nav .BtnSmall {
        margin-left: auto;
    }

    .ShotCaption {
        flex-direction: column;
        gap: 4px;
    }

    .SettingRow {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 6px 14px;
        padding-bottom: 14px;
        border-bottom: 1px solid var(--Border);
    }

    .SettingRow p {
        grid-column: 1 / -1;
        font-size: 15px;
    }

    .TableHead,
    .TableRow {
        grid-template-columns: minmax(0, 1fr);
        gap: 2px;
    }

    .TableHead span:last-child {
        display: none;
    }

    .GetIt {
        flex-wrap: wrap;
    }

    .HeroActions .Btn,
    .GetIt .Btn {
        width: 100%;
    }

    .FaqList summary {
        font-size: 17px;
    }

    .DocList li {
        grid-template-columns: minmax(0, 1fr);
    }
}
