/* Secondary pages share a reading scale, image treatment and technical tables. */
main {
  --folio-gap: clamp(1.5rem, 4vw, 4.75rem);
  --folio-band: clamp(3.25rem, 7vw, 7rem);
}
main :where(h1, h2, h3, p, figure, dl, dd, ol, ul) { margin: 0; }
main :where(h1, h2, h3, dt, th, summary) { color: var(--ink); }
main :where(h1, h2, h3) { font-family: inherit; font-weight: 650; text-wrap: balance; }
main h1 { font-size: clamp(2.8rem, 5.7vw, 5.85rem); line-height: 1.02; letter-spacing: -.058em; }
main h2 { font-size: clamp(1.8rem, 3.25vw, 3.65rem); line-height: 1.12; letter-spacing: -.043em; }
main h3 { font-size: clamp(1.17rem, 1.65vw, 1.75rem); line-height: 1.23; letter-spacing: -.025em; }
:lang(zh-CN) main h1 { font-size: clamp(2.45rem, 5.15vw, 5.25rem); letter-spacing: -.048em; line-height: 1.12; }
:lang(zh-CN) main h2 { letter-spacing: -.04em; line-height: 1.2; }
main p, main dd { color: var(--muted); line-height: 1.7; }
main dt { font-weight: 680; line-height: 1.35; }
main :where(figure, article, section, header, aside, dl, dd, div) { min-width: 0; }
main figcaption, .editorial-note, .case-note { font-size: .8rem; line-height: 1.55; color: var(--muted); }
main :where(figure > img, .editorial-card img, .route-card img, .reading-aside img) {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
}
main .text-link { display: inline-flex; align-items: center; gap: .65rem; color: var(--accent); font-weight: 660; }
main .text-link:hover { color: var(--accent-hover); text-decoration: underline; text-underline-offset: .22em; }

.equipment-overview { background: var(--mist); }
.equipment-presentation {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
  gap: clamp(2rem, 6vw, 7rem);
  padding-block: clamp(2.25rem, 4.4vw, 5.25rem);
  align-items: center;
}
.equipment-lead h1, .equipment-lead h2 { color: var(--felt); max-width: 13ch; }
.equipment-lead > p { max-width: 47ch; font-size: clamp(1rem, 1.4vw, 1.22rem); margin-block: 1.5rem 2.1rem; }
.equipment-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 1.5rem; }
.equipment-photo {
  background: var(--felt-deep);
  color: var(--paper);
}
.equipment-photo img { aspect-ratio: 1.35; object-position: center 55%; }
.equipment-photo figcaption {
  color: var(--mist);
  padding: .8rem 1.2rem;
  border-top: 2px solid var(--brass);
}
.equipment-selection, .equipment-buying, .about-overseas, .condition-section, .case-breakdown, .faq-group, .spec-spread {
  display: grid;
  grid-template-columns: minmax(0, .74fr) minmax(0, 1.26fr);
  gap: var(--folio-gap);
  align-items: start;
}
.equipment-selection { padding-block: var(--folio-band); }
.equipment-selection .text-link, .equipment-buying .text-link, .condition-intro .text-link, .about-overseas .text-link { margin-top: 1.15rem; }
.detail-heading, .library-heading, .editorial-masthead-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(0, .82fr);
  gap: var(--folio-gap);
  align-items: end;
}
.detail-heading > p, .library-heading > p, .editorial-masthead-inner > p, .reading-head > p { max-width: 52ch; font-size: clamp(1rem, 1.25vw, 1.15rem); }
.detail-body, .project-sheet, .reading-page, .case-body { padding-block: clamp(1.15rem, 2.5vw, 2.25rem) var(--folio-band); }
.detail-heading { padding-block: clamp(2.2rem, 4.5vw, 4.75rem); }
.detail-sheet { display: grid; grid-template-columns: 1.05fr .95fr; background: var(--mist); }
.detail-sheet .equipment-photo { display: flex; flex-direction: column; }
.detail-sheet .equipment-photo img { min-height: 0; flex: 1 1 auto; aspect-ratio: 1.25; }
.detail-guide { padding: clamp(1.5rem, 4vw, 4.5rem); align-self: center; }
.detail-guide h2 { font-size: clamp(1.65rem, 2.7vw, 2.9rem); }
.detail-guide dl { margin-block: 1.4rem; }
.detail-guide dl > div { border-block-start: 1px solid var(--line); padding-block: .9rem; }
.detail-guide dt, .equipment-buying dt, .condition-list dt { margin-block-end: .35rem; }
.equipment-buying { padding-block-start: var(--folio-band); }
.equipment-buying h2 + p, .condition-intro h2 + p { margin-top: 1rem; }
.equipment-buying dl > div, .condition-list > div, .case-breakdown dl > div {
  padding-block: 1.25rem;
  border-top: 1px solid var(--line);
}
.equipment-buying dl > div:first-child, .condition-list > div:first-child, .case-breakdown dl > div:first-child { border-top: 2px solid var(--ink); }

/* Service overview: a photographic opening, enquiry index and numbered process. */
.refurb-intro { color: var(--paper); background: var(--felt); }
.refurb-intro-inner {
  display: grid;
  grid-template-columns: minmax(0, .75fr) minmax(0, 1.25fr);
  gap: var(--folio-gap);
  align-items: center;
  padding-block: clamp(2.5rem, 4.8vw, 5rem);
}
.refurb-intro-copy h1 { color: var(--paper); }
.refurb-intro-copy h1 em { color: var(--brass); font-style: normal; }
.refurb-intro-copy > p { color: var(--paper); max-width: 42ch; margin-block: 1.3rem 1.7rem; }
.refurb-intro-photo img { aspect-ratio: 1.62; }
.refurb-intro-photo figcaption { color: var(--mint); padding-top: .65rem; }
.refurb-services { padding-block: var(--folio-band) clamp(2.5rem, 4vw, 4rem); }
.refurb-services .section-head, .refurb-case .section-head {
  display: flex; justify-content: space-between; align-items: end; gap: var(--folio-gap);
  margin-bottom: 1.7rem;
}
.refurb-services .section-head p { max-width: 44ch; }
.service-list { padding: 0; list-style: none; border-top: 2px solid var(--ink); }
.service-list > li {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.4fr) auto;
  align-items: center;
  gap: var(--folio-gap);
  padding-block: clamp(1.35rem, 2.4vw, 2.4rem);
  border-bottom: 1px solid var(--line);
}
.condition-section { padding-block: clamp(1.75rem, 3vw, 3rem) var(--folio-band); }
.condition-intro { max-width: 44ch; }
.refurb-process { background: var(--mist); }
.refurb-process-inner { padding-block: var(--folio-band); }
.process-steps {
  list-style: none; padding: 0; margin-top: clamp(2rem, 4vw, 4.2rem);
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(1rem, 2vw, 2.5rem);
  counter-reset: process-step;
}
.process-steps li { counter-increment: process-step; border-top: 2px solid var(--felt); padding-top: .8rem; }
.process-steps li::before { content: counter(process-step, decimal-leading-zero); display: block; margin-bottom: 1.35rem; font: 650 .85rem/1.3 ui-monospace, monospace; color: var(--accent); }
.process-steps li p { margin-top: .6rem; }
.refurb-case { padding-block: var(--folio-band); }
.refurb-case .section-head p { margin-top: .6rem; }
.case-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; }
.case-pair figure { display: flex; flex-direction: column-reverse; background: var(--felt-deep); }
.case-pair img { aspect-ratio: 1.65; object-position: center 57%; }
.case-pair figcaption { padding: .6rem .9rem; color: var(--paper); font-weight: 650; }
.case-note { margin-block: .65rem 1.2rem; }

/* Case reader: on large screens the comparison sits alongside its notes. */
.case-body {
  display: grid;
  grid-template-columns: minmax(0, .77fr) minmax(0, 1.23fr);
  column-gap: var(--folio-gap);
  align-items: start;
}
.case-body > .breadcrumbs, .case-close { grid-column: 1 / -1; }
.case-body > .breadcrumbs { margin-bottom: clamp(2rem, 4.4vw, 4.5rem); }
.case-heading { padding-top: .2rem; }
.case-heading h1 { font-size: clamp(2.6rem, 4.85vw, 5.1rem); }
.case-heading p { margin-block: 1.2rem 1.65rem; max-width: 46ch; }
.case-feature .comparison { aspect-ratio: 1.48; }
.case-feature .photo-caption { display: flex; justify-content: space-between; gap: 1.1rem; padding-top: .65rem; }
.case-breakdown { grid-column: 1 / -1; padding-block-start: var(--folio-band); }
.case-breakdown dl > div { display: grid; grid-template-columns: minmax(5.5rem, .45fr) minmax(0, 1fr); gap: 1.3rem; }
.case-close { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; padding-top: 1.75rem; margin-top: 2rem; border-top: 1px solid var(--line); }

/* Directories put captions and reading actions below the image, with open gutters. */
.editorial-masthead { background: var(--felt); }
.editorial-masthead h1 { color: var(--paper); }
.editorial-masthead p { color: var(--mist); }
.editorial-masthead-inner, .library-heading { padding-block: var(--folio-band); }
.editorial-listing { padding-block: clamp(2rem, 4vw, 4.5rem) var(--folio-band); }
.editorial-note { margin-bottom: 1rem; }
.editorial-grid, .route-grid { display: grid; gap: clamp(1.4rem, 3vw, 3.5rem); }
.editorial-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.editorial-card a, .route-card a { display: block; height: 100%; color: inherit; text-decoration: none; }
.editorial-card h2 { font-size: clamp(1.6rem, 2.5vw, 2.75rem); }
.editorial-card img { aspect-ratio: 1.85; margin-bottom: 1.25rem; object-position: center 54%; }
.editorial-card p { margin-top: .7rem; max-width: 56ch; }
.editorial-card .text-link { margin-top: 1.1rem; }
:is(.editorial-card, .route-card) a:hover :is(h2, h3) { color: var(--accent-hover); }
body[data-section="guides"] .editorial-card a {
  display: grid;
  grid-template-columns: minmax(7rem, .55fr) minmax(0, 1fr);
  grid-template-rows: auto 1fr auto;
  align-content: start;
  column-gap: clamp(1rem, 2.3vw, 2.5rem);
  border-top: 1px solid var(--line);
  padding-top: 1.25rem;
}
body[data-section="guides"] .editorial-card img { grid-row: 1 / 4; height: auto; aspect-ratio: .92; margin: 0; }
body[data-section="guides"] .editorial-card h2 { font-size: clamp(1.3rem, 1.95vw, 2rem); }
.reading-head { display: grid; gap: 1.25rem; padding-block: clamp(2rem, 4.5vw, 4.75rem); max-width: 60rem; }
.reading-layout { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: clamp(2rem, 8vw, 8.5rem); }
.reading-copy section { padding-block: clamp(1.45rem, 2.6vw, 2.75rem); border-top: 1px solid var(--line); }
.reading-copy section:first-child { border-color: var(--ink); }
.reading-copy h2 { font-size: clamp(1.4rem, 2.1vw, 2.35rem); }
.reading-copy p { margin-top: .65rem; max-width: 65ch; }
.reading-aside { align-self: start; position: sticky; top: 6rem; }
.reading-aside img { aspect-ratio: 1.15; }
.reading-aside .button { margin-top: 1rem; }
.guide-directory { padding-block: 1.5rem var(--folio-band); }
.guide-topics { display: flex; flex-wrap: wrap; gap: .75rem 1.75rem; }
.guide-topics a, .guide-source a { color: var(--accent); text-underline-offset: .22em; }
.guide-topics a:hover, .guide-source a:hover { color: var(--accent-hover); }
.guide-directory section { padding-top: clamp(2.25rem, 5vw, 4.5rem); }
.guide-directory h2 { font-size: clamp(1.65rem, 3vw, 2.75rem); }
.guide-entries {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 var(--folio-gap);
  margin-top: 1.25rem; padding: 0; list-style: none;
}
.guide-entries li { padding-block: 1.2rem 1.5rem; border-top: 1px solid var(--line); }
.guide-entries a { display: flex; gap: 1.1rem; align-items: baseline; justify-content: space-between; text-decoration: none; }
.guide-entries h3 { font-size: clamp(1.15rem, 1.7vw, 1.55rem); }
.guide-entries a:hover h3 { color: var(--accent-hover); }
.guide-entries .arrow { flex: none; align-self: center; color: var(--accent); }
.guide-entries p { margin-top: .55rem; }
.guide-next a { margin-top: .7rem; }
.guide-link-list { display: grid; gap: .55rem; padding: 0; list-style: none; }
.guide-link-list .text-link { margin: 0; }
.reading-copy .guide-source { margin-block: 0 1.75rem; }
.guide-table { margin-top: 1rem; }
.guide-table table { width: 100%; border-collapse: collapse; text-align: start; font-size: .94rem; }
.guide-table caption { text-align: start; padding-bottom: .55rem; font-weight: 650; }
.guide-table :is(th, td) { text-align: start; vertical-align: top; padding: .6rem; border-bottom: 1px solid var(--line); }
.guide-table thead { background: var(--mist); }
.guide-table tbody th { font-weight: 550; }
@media (max-width: 45rem) {
  .guide-entries { grid-template-columns: minmax(0, 1fr); }
}
.faq-content { padding-block: clamp(2.5rem, 5vw, 5rem) var(--folio-band); }
.faq-group { padding-block: clamp(1.5rem, 3.5vw, 3.5rem); border-top: 1px solid var(--line); }
.faq-group > h2 { font-size: clamp(1.5rem, 2.5vw, 2.75rem); }
.faq-group details { border-bottom: 1px solid var(--line); }
.faq-group details:last-child { border-bottom: none; }
.faq-group summary { display: flex; align-items: start; justify-content: space-between; gap: 1rem; padding-block: .95rem; font-weight: 660; list-style: none; cursor: pointer; }
.faq-group summary::-webkit-details-marker { display: none; }
.faq-group summary::after { content: "+"; color: var(--accent); font: 400 1.4rem/1 ui-monospace, monospace; }
.faq-group details[open] summary::after { content: "−"; }
.faq-group details p { margin: 0 2.5rem 1rem 0; }
.faq-content > .button { margin-top: 1rem; }

.editorial-about { padding-block: clamp(2.5rem, 5vw, 5.5rem) var(--folio-band); }
.about-opening, .project-lead { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: var(--folio-gap); }
.about-opening h1, .project-lead h1, .library-heading h1, .detail-heading h1, .reading-head h1, .case-heading h1 { color: var(--felt); }
.about-opening p, .project-lead p { max-width: 48ch; margin-top: 1.4rem; font-size: clamp(1rem, 1.35vw, 1.2rem); }
.about-opening figure img, .project-lead figure img { aspect-ratio: 1.55; }
.about-opening figcaption, .project-lead figcaption { margin-top: .55rem; }
.about-services { display: grid; grid-template-columns: 1fr 1fr; margin-block: var(--folio-band); background: var(--mist); }
.about-services > section { padding: clamp(1.55rem, 3.8vw, 4.25rem); }
.about-services > section + section { border-left: 1px solid var(--line); background: var(--felt-deep); }
.about-services > section + section h2 { color: var(--paper); }
.about-services > section + section p { color: var(--mist); }
.about-services > section + section .text-link { color: var(--brass); }
.about-services > section + section .text-link:hover { color: var(--paper); }
.about-services > section + section :focus-visible, .refurb-intro :focus-visible { outline-color: var(--brass); }
.about-services h2 { font-size: clamp(1.65rem, 2.65vw, 2.9rem); }
.about-services p { margin-block: .9rem 1.2rem; }
.about-overseas { padding-block: 2rem; border-top: 1px solid var(--line); }
.about-overseas + .about-overseas { margin-top: 1rem; }
.about-overseas h2, .spec-spread h2, .project-closing h2 { font-size: clamp(1.5rem, 2.5vw, 2.75rem); }
.about-overseas p + p { margin-top: .85rem; }
.workshop-dates { display: grid; gap: 1.4rem; }
.workshop-dates dt { color: var(--felt); font-weight: 700; margin-bottom: .25rem; }

.workshop-cases section, .workshop-case-grid figure { scroll-margin-top: 6rem; }
.workshop-cases h2 { font-size: clamp(1.65rem, 3vw, 2.85rem); }
.gallery-intro { max-width: 62ch; margin-block: .7rem 1.8rem; }
.workshop-case-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.8rem, 4vw, 4rem) clamp(1.25rem, 3vw, 3rem);
}
.workshop-photo { display: block; border: 1px solid var(--line); background: white; cursor: zoom-in; }
.workshop-photo:hover { border-color: var(--accent); }
.workshop-photo img { width: 100%; height: auto; }
.workshop-photo span { display: grid; grid-template-columns: 1fr 1fr; }
.workshop-photo b { padding: .35rem .7rem; text-align: center; font-size: .78rem; background: var(--mist); color: var(--ink); }
.workshop-photo b + b { background: var(--felt); color: var(--paper); }
.workshop-case-grid figcaption { margin-top: .85rem; font-size: 1rem; }
.workshop-case-grid figcaption p { margin-top: .45rem; }
.workshop-cases .text-link { margin-top: 1.6rem; }
.case-illustrations { border-top: 1px solid var(--line); margin-top: var(--folio-band); padding-top: 2rem; }
.reading-aside img[src^="/assets/workshop/"] { aspect-ratio: auto; }
@media (max-width: 42rem) {
  .workshop-case-grid { grid-template-columns: 1fr; }
}

.project-index { padding-bottom: var(--folio-band); }
.project-index > section { border-top: 1px solid var(--line); padding-top: 1.7rem; }
.project-index > section + section { margin-top: var(--folio-band); }
.project-index > section > h2 { font-size: clamp(1.55rem, 2.7vw, 2.85rem); margin-bottom: 1.5rem; }
.route-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.route-card img { aspect-ratio: 1.9; margin-bottom: 1.05rem; }
.route-card h3 { display: flex; justify-content: space-between; align-items: baseline; gap: .75rem; }
.route-card h3 .arrow { flex: none; color: var(--accent); align-self: center; }
.route-card p { margin-top: .7rem; }
.project-lead { padding-block: clamp(2.25rem, 4.2vw, 4.75rem); }
.spec-spread { padding-block: clamp(2.25rem, 4.8vw, 5rem); border-top: 1px solid var(--line); }
.spec-spread table { width: 100%; border-collapse: collapse; text-align: left; font-size: 1rem; }
.spec-spread th, .spec-spread td { padding: .95rem 1.1rem; vertical-align: top; border-block-end: 1px solid var(--line); }
.spec-spread th { font-weight: 640; }
.spec-spread tbody th { width: 31%; }
.spec-spread td { color: var(--muted); line-height: 1.6; }
.spec-spread thead th { font-size: .87rem; color: var(--paper); background: var(--felt-deep); }
.project-closing { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--folio-gap); padding: clamp(1.5rem, 3.8vw, 4rem); background: var(--mist); }
.project-closing p, .project-closing ul { margin-block-start: 1rem; }
.project-closing ul { padding-inline-start: 1.15em; color: var(--muted); }
.project-closing li + li { margin-top: .5rem; }
.project-closing .text-link { margin-top: 1.2rem; }

@media (max-width: 58rem) {
  .service-list > li { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) auto; gap: 1.5rem; }
  .process-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.8rem; }
  body[data-section="guides"] .editorial-card a { display: block; }
  body[data-section="guides"] .editorial-card img { aspect-ratio: 1.85; margin-bottom: 1.15rem; }
  .case-body { grid-template-columns: 1fr; }
  .case-heading { display: flex; align-items: end; justify-content: space-between; gap: 1.6rem; margin-bottom: 2rem; }
  .case-heading p { margin-bottom: 0; }
  .case-heading .button { flex: none; }
  .case-feature .comparison { aspect-ratio: 1.75; }
}
@media (max-width: 45rem) {
  .equipment-presentation, .detail-heading, .detail-sheet, .equipment-selection, .equipment-buying,
  .refurb-intro-inner, .condition-section, .case-breakdown, .reading-layout, .faq-group,
  .about-opening, .about-services, .about-overseas, .project-lead, .project-closing, .spec-spread,
  .editorial-masthead-inner, .library-heading {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.4rem;
  }
  .equipment-lead > p { margin-block: 1rem 1.25rem; }
  .equipment-photo img, .detail-sheet .equipment-photo img { flex: none; aspect-ratio: 1.6; }
  .refurb-intro-copy h1 br { display: none; }
  :lang(en) .refurb-intro-copy h1 em::before { content: " "; }
  .refurb-intro-photo img { aspect-ratio: 1.75; }
  .refurb-services .section-head, .refurb-case .section-head, .case-heading { display: grid; gap: .85rem; }
  .refurb-services .section-head p { max-width: none; }
  .service-list > li { grid-template-columns: minmax(0, 1fr) auto; gap: .45rem 1rem; }
  .service-list p { grid-row: 2; }
  .service-list .text-link { grid-column: 2; grid-row: 1 / 3; align-self: center; }
  .case-heading .button { justify-self: start; }
  .case-feature .comparison { aspect-ratio: 1.2; }
  .case-breakdown dl > div { grid-template-columns: minmax(4.5rem, .45fr) minmax(0, 1fr); gap: .9rem; }
  .reading-aside { position: static; }
  .reading-aside img { aspect-ratio: 1.9; }
  .about-services { gap: 0; }
  .about-services > section + section { border-left: 0; border-top: 1px solid var(--line); }
  .route-grid { grid-template-columns: minmax(0, 1fr); gap: 1.4rem; }
  .route-card a { display: grid; grid-template-columns: minmax(5rem, .4fr) minmax(0, 1fr); grid-template-rows: auto 1fr; gap: .3rem 1.05rem; border-top: 1px solid var(--line); padding-top: 1rem; }
  .route-card img { grid-row: 1 / 3; aspect-ratio: 1; margin: 0; }
  .route-card p { margin: 0; }
}
@media (max-width: 35rem) {
  .editorial-grid { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
  .process-steps { gap: 1.5rem 1rem; }
  .case-pair { gap: .35rem; }
  .case-pair img { aspect-ratio: 1; }
  .spec-spread th, .spec-spread td { padding: .7rem; }
}
