/* Experimental ED1-inspired book design. No changes to the classic stylesheet.
   Disable using tools/earthdawn_style.json: {"style": "classic"}, then rebuild.
   Ornaments are original CSS geometry; no publisher artwork is reproduced. */
body.earthdawn-ed1-preview {
  --ink: #20201e;
  --muted: #55554e;
  --paper: #fffef9;
  --paper-deep: #eeede6;
  --forest: #1d1d1b;
  --forest-soft: #33332e;
  --gold: #34342f;
  --gold-pale: #eae8dc;
  --line: #b5b4ab;
  --shadow: 0 12px 38px rgba(0, 0, 0, .13);
  --serif: "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  background: #d5d4cd;
  color-scheme: light;
}

.earthdawn-ed1-preview .main {
  background: var(--paper);
  border-top: 9px solid var(--ink);
  outline: 1px solid #88887f;
  outline-offset: 4px;
}

/* Running-head bands echo the black, triangular-edged chapter strips. */
.earthdawn-ed1-preview .eyebrow {
  padding: 9px 16px;
  color: #fffef9;
  background-color: #22221f;
  background-image: linear-gradient(60deg, #44443d 25%, transparent 25%), linear-gradient(-60deg, #44443d 25%, transparent 25%);
  background-size: 22px 100%;
  background-repeat: repeat-x;
  font: 500 .8rem/1.45 var(--serif);
  text-align: center;
  letter-spacing: .12em;
}
.earthdawn-ed1-preview .page-header {
  padding-bottom: 25px;
  border-bottom: 3px double var(--ink);
}
.earthdawn-ed1-preview h1 {
  margin: 24px 0 18px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(2rem, 4.6vw, 3.3rem);
  font-weight: 500;
  font-variant-caps: small-caps;
  line-height: 1.16;
  letter-spacing: .025em;
  text-align: center;
  overflow-wrap: anywhere;
}
.earthdawn-ed1-preview .page-header::after {
  right: calc(50% - 10px);
  bottom: -11px;
  width: 20px;
  height: 20px;
  background: var(--paper);
  border: 6px double #44443d;
  border-radius: 50%;
  box-shadow: 0 0 0 5px var(--paper);
}
.earthdawn-ed1-preview .lead {
  color: #393933;
  font-size: 1.125rem;
  text-align: left;
  hyphens: auto;
}
.earthdawn-ed1-preview h2 {
  color: var(--ink);
  border-top: 3px double #66665d;
  font-family: var(--serif);
  font-variant-caps: small-caps;
  font-weight: 700;
  letter-spacing: .035em;
}
.earthdawn-ed1-preview h3,
.earthdawn-ed1-preview h4 {
  color: var(--ink);
  font-family: var(--serif);
  font-weight: 700;
}
.earthdawn-ed1-preview .longform p { line-height: 1.8; }

.earthdawn-ed1-preview a { color: #353d55; }
.earthdawn-ed1-preview a:hover { color: #653d24; }
.earthdawn-ed1-preview a:focus-visible,
.earthdawn-ed1-preview button:focus-visible,
.earthdawn-ed1-preview summary:focus-visible {
  outline: 3px solid #76622a;
  outline-offset: 3px;
}

.earthdawn-ed1-preview .sidebar {
  background: #20201e;
  border-right: 5px double #92928a;
}
.earthdawn-ed1-preview .brand { color: #fffef9; }
.earthdawn-ed1-preview .brand strong {
  font-family: var(--serif);
  font-variant-caps: small-caps;
  font-size: 1.4rem;
}
.earthdawn-ed1-preview .brand-mark {
  color: #fffef9;
  border: 4px double #cccbbd;
  box-shadow: 0 0 0 3px #20201e, 0 0 0 4px #92928a;
}
.earthdawn-ed1-preview .brand small,
.earthdawn-ed1-preview .nav-heading,
.earthdawn-ed1-preview .site-search label { color: #cfcec4; }
.earthdawn-ed1-preview .hub-link,
.earthdawn-ed1-preview .nav-link { color: #faf9f2; }
.earthdawn-ed1-preview .nav-link.sub,
.earthdawn-ed1-preview .nav-subgroup > summary { color: #deded4; }
.earthdawn-ed1-preview .nav-empty { color: #bdbdb3; }
.earthdawn-ed1-preview .nav-link { border-radius: 0; font-size: .9375rem; }
.earthdawn-ed1-preview .nav-link.active {
  color: #20201e;
  background: #eae9df;
  border-left-color: #fff;
}
.earthdawn-ed1-preview .nav-link:hover,
.earthdawn-ed1-preview .hub-link:hover { color: #fff; background: #3b3b36; }
.earthdawn-ed1-preview .nav-link.active:hover { color: #20201e; background: #fffef9; }
.earthdawn-ed1-preview .nav-summary-link,
.earthdawn-ed1-preview .nav-summary-link:hover { color: inherit; }
.earthdawn-ed1-preview .site-search input {
  color: #20201e;
  background: #fffef9;
  border: 1px solid #b5b4ab;
  border-radius: 0;
}
.earthdawn-ed1-preview .site-search input::placeholder { color: #64645b; }
.earthdawn-ed1-preview .search-results,
.earthdawn-ed1-preview .wiki-preview {
  background: #fffef9;
  border: 3px double #44443d;
  border-radius: 0;
}
.earthdawn-ed1-preview .search-results a { color: var(--ink); }
.earthdawn-ed1-preview .search-results { width: 100%; }
.earthdawn-ed1-preview .wiki-preview small { color: #55554e; font-size: .75rem; }

/* Book plates: ink artwork, deliberate crops, and shared content edges. */
.earthdawn-ed1-preview .journal-cover,
.earthdawn-ed1-preview .world-map,
.earthdawn-ed1-preview .portrait,
.earthdawn-ed1-preview .portrait-gallery figure,
.earthdawn-ed1-preview .character-sheet-preview figure,
.earthdawn-ed1-preview .biography-illustration,
.earthdawn-ed1-preview .source-illustration {
  border: 4px double #55554e;
  background: #fffef9;
  box-shadow: none;
}
.earthdawn-ed1-preview .journal-cover img { opacity: 1; }
.earthdawn-ed1-preview .journal-cover::after { content: none; }
.earthdawn-ed1-preview .character-avatar {
  border: 4px double #34342f;
  box-shadow: 0 0 0 3px var(--paper), 0 0 0 4px #92928a;
}
.earthdawn-ed1-preview .character-card,
.earthdawn-ed1-preview .entry,
.earthdawn-ed1-preview .empty-state {
  color: var(--ink);
  background: #f8f7f0;
  border: 3px double #77776d;
  border-radius: 0;
}
.earthdawn-ed1-preview .character-card:hover {
  color: var(--ink);
  background: #eeede3;
  box-shadow: 0 8px 18px rgba(0,0,0,.12);
}
.earthdawn-ed1-preview .character-card strong { font-variant-caps: small-caps; }
.earthdawn-ed1-preview .character-card span { color: #55554e; }
.earthdawn-ed1-preview .empty-state { border-style: double; }
.earthdawn-ed1-preview .entry h2 { border: 0; }
.earthdawn-ed1-preview .resource-links > a,
.earthdawn-ed1-preview .resource-links > .resource-placeholder {
  color: var(--ink);
  background: #eeede6;
  border: 1px solid #8a8a80;
  border-left: 5px solid #34342f;
  border-radius: 0;
}
.earthdawn-ed1-preview .resource-links a:hover { background: #e1e0d5; }
.earthdawn-ed1-preview .resource-kicker { color: #45453d; font-size: .75rem; }
.earthdawn-ed1-preview .resource-links strong { font: 700 1.125rem/1.35 var(--serif); }
.earthdawn-ed1-preview .resource-placeholder { opacity: 1; }
.earthdawn-ed1-preview .button-link {
  color: #fff;
  background: #30302b;
  border-radius: 0;
  border: 1px solid #20201e;
}
.earthdawn-ed1-preview .button-link:hover { color: #fff; background: #505048; }
.earthdawn-ed1-preview .summary-item:nth-child(odd),
.earthdawn-ed1-preview .lore-sources { background: #eeede6; }
.earthdawn-ed1-preview .trait-line span {
  color: #30302a;
  background: #eeede6;
  border-color: #a09f93;
  border-radius: 0;
}
.earthdawn-ed1-preview .character-theme,
.earthdawn-ed1-preview .character-theme:hover { color: #fff; background: #30302b; border-color: #77776d; border-radius: 0; }
.earthdawn-ed1-preview .theme-copy small,
.earthdawn-ed1-preview .theme-action { color: #eeede6; }
.earthdawn-ed1-preview .theme-copy > span { color: #d5d4c9; }
.earthdawn-ed1-preview .footer { border-top: 3px double #55554e; letter-spacing: .04em; }

@media (max-width: 900px) {
  .earthdawn-ed1-preview .main { outline: none; }
  .earthdawn-ed1-preview .mobile-bar { background: #20201e; border-bottom: 3px double #aaa99d; }
  .earthdawn-ed1-preview .menu-button { border-color: #cfcec4; border-radius: 0; }
  .earthdawn-ed1-preview .journal-cover { min-height: 0; }
}
@media (max-width: 520px) {
  .earthdawn-ed1-preview .eyebrow { padding: 9px 10px; letter-spacing: .07em; }
  .earthdawn-ed1-preview h1 { font-size: 2rem; }
  .earthdawn-ed1-preview h2 { font-size: 1.5rem; }
}
@media (prefers-reduced-motion: reduce) {
  .earthdawn-ed1-preview .character-card { transition: none; }
  .earthdawn-ed1-preview .character-card:hover { transform: none; }
}
