.detail-page {
  background: var(--paper);
}

.detail-page .breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem .7rem;
  margin: 0 0 1.35rem;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 700;
}

.detail-page .breadcrumb li:not(:last-child)::after {
  content: "/";
  margin-left: .7rem;
  color: #9ab0b9;
}

.detail-page .breadcrumb a {
  min-height: 2.75rem;
  display: inline-flex;
  align-items: center;
  text-decoration-thickness: 1px;
  text-underline-offset: .2rem;
}

.detail-hero {
  position: relative;
  padding: 8.8rem 0 5rem;
  overflow: hidden;
  background:
    radial-gradient(circle at 89% 14%, rgba(240,118,69,.17), transparent 28rem),
    radial-gradient(circle at 8% 88%, rgba(111,220,237,.24), transparent 27rem),
    linear-gradient(135deg, #fff 0%, #f6fcff 55%, #fff9f5 100%);
}

.detail-hero::after {
  content: "";
  position: absolute;
  inset: auto -10rem -14rem auto;
  width: 29rem;
  aspect-ratio: 1;
  border: 1px solid rgba(0,137,197,.12);
  border-radius: 50%;
  box-shadow: inset 0 0 0 4rem rgba(255,255,255,.42);
  pointer-events: none;
}

.detail-hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0,1.03fr) minmax(23rem,.97fr);
  gap: clamp(2rem,6vw,6.5rem);
  align-items: center;
}

.detail-hero-grid > * {
  min-width: 0;
}

.detail-hero h1 {
  max-width: 49rem;
  margin: 0;
  font-size: clamp(3.1rem,6.6vw,6.8rem);
  line-height: .92;
  letter-spacing: -.072em;
}

.detail-hero h1 em {
  display: block;
  color: var(--blue);
  font-style: normal;
  font-weight: 520;
}

.detail-hero .lead {
  max-width: 45rem;
  margin: 1.4rem 0 0;
  color: var(--muted);
  font-size: clamp(1.03rem,1.45vw,1.23rem);
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .7rem;
  margin-top: 1.7rem;
}

.detail-visual {
  position: relative;
  min-height: 35rem;
  display: grid;
  place-items: center;
}

.detail-visual::before {
  content: "";
  position: absolute;
  width: min(31rem,78vw);
  aspect-ratio: 1;
  border-radius: 50%;
  background: conic-gradient(from 210deg, rgba(111,220,237,.72), rgba(255,255,255,.22), rgba(255,165,117,.46), rgba(111,220,237,.72));
  box-shadow: inset 0 0 0 4.4rem rgba(255,255,255,.58);
}

.detail-visual > picture {
  position: relative;
  z-index: 2;
  width: min(43rem,100%);
  display: grid;
  place-items: center;
}

.detail-visual > picture img,
.detail-visual > img {
  position: relative;
  z-index: 2;
  width: min(43rem,100%);
  max-height: 39rem;
  object-fit: contain;
  filter: drop-shadow(0 40px 38px rgba(17,60,76,.21));
}

.source-badge {
  position: absolute;
  z-index: 3;
  right: 0;
  bottom: 10%;
  max-width: 14rem;
  padding: .85rem 1rem;
  border: 1px solid rgba(255,255,255,.85);
  border-radius: 1rem;
  color: var(--ink-soft);
  background: rgba(255,255,255,.88);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(16px);
  font-size: .78rem;
}

.source-badge strong,
.source-badge span {
  display: block;
}

.source-badge span {
  margin-top: .12rem;
  color: var(--muted);
}

.condition-note {
  max-width: 45rem;
  margin-top: 1.35rem;
  padding: 1rem 1.1rem;
  border: 1px solid #c9e3ed;
  border-radius: 1rem;
  color: #315663;
  background: rgba(239,250,255,.8);
  font-size: .88rem;
}

.condition-note strong {
  color: var(--ink);
}

.fact-strip {
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  gap: .8rem;
  margin: 2.2rem 0 0;
}

.fact-strip > div {
  min-height: 7.2rem;
  padding: 1rem;
  border: 1px solid rgba(216,230,235,.9);
  border-radius: 1rem;
  background: rgba(255,255,255,.76);
}

.fact-strip dt {
  color: var(--muted);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.fact-strip dd {
  margin: .45rem 0 0;
  color: var(--ink);
  font-size: 1.12rem;
  font-weight: 820;
  letter-spacing: -.025em;
}

.detail-section {
  padding: clamp(4.7rem,8vw,8rem) 0;
}

.detail-section.soft {
  background: var(--off-white);
}

.detail-heading {
  max-width: 56rem;
  margin-bottom: 2.4rem;
}

.detail-heading h2 {
  margin: 0;
  font-size: clamp(2.35rem,4.9vw,5.1rem);
  line-height: .96;
  letter-spacing: -.058em;
}

.detail-heading > p:last-child {
  max-width: 45rem;
  margin: 1.2rem 0 0;
  color: var(--muted);
  font-size: 1.04rem;
}

.decision-grid {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 1rem;
}

.decision-card {
  min-height: 18rem;
  padding: clamp(1.4rem,3vw,2.2rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(145deg,#fff,#f5fbfd);
  box-shadow: var(--shadow-sm);
}

.decision-card.caution {
  background: linear-gradient(145deg,#fff,#fff6f0);
}

.decision-card h3 {
  margin: 0;
  font-size: clamp(1.45rem,2.6vw,2rem);
  letter-spacing: -.035em;
}

.check-list {
  display: grid;
  gap: .8rem;
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
}

.check-list li {
  position: relative;
  padding-left: 1.45rem;
  color: var(--muted);
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .57em;
  width: .5rem;
  height: .5rem;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 0 .22rem rgba(0,137,197,.12);
}

.decision-card.caution .check-list li::before {
  background: var(--orange);
  box-shadow: 0 0 0 .22rem rgba(240,118,69,.12);
}

.spec-layout {
  display: grid;
  grid-template-columns: minmax(15rem,.7fr) minmax(0,1.3fr);
  gap: clamp(2rem,5vw,5.5rem);
  align-items: start;
}

.spec-aside {
  position: sticky;
  top: 7.5rem;
  padding: 1.4rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(145deg,var(--ice),#fff);
}

.spec-aside img {
  width: 100%;
  max-height: 24rem;
  object-fit: contain;
}

.spec-aside p {
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: .88rem;
}

.table-stack {
  display: grid;
  gap: 1.5rem;
  min-width: 0;
  max-width: 100%;
}

.table-block {
  overflow: hidden;
  min-width: 0;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
}

.table-block h3 {
  margin: 0;
  padding: 1.2rem 1.35rem;
  border-bottom: 1px solid var(--line);
  font-size: 1.12rem;
}

.table-scroll {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.technical-table {
  width: 100%;
  min-width: 36rem;
  border-collapse: collapse;
}

.technical-table th,
.technical-table td {
  padding: .9rem 1.35rem;
  border-bottom: 1px solid #e8f0f3;
  text-align: left;
  vertical-align: top;
}

.technical-table tr:last-child th,
.technical-table tr:last-child td {
  border-bottom: 0;
}

.technical-table th {
  width: 42%;
  color: #37525e;
  font-size: .86rem;
  font-weight: 730;
}

.technical-table td {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  font-weight: 760;
}

.source-line {
  margin: 1.1rem 0 0;
  color: var(--muted);
  font-size: .8rem;
}

.resource-grid {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 1rem;
}

.resource-card {
  min-height: 15rem;
  display: flex;
  flex-direction: column;
  padding: 1.55rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
}

.resource-card small {
  color: var(--blue-deep);
  font-size: .72rem;
  font-weight: 820;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.resource-card strong {
  margin-top: auto;
  font-size: 1.35rem;
  letter-spacing: -.03em;
}

.resource-card span {
  margin-top: .5rem;
  color: var(--muted);
  font-size: .88rem;
}

.resource-card:hover,
.resource-card:focus-visible {
  border-color: #9fd7e9;
  transform: translateY(-.2rem);
}

.detail-cta {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem;
  align-items: center;
  padding: clamp(1.5rem,4vw,3rem);
  border-radius: var(--radius-lg);
  color: white;
  background:
    radial-gradient(circle at 95% 12%, rgba(111,220,237,.2), transparent 18rem),
    linear-gradient(135deg,var(--ink),#0b3b4d);
  box-shadow: var(--shadow);
}

.detail-cta h2 {
  margin: 0;
  font-size: clamp(2rem,4vw,4.2rem);
  line-height: .98;
  letter-spacing: -.05em;
}

.detail-cta p {
  max-width: 45rem;
  margin: .9rem 0 0;
  color: #bad0d8;
}

.detail-cta .detail-actions {
  margin: 0;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  width: fit-content;
  margin-bottom: 1rem;
  padding: .55rem .75rem;
  border: 1px solid #efcdbb;
  border-radius: 999px;
  color: #84452a;
  background: rgba(255,243,237,.9);
  font-size: .76rem;
  font-weight: 800;
}

.status-pill::before {
  content: "";
  width: .55rem;
  height: .55rem;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 0 .24rem rgba(240,118,69,.12);
}

.project-hero {
  min-height: 78svh;
}

.project-hero .detail-hero-grid {
  grid-template-columns: minmax(0,.82fr) minmax(26rem,1.18fr);
}

.project-hero h1 {
  font-size: clamp(3rem,5.8vw,6rem);
}

.project-collage {
  position: relative;
  min-height: 39rem;
}

.project-collage figure {
  position: absolute;
  margin: 0;
  overflow: hidden;
  border: .55rem solid rgba(255,255,255,.95);
  border-radius: 1.3rem;
  background: #dbe6e9;
  box-shadow: var(--shadow);
}

.project-collage figure:first-child {
  inset: 2% 18% 8% 0;
  transform: rotate(-2deg);
}

.project-collage figure:nth-child(2) {
  width: 43%;
  height: 48%;
  right: 0;
  top: 7%;
  transform: rotate(3deg);
}

.project-collage figure:nth-child(3) {
  width: 41%;
  height: 42%;
  right: 2%;
  bottom: 2%;
  transform: rotate(1deg);
}

.project-collage img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-collage figcaption {
  position: absolute;
  inset: auto .65rem .65rem;
  padding: .55rem .7rem;
  border-radius: .7rem;
  color: #fff;
  background: rgba(8,33,44,.84);
  font-size: .68rem;
}

.verification-grid {
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  gap: .8rem;
}

.verification-card {
  min-height: 11rem;
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.verification-card small {
  display: block;
  color: var(--muted);
  font-size: .7rem;
  font-weight: 820;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.verification-card strong {
  display: block;
  margin-top: .55rem;
  font-size: 1.13rem;
}

.verification-card p {
  margin: .65rem 0 0;
  color: var(--muted);
  font-size: .86rem;
}

.evidence-gallery {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  grid-template-rows: repeat(2,minmax(18rem,27rem));
  gap: 1rem;
}

.evidence-gallery figure {
  position: relative;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #dde9ed;
}

.evidence-gallery figure:first-child {
  grid-row: 1 / 3;
}

.evidence-gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.evidence-gallery figcaption {
  position: absolute;
  inset: auto 1rem 1rem;
  max-width: 30rem;
  padding: .7rem .85rem;
  border-radius: .8rem;
  color: white;
  background: rgba(8,33,44,.88);
  font-size: .76rem;
}

.verification-panel {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: clamp(2rem,5vw,5rem);
  align-items: start;
  padding: clamp(1.5rem,4vw,3rem);
  border: 1px solid #efcdbb;
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg,#fff,#fff6f0);
}

.verification-panel h2 {
  margin: 0;
  font-size: clamp(2rem,4vw,4.3rem);
  line-height: .98;
  letter-spacing: -.052em;
}

.verification-panel > div > p {
  color: var(--muted);
}

@media (max-width: 1050px) {
  .detail-hero-grid,
  .project-hero .detail-hero-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }

  .fact-strip,
  .verification-grid {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }

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

  .resource-card:last-child {
    grid-column: 1 / -1;
  }

  .spec-layout {
    grid-template-columns: minmax(13rem,.55fr) minmax(0,1.45fr);
  }
}

@media (max-width: 780px) {
  .detail-hero {
    padding: 7.8rem 0 4rem;
  }

  .detail-hero-grid,
  .project-hero .detail-hero-grid,
  .spec-layout,
  .verification-panel {
    grid-template-columns: 1fr;
  }

  .detail-visual {
    min-height: 27rem;
  }

  .source-badge {
    right: .25rem;
    bottom: 3%;
  }

  .spec-aside {
    position: static;
  }

  .spec-aside img {
    max-height: 19rem;
  }

  .project-collage {
    min-height: 36rem;
  }

  .detail-cta {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .detail-hero .shell,
  .detail-section .shell {
    width: calc(100vw - 1.5rem);
    max-width: calc(100vw - 1.5rem);
  }

  .detail-hero-grid,
  .detail-hero-grid > *,
  .detail-hero-grid > div,
  .fact-strip,
  .decision-grid,
  .spec-layout,
  .resource-grid,
  .verification-grid,
  .verification-panel,
  .detail-cta {
    min-width: 0;
    max-width: 100%;
  }

  .detail-hero h1,
  .project-hero h1 {
    font-size: clamp(2.85rem,14vw,4.5rem);
    overflow-wrap: anywhere;
  }

  .detail-page p,
  .detail-page li,
  .detail-page a {
    overflow-wrap: anywhere;
  }

  .detail-actions,
  .detail-cta .detail-actions {
    display: grid;
  }

  .fact-strip,
  .decision-grid,
  .resource-grid,
  .verification-grid {
    grid-template-columns: 1fr;
  }

  .resource-card:last-child {
    grid-column: auto;
  }

  .detail-visual {
    min-height: 22rem;
  }

  .detail-visual > picture {
    width: 100%;
    max-width: 100%;
  }

  .detail-visual > picture img,
  .detail-visual > img {
    width: 110%;
    max-width: none;
  }

  .source-badge {
    position: relative;
    right: auto;
    bottom: auto;
    justify-self: end;
    margin-top: -4rem;
  }

  .fact-strip > div {
    min-height: 0;
  }

  .technical-table {
    min-width: 31rem;
  }

  .project-collage {
    min-height: 31rem;
  }

  .project-collage figure:first-child {
    inset: 0 13% 10% 0;
  }

  .project-collage figure:nth-child(2) {
    width: 42%;
    height: 41%;
  }

  .project-collage figure:nth-child(3) {
    width: 44%;
    height: 38%;
  }

  .evidence-gallery {
    grid-template-columns: 1fr;
    grid-template-rows: none;
  }

  .evidence-gallery figure,
  .evidence-gallery figure:first-child {
    grid-row: auto;
    min-height: 25rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .resource-card:hover,
  .resource-card:focus-visible {
    transform: none;
  }

  .project-collage figure {
    transform: none !important;
  }
}
