/* ==========================================================================\n   Dashboard lower block — final responsive design correction\n   Target: reference composition + robust Russian typography at laptop widths\n   ========================================================================== */

/* Never allow syllable stacks or accidental word fragmentation in this block. */
.dashboard-bottom .card-title,
.dashboard-bottom h2,
.dashboard-bottom p,
.dashboard-bottom .link-gold,
.dashboard-bottom .btn {
  word-break: normal !important;
  overflow-wrap: normal !important;
  hyphens: none !important;
}

.dashboard-bottom .card-title,
.dashboard-empty-copy h2 { text-wrap: balance; }
.dashboard-bottom p { text-wrap: pretty; }
.dashboard-bottom > .card { min-width: 0; }
.dashboard-bottom .btn,
.dashboard-bottom .link-gold { white-space: nowrap; }

/* Desktop reference behaviour. */
@media (min-width:1501px) {
  .dashboard-empty-copy h2 { max-width: 11.6ch !important; }
  .artifact-dashboard-head { grid-template-columns:minmax(0,1fr) auto !important; }
  .artifact-dashboard-head .card-title { max-width: 8.5ch !important; }
}

/* --------------------------------------------------------------------------
   Laptop / compact desktop — preserve the reference logic instead of stacking
   the diagnostic visual above its copy.  The dominant card receives enough
   width for natural Russian words; the two status cards stay narrower.
   -------------------------------------------------------------------------- */
@media (min-width:1081px) and (max-width:1500px) {
  .main { padding-left: 22px !important; padding-right: 22px !important; }

  .dashboard-bottom {
    grid-template-columns: minmax(425px,1.48fr) minmax(250px,.88fr) minmax(260px,.90fr) !important;
    gap: 14px !important;
    align-items: stretch;
  }

  .dashboard-bottom > .card {
    min-height: 456px !important;
    padding: 22px !important;
  }

  /* 01 — Diagnostic report: visual left, editorial copy right, CTA across card. */
  .dashboard-empty-report {
    min-height: 412px !important;
    height: 100%;
    display: grid !important;
    grid-template-columns: minmax(148px,.76fr) minmax(0,1.24fr);
    grid-template-rows: 1fr;
    gap: 16px !important;
    align-items: start;
    padding: 0 0 72px;
  }

  .dashboard-empty-visual {
    width: 100%;
    height: 100% !important;
    min-height: 286px !important;
    margin: 0 !important;
    align-self: stretch;
    display: grid;
    place-items: start center;
    padding-top: 30px;
  }

  .dashboard-empty-visual::before { inset: 18% 3% 14%; }

  .dashboard-empty-visual img {
    width: min(100%,178px) !important;
    max-height: 292px !important;
    object-fit: contain;
  }

  .dashboard-empty-copy {
    width: 100%;
    min-width: 0;
    align-self: start;
    align-items: flex-start;
    padding: 32px 0 3px !important;
    text-align: left;
  }

  .dashboard-empty-copy h2 {
    width: 100%;
    max-width: none !important;
    margin: 0;
    font-size: clamp(24px,1.86vw,28px) !important;
    line-height: 1.09 !important;
    letter-spacing: -.012em;
  }

  .dashboard-empty-divider {
    width: min(100%,214px);
    margin: 20px 0 18px !important;
  }

  .dashboard-empty-copy p {
    width: 100%;
    max-width: 29ch !important;
    margin: 0;
    font-size: 14.5px !important;
    line-height: 1.62 !important;
  }

  .dashboard-primary-action {
    left: 22px !important;
    right: 22px !important;
    bottom: 20px !important;
    transform: none !important;
    width: auto !important;
    max-width: none !important;
    height: 54px !important;
    font-size: 15.5px !important;
  }

  /* 02 — Artifacts: restore reference header alignment, keep link top-right. */
  .artifact-dashboard-card,
  .dashboard-dossier-card { padding: 22px !important; }

  .artifact-dashboard-head {
    display: grid !important;
    grid-template-columns: minmax(0,1fr) auto !important;
    align-items: start !important;
    gap: 8px !important;
    margin: 0 0 12px !important;
  }

  .artifact-dashboard-head .card-title {
    width: auto;
    max-width: 7.2ch !important;
    font-size: 25px !important;
    line-height: 1.06 !important;
  }

  .artifact-all-link {
    align-self: start !important;
    justify-self: end !important;
    padding: 3px 0 0 !important;
    font-size: 11.25px !important;
    line-height: 1.25 !important;
    letter-spacing: -.01em;
  }

  .artifact-all-link svg { width: 14px !important; height: 14px !important; }

  .artifact-empty-content {
    gap: 16px !important;
    padding: 5px 0 8px;
  }

  .artifact-empty-visual {
    min-height: 166px !important;
    margin-top: 2px;
  }

  .artifact-empty-visual img {
    width: min(100%,222px) !important;
    max-height: 154px !important;
  }

  .artifact-empty-content p {
    max-width: 23ch !important;
    font-size: 14.25px !important;
    line-height: 1.56 !important;
  }

  .artifact-footer-link {
    min-height: 34px !important;
    margin-top: auto;
    font-size: 13.75px !important;
  }

  /* 03 — Dossier: stronger status-object scale and consistent vertical rhythm. */
  .dashboard-dossier-card .card-title {
    font-size: 26px !important;
    line-height: 1.08 !important;
  }

  .dashboard-dossier-card p {
    margin-top: 14px !important;
    max-width: 28ch !important;
    font-size: 14.5px !important;
    line-height: 1.58 !important;
  }

  .dashboard-dossier-visual {
    min-height: 220px !important;
    margin: 4px -8px 0 !important;
  }

  .dashboard-dossier-visual img {
    width: min(100%,282px) !important;
    max-height: 224px !important;
  }

  .dashboard-dossier-action {
    width: 100% !important;
    max-width: none !important;
    height: 54px !important;
    margin-top: auto !important;
    font-size: 15px !important;
  }
}

/* At the narrow edge of the compact-desktop range, keep the diagnostic card
   readable by reducing only decorative scale, never the text below 14px. */
@media (min-width:1081px) and (max-width:1220px) {
  .dashboard-bottom {
    grid-template-columns: minmax(390px,1.42fr) minmax(225px,.82fr) minmax(250px,.92fr) !important;
    gap: 12px !important;
  }
  .dashboard-bottom > .card { padding: 20px !important; }
  .dashboard-empty-report { grid-template-columns: 132px minmax(0,1fr); gap: 14px !important; }
  .dashboard-empty-visual img { width: 158px !important; max-height: 270px !important; }
  .dashboard-empty-copy h2 { font-size: 23px !important; }
  .dashboard-empty-copy p { font-size: 14px !important; line-height: 1.58 !important; }
  .dashboard-primary-action { left:20px !important; right:20px !important; }
  .artifact-dashboard-head .card-title,
  .dashboard-dossier-card .card-title { font-size:24px !important; }
  .artifact-empty-content p,
  .dashboard-dossier-card p { font-size:14px !important; }
}

/* Tablet: two-card rhythm with dossier as a wide status object. */
@media (min-width:761px) and (max-width:1080px) {
  .dashboard-bottom { grid-template-columns:minmax(0,1.25fr) minmax(270px,.75fr) !important; gap:14px !important; }
  .dashboard-bottom > .card { min-height:400px !important; }

  .dashboard-empty-report {
    min-height: 356px !important;
    display:grid !important;
    grid-template-columns:minmax(145px,.82fr) minmax(0,1.18fr);
    gap:16px !important;
    padding-bottom:68px;
  }
  .dashboard-empty-visual { min-height:260px; margin:0 !important; }
  .dashboard-empty-visual img { width:min(100%,178px) !important; max-height:270px !important; }
  .dashboard-empty-copy { padding:0 !important; align-self:center; }
  .dashboard-empty-copy h2 { max-width:none !important; font-size:25px !important; }
  .dashboard-empty-copy p { max-width:30ch !important; font-size:14.5px !important; line-height:1.58 !important; }
  .dashboard-primary-action { left:20px !important; right:20px !important; bottom:18px !important; transform:none !important; width:auto !important; }

  .artifact-dashboard-head { display:grid !important; grid-template-columns:minmax(0,1fr) auto !important; }
  .artifact-dashboard-head .card-title { max-width:8ch !important; font-size:25px !important; }
  .artifact-all-link { justify-self:end !important; font-size:11.5px !important; }

  .dashboard-bottom > .dashboard-dossier-card {
    grid-column:1/-1;
    min-height:320px !important;
    display:grid;
    grid-template-columns:minmax(0,.78fr) minmax(300px,1.22fr);
    grid-template-rows:1fr auto;
    column-gap:26px;
  }
  .dashboard-dossier-visual { grid-column:2; grid-row:1/3; min-height:275px !important; margin:0 !important; }
  .dashboard-dossier-visual img { width:min(100%,310px) !important; max-height:260px !important; }
  .dashboard-dossier-action { grid-column:1; grid-row:2; margin:18px 0 0 !important; }
}

/* Mobile: deliberate single-column composition, natural line breaks, large CTAs. */
@media (max-width:760px) {
  .dashboard-bottom { grid-template-columns:1fr !important; gap:14px !important; }
  .dashboard-bottom > .card { min-height:0 !important; padding:20px !important; }
  .dashboard-bottom .btn,
  .dashboard-bottom .link-gold { white-space:normal; }

  .dashboard-empty-report {
    min-height:0;
    display:flex !important;
    flex-direction:column;
    align-items:stretch;
    gap:0 !important;
    padding-bottom:78px;
  }
  .dashboard-empty-visual { min-height:225px; height:auto !important; margin:-8px 0 0 !important; }
  .dashboard-empty-visual img { width:min(78vw,245px) !important; max-height:300px !important; }
  .dashboard-empty-copy { align-items:center; text-align:center; padding:0 !important; }
  .dashboard-empty-copy h2 { max-width:15ch !important; font-size:30px !important; }
  .dashboard-empty-divider { margin:22px auto !important; }
  .dashboard-empty-copy p { max-width:36ch !important; font-size:16px !important; line-height:1.6 !important; }
  .dashboard-primary-action { left:20px !important; right:20px !important; bottom:18px !important; transform:none !important; width:auto !important; height:54px !important; }

  .artifact-dashboard-head { display:grid !important; grid-template-columns:minmax(0,1fr) auto !important; gap:10px !important; }
  .artifact-dashboard-head .card-title { max-width:none !important; font-size:27px !important; }
  .artifact-all-link { justify-self:end !important; }
  .artifact-empty-content { align-items:center; text-align:center; gap:16px !important; }
  .artifact-empty-visual { min-height:170px !important; }
  .artifact-empty-visual img { width:min(76vw,250px) !important; }
  .artifact-empty-content p { max-width:34ch !important; font-size:16px !important; }
  .artifact-footer-link { align-self:center; font-size:15px !important; }

  .dashboard-dossier-card p { font-size:16px !important; }
  .dashboard-dossier-visual { min-height:270px !important; }
  .dashboard-dossier-visual img { width:min(82vw,320px) !important; max-height:270px !important; }
  .dashboard-dossier-action { width:100% !important; height:56px !important; }
}

@media (prefers-reduced-motion: reduce) {
  .dashboard-bottom > .card,
  .dashboard-bottom img,
  .dashboard-bottom .btn { transition:none !important; }
  .dashboard-primary-action { transform:none !important; }
}

