/*
 * Phase 2 home refresh
 * Focus:
 * - first-screen content density
 * - webchat rhythm
 * - news readability
 * - monitor/telemetry cleanup
 * - lighter cookie banner
 */

@media (min-width: 1180px){
  body.page-home{
    --home-shell-gap: clamp(10px, .9vw, 14px);
    --home-panel-pad: clamp(11px, .95vw, 14px);
  }

  body.page-home main.wrap > .grid{
    padding-bottom: calc(var(--cookie-banner-h, 0px) + 4px);
  }

  body.page-home .homeMainGrid{
    gap: clamp(12px, .95vw, 16px);
  }

  body.page-home .sitePanel__head{
    padding: 13px 16px 11px;
  }

  body.page-home .sitePanel__head .h1{
    font-size: 17px;
    line-height: 1.08;
  }

  body.page-home .sitePanel__head .hint{
    max-width: 42ch;
    font-size: 11px;
    line-height: 1.34;
    color: rgba(231,237,243,.62);
  }

  body.page-home .sitePanel--webchat .panel-body,
  body.page-home .sitePanel--news .panel-body{
    padding: 12px;
  }

  body.page-home .sitePanel--webchat .webchat__list{
    padding: 10px;
    border-radius: 18px;
    background:
      radial-gradient(120% 140% at 0% 0%, rgba(255,255,255,.035), rgba(255,255,255,0) 48%),
      linear-gradient(180deg, rgba(10,12,18,.76), rgba(6,8,14,.88));
    border-color: rgba(255,255,255,.08);
    box-shadow:
      inset 0 1px 0 rgba(255,255,255,.04),
      0 18px 34px rgba(0,0,0,.26);
  }

  body.page-home .webchatMsg{
    gap: 11px;
    padding: 9px 10px;
    margin-bottom: 9px;
    border-radius: 16px;
    border-color: rgba(255,255,255,.07);
    background:
      linear-gradient(180deg, rgba(255,255,255,.038), rgba(255,255,255,.018));
    transition: border-color .16s ease, background .16s ease, transform .16s ease;
  }

  body.page-home .webchatMsg:hover{
    border-color: rgba(240,140,40,.18);
    background:
      linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.024));
    transform: translateY(-1px);
  }

  body.page-home .webchatAvatar{
    width: 38px;
    height: 38px;
    border-radius: 13px;
  }

  body.page-home .webchatMeta{
    gap: 7px;
    margin-bottom: 5px;
    font-size: 11px;
  }

  body.page-home .webchatPrefix{
    padding: 2px 7px;
    font-size: 10px;
  }

  body.page-home .webchatBadge,
  body.page-home .webchatDelivery{
    padding: 2px 6px;
    font-size: 10px;
  }

  body.page-home .webchatText{
    font-size: 13px;
    line-height: 1.4;
    color: rgba(231,237,243,.9);
  }

  body.page-home .webchat__composer{
    padding: 10px 11px;
    gap: 8px;
    border-radius: 17px;
    border-color: rgba(255,255,255,.09);
    background:
      linear-gradient(180deg, rgba(16,20,28,.84), rgba(11,15,22,.92));
    box-shadow:
      inset 0 1px 0 rgba(255,255,255,.04),
      0 16px 32px rgba(0,0,0,.24);
  }

  body.page-home .webchatMeRow{
    gap: 9px;
  }

  body.page-home .webchat__input{
    min-height: 40px;
    padding-inline: 13px;
    border-radius: 13px;
    background: rgba(8,12,18,.88);
  }

  body.page-home .webchat__send{
    min-width: 118px;
    min-height: 40px;
    border-radius: 13px;
  }

  body.page-home .webchat__status{
    min-height: 15px;
    font-size: 11px;
  }

  body.page-home .sitePanel--news .newsGrid--home{
    gap: 12px;
  }

  body.page-home .sitePanel--news .newsGrid--home .newsCard{
    padding: 10px;
    gap: 12px;
    border-radius: 18px;
    border-color: rgba(255,255,255,.08);
    background:
      radial-gradient(120% 120% at 100% 0%, rgba(255,255,255,.03), rgba(255,255,255,0) 50%),
      linear-gradient(180deg, rgba(18,20,26,.92), rgba(14,16,22,.96));
    box-shadow:
      inset 0 1px 0 rgba(255,255,255,.04),
      0 18px 32px rgba(0,0,0,.22);
  }

  body.page-home .sitePanel--news .newsGrid--home .newsCard__cover{
    flex-basis: clamp(206px, 21vw, 248px);
    max-width: clamp(206px, 21vw, 248px);
    border-radius: 14px;
  }

  body.page-home .sitePanel--news .newsGrid--home .newsCard__body{
    gap: 8px;
    justify-content: center;
  }

  body.page-home .sitePanel--news .newsGrid--home .newsCard__title{
    font-size: clamp(17px, 1.04vw, 20px);
    line-height: 1.14;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
  }

  body.page-home .sitePanel--news .newsGrid--home .newsCard__text{
    font-size: 13px;
    line-height: 1.43;
    color: rgba(231,237,243,.72);
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
    max-width: 56ch;
  }

  body.page-home .sitePanel--news .newsGrid--home .newsCard__actions{
    padding-top: 2px;
  }

  body.page-home aside.stack > .sitePanel > .panel-body{
    padding: 11px;
  }

  body.page-home .sitePanel--monitor .panel-body{
    gap: 0;
  }

  body.page-home .sitePanel--monitor .kv strong{
    font-size: 16px;
    letter-spacing: -.01em;
  }

  body.page-home .sitePanel--monitor .progress{
    height: 9px;
    border-radius: 999px;
    overflow: hidden;
    margin-top: 10px;
  }

  body.page-home .monitorMeta{
    gap: 9px;
    margin-top: 12px;
  }

  body.page-home .monitorMeta .kv{
    min-height: 74px;
    padding: 11px 12px;
    border-radius: 14px;
    background:
      linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,.024));
  }

  body.page-home .monitorMeta .muted{
    font-size: 10px;
    letter-spacing: .09em;
  }

  body.page-home .monitorMeta b{
    font-size: 14px;
    line-height: 1.24;
  }

  body.page-home .monitorActions{
    gap: 8px;
    margin-top: 11px;
  }

  body.page-home .monitorActions .btn-primary,
  body.page-home .monitorActions .btn-ghost{
    min-height: 38px;
    border-radius: 13px;
    flex-basis: 0;
  }

  body.page-home .divider{
    margin: 12px 0;
    background: linear-gradient(90deg, rgba(255,255,255,0), rgba(255,255,255,.12), rgba(255,255,255,0));
  }

  body.page-home .telemetryHead{
    gap: 12px;
    margin-top: 2px;
  }

  body.page-home .telemetryTitle{
    font-size: 14px;
    letter-spacing: .01em;
  }

  body.page-home .telemetryList{
    gap: 7px;
    margin-top: 10px;
    padding-right: 2px;
  }

  body.page-home .telemetryRow{
    gap: 11px;
    padding: 9px 10px;
    border-radius: 14px;
    border-color: rgba(255,255,255,.08);
    background:
      linear-gradient(180deg, rgba(255,255,255,.042), rgba(255,255,255,.02));
  }

  body.page-home .telemetryAvatar{
    width: 30px;
    height: 30px;
    border-radius: 11px;
  }

  body.page-home .telemetryName{
    font-size: 13px;
    line-height: 1.16;
  }

  body.page-home .telemetryMeta{
    font-size: 11px;
    color: rgba(231,237,243,.64);
  }

  body.page-home .telemetryBadge{
    padding: 5px 7px;
    font-size: 10px;
  }

  body.page-home .homeActionsPanel > .panel-body{
    gap: 8px;
  }

  body.page-home .cookieBanner{
    left: max(16px, env(safe-area-inset-left));
    right: max(16px, env(safe-area-inset-right));
    bottom: max(12px, env(safe-area-inset-bottom));
  }

  body.page-home .cookieBanner__inner{
    max-width: 740px;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 18px;
    border-color: rgba(255,255,255,.1);
    background: rgba(9,11,15,.88);
    box-shadow: 0 18px 38px rgba(0,0,0,.34);
    backdrop-filter: blur(10px);
  }

  body.page-home .cookieBanner__text{
    font-size: 11px;
    line-height: 1.32;
  }

  body.page-home .cookieBanner__actions{
    gap: 6px;
  }

  body.page-home .cookieBanner__quick{
    gap: 6px;
  }

  body.page-home .cookieBanner .btn.btn--sm,
  body.page-home .cookieBanner .btn.btn--ghost.btn--sm{
    min-height: 31px;
    padding: 6px 11px;
    font-size: 11px;
  }
}

@media (max-width: 1179px){
  body.page-home .cookieBanner__inner{
    max-width: none;
  }
}
