/* Article reading layout: applies to existing and future posts. */
.single-layout > article.single-post.content-column { padding:32px; }
.single-layout .single-header,
.single-layout .single-content { max-width:800px; }
.single-layout .single-header { text-align:left; }
.single-layout .single-header .post-meta,
.single-layout .single-header .single-author { justify-content:flex-start; }
.single-layout .single-header h1 { font-size:clamp(30px,3.2vw,44px); line-height:1.18; margin:12px 0 16px; text-wrap:pretty; overflow-wrap:anywhere; }
.single-layout .single-content { font-size:18px; line-height:1.65; overflow-wrap:anywhere; }
.single-layout .single-content p { margin-bottom:16px; }
.single-layout .single-content h2 { margin:30px 0 14px; font-size:29px; }
.single-layout .single-content h3 { margin:24px 0 12px; }
.single-layout .single-content blockquote { margin:22px 0; padding:16px 20px; }
.single-layout .single-content blockquote > :last-child { margin-bottom:0; }
.single-layout .single-featured-image { max-width:800px; margin:24px auto; }
.single-layout .single-featured-image img { max-height:360px; object-fit:contain; }
.single-layout .single-content :is(pre,.wp-block-table) { max-width:100%; overflow-x:auto; }
.single-layout .single-content iframe { max-width:100%; }
@media (min-width:681px) {
  .single-layout .single-content p:not(.has-text-align-left):not(.has-text-align-center):not(.has-text-align-right) { text-align:justify; text-align-last:start; hyphens:auto; }
}
@media (max-width:1100px) {
  main.single-layout { grid-template-columns:minmax(0,1fr); }
  .single-layout > .site-sidebar { grid-column:1; grid-row:auto; position:static; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:680px) {
  main.single-layout { width:calc(100% - 24px); }
  .single-layout > article.single-post.content-column { padding:22px 16px; }
  .single-layout .single-header h1 { font-size:clamp(27px,7.5vw,32px); }
  .single-layout .single-content { font-size:17px; line-height:1.6; }
  .single-layout .single-content h2 { font-size:25px; }
  .single-layout .single-content h3 { font-size:22px; }
  .single-layout .single-content blockquote { padding:14px; }
  .single-layout > .site-sidebar { display:flex; flex-direction:column; }
}
/* Homepage: one featured article, followed by a two-column grid. */
:is(#publications, body.blog .archive-layout) .posts-grid > .post-card:first-child { grid-column:1 / -1; }
@media (min-width:681px) {
  :is(#publications, body.blog .archive-layout) .posts-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  :is(#publications, body.blog .archive-layout) .posts-grid > .post-card:first-child > .post-card-link { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); min-height:0; }
  :is(#publications, body.blog .archive-layout) .posts-grid > .post-card:first-child .post-card-image { width:100%; height:auto; min-height:0; aspect-ratio:4/3; margin:0; border-radius:0; align-self:center; }
  :is(#publications, body.blog .archive-layout) .posts-grid > .post-card:first-child .post-card-body { padding:28px; justify-content:center; }
  :is(#publications, body.blog .archive-layout) .posts-grid > .post-card:first-child .post-card-title { font-size:clamp(24px,2.3vw,32px); line-height:1.2; }
}
@media (max-width:680px) {
  :is(#publications, body.blog .archive-layout) .posts-grid { grid-template-columns:minmax(0,1fr); }
}
/* Stage 2. Presentation layer; the original stylesheet remains untouched. */
:root {
  color-scheme: light;
  --ink:#1b2230; --muted:#596579; --line:#dce2ed; --canvas:#f6f7fb; --surface:#fff;
  --accent:#2e50c6; --accent-dark:#203d9e; --soft:#edf1fc; --warm:#c48b31;
  --hero-bg:radial-gradient(ellipse at 90% 15%,#f6e8cd 0,transparent 44%),linear-gradient(120deg,#eef2ff,#fafbfe);
  --header-bg:rgba(255,255,255,.96); --shadow:0 14px 38px rgba(20,35,70,.075);
}
:root[data-theme="dark"] {
  color-scheme:dark;
  --ink:#e8edf7; --muted:#b3bed0; --line:#39465c; --canvas:#111722; --surface:#1a2332;
  --accent:#a1b8ff; --accent-dark:#c4d2ff; --soft:#25314a; --warm:#e8bf7b;
  --hero-bg:radial-gradient(ellipse at 90% 15%,#35302b 0,transparent 44%),linear-gradient(120deg,#202b46,#151d2a);
  --header-bg:rgba(20,28,41,.97); --shadow:0 14px 38px rgba(0,0,0,.18);
}
html, body { background:var(--canvas); color:var(--ink); }
body { min-height:100vh; display:flex; flex-direction:column; }
body > main { flex:1 0 auto; }
::selection { background:var(--soft); color:var(--accent-dark); }
a, button, input, textarea { -webkit-tap-highlight-color:transparent; }
:where(a,button,input,textarea,select):focus-visible { outline:3px solid var(--accent); outline-offset:4px; }
.site-header { background:var(--header-bg); border-color:var(--line); }
.site-header .header-inner { display:flex; flex-wrap:nowrap; gap:18px; min-height:80px; padding:10px 0; }
.site-header .site-brand { width:auto; min-width:0; flex-shrink:0; }
.site-header .site-brand-text strong { color:var(--ink); font-size:22px; letter-spacing:-.035em; }
.site-header .site-brand-text small { color:var(--muted); font-size:12px; max-width:290px; line-height:1.4; }
.site-brand-mark { position:relative; flex-shrink:0; }
.site-brand-mark::after { content:""; position:absolute; bottom:5px; right:6px; width:8px; height:3px; background:var(--warm); border-radius:9px; transform:rotate(-20deg); }
.site-header .header-account { display:none; }
.site-header .main-navigation { width:auto; order:initial; margin-left:auto; padding:0; border:0; overflow:visible; }
.site-header .main-navigation ul { width:auto; flex-wrap:nowrap; gap:4px; }
.site-header .main-navigation a { display:inline-flex; align-items:center; min-height:44px; padding:0 12px; border-radius:12px; color:var(--muted); font-size:15px; }
.site-header .main-navigation a::after { display:none; }
.site-header .main-navigation a:hover,
.site-header .main-navigation .current-menu-item > a,
.site-header .main-navigation a[aria-current="page"] { color:var(--accent); background:var(--soft); }
.site-header .header-cta { display:inline-flex; min-height:44px; align-items:center; font-size:13px; color:var(--ink); border-color:var(--line); background:var(--surface); box-shadow:none; }
.site-header .header-cta:hover { background:var(--soft); color:var(--accent); }
.visual-controls { display:flex; align-items:center; gap:8px; flex-shrink:0; }
.icon-button { display:inline-flex; align-items:center; justify-content:center; flex-shrink:0; width:44px; height:44px; padding:0; border:1px solid var(--line); border-radius:13px; color:var(--ink); background:var(--surface); cursor:pointer; }
.icon-button:hover { background:var(--soft); border-color:var(--accent); }
.icon-button[hidden], .menu-toggle { display:none; }
.theme-sun { display:none; }
[data-theme="dark"] .theme-moon { display:none; }
[data-theme="dark"] .theme-sun { display:block; }
.menu-glyph { position:relative; width:18px; height:12px; border-top:2px solid currentColor; border-bottom:2px solid currentColor; }
.menu-glyph::before { content:""; position:absolute; width:18px; height:2px; background:currentColor; top:3px; left:0; }
.menu-toggle[aria-expanded="true"] .menu-glyph { border:0; transform:rotate(45deg); height:2px; background:currentColor; }
.menu-toggle[aria-expanded="true"] .menu-glyph::before { top:0; transform:rotate(90deg); }
.hero-section { background:var(--hero-bg); padding:46px 0 38px !important; border-color:var(--line); }
.hero-inner { width:min(calc(100% - 48px),1240px) !important; }
.hero-copy { max-width:960px !important; margin:0 auto; }
.hero-copy h1 { color:var(--ink); white-space:normal; font-size:clamp(40px,5.7vw,78px) !important; line-height:1.08 !important; letter-spacing:-.055em; margin:14px auto 18px !important; }
.hero-lead { color:var(--muted); max-width:740px !important; margin:0 auto !important; font-size:clamp(18px,1.8vw,22px) !important; line-height:1.5 !important; }
.hero-actions { margin-top:24px !important; }
.hero-section::before { border-color:var(--line); opacity:.6; }
.hero-section::after { content:""; position:absolute; bottom:19px; left:calc(50% - 24px); width:48px; height:3px; border-radius:50%; background:var(--warm); transform:rotate(-5deg); pointer-events:none; }
.button--primary,.search-submit { background:#2e50c6; color:#fff; }
.button--primary:hover,.search-submit:hover { background:#203d9e; }
.button--ghost { background:var(--surface); border-color:var(--line); color:var(--ink); }
.button--ghost:hover { background:var(--soft); border-color:var(--accent); }
.button--dark { background:var(--soft); color:var(--accent); border:1px solid var(--line); }
.button--dark:hover { background:var(--accent); color:var(--canvas); }
.site-container { margin-top:36px !important; gap:30px; }
.section-heading { margin-bottom:22px !important; gap:18px; }
.section-heading h2,.archive-heading h1,.page-header h1 { color:var(--ink); letter-spacing:-.035em; line-height:1.15; }
.text-link,.sidebar-link { display:inline-flex; align-items:center; min-height:44px; color:var(--accent); }
.text-link:hover,.sidebar-link:hover { color:var(--accent-dark); text-decoration:underline; text-underline-offset:5px; }
.posts-grid { gap:24px !important; }
.post-card { border-color:var(--line); background:var(--surface); box-shadow:var(--shadow); }
.post-card:hover { border-color:var(--accent); }
.post-card:focus-within { border-color:var(--accent); outline:2px solid var(--accent); outline-offset:3px; }
.post-card-link { height:100%; }
.post-card-image { margin:0; height:auto; aspect-ratio:16/9; background:var(--soft); overflow:hidden; }
.post-card-image img { width:100%; height:100%; object-fit:cover; object-position:center; }
.post-card-title { color:var(--ink); line-height:1.25; letter-spacing:-.025em; }
.post-card-excerpt,.post-card-author,.single-author { color:var(--muted); }
.post-meta { gap:12px; color:var(--muted); font-size:13px; }
.post-category { color:var(--accent); background:var(--soft); padding:4px 8px; border-radius:6px; font-size:11px; letter-spacing:.045em; }
.posts-grid > .post-card:only-child { grid-column:1 / -1; }
.posts-grid > .post-card:only-child > .post-card-link { display:grid; grid-template-columns:minmax(0,.95fr) minmax(0,1.05fr); align-items:stretch; }
.posts-grid > .post-card:only-child .post-card-image { width:calc(100% - 22px); height:auto; aspect-ratio:3/2; margin:22px 0 22px 22px; align-self:center; border-radius:13px; }
.posts-grid > .post-card:only-child .post-card-body { padding:28px; }
.posts-grid > .post-card:only-child .post-card-title { font-size:clamp(23px,2vw,30px); margin:16px 0 14px; }
.posts-grid > .post-card:only-child .post-card-excerpt { font-size:16px; line-height:1.55; }
.sidebar-card { border-color:var(--line); background:var(--surface); box-shadow:none; }
.sidebar-about { background:linear-gradient(140deg,var(--surface),var(--soft)); }
.sidebar-card p,.category-list a { color:var(--muted); }
.category-list small { color:var(--muted); }
.category-list a { min-height:44px; align-items:center; }
.search-form { padding:4px; border:1px solid var(--line); border-radius:14px; background:var(--canvas); gap:4px; transition:border-color .2s; }
.search-form:focus-within { border-color:var(--accent); box-shadow:0 0 0 3px var(--soft); }
.search-field { min-height:44px; border:0; background:transparent; color:var(--ink); padding:9px 10px; }
.search-field::placeholder { color:var(--muted); opacity:1; }
.search-field:focus { box-shadow:none; outline:2px solid var(--accent); outline-offset:-2px; }
.search-submit { min-width:44px; min-height:44px; font-size:0; position:relative; border-radius:10px; }
.search-submit::before { content:""; width:12px; height:12px; border:2px solid currentColor; border-radius:50%; position:absolute; left:13px; top:11px; }
.search-submit::after { content:""; width:8px; height:2px; border-radius:2px; background:currentColor; position:absolute; left:25px; top:26px; transform:rotate(45deg); }
.page-card,.single-post.content-column { background:var(--surface); border-color:var(--line); box-shadow:var(--shadow); }
.page-header,.archive-heading { border-bottom:1px solid var(--line); padding-bottom:24px; margin-bottom:28px; }
.page-header h1 { margin-bottom:0; }
.single-header h1 { color:var(--ink); letter-spacing:-.035em; line-height:1.15; text-wrap:balance; }
.single-content { color:var(--ink); font-size:18px; line-height:1.8; }
.single-content h2,.single-content h3 { color:var(--ink); line-height:1.3; letter-spacing:-.02em; }
.single-content a { color:var(--accent); text-decoration:underline; text-underline-offset:4px; }
.single-content blockquote { color:var(--ink); background:var(--soft); }
.single-content :where(input:not([type="submit"]),textarea,select) { max-width:100%; padding:10px; border:1px solid var(--line); border-radius:8px; background:var(--canvas); color:var(--ink); }
.single-content input[type="submit"], .comments-area input[type="submit"] { min-height:44px; padding:10px 18px; background:#2e50c6; color:white; border:0; border-radius:10px; cursor:pointer; white-space:normal; }
.comments-area { min-width:0; color:var(--ink); }
.comments-area :is(input,textarea,select) { max-width:100%; font:inherit; }
.comments-area textarea { display:block; width:100%; resize:vertical; min-height:160px; }
.comments-area :is(textarea,input:not([type="submit"]):not([type="checkbox"])) { padding:10px 12px; border:1px solid var(--line); border-radius:10px; background:var(--canvas); color:var(--ink); }
.comments-area a { color:var(--accent); text-decoration:underline; text-underline-offset:3px; }
.comments-area label { line-height:1.7; }
.post-tags a,.navigation.pagination :is(a,span) { background:var(--surface); color:var(--accent); border-color:var(--line); }
.navigation.pagination .current { background:var(--soft); }
.empty-state { background:var(--surface); border-color:var(--line); }
.site-footer { margin-top:48px !important; background:var(--surface); border-color:var(--line); position:relative; }
.site-footer::before { content:""; position:absolute; top:-2px; left:max(24px,calc((100% - 1240px)/2)); width:48px; height:3px; background:var(--warm); border-radius:3px; }
.footer-inner { gap:30px; }
.footer-links { gap:2px 20px; }
.footer-links a { display:inline-flex; align-items:center; min-height:44px; color:var(--muted); text-decoration:underline; text-decoration-color:transparent; text-underline-offset:5px; transition:color .2s,text-decoration-color .2s; }
.footer-links a:hover { color:var(--accent); text-decoration-color:currentColor; }
.footer-brand p,.footer-meta { color:var(--muted); }
.footer-meta { white-space:normal; }
.visual-reveal { animation:visual-arrive .45s ease-out both; }
@keyframes visual-arrive { from { opacity:.6; transform:translateY(10px); } to { opacity:1; transform:translateY(0); } }
@media (max-width:1100px) {
  .site-header .header-inner { flex-wrap:wrap; gap:10px; min-height:72px; }
  .site-header .site-brand { margin-right:auto; }
  .site-header .site-brand-text small { display:none; }
  .site-header .header-cta { display:inline-flex; margin-left:0; }
  .visual-controls { order:2; }
  .site-header .main-navigation { order:3; width:100%; margin:0; }
  .site-header .main-navigation ul { flex-wrap:wrap; }
  .site-header.nav-ready .main-navigation { display:none; }
  .site-header.nav-ready .menu-toggle:not([hidden]) { display:inline-flex; width:auto; gap:8px; padding:0 12px; }
  .site-header.nav-ready.menu-open .main-navigation { display:block; padding:12px 0 4px; border-top:1px solid var(--line); }
  .site-header.menu-open .main-navigation ul { display:grid; grid-template-columns:1fr 1fr; gap:6px; }
  .site-header.menu-open .main-navigation a { display:flex; min-height:48px; width:100%; }
}
@media (max-width:980px) {
  .site-container { gap:28px; }
  .site-sidebar { grid-template-columns:1fr 1fr; }
  .footer-inner { grid-template-columns:1fr 1fr; }
}
@media (max-width:680px) {
  .site-header { position:relative; }
  .site-header .header-inner { width:calc(100% - 32px); gap:8px; padding:10px 0; min-height:64px; }
  .site-header .site-brand { gap:8px; }
  .site-header .site-brand-mark { width:32px; height:32px; font-size:17px; }
  .site-header .site-brand-text strong { font-size:18px; overflow:visible; white-space:nowrap; }
  .site-header .header-cta { order:4; display:none; }
  .site-header.menu-open .header-cta { display:inline-flex; width:100%; justify-content:center; margin-top:2px; }
  .visual-controls { gap:6px; }
  .menu-toggle-text { display:none; }
  .site-header.nav-ready .menu-toggle:not([hidden]) { width:44px; padding:0; }
  .hero-inner { width:calc(100% - 32px) !important; }
  .hero-section { padding:34px 0 32px !important; }
  .hero-copy h1 { font-size:clamp(38px,10.8vw,62px) !important; }
  .hero-lead { font-size:18px !important; }
  .hero-actions { gap:8px; margin-top:22px !important; }
  .hero-actions .button { padding:11px 14px !important; }
  .hero-section::after { bottom:12px; }
  .site-container { width:calc(100% - 32px); margin-top:26px !important; }
  .section-heading { gap:8px; margin-bottom:16px !important; }
  .section-heading h2 { font-size:28px; }
  .posts-grid > .post-card:only-child > .post-card-link { display:flex; flex-direction:column; }
  .posts-grid > .post-card:only-child .post-card-image { width:100%; margin:0; border-radius:0; aspect-ratio:16/9; }
  .posts-grid > .post-card:only-child .post-card-body { padding:22px; }
  .posts-grid > .post-card:only-child .post-card-title { font-size:25px; }
  .site-sidebar { display:flex; flex-direction:column; }
  .sidebar-card { padding:22px; }
  .single-content { font-size:17px; line-height:1.75; overflow-wrap:anywhere; }
  .single-content h2 { font-size:27px; }
  .single-header h1 { font-size:34px; }
  .single-featured-image { margin:26px auto; }
  .footer-inner { grid-template-columns:1fr; gap:22px; }
  .site-footer { margin-top:36px !important; }
}
@media (max-width:359px) { .site-header .site-brand-text strong { font-size:16px; } .site-header .site-brand-mark { display:none; } }
@media (hover:none) { .post-card:hover,.post-card:hover .post-card-image img { transform:none; } }
@media (prefers-reduced-motion:reduce) {
  *,*::before,*::after { animation:none !important; transition:none !important; scroll-behavior:auto !important; }
}


/* =====================================================================
   Dark header refinement — September 2026
   Upper navigation only. Content and page structure are untouched.
   ===================================================================== */

:root[data-theme="dark"] {
  --ink: #f0f4fc;
  --muted: #aab8ce;
  --line: #34445e;
  --canvas: #0d1420;
  --surface: #151f30;
  --accent: #b9caff;
  --accent-dark: #dce5ff;
  --soft: #223657;
  --warm: #efbf72;
  --header-bg: linear-gradient(180deg, rgba(22, 32, 49, .985) 0%, rgba(13, 21, 33, .985) 100%);
}

[data-theme="dark"] .site-header {
  isolation: isolate;
  overflow: visible;
  background:
    radial-gradient(ellipse at 10% -120%, rgba(102, 137, 222, .23), transparent 38%),
    radial-gradient(ellipse at 86% 160%, rgba(239, 191, 114, .075), transparent 34%),
    var(--header-bg);
  border-bottom: 1px solid rgba(112, 139, 190, .22);
  box-shadow:
    0 14px 34px rgba(0, 0, 0, .22),
    inset 0 1px 0 rgba(255, 255, 255, .045);
}

[data-theme="dark"] .site-header::after {
  content: "";
  position: absolute;
  right: max(24px, calc((100% - 1240px) / 2));
  bottom: -1px;
  left: max(24px, calc((100% - 1240px) / 2));
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(143, 170, 232, .34), rgba(239, 191, 114, .22), transparent);
  pointer-events: none;
}

[data-theme="dark"] .site-header .header-inner {
  position: relative;
  min-height: 84px;
  gap: 22px;
}

[data-theme="dark"] .site-header .site-brand {
  gap: 13px;
}

[data-theme="dark"] .site-brand-mark {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(185, 202, 255, .14);
  border-radius: 14px;
  color: #f8fbff;
  background: linear-gradient(145deg, #2a3b5b 0%, #182438 72%);
  box-shadow:
    0 9px 22px rgba(0, 0, 0, .24),
    inset 0 1px 0 rgba(255, 255, 255, .10);
}

[data-theme="dark"] .site-brand-mark::after {
  right: 6px;
  bottom: 5px;
  width: 9px;
  height: 3px;
  background: var(--warm);
  box-shadow: 0 0 9px rgba(239, 191, 114, .48);
}

[data-theme="dark"] .site-header .site-brand-text strong {
  color: #f0f4fc;
  font-size: 21px;
  font-weight: 760;
  letter-spacing: -.045em;
}

[data-theme="dark"] .site-header .site-brand-text small {
  margin-top: 5px;
  color: #9cabc1;
  font-size: 12px;
  letter-spacing: .005em;
}

[data-theme="dark"] .site-header .main-navigation ul {
  gap: 3px;
  padding: 4px;
  border: 1px solid rgba(109, 136, 187, .16);
  border-radius: 16px;
  background: rgba(8, 14, 24, .22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .025);
}

[data-theme="dark"] .site-header .main-navigation a {
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 12px;
  color: #aebbd0;
  font-size: 15px;
  font-weight: 680;
  transition: color .2s ease, background .2s ease, border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

[data-theme="dark"] .site-header .main-navigation a:hover {
  color: #e0e8fa;
  background: rgba(104, 139, 219, .12);
  border-color: rgba(144, 171, 234, .12);
  transform: translateY(-1px);
}

[data-theme="dark"] .site-header .main-navigation .current-menu-item > a,
[data-theme="dark"] .site-header .main-navigation a[aria-current="page"] {
  color: #dbe5ff;
  background: linear-gradient(180deg, #2c4778 0%, #22385f 100%);
  border-color: rgba(167, 192, 255, .18);
  box-shadow:
    0 7px 16px rgba(4, 10, 22, .24),
    inset 0 1px 0 rgba(255, 255, 255, .10);
}

[data-theme="dark"] .site-header .header-cta {
  min-height: 46px;
  padding: 0 11px 0 16px;
  gap: 10px;
  border: 1px solid rgba(164, 186, 229, .28);
  border-radius: 999px;
  color: #e8eefb;
  background: rgba(255, 255, 255, .025);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .035);
  transition: color .2s ease, background .2s ease, border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

[data-theme="dark"] .site-header .header-cta span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 25px;
  height: 25px;
  border: 1px solid rgba(185, 202, 255, .18);
  border-radius: 8px;
  color: #c7d5ff;
  background: rgba(104, 139, 219, .14);
  font-size: 15px;
  line-height: 1;
}

[data-theme="dark"] .site-header .header-cta:hover {
  color: #f4f7ff;
  background: rgba(104, 139, 219, .14);
  border-color: rgba(185, 202, 255, .48);
  box-shadow: 0 8px 18px rgba(2, 8, 20, .20);
  transform: translateY(-1px);
}

[data-theme="dark"] .site-header .header-cta:hover span {
  color: #fff;
  background: rgba(104, 139, 219, .26);
}

[data-theme="dark"] .visual-controls {
  gap: 9px;
}

[data-theme="dark"] .visual-controls .theme-toggle {
  width: 48px;
  height: 48px;
  border-color: rgba(164, 186, 229, .25);
  border-radius: 15px;
  color: #dce5f7;
  background: linear-gradient(145deg, rgba(34, 50, 77, .72), rgba(18, 28, 44, .72));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .06),
    0 7px 18px rgba(0, 0, 0, .14);
  transition: color .2s ease, background .2s ease, border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}

[data-theme="dark"] .visual-controls .theme-toggle svg {
  width: 20px;
  height: 20px;
  filter: drop-shadow(0 0 5px rgba(185, 202, 255, .14));
}

[data-theme="dark"] .visual-controls .theme-toggle:hover {
  color: #fff;
  background: linear-gradient(145deg, rgba(49, 73, 112, .92), rgba(26, 42, 67, .92));
  border-color: rgba(185, 202, 255, .58);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .10),
    0 9px 22px rgba(0, 0, 0, .22);
  transform: translateY(-1px);
}

[data-theme="dark"] .site-header :where(a, button):focus-visible {
  outline-color: rgba(185, 202, 255, .9);
  outline-offset: 3px;
}

@media (max-width: 1100px) {
  [data-theme="dark"] .site-header .header-inner {
    min-height: 76px;
    gap: 10px;
  }

  [data-theme="dark"] .site-header .main-navigation ul {
    padding: 8px;
    border-radius: 15px;
    background: rgba(10, 17, 28, .48);
  }

  [data-theme="dark"] .site-header.nav-ready.menu-open .main-navigation {
    padding: 12px 0 6px;
    border-top-color: rgba(109, 136, 187, .20);
  }

  [data-theme="dark"] .site-header.menu-open .main-navigation a {
    min-height: 48px;
    border-color: transparent;
  }
}

@media (max-width: 680px) {
  [data-theme="dark"] .site-header .header-inner {
    min-height: 68px;
    padding-top: 10px;
    padding-bottom: 10px;
  }

  [data-theme="dark"] .site-brand-mark {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    font-size: 19px;
  }

  [data-theme="dark"] .site-header .site-brand-text strong {
    font-size: 18px;
  }

  [data-theme="dark"] .site-header .main-navigation ul {
    padding: 6px;
    border-radius: 14px;
  }

  [data-theme="dark"] .site-header .header-cta {
    min-height: 44px;
  }

  [data-theme="dark"] .site-header::after {
    right: 16px;
    left: 16px;
  }
}

/* Audit: article readability and bounded media */
.single-post .single-content { overflow-wrap: anywhere; }
.single-post .single-content img { max-width:100%; height:auto; }
.single-post .single-content a { text-decoration:underline; text-underline-offset:3px; }
.single-post .single-content h2 { line-height:1.3; }
.single-post .single-content table { display:block; max-width:100%; overflow-x:auto; }
.single-post .single-content .audit-related { border-top:1px solid #a5aab5; margin-top:2rem; padding-top:1rem; }

/* Complete, consistently styled article excerpts; author page excluded. */
body:not(.page-id-12) .post-card .post-card-excerpt {
 display:block; -webkit-line-clamp:unset; line-clamp:unset;
 overflow:visible; height:auto; max-height:none;
 font-size:15px; line-height:1.55; letter-spacing:0;
 overflow-wrap:break-word; margin:0 0 18px;
}
body:not(.page-id-12) .post-card-body { min-width:0; }
