/* Ask Xpertto question detail — desktop layout (reference design)
   Uses viewport width so it works even when server device detection is wrong. */
@media (min-width: 768px) {
  body.xf-forum-detail .xf-page {
    padding-top: 88px;
    padding-bottom: 72px;
  }

  body.xf-forum-detail .xf-wrap {
    width: min(90%, 1280px);
    margin-left: auto;
    margin-right: auto;
    padding-left: 0;
    padding-right: 0;
  }

  body.xf-forum-detail .xf-grid--detail {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 320px) !important;
    gap: var(--xf-gap);
    align-items: start;
  }

  body.xf-forum-detail .xf-right {
    display: block !important;
  }

  body.xf-forum-detail .xf-mobile-cta,
  body.xf-forum-detail .xf-mobile-only {
    display: none !important;
  }

  body.xf-forum-detail .xf-expert-header {
    grid-template-columns: 52px minmax(0, 1fr) auto;
    align-items: center;
  }

  body.xf-forum-detail .xf-expert-header .xf-btn {
    grid-column: auto;
    width: auto;
  }

  body.xf-forum-detail .xf-answers-head {
    flex-direction: row;
    align-items: center;
  }

  body.xf-forum-detail .xf-action-row .xf-btn {
    width: auto;
  }

  body.xf-forum-detail .xf-breadcrumb {
    margin-top: 0;
  }

  /* —— Desktop detail: reference design polish —— */
  body.xf-forum-detail,
  body.xf-forum-detail .xf-page {
    background: #f4f6f9 !important;
  }

  body.xf-forum-detail .xf-breadcrumb {
    margin: 0 0 20px;
    font-size: 0.8125rem;
  }

  body.xf-forum-detail .xf-breadcrumb a,
  body.xf-forum-detail .xf-breadcrumb span {
    color: #6b7280 !important;
  }

  body.xf-forum-detail .xf-breadcrumb a:hover {
    color: var(--xf-primary) !important;
  }

  body.xf-forum-detail .xf-question {
    padding: 20px 20px 16px;
    margin-bottom: 14px;
    border-color: #e8ebf0;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  }

  body.xf-forum-detail .xf-question .xf-qcard-meta {
    margin-bottom: 8px;
  }

  body.xf-forum-detail .xf-question .xf-qcard-meta time {
    font-size: 0.8125rem;
    font-weight: 400;
    color: var(--xf-muted);
  }

  .xf-qauthor {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
  }

  .xf-qauthor__avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    background: #e5e7eb;
  }

  .xf-qauthor__info {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
  }

  .xf-qauthor__name {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--xf-ink);
  }

  .xf-qauthor__location {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 999px;
    background: #f3f4f6;
    color: #4b5563;
    font-size: 0.75rem;
    font-weight: 400;
  }

  body.xf-forum-detail .xf-question .xf-topic {
    background: #eef4fc;
    color: #1d5abd;
    border: 1px solid #d5e4f7;
  }

  body.xf-forum-detail .xf-action-row {
    gap: 10px;
    padding-top: 4px;
  }

  body.xf-forum-detail .xf-action-row__views {
    margin-left: auto;
    color: var(--xf-muted);
    font-size: 0.8125rem;
    font-weight: 400;
  }

  body.xf-forum-detail .xf-answers-head {
    margin: 0 0 16px;
  }

  .xf-sort-select select {
    min-height: 40px;
    padding: 8px 36px 8px 12px;
    border: 1px solid var(--xf-border);
    border-radius: var(--xf-radius-sm);
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%236B7280' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 12px center;
    color: var(--xf-ink);
    font-size: 0.875rem;
    font-weight: 400;
    font-family: inherit;
    appearance: none;
    cursor: pointer;
  }

  body.xf-forum-detail .xf-answer {
    padding: 24px;
    margin-bottom: 20px;
    border-color: #e8ebf0;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  }

  body.xf-forum-detail .xf-answer[data-featured="1"] {
    padding: 0 24px 24px;
    border-color: var(--xf-featured-border);
    background: #fff;
  }

  body.xf-forum-detail .xf-badge-helpful {
    display: flex;
    align-items: center;
    gap: 8px;
    width: calc(100% + 48px);
    margin: 0 -24px 18px;
    padding: 10px 24px;
    border-radius: 12px 12px 0 0;
    border-bottom: 1px solid var(--xf-featured-border);
    background: var(--xf-featured-bg);
    color: #0f766e;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }

  body.xf-forum-detail .xf-expert-header {
    margin-bottom: 14px;
  }

  body.xf-forum-detail .xf-answer-body p strong {
    color: var(--xf-ink);
  }

  body.xf-forum-detail .xf-answer-body h3 {
    margin: 14px 0 8px;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.45;
  }

  body.xf-forum-detail .xf-answer-body ol {
    list-style: none;
    margin: 0 0 16px;
    padding: 0;
    counter-reset: xf-step;
  }

  body.xf-forum-detail .xf-answer-body ol li {
    counter-increment: xf-step;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 10px;
    padding-left: 0;
  }

  body.xf-forum-detail .xf-answer-body ol li::before {
    content: counter(xf-step);
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--xf-accent);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 24px;
    text-align: center;
  }

  body.xf-forum-detail .xf-answer-body ol + p {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 0;
    padding: 12px 14px;
    border-radius: 10px;
    background: var(--xf-primary-soft);
    border: 1px solid #d5e4f7;
    color: #1e3a5f;
    font-size: 0.875rem;
    line-height: 1.55;
  }

  body.xf-forum-detail .xf-answer-body ol + p::before {
    content: "i";
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--xf-primary);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    font-style: italic;
    font-family: Georgia, serif;
    line-height: 20px;
    text-align: center;
  }

  body.xf-forum-detail .xf-disclaimer {
    margin-top: 18px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--xf-muted);
    font-size: 0.8125rem;
    font-style: italic;
  }

  body.xf-forum-detail .xf-conversion {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 20px;
    padding: 16px 18px;
    border-radius: 12px;
    background: var(--xf-primary-soft);
    border: 1px solid #d5e4f7;
  }

  body.xf-forum-detail .xf-conversion__copy {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    min-width: 0;
  }

  body.xf-forum-detail .xf-conversion__icon {
    flex-shrink: 0;
    margin-top: 2px;
    color: var(--xf-primary);
    font-size: 1.25rem;
  }

  body.xf-forum-detail .xf-conversion p {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.5;
    color: #1e3a5f;
  }

  body.xf-forum-detail .xf-conversion__text {
    font-size: 0.875rem;
    line-height: 1.5;
  }

  body.xf-forum-detail .xf-conversion-actions {
    flex-shrink: 0;
  }

  body.xf-forum-detail .xf-answer-footer__row--feedback .xf-answer-footer__prompt {
    margin-right: auto;
  }

  body.xf-forum-detail .xf-sidebar-expert {
    text-align: center;
    padding: 22px 20px;
  }

  body.xf-forum-detail .xf-sidebar-expert__head {
    margin-bottom: 14px;
  }

  body.xf-forum-detail .xf-sidebar-expert__avatar {
    width: 72px;
    height: 72px;
    margin: 0 auto 12px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
  }

  body.xf-forum-detail .xf-sidebar-expert__tags {
    justify-content: center;
    margin-bottom: 14px;
  }

  body.xf-forum-detail .xf-sidebar-expert__tags .xf-topic {
    background: var(--xf-accent-soft);
    color: var(--xf-accent);
    border: 1px solid #a7f3d0;
  }

  body.xf-forum-detail .xf-sidebar-expert__private {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 0 0 16px;
    color: var(--xf-muted);
    font-size: 0.8125rem;
  }

  body.xf-forum-detail .xf-sidebar-expert__profile {
    display: block;
    margin-top: 10px;
    text-align: center;
  }

  .xf-related-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 0;
    border-bottom: 1px solid #f3f4f6;
    color: var(--xf-ink) !important;
    text-decoration: none !important;
    font-size: 0.875rem;
    line-height: 1.4;
  }

  .xf-related-row:last-child {
    border-bottom: 0;
    padding-bottom: 0;
  }

  .xf-related-row:hover {
    color: var(--xf-primary) !important;
  }

  .xf-related-row > span {
    flex: 1;
    min-width: 0;
  }

  .xf-related-row > .bi-file-earmark-text {
    flex-shrink: 0;
    color: var(--xf-primary);
    font-size: 1rem;
  }

  .xf-related-row__chevron {
    flex-shrink: 0;
    color: #9ca3af;
    font-size: 0.875rem;
  }

  body.xf-forum-detail .xf-related h3 {
    margin-bottom: 4px;
    font-size: 1rem;
    font-weight: 600;
  }

  body.xf-forum-detail .xf-privacy-card {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 16px 18px;
  }

  body.xf-forum-detail .xf-privacy-card .bi-shield-lock {
    flex-shrink: 0;
    margin-top: 2px;
    color: var(--xf-primary);
    font-size: 1.125rem;
  }

  body.xf-forum-detail .xf-privacy-card p {
    margin: 0;
    font-size: 0.8125rem;
    line-height: 1.5;
    color: #4b5563;
  }

  body.xf-forum-detail .xf-aside-card {
    border-color: #e8ebf0;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  }

  body.xf-forum-detail .xf-right {
    display: flex;
    flex-direction: column;
    gap: 0;
  }

  body.xf-forum-detail .xf-grid--detail {
    gap: 32px;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 340px) !important;
  }
}
