/* =========================================================
   HAPPY PENS — SINGLE PEN TEMPLATE CSS
   Source: moved from main/custom CSS into kadence-child/assets/css/single-pen.css
   Scope: single CPT Pens template only
========================================================= */



/* =========================
   PEN GALLERY — CONTROLLED ACF GRID
========================= */

.hp-gallery-grid{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:18px;
}

.hp-gallery-item{
  position:relative;
  display:block;
  background:#F5F2EE;
  border:1px solid rgba(176,138,82,.22);
  border-radius:10px;
  overflow:hidden;
  text-decoration:none;
  box-shadow:0 10px 24px rgba(0,0,0,.04);
  transition:transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.hp-gallery-item:hover{
  transform:translateY(-3px);
  border-color:rgba(176,138,82,.46);
  box-shadow:0 16px 34px rgba(0,0,0,.07);
}

.hp-gallery-item img{
  width:100%;
  aspect-ratio:16/9;
  height:auto;
  object-fit:cover;
  display:block;
}

.hp-gallery-number{
  position:absolute;
  top:8px;
  left:8px;
  z-index:2;

  display:inline-flex;
  align-items:center;
  justify-content:center;

  width:26px;
  height:26px;

  background:rgba(253,251,248,.92);
  border:1px solid rgba(176,138,82,.38);
  border-radius:4px;

  color:#8A6A2F;
  font-family:DM Sans,sans-serif;
  font-size:12px;
  font-weight:700;
}

.hp-gallery-limit-notice{
  margin-top:22px;
  padding:18px 20px;
  background:#FDFBF8;
  border:1px solid rgba(176,138,82,.28);
  border-radius:12px;
  box-shadow:0 10px 24px rgba(0,0,0,.035);
}

.hp-gallery-limit-title{
  margin-bottom:6px;
  color:#2B2118;
  font-family:"Libre Baskerville", serif;
  font-size:17px;
  font-weight:700;
}

.hp-gallery-limit-text{
  color:#6E6257;
  font-family:DM Sans,sans-serif;
  font-size:14px;
  line-height:1.5;
}

.hp-gallery-upgrade-button{
  display:inline-flex;
  align-items:center;
  justify-content:center;

  margin-top:14px;
  height:36px;
  padding:0 16px;

  background:transparent;
  border:1.5px solid #B08A52;
  border-radius:4px;

  color:#B08A52;
  font-family:DM Sans,sans-serif;
  font-size:14px;
  font-weight:600;
  text-decoration:none;
  text-transform:uppercase;
  letter-spacing:.04em;
}

.hp-gallery-upgrade-button:hover{
  background:#B08A52;
  color:#FDFBF8;
}

@media(max-width:900px){
  .hp-gallery-grid{
    grid-template-columns:repeat(2, minmax(0, 1fr));
  }
}

@media(max-width:600px){
  .hp-gallery-grid{
    grid-template-columns:1fr;
  }
}


.hp-pen-badge-share-row{
  display:flex;
  align-items:center;
  width:100%;
  margin-bottom:12px;
}

.hp-pen-badge-share-row.hp-has-badge{
  justify-content:space-between;
}

.hp-pen-badge-share-row.hp-no-badge{
  justify-content:flex-end;
}

.hp-pen-badge-share-row .hp-archive-badge{
  margin:0;
}

.hp-hero-share-button{
  display:inline-flex;
  align-items:center;
  justify-content:center;

  height:34px;
  min-height:34px;
  max-height:34px;

  padding:0 14px;
  margin:0;

  background:transparent;
  border:1.5px solid #B08A52;
  border-radius:4px;

  color:#B08A52;

  font-family:DM Sans,sans-serif;
  font-size:15px;
  font-weight:500;
  line-height:1;
  letter-spacing:.04em;
  text-transform:uppercase;

  cursor:pointer;
  white-space:nowrap;
}

.hp-hero-share-button:hover{
  background:#B08A52;
  color:#FDFBF8;
}

/* =========================
   RELATED PENS
========================= */

.hp-related-pens{
  margin-top:80px;
}

.hp-related-pens h2{
  margin:0 0 16px;
  color:#2B2118;
  font-family:"Libre Baskerville", serif;
  font-size:20px;
  font-weight:700;
}

.hp-related-grid{
  display:grid;
  grid-template-columns:repeat(5,1fr);
  gap:22px;
  align-items:stretch;
}

.hp-related-card{
  display:flex;
  flex-direction:column;
  background:#FDFBF8;
  border:1px solid rgba(176,138,82,.22);
  border-radius:10px;
  overflow:hidden;
  text-decoration:none;
  box-shadow:0 10px 24px rgba(0,0,0,.04);
  transition:transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.hp-related-card:hover{
  transform:translateY(-3px);
  border-color:rgba(176,138,82,.46);
  box-shadow:0 16px 34px rgba(0,0,0,.07);
}

.hp-related-image{
  flex:0 0 auto;
  aspect-ratio:16/9;
  background:#F5F2EE;
  overflow:hidden;
}

.hp-related-image img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

.hp-related-content{
  flex:1;
  display:flex;
  flex-direction:column;
  padding:13px;
}

.hp-related-content h3{
  margin:0;
  color:#2B2118;
  font-family:"Libre Baskerville", serif;
  font-size:16px;
  line-height:1.28;
}

.hp-related-meta{
  margin-top:auto;
  padding-top:8px;
  color:#7A6A55;
  font-family:DM Sans,sans-serif;
  font-size:12px;
  font-weight:500;
  line-height:1.4;
}

.hp-meta-separator{
  margin:0 4px;
  opacity:.6;
}

@media(max-width:1000px){
  .hp-related-grid{
    grid-template-columns:repeat(3,1fr);
  }
}

@media(max-width:700px){
  .hp-related-grid{
    grid-template-columns:1fr;
    gap:16px;
  }
}

/* =========================
   HP SINGLE PEN TEMPLATE
========================= */

.hp-pen-page{
  max-width:1250px;
  margin:0 auto;
  padding:34px 22px 60px;
 background:#F5F2EE;
}

/* =========================
   HERO
========================= */

.hp-pen-breadcrumbs{
  margin-bottom:16px;
  color:#8A6A2F;
  font-family:DM Sans,sans-serif;
  font-size:13px;
}

.hp-pen-breadcrumbs a{
  color:#8A6A2F;
  text-decoration:none;
}

.hp-pen-breadcrumbs a:hover{
  text-decoration:underline;
}

.hp-pen-breadcrumbs .hp-breadcrumb-current{
  color:#171411;
  font-weight:600;
}

.hp-pen-hero{
  margin-bottom:32px;
}

.hp-pen-hero-grid{
  display:grid;
  grid-template-columns:minmax(0,1.25fr) minmax(360px,.75fr);
  gap:30px;
  align-items:stretch;
}

.hp-pen-hero-image{
  background:#F5F2EE;
  border:1px solid rgba(176,138,82,.24);
  border-radius:14px;
  overflow:hidden;
  box-shadow:0 16px 36px rgba(0,0,0,.055);
}

.hp-pen-hero-image img{
  width:100%;
  height:100%;
  min-height:380px;
  object-fit:cover;
  display:block;
}

.hp-pen-hero-info{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  justify-content:flex-start;

  background:#FDFBF8;
  border:1px solid rgba(176,138,82,.26);
  border-radius:14px;
  padding:34px;
  box-shadow:0 14px 30px rgba(0,0,0,.04);
}

.hp-hero-title{
  margin:0;
  width:100%;
  text-align:center;
}

.hp-title-line-1{
  display:block;

  color:#2B2118;
  font-family:"Libre Baskerville", serif;
  font-size:38px;
  font-weight:700;
  line-height:1.2;
}

.hp-title-line-2{
  display:block;

  margin-top:4px;

  color:#4A4035;
  font-family:"Libre Baskerville", serif;
  font-size:30px;
  font-weight:600;
  line-height:1.25;
}

.hp-title-line-3{
  display:block;

  margin-top:6px;

  color:#7A6A55;
  font-family:DM Sans,sans-serif;
  font-size:28px;
  font-weight:500;
  letter-spacing:.03em;
  line-height:1.4;
}



/* =========================
   HERO BOTTOM GROUP
========================= */

.hp-pen-bottom-group{
  display:flex;
  flex-direction:column;
  align-items:flex-start;

  width:100%;

  margin-top:auto;
  gap:26px;
}

.hp-pen-hero-info .hp-archive-badge{
  align-self:flex-start;
  width:auto;
  max-width:max-content;
  margin:0;
}

.hp-pen-actions{
  display:flex;
  width:100%;

  align-items:flex-start;
  justify-content:space-between;
  gap:18px;

  margin-top:0;
}

.hp-hero-button-slot{
  display:flex;
  flex-direction:column;
  justify-content:flex-start;
  align-items:flex-start;
  align-self:flex-start;
  width:auto;
  min-width:0;
}

.hp-hero-collection{
  align-items:flex-end;
  text-align:center;
}

.hp-hero-button-slot *{
  box-sizing:border-box;
}

.hp-hero-button-slot a,
.hp-hero-button-slot button,
.hp-hero-button-slot .simplefavorite-button,
.hp-hero-button-slot [class*="favorite"],
.hp-hero-button-slot [class*="collection"]{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:auto;
  min-width:0;
  max-width:max-content;
  height:34px;
  min-height:34px;
  max-height:34px;
  padding:0 14px;
  margin:0;
  line-height:1;
  font-size:15px;
  font-weight:600;
  border-radius:4px;
  white-space:nowrap;
}

/* Hero action slots: the primary action and Limit Reached badge must share
   the same top line. Upgrade is secondary and stays below without moving the
   neighbouring slot. */
.hp-pen-actions .hp-hero-button-slot .hpc-action-limit{
  display:flex;
  flex-direction:column;
  justify-content:flex-start;
  align-items:stretch;
  width:auto;
  min-width:0;
  margin:0;
}

.hp-pen-actions .hp-hero-button-slot .hpc-action-upgrade{
  display:block;
  width:100%;
  max-width:none;
  margin-top:6px;
  text-align:center;
}

/* =========================
   SPECS
========================= */

.hp-pen-page .hp-specs-note{
  margin:0 0 16px;
  color:#6E6257;
  font-size:14px;
  font-weight:400;
  line-height:1.5;
}

.hp-specs-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:18px;
}

.hp-specs-grid > div{
  display:flex;
  flex-direction:column;
  gap:0px;
}

.hp-spec-row{
  display:grid;
  grid-template-columns:40% 60%;
  align-items:stretch;
  min-height:42px;
  background:#FDFBF8;
  border: 1px solid  rgba(176,138,82,0.22);
  border-radius:4px;
  overflow:hidden;
}

.hp-spec-label{
  display:flex;
  align-items:center;
  padding:10px 12px;
  background:#F5F2EE;
  color:#8A6A2F;
  font-family:DM Sans,sans-serif;
  font-size:14px;
  font-weight:600;
}

.hp-spec-value{
  display:flex;
  align-items:center;
  padding:10px 12px;
  color:#2B2118;
  font-size:15px;
}

.hp-spec-row:hover{
  border-color:rgba(170,120,82,1);
}

/* =========================
   TABS — CARD BUTTON STYLE
========================= */

.hp-pen-tabs-wrap{
  background:#FDFBF8;
  border:1px solid rgba(176,138,82,.24);
  border-radius:16px;
  padding:24px;
  box-shadow:0 14px 24px rgba(0,0,0,.04);
}

.hp-pen-tabs-nav{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  margin-bottom:26px;
  padding-bottom:18px;
  border-bottom:1px solid rgba(176,138,82,.16);
}

.hp-pen-tabs-nav button{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:12px;

  min-height:50px;
  padding:0 20px;

  background:#F5F2EE;

  border:1.5px solid rgba(176,138,82,.18);
  border-radius:6px;

  color:#2B2118;

  font-family:DM Sans,sans-serif;
  font-size:18px;
  font-weight:500;
  line-height:1;

  cursor:pointer;

  box-shadow:0px 1px 8px rgba(0,0,0,.1);

  transition:
    transform .2s ease,
    box-shadow .2s ease,
    border-color .2s ease,
    background .2s ease,
    color .2s ease;
}

.hp-pen-tabs-nav button::before{
  font-size:22px;
  line-height:1;
  font-weight:400;
  color:currentColor;
}

/* icons */
.hp-pen-tabs-nav button[data-tab="specs"]::before{
  content:"☰";
}

.hp-pen-tabs-nav button[data-tab="description"]::before{
  content:"▤";
}

.hp-pen-tabs-nav button[data-tab="about"]::before{
  content:"✎";
}

.hp-pen-tabs-nav button[data-tab="gallery"]::before{
  content:"▧";
}

.hp-pen-tabs-nav button[data-tab="restoration"]::before{
  content:"⛭";
}

.hp-pen-tabs-nav button[data-tab="research"]::before{
  content:"⌕";
}

.hp-pen-tabs-nav button:hover{
  transform:translateY(-2px);
  border-color:rgba(176,138,82,.38);
  box-shadow:0 10px 24px rgba(0,0,0,.3);
}

.hp-pen-tabs-nav button.active{
  background:#B08A52;
  border-color:#B08A52;
  color:#FDFBF8;
  box-shadow:0 10px 24px rgba(176,138,82,.26);
}

.hp-pen-tab{
  display:none;
  color:#2B2118;
}

.hp-pen-tab.active{
  display:block;
}

.hp-pen-tab p{
  color:#5E5A55;
  line-height:1.65;
}

.hp-pen-tab img{
  max-width:100%;
  height:auto;
  border-radius:10px;
}

@media(max-width:700px){
  .hp-pen-tabs-nav{
    gap:10px;
  }

  .hp-pen-tabs-nav button{
    width:100%;
    justify-content:flex-start;
    min-height:52px;
    padding:0 18px;
  }
}

/* =========================
   RESPONSIVE
========================= */

@media(max-width:900px){

  .hp-pen-hero-grid{
    grid-template-columns:1fr;
  }

  .hp-specs-grid{
    grid-template-columns:1fr;
  }

}

@media(max-width:600px){

  .hp-pen-page{
    padding:22px 14px 44px;
    overflow-x:hidden;
  }

  .hp-pen-hero-grid{
    grid-template-columns:1fr;
    gap:18px;
  }

  .hp-pen-hero-image{
    width:100%;
    max-width:100%;
  }

  .hp-pen-hero-image img{
    width:100%;
    height:auto;
    min-height:0;
    object-fit:cover;
  }

  .hp-pen-hero-info{
    width:100%;
    max-width:100%;
    padding:22px;
  }

  .hp-title-line-1{
  font-size:30px;
  }

  .hp-title-line-2{
  font-size:22px;
  }

  .hp-title-line-3{
  font-size:18px;
  }

  .hp-pen-badge-share-row{
    flex-direction:column;
    align-items:stretch;
    gap:10px;
    width:100%;
  }

  .hp-pen-badge-share-row .hp-archive-badge{
    align-self:flex-start;
  }



  .hp-hero-share-button{
    width:100%;
    max-width:100%;
  }

  .hp-pen-actions{
    display:flex;
    flex-direction:column;
    align-items:stretch;
    gap:10px;
  }

  .hp-hero-button-slot,
  .hp-hero-collection{
    width:100%;
    align-items:stretch;
    text-align:left;
  }

  .hp-pen-bottom-group{
  margin-top:26px;
  }

  .hp-hero-button-slot a,
  .hp-hero-button-slot button,
  .hp-hero-button-slot .simplefavorite-button,
  .hp-hero-button-slot [class*="favorite"],
  .hp-hero-button-slot [class*="collection"]{
    width:100%;
    max-width:100%;
  }

  .hp-pen-tabs-wrap{
    padding:18px;
  }

}


.hp-archive-badge{
  display:inline-flex;
  align-items:center;

  margin:10px 0 22px;
  padding:7px 14px;

  background:#F7F1E7;

  border:1px solid rgba(176,138,82,0.42);
  border-radius:5px;

  color:#7C5E2B;

  font-family:DM Sans,sans-serif;
  font-size:12px;
  font-weight:700;
  letter-spacing:.09em;
  text-transform:uppercase;

  box-shadow:0 4px 10px rgba(0,0,0,0.03);
}

.hp-archive-badge-reference{
  background:#F7F1E7;
}

.hp-archive-badge-research_pending{
  background:#F3ECE0;
  border-color:rgba(176,138,82,0.52);
}

.hp-research-progress{
  margin:20px 0;
  padding:18px 20px;
  background:#FDFBF8;
  border:1px solid rgba(176,138,82,0.28);
  border-radius:12px;
  box-shadow:0 10px 24px rgba(0,0,0,0.035);
}

.hp-research-progress-top{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:18px;
  margin-bottom:14px;
}

.hp-research-progress-label{
  margin-bottom:5px;
  color:#8A6A2F;
  font-family:DM Sans,sans-serif;
  font-size:12px;
  font-weight:650;
  letter-spacing:.06em;
  text-transform:uppercase;
}

.hp-research-progress-title{
  color:#2B2118;
  font-size:16px;
  font-weight:600;
}

.hp-research-progress-count{
  color:#8A6A2F;
  font-size:18px;
  font-weight:650;
  white-space:nowrap;
}

.hp-research-progress-bar{
  height:8px;
  background:#F1EADF;
  border-radius:999px;
  overflow:hidden;
}

.hp-research-progress-bar span{
  display:block;
  height:100%;
  background:#B08A52;
  border-radius:999px;
}

.hp-research-progress-note{
  margin-top:10px;
  color:#6E6257;
  font-size:13px;
  line-height:1.45;
}

.hp-archive-status-notice{
  margin:22px 0;
  padding:18px 20px;
  background:#FDFBF8;
  border:1px solid rgba(176,138,82,0.28);
  border-radius:12px;
  box-shadow:0 10px 24px rgba(0,0,0,0.035);
}

.hp-archive-status-label{
  margin-bottom:8px;
  color:#8A6A2F;
  font-family:DM Sans,sans-serif;
  font-size:13px;
  font-weight:650;
  letter-spacing:.06em;
  text-transform:uppercase;
}

.hp-archive-status-notice p{
  margin:0;
  color:#6E6257;
  line-height:1.55;
}

.hp-archive-status-research{
  border-color:rgba(176,138,82,0.42);
}



/* =========================
   HP PEN CONTRIBUTION FORM
========================= */

.hp-pen-contribution-box{
  margin-top:28px;
  padding:26px;
  background:#FDFBF8;
  border:1px solid rgba(176,138,82,0.28);
  border-radius:14px;
  box-shadow:0 14px 30px rgba(0,0,0,0.04);
}

.hp-pen-contribution-box h3{
  margin:0 0 10px;
  color:#2B2118;
}

.hp-pen-contribution-box p{
  max-width:760px;
  margin:0 0 22px;
  color:#6E6257;
  line-height:1.55;
}

.hp-pc-grid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:16px;
}

.hp-pc-field{
  margin-bottom:16px;
}

.hp-pc-field label{
  display:block;
  margin-bottom:7px;
  color:#2B2118;
  font-family:DM Sans,sans-serif;
  font-size:13px;
  font-weight:600;
}

.hp-pc-field label span{
  color:#8A6A2F;
  font-weight:500;
}

.hp-pc-field input,
.hp-pc-field textarea{
  width:100%;
  padding:11px 12px;
  background:#fff;
  border:1px solid rgba(176,138,82,0.32);
  border-radius:5px;
  color:#2B2118;
  font-size:14px;
}

.hp-pc-field textarea{
  resize:vertical;
}

.hp-pc-field input:focus,
.hp-pc-field textarea:focus{
  outline:none;
  border-color:#B08A52;
  box-shadow:0 0 0 3px rgba(176,138,82,0.12);
}

.hp-pc-full{
  margin-top:4px;
}

.hp-pc-warning{
  margin:18px 0;
  padding:13px 15px;
  background:#F5F2EE;
  border:1px solid rgba(176,138,82,0.24);
  border-radius:6px;
  color:#6E6257;
  font-size:14px;
  line-height:1.45;
}

.hp-pc-submit{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:9px 18px;
  background:transparent;
  border:1px solid #B08A52;
  border-radius:4px;
  color:#B08A52;
  font-family:DM Sans,sans-serif;
  font-size:14px;
  font-weight:550;
  letter-spacing:.03em;
  cursor:pointer;
  transition:all .2s ease;
}

.hp-pc-submit:hover{
  background:#B08A52;
  color:#FDFBF8;
}

.hp-pen-contribution-notice,
.hp-pen-contribution-success{
  margin-top:24px;
  padding:18px 20px;
  background:#FDFBF8;
  border:1px solid rgba(176,138,82,0.28);
  border-radius:12px;
  color:#6E6257;
  box-shadow:0 10px 24px rgba(0,0,0,0.035);
}

.hp-pen-contribution-success{
  color:#2B2118;
  border-color:rgba(176,138,82,0.42);
}

@media(max-width:900px){
  .hp-pc-grid{
    grid-template-columns:repeat(2,1fr);
  }
}

@media(max-width:600px){
  .hp-pc-grid{
    grid-template-columns:1fr;
  }

  .hp-pen-contribution-box{
    padding:20px;
  }

  .hp-pc-submit{
    width:100%;
  }
}

/* =========================
   HAPPY PENS LIGHTBOX
========================= */

.hp-lightbox{
  position:fixed;
  inset:0;
  z-index:999999;

  display:none;
  align-items:center;
  justify-content:center;

  padding:34px;

  background:rgba(20,16,12,.86);
}

.hp-lightbox.active{
  display:flex;
}

.hp-lightbox-backdrop{
  position:absolute;
  inset:0;
  z-index:1;
}

.hp-lightbox-inner{
  position:relative;
  z-index:2;

  display:flex;
  align-items:center;
  justify-content:center;

  width:100%;
  max-width:1180px;
  max-height:88vh;
}

.hp-lightbox-image{
  display:block;

  max-width:100%;
  max-height:88vh;

  width:auto;
  height:auto;

  object-fit:contain;

  background:#F5F2EE;
  border:1px solid rgba(176,138,82,.35);
  border-radius:10px;
  box-shadow:0 24px 70px rgba(0,0,0,.45);
}

.hp-lightbox-close,
.hp-lightbox-prev,
.hp-lightbox-next{
  position:absolute;
  z-index:3;

  display:inline-flex;
  align-items:center;
  justify-content:center;

  border:1px solid rgba(176,138,82,.55);
  background:rgba(253,251,248,.94);
  color:#8A6A2F;

  cursor:pointer;
  box-shadow:0 10px 24px rgba(0,0,0,.22);
}

.hp-lightbox-close{
  top:-18px;
  right:-18px;

  width:38px;
  height:38px;

  border-radius:50%;
  font-size:28px;
  line-height:1;
}

.hp-lightbox-prev,
.hp-lightbox-next{
  top:50%;
  transform:translateY(-50%);

  width:42px;
  height:54px;

  border-radius:6px;
  font-size:42px;
  line-height:1;
}

.hp-lightbox-prev{
  left:-58px;
}

.hp-lightbox-next{
  right:-58px;
}

.hp-lightbox-close:hover,
.hp-lightbox-prev:hover,
.hp-lightbox-next:hover{
  background:#B08A52;
  color:#FDFBF8;
}

.hp-lightbox-counter{
  position:absolute;
  left:50%;
  bottom:-34px;
  transform:translateX(-50%);

  padding:5px 10px;

  background:rgba(253,251,248,.92);
  border:1px solid rgba(176,138,82,.35);
  border-radius:4px;

  color:#7A6A55;
  font-family:DM Sans,sans-serif;
  font-size:13px;
  font-weight:600;
}

body.hp-lightbox-open{
  overflow:hidden;
}

@media(max-width:700px){

  .hp-lightbox{
    padding:18px;
  }

  .hp-lightbox-inner{
    max-height:82vh;
  }

  .hp-lightbox-image{
    max-height:82vh;
  }

  .hp-lightbox-close{
    top:8px;
    right:8px;
  }

  .hp-lightbox-prev{
    left:8px;
  }

  .hp-lightbox-next{
    right:8px;
  }

  .hp-lightbox-prev,
  .hp-lightbox-next{
    width:38px;
    height:48px;
    font-size:34px;
  }

  .hp-lightbox-counter{
    bottom:10px;
  }

}

/* =========================
   ABOUT THE PEN
========================= */

.hp-about-grid{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:18px;
  align-items:stretch;
}

.hp-about-card,
.hp-about-service,
.hp-about-reference{
  background:#FDFBF8;
  border:1px solid rgba(176,138,82,.22);
  border-radius:12px;
  padding:20px;
  box-shadow:0 10px 24px rgba(0,0,0,.035);
}

.hp-about-card h3,
.hp-about-service h3,
.hp-about-reference h3{
  margin:0 0 12px;
  color:#8A6A2F;
  font-family:DM Sans,sans-serif;
  font-size:13px;
  font-weight:700;
  letter-spacing:.08em;
  text-transform:uppercase;
}

.hp-about-text{
  color:#5E5A55;
  font-size:15px;
  line-height:1.7;
}

.hp-about-empty{
  color:#8A8278;
  font-family:DM Sans,sans-serif;
  font-size:14px;
  line-height:1.55;
  font-style:italic;
}

.hp-about-detail-list{
  margin:0;
}

.hp-about-detail-row{
  display:grid;
  grid-template-columns:38% 62%;
  border-top:1px solid rgba(176,138,82,.16);
  padding:9px 0;
}

.hp-about-detail-row:first-child{
  border-top:0;
  padding-top:0;
}

.hp-about-detail-row dt{
  color:#8A6A2F;
  font-family:DM Sans,sans-serif;
  font-size:13px;
  font-weight:650;
}

.hp-about-detail-row dd{
  margin:0;
  color:#2B2118;
  font-size:14px;
  line-height:1.45;
}

.hp-about-media img{
  width:100%;
  aspect-ratio:4/3;
  height:auto;
  object-fit:cover;
  display:block;
  border-radius:8px;
  background:#F5F2EE;
  border:1px solid rgba(176,138,82,.18);
}

.hp-about-service,
.hp-about-reference,
.hp-about-restoration-note{
  margin-top:18px;
}

.hp-about-service-box{
  color:#5E5A55;
  font-size:15px;
  line-height:1.7;
}

.hp-about-reference-grid{
  display:grid;
  grid-template-columns:repeat(4, minmax(0, 1fr));
  gap:12px;
}

.hp-about-reference-grid img{
  width:100%;
  aspect-ratio:4/3;
  height:auto;
  object-fit:cover;
  display:block;
  border-radius:8px;
  background:#F5F2EE;
  border:1px solid rgba(176,138,82,.18);
}

.hp-about-restoration-note{
  padding:14px 16px;
  background:#F5F2EE;
  border:1px solid rgba(176,138,82,.18);
  border-radius:10px;
  color:#7A6A55;
  font-family:DM Sans,sans-serif;
  font-size:13px;
  line-height:1.5;
}

.hp-about-intro{
  margin-bottom:22px;
  padding:18px 22px;

  background:#FDFBF8;
  border:1px solid rgba(176,138,82,.22);
  border-radius:12px;

  box-shadow:0 10px 24px rgba(0,0,0,.035);
}

.hp-about-intro{
  text-align:center;
}

.hp-about-intro strong{
  display:inline;

  color:#2B2118;
  font-family:"Libre Baskerville", serif;
  font-size:22px;
  font-weight:700;
}

.hp-about-intro span{
  display:inline;

  color:#6E6257;
  font-family:DM Sans,sans-serif;
  font-size:18px;
  line-height:1.6;
}

@media(max-width:900px){
  .hp-about-grid{
    grid-template-columns:1fr;
  }

  .hp-about-reference-grid{
    grid-template-columns:repeat(2, minmax(0, 1fr));
  }
}

@media(max-width:600px){
  .hp-about-card,
  .hp-about-service,
  .hp-about-reference{
    padding:16px;
  }

  .hp-about-reference-grid{
    grid-template-columns:1fr;
  }
}

.hp-about-locked{
  max-width:720px;
  margin:22px auto 0;
  padding:24px 28px;

  background:#FDFBF8;
  border:1px solid rgba(176,138,82,.28);
  border-radius:14px;

  text-align:center;
  box-shadow:0 14px 30px rgba(0,0,0,.045);
}

.hp-about-locked-label{
  margin-bottom:8px;

  color:#8A6A2F;
  font-family:DM Sans,sans-serif;
  font-size:12px;
  font-weight:700;
  letter-spacing:.09em;
  text-transform:uppercase;
}

.hp-about-locked h3{
  margin:0 0 10px;

  color:#2B2118;
  font-family:"Libre Baskerville", serif;
  font-size:24px;
  font-weight:700;
}

.hp-about-locked p{
  max-width:560px;
  margin:0 auto;

  color:#5E5A55;
  font-family:DM Sans,sans-serif;
  font-size:15px;
  line-height:1.65;
}

.hp-about-locked-access{
  margin-top:14px;

  color:#8A6A2F;
  font-family:DM Sans,sans-serif;
  font-size:13px;
  font-weight:650;
}

.hp-about-locked-button{
  display:inline-flex;
  align-items:center;
  justify-content:center;

  margin-top:18px;
  height:38px;
  padding:0 18px;

  background:transparent;
  border:1.5px solid #B08A52;
  border-radius:4px;

  color:#B08A52;
  font-family:DM Sans,sans-serif;
  font-size:14px;
  font-weight:650;
  text-decoration:none;
  text-transform:uppercase;
  letter-spacing:.04em;
}

.hp-about-locked-button:hover{
  background:#B08A52;
  color:#FDFBF8;
}

@media(max-width:600px){
  .hp-about-locked{
    padding:20px 18px;
  }

  .hp-about-locked h3{
    font-size:21px;
  }

  .hp-about-locked-button{
    width:100%;
  }
}

/* =========================
   RARITY STATUS
========================= */

.hp-rarity-status{
  margin-top:22px;
  background:#FDFBF8;
  border:1px solid rgba(176,138,82,.26);
  border-radius:12px;
  overflow:hidden;
  box-shadow:0 10px 24px rgba(0,0,0,.035);
}

.hp-rarity-header{
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:12px;

  padding:14px 18px;
  background:#F5F2EE;
  border-bottom:1px solid rgba(176,138,82,.18);
}

.hp-rarity-title{
  color:#8A6A2F;
  font-family:DM Sans,sans-serif;
  font-size:13px;
  font-weight:700;
  letter-spacing:.08em;
  text-transform:uppercase;
}

.hp-rarity-level{
  display:inline-flex;
  align-items:center;
  justify-content:center;

  min-height:30px;
  padding:0 12px;

  background:#FDFBF8;
  border:1px solid rgba(176,138,82,.36);
  border-radius:4px;

  color:#2B2118;
  font-family:DM Sans,sans-serif;
  font-size:13px;
  font-weight:700;
  letter-spacing:.04em;
  text-transform:uppercase;
}

.hp-rarity-note{
  padding:18px 20px;
  color:#5E5A55;
  font-size:15px;
  line-height:1.7;
}

.hp-rarity-note p{
  margin:0 0 10px;
}

.hp-rarity-note p:last-child{
  margin-bottom:0;
}

.hp-rarity-locked{
  padding:20px;
  text-align:center;
}

.hp-rarity-locked-title{
  margin-bottom:8px;
  color:#2B2118;
  font-family:"Libre Baskerville", serif;
  font-size:18px;
  font-weight:700;
}

.hp-rarity-locked-text{
  max-width:560px;
  margin:0 auto;
  color:#6E6257;
  font-family:DM Sans,sans-serif;
  font-size:14px;
  line-height:1.55;
}

.hp-rarity-upgrade-button{
  display:inline-flex;
  align-items:center;
  justify-content:center;

  margin-top:16px;
  height:36px;
  padding:0 16px;

  background:transparent;
  border:1.5px solid #B08A52;
  border-radius:4px;

  color:#B08A52;
  font-family:DM Sans,sans-serif;
  font-size:14px;
  font-weight:650;
  text-decoration:none;
  text-transform:uppercase;
  letter-spacing:.04em;
}

.hp-rarity-upgrade-button:hover{
  background:#B08A52;
  color:#FDFBF8;
}

@media(max-width:600px){
  .hp-rarity-header{
    flex-direction:column;
    align-items:flex-start;
  }

  .hp-rarity-level{
    width:100%;
  }

  .hp-rarity-upgrade-button{
    width:100%;
  }
}

.hp-description-content{
  max-width:820px;
  margin:0 auto;
}

.hp-description-intro{
  margin-bottom:24px;
  text-align:center;
}

.hp-description-intro strong{
  display:inline;
  color:#2B2118;
  font-family:"Libre Baskerville", serif;
  font-size:22px;
  font-weight:700;
}

.hp-description-intro span{
  display:inline;
  color:#6E6257;
  font-family:DM Sans,sans-serif;
  font-size:18px;
  line-height:1.6;
}

.hp-description-text{
  color:#2B2118;
  font-size:17px;
  line-height:1.75;
}

.hp-description-text p{
  margin:0 0 18px;
}

.hp-description-text p:last-child{
  margin-bottom:0;
}

/* =========================
   ABOUT reference photos loop
========================= */


.hp-about-reference-item{
  position:relative;
  display:block;
  width:100%;
  padding:0;
  margin:0;

  background:#F5F2EE;
  border:1px solid rgba(176,138,82,.18);
  border-radius:8px;
  overflow:hidden;

  cursor:zoom-in;
}

.hp-about-reference-item img{
  width:100%;
  aspect-ratio:4/3;
  height:auto;
  object-fit:cover;
  display:block;
  border:0;
  border-radius:0;
  transition:transform .25s ease, filter .25s ease;
}

.hp-about-reference-item:hover img{
  transform:scale(1.035);
  filter:brightness(1.04);
}

.hp-reference-zoom-icon{
  position:absolute;
  top:8px;
  right:8px;
  z-index:2;

  display:inline-flex;
  align-items:center;
  justify-content:center;

  width:28px;
  height:28px;

  background:rgba(253,251,248,.92);
  border:1px solid rgba(176,138,82,.42);
  border-radius:50%;

  color:#8A6A2F;
  font-size:15px;
  line-height:1;

  opacity:0;
  transform:translateY(-3px);
  transition:opacity .2s ease, transform .2s ease;
}

.hp-about-reference-item:hover .hp-reference-zoom-icon{
  opacity:1;
  transform:translateY(0);
}

.hp-hero-edit-button{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;

  height:34px;
  min-height:34px;
  max-height:34px;

  padding:0 14px;
  margin:0;

  background:transparent;
  border:1.5px solid #B08A52;
  border-radius:4px;

  color:#B08A52;

  font-family:DM Sans,sans-serif;
  font-size:15px;
  font-weight:600;
  line-height:1;
  letter-spacing:.04em;
  text-transform:uppercase;
  text-decoration:none;

  cursor:pointer;
  white-space:nowrap;
}

.hp-hero-edit-button:hover{
  background:#B08A52;
  border-color:#B08A52;
  color:#FDFBF8;
}

/* =========================
   DESCRIPTION AUTHOR
========================= */

.hp-description-author{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:7px;
  width:100%;
  margin:0 0 18px;
  text-align:right;
}

.hp-description-author span{
  color:#8A6A2F;
  font-family:DM Sans,sans-serif;
  font-size:11px;
  font-weight:700;
  line-height:1;
  letter-spacing:.08em;
  text-transform:uppercase;
}

.hp-description-author a{
  color:#112118;
  font-family:"Libre Baskerville",serif;
  font-size:14px;
  font-weight:700;
  line-height:1.2;
  text-decoration:none
}

.hp-description-author a:hover{
  color:#B08A52;
}

.hpc-pen-contribution-credit{
    margin-top:12px;
    padding:10px 12px;
    border:1px solid rgba(176,138,82,0.22);
    border-radius:6px;
    background:#FDFBF8;
    color:#5E5A55;
    font-size:13px;
    font-weight:700;
    line-height:1.4;
}
/* =========================================================
   HPA ARCHIVE NUMBER
========================================================= */

.hp-pen-topline{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
  margin-bottom:16px;
}

.hp-pen-topline .hp-pen-breadcrumbs{
  margin-bottom:0;
}

.hp-pen-archive-number{
  flex:0 0 auto;
  color:#8A8177;
  font-family:DM Sans,sans-serif;
  font-size:12px;
  font-weight:600;
  letter-spacing:.06em;
  white-space:nowrap;
}

/* Admin-only Availability shortcut. */
.hp-hero-availability-button{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  height:34px;
  min-height:34px;
  max-height:34px;
  padding:0 12px;
  margin:0;
  background:transparent;
  border:1.5px solid #70856D;
  border-radius:4px;
  color:#587056;
  font-family:DM Sans,sans-serif;
  font-size:12px;
  font-weight:650;
  line-height:1;
  letter-spacing:.035em;
  text-transform:uppercase;
  text-decoration:none;
  white-space:nowrap;
}

.hp-hero-availability-button:hover{
  background:#70856D;
  border-color:#70856D;
  color:#FDFBF8;
}

.hp-pen-badge-share-row{
  gap:8px;
  flex-wrap:wrap;
}


/* CPT Pen page rules retained from the former mixed Availability chapter. */
@media(max-width:600px){
.hp-pen-topline{
    align-items:flex-start;
    flex-direction:column;
    gap:5px;
  }.hp-pen-archive-number{
    align-self:flex-end;
  }.hp-hero-availability-button{
    width:100%;
    max-width:100%;
  }
}

/* Archive Number: page layout (moved from Availability stylesheet). */
/* Archive number: always on the same top row as breadcrumbs. */
.hp-pen-topline{
  display:grid !important;
  grid-template-columns:minmax(0,1fr) auto !important;
  align-items:center !important;
  gap:18px !important;
  width:100% !important;
  margin-bottom:16px !important;
}

.hp-pen-topline .hp-pen-breadcrumbs{
  min-width:0;
  margin:0 !important;
}

.hp-pen-topline .hp-pen-archive-number{
  justify-self:end;
  align-self:center;
  margin:0 !important;
  color:#8A8177;
  font-family:DM Sans,sans-serif;
  font-size:12px;
  font-weight:600;
  line-height:1.2;
  letter-spacing:.06em;
  white-space:nowrap;
}


@media(max-width:600px){
  /* Keep archive number on the right of the breadcrumb row. */
  .hp-pen-topline{
    grid-template-columns:minmax(0,1fr) auto !important;
    align-items:start !important;
    gap:9px !important;
  }

  .hp-pen-topline .hp-pen-archive-number{
    align-self:start !important;
    justify-self:end !important;
    font-size:10px;
  }

}

/* CPT Pen Hero guest actions: page layout, not Availability. */
/* =========================================================
   LOGGED-OUT HERO ACTIONS
   Long login labels must stay inside the hero card.
========================================================= */

body:not(.logged-in) .hp-pen-page .hp-pen-actions{
  display:grid !important;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr) !important;
  gap:9px !important;
  align-items:stretch !important;
  justify-content:stretch !important;
}

body:not(.logged-in) .hp-pen-page .hp-hero-button-slot{
  width:100% !important;
  min-width:0 !important;
}

body:not(.logged-in) .hp-pen-page .hp-hero-button-slot a,
body:not(.logged-in) .hp-pen-page .hp-hero-button-slot button,
body:not(.logged-in) .hp-pen-page .hp-hero-button-slot .simplefavorite-button,
body:not(.logged-in) .hp-pen-page .hp-hero-button-slot [class*="favorite"],
body:not(.logged-in) .hp-pen-page .hp-hero-button-slot [class*="favourite"],
body:not(.logged-in) .hp-pen-page .hp-hero-button-slot [class*="collection"]{
  width:100% !important;
  min-width:0 !important;
  max-width:100% !important;
  padding-left:7px !important;
  padding-right:7px !important;
  font-size:10.5px !important;
  letter-spacing:0 !important;
  white-space:nowrap !important;
  overflow:hidden !important;
  text-overflow:clip !important;
}


/* CPT Pen Hero: on phones only, give guest login actions a full row each.
   Desktop and logged-in presentation are intentionally unchanged. */
@media (max-width:600px){
  body:not(.logged-in) .hp-pen-page .hp-pen-actions{
    grid-template-columns:minmax(0,1fr) !important;
  }
  body:not(.logged-in) .hp-pen-page .hp-hero-button-slot{
    width:100% !important;
  }
  body:not(.logged-in) .hp-pen-page .hp-hero-button-slot a,
  body:not(.logged-in) .hp-pen-page .hp-hero-button-slot button{
    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;
    box-sizing:border-box !important;
    padding-left:12px !important;
    padding-right:12px !important;
    font-size:14px !important;
    letter-spacing:.02em !important;
    white-space:nowrap !important;
    overflow:visible !important;
    text-overflow:clip !important;
  }
}