/* DANLEOGRA / dlgswiss.ch – R7 targeted visual polish (2026-11-05)
   Cosmetic only: article content, routes, canonicals, H tags and metadata stay unchanged.
   Designed to coexist with R6. Includes its related-card rules so R7 works if R6 was not installed. */

/* 1. Long gaming/friendship headlines currently use max-width:12ch, line-height:.92.
   Give editorial titles proper line height and a more useful reading measure. */
:is(main[data-game-guide], main[data-friendship-guide]) > .page-hero {
  padding-top: clamp(88px, 8vw, 122px);
  padding-bottom: clamp(34px, 4.5vw, 66px);
}
:is(main[data-game-guide], main[data-friendship-guide]) .page-hero-grid {
  align-items: center;
  grid-template-columns: minmax(0, 1.15fr) minmax(285px, .75fr);
  gap: clamp(22px, 3.3vw, 50px);
}
:is(main[data-game-guide], main[data-friendship-guide]) .page-hero h1 {
  max-width: 23ch;
  font-size: clamp(2.25rem, 4.15vw, 4.6rem);
  line-height: 1.075;
  letter-spacing: -.037em;
  overflow-wrap: break-word;
  hyphens: auto;
  text-wrap: balance;
}
:is(main[data-game-guide], main[data-friendship-guide]) .page-hero-copy > p {
  max-width: 66ch;
  line-height: 1.7;
}
:is(main[data-game-guide], main[data-friendship-guide]) .page-hero-panel {
  align-self: center;
}

/* 2. Original guide text is three narrow cards at desktop width; paragraphs become
   difficult to scan. Single-column reading panels keep a consistent line length. */
:is(main[data-game-guide], main[data-friendship-guide]) > .page-detail-section:not(.dlg-r4-related) .page-detail-grid {
  grid-template-columns: minmax(0, 1fr);
  max-width: 940px;
  gap: clamp(12px, 1.4vw, 18px);
  align-items: stretch;
}
:is(main[data-game-guide], main[data-friendship-guide]) > .page-detail-section:not(.dlg-r4-related) .page-detail-grid > p {
  box-sizing: border-box;
  max-width: none;
  width: 100%;
  padding: clamp(20px, 2.8vw, 34px);
  font-size: clamp(1rem, 1.13vw, 1.075rem);
  line-height: 1.8;
  overflow-wrap: break-word;
  border-radius: clamp(16px, 1.5vw, 22px);
}
:is(main[data-game-guide], main[data-friendship-guide]) > .page-detail-section:not(.dlg-r4-related) .page-detail-title {
  max-width: 25ch;
  line-height: 1.18;
  text-wrap: balance;
}

/* 3. Clearly separate the article's next-step navigation from the R4 discovery block. */
:is(main[data-game-guide], main[data-friendship-guide]) > .page-route-section {
  padding-bottom: clamp(14px, 2vw, 30px);
}
:is(main[data-game-guide], main[data-friendship-guide]) > .page-route-section .page-route-grid > a {
  min-width: 0;
  height: 100%;
}
:is(main[data-game-guide], main[data-friendship-guide]) > .page-route-section .page-route-grid strong {
  line-height: 1.45;
  overflow-wrap: break-word;
}
:is(main[data-game-guide], main[data-friendship-guide]) .project-links {
  margin-block: clamp(18px, 2vw, 26px);
  gap: 10px;
}
:is(main[data-game-guide], main[data-friendship-guide]) .project-links > a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid rgba(175,151,255,.24);
  border-radius: 12px;
  background: rgba(174,141,255,.07);
  color: #ece6ff;
  font-size: .92rem;
  line-height: 1.45;
  text-decoration: none;
  transition: background-color .15s ease, border-color .15s ease;
}
:is(main[data-game-guide], main[data-friendship-guide]) .project-links > a:hover {
  background: rgba(174,141,255,.15);
  border-color: rgba(175,151,255,.48);
}

/* 4. Mobile breadcrumbs should wrap rather than force a cramped grid or overflow. */
@media (max-width: 800px) {
  :is(main[data-game-guide], main[data-friendship-guide]) .page-hero-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  :is(main[data-game-guide], main[data-friendship-guide]) .page-hero h1 {
    font-size: clamp(2.05rem, 8vw, 3.6rem);
    line-height: 1.11;
    max-width: 25ch;
  }
  :is(main[data-game-guide], main[data-friendship-guide]) .subnav {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 8px;
  }
  :is(main[data-game-guide], main[data-friendship-guide]) .subnav > a {
    flex: 0 1 auto;
    min-width: 0;
    max-width: 100%;
    text-align: left;
    overflow-wrap: anywhere;
  }
  :is(main[data-game-guide], main[data-friendship-guide]) .page-hero-panel {
    width: 100%;
    max-width: none;
  }
}
@media (max-width: 520px) {
  :is(main[data-game-guide], main[data-friendship-guide]) > .page-hero {
    padding-top: 92px;
    padding-bottom: 28px;
  }
  :is(main[data-game-guide], main[data-friendship-guide]) .page-hero h1 {
    font-size: clamp(1.95rem, 8.2vw, 2.7rem);
    letter-spacing: -.027em;
  }
  :is(main[data-game-guide], main[data-friendship-guide]) .page-detail-grid > p {
    padding: 20px 18px;
  }
  :is(main[data-game-guide], main[data-friendship-guide]) .project-links > a {
    flex: 1 1 100%;
    width: 100%;
  }
}

/* 5. Home and public landing pages: a restrained, consistent typographic rhythm. */
body.home-page .section-head :is(h2,h3),
body.home-page .home-final-cta :is(h2,h3),
main > .page-hero .page-hero-copy h1 {
  text-wrap: balance;
  overflow-wrap: break-word;
}
body.home-page .section-head :is(h2,h3) { line-height: 1.14; }
body.home-page .newcomer-grid > *,
body.home-page .community-grid > *,
body.home-page .explore-pages .page-route-grid > * { min-width: 0; }
main > .page-hero .page-hero-copy > p { line-height: 1.7; }
main > .page-hero .page-hero-copy h1 { line-height: 1.08; }

/* 6. Every visible interactive item should have a clear keyboard focus. */
:is(main[data-game-guide], main[data-friendship-guide], body.home-page main, main .page-route-grid)
  a:focus-visible,
.site-header .main-nav a:focus-visible,
.site-header .nav-cta:focus-visible {
  outline: 3px solid #c2a9ff;
  outline-offset: 3px;
}

/* 7. R6 discovery-card visual baseline: include in R7 for safe standalone use. */
main > section.dlg-r4-related {
  box-sizing: border-box;
  width: min(1480px, calc(100% - 2 * clamp(14px, 4vw, 64px)));
  max-width: none;
  min-height: 0;
  margin: clamp(12px, 1.8vw, 24px) auto clamp(34px, 4.5vw, 72px);
  padding: clamp(24px, 3.2vw, 46px);
  border: 1px solid rgba(166,149,255,.20);
  border-radius: clamp(18px, 2vw, 26px);
  background: radial-gradient(ellipse at 100% 0%,rgba(116,79,219,.13),transparent 45%),linear-gradient(140deg,rgba(23,26,39,.96),rgba(11,14,23,.98));
  color: #eff2fb;
  box-shadow: 0 18px 52px rgba(0,0,0,.2);
  isolation: isolate;
}
main > section.dlg-r4-related::before {
  content:"MEHR ENTDECKEN";
  display:block;
  width:fit-content;
  margin:0 0 .8rem;
  font-size:.72rem;
  font-weight:700;
  line-height:1.4;
  letter-spacing:.16em;
  text-transform:uppercase;
  color:#b9a6ff;
}
main > section.dlg-r4-related > h4 {
  margin:0 0 .45rem;
  padding:0;
  max-width:27ch;
  color:#f8f8ff;
  font-size:clamp(1.5rem,2.5vw,2.2rem);
  font-weight:750;
  line-height:1.15;
  letter-spacing:-.025em;
  overflow-wrap:anywhere;
}
main > section.dlg-r4-related > p {
  margin:0 0 clamp(18px,2.4vw,30px);
  max-width:65ch;
  color:#b9c0d0;
  font-size:clamp(.95rem,1.15vw,1.06rem);
  line-height:1.65;
}
main > section.dlg-r4-related > ul {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:clamp(10px,1.05vw,14px);
  margin:0;
  padding:0;
  list-style:none;
}
main > section.dlg-r4-related > ul > li {
  display:block;
  min-width:0;
  margin:0;
  padding:0;
  list-style:none;
}
main > section.dlg-r4-related > ul > li::marker {content:""}
main > section.dlg-r4-related > ul > li > a {
  box-sizing:border-box;
  display:flex;
  align-items:center;
  gap:12px;
  width:100%;
  height:100%;
  min-height:68px;
  padding:14px 16px;
  margin:0;
  border:1px solid rgba(255,255,255,.105);
  border-radius:14px;
  background:rgba(255,255,255,.035);
  color:#e7eaf5;
  font-size:clamp(.9rem,1vw,.99rem);
  font-weight:600;
  line-height:1.45;
  text-decoration:none;
  overflow-wrap:anywhere;
  transition:background-color .15s ease,border-color .15s ease,box-shadow .15s ease,transform .15s ease;
}
main > section.dlg-r4-related > ul > li > a::before {
  content:"";
  flex:0 0 8px;
  width:8px;
  height:8px;
  border-radius:50%;
  background:#a78bfa;
  box-shadow:0 0 0 4px rgba(167,139,250,.10);
}
main > section.dlg-r4-related > ul > li > a::after {
  content:"↗";
  flex:0 0 auto;
  margin-left:auto;
  color:#bfaaff;
  font-size:1.13em;
  line-height:1;
}
main > section.dlg-r4-related > ul > li > a:hover {
  transform:translateY(-2px);
  border-color:rgba(174,146,255,.46);
  background:rgba(151,108,255,.12);
  box-shadow:0 10px 25px rgba(0,0,0,.19);
  color:#fff;
}
main > section.dlg-r4-related > ul > li > a:focus-visible {outline:3px solid #c2a9ff;outline-offset:3px;}
@media (min-width:1180px) {
  main > section.dlg-r4-related > ul {grid-template-columns:repeat(3,minmax(0,1fr));}
}
@media (max-width:680px) {
  main > section.dlg-r4-related {
    width:calc(100% - 28px);
    padding:22px 16px;
    border-radius:18px;
    margin-bottom:38px;
  }
  main > section.dlg-r4-related > ul {grid-template-columns:1fr;gap:9px;}
  main > section.dlg-r4-related > ul > li > a {min-height:58px;padding:13px 14px;}
}
@media (prefers-reduced-motion:reduce) {
  :is(main[data-game-guide],main[data-friendship-guide]) .project-links > a,
  main > section.dlg-r4-related > ul > li > a {transition:none;}
  main > section.dlg-r4-related > ul > li > a:hover {transform:none;}
}
