/* Rummy 91 brand theme — one product, few pages, fast first screen. */

:root {
    --ink: #17211c;
    --ink-2: #3d4a43;
    --ink-3: #6b7a71;
    --paper: #f7f5ee;
    --sheet: #fffdf7;
    --rule: #d9d4c5;
    --rule-2: #e8e3d6;
    --brand: #1d4b39;
    --brand-2: #2f6b50;
    --gold: #b8892b;
    --radius: 10px;
    --wrap: 1120px;
    --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font: 400 16px/1.65 var(--sans);
}

img { max-width: 100%; height: auto; display: block; }
code { font-family: var(--mono); font-size: .92em; background: #efeade; padding: 1px 5px; border-radius: 4px; }

a { color: var(--brand); }
a:hover { color: var(--brand-2); }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; background: #fff; padding: 8px 12px; z-index: 20; }

.wrap { width: min(100% - 40px, var(--wrap)); margin-inline: auto; }

/* Header */
.site-head {
    background: var(--sheet);
    border-bottom: 1px solid var(--rule);
    position: sticky; top: 0; z-index: 10;
}
.site-head__in { display: flex; align-items: center; gap: 20px; min-height: 68px; }

.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; color: var(--ink); }
.brand__mark {
    width: 38px; height: 38px; border-radius: 9px;
    display: grid; place-items: center;
    background: var(--brand); color: #f3e6c8;
    font-weight: 800; font-size: .95rem; letter-spacing: .02em;
}
.brand__text strong { display: block; font-size: 1rem; line-height: 1.2; }
.brand__text strong span { color: var(--ink-3); font-weight: 600; }
.brand__text small { color: var(--ink-3); font-size: 0.875rem; }

.nav { margin-left: auto; }
.nav ul { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.nav a {
    display: block; padding: 7px 10px; border-radius: 6px;
    color: var(--ink-2); text-decoration: none; font-size: .88rem; font-weight: 600;
}
.nav a:hover { background: #eee9db; color: var(--brand); }

.nav-toggle { display: none; margin-left: auto; padding: 8px 12px; border: 1px solid var(--rule); border-radius: 6px; background: var(--sheet); font: inherit; }

/* Hero */
.hero { padding: clamp(28px, 5vw, 56px) 0 clamp(20px, 3vw, 34px); }
.hero__grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(280px, .8fr); gap: clamp(24px, 4vw, 52px); align-items: start; }
.eyebrow { margin: 0 0 10px; font-size: 0.875rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); font-weight: 700; }
.hero h1 { margin: 0 0 14px; font-size: clamp(2rem, 4.6vw, 3.1rem); line-height: 1.06; letter-spacing: -.02em; }
.hero__lead { margin: 0 0 22px; max-width: 54ch; color: var(--ink-2); font-size: 1.06rem; }

.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 22px; }
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 13px 20px; border-radius: 8px;
    font-size: .95rem; font-weight: 700; text-decoration: none;
    border: 1px solid transparent;
}
.btn--primary { background: var(--brand); color: #fff; }
.btn--primary:hover { background: var(--brand-2); color: #fff; }
.btn--ghost { border-color: var(--rule); color: var(--ink-2); background: var(--sheet); }
.btn--ghost:hover { border-color: var(--brand); color: var(--brand); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.chips li { padding: 7px 12px; border: 1px solid var(--rule); border-radius: 999px; background: var(--sheet); font-size: 0.875rem; color: var(--ink-2); }
.chips strong { color: var(--ink); }

/* Facts card */
.hero__card { background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius); padding: 20px; }
.hero__card h2 { margin: 0 0 12px; font-size: 0.875rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.facts { margin: 0; display: grid; gap: 10px; }
.facts div { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: baseline; font-size: .9rem; }
.facts dt { color: var(--ink-3); }
.facts dd { margin: 0; font-weight: 600; text-align: right; }
.facts dd code { background: transparent; padding: 0; }
.note { margin: 14px 0 0; font-size: 0.875rem; color: var(--ink-3); }

/* Blocks */
.block { padding: clamp(26px, 4vw, 44px) 0; border-top: 1px solid var(--rule); }
.block h2 { margin: 0 0 14px; font-size: clamp(1.35rem, 2.4vw, 1.75rem); letter-spacing: -.01em; }
.block p { max-width: 68ch; color: var(--ink-2); }

.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; max-width: 72ch; }
.steps li { position: relative; padding: 16px 18px 16px 56px; background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius); }
.steps li::before {
    counter-increment: step; content: counter(step);
    position: absolute; left: 16px; top: 16px;
    width: 26px; height: 26px; border-radius: 50%;
    background: var(--brand); color: #fff;
    display: grid; place-items: center; font-size: 0.875rem; font-weight: 700;
}

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; margin-top: 16px; }
.card {
    display: block; padding: 20px; background: var(--sheet);
    border: 1px solid var(--rule); border-radius: var(--radius);
    text-decoration: none; color: inherit;
    transition: border-color .15s ease, transform .15s ease;
}
.card:hover { border-color: var(--brand); transform: translateY(-1px); }
.card h3 { margin: 0 0 8px; font-size: 1.05rem; }
.card p { margin: 0 0 12px; font-size: .92rem; color: var(--ink-2); }
.card__go { font-size: 0.875rem; font-weight: 700; color: var(--brand); }

/* FAQ */
.faq { border-bottom: 1px solid var(--rule-2); padding: 12px 0; }
.faq summary { cursor: pointer; font-weight: 650; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before { content: "+"; display: inline-block; width: 1.2em; color: var(--brand); }
.faq[open] summary::before { content: "–"; }
.faq p { margin: 8px 0 0 1.2em; color: var(--ink-2); }

.block--trust { background: var(--sheet); border-top: 1px solid var(--rule); }
.block--trust h2 { font-size: 1.2rem; }

/* Page */
.page__head { padding: clamp(26px, 4vw, 46px) 0 18px; }
.page__head h1 { margin: 0 0 12px; font-size: clamp(1.9rem, 3.6vw, 2.7rem); line-height: 1.1; letter-spacing: -.02em; }
.page__lead { margin: 0 0 10px; max-width: 66ch; color: var(--ink-2); font-size: 1.05rem; }
.page__meta { margin: 0; font-size: 0.875rem; color: var(--ink-3); }

.page__body { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 34px; padding-bottom: 30px; }
.toc { order: 2; align-self: start; position: sticky; top: 88px; padding: 16px; background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius); }
.toc h2 { margin: 0 0 10px; font-size: 0.875rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.toc ol { margin: 0; padding-left: 18px; display: grid; gap: 7px; font-size: .88rem; }
.toc a { text-decoration: none; color: var(--ink-2); }
.toc a:hover { color: var(--brand); }

.prose { min-width: 0; max-width: 72ch; }
.prose h2 { margin: 34px 0 12px; font-size: 1.42rem; }
.prose h3 { margin: 24px 0 8px; font-size: 1.1rem; }
.prose p, .prose li { color: var(--ink-2); }
.prose ul, .prose ol { padding-left: 22px; }
.prose table { width: 100%; border-collapse: collapse; margin: 18px 0; font-size: .92rem; }
.prose th, .prose td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--rule-2); }
.prose th { background: var(--sheet); }

.cta {
    display: flex; flex-wrap: wrap; gap: 18px; align-items: center; justify-content: space-between;
    padding: 22px; margin: 10px 0 46px;
    background: var(--brand); color: #fff; border-radius: var(--radius);
}
.cta h2 { margin: 0 0 6px; font-size: 1.3rem; }
.cta p { margin: 0; font-size: .88rem; color: #d8e4dc; }
.cta code { background: rgba(255,255,255,.14); color: #fff; }
.cta .btn--primary { background: #fff; color: var(--brand); }

/* Footer */
.site-foot { margin-top: 20px; background: var(--sheet); border-top: 1px solid var(--rule); padding: 34px 0 26px; }
.site-foot__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 28px; }
.site-foot h2 { font-size: 0.875rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 10px; }
.site-foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; font-size: .9rem; }
.site-foot a { text-decoration: none; color: var(--ink-2); }
.site-foot a:hover { color: var(--brand); }
.site-foot p { margin: 0 0 8px; font-size: 0.875rem; color: var(--ink-3); max-width: 44ch; }
.site-foot__legal { margin-top: 24px; border-top: 1px solid var(--rule-2); padding-top: 16px; }
.site-foot__meta { font-size: 0.875rem; }

@media (max-width: 900px) {
    .hero__grid, .page__body, .site-foot__grid { grid-template-columns: 1fr; }
    .toc { order: 0; position: static; }
    .nav { display: none; }
    .nav.is-open { display: block; position: absolute; left: 0; right: 0; top: 68px; background: var(--sheet); border-bottom: 1px solid var(--rule); padding: 12px 20px; }
    .nav.is-open ul { flex-direction: column; }
    .nav-toggle { display: block; }
}

/* Sticky section bar */
.jump {
    position: sticky; top: 68px; z-index: 9;
    background: var(--paper);
    border-block: 1px solid var(--rule);
    margin-bottom: 6px;
}
.jump__in { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.jump__in::-webkit-scrollbar { display: none; }
.jump a {
    flex: 0 0 auto;
    padding: 11px 12px;
    font-size: 0.875rem; font-weight: 650;
    color: var(--ink-3); text-decoration: none;
    border-bottom: 2px solid transparent;
}
.jump a:hover { color: var(--brand); border-bottom-color: var(--rule); }

/* Tick lists */
.ticks { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 10px; max-width: 70ch; }
.ticks li { position: relative; padding-left: 24px; color: var(--ink-2); }
.ticks li::before {
    content: "✓"; position: absolute; left: 0; top: 0;
    color: var(--brand); font-weight: 800;
}

/* Data tables on the hub page */
.table-wrap { overflow-x: auto; margin: 18px 0 8px; }
.table-wrap table { width: 100%; border-collapse: collapse; font-size: .92rem; background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; }
.table-wrap caption { text-align: left; caption-side: top; padding: 0 0 8px; font-size: 0.875rem; color: var(--ink-3); }
.table-wrap th, .table-wrap td { padding: 10px 12px; border-bottom: 1px solid var(--rule-2); text-align: left; vertical-align: top; }
.table-wrap th { background: #f1ecdf; font-size: 0.875rem; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); }
.table-wrap tr:last-child td { border-bottom: 0; }

/* Section anchor offset: the sticky header + jump bar would cover the heading */
.block[id] { scroll-margin-top: 118px; }

@media (max-width: 900px) {
    .jump { top: 0; }
}

/* Identity / verification layer */
.verify-bar {
    display: flex; flex-wrap: wrap; gap: 8px 16px;
    align-items: baseline; justify-content: space-between;
    margin: 0 0 4px;
    padding: 12px 16px;
    background: #f1ecdf;
    border: 1px solid var(--rule);
    border-left: 3px solid var(--gold);
    border-radius: 6px;
    font-size: 0.875rem; color: var(--ink-2);
}
.verify-bar a { font-weight: 700; color: var(--brand); white-space: nowrap; }

.sources { margin: 10px 0 0; padding-left: 20px; display: grid; gap: 8px; font-size: .9rem; color: var(--ink-2); max-width: 74ch; }
.sources code { background: transparent; padding: 0; }

.block h3 { margin: 26px 0 8px; font-size: 1.15rem; }

@media (max-width: 900px) {
    .site-foot__grid { grid-template-columns: 1fr 1fr; }
    .site-foot__grid > div { grid-column: 1 / -1; }
}

/* Legal / classification note */
.law-note {
    margin: 16px 0 0;
    padding: 14px 16px;
    background: #fbf6e9;
    border: 1px solid #e6d9b8;
    border-left: 3px solid var(--gold);
    border-radius: 6px;
    font-size: .9rem;
    color: var(--ink-2);
    max-width: 76ch;
}

/* Brand artwork */
.brand__logo {
    width: 40px; height: 40px;
    border-radius: 9px;
    display: block;
    flex: 0 0 auto;
}
.site-foot__brand {
    display: flex; align-items: center; gap: 10px;
    margin: 0 0 10px;
    color: var(--ink);
}
.site-foot__brand img { width: 32px; height: 32px; border-radius: 7px; }
.site-foot__brand strong { font-size: 1rem; color: var(--ink); }

/* Listing screenshots */
.shots {
    list-style: none;
    margin: 18px 0 10px;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 18px;
}
.shots li {
    background: var(--sheet);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    overflow: hidden;
}
.shots img {
    width: 100%;
    height: auto;
    display: block;
    border-bottom: 1px solid var(--rule-2);
    background: #0d0f14;
}
.shots span {
    display: block;
    padding: 10px 12px 12px;
    font-size: 0.875rem;
    color: var(--ink-2);
    line-height: 1.5;
}

/* Mixed portrait/landscape screenshots: keep tops aligned, don't stretch cards */
.shots { align-items: start; }

/* Uniform card height; contain keeps every screen fully visible */
.shots img {
    width: 100%;
    height: 260px;
    object-fit: contain;
    background: #0d0f14;
}

/* ---------------------------------------------------------------------------
 * Layout corrections: centre the reading column, add the hero logo, and turn
 * the identity comparison into cards so nothing needs horizontal scrolling.
 * ------------------------------------------------------------------------ */

.block {
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.hero__logo {
    width: 150px;
    height: 150px;
    border-radius: 22px;
    display: block;
    margin: 0 0 18px;
    box-shadow: 0 10px 30px rgba(23, 33, 28, .18);
}

.idgrid {
    list-style: none;
    margin: 18px 0 10px;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 14px;
}
.idgrid li {
    background: var(--sheet);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    padding: 16px 18px;
}
.idgrid h3 {
    margin: 0 0 10px;
    font-size: 0.875rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--ink-3);
}
.idgrid__row {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 10px;
    align-items: baseline;
    margin: 0 0 7px;
    font-size: 0.875rem;
    color: var(--ink);
}
.idgrid__row span { color: var(--ink-3); }
.idgrid__row code {
    font-size: 0.875rem;
    word-break: break-all;
    background: transparent;
    padding: 0;
}

/* Tables become stacked cards on a phone instead of scrolling sideways */
@media (max-width: 640px) {
    .table-wrap { overflow-x: visible; }
    .table-wrap table { display: block; border: 0; background: none; }
    .table-wrap caption { display: block; }
    .table-wrap thead { display: none; }
    .table-wrap tbody { display: grid; gap: 10px; }
    .table-wrap tr {
        display: grid;
        gap: 4px;
        padding: 12px 14px;
        background: var(--sheet);
        border: 1px solid var(--rule);
        border-radius: var(--radius);
    }
    .table-wrap td {
        display: grid;
        grid-template-columns: 96px minmax(0, 1fr);
        gap: 8px;
        border: 0;
        padding: 2px 0;
        font-size: 0.875rem;
    }
    .table-wrap td::before {
        content: attr(data-label);
        color: var(--ink-3);
    }
    .table-wrap td:first-child {
        font-weight: 700;
        grid-template-columns: 1fr;
    }
    .table-wrap td:first-child::before { display: none; }
}

/* Identity cards: label above value reads better than a narrow label column */
.idgrid__row {
    display: block;
    margin: 0 0 10px;
}
.idgrid__row span {
    display: block;
    font-size: 0.875rem;
    color: var(--ink-3);
    margin-bottom: 2px;
}
.idgrid__row code {
    display: inline-block;
    max-width: 100%;
    word-break: break-all;
}

/* Align the verification strip with the reading column */
.verify-bar { max-width: 900px; margin-left: auto; margin-right: auto; }

/* ---------------------------------------------------------------------------
 * Global layout fixes: footer columns, inner pages, mobile navigation and the
 * sticky download bar.
 * ------------------------------------------------------------------------ */

/* Footer: four balanced columns instead of three-with-a-wrapped-fourth */
.site-foot__grid { grid-template-columns: 1.8fr 1fr 1fr 1fr; }

/* Inner pages: one reading column, no empty sidebar slot */
.page__body { grid-template-columns: minmax(0, 1fr); padding-bottom: 8px; }
.prose { max-width: 760px; margin-left: auto; margin-right: auto; }
.page__body .prose { margin-left: 0; }

/* Call to action aligns with the reading column */
.cta { max-width: 760px; margin: 18px auto 46px; }

/* Mobile navigation */
@media (max-width: 900px) {
    .nav-toggle { display: block; }
    .nav.is-open {
        display: block;
        position: absolute;
        left: 0;
        right: 0;
        top: 68px;
        z-index: 20;
        background: var(--sheet);
        border-bottom: 1px solid var(--rule);
        padding: 12px 20px 16px;
        box-shadow: 0 12px 24px rgba(23, 33, 28, .08);
    }
    .nav.is-open ul { flex-direction: column; gap: 2px; }
    .nav.is-open a { padding: 10px 4px; font-size: 1rem; }

    .site-foot__grid { grid-template-columns: 1fr 1fr; }
    .site-foot__grid > div { grid-column: 1 / -1; }
}

@media (max-width: 560px) {
    .site-foot__grid { grid-template-columns: 1fr; }
}

/* Mobile download bar: fixed to the bottom, hidden on desktop */
.mobile-cta { display: none; }

@media (max-width: 900px) {
    .mobile-cta {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 30;
        padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
        background: var(--sheet);
        border-top: 1px solid var(--rule);
        box-shadow: 0 -8px 24px rgba(23, 33, 28, .12);
    }
    .mobile-cta strong { display: block; font-size: 0.9375rem; line-height: 1.2; }
    .mobile-cta span { font-size: 0.875rem; color: var(--ink-3); }
    .mobile-cta .btn { padding: 11px 18px; }
    body { padding-bottom: 78px; }
}

/* Keep the page call to action on the same left edge as the article */
.cta { margin: 18px 0 46px; }

/* The trust / sources panel is a surface, not a band: it needs its own padding
   and radius, otherwise the text sits on the panel edge. */
.block--trust {
    background: #f1ecdf;
    border: 1px solid var(--rule);
    border-top: 1px solid var(--rule);
    border-radius: var(--radius);
    padding: clamp(20px, 3vw, 30px) clamp(20px, 3vw, 32px);
    margin: 10px 0 40px;
}
.block--trust h2 { margin-top: 0; }
.block--trust p:last-child { margin-bottom: 0; }
.block--trust p { max-width: 62ch; }

/* Download CTA is a <button> while the destination is disabled: keep the same
   box model as the anchor version. */
button.btn {
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    cursor: pointer;
    border: 1px solid transparent;
}
button.btn--primary { border-color: var(--brand); }
