:root {
    --ink: #241012;
    --red: #A61D25;
    --red-bright: #C4222B;
    --red-dark: #7A151B;
    --cream: #FBF5EF;
    --white: #FFFFFF;
    --muted: rgba(36, 16, 18, .62);
    --muted2: rgba(36, 16, 18, .42);
    --line-on-red: rgba(255, 255, 255, .22);
    --line-on-cream: rgba(36, 16, 18, .14);
    --font-display: 'Bodoni Moda', Georgia, 'Times New Roman', serif;
    --font-main: 'Inter', -apple-system, 'Segoe UI', sans-serif;
    --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

@media (scripting: enabled) {
    .preload * { transition: none !important; animation: none !important; }
}

html, body { min-height: 100%; }

body {
    font-family: var(--font-main);
    background: var(--cream);
    color: var(--ink);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

h1, h2, h3 { font-family: var(--font-display); }

a { color: inherit; }

/* ---------------- MASTHEAD ---------------- */

.masthead {
    position: relative;
    background: var(--red);
    overflow: hidden;
    padding: calc(46px + env(safe-area-inset-top)) 20px 40px;
    text-align: center;
}

.masthead::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.035;
    mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.mastheadInner { position: relative; max-width: 34rem; margin: 0 auto; }

.mastheadKicker {
    font-size: .72rem;
    font-weight: 500;
    letter-spacing: .24em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .72);
}

.mastheadWordmark {
    display: block;
    font-family: var(--font-display);
    font-size: clamp(2.4rem, 8vw, 3.4rem);
    font-weight: 600;
    letter-spacing: .01em;
    color: var(--white);
    text-decoration: none;
    margin: .8rem 0 1.1rem;
}

.mastheadCrumb {
    font-family: var(--font-main);
    font-size: 1rem;
    font-weight: 500;
    color: rgba(255, 255, 255, .55);
}

.mastheadRule { width: 44px; height: 1px; background: var(--line-on-red); margin: 0 auto 1.1rem; }

.mastheadMeta {
    font-size: .95rem;
    font-weight: 400;
    color: rgba(255, 255, 255, .78);
    letter-spacing: .01em;
    max-width: 30ch;
    margin: 0 auto;
}

/* ---------------- INDEX: platform grid ---------------- */

.container { flex: 1; display: flex; justify-content: center; padding: 2.75rem 1.25rem 3rem; }
.indexInner { width: 100%; max-width: 34rem; }

.sectionLabel {
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--muted2);
    margin-bottom: 1rem;
}

.pages {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: .6rem;
    margin-bottom: 2.25rem;
}

.pages a { text-decoration: none; }

.platformTile {
    background: var(--white);
    border: 1px solid var(--line-on-cream);
    border-radius: 3px;
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    transition: border-color 200ms var(--ease-out), transform 200ms var(--ease-out);
}

.platformTile img { width: 26px; height: 26px; object-fit: contain; }

.platformTile span {
    font-size: .62rem;
    font-weight: 600;
    letter-spacing: .02em;
    color: var(--muted);
    text-transform: uppercase;
}

a:hover .platformTile { border-color: var(--red); transform: translateY(-2px); }

.twoFaTile { grid-column: span 2; flex-direction: row; aspect-ratio: auto; padding: .9rem; gap: .6rem; }
.twoFaTile span { font-size: .78rem; }

/* ---------------- GUIDE PAGE ---------------- */

.guideWrap { flex: 1; display: flex; justify-content: center; padding: 2.75rem 1.25rem 3rem; }
.guideInner { width: 100%; max-width: 26rem; }

.guideCard {
    background: var(--white);
    border: 1px solid var(--line-on-cream);
    border-radius: 3px;
    box-shadow: 0 1px 2px rgba(0,0,0,.03), 0 18px 44px rgba(0,0,0,.08);
    padding: 1.9rem 1.75rem;
    text-align: center;
}

.guideCard img.platformIcon { width: 40px; height: 40px; object-fit: contain; margin-bottom: 1.1rem; }

.guideCard ul { list-style: none; text-align: left; }

.guideCard ul > li {
    position: relative;
    padding-left: 1.1rem;
    font-size: .92rem;
    line-height: 1.6;
    color: var(--ink);
    margin-bottom: .7rem;
}

.guideCard ul > li:before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--red);
}

.guideCard ul > li a { color: var(--red); font-weight: 600; text-decoration: none; }
.guideCard ul > li a:hover { color: var(--red-bright); text-decoration: underline; }

@keyframes fadeInAndOut { 0% { opacity: 1; } 50% { opacity: .15; } 100% { opacity: 1; } }

.paginate {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 26rem;
    margin: 1.4rem auto 0;
    padding: 0 .25rem;
    user-select: none;
}

.paginate a {
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--red);
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line-on-cream);
    border-radius: 2px;
    transition: border-color 200ms var(--ease-out), color 200ms var(--ease-out);
}

.paginate a:hover { border-color: var(--red); }
.paginate a[disabled] { pointer-events: none; color: var(--muted2); }

.paginate p { font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted2); }

/* ---------------- 2FA / OPTIONS PAGE ---------------- */

.optionsBlock { margin-bottom: 1.4rem; }
.optionsBlock h2 {
    font-family: var(--font-main);
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .06em;
    color: var(--muted);
    margin-bottom: .7rem;
    text-transform: none;
}

.guideCard.optionsCard { text-align: left; }
.guideCard.optionsCard ul { margin-bottom: 0; }
.guideCard.optionsCard ul > li:last-child { margin-bottom: 0; }

/* ---------------- FOOTER ---------------- */

.siteFooter { padding: 0 1.25rem calc(1.75rem + env(safe-area-inset-bottom)); }
.siteFooterRule { max-width: 34rem; margin: 0 auto; height: 1px; background: var(--line-on-cream); }
.siteFooterInner {
    max-width: 34rem;
    margin: 0 auto;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
    padding: 1.4rem 0 0;
}
.siteFooterWordmark { font-family: var(--font-display); font-size: 1.25rem; font-weight: 700; color: var(--ink); }
.siteFooterTagline { margin: .4rem 0 0; font-size: .78rem; color: var(--muted); max-width: 30ch; line-height: 1.5; }
.siteFooterNav { display: flex; flex-direction: column; gap: .5rem; font-size: .78rem; }
.siteFooterNav a { color: var(--muted); text-decoration: none; font-weight: 600; transition: color 200ms var(--ease-out); }
.siteFooterNav a:hover { color: var(--red-bright); }
.siteFooterBottom {
    margin-top: 1.1rem;
    padding-top: .9rem;
    border-top: 1px solid var(--line-on-cream);
    font-size: .68rem;
    font-weight: 500;
    letter-spacing: .04em;
    color: var(--muted2);
    justify-content: space-between;
}

/* ---------------- DOC PAGES (privacy / terms) ---------------- */

.docWrap { flex: 1; display: flex; justify-content: center; padding: 3rem 1.25rem 4rem; }
.doc { width: 100%; max-width: 34rem; }
.docBack { display: inline-block; font-size: .78rem; font-weight: 600; color: var(--muted); text-decoration: none; margin-bottom: 1.5rem; transition: color 200ms var(--ease-out); }
.docBack:hover { color: var(--red-bright); }
.doc h1 { font-size: 1.9rem; font-weight: 600; letter-spacing: -.01em; margin-bottom: .3rem; }
.docUpdated { font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted2); margin-bottom: 1.75rem; }
.doc h2 { font-size: 1.05rem; font-weight: 700; margin: 1.75rem 0 .6rem; }
.doc p { font-size: .92rem; line-height: 1.7; color: var(--muted); margin-bottom: .9rem; }
.doc p strong, .doc p b { color: var(--ink); }
.doc a { color: var(--red); }

@media (max-width: 480px) {
    .masthead { padding: calc(32px + env(safe-area-inset-top)) 16px 30px; }
    .pages { grid-template-columns: repeat(3, 1fr); }
    .guideCard { padding: 1.5rem 1.25rem; }
    .siteFooterInner { flex-direction: column; }
    .siteFooterBottom { flex-direction: column; gap: .4rem; }
}
