:root {
  --accent: #0F766E;
  --text: #1C1917;
  --bg: #F7F7F5;
  --muted: #57534E;
  --border: #E4E2DF;
  --card: #FFFFFF;
  --danger: #B91C1C;
  --max: 1150px;
  --prose: 48rem;
  --radius: 10px;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Light theme only — do not follow prefers-color-scheme dark */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; color-scheme: light; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  font-size: 1.05rem;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}
.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--card); padding: .5rem 1rem; z-index: 1000;
}
.skip-link:focus { left: 1rem; top: 1rem; }
.wrap { width: min(100% - 2rem, var(--max)); margin-inline: auto; }
.narrow { width: min(100% - 2rem, 760px); }
.sr-only, .hp-field {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.site-header { border-bottom: 1px solid var(--border); background: color-mix(in srgb, var(--card) 88%, transparent); backdrop-filter: blur(8px); }
.header-bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .9rem 0; }
.brand { text-decoration: none; color: var(--text); }
.brand-name { font-weight: 750; font-size: 1.15rem; letter-spacing: -.02em; }
.nav-toggle { display: inline-flex; border: 1px solid var(--border); background: var(--card); color: var(--text); border-radius: 8px; padding: .45rem .7rem; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: none; flex-direction: column; gap: .4rem; }
.site-nav.is-open ul, .site-nav ul { }
@media (max-width: 860px) {
  .site-nav { position: absolute; left: 0; right: 0; top: 58px; background: var(--card); border-bottom: 1px solid var(--border); padding: 1rem; display: none; }
  .site-nav.is-open { display: block; }
  .site-nav.is-open ul { display: flex; }
}
@media (min-width: 861px) {
  .nav-toggle { display: none; }
  .site-nav ul { display: flex; flex-direction: row; align-items: center; gap: 1rem; }
}
.site-nav a, .linkish {
  color: var(--text); text-decoration: none; background: none; border: 0; font: inherit; cursor: pointer; padding: 0;
}
.site-nav a.is-active { color: var(--accent); font-weight: 650; }
.inline-form { display: inline; }

.hero { position: relative; min-height: 220px; overflow: hidden; }
.hero-img { width: 100%; height: clamp(200px, 36vw, 360px); object-fit: cover; filter: brightness(.78); }
.hero-copy { position: absolute; inset: auto 0 0 0; padding: 1.5rem 0 2rem; color: #fff; }
.hero-brand { font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 780; margin: 0 0 .35rem; letter-spacing: -.03em; text-shadow: 0 1px 12px rgba(0,0,0,.35); }
.hero-tagline { margin: 0; max-width: 36rem; text-shadow: 0 1px 10px rgba(0,0,0,.35); }

.site-main { padding: 2rem 0 3rem; }
.layout-home { display: grid; gap: 2rem; }
@media (min-width: 900px) {
  .layout-home { grid-template-columns: minmax(0, 1fr) 280px; }
}
.section-title, h1 { letter-spacing: -.02em; line-height: 1.2; }
.lead { color: var(--muted); font-size: 1.1rem; }
.empty { padding: 1.25rem; border: 1px dashed var(--border); border-radius: var(--radius); }

.article-list { display: grid; gap: 1.25rem; }
.article-card {
  display: grid; gap: 1rem; background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
}
@media (min-width: 700px) {
  .article-card { grid-template-columns: 240px minmax(0,1fr); }
}
.card-cover img { width: 100%; height: 100%; min-height: 160px; object-fit: cover; }
.card-body { padding: 1rem 1.1rem 1.2rem; }
.card-title { margin: 0 0 .4rem; font-size: 1.25rem; }
.card-title a { color: inherit; text-decoration: none; }
.card-excerpt { margin: 0 0 .75rem; color: var(--muted); }
.meta { color: var(--muted); font-size: .92rem; display: flex; flex-wrap: wrap; gap: .5rem 1rem; }
.cats a { margin-right: .4rem; }

.side-block { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; margin-bottom: 1rem; }
.side-block h2 { margin-top: 0; font-size: 1.05rem; }
.author-thumb, .avatar { border-radius: 999px; object-fit: cover; }
.avatar.lg { width: 120px; height: 120px; }
.cat-list, .social-list, .footer-links { list-style: none; padding: 0; margin: 0; }
.cat-list li, .footer-links li, .social-list li { margin: .35rem 0; }

.btn, button.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  background: var(--accent); color: #fff; border: 1px solid transparent; border-radius: 8px;
  padding: .65rem 1rem; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
}
.btn-small { padding: .4rem .75rem; font-size: .95rem; }
.btn-secondary { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost { background: transparent; color: var(--text); border-color: transparent; }
.btn.danger, .danger { color: var(--danger); }
button.btn.danger { background: var(--danger); color: #fff; }

.form label, .stack > label { display: grid; gap: .35rem; margin-bottom: .2rem; }
.stack { display: grid; gap: .9rem; }
input, textarea, select {
  width: 100%; border: 1px solid var(--border); border-radius: 8px; padding: .65rem .75rem;
  background: var(--card); color: var(--text); font: inherit;
}
.check { display: flex !important; align-items: flex-start; gap: .55rem; grid-template-columns: none !important; }
.check input { width: auto; margin-top: .25rem; }
fieldset { border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; }

.flash { padding: .85rem 1rem; border-radius: 8px; margin: .75rem 0; border: 1px solid var(--border); }
.flash-success { background: color-mix(in srgb, #16a34a 12%, var(--card)); }
.flash-error { background: color-mix(in srgb, var(--danger) 12%, var(--card)); }
.flashes { margin-top: 1rem; }

.article-page { width: min(100% - 2rem, var(--prose)); }
.article-header { margin-bottom: 1.25rem; }
.breadcrumbs { font-size: .92rem; color: var(--muted); margin-bottom: 1rem; }
.prose { font-size: 1.08rem; }
.prose h2, .prose h3 { line-height: 1.25; }
.prose img { border-radius: 8px; margin: 1rem 0; }
.prose blockquote { border-left: 3px solid var(--accent); margin: 1rem 0; padding-left: 1rem; color: var(--muted); }
.article-cover { margin: 0 0 1.25rem; }
.author-box, .newsletter-box {
  display: grid; gap: 1rem; grid-template-columns: auto 1fr; align-items: start;
  border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; margin: 2rem 0; background: var(--card);
}
.newsletter-box { grid-template-columns: 1fr; }
.comments { margin-top: 2rem; }
.comment-list, .comment-replies { list-style: none; padding: 0; margin: 0; }
.comment { border-top: 1px solid var(--border); padding: 1rem 0; }
.comment-replies { margin-left: 1rem; padding-left: 1rem; border-left: 2px solid var(--border); }
.comment-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: .5rem; }

.video-embed { margin: 1.25rem 0; }
.video-frame { position: relative; aspect-ratio: 16/9; background: #000; border-radius: 8px; overflow: hidden; }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-placeholder { border: 1px dashed var(--border); border-radius: 8px; padding: 1rem; text-align: center; background: var(--card); }
.video-placeholder img { margin: 0 auto 1rem; max-width: 280px; opacity: .85; }
.muted-note { color: var(--muted); font-size: .95rem; max-width: 36rem; margin: .35rem auto 1rem; }

.pagination ul { display: flex; flex-wrap: wrap; gap: .4rem; list-style: none; padding: 0; }
.pagination a, .pagination .is-current {
  display: inline-flex; min-width: 2.2rem; justify-content: center; padding: .35rem .55rem;
  border: 1px solid var(--border); border-radius: 6px; text-decoration: none; color: var(--text);
}
.pagination .is-current { background: var(--accent); color: #fff; border-color: var(--accent); }

.site-footer { border-top: 1px solid var(--border); padding: 2rem 0 2.5rem; margin-top: 1rem; }
.footer-grid { display: grid; gap: 1.5rem; }
@media (min-width: 700px) { .footer-grid { grid-template-columns: 1.4fr 1fr; } }
.footer-brand { font-weight: 700; margin: 0 0 .4rem; }
.copyright { margin-top: 1.25rem; color: var(--muted); font-size: .92rem; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { border: 1px solid var(--border); padding: .55rem .65rem; text-align: left; vertical-align: top; }
.install-wrap { max-width: 760px; padding: 2rem 0 3rem; }
.profile-head { display: flex; gap: 1rem; align-items: center; margin-bottom: 1.5rem; }
.danger-zone { margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--border); }
