/* Mystery Logic interface polish v2.0 — controlled density, useful visual anchors and information-first cards. */

/* Global rhythm: premium means deliberate spacing, not oversized empty zones. */
.ml-section{padding:clamp(46px,6vw,76px) 0!important}
.ml-section-head{margin-bottom:22px!important}

/* Homepage hero: two strong columns — proposition + real product preview. */
.ml-hero{
  min-height:0!important;
  display:grid!important;
  grid-template-columns:minmax(0,1.08fr) minmax(330px,.72fr)!important;
  gap:clamp(28px,4.5vw,56px)!important;
  align-items:center!important;
  padding:clamp(40px,5vw,62px)!important;
  background:
    radial-gradient(circle at 94% 8%,rgba(214,177,109,.10),transparent 19rem),
    radial-gradient(circle at 8% 100%,rgba(55,104,142,.15),transparent 22rem),
    linear-gradient(120deg,rgba(9,24,38,.99),rgba(14,35,54,.97) 60%,rgba(7,16,26,.98))!important;
}
.ml-hero:before,.ml-hero:after{display:none!important}
.ml-hero-copy{min-width:0}
.ml-hero h1{max-width:680px!important;font-size:clamp(3.4rem,6.2vw,5.9rem)!important;line-height:.82!important}
.ml-hero-lead{max-width:650px!important;margin-top:22px!important;font-size:clamp(1rem,1.65vw,1.18rem)!important}
.ml-hero .ml-actions{max-width:720px;margin-top:26px!important;gap:9px!important}
.ml-hero .ml-button{min-height:49px!important;padding:12px 16px!important;font-size:.88rem!important}
.ml-hero .ml-trust{grid-column:1/-1;max-width:none!important;margin-top:0!important}
.ml-hero .ml-trust div{padding:15px 17px!important}

.ml-hero-preview{
  position:relative;
  overflow:hidden;
  align-self:stretch;
  display:flex;
  flex-direction:column;
  justify-content:center;
  min-height:390px;
  padding:26px;
  border:1px solid rgba(214,177,109,.28);
  border-radius:18px;
  background:
    radial-gradient(circle at 90% 8%,rgba(214,177,109,.11),transparent 13rem),
    linear-gradient(150deg,rgba(18,43,66,.98),rgba(6,17,28,.99));
  box-shadow:0 24px 60px rgba(0,0,0,.28),inset 0 1px rgba(255,255,255,.035);
}
.ml-hero-preview:before{content:"";position:absolute;left:0;top:0;width:4px;height:100%;background:linear-gradient(var(--ml-gold-2),rgba(214,177,109,.08))}
.ml-preview-head{display:flex;justify-content:space-between;gap:16px;padding-bottom:13px;border-bottom:1px solid rgba(255,255,255,.09);color:var(--ml-gold-2);font-size:.68rem;font-weight:900;letter-spacing:.1em;text-transform:uppercase}
.ml-preview-label{margin:20px 0 0;color:var(--ml-muted);font-size:.68rem;font-weight:850;letter-spacing:.14em;text-transform:uppercase}
.ml-hero-preview h2{margin:8px 0 0;font-size:clamp(1.9rem,3vw,2.65rem)!important;line-height:.98!important;letter-spacing:-.035em!important}
.ml-preview-task{margin:15px 0 0;color:#bdc9d5;font-size:.9rem;line-height:1.6}
.ml-preview-facts{display:grid;gap:8px;margin-top:20px}
.ml-preview-facts div{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:11px 12px;border:1px solid rgba(255,255,255,.08);border-radius:10px;background:rgba(255,255,255,.025)}
.ml-preview-facts div.is-accent{border-color:rgba(214,177,109,.27);background:rgba(214,177,109,.07)}
.ml-preview-facts small{color:var(--ml-muted);font-size:.65rem;text-transform:uppercase;letter-spacing:.08em}
.ml-preview-facts strong{max-width:210px;color:#eef2f5;font-size:.78rem;text-align:right;line-height:1.3}
.ml-preview-link{align-self:flex-start;margin-top:19px;color:var(--ml-gold-2);font-size:.82rem;font-weight:900;text-decoration:none}
.ml-preview-link:hover{text-decoration:underline}

/* Open archive hero: a dense dashboard instead of a decorative sheet. */
.catalog-hero{padding:54px 0 30px!important}
.catalog-hero-grid{
  grid-template-columns:minmax(0,1.25fr) minmax(330px,.75fr)!important;
  gap:20px!important;
  align-items:stretch!important;
}
.catalog-case-file{
  display:grid!important;
  grid-template-columns:auto minmax(0,1fr)!important;
  align-content:center!important;
  column-gap:22px!important;
  row-gap:12px!important;
  min-height:0!important;
  padding:24px 26px!important;
  color:#fff!important;
  border:1px solid rgba(214,177,109,.22)!important;
  border-radius:18px!important;
  background:
    radial-gradient(circle at 100% 0,rgba(214,177,109,.10),transparent 15rem),
    linear-gradient(145deg,rgba(20,45,69,.96),rgba(8,20,33,.99))!important;
  box-shadow:0 18px 48px rgba(0,0,0,.20)!important;
  transform:none!important;
}
.catalog-case-file:before{display:none!important}
.catalog-case-file small{grid-column:1/-1;display:block!important;margin:0!important;color:var(--ml-gold-2)!important;font-size:.68rem!important;font-weight:850!important;letter-spacing:.14em!important}
.catalog-case-file strong{grid-column:1;grid-row:2/4;align-self:center;display:block!important;margin:0!important;color:#fff!important;font-family:var(--ml-display)!important;font-size:clamp(3.2rem,4.5vw,4.6rem)!important;line-height:.8!important}
.catalog-case-file p{grid-column:2;margin:0!important;color:#c4d0dc!important;font-size:.82rem!important;line-height:1.65!important}
.catalog-case-file:after{content:"100 в первом томе  ·  5–10 минут на дело";grid-column:1/-1;display:block;margin-top:4px;padding-top:13px;border-top:1px solid rgba(255,255,255,.09);color:var(--ml-gold-2);font-size:.72rem;font-weight:800;letter-spacing:.025em}

/* Free case cards: compact informational header + title + useful metadata. */
.case-grid{gap:14px!important}
.case-card{min-height:0!important;border-radius:14px!important;padding:0!important}
.case-card:before{content:"";display:block;height:3px;background:linear-gradient(90deg,rgba(214,177,109,.88),rgba(214,177,109,.12) 72%,transparent)}
.case-card[data-tone="2"]:before{background:linear-gradient(90deg,rgba(130,183,150,.82),rgba(130,183,150,.10) 72%,transparent)}
.case-card[data-tone="3"]:before{background:linear-gradient(90deg,rgba(185,88,70,.82),rgba(185,88,70,.10) 72%,transparent)}
.case-card-visual{display:none!important}
.case-card-body{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;column-gap:10px!important;row-gap:12px!important;padding:18px 19px 19px!important}
.case-head{grid-column:1;grid-row:1;display:flex!important;justify-content:flex-start!important;align-items:center!important;gap:8px!important;flex-wrap:wrap!important}
.case-progress-badge{grid-column:2;grid-row:1;justify-self:end!important;align-self:center!important;white-space:nowrap}
.case-card h3,.case-card p,.case-meta,.case-card a{grid-column:1/-1}
.case-card h3{margin-top:2px!important;font-size:1.38rem!important;line-height:1.08!important}
.case-card p{line-height:1.45!important;font-size:.84rem!important}
.case-meta{gap:6px!important}
.case-meta span{padding:6px 8px!important;font-size:.64rem!important}
.case-card a{min-height:43px!important;padding:10px 13px!important}
.case-card.is-locked .case-card-visual,.case-card[data-tone="2"] .case-card-visual,.case-card[data-tone="3"] .case-card-visual{display:none!important;filter:none!important}

/* Keep tool panels and archive sections visually connected rather than floating in excess space. */
.catalog-tools-advanced{margin:14px 0!important}
.case-set{padding-top:26px!important}
.set-heading{margin-bottom:16px!important}

@media(max-width:900px){
  .ml-hero{grid-template-columns:1fr!important;padding:clamp(34px,6vw,50px)!important}
  .ml-hero-preview{min-height:0;padding:23px!important}
  .ml-hero .ml-trust{margin-top:0!important}
  .catalog-hero-grid{grid-template-columns:1fr!important}
  .catalog-case-file{max-width:none!important}
}
@media(max-width:560px){
  .ml-section{padding:38px 0!important}
  .ml-hero{min-height:0!important;padding:27px 20px!important;gap:22px!important}
  .ml-hero h1{font-size:clamp(3rem,15vw,4.5rem)!important}
  .ml-hero .ml-actions{display:grid!important}
  .ml-hero-preview{padding:20px!important;border-radius:14px!important}
  .ml-preview-facts div{align-items:flex-start;flex-direction:column;gap:4px}
  .ml-preview-facts strong{max-width:none;text-align:left}
  .catalog-hero{padding:36px 0 22px!important}
  .catalog-case-file{grid-template-columns:auto 1fr!important;padding:19px!important}
  .catalog-case-file strong{font-size:3rem!important}
  .case-card{min-height:0!important}
  .case-card-body{grid-template-columns:1fr!important;padding:17px!important}
  .case-head,.case-progress-badge{grid-column:1!important;grid-row:auto!important;justify-self:start!important}
  .case-progress-badge{margin-top:-3px}
}
