/* Habura desktop shell redesign — scoped to desktop only. */
@media (min-width: 769px) {
  body > header.hbr-dheader {
    position: sticky;
    top: 0;
    z-index: 99;
    width: 100%;
    max-height: none;
    background: #fff;
    border-top: 3px solid var(--hbr-red, #d1100e);
    box-shadow: 0 8px 24px rgba(27, 27, 34, .07);
  }

  .hbr-dheader-main,
  .hbr-dheader-nav-inner,
  .hbr-dfooter-inner,
  .hbr-dfooter-bottom-inner {
    width: min(1145px, calc(100% - 40px));
    margin-inline: auto;
  }

  .hbr-dheader-main {
    min-height: 72px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 28px;
  }

  .hbr-dheader-logo a,
  .hbr-dheader-logo svg {
    display: block;
  }

  .hbr-dheader-logo svg {
    width: 126px;
    height: auto;
  }

  /* Match the approved mobile logo exactly: dark letters, soft-gray badge,
     and one red brand dot. Target the SVG's existing semantic classes so
     unrelated paths are never recolored. */
  .hbr-dheader-logo .hbr-logo-letters {
    fill: var(--hbr-ink, #1b1b22);
  }

  .hbr-dheader-logo .hbr-logo-badge {
    fill: #e4e4ea;
  }

  .hbr-dheader-logo .hbr-logo-dot {
    fill: var(--hbr-red, #d1100e);
  }

  .hbr-dheader-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--hbr-muted, #8c8c97);
    font-size: 14px;
    font-weight: 500;
  }

  .hbr-dheader-date {
    white-space: nowrap;
  }

  .hbr-dheader-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
  }

  .hbr-daction,
  .hbr-dprofile-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 11px;
    border: 1px solid var(--hbr-line, #ededf0);
    border-radius: 12px;
    background: #fff;
    color: var(--hbr-ink, #1b1b22);
    box-shadow: none;
    text-decoration: none;
    cursor: pointer;
    transition: background-color .18s ease, border-color .18s ease, transform .18s ease;
  }

  .hbr-daction:hover,
  .hbr-dprofile-btn:hover {
    background: var(--hbr-soft, #f7f7f9);
    border-color: var(--hbr-line-strong, #d8d8e0);
    transform: translateY(-1px);
  }

  .hbr-daction-write {
    gap: 7px;
    padding-inline: 15px;
    background: var(--hbr-red, #d1100e);
    border-color: var(--hbr-red, #d1100e);
    color: #fff;
    font-weight: 700;
  }

  .hbr-daction-write:hover {
    background: var(--hbr-red-deep, #b40d0b);
    border-color: var(--hbr-red-deep, #b40d0b);
  }

  .hbr-daction svg,
  .hbr-dprofile-btn svg {
    display: block;
  }

  .hbr-dnotif-dot {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: var(--hbr-red, #d1100e);
    border: 2px solid #fff;
  }

  .hbr-dprofile {
    position: relative;
  }

  .hbr-dprofile-btn {
    gap: 8px;
    padding: 4px 7px 4px 11px;
    font-weight: 600;
    font-size: 14px;
  }

  .hbr-dprofile-btn img,
  .hbr-dprofile-btn .hbr-avatar-fallback {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
  }

  .hbr-dprofile-name {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .hbr-dprofile .user-dropdown {
    top: calc(100% + 10px);
    left: 0;
    width: 220px;
    padding: 8px;
    border: 1px solid var(--hbr-line, #ededf0);
    border-radius: 14px;
    background: #fff;
    color: var(--hbr-ink, #1b1b22);
    box-shadow: 0 18px 50px rgba(27, 27, 34, .14);
  }

  .hbr-dprofile .user-dropdown li {
    margin: 0;
    border: 0;
    padding: 0;
  }

  .hbr-dprofile .user-dropdown li:last-child {
    margin-top: 5px;
    padding-top: 5px;
    border-top: 1px solid var(--hbr-line, #ededf0);
  }

  .hbr-dprofile .user-dropdown a {
    display: block;
    padding: 9px 11px;
    border-radius: 9px;
    color: var(--hbr-ink, #1b1b22);
    font-weight: 500;
  }

  .hbr-dprofile .user-dropdown a:hover {
    background: var(--hbr-soft, #f7f7f9);
    color: var(--hbr-red, #d1100e);
  }

  .hbr-dheader-nav {
    border-top: 1px solid var(--hbr-line, #ededf0);
    background: #fff;
  }

  .hbr-dheader-nav-inner {
    min-height: 52px;
    display: flex;
    align-items: center;
    gap: 16px;
  }

  .hbr-dheader-nav .nh-links {
    min-width: 0;
    flex: 1;
  }

  .hbr-dheader-nav .habura-primary-menu {
    gap: 4px;
  }

  .hbr-dheader-nav .habura-primary-menu > li > a {
    display: block;
    padding: 13px 12px 11px;
    color: #4f4f58;
    font-size: 16px;
    font-weight: 600;
    border-bottom: 3px solid transparent;
  }

  .hbr-dheader-nav li.current-menu-item > a,
  .hbr-dheader-nav .habura-primary-menu > li > a:hover {
    color: var(--hbr-red, #d1100e);
    border-bottom-color: var(--hbr-red, #d1100e);
  }

  /* Keep search at the physical left edge in the RTL desktop navigation. */
  .hbr-dheader-search {
    width: 240px;
    flex: 0 0 240px;
    margin-inline-start: auto;
  }

  .hbr-dheader-search form,
  .hbr-dheader-search label {
    display: block;
    position: relative;
    width: 100%;
    margin: 0;
  }

  .hbr-dheader-search label::before {
    content: "";
    position: absolute;
    z-index: 2;
    top: 50%;
    right: 13px;
    width: 18px;
    height: 18px;
    transform: translateY(-50%);
    pointer-events: none;
    background: center / 18px 18px no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%238c8c97' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E");
  }

  .hbr-dheader-search .search-field {
    width: 100%;
    height: 40px;
    border: 1px solid var(--hbr-line-strong, #d8d8e0);
    border-radius: 12px;
    outline: 0;
    background: #fff;
    padding: 7px 42px 7px 14px;
    color: var(--hbr-ink, #1b1b22);
    font-size: 14px;
    line-height: 1;
    box-shadow: 0 1px 2px rgba(27, 27, 34, .03);
    transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
  }

  .hbr-dheader-search .search-field::placeholder {
    color: var(--hbr-muted, #8c8c97);
    opacity: 1;
  }

  .hbr-dheader-search .search-field:hover {
    border-color: #c8c8d0;
  }

  .hbr-dheader-search .search-field:focus {
    border-color: var(--hbr-red, #d1100e);
    box-shadow: 0 0 0 3px rgba(209, 16, 14, .1);
  }

  .hbr-dheader-search .search-submit {
    display: none;
  }

  .site-new-footer.hbr-dfooter {
    margin-top: 40px;
    background: #171820;
    color: #fff;
  }

  .hbr-dfooter-inner {
    display: grid;
    grid-template-columns: minmax(220px, 1.2fr) minmax(260px, 1.45fr) minmax(150px, .75fr) minmax(210px, 1fr);
    align-items: start;
    gap: 26px;
    padding-block: 28px 22px;
  }

  .hbr-dfooter-brand svg {
    width: 132px;
    height: auto;
  }

  /* Dark-footer variant keeps the same brand accents as mobile while using
     white letters for contrast against the footer background. */
  .hbr-dfooter-brand .hbr-logo-letters {
    fill: #fff;
  }

  .hbr-dfooter-brand .hbr-logo-badge {
    fill: #e4e4ea;
  }

  .hbr-dfooter-brand .hbr-logo-dot {
    fill: var(--hbr-red, #d1100e);
  }

  .hbr-dfooter-brand p {
    max-width: 300px;
    margin: 9px 0 0;
    color: #c8c9d0;
    font-size: 14px;
    line-height: 1.5;
  }

  .hbr-dfooter-title {
    margin-bottom: 8px;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
  }

  .hbr-dfooter ul {
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .hbr-dfooter-inner > section:nth-child(2) .habura-footer-menu {
    display: grid;
    grid-template-columns: repeat(2, minmax(105px, 1fr));
    column-gap: 22px;
    row-gap: 2px;
  }

  .hbr-dfooter li + li {
    margin-top: 4px;
  }

  .hbr-dfooter-inner > section:nth-child(2) li + li {
    margin-top: 0;
  }

  .hbr-dfooter a {
    color: #c8c9d0;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.3;
  }

  .hbr-dfooter a:hover {
    color: #fff;
  }

  .hbr-dfooter-cta {
    padding: 15px;
    border: 1px solid rgba(255,255,255,.11);
    border-radius: 14px;
    background: rgba(255,255,255,.045);
  }

  .hbr-dfooter-cta p {
    margin: 0 0 10px;
    color: #c8c9d0;
    font-size: 14px;
    line-height: 1.45;
  }

  .hbr-dfooter-cta a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 38px;
    padding: 7px 13px;
    border-radius: 10px;
    background: var(--hbr-red, #d1100e);
    color: #fff;
    font-weight: 700;
  }

  .hbr-dfooter-bottom {
    border-top: 1px solid rgba(255,255,255,.1);
  }

  .hbr-dfooter-bottom-inner {
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    color: #989aa4;
    font-size: 12px;
  }

  .hbr-dfooter-bottom a {
    color: #b9bac2;
  }

  @media (max-width: 1050px) {
    .hbr-dheader-main { gap: 16px; }
    .hbr-dheader-meta { display: none; }
    .hbr-dheader-search {
      width: 190px;
      flex-basis: 190px;
    }
    .hbr-dfooter-inner {
      grid-template-columns: 1.15fr 1.45fr .8fr;
      gap: 22px;
    }
    .hbr-dfooter-cta {
      grid-column: 1 / -1;
      display: grid;
      grid-template-columns: 1fr auto;
      align-items: center;
      gap: 10px 20px;
    }
    .hbr-dfooter-cta .hbr-dfooter-title,
    .hbr-dfooter-cta p {
      margin: 0;
    }
    .hbr-dfooter-cta a {
      grid-column: 2;
      grid-row: 1 / span 2;
    }
  }
}
