/*
Theme Name: DASHEN EVA
Version: 1.7.0
Requires at least: 6.3
Requires PHP: 7.4
Description: 以黑底、暖琥珀读数和印刷标题排版，提供文章目录、图片预览和原生 WordPress 区块。
Author: DASHEN UI
Text Domain: dashen-eva
License: GPL-2.0-or-later
*/
:root {
  color-scheme: dark;
  --eva-body: var(--eva-text,"PingFang SC","Microsoft YaHei",sans-serif);
  --eva-mono: Consolas,"Courier New","Microsoft YaHei",monospace;
  --eva-body-ink: var(--term-ink,#f1e8d6);
  --eva-muted: var(--term-muted,#bcae95);
}
* { box-sizing: border-box }
html,body { background: var(--edition-ground,#0a0b0a); color: var(--eva-body-ink) }
body { margin: 0; font: 16px/1.75 var(--eva-body) }
a { color: var(--readout-label); text-underline-offset: .2em }
a:hover { color: var(--readout-focus) }
:focus-visible { outline: 2px solid var(--readout-focus); outline-offset: 3px }
.eva-wrap { width: min(calc(100% - clamp(24px,7vw,104px)),76rem); margin-inline: auto }
.eva-content { min-height: 60vh; padding-block: clamp(15px,3vw,30px) clamp(48px,6vw,84px); overflow-wrap: anywhere }
.eva-search { display: flex; align-items: stretch; max-width: 100%; gap: .45rem; font-size: .83rem }
.eva-search label { min-width: 0 }
.eva-search input { min-height: 44px; font: inherit; padding: .3em .7em; border: 1px solid #81533c; border-radius: 0 }
.eva-search input { width: 7.5em; max-width: 100%; background: var(--readout-panel); color: var(--eva-body-ink) }
.eva-search input::placeholder { color: var(--eva-muted) }
.eva-readout-reference { width: min(100%,710px); margin: 0 auto }
.eva-readout-reference iframe { display: block; border: 0; background: var(--readout-canvas); width: 100%; height: 340px }
.eva-readout-reference figcaption,.eva-gallery-link { display: flex; align-items: center; gap: 1rem; justify-content: space-between; width: min(100% - 36px,674px); margin-inline: auto }
.eva-readout-reference figcaption { flex-wrap: wrap; font: .8rem/1.5 var(--eva-body); color: var(--eva-muted) }
.eva-gallery-link { margin-block: .9rem clamp(25px,4vw,50px) }
.eva-index-layout { display: grid; grid-template-columns: minmax(0,1fr) minmax(135px,.3fr); gap: clamp(16px,3vw,36px); align-items: start }
.eva-section-title,.eva-topics h2,.eva-story-heading,.eva-archive-heading { border-bottom: 0 }
.eva-section-title,.eva-topics h2 { padding-bottom: .65rem }
.eva-section-title h1,.eva-topics h2,.eva-gallery-heading h1,.eva-story-heading h1,.eva-archive-heading h1,.eva-instrument-heading h1,.eva-entry h2,.eva-comments h2 { margin: 0; color: var(--readout-ink); font: 750 clamp(1.25rem,3.2vw,1.9rem)/1.2 var(--readout-type); letter-spacing: -.05em }
.eva-section-title h1,.eva-gallery-heading h1,.eva-story-heading h1 { text-shadow: var(--readout-title-shadow) }
.eva-entry { display: flex; align-items: center; justify-content: space-between; gap: 1em; padding: 1rem 0; border-bottom: 1px solid var(--readout-row) }
.eva-entry-copy { min-width: 0 }
.eva-entry h2 { font-size: clamp(1.08rem,2.4vw,1.42rem) }
.eva-entry h2 a { color: inherit; text-decoration: none }
.eva-entry h2 a:hover { text-decoration: underline }
.eva-category,.eva-byline,.eva-count,.eva-origin { font: .8rem/1.6 var(--eva-mono) }
.eva-category { margin-bottom: .3em }
.eva-byline { display: flex; align-items: center; flex-wrap: wrap; gap: 1em; color: var(--eva-muted); margin-top: .65em }
.eva-byline a { color: inherit }
.eva-byline time,.eva-count { font-variant-numeric: tabular-nums }
.eva-summary { max-width: 65ch; color: var(--eva-body-ink) }
.eva-summary p { margin: .4em 0 }
.eva-thumb { flex: 0 0 clamp(64px,12vw,130px) }
.eva-thumb img { display: block; width: 100%; height: auto; aspect-ratio: 4/3; object-fit: cover }
.eva-topics h2 { font-size: 1.2rem }
.eva-topics ul { list-style: none; padding: 0; margin: 0 }
.eva-topics li { border-bottom: 1px solid var(--readout-row) }
.eva-topics li > a { display: flex; gap: .5em; align-items: center; justify-content: space-between; min-height: 44px; text-decoration: none }
.eva-topics li > a:hover { text-decoration: underline }
.eva-count { color: var(--eva-muted); white-space: nowrap }
.eva-archive-heading,.eva-story-heading { padding-bottom: 1em; margin-bottom: 1.6em }
.eva-story-heading h1,.eva-archive-heading h1 { font-size: clamp(1.8rem,4vw,2.75rem) }
.eva-single,.eva-comments { max-width: 48rem; margin-inline: auto }
.eva-gallery-heading { width: min(100% - 36px,674px); margin: 0 auto .15rem }
.eva-gallery-heading h1 { font-size: clamp(1.2rem,3vw,1.55rem) }
.eva-gallery .eva-prose { width: min(100% - 36px,674px); margin: 1.4rem auto }
.eva-hero-image { display: block; margin: 1em auto; max-width: 100%; height: auto }
.eva-prose { max-width: 46rem; margin: 1.65rem auto; font-size: clamp(1rem,1.4vw,1.125rem); line-height: 1.85 }
.eva-prose > * { margin-block: 0 1.25em }
.eva-prose :is(h2,h3,h4) { color: var(--readout-ink); font-family: var(--readout-type); line-height: 1.3; letter-spacing: -.035em }
.eva-prose :is(img,video,iframe) { max-width: 100% }
.eva-prose :is(img,video) { height: auto }
.eva-prose :is(figure,blockquote) { margin-inline: 0 }
.eva-prose pre { max-width: 100%; overflow-x: auto }
.eva-prose figcaption { color: var(--eva-muted); font-size: .85rem }
.eva-prose blockquote { border-inline-start: 2px solid var(--readout-rule); padding-inline-start: 1rem }
.eva-tags,.eva-comments { border-top: 1px solid var(--readout-row); padding-block: 1rem }
.eva-comments :is(input:not([type=submit]):not([type=checkbox]),textarea) { max-width: 100%; background: var(--readout-panel); color: var(--eva-body-ink); border: 1px solid var(--readout-row); padding: .5em; font: inherit }
.eva-comments label,.eva-comments textarea { display: block }
.eva-comments textarea { width: 100% }
.eva-content .nav-links { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1em; margin: 1.5rem 0 }
.eva-instrument-heading { margin-block: 1rem }
#eva-instrument { display: block; width: 100%; height: max(100vh,var(--instrument-content-height,0px)); border: 0 }
.eva-skip,.screen-reader-text { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap }
.eva-skip:focus,.screen-reader-text:focus { top: 8px; left: 8px; z-index: 99999; width: auto; height: auto; padding: .5em 1em; background: var(--readout-panel); color: var(--readout-focus); clip-path: none }
@media(max-width: 700px) {
  .eva-index-layout { grid-template-columns: minmax(0,1fr) }
  .eva-wrap { width: calc(100% - 24px) }
}
@media(max-width: 474px) {
  .eva-readout-reference figcaption,.eva-gallery-link,.eva-gallery-heading,.eva-gallery .eva-prose { width: calc(100% - 16px) }
  .eva-search input { width: 6em }
}
.eva-gallery-link { flex-wrap: wrap; justify-content: flex-start }
.eva-section-title,.eva-archive-heading,.eva-story-heading,.eva-topics h2 { position: relative }
:is(.eva-section-title,.eva-archive-heading,.eva-story-heading,.eva-topics h2)::after {
  content: ""; position: absolute; inset: auto 0 0; height: 2px; background: var(--term-orange,#ff7934);
}
.eva-module-gallery { margin-block: 2.5rem }
.eva-module-gallery > .wp-block-group { margin: 1.05rem 0 }
.eva-module-gallery > .eva-section-title h2 { margin: 0; font-size: clamp(1.35rem,4vw,1.95rem); color: var(--readout-ink); text-shadow: var(--readout-title-shadow) }
.eva-entries,.eva-topics,.eva-single,.eva-comments,.eva-section-title { min-width: 0 }
.eva-entries,.eva-topics,.eva-single,.eva-comments { padding-inline: clamp(14px,2.5vw,26px); background: var(--readout-panel) }
.eva-entry h2 a,.eva-topics h2 { color:var(--edition-paper,#f3eee5) }
.eva-entry:last-child { border-bottom: 0 }
.eva-topics { padding-block: 1em }
.eva-single,.eva-comments { padding-block: clamp(16px,3vw,30px); border-block-start: 1px solid var(--readout-edge) }
.eva-comments :is(input,textarea):not([type=checkbox]) { max-width: 100% }
.eva-comments .comment-list,.eva-comments ol { padding-inline-start: 1.3em }
.eva-comments .comment-body { padding-block: 1em; border-bottom: 1px solid var(--readout-row) }
.eva-comments #reply-title { color: var(--readout-ink); text-shadow: var(--readout-title-shadow) }
.eva-comments .comment-form-cookies-consent { display: flex; align-items: flex-start; gap: .55em }
.post-password-form input[type=password] { min-height: 44px; background: #100b08; border: 1px solid #81533c; color: #efe2d7; padding-inline: .65em }

.eva-reference-ids { flex: 1 0 100%; min-width: 0; display:flex; flex-wrap:wrap; gap:.25em .8em; padding-block:.35em }
.eva-reference-ids a { font: 11px/1.6 var(--eva-mono); color:#d59e80; overflow-wrap:anywhere }
.eva-wrap,.eva-index-layout>* { min-width:0 }
.eva-lead { display:grid; gap:clamp(1rem,3vw,3rem); align-items:center; margin-bottom:clamp(2rem,5vw,4.5rem); padding:clamp(1rem,3vw,3.1rem); border:1px solid #584638; border-top:4px solid var(--edition-signal,#ff573c); background:linear-gradient(120deg,#201811 0,#110f0c 44%,#0a0a09 83%); box-shadow:inset 0 -3px #30271f }
.eva-lead-with-cover { grid-template-columns:minmax(0,1fr) minmax(0,.96fr) }
.eva-lead-copy { min-width:0 }
.eva-lead-meta,.eva-section-title { display:flex; align-items:center; justify-content:space-between; gap:.5rem 1rem; flex-wrap:wrap }
.eva-lead-meta { padding-bottom:.65rem; border-bottom:1px solid #705341; color:#ffae79; font:600 .77rem/1.6 var(--eva-mono); letter-spacing:.05em }
.eva-lead-meta .eva-category { margin:0 }
.eva-lead h1,.eva-story-heading h1,.eva-archive-heading h1,.eva-gallery-heading h1 { margin:.29em 0 .32em; font:900 clamp(2.7rem,5.7vw,5.9rem)/1.08 var(--eva-display,serif); letter-spacing:-.06em; color:var(--edition-paper,#f3eee5); text-shadow:none; text-wrap:balance }
.eva-lead h1 a { color:inherit; text-decoration:none }
.eva-lead h1 a:hover { text-decoration:underline; text-decoration-thickness:.05em }
.eva-lead .eva-read { margin-top:1.15rem }
.eva-cover { display:block; min-width:0; border:1px solid #78513a; background:#080808 }
.eva-cover img { display:block; width:100%; aspect-ratio:16/10; object-fit:contain }
.eva-section-title :is(h1,h2) { margin:0; color:var(--edition-paper,#f3eee5); font:900 clamp(1.65rem,3vw,2.7rem)/1.1 var(--eva-display,serif); text-shadow:none }
.eva-index-total { color:#dea782; font:.85rem/1.4 var(--eva-mono); font-variant-numeric:tabular-nums }
.eva-entry { border-color:#564538; }
.eva-entry h2 { font-family:var(--eva-display,serif); font-weight:850; font-size:clamp(1.2rem,2.2vw,1.85rem); }
.eva-entry .eva-summary { margin-top:.45rem }
.eva-entry .eva-thumb { border-block:1px solid #9a623f }
.eva-topics { border-top:3px double #f28655; background:#13110e }
.eva-topics .eva-count,.eva-reader-outline :is(a[aria-current=true],a[aria-current=location]) { color:var(--term-amber,#ffae36) }
.eva-reference-drawer { margin-block:2.45rem 0; border-block:1px solid #70513e }
.eva-reference-drawer summary { cursor:pointer; color:#ffab77; padding:1em .5em; font-weight:700 }
.eva-search-refine { padding-block:.4rem 1.25rem }
.eva-search-refine .eva-search-fields label { width:min(32rem,68%) }
.eva-search-refine input[type=search] { width:100% }
.eva-content :is(.post-password-form,.comment-form) :is(input,textarea):focus-visible { outline-color:var(--term-amber,#ffae36) }
.eva-missing-heading {
  display:grid;
  grid-template-columns:minmax(0,.65fr) minmax(0,1fr);
  gap:clamp(1rem,4vw,3rem);
  align-items:center;
  padding:clamp(1.1rem,4vw,3.4rem);
  border-block:1px solid var(--term-line);
  border-inline-start:5px solid var(--term-orange);
  background:var(--term-panel);
}
.eva-missing-code {
  color:var(--term-orange);
  font:850 clamp(4.25rem,12vw,10rem)/1 var(--term-display);
  letter-spacing:-.06em;
}
.eva-missing-heading h1 { margin:0; color:var(--term-ink); font:900 clamp(1.9rem,4vw,3.65rem)/1.18 var(--eva-display,serif); letter-spacing:-.055em }
.eva-missing-heading p { max-width:34em; margin:.7rem 0 0; color:var(--term-muted) }
.eva-recovery-links { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,.5fr); gap:clamp(1rem,4vw,3rem); margin-top:1.5rem }
.eva-recovery-search h2 { margin:0; font:750 1.35rem/1.4 var(--eva-display,serif) }
.eva-recovery-search .eva-search { margin-block:.75rem 1.1rem }
.eva-recovery-search .eva-search-fields label { flex:1 1 auto }
.eva-recovery-search .eva-search input { width:100% }
@media(max-width:700px) {
  .eva-missing-heading,.eva-recovery-links { grid-template-columns:minmax(0,1fr) }
  .eva-lead-with-cover { grid-template-columns:minmax(0,1fr) }
  .eva-lead .eva-cover img { max-height:17rem }
  .eva-archive-heading h1,.eva-story-heading h1,.eva-gallery-heading h1 { font-size:clamp(2.15rem,9vw,3.7rem) }
  .eva-entries { padding-inline:.7rem }
  .eva-entry:has(.eva-thumb) { align-items:flex-start }
}
