/* SureBetUK shared design system — "the letter" (light, serif, fintech-professional).
   Used by guides, calculator, how-it-works, results & 404 pages.
   The homepage (index.html) uses its own inlined "terminal" styles.
   Partners pages keep the previous dark look via /assets/site-dark.css. */

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

:root {
    /* letter palette */
    --paper: #fcfcfa;
    --ink: #23262b;
    --hair: #e3e3dd;
    --green: #1f6b4a;
    --green-dark: #17553b;

    /* legacy names kept so older inline styles still resolve sensibly */
    --dark: #fcfcfa;          /* was the page background; now paper */
    --card: #ffffff;
    --card-border: #e3e3dd;
    --text: #23262b;
    --text-muted: #6c7076;
    --gold: #9a6b1f;
    --red: #ab3f2e;
    --blue: #33567d;

    --serif: Charter, "Bitstream Charter", "Iowan Old Style", Georgia, "Times New Roman", serif;
    --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --mono: Consolas, "Cascadia Mono", ui-monospace, Menlo, monospace;
}

html { scroll-behavior: smooth; }

body {
    font-family: var(--serif);
    background: var(--paper);
    color: var(--text);
    line-height: 1.65;
    font-size: 1.08rem;
    overflow-x: hidden;
}

a { color: var(--green-dark); }

.wrap { max-width: 1100px; margin: 0 auto; padding: 0 1.5rem; }
.narrow { max-width: 760px; }

/* --- NAV --- */
.site-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 1.5rem;
    max-width: 1100px;
    margin: 0 auto;
    gap: 1rem;
    position: relative;
    font-family: var(--sans);
    border-bottom: 1px solid var(--hair);
}
.nav-toggle {
    display: none; flex-direction: column; gap: 5px; cursor: pointer;
    background: none; border: 0; padding: 0.4rem;
}
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--ink); border-radius: 2px;
    transition: transform 0.2s ease, opacity 0.2s ease; }
.nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.site-nav .logo {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--ink);
    text-decoration: none;
    white-space: nowrap;
    letter-spacing: -0.01em;
}
.site-nav .logo span { color: var(--green); }
.site-nav .nav-links { display: flex; align-items: center; gap: 1.2rem; }
.site-nav .nav-links a { color: var(--text-muted); text-decoration: none; font-weight: 500; font-size: 0.88rem; }
.site-nav .nav-links a:hover { color: var(--ink); }
/* the CTA must beat the .nav-links a rule above on specificity */
.site-nav .nav-links a.nav-cta { color: #fff; font-weight: 700; }
.site-nav .nav-links a.nav-cta:hover { color: #fff; }
.site-nav .nav-cta {
    background: var(--green);
    color: #fff;
    padding: 0.65rem 1.35rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    white-space: nowrap;
    box-shadow: 0 1px 3px rgba(23,85,59,0.3);
    transition: background .15s, box-shadow .15s;
}
.site-nav .nav-cta:hover { background: var(--green-dark); color: #fff; box-shadow: 0 2px 6px rgba(23,85,59,0.35); }

/* --- BUTTONS --- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
    background: var(--green); color: #fff;
    padding: 0.85rem 1.7rem; border-radius: 6px;
    font-family: var(--sans);
    font-size: 1rem; font-weight: 700; text-decoration: none; cursor: pointer;
    border: 1.5px solid var(--green);
    box-shadow: 0 1px 3px rgba(23,85,59,0.3);
    transition: background .2s, border-color .2s, box-shadow .2s;
}
.btn:hover { background: var(--green-dark); border-color: var(--green-dark); color: #fff; }
.btn.secondary { background: transparent; color: var(--green-dark); box-shadow: none; }
.btn.secondary:hover { background: rgba(31,107,74,0.07); }

/* --- CARDS / SECTIONS --- */
.card {
    background: var(--card);
    border: 1px solid var(--hair);
    border-radius: 6px;
    padding: 1.5rem;
}
.section { padding: 2.5rem 0; }
.eyebrow {
    display: inline-block; color: var(--text-muted); font-weight: 600;
    font-family: var(--sans);
    text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.72rem; margin-bottom: 0.6rem;
}

/* --- PAGE HEADER --- */
.page-head { text-align: center; padding: 2.4rem 1.5rem 1rem; max-width: 760px; margin: 0 auto; }
.page-head h1 { font-size: clamp(1.8rem, 4.5vw, 2.5rem); font-weight: 400; line-height: 1.2; margin-bottom: 0.8rem; letter-spacing: -0.01em; text-wrap: balance; }
.page-head h1 .hl { color: var(--green); }
.page-head p { color: var(--text-muted); font-size: 1.1rem; max-width: 620px; margin: 0 auto; }

/* --- FORM CONTROLS --- */
label { display: block; font-family: var(--sans); font-size: 0.75rem; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 0.35rem; }
input[type="number"], input[type="text"], select {
    width: 100%;
    background: #fff;
    border: 1px solid var(--hair);
    border-radius: 4px;
    color: var(--ink);
    font-size: 1.05rem;
    font-weight: 600;
    font-family: var(--mono);
    padding: 0.7rem 0.85rem;
    transition: border-color .15s;
}
input:focus, select:focus { outline: none; border-color: var(--green); }
input[type="range"] { width: 100%; accent-color: var(--green); height: 28px; }

/* --- FOOTER --- */
.site-footer {
    text-align: center;
    padding: 2.5rem 1.5rem;
    color: var(--text-muted);
    font-family: var(--sans);
    font-size: 0.78rem;
    border-top: 1px solid var(--hair);
    margin-top: 2.5rem;
}
.site-footer a { color: var(--text-muted); }
.site-footer .foot-links { margin-bottom: 0.8rem; display: flex; gap: 1.1rem; justify-content: center; flex-wrap: wrap; }
.site-footer .foot-links a { color: var(--text-muted); text-decoration: none; font-weight: 500; }
.site-footer .foot-links a:hover { color: var(--green-dark); }

/* --- ARTICLE (guides) --- */
.article { max-width: 700px; margin: 0 auto; padding: 1.6rem 1.5rem 2rem; }
.article h1 { font-size: clamp(1.8rem, 4.5vw, 2.4rem); font-weight: 400; line-height: 1.22; letter-spacing: -0.01em; margin-bottom: 0.6rem; text-wrap: balance; }
.article h2 { font-size: 1.45rem; font-weight: 700; margin: 2.2rem 0 0.8rem; letter-spacing: -0.005em; }
.article h3 { font-size: 1.12rem; font-weight: 700; margin: 1.5rem 0 0.5rem; }
.article p { color: var(--ink); margin-bottom: 1.15rem; }
.article ul, .article ol { color: var(--ink); margin: 0 0 1.15rem 1.3rem; }
.article li { margin-bottom: 0.5rem; }
.article strong { font-weight: 700; }
.article .lead { font-size: 1.2rem; color: var(--ink); line-height: 1.6; }
.article blockquote {
    border-left: 3px solid var(--green);
    background: #f5f6f2;
    padding: 0.9rem 1.2rem; margin: 1.5rem 0;
    color: var(--ink);
    font-style: italic;
}
.byline { color: var(--text-muted); font-family: var(--sans); font-size: 0.82rem; margin-bottom: 1.6rem; display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.byline .dot { color: var(--hair); }
.breadcrumb { font-family: var(--sans); font-size: 0.78rem; color: var(--text-muted); margin-bottom: 0.5rem; }
.breadcrumb a { color: var(--text-muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--green-dark); }

/* inline CTA used inside guides */
.inline-cta {
    background: #fff;
    border: 1px solid var(--hair);
    border-top: 3px solid var(--green);
    border-radius: 0;
    padding: 1.6rem 1.5rem; margin: 2.2rem 0; text-align: center;
}
.inline-cta h3 { margin: 0 0 0.5rem; font-size: 1.2rem; font-weight: 700; }
.inline-cta p { color: var(--text-muted); margin-bottom: 1.1rem; font-size: 1rem; }

/* card grid for guide hub */
.guide-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; }
.guide-tile {
    background: var(--card); border: 1px solid var(--hair); border-radius: 6px;
    padding: 1.4rem; text-decoration: none; color: var(--ink); display: block;
    transition: border-color .15s;
}
.guide-tile:hover { border-color: var(--green); }
.guide-tile h3 { font-size: 1.12rem; margin-bottom: 0.4rem; color: var(--ink); font-weight: 700; }
.guide-tile p { color: var(--text-muted); font-size: 0.92rem; line-height: 1.55; }
.guide-tile .more { color: var(--green-dark); font-family: var(--sans); font-weight: 600; font-size: 0.84rem; margin-top: 0.7rem; display: inline-block; }

/* tables inside articles (data-led guides) */
.article table { width: 100%; border-collapse: collapse; font-family: var(--sans); font-size: 0.92rem; margin: 1.2rem 0; }
.article th { text-align: left; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); padding: 0.5rem 0.6rem; border-bottom: 2px solid #9aa39c; }
.article td { padding: 0.55rem 0.6rem; border-bottom: 1px solid var(--hair); font-variant-numeric: tabular-nums; }

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

/* --- MOBILE TYPOGRAPHY — the letter pages read like a phone article, not a blown-up book --- */
@media (max-width: 600px) {
    body { font-size: 0.95rem; line-height: 1.6; }
    .article { padding: 1.2rem 1rem 1.6rem; }
    .article h1 { font-size: 1.5rem; }
    .article h2 { font-size: 1.2rem; margin: 1.7rem 0 0.6rem; }
    .article h3 { font-size: 1.05rem; }
    .article .lead { font-size: 1.05rem; }
    .article blockquote { font-size: 0.92rem; padding: 0.8rem 1rem; margin: 1.2rem 0; }
    .page-head { padding: 1.6rem 1rem 0.6rem; }
    .page-head h1 { font-size: 1.45rem; }
    .page-head p { font-size: 0.95rem; }
    .eyebrow { font-size: 0.66rem; }
    .inline-cta { padding: 1.2rem 1rem; margin: 1.6rem 0; }
}

@media (max-width: 600px) {
    .site-nav { padding: 0.8rem 1rem; }
    .nav-toggle { display: flex; }
    .site-nav .nav-links {
        position: absolute; top: 100%; right: 1rem; left: 1rem;
        flex-direction: column; align-items: stretch; gap: 0;
        background: #fff; border: 1px solid var(--hair);
        border-radius: 8px; padding: 0.5rem; margin-top: 0.4rem;
        display: none; z-index: 60; box-shadow: 0 12px 32px rgba(35,38,43,0.12);
    }
    .site-nav .nav-links.open { display: flex; }
    .site-nav .nav-links a {
        padding: 0.85rem 0.7rem; font-size: 1rem; color: var(--ink);
        border-bottom: 1px solid var(--hair);
    }
    .site-nav .nav-links a:last-child { border-bottom: none; }
    .site-nav .nav-links .nav-cta { text-align: center; margin: 0.45rem 0.2rem 0.2rem; padding: 0.85rem; color: #fff; }
    .wrap { padding: 0 1rem; }
}

/* ===== v2 additions (Oct 2026): bet builder, data pages, tools ===== */
.article.wide { max-width: 900px; }
.small-note { font-family: var(--sans); font-size: 0.8rem; color: var(--text-muted); line-height: 1.55; }
.rg-note { font-family: var(--sans); font-size: 0.78rem; color: var(--text-muted); border-top: 1px solid var(--hair); padding-top: 0.9rem; margin-top: 2rem; }
.callout { border: 1px solid var(--hair); border-left: 3px solid var(--gold); background: #faf8f2; padding: 0.9rem 1.1rem; border-radius: 4px; font-family: var(--sans); font-size: 0.9rem; line-height: 1.55; max-width: 760px; margin: 1rem auto; }
.hub-h { font-size: 1.25rem; font-weight: 700; margin: 2rem 0 0.9rem; }
.hub-h:first-child { margin-top: 0.5rem; }

/* stat row */
.statrow { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); background: #fff; border: 1px solid var(--hair); border-radius: 6px; margin: 1.4rem 0 0.8rem; }
.statrow .st { padding: 0.9rem 1rem; border-right: 1px solid var(--hair); }
.statrow .st:last-child { border-right: 0; }
.statrow .n { font-family: var(--sans); font-size: 1.6rem; font-weight: 700; line-height: 1.15; color: var(--ink); font-variant-numeric: tabular-nums; }
.statrow .n.g { color: var(--green); }
.statrow .l { font-family: var(--sans); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.07em; color: var(--text-muted); margin-top: 0.2rem; }

/* bet builder slip card */
.slip { background: #fff; border: 1px solid var(--hair); border-left: 3px solid var(--green); border-radius: 6px; padding: 0.9rem 1.1rem 0.7rem; margin: 0.9rem 0; font-family: var(--sans); }
.slip.lost { border-left-color: #c9ccc4; }
.slip-h { display: flex; justify-content: space-between; align-items: center; gap: 0.6rem; flex-wrap: wrap; font-size: 0.72rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; }
.slip-m { font-family: var(--serif); font-size: 1.12rem; font-weight: 700; color: var(--ink); margin: 0.3rem 0 0.5rem; }
.leg { display: grid; grid-template-columns: 1.3rem minmax(0, 1fr) auto; gap: 0.5rem; align-items: baseline; padding: 0.38rem 0; border-top: 1px solid var(--hair); font-size: 0.92rem; }
.leg .mk { font-weight: 700; }
.leg .mk.ok { color: var(--green); }
.leg .mk.no { color: var(--red); }
.leg small { color: var(--text-muted); font-size: 0.78rem; }
.leg .pr { color: var(--text-muted); font-variant-numeric: tabular-nums; }
.slip-f { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; border-top: 1px solid var(--hair); padding-top: 0.5rem; font-size: 0.84rem; color: var(--text-muted); }
.slip-f b { color: var(--ink); }
.badge { display: inline-block; font-family: var(--sans); font-size: 0.68rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; padding: 0.15rem 0.5rem; border-radius: 3px; background: #e7f1eb; color: var(--green-dark); }
.badge.lost { background: #f1f1ee; color: var(--text-muted); }

/* selling-point tiles */
.why-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0.8rem; margin: 1rem 0 1.4rem; }
.why { background: #fff; border: 1px solid var(--hair); border-radius: 6px; padding: 1rem 1.1rem; }
.why h3 { font-size: 1rem; margin: 0 0 0.3rem; }
.why p { font-size: 0.92rem; color: var(--text-muted); margin: 0; }

/* club grid */
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 0.5rem; margin: 0.8rem 0 1.4rem; }
.team-grid a { display: block; background: #fff; border: 1px solid var(--hair); border-radius: 6px; padding: 0.6rem 0.8rem; font-family: var(--sans); font-size: 0.9rem; font-weight: 600; color: var(--ink); text-decoration: none; }
.team-grid a:hover { border-color: var(--green); }
.team-grid a small { display: block; font-weight: 400; color: var(--text-muted); font-size: 0.76rem; margin-top: 0.1rem; }

/* tables that may be wider than a phone */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 1rem 0; }
.table-scroll table { margin: 0; }
.article table.compact { font-size: 0.84rem; }
.article table.compact td, .article table.compact th { padding: 0.45rem 0.45rem; vertical-align: top; }

/* questions */
.faq-item h3 { margin-top: 1.2rem; }

/* calculators */
.tool { background: #fff; border: 1px solid var(--hair); border-radius: 6px; padding: 1.2rem; margin: 1.4rem 0; }
.tool-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0.8rem; }
.tool-mode { display: flex; gap: 1.2rem; flex-wrap: wrap; margin-bottom: 0.8rem; }
.tool-mode label { display: inline-flex; align-items: center; gap: 0.35rem; text-transform: none; letter-spacing: 0; font-size: 0.9rem; font-weight: 500; color: var(--ink); }
.legs-in { display: grid; gap: 0.6rem; margin-bottom: 1rem; }
.leg-in { display: grid; grid-template-columns: 4.2rem minmax(0, 1fr) 7.5rem; gap: 0.5rem; align-items: center; }
.leg-in label { margin: 0; }
.tool-out { margin-top: 1rem; border-top: 1px solid var(--hair); padding-top: 1rem; font-family: var(--sans); font-size: 0.95rem; }
.tool-out p { margin-bottom: 0.6rem; }
.tool-out .big { font-size: 1.6rem; font-weight: 700; color: var(--green-dark); margin-bottom: 0.4rem; font-variant-numeric: tabular-nums; }
.tool-out .good { color: var(--green-dark); }
.tool-out .bad { color: var(--red); }
.tool-out table { width: 100%; border-collapse: collapse; font-size: 0.9rem; margin: 0.6rem 0; }
.tool-out th { text-align: left; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); border-bottom: 2px solid #9aa39c; padding: 0.4rem; }
.tool-out td { padding: 0.45rem 0.4rem; border-bottom: 1px solid var(--hair); font-variant-numeric: tabular-nums; }

/* glossary */
.glossary dt { font-weight: 700; font-size: 1.05rem; margin-top: 1.1rem; scroll-margin-top: 1rem; }
.glossary dd { margin: 0.2rem 0 0; color: var(--ink); }

/* a 7-link nav needs a little room between phone and desktop widths */
@media (min-width: 601px) and (max-width: 940px) {
    .site-nav .nav-links { gap: 0.75rem; }
    .site-nav .nav-links a { font-size: 0.8rem; }
    .site-nav .nav-cta { padding: 0.55rem 0.9rem; }
}
@media (max-width: 600px) {
    .statrow { grid-template-columns: 1fr 1fr; }
    .statrow .st { border-bottom: 1px solid var(--hair); }
    .statrow .st:nth-child(2n) { border-right: 0; }
    .leg-in { grid-template-columns: 3.6rem minmax(0, 1fr) 5.5rem; }
    .slip-m { font-size: 1.02rem; }
}
