/*
Theme Name: 906391 Guides — Blackjack Reference
Description: A light editorial WordPress theme for card-game guides.
Version: 1.0.1
Requires at least: 6.2
Requires PHP: 8.0
Text Domain: ivory-cardroom
*/

:root {
    --paper: #f8f2e8;
    --white: #fffdf8;
    --ink: #2c211c;
    --red: #7f332e;
    --line: #dccbb9;
    --muted: #66564c;
    --display: Georgia,serif;
    --sans: system-ui,sans-serif;
}

*,*::before,*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font: 16px/1.6 var(--sans);
}

:lang(my) {
    --display: "Noto Sans Myanmar","Myanmar Sangam MN","Myanmar Text",sans-serif;
    --sans: var(--display);
}

:lang(km) {
    --display: "Noto Sans Khmer","Khmer Sangam MN","Khmer UI",sans-serif;
    --sans: var(--display);
}

:lang(th) {
    --display: "Noto Sans Thai",Thonburi,"Leelawadee UI",sans-serif;
    --sans: var(--display);
}

a {
    color: inherit;
}

a:focus-visible {
    outline: 2px solid var(--red);
    outline-offset: 4px;
}

img {
    max-width: 100%;
    height: auto;
}

h1,h2,h3 {
    overflow-wrap: anywhere;
    line-height: 1.22;
}

.shell {
    width: min(1100px,calc(100% - 72px));
    margin-inline: auto;
}

.reading-width {
    width: min(810px,calc(100% - 72px));
    margin-inline: auto;
}

.skip-link {
    position: fixed;
    top: .5rem;
    left: .5rem;
    transform: translateY(-150%);
    background: var(--white);
    color: var(--ink);
    padding: .5rem;
    z-index: 20;
}

.skip-link:focus {
    transform: translateY(0);
}

.site-header {
    border-top: 5px solid var(--red);
    border-bottom: 1px solid var(--line);
    background: var(--white);
}

.site-header-inner {
    display: flex;
    align-items: center;
    gap: 2.15rem;
    min-height: 70px;
}

.brand {
    display: flex;
    align-items: center;
    gap: .55rem;
    font: 700 1.32rem/1.22 var(--display);
    text-decoration: none;
    overflow-wrap: anywhere;
}

.brand-mark {
    color: var(--red);
    font: 1.2rem/1 var(--sans);
}

.header-guides {
    font-size: .9rem;
    color: var(--muted);
    text-decoration: none;
}

.languages {
    display: flex;
    gap: .75rem;
    flex-wrap: wrap;
    margin-inline-start: auto;
    font-size: .86rem;
}

.languages a {
    text-decoration: none;
    padding: .25rem 0;
    border-bottom: 2px solid transparent;
}

.languages a[aria-current="true"],.languages a:hover {
    border-color: var(--red);
    color: var(--red);
}

.cardroom-lead {
    display: grid;
    grid-template-columns: .9fr 1.1fr;
    align-items: center;
    margin-block: 3rem 2.25rem;
    background: var(--white);
    border: 1px solid var(--line);
}

.lead-copy {
    padding: clamp(1.7rem,4vw,4rem);
}

.lead-copy h1 {
    font: 500 clamp(2.7rem,5vw,4.9rem)/1.02 var(--display);
    margin: 0 0 1rem;
    text-wrap: balance;
}

.lead-copy p {
    color: var(--muted);
    margin: 0 0 1.35rem;
}

.lead-copy a {
    color: var(--red);
    text-underline-offset: .3em;
    font-weight: 700;
}

.lead-photo {
    margin: 0;
    height: 100%;
    min-height: 320px;
}

.lead-photo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.guide-list {
    padding-block: 1.35rem 3.5rem;
}

.guide-list>h1,.guide-list>h2 {
    font: 500 clamp(1.8rem,3vw,2.5rem)/1.23 var(--display);
    margin: 0 0 .7rem;
}

.guide-row {
    border-top: 1px solid var(--line);
}

.guide-row a {
    display: grid;
    grid-template-columns: minmax(110px,220px) minmax(0,1fr);
    align-items: center;
    gap: clamp(.95rem,3vw,2.25rem);
    padding: 1rem 0;
    text-decoration: none;
}

.guide-row img {
    width: 100%;
    display: block;
    aspect-ratio: 16/9;
    object-fit: cover;
}

.guide-row h2,.guide-row h3 {
    font: 600 clamp(1.15rem,2.6vw,1.7rem)/1.25 var(--display);
    margin: .2rem 0;
}

.guide-row a:hover h2,.guide-row a:hover h3 {
    color: var(--red);
}

.guide-row time,.article-mast time {
    color: var(--muted);
    font-size: .8rem;
}

.article-mast {
    padding-block: 3.75rem 2.5rem;
    border-bottom: 1px solid var(--line);
}

.entry-title {
    margin: .65rem 0;
    font: 550 clamp(2rem,5.3vw,4.05rem)/1.1 var(--display);
}

.back-guides {
    color: var(--red);
    font-size: .9rem;
    text-underline-offset: .24em;
}

.article-surface {
    background: var(--white);
}

.entry-content {
    padding-block: 2.3rem 3.6rem;
    font-size: clamp(1rem,1.7vw,1.12rem);
    overflow-wrap: anywhere;
}

.entry-content img {
    display: block;
    width: 100%;
}

.entry-content figure {
    margin: 1rem 0;
}

.entry-content h2,.entry-content h3 {
    font-family: var(--display);
    margin-top: 1.8em;
}

.entry-content a {
    color: var(--red);
    text-underline-offset: .2em;
}

.entry-content table {
    width: 100%;
    border-collapse: collapse;
    margin-block: 1.2rem;
}

.entry-content th,.entry-content td {
    border: 1px solid var(--line);
    padding: .6rem;
    text-align: start;
}

.entry-content th {
    background: #f0e4d4;
}

.site-footer {
    border-top: 1px solid var(--line);
}

.site-footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    min-height: 68px;
}

.site-footer a {
    text-decoration: none;
    color: var(--red);
}

.screen-reader-text {
    position: absolute;
    clip-path: inset(50%);
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.pagination {
    margin-top: 1rem;
}

:where(html[lang^="th"],html[lang^="my"],html[lang^="km"]) :is(.lead-copy h1,.entry-title) {
    line-height: 1.3;
    font-size: clamp(1.9rem,4vw,3.4rem);
}

@media(max-width:700px) {
    .shell,.reading-width {
        width: calc(100% - 32px);
    }
    .site-header-inner {
        flex-wrap: wrap;
        gap: .25rem 1rem;
        padding-block: .7rem;
    }
    .header-guides {
        margin-inline-start: auto;
    }
    .languages {
        width: 100%;
        margin: 0;
    }
    .cardroom-lead {
        grid-template-columns: 1fr;
        margin-block: 1.2rem .85rem;
    }
    .lead-photo {
        min-height: 0;
    }
    .lead-photo img {
        aspect-ratio: 2/1;
    }
    .lead-copy {
        padding: 1.3rem;
    }
    .lead-copy h1 {
        font-size: clamp(2.35rem,9vw,3.4rem);
    }
    .guide-row a {
        grid-template-columns: 112px minmax(0,1fr);
    }
    .article-mast {
        padding-block: 1.6rem;
    }
    .entry-content table {
        display: block;
        overflow-x: auto;
    }
}

.site-header { background: #182b44; color: #fff7e8; border-color: #182b44; }
.site-header .brand, .site-header .brand-mark, .site-header .languages a, .site-header .header-guides { color: #fff7e8; }
.site-header .languages a[aria-current] { background: #314f72; }
.cardroom-lead { border-top: 0; background: #e7edf6; }
.cardroom-lead .lead-copy { padding-inline: 25px; }
.cardroom-lead .lead-copy h1 { color: #172a46; }
.lead-photo img { object-position: center 45%; }
.blackjack-reference { margin-block: 42px; }
.blackjack-reference dl { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.blackjack-reference dl div { border-top: 3px solid #314f72; background: #e7edf6; padding: 14px; }
.blackjack-reference dt { font-weight: 750; }
.blackjack-reference dd { margin: 3px 0 0; }
@media (max-width: 680px) { .blackjack-reference dl { grid-template-columns: minmax(0, 1fr); } }
