/* Тематические страницы используют шапку, фотокадры и оформление глав главной. */
.guide p a {
  color: var(--dim); text-decoration: underline; text-underline-offset: 4px;
  text-decoration-color: #626266;
}
.guide p a:hover { color: var(--moonlight); }

.topic .cinema { min-height: clamp(340px,32vw,460px); }
.topic .cinema-copy { width: min(70%,780px); }
.topic h1 { margin-top: 0; }
.topic :is(h1, h2, h3) { overflow-wrap: anywhere; hyphens: auto; }
.topic .cinema .today { margin-bottom: 16px; }
.topic .guide-section { align-items: start; }
.topic .tool-tile { width: 100%; min-width: 0; }
.tool-section {
  display: grid; grid-template-columns: minmax(0,.8fr) minmax(0,1.2fr);
  grid-template-areas: "title widget" "help widget"; grid-template-rows: auto 1fr;
  column-gap: clamp(24px,5vw,80px); align-items: start;
}
.tool-section > header { grid-area: title; }
.tool-control { grid-area: widget; min-width: 0; }
.tool-help { grid-area: help; }

.phase-table { width: 100%; border-collapse: collapse; margin: 8px 0 16px; font-size: 14px; text-align: left; }
.phase-table caption { padding-bottom: 8px; text-align: left; color: var(--dim); }
.phase-table :is(th, td) { padding: 6px 3px; border-bottom: 1px solid var(--line); }
.phase-table tbody th { font-weight: 400; }
#moon-widget, .dream-note, .cycle-example {
  margin: 0; padding: clamp(20px,3vw,40px); border-radius: 25px;
  background: #181b1e; color: var(--moonlight);
}
.date-field { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.date-field label, .dream-note figcaption, .cycle-example figcaption { font-size: 15px; color: #cfced0; }
.date-field input {
  min-width: 0; max-width: 100%; min-height: 44px; padding: 5px 12px; border: 1px solid #62666b;
  border-radius: 10px; background: #101214; color: inherit; font: inherit;
}
#selected-phase { margin: 20px 0 28px; font-size: clamp(22px,2.4vw,34px); line-height: 1.2; letter-spacing: -.035em; }
#month-heading { font-size: 16px; font-weight: 550; }
#month-events { margin: 12px 0 0; padding: 0; list-style: none; }
#month-events li { display: grid; grid-template-columns: minmax(5.6em,auto) 1fr; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
#month-events time { color: var(--dim); font-variant-numeric: tabular-nums; }

.nav-overview { position: relative; }
.nav-overview summary { display: flex; align-items: center; gap: 7px; padding-block: 6px; white-space: nowrap; }
.nav-overview summary::after { content: ''; width: 7px; height: 7px; border: solid currentColor; border-width: 0 1px 1px 0; transform: translateY(-2px) rotate(45deg); }
.nav-overview[open] summary::after { transform: translateY(2px) rotate(225deg); }
.nav-overview-links {
  position: absolute; top: 100%; right: 0; min-width: 150px; padding: 6px;
  background: #19191b; border-radius: 20px; box-shadow: var(--sheet-content-shadow);
}
.nav-links .nav-overview-links a { display: block; margin: 0; padding: 9px 12px; }
.nav-links a[aria-current=page], .nav-overview summary:hover { color: var(--moonlight); }
.feature-story { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); align-items: start; gap: clamp(24px,4vw,64px); }
.story-notes { margin: 0; }
.story-notes dt { padding-top: 16px; border-top: 1px solid var(--line); font-weight: 600; }
.story-notes dd { margin: 6px 0 18px; color: var(--dim); }
.story-notes dd:last-child { margin-bottom: 0; }
.dream-note {
  background: linear-gradient(90deg,rgba(11,16,23,.94),rgba(11,16,23,.78)), url('/assets/cinema/journal-850.webp') center / cover;
}
.dream-note blockquote { margin: 22px 0 0; font-size: clamp(20px,2.1vw,30px); line-height: 1.36; letter-spacing: -.025em; }
.assistant-question { margin: clamp(20px,2.5vw,36px) 0 0; padding-inline-start: 18px; border-inline-start: 2px solid #7d9aac; }
.assistant-question blockquote { margin: 0; font-size: clamp(18px,1.6vw,24px); line-height: 1.45; }
.assistant-question figcaption { margin-top: 12px; color: var(--dim); font-size: 14px; }
.cycle-lengths { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; margin: 22px 0 0; }
.cycle-lengths dt { padding-top: 12px; border-top: 1px solid var(--line); color: var(--dim); font-size: 15px; }
.cycle-lengths dd { margin: 6px 0 0; font-size: clamp(34px,4vw,58px); line-height: 1.12; letter-spacing: -.04em; }
.cycle-lengths small { font-size: 16px; letter-spacing: 0; }

@media (max-width: 1080px) and (min-width: 769px) {
  .nav-topics .nav-in { grid-template-columns: auto minmax(0,1fr) auto; }
  .nav-topics .nav-links { gap: clamp(9px,1.5vw,17px); }
}
@media (min-width: 769px) and (max-width: 860px) {
  .nav-topics .nav-in { gap: 8px; padding-inline: 15px; }
  .nav-topics .nav-links { gap: 8px; }
}
@media (max-width: 768px) {
  .topic .cinema { min-height: 0; }
  .topic .cinema-copy { width: 100%; }
  .topic .cinema-still { height: clamp(100px,27vw,180px); }
  .topic .guide-section, .feature-story { grid-template-columns: minmax(0,1fr); }
  .tool-section {
    grid-template-columns: minmax(0,1fr); grid-template-areas: "title" "widget" "help";
    grid-template-rows: auto; row-gap: 20px;
  }
  .tool-help > p:first-child { margin-top: 0; }
  .nav-topics.is-open { max-height: calc(100dvh - 2 * var(--nav-inset-top)); overflow-y: auto; }
  .nav-topics.is-open .nav-in { grid-template-rows: auto auto auto; }
  .nav-overview { width: 100%; }
  .nav-overview summary { padding: 15px 0; color: var(--moonlight); font-size: 20px; }
  .nav-overview-links { position: static; min-width: 0; background: none; box-shadow: none; padding: 0 0 6px; }
  .nav-links .nav-overview-links a { padding: 8px 12px; font-size: 16px; }
}
