/* Мізкокрут — one handwritten stylesheet. No framework, no build step. */

:root {
    --ink: #1a1a1a;
    --muted: #6b7280;
    --line: #e5e7eb;
    --accent: #b45309;       /* amber-700, echoes the Studio */
    --bg: #fcfcfb;
    --card: #ffffff;
    --max: 44rem;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font: 1.05rem/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 1.1rem; }

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

/* Header / footer */
.site-header { border-bottom: 1px solid var(--line); background: var(--card); }
.site-header .wrap { display: flex; align-items: baseline; justify-content: space-between; padding: 1rem 1.1rem; }
.brand { font-weight: 700; font-size: 1.3rem; color: var(--ink); }
.site-header nav a { margin-left: 1.1rem; color: var(--muted); }
.site-footer { margin-top: 4rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem; }
.site-footer .wrap { padding: 1.5rem 1.1rem; }

main.wrap { padding-top: 2rem; padding-bottom: 2rem; }

h1 { font-size: 1.8rem; line-height: 1.25; margin: 0 0 1.2rem; }
h2 { font-size: 1.2rem; margin: 0; }

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

/* Listing cards */
.card { padding: 1rem 0; border-bottom: 1px solid var(--line); }
.card .topics { margin: .35rem 0 0; font-size: .85rem; }
.card .topics a { color: var(--muted); }

/* Problem page */
.problem .meta { display: flex; flex-wrap: wrap; gap: .4rem; margin: -.4rem 0 1.4rem; }
.statement { font-size: 1.15rem; margin: 1rem 0 1.6rem; }

.badge { display: inline-block; padding: .12rem .55rem; border-radius: 999px; font-size: .8rem; line-height: 1.5; }
.badge-topic { background: #f3f4f6; color: var(--muted); }
.badge-easy { background: #dcfce7; color: #166534; }
.badge-medium { background: #fef9c3; color: #854d0e; }
.badge-hard { background: #fee2e2; color: #991b1b; }

/* Answer / solution reveal — native <details>, no JS */
.reveal { border: 1px solid var(--line); border-radius: .5rem; padding: .2rem 1rem; margin: 1rem 0; background: var(--card); }
.reveal summary { cursor: pointer; font-weight: 600; padding: .6rem 0; color: var(--accent); }
.reveal[open] summary { border-bottom: 1px solid var(--line); margin-bottom: .8rem; }
.reveal .answer, .reveal .solution { padding-bottom: .8rem; }

.source { color: var(--muted); font-size: .9rem; margin-top: 1.6rem; }

/* Pager */
.pager { display: flex; justify-content: space-between; margin-top: 2.5rem; padding-top: 1rem; border-top: 1px solid var(--line); }

/* Pagination (Laravel) — keep it plain */
nav[role="navigation"] { margin-top: 2rem; font-size: .9rem; }
.prose p { margin: 0 0 1rem; }

@media (max-width: 480px) {
    body { font-size: 1rem; }
    h1 { font-size: 1.5rem; }
}
