/* thelotter.top — clean minimalist design system */

:root {
    --color-bg: #ffffff;
    --color-bg-soft: #f7f8fa;
    --color-border: #e5e7eb;
    --color-text: #16181d;
    --color-text-soft: #5b6270;
    --color-accent: #2b4bdb;
    --color-accent-soft: #eef1fd;
    --color-jackpot: #b4790a;
    --color-jackpot-bg: #fdf3e1;
    --color-danger: #c0392b;
    --radius: 8px;
    --container-w: 1080px;
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: var(--font-sans);
    color: var(--color-text);
    background: var(--color-bg);
    line-height: 1.55;
    font-size: 16px;
}

h1, h2, h3 {
    line-height: 1.25;
    font-weight: 700;
    margin: 0 0 .6em;
}

h1 {
    font-size: 1.85rem;
}

h2 {
    font-size: 1.35rem;
    margin-top: 2em;
}

h3 {
    font-size: 1.1rem;
}

p {
    margin: 0 0 1em;
}

a {
    color: var(--color-accent);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

small {
    color: var(--color-text-soft);
    font-size: .85rem;
}

.container {
    max-width: var(--container-w);
    margin: 0 auto;
    padding: 0 1.25rem;
}

/* Header / nav */

.site-header {
    border-bottom: 1px solid var(--color-border);
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.brand {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--color-text);
    letter-spacing: -.01em;
}

.brand:hover {
    text-decoration: none;
    color: var(--color-accent);
}

.nav-toggle {
    display: none;
}

.nav-toggle-label {
    display: none;
    cursor: pointer;
    padding: .4rem;
}

.nav-toggle-label span,
.nav-toggle-label span::before,
.nav-toggle-label span::after {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--color-text);
    position: relative;
    transition: background .15s;
}

.nav-toggle-label span::before,
.nav-toggle-label span::after {
    content: "";
    position: absolute;
    left: 0;
}

.nav-toggle-label span::before {
    top: -6px;
}

.nav-toggle-label span::after {
    top: 6px;
}

.main-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.main-nav a {
    color: var(--color-text-soft);
    font-weight: 600;
    font-size: .95rem;
}

.main-nav a:hover,
.main-nav a.is-active {
    color: var(--color-accent);
    text-decoration: none;
}

@media (max-width: 720px) {
    .nav-toggle-label {
        display: block;
    }

    .main-nav {
        display: none;
        width: 100%;
        flex-direction: column;
        gap: 0;
        padding-bottom: .75rem;
    }

    .main-nav a {
        padding: .6rem 0;
        border-top: 1px solid var(--color-border);
    }

    .nav-toggle:checked ~ .main-nav {
        display: flex;
    }

    .site-header .container {
        flex-wrap: wrap;
    }
}

/* Layout */

main {
    min-height: 60vh;
}

.page {
    padding: 2rem 0 3rem;
}

.prose {
    max-width: 68ch;
}

.lede {
    color: var(--color-text-soft);
    font-size: 1.05rem;
    max-width: 60ch;
}

.back-link {
    display: inline-block;
    margin-bottom: 1rem;
    font-size: .9rem;
    font-weight: 600;
}

/* Lottery grid */

.lottery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 1rem;
    list-style: none;
    margin: 1.5rem 0 0;
    padding: 0;
}

.lottery-card {
    display: block;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 1.1rem 1.2rem;
    background: var(--color-bg);
    transition: border-color .15s, box-shadow .15s;
}

.lottery-card:hover {
    text-decoration: none;
    border-color: var(--color-accent);
    box-shadow: 0 2px 10px rgba(43, 75, 219, .08);
}

.lottery-card .name {
    display: block;
    font-weight: 700;
    color: var(--color-text);
    font-size: 1.05rem;
    margin-bottom: .3rem;
}

.lottery-card .country {
    color: var(--color-text-soft);
    font-size: .85rem;
}

.lottery-card .jackpot {
    display: inline-block;
    margin-top: .6rem;
    font-size: .8rem;
    font-weight: 700;
    color: var(--color-jackpot);
    background: var(--color-jackpot-bg);
    padding: .2rem .55rem;
    border-radius: 999px;
}

/* Cards / sections */

.card {
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 1.5rem;
    background: var(--color-bg);
}

.stat-line {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem 1.75rem;
    margin: 1rem 0 1.5rem;
    padding: 0;
    list-style: none;
}

.stat-line dt {
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--color-text-soft);
    margin: 0;
}

.stat-line dd {
    margin: .1rem 0 0;
    font-weight: 700;
}

/* Tables */

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: .95rem;
}

th, td {
    text-align: left;
    padding: .65rem .75rem;
    border-bottom: 1px solid var(--color-border);
    white-space: nowrap;
}

th {
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--color-text-soft);
    font-weight: 700;
}

tbody tr:hover {
    background: var(--color-bg-soft);
}

/* Draw numbers */

.numbers {
    display: inline-flex;
    flex-wrap: wrap;
    gap: .3rem;
    align-items: center;
}

.ball {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    height: 2rem;
    padding: 0 .3rem;
    border-radius: 999px;
    background: var(--color-accent-soft);
    color: var(--color-accent);
    font-weight: 700;
    font-size: .85rem;
}

.ball.bonus {
    background: var(--color-jackpot-bg);
    color: var(--color-jackpot);
}

.numbers-big .ball {
    min-width: 2.75rem;
    height: 2.75rem;
    font-size: 1.15rem;
}

/* Buttons */

.btn {
    display: inline-block;
    border: 1px solid var(--color-accent);
    background: var(--color-accent);
    color: #fff;
    font-weight: 700;
    font-size: .95rem;
    padding: .6rem 1.1rem;
    border-radius: var(--radius);
    cursor: pointer;
}

.btn:hover {
    text-decoration: none;
    opacity: .92;
}

.btn-outline {
    background: transparent;
    color: var(--color-accent);
}

.btn-row {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
    margin: 1.25rem 0;
}

/* Forms */

label {
    display: block;
    font-weight: 600;
    font-size: .9rem;
    margin-bottom: .3rem;
}

input[type=text], input[type=email], select, textarea {
    width: 100%;
    max-width: 420px;
    font: inherit;
    padding: .55rem .7rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background: var(--color-bg);
    color: var(--color-text);
}

textarea {
    max-width: 560px;
}

textarea:focus, input:focus, select:focus {
    outline: 2px solid var(--color-accent);
    outline-offset: 1px;
}

.field {
    margin-bottom: 1rem;
}

.form-errors {
    color: var(--color-danger);
    padding: .8rem 1rem;
    background: #fdecea;
    border-radius: var(--radius);
    margin-bottom: 1rem;
}

.form-success {
    color: #146c2e;
    padding: .8rem 1rem;
    background: #e8f7ee;
    border-radius: var(--radius);
    margin-bottom: 1rem;
}

/* Footer */

.site-footer {
    border-top: 1px solid var(--color-border);
    margin-top: 3rem;
    padding: 2rem 0;
    color: var(--color-text-soft);
    font-size: .9rem;
}

.site-footer nav {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    margin-bottom: .75rem;
}

.site-footer a {
    color: var(--color-text-soft);
}

.site-footer a:hover {
    color: var(--color-accent);
}

/* News */

.news-list {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0 0;
}

.news-list li {
    padding: 1rem 0;
    border-bottom: 1px solid var(--color-border);
}

.news-list a {
    font-weight: 700;
    color: var(--color-text);
    font-size: 1.05rem;
}

.news-list a:hover {
    color: var(--color-accent);
    text-decoration: none;
}

article {
    max-width: 72ch;
}

article img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius);
}

/* Legacy lottery-description HTML from the DB uses old Bootstrap-style
   grid classes (row / col-md-*) with no Bootstrap loaded — give them a
   minimal flex fallback so two-column layouts don't collapse. */

section .row {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    margin: 0;
}

section [class*="col-md-"] {
    flex: 1 1 320px;
    min-width: 0;
}

section table {
    margin-bottom: 1rem;
}
