:root {
    color-scheme: light dark;
    --bg: #FAFAF8;
    --surface: #FFFFFF;
    --surface-variant: #F2F0EC;
    --text: #1A1A1A;
    --text-muted: #5C5955;
    --accent: #C96342;
    --outline: #E5E3DE;
    --radius: 14px;
    --max-width: 720px;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg: #0F1419;
        --surface: #1A2128;
        --surface-variant: #232B33;
        --text: #F2F0EC;
        --text-muted: #A8B0B8;
        --accent: #E87F58;
        --outline: #2F3A42;
    }
}
:root[data-theme="dark"] {
    color-scheme: dark;
    --bg: #0F1419;
    --surface: #1A2128;
    --surface-variant: #232B33;
    --text: #F2F0EC;
    --text-muted: #A8B0B8;
    --accent: #E87F58;
    --outline: #2F3A42;
}
:root[data-theme="light"] { color-scheme: light; }

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 32px 24px 64px;
}

.site-header {
    position: relative;
    margin-bottom: 40px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 24px;
}

@font-face {
    font-family: "Plus Jakarta Sans";
    src: url("assets/fonts/PlusJakartaSans.ttf") format("truetype");
    font-weight: 200 800;
    font-display: swap;
}

.wordmark {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 24px;
    font-weight: 800;
    line-height: 1;
    text-decoration: none;
    letter-spacing: -1px;
}

.wordmark .clean {
    color: #C96342;
}

.wordmark .koach {
    color: #1F5FD6;
}

h1 {
    font-size: 32px;
    font-weight: 600;
    line-height: 1.25;
    margin: 0 0 12px;
    letter-spacing: -0.02em;
}

h2 {
    font-size: 20px;
    font-weight: 600;
    line-height: 1.3;
    margin: 32px 0 10px;
}

h3 {
    font-size: 16px;
    font-weight: 600;
    margin: 20px 0 6px;
}

p {
    margin: 0 0 14px;
    color: var(--text);
}

p.muted, .muted {
    color: var(--text-muted);
    font-size: 14px;
}

ul {
    padding-left: 0; padding-inline-start: 20px;
    margin: 0 0 14px;
}

li {
    margin-bottom: 6px;
}

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 16px;
    border: 1px solid var(--outline);
}

.hero {
    padding: 40px 0 24px;
}

.hero h1 {
    font-size: 40px;
}

.hero p {
    font-size: 18px;
    color: var(--text-muted);
}

.features {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 24px;
}

@media (min-width: 640px) {
    .features {
        grid-template-columns: 1fr 1fr;
    }
}

.feature {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 18px 20px;
    border: 1px solid var(--outline);
}

.feature h3 {
    margin-top: 0;
    font-size: 15px;
}

.feature p {
    margin: 0;
    font-size: 14px;
    color: var(--text-muted);
}

footer {
    margin-top: 64px;
    padding-top: 24px;
    border-top: 1px solid var(--outline);
    font-size: 14px;
    color: var(--text-muted);
}

footer a {
    color: var(--text-muted);
    margin-right: 16px;
}

.button {
    display: inline-block;
    background: var(--accent);
    color: #FFFFFF;
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 15px;
    margin-top: 16px;
}

.button:hover {
    text-decoration: none;
    opacity: 0.92;
}

.updated {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 24px;
}

.wordmark .logo {
    width: 32px;
    height: 32px;
    border-radius: 8px;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .wordmark .clean { color: #E87F58; }
    :root:not([data-theme="light"]) .wordmark .koach { color: #6FA3FF; }
}
:root[data-theme="dark"] .wordmark .clean { color: #E87F58; }
:root[data-theme="dark"] .wordmark .koach { color: #6FA3FF; }

.languages {
    list-style: none;
    padding: 0;
    margin: 16px 0 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.languages li {
    background: var(--surface);
    border: 1px solid var(--outline);
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 14px;
}


.stores {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px 16px;
    margin-top: 22px;
}

.store {
    position: relative;
    display: inline-block;
    line-height: 0;
    border-radius: 10px;
    box-shadow: 0 1px 2px rgba(10, 14, 19, 0.25), 0 12px 28px -14px rgba(10, 14, 19, 0.55);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.store img {
    display: block;
    width: 180px;
    height: auto;
}

a.store:hover {
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 2px 4px rgba(10, 14, 19, 0.3), 0 18px 34px -14px rgba(10, 14, 19, 0.6);
}

a.store:active { transform: translateY(0) scale(0.985); }

a.store:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 4px;
}

.store-soon { cursor: default; }
.store-soon img { opacity: 0.55; filter: saturate(0.6); }

.store-soon em {
    position: absolute;
    top: -9px;
    inset-inline-end: -6px;
    padding: 3px 9px;
    font-style: normal;
    font-size: 11px;
    font-weight: 800;
    line-height: 1.3;
    letter-spacing: 0.2px;
    color: #FFFFFF;
    background: var(--accent);
    border-radius: 999px;
    box-shadow: 0 2px 6px rgba(10, 14, 19, 0.35);
}

@media (prefers-reduced-motion: reduce) {
    .store { transition: none; }
    a.store:hover, a.store:active { transform: none; }
}

.cta {
    margin-top: 40px;
    padding: 28px 24px;
    background: var(--surface);
    border: 1px solid var(--outline);
    border-radius: var(--radius);
    text-align: center;
}

.cta h2 {
    margin-top: 0;
}

/* Guides */
.crumbs { font-size: 14px; color: var(--text-muted); margin-bottom: 8px; }
.crumbs a { color: var(--text-muted); }
.guide h1 { margin-top: 0; }
.guide section { margin-top: 36px; }
.guide h3 { margin: 22px 0 6px; font-size: 18px; }
.guide ul, .guide ol { padding-left: 0; padding-inline-start: 22px; }
.guide li { margin: 6px 0; }
.quick {
    margin: 20px 0 24px;
    padding: 18px 20px;
    background: var(--surface);
    border: 1px solid var(--outline);
    border-inline-start: 4px solid var(--accent);
    border-radius: var(--radius);
}
.quick h2 { margin: 0 0 6px; font-size: 15px; color: var(--text-muted); }
.quick p { margin: 0; }
.toc { margin: 28px 0 0; padding: 16px 20px; background: var(--surface-variant); border-radius: var(--radius); }
.toc h2 { margin: 0 0 8px; font-size: 15px; color: var(--text-muted); }
.toc ol { margin: 0; }
.table-wrap { overflow-x: auto; margin-top: 12px; border: 1px solid var(--outline); border-radius: var(--radius); }
.table-wrap table { border-collapse: collapse; width: 100%; min-width: 560px; font-size: 14px; }
.table-wrap caption { text-align: start; padding: 12px 14px; font-weight: 600; color: var(--text-muted); }
.table-wrap th, .table-wrap td { padding: 10px 14px; text-align: start; border-top: 1px solid var(--outline); vertical-align: top; }
.table-wrap thead th { background: var(--surface-variant); }
.table-wrap tbody th { font-weight: 600; white-space: nowrap; }
details { background: var(--surface); border: 1px solid var(--outline); border-radius: 12px; padding: 0 16px; margin: 10px 0; }
details summary { cursor: pointer; padding: 14px 0; font-weight: 600; }
details p { margin: 0 0 14px; color: var(--text-muted); }
.sources { font-size: 14px; color: var(--text-muted); }
.related { list-style: none; padding: 0; }
.guide-list { display: grid; gap: 14px; }
.guide-card { display: block; padding: 18px 20px; background: var(--surface); border: 1px solid var(--outline); border-radius: var(--radius); text-decoration: none; color: var(--text); }
.guide-card h2 { margin: 0 0 4px; font-size: 18px; }
.guide-card p { margin: 0; color: var(--text-muted); font-size: 14px; }
.guide-card:hover { border-color: var(--accent); }
figure { margin: 18px 0; }
figure img { display: block; width: 100%; height: auto; border-radius: var(--radius); border: 1px solid var(--outline); background: var(--surface); }
figcaption { margin-top: 8px; font-size: 13px; color: var(--text-muted); }
.hero-img { margin: 24px 0; }
@media (max-width: 640px) {
    .table-wrap table { min-width: 0; font-size: 13px; }
    .table-wrap th, .table-wrap td { padding: 8px 8px; }
    .table-wrap tbody th { white-space: normal; }
    .table-wrap caption { padding: 10px 8px; }
}

/* Header, menu, skip link, footer extras */
.skip { position: absolute; inset-inline-start: -9999px; top: 8px; background: var(--surface); color: var(--text); padding: 8px 14px; border-radius: 8px; z-index: 20; }
.skip:focus { inset-inline-start: 8px; }
.site-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 22px; }
.site-nav a:not(.menu-cta) { font-size: 15px; font-weight: 600; color: var(--text-muted); text-decoration: none; padding: 6px 0; border-bottom: 2px solid transparent; }
.site-nav a:not(.menu-cta):hover, .site-nav a[aria-current="page"] { color: var(--text); border-bottom-color: var(--accent); }
.menu-cta { display: none; }
.menu-toggle { display: none; width: 44px; height: 44px; padding: 0; border: 1px solid var(--outline); border-radius: 12px; background: var(--surface); cursor: pointer; align-items: center; justify-content: center; }
.menu-toggle:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.menu-toggle .bars, .menu-toggle .bars::before, .menu-toggle .bars::after { display: block; width: 20px; height: 2px; background: var(--text); border-radius: 2px; transition: transform 0.2s ease, background 0.2s ease; }
.menu-toggle .bars { position: relative; }
.menu-toggle .bars::before, .menu-toggle .bars::after { content: ""; position: absolute; left: 0; }
.menu-toggle .bars::before { top: -6px; }
.menu-toggle .bars::after { top: 6px; }
.site-header.open .menu-toggle .bars { background: transparent; }
.site-header.open .menu-toggle .bars::before { transform: translateY(6px) rotate(45deg); }
.site-header.open .menu-toggle .bars::after { transform: translateY(-6px) rotate(-45deg); }
@media (max-width: 640px) {
    .site-header { flex-wrap: wrap; }
    .menu-toggle { display: inline-flex; }
    .site-nav { display: none; position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 10; flex-direction: column; align-items: stretch; gap: 0; padding: 8px 16px 16px; background: var(--surface); border: 1px solid var(--outline); border-radius: var(--radius); box-shadow: 0 16px 40px -12px rgba(10, 14, 19, 0.35); }
    .site-header.open .site-nav { display: flex; }
    .site-nav a:not(.menu-cta) { padding: 14px 0; font-size: 17px; border-bottom: 1px solid var(--outline); }
    .site-nav a[aria-current="page"] { color: var(--accent); }
    .menu-cta { display: block; margin-top: 14px; }
    .menu-cta .stores { margin-top: 0; }
    .menu-cta:hover { text-decoration: none; opacity: 0.92; }
}
.lang-switch { flex-basis: 100%; margin-bottom: 8px; }
.lang-switch summary { cursor: pointer; font-weight: 600; color: var(--text-muted); }
.lang-switch ul { list-style: none; padding: 0; margin: 10px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.lang-switch li a { display: inline-block; padding: 5px 12px; border: 1px solid var(--outline); border-radius: 999px; font-size: 14px; background: var(--surface); }
.lang-switch li a[aria-current="true"] { border-color: var(--accent); color: var(--text); }
.see { margin: 12px 0 0; font-size: 14px; color: var(--text-muted); }
.see a { font-weight: 600; }
main { display: block; }

.crumbs [aria-current="page"] { color: var(--text); }
footer a { display: inline-block; white-space: nowrap; margin: 0 0 8px; margin-inline-end: 16px; }

.header-tools { display: flex; align-items: center; gap: 12px; }
.theme-toggle { width: 44px; height: 44px; padding: 0; border: 1px solid var(--outline); border-radius: 12px; background: var(--surface); color: var(--text); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.theme-toggle:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.theme-toggle svg { width: 20px; height: 20px; }
.theme-toggle .i-light, .theme-toggle .i-dark { display: none; }
:root[data-theme="light"] .theme-toggle .i-auto, :root[data-theme="dark"] .theme-toggle .i-auto { display: none; }
:root[data-theme="light"] .theme-toggle .i-light { display: block; }
:root[data-theme="dark"] .theme-toggle .i-dark { display: block; }
@media (max-width: 640px) { .header-tools { margin-inline-start: auto; } }
@media (min-width: 641px) { .site-header .menu-toggle { display: none; } }

.guide ol.sources, .toc ol { padding-inline-start: 22px; }
.toc ol { padding-left: 0; }
[dir="rtl"] .crumbs, [dir="rtl"] .updated { unicode-bidi: plaintext; }
