:root {
  --bg: #f7f7f5;
  --surface: #ffffff;
  --ink: #15161a;
  --muted: #5b5f68;
  --line: #e3e3de;
  --line-strong: #cfcfc8;
  --accent: #b5165a;
  --accent-dark: #8d0f46;
  --accent-soft: #fbe8f0;
  --warm: #f59e0b;
  --ok: #0f7a4f;
  --danger: #b42318;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 12px 30px rgba(21, 22, 26, 0.08);
  --font: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --max: 1120px;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

img,
svg,
video { max-width: 100%; height: auto; display: block; }

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent-dark); }

h1, h2, h3, h4 {
  line-height: 1.16;
  letter-spacing: -0.022em;
  margin: 0 0 0.55em;
  font-weight: 760;
}

h1 { font-size: clamp(2.05rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.4rem, 2.7vw, 2rem); }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1.1em; }
ul, ol { margin: 0 0 1.2em; padding-left: 1.3em; }
li { margin-bottom: 0.4em; }

code, pre { font-family: var(--mono); font-size: 0.92em; }
pre { overflow-x: auto; padding: 1rem; border-radius: var(--radius-sm); background: #191b20; color: #f5f5f5; }
:not(pre) > code { background: #eeeeea; padding: 0.15em 0.35em; border-radius: 5px; }

.container { width: min(100% - 2.5rem, var(--max)); margin-inline: auto; }
.site-main { min-height: 60vh; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: fixed; left: 1rem; top: -100px; z-index: 100;
  background: var(--ink); color: #fff; padding: 0.65rem 1rem; border-radius: 8px;
}
.skip-link:focus { top: 1rem; color: #fff; }

:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 2px; }

.muted { color: var(--muted); }
.meta { color: var(--muted); font-size: 0.875rem; display: flex; flex-wrap: wrap; gap: 0.45rem; align-items: center; }
.eyebrow {
  display: inline-block; margin: 0 0 0.7rem; color: var(--accent);
  font-size: 0.73rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase;
  text-decoration: none;
}
.text-link { font-weight: 700; text-decoration: none; }
.text-link:hover { text-decoration: underline; }

.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem;
  min-height: 44px; padding: 0.62rem 1.05rem; border: 1px solid var(--line-strong);
  border-radius: 999px; background: var(--surface); color: var(--ink);
  font: inherit; font-size: 0.94rem; font-weight: 700; text-decoration: none; cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.button:hover { transform: translateY(-1px); border-color: var(--ink); color: var(--ink); }
.button-primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.button-primary:hover { background: #000; color: #fff; }
.link-button { border: 0; background: none; padding: 0; color: inherit; font: inherit; cursor: pointer; text-decoration: underline; }

.site-header {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}
.header-inner { min-height: 68px; display: flex; align-items: center; gap: 1.2rem; }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; color: var(--ink); text-decoration: none; font-weight: 850; letter-spacing: -0.02em; white-space: nowrap; }
.brand-mark {
  width: 38px; height: 38px; display: inline-grid; place-items: center;
  border-radius: 11px; color: #fff; font-size: 0.85rem; font-weight: 900;
  background: linear-gradient(135deg, #e0447c 0%, #f59e0b 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}
.brand-name { font-size: 1.02rem; }
.desktop-nav { display: flex; align-items: center; gap: 0.15rem; margin-left: 0.3rem; }
.desktop-nav a {
  color: var(--muted); text-decoration: none; font-size: 0.92rem; font-weight: 650;
  padding: 0.45rem 0.6rem; border-radius: 7px;
}
.desktop-nav a:hover, .desktop-nav a[aria-current="page"] { color: var(--ink); background: #ecece7; }
.header-search { margin-left: auto; display: flex; align-items: center; gap: 0.35rem; }
.header-search input {
  width: 138px; min-height: 38px; border: 1px solid var(--line-strong); border-radius: 999px;
  padding: 0.35rem 0.8rem; background: var(--surface); font: inherit; font-size: 0.88rem;
}
.header-search button {
  min-height: 38px; border: 0; border-radius: 999px; background: var(--ink); color: #fff;
  padding: 0.35rem 0.8rem; font: inherit; font-size: 0.84rem; font-weight: 700; cursor: pointer;
}
.mobile-nav { display: none; margin-left: auto; }
.mobile-nav summary {
  list-style: none; cursor: pointer; border: 1px solid var(--line-strong);
  border-radius: 999px; padding: 0.45rem 0.8rem; font-size: 0.88rem; font-weight: 700;
}
.mobile-nav summary::-webkit-details-marker { display: none; }
.mobile-nav nav { display: grid; gap: 0.25rem; padding-top: 0.6rem; }
.mobile-nav a { color: var(--ink); text-decoration: none; padding: 0.55rem 0.7rem; border-radius: 7px; background: var(--surface); }

.hero {
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(58rem 24rem at 15% -10%, rgba(224, 68, 124, 0.15), transparent 62%),
    radial-gradient(42rem 20rem at 90% 8%, rgba(245, 158, 11, 0.16), transparent 60%),
    linear-gradient(180deg, #fcfbf9, var(--bg));
}
.hero-inner { padding: clamp(3rem, 8vw, 6rem) 0 clamp(2.6rem, 6vw, 4.6rem); max-width: 900px; }
.hero h1 { margin-bottom: 0.35em; max-width: 13ch; }
.hero-lede { font-size: clamp(1.08rem, 2vw, 1.3rem); color: var(--muted); max-width: 62ch; margin-bottom: 1.4rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; }

.section { padding: clamp(2.1rem, 5vw, 3.6rem) 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1.4rem; }
.section-head h2 { margin: 0; }
.section-head .text-link { font-size: 0.9rem; white-space: nowrap; }

.featured-card {
  display: grid; grid-template-columns: 1.1fr 1fr; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.featured-media { min-height: 280px; display: block; background: linear-gradient(135deg, #251b2a, #47202e); }
.featured-media img { width: 100%; height: 100%; object-fit: cover; }
.featured-body { padding: clamp(1.4rem, 3vw, 2.4rem); align-self: center; }
.featured-title { font-size: clamp(1.55rem, 3vw, 2.25rem); margin-bottom: 0.45em; }
.featured-title a { color: var(--ink); text-decoration: none; }
.featured-title a:hover { color: var(--accent); }
.featured-excerpt { color: var(--muted); }

.quick-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.85rem; }
.quick-card {
  display: flex; flex-direction: column; gap: 0.3rem; padding: 1rem 1.1rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
  color: var(--ink); text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.quick-card:hover { transform: translateY(-2px); border-color: var(--line-strong); box-shadow: var(--shadow); color: var(--ink); }
.quick-card .eyebrow { margin: 0; font-size: 0.66rem; }
.quick-card strong { font-size: 1rem; line-height: 1.3; }
.quick-excerpt {
  color: var(--muted); font-size: 0.86rem; line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.15rem; }
.post-card {
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.post-card:hover { transform: translateY(-3px); border-color: var(--line-strong); box-shadow: var(--shadow); }
.card-media { display: block; aspect-ratio: 16 / 9; background: linear-gradient(135deg, #2c1c31, #7a243f 55%, #d15434); overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.35s ease; }
.post-card:hover .card-media img { transform: scale(1.025); }
.card-placeholder { display: grid; place-items: center; width: 100%; height: 100%; color: rgba(255,255,255,0.85); font-weight: 900; letter-spacing: 0.16em; font-size: 0.8rem; }
.card-body { display: flex; flex-direction: column; flex: 1; padding: 1.05rem 1.1rem 1.15rem; }
.card-body .eyebrow { margin-bottom: 0.45rem; }
.card-title { font-size: 1.16rem; margin-bottom: 0.4em; }
.card-title a { color: var(--ink); text-decoration: none; }
.card-title a:hover { color: var(--accent); }
.card-excerpt { color: var(--muted); font-size: 0.93rem; margin-bottom: 0.9rem; }
.card-body .meta { margin-top: auto; }

.pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0.35rem; margin-top: 2.2rem; }
.page-link, .page-gap {
  display: inline-grid; place-items: center; min-width: 38px; height: 38px; padding: 0 0.65rem;
  border: 1px solid var(--line); border-radius: 9px; background: var(--surface);
  color: var(--ink); text-decoration: none; font-size: 0.9rem; font-weight: 650;
}
.page-link:hover { border-color: var(--ink); }
.page-link.is-current { background: var(--ink); border-color: var(--ink); color: #fff; }
.page-gap { border-color: transparent; background: transparent; }

.breadcrumbs { display: flex; flex-wrap: wrap; gap: 0.45rem; align-items: center; color: var(--muted); font-size: 0.82rem; margin-bottom: 1.2rem; }
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs span[aria-current="page"] { max-width: 62ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.post-layout { display: grid; grid-template-columns: minmax(0, 1fr) 272px; gap: clamp(1.5rem, 4vw, 3rem); padding-top: 2rem; }
.post { min-width: 0; }
.post-header { max-width: 780px; }
.post-header h1 { font-size: clamp(2rem, 5vw, 3.4rem); }
.post-lede { color: var(--muted); font-size: 1.12rem; }
.post-meta a { color: var(--ink); text-decoration: none; font-weight: 650; }
.post-cover { margin: 1.5rem 0 1.6rem; }
.post-cover img { width: 100%; border-radius: var(--radius); border: 1px solid var(--line); }
.post-cover figcaption { color: var(--muted); font-size: 0.8rem; margin-top: 0.45rem; }

.toc { border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius-sm); padding: 1rem 1.1rem; margin: 1.4rem 0 1.7rem; }
.toc > summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; cursor: pointer; list-style: none; font-size: 0.82rem; font-weight: 750; text-transform: uppercase; letter-spacing: 0.08em; }
.toc > summary::-webkit-details-marker { display: none; }
.toc > summary::after { content: "+"; font-size: 1.15rem; line-height: 1; color: var(--accent); }
.toc[open] > summary::after { content: "−"; }
.toc > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
.toc ol { margin: 0.75rem 0 0; padding-left: 1.15rem; }
.toc li { margin: 0.22rem 0; }
.toc a { color: var(--ink); text-decoration: none; font-size: 0.92rem; }
.toc a:hover { color: var(--accent); text-decoration: underline; }
.toc-level-3 { margin-left: 0.9rem !important; }

.prose { max-width: 760px; font-size: 1.055rem; }
.prose > *:first-child { margin-top: 0; }
.prose h2 { margin-top: 2rem; scroll-margin-top: 90px; }
.prose h3 { margin-top: 1.6rem; scroll-margin-top: 90px; }
.prose h4 { margin-top: 1.4rem; }
.prose a { font-weight: 600; }
.prose img { border-radius: var(--radius-sm); margin: 1.3rem 0; }
.prose figure { margin: 1.5rem 0; }
.prose figcaption { color: var(--muted); font-size: 0.82rem; margin-top: 0.4rem; }
.prose blockquote { margin: 1.5rem 0; padding: 0.7rem 1.1rem; border-left: 4px solid var(--accent); background: var(--accent-soft); border-radius: 0 8px 8px 0; color: #3b2530; }
.prose blockquote p:last-child { margin-bottom: 0; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }
.prose .table-scroll { width: 100%; overflow-x: auto; margin: 1.5rem 0; -webkit-overflow-scrolling: touch; }
.prose .table-scroll table { min-width: 620px; margin: 0; }
.prose .source-block { margin: 2rem 0 0; padding: 1rem 1.2rem; border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; background: var(--surface); font-size: 0.94rem; }
.prose .source-block h2 { margin-top: 0; font-size: 1.15rem; }
.prose .source-block ul { margin-bottom: 0.5rem; }
.prose .source-block p:last-child { margin-bottom: 0; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-size: 0.94rem; }
.prose th, .prose td { border: 1px solid var(--line); padding: 0.55rem 0.7rem; text-align: left; vertical-align: top; }
.prose th { background: #f0f0eb; }
.prose iframe, .prose .ql-video { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: var(--radius-sm); }
.prose .ql-align-center { text-align: center; }
.prose .ql-align-right { text-align: right; }
.prose .ql-align-justify { text-align: justify; }
.prose .ql-size-small { font-size: 0.85em; }
.prose .ql-size-large { font-size: 1.3em; }
.prose .ql-size-huge { font-size: 1.7em; }
.prose .ql-indent-1 { margin-left: 2em; }
.prose .ql-indent-2 { margin-left: 4em; }

.tag-list { display: flex; flex-wrap: wrap; gap: 0.45rem; margin: 1.8rem 0 1.1rem; }
.tag-list a { font-size: 0.8rem; font-weight: 700; text-decoration: none; color: var(--muted); background: #ecece7; border-radius: 999px; padding: 0.3rem 0.65rem; }
.tag-list a:hover { color: #fff; background: var(--accent); }
.share-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.8rem; padding: 0.9rem 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 0.86rem; }
.share-row span { font-weight: 750; color: var(--muted); }
.share-row a { color: var(--ink); font-weight: 650; text-decoration: none; }
.share-row a:hover { color: var(--accent); text-decoration: underline; }

.author-box { display: flex; gap: 1rem; align-items: flex-start; margin-top: 1.8rem; padding: 1.15rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.author-box img, .author-box .avatar { flex: 0 0 auto; border-radius: 50%; }
.author-box h2 { font-size: 1rem; margin-bottom: 0.25rem; }
.author-box h2 a { color: var(--ink); text-decoration: none; }
.author-box p { margin: 0; color: var(--muted); font-size: 0.9rem; }
.avatar { display: inline-grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-dark); font-weight: 850; }
.avatar-large { width: 72px; height: 72px; font-size: 1.2rem; }

.post-aside { align-self: start; position: sticky; top: 92px; display: grid; gap: 1rem; }
.aside-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 1rem 1.1rem; }
.aside-box h2 { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 0.65rem; }
.link-list { list-style: none; margin: 0; padding: 0; }
.link-list li { margin: 0 0 0.5rem; }
.link-list a { color: var(--ink); text-decoration: none; font-size: 0.92rem; font-weight: 600; }
.link-list a:hover { color: var(--accent); text-decoration: underline; }

.post-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 2.4rem 0 0; border-top: 1px solid var(--line); padding-top: 1.3rem; }
.post-pager a { display: grid; gap: 0.25rem; padding: 0.9rem 1rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); text-decoration: none; }
.post-pager a:hover { border-color: var(--line-strong); }
.post-pager span { color: var(--muted); font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.07em; font-weight: 750; }
.post-pager strong { color: var(--ink); font-size: 0.94rem; line-height: 1.35; }
.post-pager .pager-next { text-align: right; }

.archive { padding-top: 2rem; }
.archive-header { max-width: 760px; margin-bottom: 1.6rem; }
.archive-lede { color: var(--muted); font-size: 1.05rem; }
.author-header { display: flex; gap: 1rem; align-items: center; }
.author-header h1 { margin-bottom: 0.15em; }

.page-layout { max-width: 860px; padding-top: 2rem; }
.page h1 { font-size: clamp(2rem, 5vw, 3rem); }
.page .meta { margin-bottom: 1.4rem; }

.contact-layout { padding-top: 2rem; }
.contact-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(1.5rem, 5vw, 4rem); align-items: start; }
.contact-copy h1 { font-size: clamp(2rem, 4vw, 2.8rem); }
.contact-form-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.2rem, 3vw, 1.8rem); }

.stack-form { display: grid; gap: 0.45rem; }
.stack-form label { font-size: 0.86rem; font-weight: 700; margin-top: 0.45rem; }
.stack-form input, .stack-form textarea {
  width: 100%; border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  background: #fff; color: var(--ink); font: inherit; font-size: 0.95rem; padding: 0.62rem 0.7rem;
}
.stack-form textarea { resize: vertical; }
.stack-form .button { margin-top: 0.7rem; justify-self: start; }
.form-note { color: var(--muted); font-size: 0.78rem; margin: 0.2rem 0 0; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.search-page { padding-top: 2rem; }
.search-form-large { display: flex; gap: 0.5rem; margin: 0.8rem 0 1.6rem; max-width: 680px; }
.search-form-large input {
  flex: 1; min-width: 0; min-height: 46px; border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm); background: #fff; padding: 0.55rem 0.8rem; font: inherit;
}

.notice { padding: 0.8rem 0.95rem; border-radius: var(--radius-sm); border: 1px solid var(--line); background: #fff; font-size: 0.92rem; }
.notice-success { border-color: #b7dfc9; background: #eefaf3; color: #0b5638; }
.notice-error { border-color: #efc4c0; background: #fdf1f0; color: #7a1b14; }

.empty-state { text-align: center; padding: 3rem 1rem; border: 1px dashed var(--line-strong); border-radius: var(--radius); background: color-mix(in srgb, var(--surface) 70%, transparent); }
.empty-state h2, .empty-state h3 { margin-bottom: 0.3em; }
.empty-state p { color: var(--muted); margin: 0; }

.error-page { text-align: center; padding: 4rem 0 5rem; max-width: 660px; }
.error-code { font-size: 0.82rem; font-weight: 850; letter-spacing: 0.16em; color: var(--accent); margin-bottom: 0.4rem; }
.error-page .search-form-large { margin-inline: auto; }
.error-page .link-list { max-width: 540px; margin: 0 auto 1.5rem; text-align: left; }

.ad-slot { width: min(100% - 2.5rem, var(--max)); margin: 1.5rem auto; min-height: 90px; text-align: center; }
.ad-label { display: block; font-size: 0.62rem; letter-spacing: 0.14em; text-transform: uppercase; color: #8b8d94; margin-bottom: 0.3rem; }

.preview-banner { background: #fff3cd; border-bottom: 1px solid #ead28a; color: #4d3c00; font-size: 0.88rem; }
.preview-banner .container { padding: 0.55rem 0; display: flex; flex-wrap: wrap; gap: 0.6rem; }
.preview-banner a { color: #4d3c00; font-weight: 750; }

.site-footer { margin-top: 3rem; border-top: 1px solid var(--line); background: #efefe9; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 2rem; padding: 2.6rem 0 2rem; }
.footer-brand p { color: var(--muted); font-size: 0.9rem; max-width: 38ch; }
.footer-social { display: flex; flex-wrap: wrap; gap: 0.8rem; font-size: 0.85rem; }
.footer-grid h2 { font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.09em; color: var(--muted); margin-bottom: 0.7rem; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 0.35rem; }
.footer-grid a { color: var(--ink); text-decoration: none; font-size: 0.9rem; }
.footer-grid a:hover { color: var(--accent); text-decoration: underline; }
.footer-bottom { border-top: 1px solid var(--line-strong); padding: 1rem 0 1.3rem; display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; align-items: center; color: var(--muted); font-size: 0.76rem; }
.footer-bottom p { margin: 0; }
.footer-bottom .link-button { color: var(--muted); font-size: 0.76rem; }

.cookie-banner {
  position: fixed; z-index: 60; left: 50%; bottom: 1rem; transform: translateX(-50%);
  width: min(100% - 2rem, 760px); display: flex; gap: 1rem; align-items: center; justify-content: space-between;
  padding: 1rem 1.1rem; border: 1px solid var(--line-strong); border-radius: var(--radius);
  background: #fff; box-shadow: 0 18px 45px rgba(0,0,0,0.16);
}
.cookie-banner[hidden] { display: none; }
.cookie-copy p { margin: 0.2rem 0 0; color: var(--muted); font-size: 0.82rem; }
.cookie-actions { display: flex; gap: 0.45rem; flex: 0 0 auto; }
.cookie-actions .button { min-height: 38px; font-size: 0.82rem; padding: 0.4rem 0.8rem; }

@media (max-width: 980px) {
  .desktop-nav { display: none; }
  .header-search { display: none; }
  .mobile-nav { display: block; }
  .mobile-nav nav { position: absolute; left: 1.25rem; right: 1.25rem; top: 68px; padding: 0.6rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
  .post-layout { grid-template-columns: 1fr; }
  .post-aside { position: static; grid-row: auto; grid-template-columns: 1fr 1fr; }
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; }
  .footer-grid > div:last-child { grid-column: 1 / -1; }
}

@media (max-width: 720px) {
  body { font-size: 1rem; }
  .container { width: min(100% - 1.6rem, var(--max)); }
  .featured-card { grid-template-columns: 1fr; }
  .featured-media { min-height: 210px; aspect-ratio: 16 / 9; }
  .card-grid { grid-template-columns: 1fr; }
  .quick-grid { grid-template-columns: 1fr; }
  .post-aside { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .post-pager { grid-template-columns: 1fr; }
  .post-pager .pager-next { text-align: left; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 1.5rem; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-grid > div:last-child { grid-column: auto; }
  .cookie-banner { flex-direction: column; align-items: stretch; }
  .cookie-actions { justify-content: flex-end; }
  .search-form-large { flex-direction: column; }
  .author-header { align-items: flex-start; }
}

@media (max-width: 480px) {
  .brand-name { display: none; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-grid > div:last-child { grid-column: auto; }
  .hero-actions .button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

@media print {
  .site-header, .site-footer, .post-aside, .share-row, .cookie-banner, .ad-slot, .post-pager, .section .card-grid { display: none !important; }
  body { background: #fff; }
  .post-layout { display: block; }
}
