.detail-intro { background: #f2f5f8; }
.project-intro { padding-block: clamp(24px, 3vw, 48px); }
.project-intro .summary { max-width: 48em; }
.project-banner h1 { text-wrap: balance; }
.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, .86fr) minmax(0, 1.14fr);
  gap: clamp(32px, 5vw, 82px);
  align-items: center;
  padding-block: clamp(40px, 5.8vw, 88px);
}
.detail-lead h1 { margin: 24px 0 18px; font-size: clamp(2.5rem, 4.4vw, 4.5rem); text-wrap: balance; }
.development { color: var(--blue); font-size: .95rem; font-weight: 650; margin: -4px 0 14px; }
.summary, .story-content p { line-height: 1.85; font-size: clamp(1rem, 1.33vw, 1.24rem); }
.detail-lead .cta, .detail-lead .text-link { margin-top: 24px; }
figure { margin: 0; min-width: 0; }
figcaption, .source-note { color: var(--muted); font-size: .94rem; line-height: 1.65; }
figcaption { margin-top: 10px; }
.overview-images, .story-images .original {
  background: #e6edf3;
  padding: clamp(12px, 1.6vw, 24px);
}
.overview-images { display: flex; gap: clamp(12px, 2vw, 32px); justify-content: center; align-items: center; }
.overview-images .original { min-width: 0; }
.overview-images img { max-height: 460px; object-fit: contain; }
.overview-images .portrait img { max-height: 390px; width: auto; max-width: 100%; }
.detail-body { max-width: 1440px; }
.service-photo { display: block; width: 100%; height: auto; }
.contact-page { display: flex; flex-direction: column; min-height: 100vh; min-height: 100svh; }
.contact-page main { flex: 1; }
.contact-methods { display: grid; grid-template-columns: fit-content(100%) minmax(0, 1fr); }
.contact-methods dt, .contact-methods dd:first-of-type { grid-column: 1 / -1; }
.contact-methods dd { grid-column: 1; }
.contact-methods dt { border-top: 1px solid var(--line); padding-top: 16px; color: var(--muted); }
.contact-methods dd + dt { margin-top: 16px; }
.contact-qr-box { contain: inline-size; min-width: 0; }
.contact-qr { width: 100%; height: auto; margin-top: 8px; padding: 4%; background: white; }
.contact-methods a { display: inline-flex; align-items: center; min-height: 44px; color: var(--blue); font-size: clamp(1.4rem, 2.3vw, 1.65rem); font-weight: 650; }
.contact-methods a:hover { text-decoration: underline; text-underline-offset: 4px; }
.context-links { display: flex; flex-wrap: wrap; gap: 6px 24px; padding: 0; margin-top: 16px; list-style: none; }
.context-links a { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; color: var(--blue); }
.source-note { padding-block: 24px; }
.story {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
  align-items: center;
  gap: clamp(24px, 5vw, 80px);
  border-top: 1px solid var(--line);
  padding-block: clamp(32px, 4.5vw, 70px);
}
.story h2 { font-size: clamp(1.6rem, 2.35vw, 2.45rem); line-height: 1.35; text-wrap: balance; }
.story-content h2 { margin-bottom: 16px; }
.service-jumps { display: flex; flex-wrap: wrap; gap: 8px; padding-block: 22px; }
.service-jumps a { display: inline-flex; gap: 9px; align-items: center; min-height: 44px; padding: 5px 14px; border: 1px solid var(--line); border-radius: 8px; color: #18375f; font-weight: 600; }
.service-jumps .business-icon { width: 26px; height: 26px; }
.service-jumps a:hover { background: #eff5fd; border-color: #9cb7dc; }
.original[aria-haspopup] { position: relative; border-radius: 8px; }
.original[aria-haspopup]::after {
  content: "";
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #fffffff2 url("./assets/icons/zoom.svg") center / 15px no-repeat;
  box-shadow: 0 1px 6px #18375f26;
  pointer-events: none;
}
@media (hover: hover) and (pointer: fine) {
  .original[aria-haspopup]:not(:hover, :focus-visible)::after { opacity: 0; }
}
.story-content:only-child { grid-column: 1 / -1; max-width: 48em; }
.story-media { min-width: 0; }
.story-media > * + * { margin-top: 22px; }
.story-images { display: grid; gap: 24px; }
@media (min-width: 761px) {
  .detail-body > .story:nth-of-type(even) {
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
  }
  .detail-body > .story:nth-of-type(even) > :is(.story-media, .service-photo) { order: -1; }
}
.story-images .original { display: grid; place-items: center; background: #f2f5f8; }
.story-images img { width: auto; max-height: 540px; }
.phone-pair { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.project-nav {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 20px;
  padding-block: 24px 40px;
  border-top: 1px solid var(--line);
}
.project-nav a { display: grid; align-content: center; gap: 4px; min-height: 64px; padding-block: 6px; }
.project-list-link { grid-column: 2; justify-items: center; align-self: center; color: var(--blue); font-weight: 600; }
.project-list-link::before { content: ""; width: 16px; height: 16px; background: currentColor; mask: url("./assets/icons/grid.svg") center / contain no-repeat; }
.project-nav a[rel="next"] { grid-column: 3; text-align: right; }
.project-nav span { color: var(--muted); font-size: .9375rem; }
.project-nav strong { color: var(--blue); font-size: clamp(1.15rem, 2vw, 1.6rem); overflow-wrap: anywhere; }
.project-nav a:hover strong { text-decoration: underline; text-underline-offset: 4px; }
.image-preview {
  width: min(94vw, 1500px);
  height: 91dvh;
  max-width: 100%;
  max-height: 100%;
  padding: 0;
  border: 0;
  border-radius: 14px;
  box-shadow: 0 20px 80px #07162d55;
  color: var(--ink);
  background: white;
}
.image-preview[open] { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto auto; }
.image-preview::backdrop { background: rgb(8 22 43 / 85%); }
html:has(.image-preview[open]) { overflow: hidden; }
.preview-tools, .preview-navigation { display: flex; align-items: center; gap: 12px; padding: 8px 16px; }
.preview-count { margin-right: auto; font-variant-numeric: tabular-nums; font-weight: 650; }
.preview-tools { background: #112c50; color: white; }
.image-preview button { min-height: 44px; border: 1px solid var(--line); background: white; color: var(--blue); }
.preview-tools button, .preview-navigation button { display: grid; place-items: center; width: 44px; padding: 0; border-radius: 10px; }
.preview-tools button { border-color: #59718c; background: #213e61; color: white; }
.preview-tools button::before, .preview-navigation button::before {
  content: "";
  width: 17px;
  height: 17px;
  background: currentColor;
  mask: var(--glyph) center / contain no-repeat;
}
.preview-close { --glyph: url("./assets/icons/close.svg"); }
.preview-zoom { --glyph: url("./assets/icons/zoom.svg"); }
.preview-zoom.is-zoomed { --glyph: url("./assets/icons/fit.svg"); }
.preview-navigation { --glyph: url("./assets/icons/chevron.svg"); }
.preview-next::before { transform: rotate(180deg); }
.preview-navigation button { flex: none; }
.image-preview button:hover:enabled { background: #edf3fc; }
.preview-tools button:hover:enabled { background: #365778; }
.image-preview button:disabled { color: #677383; background: #f4f6f8; cursor: default; }
.preview-stage { min-width: 0; min-height: 0; overflow: clip; background: #e6edf3; touch-action: none; user-select: none; }
.preview-stage img { width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.preview-stage.is-enlarged { cursor: grab; }
.preview-stage.is-enlarged.is-dragging { cursor: grabbing; }
.preview-caption { flex: 1; text-align: center; font-size: .9375rem; }
.preview-thumbnails {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  padding: 8px 12px;
  border-top: 1px solid var(--line);
}
.preview-thumbnails button {
  flex: 0 0 auto;
  width: clamp(72px, 8vw, 96px);
  height: clamp(48px, 6vw, 64px);
  padding: 2px;
  border: 2px solid var(--line);
}
.preview-thumbnails button:first-child { margin-inline-start: auto; }
.preview-thumbnails button:last-child { margin-inline-end: auto; }
.preview-thumbnails button[aria-current="true"] { border-color: var(--blue); box-shadow: inset 0 0 0 1px var(--blue); }
.preview-thumbnails button:focus-visible { outline-offset: 1px; }
.preview-thumbnails img { width: 100%; height: 100%; object-fit: contain; }
@media (max-width: 760px) {
  .service-jumps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .service-jumps a { gap: 6px; padding: 8px; font-size: .875rem; line-height: 1.4; }
  .service-jumps a:last-child { grid-column: 1 / -1; }
  .service-jumps .business-icon { width: 24px; height: 24px; }
  .project-banner::before { background: linear-gradient(90deg, #f2f5f8f5 0%, #f2f5f8e8 47%, #f2f5f89e 72%, transparent 100%); }
  .project-banner h1 { max-width: 80%; }
  .image-preview { width: 100%; height: 100dvh; border-radius: 0; padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }
  .preview-tools, .preview-navigation { padding: 6px 10px; gap: 8px; }
  .preview-caption { max-height: 4.5em; overflow-y: auto; line-height: 1.5; }
  .project-nav { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px 16px; padding-block: 16px 24px; }
  .project-nav a[rel] { grid-row: 1; align-content: start; }
  .project-nav a[rel="next"] { grid-column: 2; }
  .project-nav .project-list-link { grid-column: 1 / -1; grid-row: 2; display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; border-radius: 8px; background: #eff4fa; }
  .project-nav strong { font-size: 1rem; }
  .detail-grid, .story { grid-template-columns: minmax(0, 1fr); }
  .detail-grid { padding-block: 24px 32px; gap: 26px; }
  .detail-lead h1 { margin-top: 14px; font-size: clamp(2.1rem, 8vw, 3.1rem); }
  .overview-images img { max-height: 360px; }
  .overview-images .portrait img { max-height: 280px; }
  .story { gap: 12px; }
  .story-images .portrait img { max-height: 420px; }
  .story-images { gap: 16px; }
  .phone-pair { gap: 10px; }
  .phone-pair .original { padding: 6px; }
}
