:root {
    --color-bg: #f6f7f5;
    --color-surface: #ffffff;
    --color-text: #1f2937;
    --color-text-muted: #5b6472;
    --color-primary: #14532d;
    --color-primary-dark: #0d3a20;
    --color-primary-light: #e6f0ea;
    --color-accent: #f2b705;
    --color-accent-dark: #dba604;
    --color-border: #e5e7eb;
    --color-info: #1e3a5f;
    --color-info-dark: #15293f;
    --color-cta: #8a2c34;
    --color-cta-dark: #6f2229;
    --shadow-card: 0 1px 3px rgba(15, 23, 42, 0.08), 0 8px 24px rgba(15, 23, 42, 0.06);
    --radius: 12px;
    --content-width: 1200px;
    --home-rail-width: 300px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--color-bg);
    color: var(--color-text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.5;
}

h1, h2, h3 {
    line-height: 1.25;
    color: var(--color-text);
}

a {
    color: var(--color-primary);
}

a:hover {
    color: var(--color-primary-dark);
}

/* Header */
.site-header {
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
}

.site-header__inner {
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.site-header__brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--color-text);
    text-decoration: none;
}

.site-header__brand:hover {
    color: var(--color-text);
}

.site-header__mark {
    width: 2.6rem;
    height: 2.6rem;
    flex-shrink: 0;
}

.site-header__nav {
    display: flex;
    gap: 1.25rem;
    font-size: 0.9rem;
}

.site-header__nav a {
    color: var(--color-text-muted);
    text-decoration: none;
}

.site-header__nav a:hover {
    color: var(--color-primary);
}

.site-header__dropdown {
    position: relative;
}

.site-header__dropdown-toggle {
    display: inline-block;
}

.site-header__dropdown-menu {
    display: none;
    position: absolute;
    /* No gap between the toggle and the menu — a margin/gap here would be a
       dead zone the mouse has to cross while still hovering nothing, which
       drops the :hover state and closes the menu before you can reach it.
       The visual breathing room comes from padding-top instead, which stays
       part of the hoverable box. */
    top: 100%;
    left: 0;
    z-index: 20;
    min-width: 140px;
    padding-top: 0.5rem;
}

.site-header__dropdown-menu__inner {
    padding: 0.4rem 0;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
}

.site-header__dropdown:hover .site-header__dropdown-menu,
.site-header__dropdown:focus-within .site-header__dropdown-menu {
    display: block;
}

.site-header__dropdown-menu a {
    display: block;
    padding: 0.45rem 1rem;
    white-space: nowrap;
}

.site-header__dropdown-menu a:hover {
    background: var(--color-bg);
}

/* Content container */
.site-content {
    flex: 1 0 auto;
    width: 100%;
}

.container {
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 2.5rem 1.5rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.7rem 1.4rem;
    border-radius: 999px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
    transition: transform 0.05s ease, background 0.15s ease;
}

.btn--primary {
    background: var(--color-accent);
    color: #1f2937;
}

.btn--primary:hover {
    background: var(--color-accent-dark);
    color: #1f2937;
}

/* Flash messages (django.contrib.messages) */
.messages {
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 1.5rem 1.5rem 0;
    list-style: none;
}

.messages__item {
    padding: 0.8rem 1.1rem;
    border-radius: 8px;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
    background: var(--color-primary-light);
    color: var(--color-primary-dark);
    border: 1px solid var(--color-primary);
}

.messages__item--error {
    background: #fdeceb;
    color: #8a2c22;
    border-color: #e6a49c;
}

.btn:active {
    transform: scale(0.98);
}

/* Disclaimer / callout boxes */
.disclaimer-box {
    background: #fff8e6;
    border: 1px solid #f2d888;
    color: #6b5300;
    border-radius: var(--radius);
    padding: 0.9rem 1.1rem;
    font-size: 0.9rem;
    line-height: 1.5;
}

.disclaimer-box a {
    color: #6b5300;
}

/* Prominent help callout, e.g. linking out to BeGambleAware */
.help-callout {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
    background: var(--color-primary-light);
    border: 2px solid var(--color-primary);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin: 1.5rem 0 2rem;
}

.help-callout__text {
    margin: 0;
    color: var(--color-primary-dark);
    font-size: 1rem;
    max-width: 480px;
}

.help-callout__text strong {
    display: block;
    font-size: 1.15rem;
    margin-bottom: 0.25rem;
}

.help-callout .btn--primary {
    flex-shrink: 0;
}

/* Age check page */
.age-check {
    flex: 1 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.5rem;
    background: linear-gradient(180deg, var(--color-primary-light), var(--color-bg) 60%);
}

.age-check__card {
    background: var(--color-surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    padding: 2.5rem;
    max-width: 440px;
    width: 100%;
}

.age-check__card h1 {
    margin: 0 0 0.75rem;
    font-size: 1.5rem;
}

.age-check__card > p {
    color: var(--color-text-muted);
    margin: 0 0 1.5rem;
}

.age-check__field {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.age-check__field input[type="checkbox"] {
    accent-color: var(--color-primary);
    width: 1.1em;
    height: 1.1em;
    margin-top: 0.15em;
    flex-shrink: 0;
}

.age-check__field .errorlist {
    list-style: none;
    margin: 0.25rem 0 0;
    padding: 0;
    color: #b91c1c;
    font-size: 0.8rem;
}

.age-check form button {
    width: 100%;
    margin-top: 0.5rem;
    padding: 0.8rem;
    border: none;
    border-radius: 999px;
    background: var(--color-primary);
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
}

.age-check form button:hover {
    background: var(--color-primary-dark);
}

.age-check__disclaimer {
    margin-top: 1.5rem;
    margin-bottom: 0;
    font-size: 0.82rem;
    color: var(--color-text-muted);
    text-align: center;
}

/* Legal pages */
.legal-page {
    max-width: 760px;
    margin: 0 auto;
    padding: 3rem 1.5rem;
}

.legal-page h1 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.legal-page__body p {
    margin: 0 0 1rem;
}

/* Contact Us page */
.contact-page {
    max-width: 640px;
    margin: 0 auto;
    padding: 3rem 1.5rem;
}

.contact-page h1 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.contact-page__intro {
    color: var(--color-text-muted);
    margin-bottom: 2rem;
}

.contact-form__field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-bottom: 1.25rem;
}

.contact-form__field label {
    font-weight: 600;
    font-size: 0.9rem;
}

.contact-form__required {
    color: #b91c1c;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form select,
.contact-form textarea {
    padding: 0.65rem 0.8rem;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    background: var(--color-surface);
    color: var(--color-text);
}

.contact-form textarea {
    resize: vertical;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
    outline: 2px solid var(--color-primary);
    outline-offset: 1px;
}

.contact-form .errorlist {
    list-style: none;
    margin: 0.15rem 0 0;
    padding: 0;
    color: #b91c1c;
    font-size: 0.85rem;
}

.contact-form button {
    margin-top: 0.5rem;
}

/* Contact Us thank-you page */
.contact-thanks {
    max-width: 560px;
    margin: 0 auto;
    padding: 4rem 1.5rem;
    text-align: center;
}

.contact-thanks p {
    color: var(--color-text-muted);
    margin: 1rem 0 2rem;
}

/* Newsletter unsubscribe confirmation page */
.newsletter-unsubscribed {
    max-width: 560px;
    margin: 0 auto;
    padding: 4rem 1.5rem;
    text-align: center;
}

.newsletter-unsubscribed p {
    color: var(--color-text-muted);
    margin: 1rem 0 2rem;
}

/* Home page hero */
.hero {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    color: #fff;
    padding: 4rem 1.5rem;
    text-align: center;
}

.hero h1 {
    color: #fff;
    font-size: 2.4rem;
    margin: 0 0 0.75rem;
}

.hero p {
    color: #d7e6dc;
    max-width: 560px;
    margin: 0 auto;
    font-size: 1.1rem;
}

/* Section heading with a "view all" link (used on the home page) */
.section-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.section-heading__link {
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

/* Tip grid + cards */
.tip-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.25rem;
    margin: 1.5rem 0 0;
    padding: 0;
    list-style: none;
}

.tip-grid--bet-of-day {
    /* auto-fill (not auto-fit): auto-fit stretches a lone card to fill every
       track up to max-width, so a single Bet of the Day card would blow up
       to fill the full 760px row. auto-fill keeps the empty tracks in the
       grid instead of collapsing into the item, so one card stays the same
       width as a card in the regular .tip-grid.
       minmax()'s max must stay flexible (1fr), not a fixed length like
       360px — auto-fill sizes its repeat count off the max track size when
       it's fixed, so a fixed max here would make the browser ask "how many
       360px columns fit?" instead of "how many 260px columns fit?", which
       under-counts and forces cards to stack sooner than the space allows. */
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    max-width: 760px;
}

/* Home page: two-column layout — the newsletter signup sits in a sidebar
   that runs alongside the full stack of homepage sections, rather than
   being scoped to just one of them. */
.home-layout {
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 2.5rem 1.5rem;
    display: grid;
    grid-template-columns: 1fr var(--home-rail-width);
    gap: 2rem;
    align-items: start;
}

.home-layout__main {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.home-layout__aside {
    min-width: 0;
}

@media (max-width: 780px) {
    .home-layout {
        grid-template-columns: 1fr;
    }
}

/* Homepage section (was a plain .container before the two-column layout;
   width and horizontal padding now come from .home-layout / .home-layout__main). */
.home-section {
    width: 100%;
}

/* Newsletter signup widget */
.newsletter-signup {
    background: var(--color-surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    overflow: hidden;
}

.newsletter-signup__header {
    background: var(--color-info);
    color: #fff;
    padding: 1rem 1.25rem;
}

.newsletter-signup__header h3 {
    margin: 0;
    font-size: 1rem;
    line-height: 1.4;
    color: #fff;
}

.newsletter-signup__body {
    padding: 1.25rem;
}

.newsletter-signup__success {
    background: var(--color-primary-light);
    color: var(--color-primary-dark);
    border: 1px solid var(--color-primary);
    border-radius: 8px;
    padding: 0.6rem 0.8rem;
    font-size: 0.85rem;
    margin: 0 0 0.9rem;
}

.newsletter-signup__field {
    position: relative;
    margin-bottom: 0.4rem;
}

.newsletter-signup__field input[type="email"] {
    width: 100%;
    padding: 0.65rem 1.6rem 0.65rem 0.8rem;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    font-size: 0.9rem;
    font-family: inherit;
    background: var(--color-surface);
    color: var(--color-text);
}

.newsletter-signup__field input[type="email"]:focus {
    outline: 2px solid var(--color-info);
    outline-offset: 1px;
}

.newsletter-signup__field .newsletter-signup__required {
    position: absolute;
    right: 0.7rem;
    top: 50%;
    transform: translateY(-50%);
}

.newsletter-signup__required {
    color: #b91c1c;
}

.newsletter-signup__errors {
    list-style: none;
    margin: 0 0 0.75rem;
    padding: 0;
    color: #b91c1c;
    font-size: 0.78rem;
}

.newsletter-signup__errors:empty {
    display: none;
}

.newsletter-signup__field.newsletter-signup--invalid input[type="email"] {
    border-color: #b91c1c;
}

.newsletter-signup__checkbox {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.85rem;
    margin-bottom: 0.4rem;
}

.newsletter-signup__checkbox input[type="checkbox"] {
    accent-color: var(--color-info);
    width: 1.05em;
    height: 1.05em;
    margin-top: 0.15em;
    flex-shrink: 0;
}

.newsletter-signup__checkbox.newsletter-signup--invalid input[type="checkbox"] {
    outline: 2px solid #b91c1c;
    outline-offset: 1px;
}

.newsletter-signup__submit {
    display: block;
    width: 100%;
    padding: 0.7rem;
    border: none;
    border-radius: 999px;
    background: var(--color-cta);
    color: #fff;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
}

.newsletter-signup__submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.newsletter-signup__submit:hover {
    background: var(--color-cta-dark);
}

.newsletter-signup__legal {
    margin: 0.75rem 0 0;
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

.newsletter-signup__legal a {
    color: var(--color-text-muted);
    text-decoration: underline;
}

.tip-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
    color: inherit;
    text-decoration: none;
    transition: box-shadow 0.15s ease, transform 0.05s ease;
}

.tip-card:hover {
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.12), 0 12px 28px rgba(15, 23, 42, 0.1);
    color: inherit;
}

.tip-card__header {
    background: var(--color-primary-dark);
    color: #fff;
    padding: 0.65rem 1rem;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
    font-size: 0.9rem;
}

.tip-card__league {
    font-weight: 700;
}

.tip-card__country {
    color: #cfe3d7;
    font-size: 0.8rem;
    white-space: nowrap;
}

/* Shared sport-identifying icon (soccer ball / tennis ball), sized and
   colored via currentColor by whichever wrapper embeds it. */
.sport-icon-svg {
    display: block;
    width: 1em;
    height: 1em;
}

.tip-card__sport-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: center;
    width: 1.7rem;
    height: 1.7rem;
    border-radius: 50%;
    background: #fff;
    color: var(--color-primary-dark);
    flex-shrink: 0;
}

.tip-card__sport-icon .sport-icon-svg {
    width: 1.4rem;
    height: 1.4rem;
}

.tip-card__body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.9rem 1rem;
}

.tip-card__teams {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 0;
}

.tip-card__team {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tip-card__dot {
    width: 0.7rem;
    height: 0.7rem;
    border-radius: 50%;
    flex-shrink: 0;
}

.tip-card__dot--home {
    background: var(--color-primary);
}

.tip-card__dot--away {
    background: var(--color-accent);
}

.tip-card__time {
    text-align: right;
    flex-shrink: 0;
}

.tip-card__date {
    display: block;
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

.tip-card__clock {
    display: block;
    font-weight: 700;
    font-size: 1.05rem;
}

.tip-card__footer {
    border-top: 1px solid var(--color-border);
    background: var(--color-bg);
    padding: 0.65rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    font-size: 0.85rem;
}

.tip-card__market {
    color: var(--color-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tip-card__result {
    flex-shrink: 0;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.75rem;
}

.tip-card__result--win {
    background: #e1f6e9;
    color: #0d7a3f;
}

.tip-card__result--loss {
    background: #fdeaea;
    color: #b91c1c;
}

.tip-card__result--pending {
    background: #eef0f2;
    color: #5b6472;
}

.tip-card__view-link {
    flex-shrink: 0;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--color-primary);
    white-space: nowrap;
}

.tip-card:hover .tip-card__view-link {
    color: var(--color-primary-dark);
}

/* Tip list controls: filters, sorting, pagination */
.tip-filters {
    display: flex;
    align-items: flex-end;
    gap: 1.25rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.tip-filters__field {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

.tip-filters__field select {
    padding: 0.5rem 0.6rem;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    font-size: 0.9rem;
    min-width: 160px;
}

.tip-filters__clear {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    text-decoration: underline;
}

.tip-sort {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1.25rem;
    font-size: 0.9rem;
}

.tip-sort__label {
    color: var(--color-text-muted);
}

.tip-sort__link {
    text-decoration: none;
    color: var(--color-text-muted);
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
    border: 1px solid var(--color-border);
}

.tip-sort__link--active {
    color: var(--color-primary);
    border-color: var(--color-primary);
    font-weight: 700;
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 2.5rem;
    font-size: 0.9rem;
}

.pagination a {
    text-decoration: none;
    font-weight: 600;
}

.pagination__status {
    color: var(--color-text-muted);
}

/* Article grid + cards */
.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
    margin: 1.5rem 0 0;
    padding: 0;
    list-style: none;
}

.article-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
}

.article-card__media {
    display: block;
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 33.75%;
    background: var(--color-primary-light);
    flex-shrink: 0;
    overflow: hidden;
}

.article-card__media img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.article-card__media-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.article-card__media-placeholder svg {
    width: 30%;
    height: 30%;
}

.article-card__header {
    background: var(--color-primary-dark);
    color: #fff;
    padding: 0.65rem 1rem;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
    font-size: 0.85rem;
}

.article-card__category {
    font-weight: 700;
    color: #fff;
    text-decoration: none;
}

.article-card__category:hover {
    color: #fff;
    text-decoration: underline;
}

.article-card__date {
    color: #cfe3d7;
    font-size: 0.8rem;
    white-space: nowrap;
}

.article-card__body {
    padding: 1rem;
    flex: 1 0 auto;
}

.article-card__title {
    margin: 0 0 0.5rem;
    font-size: 1.05rem;
}

.article-card__title a {
    color: var(--color-text);
    text-decoration: none;
}

.article-card__title a:hover {
    color: var(--color-primary);
}

.article-card__excerpt {
    margin: 0;
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.article-card__footer {
    border-top: 1px solid var(--color-border);
    background: var(--color-bg);
    padding: 0.65rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    font-size: 0.85rem;
}

.article-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.article-card__tag {
    background: var(--color-primary-light);
    color: var(--color-primary-dark);
    border-radius: 999px;
    padding: 0.15rem 0.55rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.article-card__link {
    white-space: nowrap;
    font-weight: 600;
    text-decoration: none;
}

/* Article detail page */
.article-page {
    max-width: 760px;
    margin: 0 auto;
    padding: 3rem 1.5rem;
}

.article-page__meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.article-page__meta .article-card__category {
    background: var(--color-primary-dark);
    color: #fff;
    padding: 0.15rem 0.6rem;
    border-radius: 999px;
    font-size: 0.75rem;
}

.article-page__meta .article-card__date {
    color: var(--color-text-muted);
}

.article-page__author {
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.article-page h1 {
    font-size: 2rem;
    margin: 0 0 1.5rem;
}

.article-page__image {
    width: 100%;
    height: auto;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
}

.article-page__intro {
    font-size: 1.1rem;
    color: var(--color-text-muted);
    margin-bottom: 1.5rem;
}

.article-page__body {
    margin-bottom: 1.5rem;
}

.article-page__body p {
    margin: 0 0 1rem;
}

/* Tip detail page */
.tip-detail {
    max-width: 640px;
    margin: 0 auto;
    padding: 3rem 1.5rem;
}

.tip-detail__breadcrumb {
    margin: 0 0 1.5rem;
    font-size: 0.9rem;
}

.tip-detail__breadcrumb a {
    text-decoration: none;
    font-weight: 600;
}

.tip-detail__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.tip-detail__top-text {
    flex: 1 1 auto;
    min-width: 0;
}

.tip-detail__sport-icon {
    flex-shrink: 0;
    color: var(--color-text);
    margin-top: 0.2rem;
}

.tip-detail__sport-icon .sport-icon-svg {
    width: 1.9rem;
    height: 1.9rem;
}

.tip-detail__header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.tip-detail__header .article-card__category {
    background: var(--color-primary-dark);
    color: #fff;
    padding: 0.15rem 0.6rem;
    border-radius: 999px;
    font-size: 0.75rem;
}

.tip-detail__header .article-card__date {
    color: var(--color-text-muted);
}

.tip-detail h1 {
    font-size: 1.8rem;
    margin: 0 0 1.5rem;
}

.tip-detail__facts {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.25rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    padding: 1.5rem;
    margin: 0 0 2rem;
}

.tip-detail__fact dt {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: var(--color-text-muted);
    margin-bottom: 0.25rem;
}

.tip-detail__fact dd {
    margin: 0;
    font-weight: 600;
    font-size: 1.05rem;
}

.tip-detail__reason h2 {
    font-size: 1.3rem;
    margin: 0 0 0.75rem;
}

.tip-detail__reason p {
    margin: 0;
    color: var(--color-text);
    line-height: 1.6;
}

/* Results page */
.results-intro {
    color: var(--color-text-muted);
    line-height: 1.6;
}

.results-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1.75rem;
}

.results-summary__card {
    flex: 1 1 140px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    padding: 1.25rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    text-align: center;
}

.results-summary__value {
    font-size: 1.9rem;
    font-weight: 700;
    color: var(--color-primary-dark);
}

.results-summary__label {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.results-summary__card--won .results-summary__value {
    color: #0d7a3f;
}

.results-summary__card--lost .results-summary__value {
    color: #b91c1c;
}

.results-summary__card--accent .results-summary__value {
    color: var(--color-accent-dark);
}

.results-summary__note {
    color: var(--color-text-muted);
    font-size: 0.8rem;
    margin: 0.6rem 0 0;
}

.results-chart {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    padding: 1.5rem;
    margin-top: 2rem;
}

.results-chart h2 {
    margin: 0 0 1rem;
    font-size: 1.15rem;
}

.results-chart__canvas-wrap {
    position: relative;
    height: 320px;
}

.results-tables {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-top: 2rem;
}

.results-table {
    flex: 1 1 320px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    padding: 1.5rem;
    overflow-x: auto;
}

.results-table h2 {
    margin: 0 0 1rem;
    font-size: 1.15rem;
}

.results-table table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.results-table th,
.results-table td {
    padding: 0.65rem 0.4rem;
    text-align: right;
    border-bottom: 1px solid var(--color-border);
    white-space: nowrap;
}

.results-table th:first-child,
.results-table td:first-child {
    text-align: left;
}

.results-table th {
    color: var(--color-text-muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 600;
}

.results-table tbody tr:last-child td {
    border-bottom: none;
}

/* Footer */
.site-footer {
    background: var(--color-primary-dark);
    color: #d7e6dc;
    margin-top: auto;
}

.site-footer__inner {
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

.site-footer__disclaimer {
    font-size: 0.85rem;
    line-height: 1.6;
    margin: 0 0 1rem;
}

.site-footer__disclaimer a {
    color: #fff;
    text-decoration: underline;
}

.site-footer__links {
    font-size: 0.85rem;
    margin: 0;
}

.site-footer__links a {
    color: #fff;
    text-decoration: none;
}

.site-footer__links a:hover {
    text-decoration: underline;
}

/* Cookie consent banner + settings panel */
.cookie-consent {
    position: fixed;
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    z-index: 1000;
    max-width: 720px;
    margin: 0 auto;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    padding: 1.5rem;
}

.cookie-consent.is-hidden {
    display: none;
}

.cookie-consent__banner {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    align-items: center;
    justify-content: space-between;
}

/* The [hidden] attribute is how cookie_consent.js swaps the compact banner
   for the settings panel — without this, the unconditional `display: flex`
   above (same specificity as the UA's own `[hidden] { display: none }`,
   but author styles win the tie) would keep it visible regardless. */
.cookie-consent__banner[hidden],
.cookie-consent__panel[hidden] {
    display: none;
}

.cookie-consent__banner-text h2 {
    margin: 0 0 0.5rem;
    font-size: 1.1rem;
}

.cookie-consent__banner-text p {
    margin: 0;
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.cookie-consent__banner-actions {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    flex-shrink: 0;
}

.cookie-consent__btn-manage,
.cookie-consent__btn-decline {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    color: var(--color-text);
}

.cookie-consent__btn-manage:hover,
.cookie-consent__btn-decline:hover {
    background: var(--color-bg);
}

.cookie-consent__panel h2 {
    margin: 0 0 0.5rem;
    font-size: 1.1rem;
}

.cookie-consent__panel > p {
    margin: 0 0 1.25rem;
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.cookie-consent__category {
    padding: 0.9rem 0;
    border-top: 1px solid var(--color-border);
}

.cookie-consent__category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    font-weight: 600;
    cursor: pointer;
}

.cookie-consent__category p {
    margin: 0.4rem 0 0;
    color: var(--color-text-muted);
    font-size: 0.85rem;
}

.cookie-consent__always-on {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--color-primary);
    background: var(--color-primary-light);
    padding: 0.15rem 0.6rem;
    border-radius: 999px;
}

.cookie-consent__switch {
    position: relative;
    display: inline-block;
    width: 2.4rem;
    height: 1.4rem;
    flex-shrink: 0;
}

.cookie-consent__switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.cookie-consent__slider {
    position: absolute;
    inset: 0;
    background: var(--color-border);
    border-radius: 999px;
    transition: background 0.15s ease;
}

.cookie-consent__slider::before {
    content: "";
    position: absolute;
    width: 1.1rem;
    height: 1.1rem;
    left: 0.15rem;
    top: 0.15rem;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.15s ease;
}

.cookie-consent__switch input:checked + .cookie-consent__slider {
    background: var(--color-primary);
}

.cookie-consent__switch input:checked + .cookie-consent__slider::before {
    transform: translateX(1rem);
}

.cookie-consent__panel-actions {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    justify-content: flex-end;
    margin-top: 1.25rem;
}

@media (max-width: 640px) {
    .cookie-consent__banner {
        flex-direction: column;
        align-items: stretch;
    }

    .cookie-consent__banner-actions {
        justify-content: flex-end;
    }
}

/* Betting calculators (Dutching, Split Staking) */
.calculator__intro {
    color: var(--color-text-muted);
}

.calculator__field {
    margin: 1.5rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    max-width: 220px;
}

.calculator__field label {
    font-weight: 600;
    font-size: 0.9rem;
}

.calculator__input {
    padding: 0.65rem 0.8rem;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    background: var(--color-surface);
    color: var(--color-text);
}

.calculator__input:focus {
    outline: 2px solid var(--color-primary);
    outline-offset: 1px;
}

.calculator__table-wrap {
    overflow-x: auto;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
}

.calculator__table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.calculator__table th,
.calculator__table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--color-border);
    white-space: nowrap;
}

.calculator__table th {
    background: var(--color-primary-light);
    font-weight: 700;
    color: var(--color-primary-dark);
}

.calculator__table tbody tr:last-child td {
    border-bottom: none;
}

.calculator__table .calculator__input {
    min-width: 6rem;
}

.calculator__table .js-stake,
.calculator__table .js-win {
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

/* Home page: recent-articles carousel */
.home-carousel-wrap {
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 1.75rem 1.5rem 0;
}

.home-carousel {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    background: var(--color-primary-light);
}

.home-carousel__track {
    display: flex;
    transition: transform 0.4s ease;
}

.home-carousel__slide {
    position: relative;
    flex: 0 0 100%;
    display: block;
    aspect-ratio: 21 / 8;
    color: #fff;
    text-decoration: none;
}

.home-carousel__image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.home-carousel__image--placeholder {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
}

.home-carousel__overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 0.35rem;
    padding: 1.5rem 6rem 1.75rem 1.75rem;
    background: linear-gradient(0deg, rgba(13, 58, 32, 0.92) 0%, rgba(13, 58, 32, 0.35) 55%, rgba(13, 58, 32, 0) 100%);
}

.home-carousel__eyebrow {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--color-accent);
}

.home-carousel__title {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.25;
    color: #fff;
}

.home-carousel__desc {
    font-size: 0.95rem;
    color: #e7efe9;
    max-width: 60ch;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.home-carousel__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 2.5rem;
    height: 2.5rem;
    border: none;
    border-radius: 50%;
    background: rgba(13, 58, 32, 0.55);
    color: #fff;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease;
}

.home-carousel__arrow:hover {
    background: rgba(13, 58, 32, 0.85);
}

.home-carousel__arrow--prev {
    left: 1rem;
}

.home-carousel__arrow--next {
    right: 1rem;
}

.home-carousel__dots {
    position: absolute;
    right: 1.5rem;
    bottom: 1.25rem;
    display: flex;
    gap: 0.4rem;
}

.home-carousel__dot {
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 50%;
    border: none;
    padding: 0;
    background: rgba(255, 255, 255, 0.45);
    cursor: pointer;
}

.home-carousel__dot--active {
    background: var(--color-accent);
}

@media (max-width: 640px) {
    .home-carousel__slide {
        aspect-ratio: 4 / 5;
    }

    .home-carousel__overlay {
        padding: 1.25rem;
    }

    .home-carousel__title {
        font-size: 1.2rem;
    }

    .home-carousel__arrow {
        width: 2rem;
        height: 2rem;
    }
}
