/* ANOPEDIA 1.7.6 · editorial polish
   Uniform materials and rhythm without flattening special feature panels.
   Applies after established thematic and article-specific styles. */
:root {
  --ui-card-radius: 12px;
  --ui-control-radius: 9px;
  --ui-dialog-radius: 16px;
  --ui-gap: clamp(12px, 1.8vw, 20px);
  --ui-card-shadow: 0 14px 32px -29px rgba(16, 42, 24, .25);
  --ui-card-hover-shadow: 0 20px 36px -28px rgba(16, 42, 24, .25);
}
html[data-theme="dark"] {
  --ui-card-shadow: 0 14px 34px -27px rgba(0, 0, 0, .48);
  --ui-card-hover-shadow: 0 19px 38px -25px rgba(0, 0, 0, .58);
}
/* Editorial masthead: the emblem remains visible, but text is always primary. */
.ed-home .ed-intro { isolation: isolate; }
.ed-home .ed-intro-content { z-index: 2; }
.ed-home .ed-ornament.ed-watermark { z-index: 0; filter: none; }
.ed-home .ed-watermark-logo {
  opacity: .037;
  filter: none;
  transition: opacity 220ms ease;
}
html[data-theme="dark"] .ed-home .ed-watermark-logo {
  opacity: .074;
  filter: invert(1);
}
.ed-home .ed-intro h1 { color: var(--ink); }
.ed-home .ed-intro h1 em { color: var(--accent); }
.ed-home .ed-intro p { color: var(--text); }
.ed-home .ed-eyebrow { color: var(--accent); }
.ed-home .ed-text-link { color: var(--accent); }
.ed-home .ed-text-link:hover { color: var(--ink); }

/* Consistent cards: a restrained edge, mild radius, one shadow system. */
:where(
  .concept-card,.dictionary-item,.journal-card,
  .media-category,.media-piece,
  .academy-card,.academy-faculty-card,.academy-course-card,
  .lv-hub-card,.lv-index-card,.lv-essay,.lv-law-card,.lv-editor-work,
  .ed-home .ed-lead-story,
  .source-excerpt,.public-editorial-note,
  .alpha-dx-link,.alpha-reference
) {
  border-radius: var(--ui-card-radius);
  border-color: var(--line);
  box-shadow: var(--ui-card-shadow);
}
:where(
  .concept-card,.dictionary-item,.journal-card,
  .media-category,.media-piece,
  .academy-card,.academy-faculty-card,.academy-course-card,
  .lv-hub-card,.lv-index-card,.ed-home .ed-lead-story
):hover { box-shadow: var(--ui-card-hover-shadow); }
:where(.ed-home .ed-lead-story,.concept-card,.dictionary-item,.journal-card,.media-category,.media-piece) {
  background: var(--card);
}
.ed-home .ed-lead-story {
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  padding: clamp(22px, 3.1vw, 38px);
  padding-bottom: clamp(38px, 4vw, 48px);
}
.ed-home .ed-feature-grid { column-gap: clamp(20px, 3vw, 44px); }
:where(.concept-grid,.dictionary-grid,.journal-grid,.media-categories,.media-piece-grid) { gap: var(--ui-gap); }
:where(.concept-card,.dictionary-item,.journal-card,.media-category,.media-piece) {
  padding: clamp(20px, 2.4vw, 28px);
}
/* Concept rows keep their lightweight, list-like mobile layout. */
@media (min-width: 701px) {
  .ed-home .ed-concept {
    border: 1px solid var(--line);
    background: var(--card);
    border-radius: var(--ui-card-radius);
    box-shadow: var(--ui-card-shadow);
    padding: clamp(22px, 2.6vw, 29px);
  }
  .ed-home .ed-concept:hover { box-shadow: var(--ui-card-hover-shadow); }
  .ed-home .ed-concept>span { right: 20px; }
}
@media (max-width: 700px) {
  .ed-home .ed-concept,
  .ed-home .ed-concept:not(:last-child) {
    background: transparent;
    box-shadow: none;
    border-radius: 0;
    border: 0;
    border-top: 1px solid var(--line);
    padding: 22px 26px 25px 0;
  }
  .ed-home .ed-concept:last-child { border-bottom: 1px solid var(--line); }
  .ed-home .ed-concept:hover { background: transparent;box-shadow: none; }
  .ed-home .ed-ornament.ed-watermark { pointer-events:none; }
  .ed-home .ed-intro h1 { text-shadow: none; }
  .ed-home .ed-lead-story { padding: 24px 22px 43px; }
}
/* Harmonized controls and dialogs, while retaining clear affordances. */
:where(.site-header .icon-button,.search-panel-header button,.btn,.btn.outline,
  .ed-drawer .drawer-item-link,.ed-drawer .drawer-accordion summary,
  .media-filter-chip,.round-tag) {
  border-radius: var(--ui-control-radius);
}
:where(.search-panel,.lv-editor-work,.ch-form) { border-radius: var(--ui-dialog-radius); }
.search-panel {
  background: var(--card);
  border: 1px solid var(--line2);
  box-shadow: 0 26px 65px -26px rgba(7,23,13,.30);
}
html[data-theme="dark"] .search-panel { box-shadow:0 24px 65px -22px rgba(0,0,0,.75); }
.search-panel-header,.search-panel-foot { color: var(--text); }
.search-panel-header input { color:var(--ink); }
.search-result:hover,.ed-drawer .drawer-item-link:hover {
  background: color-mix(in srgb, var(--accent) 8%, var(--card));
}
/* Mathematical displays fit the same visual language without masking overflow. */
.alpha-article .alpha-formula {border-radius:var(--ui-card-radius);background:var(--card)}
.alpha-article .alpha-table-scroll {border-radius:var(--ui-card-radius)}
.alpha-article blockquote {border-radius:0 var(--ui-card-radius) var(--ui-card-radius) 0}
/* Core typography and accent colors use semantic tokens, not legacy copper. */
:where(.site-header .brand-text strong,.drawer-brand span,.ed-footer-logo,.ed-article-category,
  .ed-lead-story .ed-label,.ed-lead-story .ed-arrow,.ed-article-row .ed-arrow,
  .ed-concept>span,.ed-eyebrow,.ed-text-link,.kicker,.media-format) {color:var(--accent)}
/* Faint, precise header rule. No halo. */
.site-header::after {height:1px;box-shadow:none;opacity:.60}
@media(prefers-reduced-motion:reduce){
  .ed-home .ed-watermark-logo {transition:none}
}

/* Mobile header: accessible tap areas without crowding the 320 px layout. */
@media (max-width: 420px) {
  .site-header .header-inner {gap: 4px;}
  .site-header .brand {gap: 6px;}
  .site-header .icon-button {
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
    padding: 9px;
  }
}
@media (max-width: 360px) {
  .site-header .brand-text strong {font-size: 18px;}
  .site-header .brand img {width: 30px; height: 30px;}
  .site-header .brand {gap: 4px;}
  .site-header .header-inner {gap: 2px;}
}
