:root {
  --bg: #f7f4ef;
  --surface: #ffffff;
  --text: #1c1917;
  --muted: #6b6460;
  --line: #e7e1d8;
  --accent: #ff5e00;
  --accent-deep: #c2410c;
  --radius: 14px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 17px/1.65 var(--font); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-deep); text-underline-offset: 3px; }
a:hover { color: var(--accent); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }

.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 64px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 700; font-size: 20px; }
.brand img { border-radius: 6px; }
.site-header nav { display: flex; gap: 20px; }
.site-header nav a { color: var(--text); text-decoration: none; font-weight: 500; }
.site-header nav a:hover { color: var(--accent-deep); }

main.wrap { padding-top: 40px; padding-bottom: 64px; }

.list-head { max-width: 720px; margin-bottom: 32px; }
.list-head h1 { font-size: clamp(30px, 5vw, 44px); line-height: 1.15; margin: 0 0 12px; }
.intro { color: var(--muted); font-size: 18px; margin: 0; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.card-image img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; }
.card-body { padding: 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card h2 { font-size: 20px; line-height: 1.3; margin: 0; }
.card h2 a { color: var(--text); text-decoration: none; }
.card h2 a:hover { color: var(--accent-deep); }
.excerpt { color: var(--muted); font-size: 15px; margin: 0; flex: 1; }
.kicker { margin: 0; font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.kicker a { text-decoration: none; }
.meta { margin: 0; color: var(--muted); font-size: 14px; }
.meta a { color: inherit; }

.pager { display: flex; justify-content: space-between; align-items: center; margin-top: 40px; color: var(--muted); font-size: 15px; gap: 12px; }

.post { max-width: 720px; margin: 0 auto; }
.crumbs { font-size: 14px; color: var(--muted); margin-bottom: 12px; }
.crumbs a { color: inherit; }
.post h1 { font-size: clamp(30px, 5vw, 42px); line-height: 1.18; margin: 0 0 12px; }
.hero { margin: 24px 0 32px; }
.hero img { border-radius: var(--radius); width: 100%; }

.prose h2 { font-size: 27px; line-height: 1.25; margin: 44px 0 12px; }
.prose h3 { font-size: 21px; line-height: 1.3; margin: 32px 0 8px; }
.prose p, .prose ul, .prose ol { margin: 0 0 18px; }
.prose li { margin: 6px 0; }
.prose blockquote { margin: 28px 0; padding: 4px 0 4px 20px; border-left: 4px solid var(--accent); font-size: 19px; }
.prose blockquote p { margin: 0; }
.prose figure { margin: 28px 0; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 36px 0; }
.prose pre { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 16px; overflow-x: auto; font-size: 15px; }
.table { overflow-x: auto; margin: 24px 0; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.table table { border-collapse: collapse; width: 100%; font-size: 15px; line-height: 1.5; }
.table th, .table td { padding: 10px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.table thead th { background: #fbf1e9; font-weight: 600; }
.table tbody tr:last-child td { border-bottom: 0; }

.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 36px 0 0; }
.tags a { font-size: 14px; padding: 4px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); text-decoration: none; color: var(--muted); }
.back { margin-top: 32px; }

.site-footer { border-top: 1px solid var(--line); background: var(--surface); font-size: 14px; color: var(--muted); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; padding-top: 20px; padding-bottom: 20px; }
.site-footer p { margin: 0; }
.site-footer nav { display: flex; gap: 16px; }
.site-footer a { color: inherit; }

@media (max-width: 640px) {
  body { font-size: 16px; }
  main.wrap { padding-top: 28px; }
  .site-header nav { gap: 14px; font-size: 15px; }
  .cards { grid-template-columns: 1fr; }
}
