/* pages.css — вынесено из app.css (механический split, каскад сохранён) */
.control-panel .btn--ghost,
.hero .btn--ghost,
.site-footer .btn--ghost { color: var(--text); border-color: var(--line-strong); background: transparent; }

.control-panel .btn--ghost:hover,
.hero .btn--ghost:hover,
.site-footer .btn--ghost:hover { color: var(--gold); border-color: var(--gold); background: transparent; }

.hero { padding-block: clamp(3.5rem, 7vw, 6rem); position: relative; overflow: hidden; }

.hero::before {
  content: ""; position: absolute; inset: -20% -30% auto auto; width: 70rem; height: 70rem;
  background: var(--cosmos); opacity: 0.9; pointer-events: none;
}

.hero::after {
  content: ""; position: absolute; left: -14rem; bottom: -18rem; width: 42rem; height: 42rem;
  border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(169, 154, 245, 0.16) 0%, transparent 62%);
}

.hero__inner {
  position: relative; display: grid; grid-template-columns: repeat(12, 1fr); gap: 2.5rem; align-items: center;
}

.hero__inner > :first-child { grid-column: span 7; }

.hero__inner > .book-card { grid-column: span 5; }

@media (max-width: 960px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero__inner > :first-child, .hero__inner > .book-card { grid-column: auto; }
}

.eyebrow {
  display: inline-flex; align-items: center; gap: 0.7rem;
  font-size: var(--text-xs); letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--gold); font-weight: 700; margin: 0 0 1.1rem;
}

.eyebrow::before { content: ""; width: 2.4rem; height: 1px; background: var(--gold-line); }

.hero__title {
  font-family: var(--font-display); font-weight: 600;
  font-size: var(--text-3xl); line-height: 1.2; margin: 0 0 1.2rem;
  color: var(--text); letter-spacing: -0.015em;
}

.hero__title em { font-style: italic; color: var(--gold); }

.hero__sub { color: var(--text-soft); font-size: var(--text-lg); margin: 0; max-width: 34rem; line-height: 1.6; }

.hero__ctas { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 1.6rem; }

.hero__note { margin-top: 1.2rem; font-size: var(--text-sm); color: var(--muted); }

.method-badge {
  position: absolute; top: -0.6rem; right: 0; display: inline-flex; align-items: center; gap: 0.4rem;
  background: var(--gold-soft); border: 1px solid var(--gold-line); color: var(--gold);
  font-size: var(--text-xs); letter-spacing: 0.09em; text-transform: uppercase; font-weight: 700;
  border-radius: var(--radius-pill); padding: 0.25rem 0.85rem;
}

.method-badge__dot { width: 0.45rem; height: 0.45rem; border-radius: 50%; background: var(--gold); box-shadow: 0 0 8px rgba(198, 167, 106, 0.8); }

.cards-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }

@media (max-width: 960px) { .cards-3 { grid-template-columns: 1fr; } }

.method-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 2.5rem; }

.method-grid > aside { grid-column: span 5; }

.method-grid > div:last-child { grid-column: span 7; }

@media (max-width: 960px) {
  .method-grid { grid-template-columns: 1fr; }
  .method-grid > aside, .method-grid > div:last-child { grid-column: auto; }
}

.author-card {
  background: var(--grad-card); border: 1px solid var(--gold-line); border-radius: var(--radius);
  padding: 1.5rem; box-shadow: var(--shadow-soft), var(--glow-gold);
}

.author-card__photo { width: 100%; height: 15rem; object-fit: cover; object-position: center top; border-radius: var(--radius-sm); margin-bottom: 1rem; border: 1px solid var(--line); }

.author-card__credit { font-size: var(--text-xs); color: var(--muted); margin: -0.4rem 0 1rem; }

.author-card h3 { font-family: var(--font-display); margin: 0 0 0.35rem; font-size: 1.6rem; font-weight: 600; }

.author-card p { color: var(--text-soft); margin: 0 0 0.9rem; }

.author-card dl { display: grid; grid-template-columns: auto 1fr; gap: 0.4rem 1.1rem; margin: 0; font-size: var(--text-sm); }

.author-card p.author-card__links { margin: 1rem 0 0; }

.author-card__ad-note { font-size: var(--text-2xs); color: var(--muted); margin: 0.4rem 0 0.8rem; font-style: italic; }

.author-card__social { margin: 0.9rem 0 0.6rem; border-top: 1px solid var(--line); padding-top: 0.8rem; }

.author-card__social-title { font-size: var(--text-xs); font-weight: 700; color: var(--gold); margin: 0 0 0.4rem; letter-spacing: 0.06em; text-transform: uppercase; }

.author-card__social-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.3rem; font-size: var(--text-sm); }

.author-card__social-list a { color: var(--text-soft); text-decoration: none; border-bottom: 1px dashed var(--gold-line); }

.author-card__social-list a:hover { color: var(--gold); border-bottom-color: var(--gold); }

.author-card__id { font-size: var(--text-xs); color: var(--muted); margin: 0.8rem 0 0; }

.author-card dt { color: var(--gold); font-weight: 700; }

.author-card dd { margin: 0; color: var(--text-soft); }

.notice {
  border: 1px solid var(--gold-line); background: var(--gold-soft);
  border-radius: var(--radius-sm); padding: 0.9rem 1.1rem; color: var(--text); font-size: var(--text-sm);
}

.notice--callout { display: flex; gap: 0.7rem; align-items: flex-start; }

.notice__icon { flex: 0 0 auto; color: var(--gold); display: inline-flex; margin-top: 0.1rem; }

.editors-note { font-size: var(--text-xs); color: var(--muted); margin-top: 0.9rem; }

.method-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.75rem; }

.method-list li {
  position: relative;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 1rem 1.25rem; display: grid; grid-template-columns: auto 1fr; gap: 0.9rem; align-items: start;
}

.method-list li:not(:last-child)::after {
  content: ""; position: absolute; left: 2.3rem; bottom: -0.75rem; height: 0.75rem;
  border-left: 1px dashed var(--gold-line); pointer-events: none;
}

.method-list b {
  display: inline-flex; align-items: baseline; margin-right: 0.5rem;
  color: var(--gold); font-family: var(--font-display); font-weight: 600; font-size: 1.35rem; line-height: 1;
}

.method-list span { color: var(--text-soft); }

.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }

@media (max-width: 960px) { .plans { grid-template-columns: 1fr; } }

.plan {
  display: flex; flex-direction: column; gap: 0.8rem; position: relative;
  background: var(--grad-card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.5rem; box-shadow: var(--shadow-soft);
}

.plan--free { border-color: var(--line-strong); }

.plan--pro { border-color: var(--lavender-line); box-shadow: var(--shadow-soft), var(--glow-lavender); }

.plan--business { border-color: var(--gold-line); box-shadow: var(--shadow-soft), var(--glow-gold); }

.plan__badge {
  align-self: flex-start; font-size: var(--text-2xs); letter-spacing: 0.22em; text-transform: uppercase; font-weight: 800;
  border-radius: var(--radius-pill); padding: 0.28rem 0.75rem; border: 1px solid var(--line-strong); color: var(--muted);
}

.plan__badge--live { background: var(--gold-soft); border-color: var(--gold-line); color: var(--gold); }

.plan__badge--soon { background: var(--lavender-soft); border-color: var(--lavender-line); color: var(--lavender); }

.plan__badge--dev { background: transparent; border-color: var(--line-strong); color: var(--muted); border-style: dashed; }

.plan__name { font-family: var(--font-display); font-size: 1.5rem; margin: 0; font-weight: 600; }

.plan__price { font-family: var(--font-display); font-size: 2.25rem; font-weight: 600; margin: 0; color: var(--text); }

.plan__price small { font-size: var(--text-sm); color: var(--muted); font-family: var(--font-body); font-weight: 400; }

.plan ul { margin: 0; padding-left: 1.1rem; color: var(--text-soft); }

.plan li { margin-bottom: 0.35rem; }

.plan__note { margin: 0.75rem 0 0; font-size: var(--text-sm); color: var(--muted); border-top: 1px solid var(--line); padding-top: 0.75rem; }

.plan__status { margin: 0; font-size: var(--text-xs); color: var(--text-soft); font-weight: 600; }

.plan__cta { margin-top: auto; }

.plan__icon {
  display: inline-grid; place-items: center; width: 3rem; height: 3rem; border-radius: 0.9rem;
  border: 1px solid var(--line-strong); color: var(--gold); background: var(--surface-2);
}

.plan--pro .plan__icon { color: var(--lavender); border-color: var(--lavender-line); background: var(--lavender-soft); }

.plan--business .plan__icon { color: var(--gold); border-color: var(--gold-line); background: var(--gold-soft); }

.notify { margin-top: 2rem; }

.notify label { display: block; font-weight: 600; margin-bottom: 0.5rem; }

.notify__row { display: flex; gap: 1rem; flex-wrap: wrap; }

.notify input[type="email"] {
  flex: 1 1 16rem; padding: 0.7rem 0.9rem; border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); font-size: var(--text-md);
  min-height: 2.75rem;
}

.notify input[type="email"]::placeholder { color: var(--muted); }

.notify input[type="email"][aria-invalid="true"] { border-color: var(--error); }

.field-error { color: var(--error); font-size: var(--text-sm); margin: 0.45rem 0 0; }

.notify__hint { font-size: var(--text-xs); color: var(--muted); margin-top: 0.6rem; }

.calc-layout {
  display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 2rem;
  align-items: start; padding-block: var(--section-pad);
}

@media (max-width: 960px) { .calc-layout { grid-template-columns: 1fr; } }

.calc-title { margin-bottom: 0.3rem; }

.calc-lede { margin-bottom: 1.5rem; }

.calc-aside { display: flex; flex-direction: column; gap: 1rem; }

.calc-aside .note {
  border-left: 3px solid var(--gold); background: var(--gold-soft); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 0.8rem 1rem; font-size: var(--text-sm); color: var(--text-soft);
}

.calc-aside h2 { font-family: var(--font-display); font-size: 1.4rem; margin: 0; font-weight: 600; }

.calc-aside ul { color: var(--text-soft); margin: 0; padding-left: 1.1rem; }

.calc-aside li { margin-bottom: 0.35rem; }

.privacy { font-size: var(--text-xs); color: var(--muted); }

.calc-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; align-items: center; }

.report-layout {
  display: grid; grid-template-columns: 20.5rem 1fr; gap: 2rem;
  align-items: start; padding-block: var(--section-pad);
}

@media (max-width: 1024px) { .report-layout { grid-template-columns: 1fr; } }

.control-panel {
  position: sticky; top: calc(var(--header-h) + 1rem);
  display: flex; flex-direction: column;
  background: var(--grad-card); border: 1px solid var(--glass-border);
  border-radius: var(--radius); padding: 1.1rem 1.25rem; box-shadow: var(--shadow-soft);
  max-height: calc(100vh - var(--header-h) - 2rem);
}

.control-panel__head {
  display: flex; align-items: center; justify-content: space-between; gap: 0.5rem;
  padding-bottom: 0.75rem; border-bottom: 1px solid var(--line);
}

.control-panel__toggle { flex: 0 0 auto; transition: transform var(--speed-fast) var(--ease), border-color var(--speed) var(--ease), color var(--speed) var(--ease); }

.control-panel__toggle svg { transition: transform var(--speed-fast) var(--ease); }

.control-panel__body {
  display: flex; flex-direction: column; gap: 1.1rem;
  overflow-y: auto; padding-top: 0.9rem; padding-right: 0.25rem;
  scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent;
  min-height: 0;
}

.control-panel__body::-webkit-scrollbar { width: 6px; }

.control-panel__body::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 999px; }

.control-panel__body::-webkit-scrollbar-track { background: transparent; }

.control-panel--collapsed .control-panel__body { display: none; }

.control-panel--collapsed .control-panel__head { padding-bottom: 0; border-bottom: none; }

.control-panel--collapsed .control-panel__toggle svg { transform: rotate(-90deg); }

.control-stack {
  grid-column: 1; align-self: start;
  position: sticky; top: calc(var(--header-h) + 1rem);
  display: flex; flex-direction: column; gap: 1rem;
  max-height: calc(100vh - var(--header-h) - 2rem);
  overflow-y: auto;
}
.control-panel--link { margin-top: 0; }
.control-panel { position: static; max-height: none; }

.control-panel__head--link { text-decoration: none; color: inherit; }
.control-panel__head--link:hover .panel-title { color: var(--text); }
.control-panel__head--link:focus-visible { outline: var(--focus-ring); outline-offset: 2px; border-radius: var(--radius-sm); }

@media (max-width: 1024px) { .control-panel { position: static; order: -1; } }

.panel-title { font-size: var(--text-2xs); letter-spacing: 0.28em; text-transform: uppercase; color: var(--gold); font-weight: 800; margin: 0; }

.control-group { display: flex; flex-direction: column; gap: 0.8rem; padding-bottom: 0.9rem; border-bottom: 1px solid var(--line); }
.control-group:last-child { border-bottom: none; padding-bottom: 0; }
.control-group__title { margin: 0; font-size: var(--text-2xs); font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.control-group--details { gap: 0; }
.control-group__summary {
  list-style: none; cursor: pointer; user-select: none;
  font-size: var(--text-sm); font-weight: 700; color: var(--text-soft);
  padding: 0.15rem 0; display: flex; align-items: center; justify-content: space-between; gap: 0.5rem;
}
.control-group__summary::-webkit-details-marker { display: none; }
.control-group__summary::after {
  content: ""; width: 0.45rem; height: 0.45rem; flex: 0 0 auto;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: rotate(45deg) translateY(-2px); transition: transform var(--speed-fast) var(--ease), border-color var(--speed-fast) var(--ease);
}
.control-group--details[open] .control-group__summary { color: var(--gold); margin-bottom: 0.7rem; }
.control-group--details[open] .control-group__summary::after { transform: rotate(-135deg) translateY(-1px); border-color: var(--gold); }
.control-group__body { display: flex; flex-direction: column; gap: 0.9rem; }

.control-group--pulse,
.control-group--pulse:last-child {
  border: 1px solid var(--gold-line);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.75rem 0.75rem;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--gold-soft) 70%, transparent), transparent 55%),
    var(--surface);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--gold-line) 35%, transparent);
}
.control-group--pulse .control-group__summary {
  color: var(--text);
  padding: 0.1rem 0;
  position: relative;
}
.control-group--pulse .control-group__summary-label { font-weight: 800; letter-spacing: 0.01em; }
.control-group--pulse .control-group__summary-badge {
  margin-left: auto; margin-right: 0.35rem;
  color: var(--gold); font-size: 0.8rem; line-height: 1;
  filter: drop-shadow(0 0 6px color-mix(in srgb, var(--gold) 45%, transparent));
  animation: control-pulse-star 2.4s ease-in-out infinite;
}
.control-group--pulse:not([open]) {
  background-size: 180% 180%;
  animation: control-pulse-glow 2.2s ease-in-out infinite, control-pulse-sheen 3.2s linear infinite;
}
.control-group--pulse:not([open]) .control-group__summary::after { border-color: var(--gold); }
.control-group--pulse[open] { animation: none; background-size: auto; }
.control-group--pulse[open] .control-group__summary-badge { animation: none; opacity: 0.75; }

@keyframes control-pulse-glow {
  0%, 100% {
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--gold-line) 45%, transparent), 0 0 0 rgba(198, 167, 106, 0);
    border-color: color-mix(in srgb, var(--gold) 45%, var(--gold-line));
  }
  50% {
    box-shadow:
      0 0 0 1px color-mix(in srgb, var(--gold) 65%, transparent),
      0 0 24px color-mix(in srgb, var(--gold) 28%, transparent),
      0 0 48px color-mix(in srgb, var(--gold) 12%, transparent);
    border-color: var(--gold);
  }
}
@keyframes control-pulse-sheen {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
@keyframes control-pulse-star {
  0%, 100% { opacity: 0.5; transform: scale(1); filter: drop-shadow(0 0 4px color-mix(in srgb, var(--gold) 30%, transparent)); }
  50% { opacity: 1; transform: scale(1.28); filter: drop-shadow(0 0 10px color-mix(in srgb, var(--gold) 65%, transparent)); }
}

@media (prefers-reduced-motion: reduce) {
  .control-group--pulse:not([open]),
  .control-group--pulse .control-group__summary-badge { animation: none; }
  .control-group--pulse:not([open]) { background-size: auto; }
}

.control-row { display: flex; flex-direction: column; gap: 0.45rem; }

.control-row--checkbox .checkbox { color: var(--text-soft); }

.control-label { font-size: var(--text-sm); font-weight: 600; color: var(--text-soft); }

.control-hint { margin: 0.35rem 0 0; font-size: var(--text-xs); color: var(--muted); }

.control-hint-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }

.control-panel__year { margin: 0.2rem 0 0; font-size: var(--text-sm); font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
h2.control-group__title { font-family: inherit; line-height: 1.4; }

.year-stepper { display: flex; align-items: stretch; gap: 0.4rem; }
.year-stepper .icon-button { width: 2.75rem; height: auto; min-height: 2.75rem; font-size: 1.4rem; line-height: 1; }
.year-stepper .icon-button:disabled { opacity: 0.35; cursor: default; box-shadow: none; }
.year-stepper__input { flex: 1; min-width: 0; text-align: center; font-size: var(--text-md); font-weight: 700; font-variant-numeric: tabular-nums; appearance: textfield; -moz-appearance: textfield; }
.year-stepper__input::-webkit-outer-spin-button, .year-stepper__input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.year-stepper__input[aria-invalid="true"] { border-color: var(--error); }

.control-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.control-actions > * { flex: 1 1 auto; justify-content: center; }
.control-error { margin: 0; font-size: var(--text-sm); color: var(--error); }
.control-notice { margin: 0; font-size: var(--text-sm); color: var(--gold); font-weight: 600; }
.control-error:empty, .control-notice:empty, .panel-status:empty, #favorites-hint:empty { position: absolute; }
.control-link { align-self: flex-start; display: inline-flex; font-size: var(--text-sm); }
.control-panel .checkbox, .control-panel .control-group__summary, .control-link { min-height: 2.75rem; align-items: center; }

.month-readout { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.4rem; margin: 0; }
.month-readout div { display: flex; flex-direction: column-reverse; align-items: center; padding: 0.45rem 0.2rem; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.month-readout dt { font-size: 0.6875rem; color: var(--muted); }
.month-readout dd { margin: 0; font-size: 1.25rem; font-weight: 700; color: var(--gold); font-variant-numeric: tabular-nums; }

.control-row--actions { flex-direction: row; flex-wrap: wrap; gap: 0.5rem; }

.panel-status { font-size: var(--text-xs); color: var(--muted); margin: 0; }

.panel-note { font-size: var(--text-xs); color: var(--gold); opacity: 0.9; margin: 0; border-top: 1px dashed var(--line-strong); padding-top: 0.7rem; }

.report-body { display: flex; flex-direction: column; gap: 2.2rem; min-width: 0; }

.report-head { padding-block: 0.5rem; border-bottom: 1px solid var(--line); padding-bottom: 1.4rem; text-align: center; }

.report-meta { display: flex; flex-wrap: wrap; gap: 0.5rem 0.75rem; align-items: center; justify-content: center; margin-bottom: 0.9rem; }

.report-id { font-family: var(--font-num); font-size: var(--text-xs); color: var(--muted); letter-spacing: 0.06em; }

.method-pill { background: var(--grad-gold); color: #241a02; font-weight: 800; font-size: var(--text-2xs); letter-spacing: 0.18em; text-transform: uppercase; border-radius: var(--radius-pill); padding: 0.35rem 0.9rem; }

.method-pill--gold { border: none !important; color: #241a02 !important; }

.report-head h1 { font-family: var(--font-display); font-size: clamp(1.7rem, 3vw, 2.35rem); margin: 0 0 0.6rem; letter-spacing: -0.015em; }

.report-block { content-visibility: auto; contain-intrinsic-size: 1px 600px; }
.report-block__title { font-family: var(--font-display); font-size: clamp(1.4rem, 2.4vw, 1.95rem); margin: 0 0 0.9rem; letter-spacing: -0.01em; font-weight: 600; }

.report-block--collapsible .report-block__title { margin-bottom: 0; }
.report-block__toggle {
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
  width: 100%; padding: 0; margin: 0; border: 0; background: transparent; color: inherit;
  font: inherit; text-align: left; cursor: pointer;
}
.report-block__toggle:hover { color: var(--gold-bright); }
.report-block__toggle:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; border-radius: var(--radius-sm); }
.report-block__toggle-icon {
  flex: 0 0 1.75rem; width: 1.75rem; height: 1.75rem; border-radius: 999px;
  border: 1px solid var(--line-strong); color: var(--muted);
  display: inline-flex; align-items: center; justify-content: center;
  transition: transform var(--speed-fast) var(--ease), color var(--speed-fast) var(--ease), border-color var(--speed-fast) var(--ease), background var(--speed-fast) var(--ease);
}
.report-block__toggle-icon::before { content: ""; width: 0.45rem; height: 0.45rem; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-1px); transition: transform var(--speed-fast) var(--ease); }
.report-block--collapsible .report-block__toggle:hover .report-block__toggle-icon { color: var(--gold); border-color: var(--gold-line); background: var(--gold-soft); }
.report-block__body { margin-top: 0.9rem; }
.report-block--collapsed .report-block__body { display: none; }
.report-block--collapsed .report-block__toggle-icon::before { transform: rotate(-45deg) translateX(-1px); }
.report-block--collapsed .report-block__title { margin-bottom: 0; }

.report-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; justify-content: center; align-items: center; margin-top: 0.7rem; }

.report-footer { border-top: 1px solid var(--line); padding-top: 1.2rem; font-size: var(--text-sm); color: var(--muted); }

.report-footer p { margin: 0 0 0.5rem; }

.report-disclaimer { font-size: var(--text-xs); }

.report-body.no-chart-labels .chart-label { display: none; }

.report-body.no-chart-grid .chart-grid-line { opacity: 0.15; }


.index-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.65rem; padding-bottom: 1rem; }

@media (max-width: 1024px) { .index-grid { grid-template-columns: repeat(3, 1fr); } }

@media (max-width: 640px) { .index-grid { grid-template-columns: repeat(2, 1fr); } }

@media (max-width: 420px) { .index-grid { grid-template-columns: 1fr; } }

.index-card {
  position: relative; text-align: left; cursor: pointer; min-height: 6.5rem;
  display: flex; flex-direction: column; justify-content: space-between; gap: 0.3rem;
  padding: 0.65rem 0.75rem; border-radius: var(--radius);
  border: 1px solid var(--line); background: var(--surface);
  font: inherit; color: inherit; transition: border-color var(--speed) var(--ease), box-shadow var(--speed) var(--ease), transform var(--speed) var(--ease);
}

.index-card:hover { border-color: var(--gold-line); box-shadow: var(--glow-gold); transform: translateY(-2px); }

.index-card:focus-visible { outline: var(--focus-ring); }

.index-card[aria-expanded="true"] { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold), var(--glow-gold); }

.index-card--master { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold), var(--glow-gold); }

.index-card__name { font-size: 0.62rem; line-height: 1.3; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; margin: 0; padding-right: 1.1rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.index-card__value { font-family: var(--font-display); font-size: 2rem; line-height: 1; margin: 0; color: var(--gold); font-weight: 600; font-variant-numeric: tabular-nums; }

.index-card--master .index-card__value { color: var(--gold-bright); }

.index-card__master-tag { font-size: 0.56rem; color: var(--gold); font-weight: 800; text-transform: uppercase; letter-spacing: 0.12em; font-family: var(--font-body); }

.index-card__hint { position: absolute; top: 0.45rem; right: 0.45rem; font-size: 0.64rem; font-weight: 800; color: var(--muted); border: 1px solid var(--line-strong); border-radius: 999px; width: 1.1rem; height: 1.1rem; display: inline-flex; align-items: center; justify-content: center; font-family: var(--font-body); }

.index-card[aria-expanded="true"] .index-card__hint { color: var(--gold); border-color: var(--gold); }

.index-card--absent { border-style: dashed; background: transparent; box-shadow: none; opacity: 0.7; }

.fqr-cell { font: inherit; color: inherit; cursor: pointer; border: 1px solid var(--line); border-radius: var(--radius-sm); text-align: center; padding: 0.35rem 0.2rem 0.4rem; background: var(--surface); transition: border-color var(--speed) var(--ease), box-shadow var(--speed) var(--ease); }

.fqr-grid--iov .fqr-cell { border-style: dashed; border-color: var(--gold-line); }

.fqr-grid--iov .fqr-cell b { color: var(--gold); }

.fqr-cell:hover { border-color: var(--gold-line); }

.fqr-cell:focus-visible { outline: var(--focus-ring); }

.fqr-cell[aria-expanded="true"] { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold); }

.fqr-cell b { display: block; font-family: var(--font-display); font-size: 1.2rem; color: var(--gold); font-weight: 600; }

.fqr-cell span { font-size: 0.56rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.07em; }

.fqr-cell--master { border-color: var(--gold); background: var(--gold-soft); }

.fqr-cell--peak { border-color: var(--lavender); background: var(--lavender-soft); }

.fqr-cell--focus { border-color: var(--lavender); box-shadow: 0 0 0 2px var(--lavender); }

.karma-grid .index-card { min-height: 0; overflow-wrap: anywhere; }

.karma-trace {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 0.9rem 1.1rem; margin-bottom: 1rem;
}

.karma-trace__block + .karma-trace__block { border-top: 1px dashed var(--line-strong); padding-top: 0.55rem; margin-top: 0.55rem; }

.karma-trace__label { font-size: var(--text-2xs); font-weight: 800; text-transform: uppercase; letter-spacing: 0.12em; color: var(--lavender); margin: 0 0 0.25rem; }

.karma-trace ul { list-style: none; margin: 0; padding: 0; font-family: var(--font-num); font-size: var(--text-xs); color: var(--muted); }

.karma-trace li { padding: 0.08rem 0; }

.karma-trace__absent { font-size: var(--text-xs); color: var(--muted); font-style: italic; margin: 0.2rem 0 0; }

.karma-periods { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0.25rem 0 0.5rem; }

.karma-period { width: 1.9rem; height: 1.9rem; display: flex; align-items: center; justify-content: center; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); font-size: var(--text-xs); font-weight: 700; background: var(--surface); color: var(--text-soft); }

.karma-period--neg { background: var(--error-soft); border-color: var(--error); color: var(--error); opacity: 0.85; }

.karma-period--current { outline: 2px solid var(--gold); outline-offset: 1px; box-shadow: var(--glow-gold); }

.charts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

@media (max-width: 960px) { .charts-grid { grid-template-columns: 1fr; } }

.chart-card { background: var(--grad-card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; box-shadow: var(--shadow-soft); margin: 0; content-visibility: auto; contain-intrinsic-size: 240px 260px; }

.chart-svg { width: 100%; max-width: 620px; height: auto; display: block; margin-inline: auto; }

.chart-card--donut .chart-svg { max-width: 240px; }

.chart-caption { font-size: var(--text-xs); color: var(--muted); margin-top: 0.6rem; line-height: 1.55; }

.chart-caption b { color: var(--text-soft); }

.chart-caption--inline { margin-top: 0.4rem; }

.chart-caption--tight { margin: 0.25rem 0 0; }

.explain-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 0.75rem; }

.explain-card { padding: 0.9rem 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); }

.explain-card h3 { margin: 0 0 0.4rem; font-size: var(--text-sm); font-weight: 700; color: var(--text); display: flex; align-items: baseline; justify-content: space-between; gap: 0.5rem; }

.explain-card p { margin: 0.35rem 0 0; font-size: var(--text-xs); line-height: 1.55; color: var(--muted); }

.explain-card__value { font-family: var(--font-num); font-size: var(--text-lg); font-weight: 800; color: var(--gold); }

.explain-card__meta { font-size: var(--text-2xs) !important; text-transform: uppercase; letter-spacing: 0.06em; }

.explain-card__action { border-top: 1px dashed var(--line); padding-top: 0.45rem; margin-top: 0.6rem !important; }

@media (max-width: 600px) { .explain-grid { grid-template-columns: 1fr; } }

.index-card__meaning { font-size: var(--text-xs); color: var(--muted); line-height: 1.4; margin-top: 0.35rem; }

.bars-wrap { background: var(--grad-card); border: 1px solid var(--line); border-radius: var(--radius); padding: 0.8rem; margin: 1rem 0; overflow-x: auto; }

.year-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.8rem; }

@media (max-width: 640px) { .year-cards { grid-template-columns: 1fr; } }

.year-card { text-align: center; padding: 1rem 0.6rem; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); }

.year-card--current { border-color: var(--gold-line); box-shadow: var(--glow-gold); }

.trace-block { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 0.55rem 0.8rem; margin-bottom: 0.5rem; background: var(--surface); }

.trace-block__summary { cursor: pointer; font-weight: 600; }

.trace-block__source { font-size: var(--text-xs); color: var(--muted); margin: 0.35rem 0 0; }

.trace-inline { font-family: var(--font-num); font-size: var(--text-xs); color: var(--muted); margin: 0.25rem 0 0; }

.month-vibrations { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; margin-top: 0.75rem; }

.month-vibration { border-left: 3px solid var(--gold); padding: 0.4rem 0.6rem; background: var(--surface); border-radius: var(--radius-sm); }

.month-vibration--focus { border-left-width: 5px; background: var(--gold-soft); box-shadow: 0 0 0 2px var(--lavender-line); }

.month-vibration__head { margin: 0 0 0.15rem; font-size: var(--text-sm); }

.month-vibration__value { font-weight: 800; font-size: var(--text-md); font-variant-numeric: tabular-nums; }

.month-vibration__value--master { color: var(--gold); }

.month-vibration__text { margin: 0; font-size: var(--text-xs); color: var(--muted); line-height: 1.4; }

.month-card__title { margin: 0; font-size: var(--text-md); }

.month-card__part { border-top: 1px solid var(--line); margin-top: 0.5rem; padding-top: 0.5rem; }

.question-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.6rem; }

.question-chip {
  display: inline-flex; align-items: center; border: 1px solid var(--line-strong); border-radius: var(--radius-pill);
  color: var(--text-soft); font-size: var(--text-xs); font-weight: 600; text-decoration: none;
  padding: 0.3rem 0.8rem; transition: border-color var(--speed-fast) var(--ease), color var(--speed-fast) var(--ease);
}

.question-chip:hover { border-color: var(--gold); color: var(--gold); }

.question-chip--active { border-color: var(--gold); background: var(--gold-soft); color: var(--gold); font-weight: 700; }

.topic-verdict {
  font-family: var(--font-display); font-size: clamp(1.45rem, 3.4vw, 2.5rem); line-height: 1.15; margin: 0; font-weight: 600;
  background: var(--grad-gold); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}

.topic-months { display: grid; grid-template-columns: repeat(6, 1fr); gap: 0.5rem; }

@media (max-width: 960px) { .topic-months { grid-template-columns: repeat(4, 1fr); } }

@media (max-width: 640px) { .topic-months { grid-template-columns: repeat(3, 1fr); } }

.topic-month { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 0.5rem; text-align: center; background: var(--surface); }

.topic-month__name { display: block; font-size: 0.62rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.07em; }

.topic-month__value { display: block; font-family: var(--font-display); font-size: 1.55rem; line-height: 1.1; margin: 0.15rem 0; color: var(--gold); font-variant-numeric: tabular-nums; }

.topic-month__fqr { font-size: 0.8rem; color: var(--muted); }

.topic-month__tag { display: block; font-size: 0.58rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }

.topic-month--master { border-color: var(--gold-line); }

.topic-month--theme { border: 1.5px solid var(--gold); background: var(--gold-soft); }

.topic-month--theme .topic-month__tag { color: var(--gold); font-weight: 800; }

.topic-month--best { outline: 2px dashed var(--gold); outline-offset: 2px; }

.topic-secondary { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }

@media (max-width: 640px) { .topic-secondary { grid-template-columns: 1fr; } }

.topic-secondary__item { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 0.75rem 0.9rem; background: var(--surface); }

.topic-secondary__value { margin: 0 0 0.25rem; font-size: var(--text-sm); font-variant-numeric: tabular-nums; }

.topic-secondary__gloss { margin: 0; font-size: var(--text-xs); color: var(--muted); }

.topic-best { display: flex; flex-direction: column; gap: 0.5rem; }

.topic-best__item { display: grid; grid-template-columns: 1.6rem 1fr; gap: 0.75rem; padding: 0.5rem 0.75rem; border-left: 3px solid var(--lavender); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.topic-best__item--theme { border-left-color: var(--gold); box-shadow: inset 0 0 0 1px rgba(198, 167, 106, 0.25); }

.topic-best__rank { font-family: var(--font-display); font-size: 1.4rem; color: var(--lavender); margin: 0; line-height: 1; font-weight: 600; }

.topic-best__head { margin: 0 0 0.2rem; font-size: var(--text-sm); }

.topic-best__head span { color: var(--muted); font-size: var(--text-xs); }

.topic-best__text { margin: 0; font-size: var(--text-xs); color: var(--text-soft); }

.question-answer__note { font-size: var(--text-xs); color: var(--muted); margin-top: 0.75rem; }

.question-answer__deep { border-left: 3px solid var(--gold); padding-left: 0.75rem; margin-top: 0.2rem; }

.report-body .report-block__title { scroll-margin-top: 6.5rem; }

.fab-stack {
  position: fixed; right: 1rem; bottom: 1rem; z-index: 30;
  display: flex; flex-direction: column; gap: 0.5rem;
}

.fab {
  width: 3rem; height: 3rem; border-radius: 999px; border: 1px solid var(--gold-line);
  background: var(--surface-2); color: var(--text-soft); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  text-decoration: none; box-shadow: var(--shadow-soft);
  transition: transform var(--speed-fast) var(--ease), color var(--speed-fast) var(--ease), box-shadow var(--speed-fast) var(--ease);
  opacity: 0.95;
}

.fab:hover { transform: translateY(-2px); opacity: 1; color: var(--gold); box-shadow: var(--glow-gold); }

.fab:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

.fab--labeled { width: auto; padding: 0 1rem; border-radius: var(--radius-pill); }

.fab__label { font-size: var(--text-xs); font-weight: 800; letter-spacing: 0.05em; color: var(--gold); white-space: nowrap; }

@media (max-width: 480px) { .fab__label { display: none; } .fab--labeled { width: 3rem; padding: 0; justify-content: center; } }

@media print { .fab-stack, .section-nav, .control-panel { display: none !important; } }

.cabinet { padding-block: calc(var(--section-pad) * 0.55); display: flex; flex-direction: column; gap: 1.25rem; }

.cabinet-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1.5rem; flex-wrap: wrap; }

.cabinet-head__side { display: flex; gap: 0.6rem; align-items: center; flex-wrap: wrap; justify-content: flex-end; row-gap: 0.4rem; }

.logout-form { margin: 0; }

.cabinet-total { color: var(--muted); margin: 0; }

.cabinet-total b { color: var(--gold); }

.cabinet-filters { display: flex; gap: 0.6rem; flex-wrap: wrap; align-items: center; }

.cabinet-search { flex: 1 1 16rem; padding: 0.7rem 0.9rem; border-radius: var(--radius-sm); border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); font-size: var(--text-md); }

.cabinet-select { display: flex; align-items: center; gap: 0.4rem; font-size: var(--text-sm); color: var(--muted); }

.cabinet-select select { padding: 0.5rem 0.6rem; border-radius: var(--radius-sm); border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); }

.bulk-bar { display: flex; align-items: center; gap: 0.75rem; background: var(--lavender-soft); border: 1px solid var(--lavender-line); border-radius: var(--radius-sm); padding: 0.5rem 0.9rem; font-size: var(--text-sm); }

.bulk-bar[hidden] { display: none; }

.report-rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.6rem; }

.report-row {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 0.8rem;
  background: var(--grad-card); border: 1px solid var(--line); border-radius: var(--radius); padding: 0.85rem 1rem;
}

.report-row[draggable="true"] { cursor: grab; }

.report-row.dragging { opacity: 0.4; border-style: dashed; transform: scale(0.99); }

.report-row.leaving { opacity: 0; transform: translateX(2rem); }

.drag-handle { color: var(--line-strong); letter-spacing: 0.15em; user-select: none; }

.row-checkbox { width: 1.15rem; height: 1.15rem; accent-color: var(--gold); }

.row-main { min-width: 0; }

.row-title {
  display: block; width: 100%; text-align: left; background: none; border: none; padding: 0; cursor: pointer;
  font: inherit; font-weight: 700; color: var(--text); font-size: var(--text-md);
}

.row-title:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }

.row-rename-input { width: 100%; padding: 0.4rem 0.6rem; border: 1px solid var(--lavender); border-radius: var(--radius-sm); font-size: var(--text-md); margin-bottom: 0.2rem; background: var(--surface); color: var(--text); }

.row-meta { display: flex; gap: 0.45rem; flex-wrap: wrap; margin: 0; color: var(--muted); font-size: var(--text-sm); }

.row-actions { display: flex; gap: 0.4rem; flex-wrap: wrap; }

@media (max-width: 720px) {
  .report-row { grid-template-columns: auto 1fr; }
  .row-actions { grid-column: 1 / -1; justify-content: flex-end; }
}

.auth-wrap { max-width: 26rem; margin-inline: auto; padding-block: var(--section-pad); }

.auth-center { text-align: left; }

.auth-lede { margin-bottom: 1.5rem; }

.auth-switch { margin-top: 1.2rem; color: var(--muted); }

.auth-switch a { color: var(--gold); font-weight: 700; text-decoration: none; }

.auth-links { display: flex; gap: 0.75rem; margin-top: 1.25rem; }

.auth-links a { color: var(--gold); font-weight: 700; text-decoration: none; }

.auth-switch a:hover, .auth-links a:hover { text-decoration: underline; }

.data-account { border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 1.25rem 1.5rem; background: var(--grad-card); display: flex; flex-direction: column; gap: 0.5rem; margin-top: 0.5rem; }

.data-account__actions { display: flex; gap: 0.6rem; flex-wrap: wrap; }

.module-back { margin: 0 0 1rem; }

.report-module .module-back { margin-bottom: 1.25rem; }

.locked-block {
  border: 1px dashed var(--gold-line); border-radius: var(--radius);
  background: color-mix(in srgb, var(--gold) 5%, transparent);
  padding: 1.5rem; text-align: left;
}

.locked-block--full { padding: 2rem; }

.locked-block .kicker { color: var(--gold); margin-bottom: 0.4rem; }

.locked-block__title { font-size: var(--text-lg); font-weight: 700; color: var(--text); margin: 0 0 0.5rem; }

.locked-block__text { margin: 0 0 1rem; color: var(--text-soft); }

.locked-page { padding-block: var(--section-pad); }

.cycle-list { display: flex; flex-direction: column; gap: 0.35rem; margin: 0.4rem 0 1rem; }

.cycle-row {
  display: grid; grid-template-columns: 2.1rem 11.5rem 2rem 1fr; gap: 0.4rem 0.8rem; align-items: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 0.35rem 0.6rem; text-decoration: none; color: inherit;
}

/* На телефоне годы не прячем: они уходят второй строкой под значение и тему. */
@media (max-width: 760px) { .cycle-row__n { grid-row: span 2; } .cycle-row__years { grid-row: 2; grid-column: 2 / -1; } .cycle-row__value { grid-row: 1; grid-column: 2; } .cycle-row__arch { grid-row: 1; grid-column: 3; } }

.cycle-row:hover { border-color: var(--gold-line); }

.cycle-row:focus-visible { outline: var(--focus-ring); }

.cycle-row--current { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold), var(--glow-gold); }

.cycle-row--current .cycle-row__arch::before { content: "сейчас · "; color: var(--gold); font-weight: 800; }

.cycle-row--epoch.cycle-row--current .cycle-row__arch::before { content: "эпоха · "; }

.cycle-row__n { font-family: var(--font-display); font-weight: 700; text-align: center; color: var(--text-soft); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); padding: 0.15rem 0; }

.cycle-row--epoch .cycle-row__n { border-color: var(--gold); background: var(--gold-soft); color: var(--gold); }

.cycle-row__years { color: var(--muted); font-size: var(--text-xs); white-space: nowrap; }

.cycle-row__value { font-family: var(--font-display); font-size: 1.3rem; text-align: center; color: var(--gold); }

.cycle-row__arch { color: var(--text-soft); font-size: var(--text-xs); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.ai-tabs { display: flex; gap: 0.4rem; margin: 0 0 1rem; border-bottom: 1px solid var(--line); padding-bottom: 0.6rem; }

.ai-tab { padding: 0.45rem 0.9rem; border-radius: var(--radius-sm); border: 1px solid var(--line); color: var(--muted); text-decoration: none; font-weight: 700; font-size: var(--text-sm); }

.ai-tab--active { color: var(--text); border-color: var(--gold); background: var(--gold-soft); }

.consent-details { margin: 0.8rem 0 1rem; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 0.6rem 0.9rem; background: var(--surface); }

.consent-details__summary { cursor: pointer; font-weight: 600; color: var(--text-soft); font-size: var(--text-sm); }

.consent-details__summary:hover { color: var(--gold); }

.consent-details[open] .consent-details__summary { margin-bottom: 0.6rem; }

.ai-answer { background: var(--gold-soft); border: 1px solid var(--gold-line); border-radius: var(--radius); padding: 0.9rem 1.1rem; margin: 0.5rem 0 0.75rem; }

.ai-answer__p { margin: 0 0 0.55rem; line-height: 1.6; }

.ai-answer__p:last-child { margin-bottom: 0; }

@media (max-width: 720px) { .month-vibrations { grid-template-columns: 1fr; } }

/* Sidebar (desktop) */
.wizard-steps { display: flex; gap: 0.5rem; list-style: none; margin: 0 0 1.5rem; padding: 0; flex-wrap: wrap; }

.wizard-step { display: inline-flex; align-items: center; gap: 0.5rem; font-size: var(--text-xs); font-weight: 700; color: var(--muted); border: 1px solid var(--line-strong); border-radius: var(--radius-pill); padding: 0.35rem 0.85rem; letter-spacing: 0.03em; }

.wizard-step span { display: inline-flex; align-items: center; justify-content: center; width: 1.35rem; height: 1.35rem; border-radius: 50%; border: 1px solid var(--line-strong); font-size: 0.7rem; }

.wizard-step--active, .wizard-step--done { color: var(--gold); border-color: var(--gold-line); background: var(--gold-soft); }

.wizard-step--active span, .wizard-step--done span { border-color: var(--gold); color: var(--gold); }

.form-fieldset { border: none; margin: 0; padding: 0; }

.form-fieldset + .form-fieldset { border-top: 1px solid var(--line); padding-top: 1.25rem; margin-top: 1.25rem; }

.form-step-legend { display: flex; align-items: center; gap: 0.7rem; font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; color: var(--text); margin: 0 0 0.9rem; }

.form-step-num { display: inline-flex; align-items: center; justify-content: center; width: 1.6rem; height: 1.6rem; border-radius: 50%; background: var(--grad-gold); color: #241a02; font-family: var(--font-body); font-size: 0.8rem; font-weight: 800; flex: 0 0 auto; }

.book-card { display: flex; flex-direction: column; gap: 1.1rem; text-align: left; }

.book-card__row { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 1.25rem; align-items: center; }

@media (max-width: 560px) { .book-card__row { grid-template-columns: 1fr; } }

.book-card__cover { width: 100%; height: auto; display: block; border-radius: var(--radius-sm); border: 1px solid var(--gold-line); box-shadow: var(--shadow-soft), 0 0 40px rgba(198,167,106,0.18); }

.book-card__body { min-width: 0; }

.book-card__kicker { display: inline-block; font-size: var(--text-2xs); letter-spacing: 0.24em; text-transform: uppercase; color: var(--gold); font-weight: 800; margin-bottom: 0.5rem; }

.book-card__title { font-family: var(--font-display); font-size: 1.5rem; font-weight: 600; margin: 0 0 0.3rem; }

.book-card__sub { margin: 0 0 0.7rem; color: var(--text-soft); font-size: var(--text-sm); }

.book-card__meta { display: flex; gap: 0.5rem; list-style: none; padding: 0; margin: 0 0 0.75rem; font-size: var(--text-sm); font-weight: 600; color: var(--text); flex-wrap: wrap; }

.book-card__meta li {
  display: inline-flex; align-items: baseline; gap: 0.35rem;
  font-family: var(--font-num); letter-spacing: 0.01em;
  background: var(--gold-soft); border: 1px solid var(--gold-line);
  color: var(--text); border-radius: var(--radius-pill); padding: 0.3rem 0.75rem;
}

.book-card__meta b { color: var(--gold); font-weight: 800; }

.book-card__note { margin: 0; font-size: var(--text-xs); color: var(--muted); border-top: 1px dashed var(--line-strong); padding-top: 0.7rem; line-height: 1.5; }

.sample-card {
  background:
    radial-gradient(1200px 500px at 50% -10%, rgba(169,154,245,0.18), transparent 60%),
    linear-gradient(165deg, var(--surface-2) 0%, var(--surface) 100%);
  border: 1px solid var(--gold-line); border-radius: var(--radius);
  padding: 0 1.25rem 1.25rem; box-shadow: var(--shadow-soft), var(--glow-gold);
}

.sample-card__chrome {
  display: flex; align-items: center; gap: 0.4rem;
  margin: 0 -1.25rem 0.8rem; padding: 0.55rem 1.25rem;
  border-bottom: 1px solid var(--line);
}

.sample-card__chrome span { width: 0.62rem; height: 0.62rem; border-radius: 50%; background: var(--line-strong); }

.sample-card__chrome span:first-child { background: var(--error); opacity: 0.75; }

.sample-card__chrome span:nth-child(2) { background: var(--warn); opacity: 0.75; }

.sample-card__chrome span:nth-child(3) { background: var(--ok); opacity: 0.75; }

.sample-card__chrome em { margin-left: auto; font-style: normal; font-size: var(--text-2xs); letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); font-family: var(--font-num); }

.sample-card__kicker { font-size: var(--text-2xs); letter-spacing: 0.24em; text-transform: uppercase; color: var(--gold); font-weight: 800; margin: 0 0 0.7rem; }

.sample-card__tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.5rem; }

@media (max-width: 440px) { .sample-card__tiles { grid-template-columns: repeat(2, 1fr); } }

.sample-tile {
  display: flex; flex-direction: column; justify-content: center; gap: 0.1rem;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface-2); padding: 0.5rem 0.4rem; text-align: center;
}

.sample-tile span { font-size: 0.6rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }

.sample-tile b { font-family: var(--font-display); font-size: 1.6rem; line-height: 1.1; color: var(--gold); font-weight: 600; }

.sample-tile small { font-size: 0.7rem; color: var(--muted); line-height: 1.2; }

.sample-tile--hero { border-color: var(--gold-line); box-shadow: 0 0 0 1px var(--gold-line); }

.sample-tile--hero b { font-size: 2rem; }

.sample-tile--master { border-color: var(--gold-line); background: var(--gold-soft); }

.sample-tile--master b { color: var(--gold-bright); }

.sample-card__chain { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem; margin-top: 0.75rem; font-family: var(--font-num); font-size: var(--text-xs); }

.sample-card__chain-input { color: var(--text-soft); }

.sample-card__chain-arrow { color: var(--gold); }

.sample-card__chain-formula { color: var(--lavender); }

.sample-card__chain-result { color: var(--gold); font-weight: 800; }

.sample-card__meta { margin: 0.6rem 0 0; font-size: var(--text-xs); color: var(--muted); }

.hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; align-items: center; max-width: var(--container);
             margin-inline: auto; }

@media (max-width: 960px) { .hero-grid { grid-template-columns: 1fr; gap: 1.5rem; } }

.method-demo { background: var(--grad-card); border: 1px solid var(--glass-border); border-radius: var(--radius); padding: 1rem 1.25rem; margin-bottom: 1.25rem; box-shadow: var(--shadow-soft); }

.method-demo .kicker { margin-bottom: 0.7rem; }

.method-demo__chain { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; align-items: center; gap: 0.4rem; padding: 0.55rem 0; border-top: 1px dashed var(--line-strong); }

.method-demo__chain:first-of-type { border-top: none; padding-top: 0; }

.method-demo__node { text-align: center; padding: 0.35rem 0.5rem; border-radius: var(--radius-sm); }

.method-demo__node span { display: block; font-size: 0.6rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.15rem; }

.method-demo__node b { font-family: var(--font-num); font-size: var(--text-sm); color: var(--text); font-weight: 700; }

.method-demo__node--op b { color: var(--lavender); }

.method-demo__node--res { background: var(--gold-soft); border: 1px solid var(--gold-line); }

.method-demo__node--res b { color: var(--gold); }

@media (max-width: 720px) {
  .method-demo__chain { grid-template-columns: 1fr auto 1fr; grid-row-gap: 0.3rem; }
  .method-demo__chain > .method-demo__node:nth-child(3) { grid-column: 1 / -1; }
  .method-demo__chain > .method-demo__node:nth-child(3) + .method-demo__node { grid-column: 1 / -1; }
}

.trace-demo { font-family: var(--font-num); font-size: var(--text-md); color: var(--gold); letter-spacing: 0.02em; padding: 0.6rem 0.5rem; font-weight: 700; }

/* ─── Method section: icons, disclosures, author frame ─────────────────── */
.method-icon {
  display: inline-grid; place-items: center; width: 2.4rem; height: 2.4rem;
  border-radius: 0.75rem; border: 1px solid var(--gold-line);
  background: var(--gold-soft); color: var(--gold);
}

.author-card__photo {
  height: 17rem; border: 1px solid var(--gold-line);
  box-shadow: var(--shadow-soft), 0 0 44px rgba(198,167,106,0.22);
}

.author-card dl { border-top: 1px solid var(--line); padding-top: 0.9rem; }

.author-card dt {
  font-size: var(--text-2xs); letter-spacing: 0.14em; text-transform: uppercase;
  padding-top: 0.15rem;
}

.author-card dd { border-bottom: 1px dashed var(--line); padding-bottom: 0.55rem; }

.author-card dd:last-child { border-bottom: none; padding-bottom: 0; }

.method-disclosure {
  margin-top: 1rem; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-sm); overflow: hidden;
}

.method-disclosure > summary {
  display: flex; align-items: center; justify-content: space-between; gap: 0.6rem;
  padding: 0.7rem 1rem; cursor: pointer; list-style: none;
  font-size: var(--text-sm); font-weight: 700; color: var(--gold);
  user-select: none;
}

.method-disclosure > summary::-webkit-details-marker { display: none; }

.method-disclosure > summary:hover { background: var(--gold-soft); }

.method-disclosure[open] > summary { border-bottom: 1px dashed var(--line-strong); }

.method-disclosure__chevron { transition: transform var(--speed-fast) var(--ease); color: var(--muted); }

.method-disclosure[open] .method-disclosure__chevron { transform: rotate(180deg); }

.method-disclosure__body { padding: 0.85rem 1rem 1rem; display: grid; gap: 0.45rem; }

.method-disclosure__trace {
  margin: 0; font-family: var(--font-num); font-size: var(--text-sm); color: var(--text-soft);
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 0.5rem;
  padding: 0.45rem 0.7rem;
}

.method-disclosure__trace .t-label {
  display: inline-block; min-width: 2.2rem; color: var(--gold); font-weight: 700;
}

.method-disclosure__trace b { color: var(--gold); }

.method-disclosure__note { margin: 0.2rem 0 0; font-size: var(--text-xs); color: var(--muted); line-height: 1.5; }

@media (prefers-reduced-motion: reduce) {
  .method-disclosure__chevron { transition: none; }
}

/* ─── Calculate page: progress + aside blocks + submit loading ─────────── */
.calc-progress {
  margin-bottom: 1.1rem; padding: 0.75rem 1rem;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface-2);
}

.calc-progress__head {
  display: flex; justify-content: space-between; gap: 0.5rem;
  font-size: var(--text-2xs); letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 0.4rem;
}

.calc-progress__count b { color: var(--gold); }

.calc-progress__bar { height: 6px; border-radius: 999px; background: var(--surface); overflow: hidden; }

.calc-progress__fill {
  display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, var(--gold), var(--gold-bright));
  transition: width var(--speed-fast) var(--ease);
}

.calc-progress__steps {
  list-style: none; display: flex; gap: 0.35rem 1rem; flex-wrap: wrap;
  padding: 0.55rem 0 0; margin: 0; font-size: var(--text-xs); color: var(--muted);
}

.calc-progress__step { display: inline-flex; align-items: center; gap: 0.35rem; }

.calc-progress__step span {
  width: 1.15rem; height: 1.15rem; border-radius: 50%;
  border: 1px solid var(--line-strong);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.62rem; line-height: 1;
}

.calc-progress__step--done { color: var(--gold); }

.calc-progress__step--done span { border-color: var(--gold); color: var(--gold); background: var(--gold-soft); }

.calc-aside__block {
  background: var(--grad-card); border: 1px solid var(--glass-border);
  border-radius: var(--radius); padding: 1rem 1.25rem;
}

.calc-aside__block--example { border-style: dashed; }

.calc-aside__steps {
  list-style: none; margin: 0.6rem 0 0; padding: 0;
  display: grid; gap: 0.55rem; font-size: var(--text-sm); color: var(--text-soft);
}

.calc-aside__steps li { display: flex; align-items: flex-start; gap: 0.55rem; }

.calc-aside__num {
  flex: 0 0 auto; width: 1.6rem; height: 1.6rem; border-radius: 50%;
  border: 1px solid var(--gold-line); color: var(--gold);
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-num); font-size: 0.72rem;
}

.calc-aside__chips {
  display: flex; flex-wrap: wrap; gap: 0.35rem;
  list-style: none; padding: 0; margin: 0.6rem 0 0.45rem;
}

.calc-aside__chips li {
  border: 1px solid var(--gold-line); color: var(--gold);
  border-radius: var(--radius-pill); padding: 0.15rem 0.6rem;
  font-size: var(--text-xs); font-weight: 700; font-family: var(--font-num);
}

.calc-aside__hint { margin: 0; font-size: var(--text-xs); color: var(--muted); }

.calc-aside__hint a { color: var(--gold); }

.calc-aside__example-label {
  margin: 0; font-size: var(--text-2xs); letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--muted);
}

.calc-aside__example-chain {
  margin: 0.35rem 0 0; font-family: var(--font-num);
  font-size: var(--text-sm); color: var(--text-soft);
}

.calc-aside__example-chain b { color: var(--gold); }

@media (prefers-reduced-motion: reduce) {
  .btn.is-loading::after { animation: none; }
  .calc-progress__fill { transition: none; }
}

.cabinet-select select:focus { outline: none; border-color: var(--gold); box-shadow: var(--ring); }

.question-chip:focus-visible,
.sidebar__nav a:focus-visible { outline: var(--focus-ring); outline-offset: -2px; }

.method-disclosure > summary:focus-visible { outline: var(--focus-ring); outline-offset: -2px; }

.calc-progress__step span, .calc-progress__fill { user-select: none; }

/* ─── Landing: structure of the full report (mock) ──────────────────────── */
.structure-split {
  display: grid; grid-template-columns: repeat(12, 1fr);
  gap: 2.5rem; align-items: center;
}

.structure-split__copy { grid-column: span 5; }

.structure-split > .report-mock { grid-column: span 7; }

@media (max-width: 960px) {
  .structure-split { grid-template-columns: 1fr; gap: 1.5rem; }
  .structure-split__copy, .structure-split > .report-mock { grid-column: auto; }
}

.structure-keys { list-style: none; display: flex; gap: 1rem; padding: 0; margin: 0.9rem 0 1.2rem; font-size: var(--text-sm); color: var(--text-soft); flex-wrap: wrap; }

.structure-keys li { display: inline-flex; align-items: center; gap: 0.4rem; }

.structure-key {
  display: inline-flex; align-items: center; justify-content: center;
  width: 1.25rem; height: 1.25rem; border-radius: 50%;
  font-size: 0.62rem; font-weight: 800; line-height: 1;
}

.structure-key--free { background: var(--gold-soft); border: 1px solid var(--gold-line); color: var(--gold); }

.structure-key--pro { background: var(--lavender-soft); border: 1px solid var(--lavender-line); color: var(--lavender); }

.report-mock__paper {
  background: var(--grad-card); border: 1px solid var(--gold-line);
  border-radius: var(--radius-lg); padding: 1.1rem 1.25rem 1rem;
  box-shadow: var(--shadow), var(--glow-gold);
  position: relative;
}

.report-mock__paper::before {
  content: ""; position: absolute; inset: 0.55rem; border: 1px dashed var(--gold-line);
  border-radius: calc(var(--radius-lg) - 0.45rem); pointer-events: none; opacity: 0.7;
}

.report-mock__head {
  display: flex; flex-direction: column; gap: 0.1rem;
  border-bottom: 1px solid var(--line); padding-bottom: 0.6rem; margin-bottom: 0.55rem;
}

.report-mock__kicker {
  font-size: var(--text-2xs); letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--muted); font-weight: 700;
}

.report-mock__title { font-family: var(--font-display); font-size: 1.5rem; color: var(--gold); font-weight: 600; }

.report-mock__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }

.report-mock__row {
  display: grid; grid-template-columns: 1.9rem 1fr auto; align-items: center; gap: 0.5rem;
  font-size: var(--text-xs); color: var(--text-soft);
  padding: 0.28rem 0.45rem; border-radius: 0.45rem;
  border-bottom: 1px solid var(--line);
}

.report-mock__row:last-child { border-bottom: none; }

.report-mock__row--free { background: var(--gold-soft); }

.report-mock__n {
  font-family: var(--font-num); font-size: 0.68rem; color: var(--muted);
  letter-spacing: 0.06em;
}

.report-mock__mark {
  font-size: 0.62rem; font-weight: 800; letter-spacing: 0.08em; color: var(--gold);
  border: 1px solid var(--gold-line); border-radius: var(--radius-pill); padding: 0.1rem 0.45rem;
}

.report-mock__mark--lock {
  color: var(--lavender); border-color: var(--lavender-line); background: var(--lavender-soft);
  text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.56rem;
}

.report-mock__foot {
  margin: 0.55rem 0 0; padding-top: 0.5rem; border-top: 1px dashed var(--line-strong);
  font-size: var(--text-2xs); color: var(--muted);
}

/* ─── Отчёт v2: поиск, избранное, копирование ID ─────────────────── */
.control-input {
  width: 100%; padding: 0.55rem 0.75rem; border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong); background: var(--surface-2);
  color: var(--text); font: inherit; font-size: var(--text-sm);
  transition: border-color var(--speed-fast) var(--ease), box-shadow var(--speed-fast) var(--ease);
}

.control-input::placeholder { color: var(--muted-2); }

.control-input:focus { outline: none; border-color: var(--gold-line); box-shadow: var(--focus-ring); }

.control-hint-inline { color: var(--muted); font-size: var(--text-xs); margin-left: 0.15rem; }

.index-card-wrap { position: relative; display: block; }

.index-card-wrap .index-card { width: 100%; height: 100%; }

.index-star {
  position: absolute; top: 0.35rem; right: 0.35rem; z-index: 2;
  width: 1.9rem; height: 1.9rem; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid transparent; border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--surface) 60%, transparent);
  color: var(--muted); cursor: pointer;
  transition: color var(--speed-fast) var(--ease), background var(--speed-fast) var(--ease), border-color var(--speed-fast) var(--ease);
}

.index-star:hover { color: var(--gold); background: var(--gold-soft); }

.index-star:focus-visible { outline: none; box-shadow: var(--focus-ring); }

.index-star.is-active { color: var(--gold-bright); background: var(--gold-soft); border-color: var(--gold-line); }

.index-star.is-active svg { fill: var(--gold); }

.is-search-hidden { display: none !important; }

.favorites-only .index-card-wrap:not(.is-favorite) { display: none; }

/* ─── Каталог расчётов: фильтр ─────────────────────────────────── */
.module-back { margin: 0 0 1rem; }

@media (prefers-reduced-motion: reduce) {
  .tile-pop, .index-star, .control-input { transition: none; }
}

/* ─── Сценарные карты: переворот (совместимость, компания, ребёнок) ── */
.index-card { perspective: 900px; }

.index-card__inner {
  display: grid; transform-style: preserve-3d;
  transition: transform var(--speed-slow) var(--ease);
}

.index-card__face {
  grid-area: 1 / 1; backface-visibility: hidden; -webkit-backface-visibility: hidden;
  visibility: hidden; border-radius: inherit;
}

.index-card__face--front { visibility: visible; }

.index-card__face--back {
  transform: rotateY(180deg);
  padding: 0.85rem 0.95rem; text-align: left;
  display: flex; flex-direction: column; gap: 0.35rem; justify-content: center;
}

.index-card.is-flipped .index-card__inner { transform: rotateY(180deg); }

.index-card.is-flipped .index-card__face--front { visibility: hidden; }

.index-card.is-flipped .index-card__face--back { visibility: visible; }

.index-card__name, .index-card__value { backface-visibility: hidden; -webkit-backface-visibility: hidden; }

.index-card__flip-hint {
  display: inline-flex; align-items: center; justify-content: center;
  width: 1.25rem; height: 1.25rem; border-radius: var(--radius-pill);
  border: 1px solid var(--gold-line); color: var(--gold);
  font-size: 0.68rem; font-weight: 700; font-style: normal;
}

.index-card__back-title { margin: 0; color: var(--text); font-size: var(--text-sm); font-weight: 700; }

.index-card__back-what { margin: 0; color: var(--text-soft); font-size: var(--text-xs); line-height: 1.45; }

.index-card__back-archetype { margin: 0; color: var(--gold); font-size: var(--text-xs); }

@media (prefers-reduced-motion: reduce) {
  .index-card__inner { transition: none; }
}

/* ─── Mobile tap targets (UX wave A, M-006/M-007) ────────────────────────── */
@media (pointer: coarse) {
  .question-chip { min-height: 2.75rem; padding-inline: 1rem; }
  .btn--small { min-height: 2.75rem; }
  .control-input, .notify input[type="email"], .cabinet-search, .cabinet-select select { min-height: 2.75rem; }
  .index-star { min-width: 2.75rem; min-height: 2.75rem; }
  .brand--compact { min-height: 2.75rem; }
  .form-field input, .form-field select { min-height: 2.75rem; }
}

/* ─── Small form targets at 44px (WCAG 2.2 AA 2.5.8+ touch guidance) ───── */
.control-input { min-height: 2.75rem; }

/* ─── Scenario links grid in the report panel ───────────────────────────── */
.scenario-links {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
  gap: 0.45rem; margin-top: 0.5rem;
}

.scenario-link {
  display: flex; flex-direction: column; gap: 0.1rem;
  padding: 0.55rem 0.7rem; border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text-soft); text-decoration: none;
  transition: border-color var(--speed-fast) var(--ease), color var(--speed-fast) var(--ease), transform var(--speed-fast) var(--ease);
}

.scenario-link:hover { border-color: var(--gold-line); color: var(--text); transform: translateY(-2px); }

.scenario-link:focus-visible { outline: var(--focus-ring); outline-offset: 2px; }

.scenario-link__icon { color: var(--gold); font-size: 0.95rem; line-height: 1; }

.scenario-link__title { font-size: var(--text-sm); font-weight: 700; color: var(--text); line-height: 1.25; }

.scenario-link__hint { font-size: var(--text-2xs); color: var(--muted); line-height: 1.35; }

.scenario-link__form { font-size: var(--text-2xs); font-weight: 700; color: var(--gold); background: var(--gold-soft); padding: 0 0.4rem; border-radius: var(--radius-sm); align-self: flex-start; }

@media (prefers-reduced-motion: reduce) {
  .scenario-link { transition: none; }
  .scenario-link:hover { transform: none; }
}

/* ─── Scenario pages: presentation ─────────────────────────────────────── */
.scenario-page__intro { margin-bottom: 1rem; text-align: center; max-width: 62rem; margin-inline: auto; }
.scenario-page__intro .kicker { justify-content: center; }
.scenario-page__intro .section__lede { margin-inline: auto; }

.scenario-year-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; margin: 1rem 0; }
.scenario-year-card { background: var(--grad-card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; display: flex; flex-direction: column; gap: 0.5rem; }
.scenario-year-card__year { font-size: var(--text-lg); font-weight: 800; color: var(--text); font-variant-numeric: tabular-nums; }
.scenario-year-card__offset { font-size: var(--text-xs); color: var(--muted); font-weight: 600; }
.scenario-year-card__metrics { display: grid; gap: 0.35rem; margin: 0; }
.scenario-year-card__metric { display: flex; justify-content: space-between; gap: 0.75rem; font-size: var(--text-sm); border-bottom: 1px dashed var(--line); padding-bottom: 0.25rem; }
.scenario-year-card__metric:last-child { border-bottom: 0; padding-bottom: 0; }
.scenario-year-card__label { color: var(--muted); }
.scenario-year-card__value { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--text); text-align: right; }
.scenario-year-card__hint { display: block; font-size: var(--text-2xs); color: var(--muted); font-weight: 500; line-height: 1.3; margin-top: 0.1rem; }
.scenario-year-card details { margin-top: 0.25rem; }
.scenario-year-card summary { cursor: pointer; font-size: var(--text-xs); color: var(--gold); font-weight: 600; }
.scenario-year-card details p { font-size: var(--text-xs); color: var(--muted); margin: 0.35rem 0 0; line-height: 1.45; }
.scenario-year-card__matches { margin: 0; font-size: var(--text-xs); color: var(--muted); line-height: 1.4; }
.scenario-year-card__matches b { color: var(--text); font-weight: 600; }

.scenario-decision-list { display: grid; gap: 0.75rem; margin: 1rem 0; }
.scenario-decision-card { background: var(--grad-card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; }
.scenario-decision-card__head { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; align-items: baseline; margin-bottom: 0.5rem; }
.scenario-decision-card__key { font-weight: 700; color: var(--text); }
.scenario-decision-card__status { font-size: var(--text-xs); color: var(--muted); }
.scenario-decision-card__title { font-size: var(--text-sm); color: var(--muted); margin: 0 0 0.5rem; }
.scenario-decision-branch { padding: 0.5rem 0; border-top: 1px dashed var(--line); }
.scenario-decision-branch:first-of-type { border-top: 0; padding-top: 0; }
.scenario-decision-branch__condition { font-size: var(--text-sm); font-weight: 600; color: var(--text); margin: 0 0 0.2rem; }
.scenario-decision-branch__action { font-size: var(--text-sm); color: var(--muted); margin: 0; line-height: 1.45; }
.scenario-decision-branch details { margin-top: 0.25rem; }
.scenario-decision-branch summary { cursor: pointer; font-size: var(--text-xs); color: var(--gold); font-weight: 600; }
.scenario-decision-branch details p { font-size: var(--text-xs); color: var(--muted); margin: 0.25rem 0 0; font-family: var(--font-num, monospace); }
.scenario-match { display: inline-block; font-size: var(--text-2xs); font-weight: 700; padding: 0.1rem 0.45rem; border-radius: var(--radius-sm); margin-left: 0.4rem; vertical-align: middle; }
.scenario-match--yes { color: #1f6b3a; background: rgba(31, 107, 58, 0.12); }
.scenario-match--no { color: var(--muted); background: var(--surface); border: 1px solid var(--line); }
.scenario-match--unknown { color: var(--muted); background: var(--surface); border: 1px solid var(--line); }

/* ─── Scenario result pages (compatibility, company, etc.) ──────────────── */
.scenario-result { margin-top: 1.25rem; }
.scenario-result__pair { text-align: center; }
.scenario-result__grid { margin-bottom: 1.25rem; }
.scenario-result .index-card,
.scenario-result .index-card__inner,
.scenario-result .index-card__face { text-align: center; }
.scenario-result .index-card { align-items: center; }
.scenario-result .index-card__face { align-items: center; justify-content: center; }
.scenario-result .index-card__face--front {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.3rem; text-align: center;
}
.scenario-result .index-card__name { padding-right: 0; -webkit-line-clamp: 3; }
.scenario-result .index-card__flip-hint {
  position: absolute; top: 0.45rem; right: 0.45rem;
  font-size: 0.64rem; font-weight: 800; color: var(--muted);
  border: 1px solid var(--line-strong); border-radius: 999px;
  width: 1.1rem; height: 1.1rem; display: inline-flex; align-items: center; justify-content: center;
}
.scenario-result__block { text-align: center; margin-top: 1.5rem; }
.scenario-result__block .kicker { margin-inline: auto; }
.scenario-result__synthesis {
  max-width: 62rem; margin: 0.25rem auto 0; text-align: center;
  line-height: 1.7; color: var(--text-soft);
}
.scenario-result__interpretations { display: grid; gap: 0.75rem; margin-top: 0.5rem; }
.scenario-result__item {
  text-align: left; max-width: 70ch; margin: 0 auto; width: 100%;
  border-left-width: 4px; border-radius: var(--radius-sm);
}
.scenario-result__item .month-vibration__head { text-align: center; }
.scenario-result__footer {
  margin-top: 1.5rem; display: flex; flex-direction: column; align-items: center; gap: 0.85rem; text-align: center;
}
.scenario-result__reset { display: flex; flex-direction: column; align-items: center; gap: 0.4rem; margin: 0; }
.scenario-result__reset .hint { color: var(--muted); font-size: var(--text-sm); max-width: 42rem; }
.scenario-result .panel-note { width: 100%; max-width: 52rem; text-align: center; }

/* ─── Compare current year with neighbors ─────────────────────────────────── */
.compare-block { margin-top: 1rem; border-top: 1px dashed var(--line-strong); padding-top: 0.9rem; }

.compare-block__title {
  font-size: var(--text-2xs); letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--muted); font-weight: 800; margin: 0 0 0.5rem;
}

.compare-table { font-size: var(--text-sm); }

.compare-table thead th:first-child { color: var(--text-soft); }

.compare-table__current {
  background: var(--gold-soft); border-color: var(--gold-line);
}

.compare-table th[scope="row"] { text-align: left; color: var(--text-soft); }

.compare-table td { font-family: var(--font-num); text-align: center; }

/* ─── Карта связей индексов: кинематографичная схема ─────────────────── */
.dependency-map { padding-block: var(--section-pad); }
.dependency-map__layout { display: grid; gap: 1.25rem; max-width: var(--container); margin-inline: auto; }

.dependency-map .legend,
.dependency-legend { display: flex; flex-wrap: wrap; gap: 0.6rem 1.5rem; justify-content: center; color: var(--text-soft); font-size: var(--text-sm); margin: 0; }
.dependency-map .legend span,
.dependency-legend span { display: inline-flex; align-items: center; gap: 0.4rem; }

.dot { width: 0.8rem; height: 0.8rem; border-radius: 50%; display: inline-block; border: 1px solid var(--line-strong); }
.dot--date { background: #2a2e42; }
.dot--index { background: var(--gold); border-color: var(--gold-line); }
.dot--master { background: var(--gold-bright); border-color: var(--gold-line); box-shadow: 0 0 0 3px var(--gold-soft); }
.dot--cycle { background: var(--lavender); border-color: var(--lavender-line); }

/* Сцена: фон, звёзды, блики, кнопки */
.dep-stage {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid var(--gold-line);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(60rem 34rem at 50% -10%, rgba(159,147,230,.14), transparent 55%),
    radial-gradient(40rem 24rem at 50% 85%, rgba(198,167,106,.12), transparent 55%),
    linear-gradient(180deg, #191d2b 0%, #0d0f18 100%);
  box-shadow: var(--shadow-soft), var(--glow-gold);
  padding: 1rem;
}
.dep-stage::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at center, transparent 55%, rgba(0,0,0,.45) 100%);
  pointer-events: none; z-index: 0;
}
.dep-stage::after {
  content: "";
  position: absolute; top: -10%; bottom: -10%; left: -40%; width: 28%;
  background: linear-gradient(100deg, transparent, rgba(240,221,170,.13), transparent);
  transform: skewX(-14deg);
  opacity: 0; pointer-events: none; z-index: 2;
}
.dep-stage.is-ready::after { animation: dep-sweep 2.6s cubic-bezier(.4,0,.2,1) .35s 1 both; }

.dep-stage__stars {
  position: absolute; inset: -10%; z-index: 0; pointer-events: none;
  background-repeat: repeat;
}
.dep-stage__stars--a {
  background-image:
    radial-gradient(1.2px 1.2px at 12% 18%, rgba(255,240,200,.85), transparent),
    radial-gradient(1px 1px at 72% 12%, rgba(200,190,255,.75), transparent),
    radial-gradient(1.4px 1.4px at 38% 74%, rgba(255,230,170,.75), transparent),
    radial-gradient(1px 1px at 88% 66%, rgba(200,190,255,.6), transparent),
    radial-gradient(1px 1px at 22% 52%, rgba(255,255,255,.5), transparent),
    radial-gradient(1.2px 1.2px at 56% 40%, rgba(255,230,170,.55), transparent);
  background-size: 420px 300px;
  animation: dep-drift 90s linear infinite;
}
.dep-stage__stars--b {
  background-image:
    radial-gradient(1px 1px at 30% 30%, rgba(255,255,255,.6), transparent),
    radial-gradient(1px 1px at 80% 55%, rgba(255,240,200,.5), transparent),
    radial-gradient(1.5px 1.5px at 60% 85%, rgba(200,190,255,.45), transparent);
  background-size: 260px 220px;
  animation: dep-drift 140s linear infinite reverse, dep-twinkle 5s ease-in-out infinite;
}
.dep-stage__glow { position: absolute; border-radius: 50%; pointer-events: none; z-index: 0; filter: blur(2px); }
.dep-stage__glow--a { width: 20rem; height: 20rem; left: 12%; top: 8%; background: radial-gradient(circle, rgba(198,167,106,.18), transparent 70%); animation: dep-float 10s ease-in-out infinite; }
.dep-stage__glow--b { width: 24rem; height: 24rem; right: 8%; bottom: 0; background: radial-gradient(circle, rgba(159,147,230,.16), transparent 70%); animation: dep-float 12s ease-in-out infinite reverse; }

.dep-controls {
  position: absolute; top: .9rem; right: .9rem; z-index: 3;
  display: flex; gap: .5rem; flex-wrap: wrap; justify-content: flex-end;
}
.dep-btn {
  font: inherit; font-size: var(--text-xs);
  padding: .45rem .9rem; border-radius: 999px;
  border: 1px solid var(--gold-line);
  background: rgba(20,22,34,.72);
  color: var(--gold-bright);
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: background .25s ease, box-shadow .25s ease, transform .2s ease;
}
.dep-btn:hover { background: rgba(198,167,106,.16); box-shadow: 0 0 18px rgba(198,167,106,.28); transform: translateY(-1px); }
.dep-btn:focus-visible { outline: 2px solid var(--gold-bright); outline-offset: 2px; }
.dep-btn--ghost { color: var(--text-soft); border-color: var(--line-strong); }

/* SVG */
.dep-svg { width: 100%; height: auto; display: block; position: relative; z-index: 1; min-width: 640px; }

.dep-orbit { transform-box: view-box; transform-origin: 490px 285px; opacity: 0; transition: opacity 1.6s ease .2s; }
.dep-orbit--inner { stroke-dasharray: 6 10; animation: dep-orbit-spin 60s linear infinite; }
.dep-orbit--outer { stroke-dasharray: 2 12; animation: dep-orbit-spin 90s linear infinite reverse; }
.dep-stage.is-ready .dep-orbit { opacity: 1; }

/* Рёбра: рисуются как «провод», затем светятся при фокусе */
.dep-edge {
  fill: none;
  stroke: rgba(130,140,185,.42);
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  transition: stroke .35s ease, stroke-opacity .35s ease, stroke-width .35s ease, filter .35s ease;
}
.dep-stage.is-ready .dep-edge {
  stroke-dashoffset: 0;
  animation: dep-draw 1.5s cubic-bezier(.45,.05,.2,1) var(--d, 0s) backwards;
}
.dep-stage.has-focus .dep-edge { stroke-opacity: .1; }
.dep-edge.is-active {
  stroke: #e9cf8c;
  stroke-opacity: 1;
  stroke-width: 2.2;
  filter: drop-shadow(0 0 5px rgba(240,211,140,.55));
}

/* Частицы: данные «текут» по рёбрам */
.dep-particle {
  fill: #f6e6b4;
  opacity: .3;
  filter: drop-shadow(0 0 3px rgba(240,211,140,.9));
  transition: opacity .4s ease;
}
.dep-particle.is-active { opacity: 1; }
.dep-stage.has-focus .dep-particle { opacity: .06; }
.dep-stage.has-focus .dep-particle.is-active { opacity: 1; }

/* Узлы: вспыхивают по стадиям расчёта */
.dep-node { cursor: pointer; outline: none; opacity: 1; transition: opacity .45s ease; }
.dep-stage:not(.is-ready) .dep-node { opacity: 0; }
.dep-stage.is-ready .dep-node { animation: dep-fade .8s ease var(--d, 0s) backwards; }
.dep-stage.is-ready .dep-node__body { animation: dep-pop 1.1s cubic-bezier(.34,1.45,.64,1) var(--d, 0s) backwards; }

.dep-node__body {
  transform-box: fill-box; transform-origin: center;
  transition: transform .5s cubic-bezier(.2,.8,.2,1), filter .4s ease;
}
.dep-node:hover .dep-node__body,
.dep-node:focus-visible .dep-node__body,
.dep-node.is-active .dep-node__body { transform: scale(1.08); }
.dep-node:focus-visible .dep-node__circle { stroke: var(--gold-bright); stroke-width: 2.4; }

.dep-node__circle { transition: filter .35s ease; }
.dep-node__halo {
  transform-box: fill-box; transform-origin: center;
  opacity: .85;
  animation: dep-halo var(--p, 7s) ease-in-out infinite;
  transition: opacity .35s ease;
}
.dep-node__ring {
  fill: none;
  stroke: rgba(240,211,140,.55);
  stroke-width: 1;
  stroke-dasharray: 3 7;
  transform-box: fill-box; transform-origin: center;
  animation: dep-orbit-spin 28s linear infinite;
}
.dep-node--hero .dep-node__circle { animation: dep-breathe 5.5s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.dep-node--master .dep-node__circle { animation: dep-breathe 4.8s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }

.dep-node__value { font-family: Georgia, "Times New Roman", serif; }
.dep-node__sub { font-family: system-ui, sans-serif; }

.dep-node.is-active .dep-node__circle,
.dep-node:hover .dep-node__circle { filter: brightness(1.18) saturate(1.05); }
.dep-node.is-related .dep-node__circle { filter: brightness(1.08); }
.dep-node.is-active .dep-node__halo,
.dep-node.is-related .dep-node__halo { opacity: 1; }

.dep-stage.has-focus .dep-node { opacity: .32; }
.dep-stage.has-focus .dep-node.is-active,
.dep-stage.has-focus .dep-node.is-related,
.dep-stage.has-focus .dep-node.is-done { opacity: 1; }

/* Пульс при шаге расчёта */
.dep-pulse {
  fill: none;
  stroke: #f0ddaa;
  stroke-width: 1.6;
  transform-box: fill-box; transform-origin: center;
  animation: dep-ripple 1.3s ease-out forwards;
  pointer-events: none;
}

/* Подсказка */
.dep-stage__hint {
  position: relative; z-index: 1;
  margin: .6rem 0 0; text-align: center;
  color: var(--muted); font-size: var(--text-xs);
}

/* Панель формул */
.dep-panel {
  position: relative;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(31,35,52,.94), rgba(17,19,29,.94));
  box-shadow: var(--shadow-soft);
  padding: 1.25rem 1.4rem 1.35rem;
  min-height: 15rem;
  overflow: hidden;
}
.dep-panel::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.dep-panel.is-swap > * { animation: dep-rise .6s cubic-bezier(.2,.8,.2,1) backwards; }
.dep-panel.is-swap > *:nth-child(2) { animation-delay: .06s; }
.dep-panel.is-swap > *:nth-child(3) { animation-delay: .12s; }
.dep-panel.is-swap > *:nth-child(4) { animation-delay: .18s; }

.dep-panel__head { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.dep-panel__badge {
  width: 4.6rem; height: 4.6rem; border-radius: 50%;
  display: grid; place-content: center; text-align: center;
  background: radial-gradient(circle at 35% 30%, #f0ddaa, #8f6f3a);
  color: #241a02;
  box-shadow: 0 0 26px rgba(198,167,106,.35);
  flex: none;
}
.dep-panel__badge span { font-family: Georgia, "Times New Roman", serif; font-weight: 700; font-size: 1.2rem; line-height: 1; }
.dep-panel__badge small { font-size: .72rem; line-height: 1.2; opacity: .85; }
.dep-panel__badge--forecast { background: radial-gradient(circle at 35% 30%, #d5cdff, #6656a8); color: #f3f0ff; box-shadow: 0 0 26px rgba(159,147,230,.35); }
.dep-panel__badge--input,
.dep-panel__badge--dim { background: radial-gradient(circle at 35% 30%, #454d68, #1b2030); color: #ece6d8; box-shadow: none; }
.dep-panel__badge--master { box-shadow: 0 0 34px rgba(240,211,140,.5); }

.dep-panel__kicker { margin: 0; font-size: var(--text-xs); color: var(--gold); letter-spacing: .08em; text-transform: uppercase; }
.dep-panel__title { margin: .15rem 0 0; font-size: 1.3rem; color: var(--text); }
.dep-panel__step { margin-left: auto; font-size: var(--text-xs); color: var(--gold-bright); font-family: var(--font-num); letter-spacing: .04em; }

.dep-panel__role { margin: .9rem 0; color: var(--text-soft); line-height: 1.6; }
.dep-panel__calc { display: grid; gap: .6rem; margin: 0 0 1rem; }
.dep-panel__calc dt { font-size: var(--text-xs); color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.dep-panel__calc dd { margin: .15rem 0 0; color: var(--text); }
.dep-panel__calc code { font-family: var(--font-num); color: var(--gold-bright); background: none; padding: 0; }

.dep-panel__links { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.dep-panel__links h4 { margin: 0 0 .4rem; font-size: var(--text-xs); color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.dep-panel__chips { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.dep-panel__muted { color: var(--muted); font-size: var(--text-xs); }

.dep-chip {
  font: inherit; font-size: var(--text-xs);
  padding: .3rem .65rem; border-radius: 999px;
  border: 1px solid var(--lavender-line);
  background: rgba(159,147,230,.1);
  color: var(--text);
  cursor: pointer;
  transition: transform .2s ease, background .2s ease, box-shadow .2s ease;
}
.dep-chip:hover { transform: translateY(-1px); background: rgba(159,147,230,.22); box-shadow: 0 0 12px rgba(159,147,230,.25); }
.dep-chip:focus-visible { outline: 2px solid var(--gold-bright); outline-offset: 2px; }
.dep-chip b { color: var(--gold-bright); font-weight: 600; }

.dep-panel__empty { color: var(--muted); margin: 2.5rem 0; text-align: center; }

.dependency-table-wrap { margin-top: 1rem; }
.dependency-table td:first-child { font-weight: 700; color: var(--text); }

/* Ключевые кадры */
@keyframes dep-sweep {
  0%   { left: -40%; opacity: 0; }
  15%  { opacity: 1; }
  100% { left: 125%; opacity: 0; }
}
@keyframes dep-drift {
  from { background-position: 0 0; }
  to   { background-position: 420px 300px; }
}
@keyframes dep-twinkle {
  0%, 100% { opacity: .55; }
  50% { opacity: 1; }
}
@keyframes dep-float {
  0%, 100% { transform: translate3d(0,0,0); }
  50% { transform: translate3d(0,-12px,0); }
}
@keyframes dep-orbit-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
@keyframes dep-breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.025); }
}
@keyframes dep-halo {
  0%, 100% { opacity: .7; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.07); }
}
@keyframes dep-draw {
  to { stroke-dashoffset: 0; }
}
@keyframes dep-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes dep-pop {
  0%   { transform: scale(.2); opacity: 0; filter: brightness(2.4); }
  60%  { transform: scale(1.12); opacity: 1; filter: brightness(1.5); }
  100% { transform: scale(1); filter: brightness(1); }
}
@keyframes dep-ripple {
  from { transform: scale(1); opacity: .9; }
  to   { transform: scale(2.6); opacity: 0; }
}
@keyframes dep-rise {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

@media (max-width: 720px) {
  .dep-stage { padding: .75rem; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .dep-svg { min-width: 560px; }
  .dep-controls { position: static; justify-content: center; margin-bottom: .5rem; }
  .dep-stage__hint { font-size: 11px; }
  .dep-panel__links { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .dep-stage *,
  .dep-stage::after,
  .dep-panel.is-swap > * { animation: none !important; }
  .dep-stage .dep-edge { stroke-dashoffset: 0; transition: none; }
  .dep-stage .dep-node,
  .dep-stage .dep-orbit { opacity: 1; }
  .dep-node__body, .dep-node, .dep-edge, .dep-btn { transition: none !important; }
}


.company-summary-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 0.75rem; }
.company-summary-item { padding: 0.75rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.company-summary-item__label { margin: 0; font-size: var(--text-xs); color: var(--muted); }
.company-summary-item__value { margin: 0.2rem 0 0; font-size: var(--text-xl); font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.company-summary-item__hint { margin: 0.15rem 0 0; font-size: var(--text-2xs); color: var(--muted); }

/* ── Черновик для согласования: расшифровка блоков ─────────────────────── */
.draft-legend { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0.5rem; margin-bottom: 1rem; }
.draft-legend__item { padding: 0.55rem 0.7rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); font-size: var(--text-2xs); line-height: 1.5; color: var(--muted); }
.draft-legend__item b { color: var(--gold); letter-spacing: 0.04em; }

.index-card--draft { padding: 1rem 1.1rem; }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; margin: 0.8rem 0; }
.detail-block { padding: 0.7rem 0.8rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.detail-block__title { margin: 0 0 0.35rem; font-size: var(--text-2xs); font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--gold); }
.detail-block p:not(.detail-block__title) { margin: 0; font-size: var(--text-xs); line-height: 1.55; color: var(--muted); }
.detail-list { margin: 0; padding-left: 1.1rem; }
.detail-list li { font-size: var(--text-xs); line-height: 1.55; color: var(--muted); margin-bottom: 0.25rem; }
.detail-list li:last-child { margin-bottom: 0; }
.detail-block--action { border-color: var(--gold); background: var(--gold-soft); }
.detail-block--action p:not(.detail-block__title) { color: var(--text-soft); }
@media (max-width: 720px) { .detail-grid { grid-template-columns: 1fr; } }

/* ── Сравнение компаний ────────────────────────────────────────────────── */
.compare-form { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.compare-form--three { grid-template-columns: repeat(3, 1fr); }
.compare-form__column { padding: 0.9rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.compare-form__title { margin: 0 0 0.75rem; font-size: var(--text-sm); color: var(--gold); }
.compare-form .form-field { margin-bottom: 0.7rem; }
@media (max-width: 760px) { .compare-form { grid-template-columns: 1fr; } }
.compare-vs { color: var(--gold); font-weight: 400; font-size: 0.7em; }
.compare-table td { vertical-align: top; }
.compare-diff { font-family: var(--font-num); font-weight: 800; color: var(--gold); font-variant-numeric: tabular-nums; }

/* Много участников: таблица прокручивается вбок, названия индексов остаются на месте */
.compare-table--wide th:first-child, .compare-table--wide td:first-child { position: sticky; left: 0; z-index: 1; background: var(--bg) !important; text-align: left; min-width: 8rem; max-width: 11rem; }
.compare-table--wide th { min-width: 4.5rem; }

/* «Моя база» */
.base-list { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: 0.5rem; }
.base-list__row { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; align-items: center; justify-content: space-between; padding: 0.7rem 0.9rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.base-list__pick { flex: 1 1 15rem; min-width: 0; }
.base-list__actions { display: flex; gap: 0.4rem; }
