/* Supporting pages use the approved layout tokens. */
#htlp :is(.content-heading, .content-section) { padding-block: 40px; }
#htlp .content-section { padding-bottom: 72px; }
#htlp .content-back { display: inline-flex; align-items: center; min-height: 44px; margin-bottom: 16px; font-size: 14px; font-weight: 600; text-decoration: none; }
#htlp .content-back:hover { text-decoration: underline; text-underline-offset: 4px; }
#htlp .content-heading .h1 { max-width: 28ch; font-size: clamp(30px, 4vw, 48px); line-height: 1.15; overflow-wrap: anywhere; }
#htlp .project-heading { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: center; }
#htlp .project-heading figure { display: flex; justify-content: center; background: var(--soft); margin: 0; border-radius: var(--r); overflow: hidden; }
#htlp .project-heading img { width: auto; height: auto; max-height: 460px; }
#htlp .project-heading .btn { margin-top: 28px; white-space: normal; text-align: center; }
#htlp .content-copy { font-size: 17px; line-height: 1.8; overflow-wrap: anywhere; }
#htlp :is(.page-copy, .project-copy) { padding: clamp(22px, 4vw, 48px); border: 1px solid var(--line); border-radius: var(--r); background: #fff; }
#htlp .page-copy { max-width: 900px; margin-inline: auto; }
#htlp .content-copy :is(h2, h3, h4) { margin-block: 1.5em .65em; line-height: 1.3; }
#htlp .content-copy h2 { font-size: clamp(23px, 2.5vw, 30px); }
#htlp .content-copy h3 { font-size: 22px; }
#htlp .content-copy p { margin-block: 0 1.2em; }
#htlp .content-copy > :first-child { margin-top: 0; }
#htlp .content-copy :is(ul, ol) { padding-left: 1.5em; }
#htlp .content-copy li + li { margin-top: .4em; }
#htlp .content-copy a { text-underline-offset: 3px; }
#htlp .content-copy img { height: auto; max-width: 100%; border-radius: 10px; }
#htlp .content-copy figure { max-width: 100%; margin-inline: 0; }
#htlp .content-copy blockquote { margin: 24px 0; padding: 16px 24px; border-left: 3px solid var(--g); background: var(--soft); }
#htlp .content-copy table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; }
#htlp .content-copy :is(th, td) { padding: 12px; border: 1px solid var(--line); text-align: left; }
#htlp .content-copy .gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin: 0 0 32px !important; }
#htlp .content-copy .gallery .gallery-item { float: none !important; width: auto !important; min-width: 0; margin: 0; }
#htlp .content-copy .gallery > br { display: none; }
#htlp .content-copy .gallery a { display: flex; height: 100%; align-items: center; justify-content: center; background: var(--soft); border-radius: 10px; overflow: hidden; }
#htlp .content-copy .gallery img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: contain; border: 0 !important; outline: 1px solid rgb(0 0 0 / .1); outline-offset: -1px; }
#htlp .content-copy .gallery-caption { margin: 8px 0; font-size: 14px; }
#htlp .content-copy .htd-next { display: flex; flex-wrap: wrap; gap: 12px 24px; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); }
#htlp .content-copy .htd-next a { display: inline-flex; align-items: center; min-height: 44px; }
#htlp .site-search { max-width: 600px; margin-top: 28px; }
#htlp .site-search label { display: block; font-weight: 600; margin-bottom: 8px; }
#htlp .site-search > div { display: flex; gap: 12px; }
#htlp .site-search input { min-width: 0; flex: 1; padding: 12px 14px; border: 1px solid var(--line2); border-radius: 10px; font: inherit; color: var(--ink); }
#htlp .content-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
#htlp .content-card { min-width: 0; border: 1px solid var(--line); border-radius: var(--r); background: #fff; overflow: hidden; }
#htlp .content-card .card-image { display: block; background: var(--soft2); }
#htlp .content-card img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
#htlp .content-card > div { padding: 24px; }
#htlp .content-card h2 { margin-bottom: 14px; font-size: 22px; line-height: 1.3; }
#htlp .content-card h2 a { color: var(--ink); text-decoration: none; }
#htlp .content-card h2 a:hover { color: var(--b); text-decoration: underline; }
#htlp .content-card p { font-size: 15px; }
#htlp .pagination { margin-top: 32px; }
#htlp .pagination .nav-links { display: flex; flex-wrap: wrap; gap: 8px; }
#htlp .pagination .page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 6px 12px; border-radius: 8px; background: #fff; border: 1px solid var(--line); text-decoration: none; }
#htlp .pagination .current { background: var(--b); color: #fff; }
#htlp .content-empty p { margin-bottom: 24px; }
#htlp .content-empty .btn { margin: 0 10px 12px 0; }
#htlp .screen-reader-text, #htlp .htd-visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

/* Keep the guide's floor-plan diagrams and copy in the shared visual style. */
#htlp .htd-guide-hero, #htlp .htd-guide-columns, #htlp .htd-guide-projects { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; }
#htlp .htd-guide-hero { align-items: center; }
#htlp .htd-guide h1 { font-size: clamp(30px, 4vw, 48px); margin-bottom: 24px; }
#htlp .htd-guide figure { margin: 0; }
#htlp .htd-guide img { width: 100%; height: auto; }
#htlp .htd-guide figcaption { padding-block: 16px; font-size: 14px; }
#htlp .htd-guide-note { border-left: 3px solid var(--g); padding-left: 16px; font-size: 14px; }
#htlp .htd-guide-button { display: inline-flex; padding: 14px 24px; border-radius: 12px; background: var(--grad); color: #fff; font-weight: 700; text-decoration: none; }
#htlp .htd-guide-nav { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 32px; padding-block: 12px; border-block: 1px solid var(--line); }
#htlp .htd-guide-nav a { min-height: 44px; padding: 8px 18px; border-radius: 8px; text-decoration: none; font-weight: 600; }
#htlp .htd-guide-nav a:hover { background: var(--soft2); }
#htlp .htd-guide-section { padding-top: 36px; scroll-margin-top: 100px; }
#htlp .htd-layouts { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 18px; margin-block: 28px; }
#htlp .htd-layout { min-width: 0; }
#htlp .htd-layout h3 { font-size: 20px; min-height: 52px; }
#htlp .htd-layout-sides { color: var(--b); font-size: 14px; min-height: 50px; }
#htlp .htd-layout details { border-top: 1px solid var(--line); }
#htlp .htd-layout summary { min-height: 48px; padding-block: 12px; font-size: 14px; font-weight: 600; cursor: pointer; }
#htlp .htd-layout details p { font-size: 14px; }
#htlp .htd-plan { height: 144px; position: relative; border-radius: 10px; background: var(--soft2); }
#htlp .htd-plan-legend { display: flex; flex-wrap: wrap; gap: 12px 24px; font-size: 14px; }
#htlp .htd-plan-legend span { display: inline-flex; align-items: center; gap: 10px; }
#htlp .htd-plan-legend span::before { content: ''; width: 26px; border-top: 4px solid var(--ink); }
#htlp .htd-plan-legend span + span::before { border-top: 3px dashed var(--g); }
#htlp .htd-plan-floor { position: absolute; inset: 22px; background: #fff; border: 3px dashed var(--g); }
#htlp .htd-plan-row .htd-plan-floor { border-top: 7px solid var(--ink); border-left: 7px solid var(--ink); border-right: 7px solid var(--ink); }
#htlp .htd-plan-corner .htd-plan-floor { border-top: 7px solid var(--ink); border-left: 7px solid var(--ink); }
#htlp .htd-plan-peninsula .htd-plan-floor { border-top: 7px solid var(--ink); }
#htlp .htd-plan-deck .htd-plan-floor { inset: 65px 28px 28px; border: 3px solid var(--ink); transform: skewY(-12deg); }
#htlp .htd-plan-deck .htd-plan-floor::before { content: ''; position: absolute; left: -3px; right: -3px; height: 35px; top: -36px; border: 3px solid var(--b); background: var(--soft2); }
#htlp .htd-plan-deck .htd-plan-floor::after { content: ''; position: absolute; inset: -3px 7px 0; border-inline: 3px solid var(--ink); }
#htlp .htd-guide-checklist, #htlp .htd-guide-close { padding: 28px; border-radius: var(--r); background: var(--soft); }
#htlp .htd-guide-close { margin-top: 40px; }
#htlp .htd-guide-schedule { display: grid; grid-template-columns: 1.4fr 1fr; gap: 32px; }
#htlp .htd-guide-schedule dl { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin: 0; }
#htlp .htd-guide-schedule dt strong { display: block; color: var(--b); font-size: 28px; }
#htlp .htd-guide-schedule dt span { display: block; font-size: 14px; }
#htlp .htd-guide-schedule dd { margin: 12px 0; }

/* The native dialog keeps keyboard focus inside the image viewer. */
.htlp-viewer { box-sizing: border-box; width: min(1100px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: 16px; border: 0; border-radius: 16px; background: #fff; color: #0f2a3a; font: 15px/1.5 'Open Sans', sans-serif; }
.htlp-viewer::backdrop { background: rgb(15 42 58 / .85); }
.htlp-viewer figure { margin: 8px 0; }
.htlp-viewer img { display: block; max-width: 100%; max-height: calc(100dvh - 190px); width: auto; height: auto; margin: auto; }
.htlp-viewer figcaption { margin-top: 12px; text-align: center; overflow-wrap: anywhere; }
.htlp-viewer .viewer-controls { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.htlp-viewer button { min-width: 44px; min-height: 44px; padding: 8px 14px; background: #f5f8fa; border: 1px solid #d3e0e5; border-radius: 8px; color: #0f2a3a; font: inherit; cursor: pointer; }
.htlp-viewer button:focus-visible { outline: 3px solid #057092; outline-offset: 2px; }
.htlp-viewer output { font-variant-numeric: tabular-nums; }
@media (max-width: 920px) {
    #htlp .content-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    #htlp .htd-layouts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    #htlp .htd-guide-schedule { grid-template-columns: 1fr; }
    #htlp .project-heading { gap: 28px; }
}
@media (max-width: 700px) {
    #htlp :is(.content-heading, .content-section) { padding-block: 28px; }
    #htlp .content-section { padding-bottom: 48px; }
    #htlp .project-heading, #htlp .content-cards, #htlp .htd-guide-hero, #htlp .htd-guide-columns, #htlp .htd-guide-projects { grid-template-columns: 1fr; }
    #htlp .project-heading img { max-height: 340px; }
    #htlp .content-copy { font-size: 16px; }
    #htlp .content-copy .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    #htlp .htd-layouts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    #htlp .htd-guide-schedule dl { gap: 16px; }
    #htlp .site-search .btn { padding-inline: 18px; }
}

/* Natural image proportions keep mixed project galleries compact. */
#htlp .project-copy .gallery.htlp-project-gallery {
  display: block;
  column-count: var(--gallery-columns, 3);
  column-gap: 18px;
  margin: 0 0 24px !important;
}
#htlp .project-copy .htlp-project-gallery .gallery-item {
  display: block;
  width: 100% !important;
  margin: 0 0 18px;
  break-inside: avoid;
}
#htlp .project-copy .htlp-project-gallery .gallery-item-wrapper,
#htlp .project-copy .htlp-project-gallery .gallery-icon {
  margin: 0;
  padding: 0;
}
#htlp .project-copy .htlp-project-gallery a {
  display: block;
  height: auto;
  background: transparent;
}
#htlp .project-copy .htlp-project-gallery img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: var(--image-ratio, auto);
}
@media (max-width: 700px) {
  #htlp .project-copy .gallery.htlp-project-gallery {
    column-count: var(--gallery-mobile-columns, 2);
    column-gap: 10px;
  }
  #htlp .project-copy .htlp-project-gallery .gallery-item { margin-bottom: 10px; }
}
