/* R023 source geometry corrections derived from the original DOM audit.
   Keep these isolated so the existing shared override history stays intact. */
@media (min-width: 1200px) {
  /* The source sidebar is 282px wide and the main content has 20px/28px
     horizontal insets. This restores the source x=1064, w=490 content grid. */
  .editor-workspace #resume-paper.layout-tpl4 .resume-layout {
    grid-template-columns: 282px minmax(0, 1fr) !important;
    gap: 0 !important;
  }
  .editor-workspace #resume-paper.layout-tpl4 .resume-body {
    padding: 20px 28px 20px 20px !important;
  }
  .editor-workspace #resume-paper.layout-tpl4 .resume-section h3 {
    margin-left: -38px !important;
  }
  .editor-workspace #resume-paper.layout-tpl4 .resume-section h3 span {
    padding-left: 34px !important;
  }

  /* The prior R021 body offset moved every post-banner section 20px too high.
     Restore normal flow and the source's 6px gap after the identity panel. */
  .editor-workspace #resume-paper.layout-tpl9 .resume-body {
    top: 0 !important;
    margin-top: 20px !important;
  }
  .editor-workspace #resume-paper.layout-tpl9 .resume-contact-fields {
    box-sizing: border-box !important;
    width: 650px !important;
    margin-left: 10px !important;
    grid-template-columns: repeat(2, 325px) !important;
    column-gap: 0 !important;
  }

  /* Source item rows and rich-text blocks have a 10px inset in these layouts;
     the local flex children were using the full section width. */
  .editor-workspace #resume-paper:is(.layout-tpl2, .layout-tpl6, .layout-tpl7, .layout-tpl8, .layout-tpl10) .resume-body .resume-section-body,
  .editor-workspace #resume-paper:is(.layout-tpl2, .layout-tpl6, .layout-tpl7, .layout-tpl8, .layout-tpl10) .resume-body .resume-item-head {
    box-sizing: border-box !important;
    padding-left: 10px !important;
    padding-right: 10px !important;
  }

  /* The reference contact labels inherit regular 400 weight; the local editor
     had retained the bold form label weight inside the paper preview. */
  .editor-workspace #resume-paper[class*="layout-tpl"] .resume-contact-label,
  .editor-workspace #resume-paper[class*="layout-tpl"] .resume-contact-label * {
    font-weight: 400 !important;
  }

  /* Align the stock portrait placeholder with its source x-position. */
  .editor-workspace #resume-paper:is(.layout-tpl1, .layout-tpl5, .layout-tpl6, .layout-tpl7, .layout-tpl10) .resume-photo {
    margin-left: -10px !important;
  }
  .editor-workspace #resume-paper.layout-tpl5 .resume-photo { margin-top: -3px !important; }
  .editor-workspace #resume-paper.layout-tpl7 .resume-photo { margin-top: 8px !important; }

  /* The reference tpl5 tags end in a small triangular point over the rule. */
  .editor-workspace #resume-paper.layout-tpl5 .tpl5-module-label::after {
    content: "" !important;
    position: absolute !important;
    display: block !important;
    top: 0 !important;
    right: -14px !important;
    width: 14px !important;
    height: 29px !important;
    background: #3978a3 !important;
    clip-path: polygon(0 0, 100% 50%, 0 100%) !important;
  }

  /* Original tpl5 body copy uses the neutral near-black text color. */
  .editor-workspace #resume-paper.layout-tpl5 .resume-contact-fields,
  .editor-workspace #resume-paper.layout-tpl5 .resume-section-body {
    color: #262626 !important;
  }
  .editor-workspace #resume-paper.layout-tpl5 .resume-body > .resume-section:nth-child(2) .resume-section-body {
    position: relative !important;
    top: 2px !important;
  }

  /* Tpl10 uses a pale blue full-width title band behind a blue title label. */
  .editor-workspace #resume-paper.layout-tpl10 .resume-section h3 {
    box-sizing: border-box !important;
    padding: 0 !important;
    background: #d7e4ed !important;
  }
  .editor-workspace #resume-paper.layout-tpl10 .resume-section h3 span {
    display: inline-block !important;
    box-sizing: border-box !important;
    width: 104px !important;
    height: 28px !important;
    padding: 0 20px !important;
    background: #3978a3 !important;
    color: #fff !important;
    line-height: 28px !important;
  }

  /* Tpl8 uses the same 104×28 blue text label on a #f0f0f0 band. */
  .editor-workspace #resume-paper.layout-tpl8 .resume-section h3 {
    box-sizing: border-box !important;
    padding: 0 !important;
    background: #f0f0f0 !important;
  }
  .editor-workspace #resume-paper.layout-tpl8 .resume-section h3 span {
    display: inline-block !important;
    box-sizing: border-box !important;
    width: 104px !important;
    height: 28px !important;
    padding: 0 20px !important;
    background: #3978a3 !important;
    color: #fff !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    line-height: 28px !important;
  }
}
