/*
 * Tode in Harry Potter — ein ruhiges, redaktionelles Fanarchiv.
 * Mobile-first, ohne externe Schriften, Bilder oder JavaScript.
 */
:root {
  --tode-ink: #0d1117;
  --tode-ink-soft: #141a22;
  --tode-surface: #191f28;
  --tode-surface-raised: #202733;
  --tode-parchment: #efe7d5;
  --tode-text: #ece7dc;
  --tode-text-soft: #aaa99f;
  --tode-gold: #d1aa55;
  --tode-gold-light: #efcf82;
  --tode-line: rgba(239, 231, 213, 0.13);
  --tode-shadow: 0 24px 70px rgba(0, 0, 0, 0.24);
  --tode-serif: Georgia, "Iowan Old Style", "Palatino Linotype", "Book Antiqua", serif;
  --tode-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --tode-width: 1120px;
  --tode-reading: 760px;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--tode-ink);
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 15% -10%, rgba(209, 170, 85, 0.08), transparent 34rem),
    var(--tode-ink) !important;
  color: var(--tode-text);
  font-family: var(--tode-sans);
  font-size: 16px;
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
}

body,
input,
select,
optgroup,
textarea {
  color: var(--tode-text);
  font-family: var(--tode-sans);
}

::selection {
  background: var(--tode-gold);
  color: var(--tode-ink);
}

a {
  color: var(--tode-gold-light);
  text-decoration-color: rgba(239, 207, 130, 0.45);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  transition: color 160ms ease, text-decoration-color 160ms ease;
}

a:hover {
  color: #fff4d2;
  text-decoration-color: currentColor;
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 3px solid var(--tode-gold-light);
  outline-offset: 4px;
}

h1,
h2,
h3,
h4,
h5,
h6,
.entry-title {
  color: var(--tode-parchment) !important;
  font-family: var(--tode-serif) !important;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.16;
}

/* The custom header avoids inherited Kadence sizing and duplicate mobile markup. */
#masthead {
  display: none !important;
}

.tode-site-header {
  position: relative;
  z-index: 5;
  border-bottom: 1px solid var(--tode-line);
  background: rgba(13, 17, 23, 0.94);
}

.tode-site-header__inner {
  display: flex;
  width: min(calc(100% - 2rem), var(--tode-width));
  min-height: 78px;
  margin: 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.tode-brand {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 0.85rem;
  color: var(--tode-text);
  text-decoration: none;
}

.tode-brand:hover {
  color: var(--tode-text);
}

.tode-brand__mark {
  display: grid;
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(209, 170, 85, 0.22);
  border-radius: 50%;
  background: var(--tode-surface);
}

.tode-brand__image {
  display: block;
  width: 48px !important;
  height: 48px !important;
  max-width: none !important;
  object-fit: cover;
  border-radius: 50%;
}

.tode-brand__copy {
  display: grid;
  min-width: 0;
}

.tode-brand__eyebrow {
  color: var(--tode-gold);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  line-height: 1.2;
  text-transform: uppercase;
}

.tode-brand__name {
  overflow: hidden;
  color: var(--tode-parchment);
  font-family: var(--tode-serif);
  font-size: clamp(1rem, 4.7vw, 1.35rem);
  font-weight: 600;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tode-primary-nav {
  flex: 0 0 auto;
}

.tode-primary-nav a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--tode-line);
  border-radius: 999px;
  color: var(--tode-text);
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.03em;
  text-decoration: none;
}

.tode-primary-nav a:hover {
  border-color: rgba(209, 170, 85, 0.48);
  color: var(--tode-gold-light);
}

.tode-disclaimer {
  border-bottom: 1px solid var(--tode-line);
  background: var(--tode-ink-soft);
  color: var(--tode-text-soft);
  font-size: 0.72rem;
  font-style: normal;
  line-height: 1.5;
}

.tode-disclaimer__inner {
  width: min(calc(100% - 2rem), var(--tode-width));
  margin: 0 auto;
  padding: 0.55rem 0;
}

/* Reset the theme shell so no white gutters or inherited cards remain. */
#wrapper,
.site,
.wp-site-blocks,
#inner-wrap,
main,
#content,
#primary,
.content-area,
.content-container,
.site-main,
.content-wrap,
.content-bg,
.single-entry,
.entry-content-wrap,
.entry-content,
.entry-header,
.page-header,
.entry-hero,
.entry-hero-container-inner,
.hero-container,
.site-footer,
.site-footer-wrap,
.site-footer-row-container-inner,
.footer-widget-area {
  background: transparent !important;
  color: var(--tode-text);
}

#wrapper.site {
  min-height: auto;
}

.site-container,
.content-container.site-container,
.hero-container.site-container,
.site-footer-row-layout-contained {
  width: min(calc(100% - 2rem), var(--tode-width)) !important;
  max-width: var(--tode-width) !important;
  margin-inline: auto;
}

.content-container {
  display: block !important;
}

.entry-hero.page-hero-section {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-bottom: 1px solid var(--tode-line);
}

.entry-hero.page-hero-section::before {
  position: absolute;
  z-index: -1;
  top: -9rem;
  left: 50%;
  width: 38rem;
  height: 18rem;
  border-radius: 50%;
  background: rgba(209, 170, 85, 0.07);
  content: "";
  filter: blur(55px);
  transform: translateX(-50%);
}

.entry-hero .entry-header,
.entry-hero.page-hero-section .entry-header {
  display: flex;
  min-height: 0 !important;
  padding: clamp(2.9rem, 8vw, 5.5rem) 0 clamp(2.6rem, 7vw, 4.8rem);
  align-items: center;
  justify-content: center;
}

h1.entry-title {
  max-width: 900px;
  margin: 0;
  font-size: clamp(2.3rem, 7vw, 4.8rem);
  text-align: center;
  text-wrap: balance;
}

#primary.content-area {
  width: auto;
  margin: 0 !important;
  padding: clamp(2.25rem, 6vw, 5rem) 0;
}

.entry.single-entry {
  border-radius: 0 !important;
  box-shadow: none !important;
}

.entry-content-wrap {
  padding: 0 !important;
}

.entry-content {
  width: 100%;
  max-width: var(--tode-reading) !important;
  margin-inline: auto !important;
  color: var(--tode-text);
  font-size: clamp(1rem, 1.6vw, 1.1rem);
}

.entry-content > * {
  max-width: 100%;
}

.entry-content p {
  margin: 0 0 1.35em;
}

.entry-content strong {
  color: var(--tode-parchment);
}

.entry-content ul,
.entry-content ol {
  padding-left: 1.35rem;
}

.entry-content li {
  margin-bottom: 0.55rem;
}

.entry-content h2 {
  position: relative;
  margin: 3.3rem 0 1.2rem;
  padding-top: 1.3rem;
  border-top: 1px solid var(--tode-line);
  font-size: clamp(1.7rem, 4vw, 2.35rem);
}

.entry-content h2::before {
  position: absolute;
  top: -1px;
  left: 0;
  width: 3.5rem;
  height: 2px;
  background: var(--tode-gold);
  content: "";
}

.entry-content h3 {
  margin: 2rem 0 0.85rem;
  font-size: 1.3rem;
}

.entry-content hr {
  margin: 2rem 0;
  border: 0;
  border-top: 1px solid var(--tode-line);
}

/* Portraits: contained, cinematic and consistent on every figure page. */
.entry-content > .wp-block-gallery {
  display: block !important;
  width: min(100%, 620px);
  margin: 0 auto 1.35rem !important;
  padding: clamp(0.45rem, 1.5vw, 0.75rem);
  border: 1px solid rgba(209, 170, 85, 0.18);
  border-radius: 18px;
  background: linear-gradient(145deg, var(--tode-surface-raised), var(--tode-surface));
  box-shadow: var(--tode-shadow);
}

.entry-content > .wp-block-gallery figure.wp-block-image {
  display: block !important;
  width: 100% !important;
  margin: 0 !important;
}

.entry-content > .wp-block-gallery img {
  display: block;
  width: 100% !important;
  height: auto !important;
  max-height: 720px;
  object-fit: cover;
  object-position: center top;
  border-radius: 12px;
}

/* The factual profile reads like a compact archive card. */
.tode-infobox {
  position: relative;
  width: min(100%, 680px);
  margin: 0 auto 3rem;
  overflow: hidden;
  border: 1px solid var(--tode-line);
  border-radius: 16px;
  background: var(--tode-surface);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.18);
}

.tode-infobox::before {
  display: block;
  height: 3px;
  background: linear-gradient(90deg, var(--tode-gold), rgba(209, 170, 85, 0.08));
  content: "";
}

.tode-infobox dl {
  margin: 0;
  padding: 0.65rem clamp(1rem, 4vw, 1.5rem);
}

.tode-infobox h3 {
  margin: 0 !important;
  padding: 1.2rem clamp(1rem, 4vw, 1.5rem) 0.9rem;
  border-top: 1px solid var(--tode-line);
  color: var(--tode-gold-light) !important;
  font-family: var(--tode-sans) !important;
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.tode-infobox-row {
  display: grid;
  grid-template-columns: minmax(7.5rem, 0.75fr) minmax(0, 1.5fr);
  gap: 0.75rem 1rem;
  padding: 0.68rem 0;
  border-bottom: 1px solid var(--tode-line);
  font-size: 0.91rem;
  line-height: 1.5;
}

.tode-infobox-row:last-child {
  border-bottom: 0;
}

.tode-infobox-row dt {
  color: var(--tode-text-soft);
  font-weight: 650;
}

.tode-infobox-row dd {
  min-width: 0;
  margin: 0;
  color: var(--tode-text);
}

/* Homepage editorial intro and index. */
.page-id-78 .entry-content {
  max-width: 940px !important;
}

.tode-home-intro {
  max-width: 760px;
  margin: 0 auto clamp(3rem, 7vw, 5rem);
  text-align: center;
}

.tode-home-intro > p {
  margin-bottom: 0.8rem;
  color: var(--tode-parchment);
  font-family: var(--tode-serif);
  font-size: clamp(1.2rem, 3vw, 1.55rem);
  line-height: 1.55;
}

.tode-home-intro .tode-home-intro__kicker {
  color: var(--tode-gold);
  font-family: var(--tode-sans);
  font-size: 0.7rem;
  font-weight: 750;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.tode-home-intro .tode-home-intro__hint {
  color: var(--tode-text-soft);
  font-family: var(--tode-sans);
  font-size: 0.82rem;
}

.page-id-78 .entry-content h3 {
  display: flex;
  margin: 2.6rem 0 0.75rem;
  align-items: center;
  gap: 0.8rem;
  color: var(--tode-gold) !important;
  font-family: var(--tode-sans) !important;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.page-id-78 .entry-content h3::after {
  height: 1px;
  flex: 1;
  background: var(--tode-line);
  content: "";
}

.page-id-78 .entry-content ul {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.65rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.page-id-78 .entry-content li {
  display: flex;
  min-height: 54px;
  margin: 0;
  align-items: center;
  padding: 0.8rem 1rem;
  border: 1px solid var(--tode-line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.018);
  color: #85878a;
  line-height: 1.35;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.page-id-78 .entry-content li:has(a):hover {
  border-color: rgba(209, 170, 85, 0.34);
  background: rgba(209, 170, 85, 0.055);
  transform: translateY(-1px);
}

.page-id-78 .entry-content li:has(a) {
  border-left: 2px solid var(--tode-gold);
  background: linear-gradient(90deg, rgba(209, 170, 85, 0.07), rgba(255, 255, 255, 0.018) 38%);
}

.page-id-78 .entry-content li a {
  display: flex;
  width: 100%;
  min-height: 28px;
  align-items: center;
  color: var(--tode-gold-light);
  font-family: var(--tode-serif);
  font-size: 1.02rem;
  font-weight: 600;
  text-decoration: none;
}

.page-id-78 .entry-content li a::after {
  margin-left: auto;
  color: var(--tode-gold);
  content: "›";
  font-family: var(--tode-sans);
  font-size: 1.25rem;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--tode-line) !important;
}

.site-bottom-footer-inner-wrap {
  min-height: 84px;
  padding: 1.5rem 0 !important;
}

.footer-html-inner,
.footer-html-inner p {
  margin: 0;
  color: var(--tode-text-soft);
  font-size: 0.76rem;
  text-align: center;
}

.footer-html-inner a {
  color: var(--tode-text-soft);
}

@media (min-width: 620px) {
  .tode-site-header__inner,
  .tode-disclaimer__inner,
  .site-container,
  .content-container.site-container,
  .hero-container.site-container,
  .site-footer-row-layout-contained {
    width: min(calc(100% - 3rem), var(--tode-width)) !important;
  }

  .tode-primary-nav a {
    padding-inline: 1rem;
    font-size: 0.84rem;
  }

  .page-id-78 .entry-content ul {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 920px) {
  .page-id-78 .entry-content ul {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  body.page:not(.page-id-78) .entry-content:has(> .wp-block-gallery):has(> .tode-infobox) {
    display: grid;
    max-width: 1080px !important;
    grid-template-columns: minmax(0, 0.88fr) minmax(400px, 1.12fr);
    column-gap: clamp(2rem, 4vw, 3.5rem);
    align-items: start;
  }

  body.page:not(.page-id-78) .entry-content > .wp-block-gallery {
    width: 100%;
    margin: 0 !important;
    grid-column: 2;
    grid-row: 1;
  }

  body.page:not(.page-id-78) .entry-content > .wp-block-gallery img {
    max-height: 650px;
  }

  body.page:not(.page-id-78) .entry-content > .tode-infobox {
    width: 100%;
    margin: 0;
    grid-column: 1;
    grid-row: 1;
  }

  body.page:not(.page-id-78) .entry-content > :not(.wp-block-gallery):not(.tode-infobox) {
    width: 100%;
    max-width: var(--tode-reading);
    margin-right: auto;
    margin-left: auto;
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .tode-site-header__inner {
    width: calc(100% - 1.5rem);
  }

  .tode-primary-nav {
    display: none;
  }

  .tode-brand__eyebrow {
    display: none;
  }

  .tode-brand__mark {
    width: 46px;
    height: 46px;
    flex-basis: 46px;
  }

  .tode-brand__image {
    width: 42px !important;
    height: 42px !important;
  }

  .entry-hero .entry-header,
  h1.entry-title,
  .tode-home-intro {
    width: 100%;
    min-width: 0;
  }

  h1.entry-title {
    font-size: clamp(2rem, 10.5vw, 2.7rem);
    overflow-wrap: anywhere;
  }

  .tode-home-intro > p {
    overflow-wrap: anywhere;
  }

  .tode-infobox-row {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
