:root {
    --ink: #221c18;
    --ink-2: #6f655e;
    --hairline: #e3d9d3;
    --teal: #2e7d6b;
    --red: #b3402e;
    --page: #f4efec;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
    background: var(--page);
    color: var(--ink);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.55;
}

.wrap { max-width: 720px; margin: 0 auto; padding: 20px 20px 72px; }

.topnav { display: flex; flex-wrap: wrap; gap: 20px; border-bottom: 1px solid var(--hairline); margin-bottom: 40px; }
.topnav a { padding: 10px 0; color: var(--ink-2); text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.topnav a:hover { text-decoration: underline; }
.topnav a.current { color: var(--ink); box-shadow: inset 0 -1px 0 var(--ink); text-decoration: none; }

h1 {
    font-family: Georgia, 'Times New Roman', serif;
    font-weight: 500;
    font-size: 42px;
    line-height: 1.15;
    margin: 0 0 12px;
    letter-spacing: -0.01em;
}
h2 {
    font-family: Georgia, 'Times New Roman', serif;
    font-weight: 500;
    font-size: 28px;
    margin: 48px 0 16px;
}
.fact { color: var(--teal); font-weight: 600; font-size: 14px; margin: 0 0 24px; }
.intro { font-size: 18px; margin: 0 0 8px; }
.muted { color: var(--ink-2); }

.btn {
    appearance: none;
    background: var(--ink);
    color: #fff;
    border: none;
    border-radius: 999px;
    padding: 10px 20px;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}
.btn:hover { opacity: 0.9; }
.btn:disabled { opacity: 0.4; cursor: default; }
.btn-secondary { background: transparent; color: var(--ink); border: 1px solid var(--hairline); }
a.btn { display: inline-flex; }

.callout {
    border-left: 3px solid var(--hairline);
    padding: 4px 0 4px 16px;
    margin: 16px 0;
}
.callout-title { font-weight: 700; margin: 0 0 4px; }
.callout p { margin: 0; color: var(--ink); }

.photo { width: 100%; border-radius: 16px; display: block; }
.caption { color: var(--ink-2); font-size: 13px; margin: 8px 0 0; }

/* Article index */
.ol-index { display: flex; flex-direction: column; margin-top: 8px; }
.ol-item { display: flex; gap: 16px; align-items: baseline; padding: 16px 0; border-bottom: 1px solid var(--hairline); text-decoration: none; color: var(--ink); }
.ol-item:first-child { padding-top: 4px; }
.ol-item:last-child { border-bottom: none; }
.ol-item:hover .ol-name { text-decoration: underline; }
.ol-num { color: var(--ink-2); min-width: 20px; }
.ol-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ol-name { font-weight: 600; }
.ol-game { color: var(--teal); font-weight: 600; font-size: 12px; }
.ol-teaser { color: var(--ink-2); }

/* Article math list */
.math { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 14px; }
.math li { padding-left: 6px; }

/* Blackjack table */
.ol-table { background: #2e5e4e; border-radius: 24px; padding: 20px; color: #fff; display: flex; flex-direction: column; gap: 18px; }
.ol-bet { display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.ol-balance { font-size: 14px; }
.ol-balance b { font-weight: 600; }
.ol-bet-row { display: flex; gap: 10px; flex-wrap: wrap; }
.ol-chip { min-width: 48px; min-height: 48px; border-radius: 999px; border: 2px dashed rgba(255,255,255,0.55); background: rgba(255,255,255,0.12); color: #fff; font-weight: 600; font-size: 14px; cursor: pointer; font-family: inherit; }
.ol-chip-on { background: #fff; color: #2e5e4e; border-style: solid; }
.ol-chip:disabled { opacity: 0.35; cursor: default; }
.ol-note { font-size: 12px; color: rgba(255,255,255,0.75); }
.ol-table .btn { background: #fff; color: var(--ink); }
.ol-table .btn-secondary { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,0.55); }
.ol-hand { display: flex; flex-direction: column; gap: 8px; }
.ol-hand-label { font-size: 12px; font-weight: 600; letter-spacing: 0.02em; text-transform: uppercase; color: rgba(255,255,255,0.8); display: flex; gap: 8px; align-items: baseline; }
.ol-hand-value { font-weight: 400; text-transform: none; color: rgba(255,255,255,0.7); }
.ol-cards { display: flex; gap: 8px; flex-wrap: wrap; }
.ol-card { width: 52px; height: 72px; background: #fff; border-radius: 8px; color: var(--ink); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; box-shadow: 0 2px 6px rgba(0,0,0,0.25); }
.ol-card-rank { font-weight: 600; font-size: 16px; line-height: 1; }
.ol-card-suit { font-size: 18px; line-height: 1; }
.ol-card-red { color: var(--red); }
.ol-card-back { background: #f4efec repeating-linear-gradient(45deg, rgba(46,94,78,0.18) 0 2px, transparent 2px 8px); border: 1px solid rgba(46,94,78,0.35); }
.ol-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.ol-result { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.ol-result-msg { font-size: 14px; font-weight: 600; }
.ol-odds { display: flex; flex-direction: column; gap: 20px; }
.ol-odd { display: flex; flex-direction: column; gap: 2px; }
.ol-odd-num { font-size: 28px; font-weight: 600; color: var(--teal); }
.ol-odd-name { font-weight: 600; }
.ol-odd-how { color: var(--ink-2); }

footer {
    margin-top: 64px;
    color: var(--ink-2);
    font-size: 13px;
}
footer a { color: var(--ink-2); }

@media (min-width: 768px) {
    .ol-odds { flex-direction: row; gap: 32px; }
    .ol-odd { flex: 1; }
    .ol-card { width: 60px; height: 84px; }
    .wrap { padding-top: 28px; }
}
