/* Piano Home landing pages: /piano, /piano/tre-em, /piano/nguoi-lon, /piano/cam-on.
   Every rule is scoped to .ph-page, .ph-modal or a .ph-* component class so other
   subject pages are untouched. Palette: ebony, chestnut, ivory and brass. */

.ph-page,
.ph-modal {
  --ph-ebony: #17120f;
  --ph-chestnut: #5c321e;
  --ph-ivory: #f7f1e6;
  --ph-paper: #fffcf6;
  --ph-brass: #b3822c;
  --ph-brass-light: #e0bd73;
  --ph-brass-ink: #7a5714;
  --ph-ink: #211a16;
  --ph-muted: #5b5048;
  --ph-soft-light: #ddd3c5;
  --ph-line: #e2d6c2;
  --ph-line-dark: rgba(247, 241, 230, 0.2);
  --ph-sans: "Be Vietnam Pro", system-ui, sans-serif;
  /* System serifs only, no font download. Vietnamese diacritics still need a check on target devices. */
  --ph-serif: "Noto Serif", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;
  /* One octave seen from above: seven white keys, five black keys. */
  --ph-keys: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='40' viewBox='0 0 140 40'%3E%3Crect width='140' height='40' fill='%23fbf6ec'/%3E%3Cpath d='M.5 0v40M20.5 0v40M40.5 0v40M60.5 0v40M80.5 0v40M100.5 0v40M120.5 0v40' stroke='%2317120f' stroke-opacity='.35'/%3E%3Cpath fill='%2317120f' d='M14 0h12v25H14zM34 0h12v25H34zM74 0h12v25H74zM94 0h12v25H94zM114 0h12v25h-12z'/%3E%3C/svg%3E");
  /* custom.css colours every link with `var(--primary-color) !important`, so links are
     recoloured by scoping that variable (and Bootstrap's) rather than with !important. */
  --primary-color: #5c321e;
  --primary-hover: #211a16;
  --bs-link-color-rgb: 92, 50, 30;
  --bs-link-hover-color-rgb: 33, 26, 22;
}

/* The site theme rounds every img and figure. */
.ph-page img,
.ph-page figure,
.ph-modal img,
.ph-modal figure { border-radius: 0; }

.ph-page,
.ph-modal { font-family: var(--ph-sans); }

.ph-page {
  background: var(--ph-ivory);
  color: var(--ph-ink);
  line-height: 1.65;
  overflow-x: clip;
}

.ph-page h1,
.ph-page h2,
.ph-page h3,
.ph-modal .modal-title {
  font-family: var(--ph-serif);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.18;
  color: inherit;
  text-wrap: balance;
}

.ph-page h1 { margin: 0 0 1.25rem; font-size: clamp(2.1rem, 1.5rem + 2.8vw, 3.75rem); }
.ph-page h2 { margin: 0 0 1rem; font-size: clamp(1.7rem, 1.3rem + 1.8vw, 2.7rem); }
.ph-page h3 { margin: 0 0 0.6rem; font-size: clamp(1.15rem, 1.05rem + 0.45vw, 1.4rem); }
.ph-page h1 em,
.ph-page h2 em { font-style: italic; font-weight: 500; color: var(--ph-chestnut); }
/* :where() keeps these element defaults below any .ph-* component rule. */
:where(.ph-page) p { margin: 0 0 1rem; }
:where(.ph-page) img { display: block; max-width: 100%; height: auto; }
.ph-page figure { margin: 0; }
.ph-page a { text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
.ph-page [id] { scroll-margin-top: 5.5rem; }

.ph-page :focus-visible,
.ph-modal :focus-visible {
  outline: 3px solid var(--ph-brass);
  outline-offset: 3px;
}

/* ---------- Shared pieces ---------- */

.ph-keys {
  display: block;
  height: 16px;
  background: var(--ph-keys) left top / auto 100% repeat-x;
  border-bottom: 3px solid var(--ph-chestnut);
}

.ph-eyebrow {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0 0 0.9rem;
  color: var(--ph-brass-ink);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  line-height: 1.4;
  text-transform: uppercase;
}

.ph-eyebrow::before {
  content: "";
  flex: none;
  width: 1.75rem;
  height: 2px;
  background: currentColor;
}

.ph-lead {
  color: var(--ph-muted);
  font-size: clamp(1.05rem, 1rem + 0.3vw, 1.2rem);
  line-height: 1.6;
}

.ph-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.ph-button {
  --primary-color: var(--ph-ivory);
  --primary-hover: var(--ph-ivory);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.7rem 1.4rem;
  border: 1px solid var(--ph-ebony);
  border-radius: 2px;
  background: var(--ph-ebony);
  color: var(--ph-ivory);
  font-weight: 600;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.ph-button:hover {
  border-color: var(--ph-chestnut);
  background: var(--ph-chestnut);
  color: var(--ph-ivory);
}

.ph-button--ghost {
  --primary-color: var(--ph-ink);
  border-color: currentColor;
  background: transparent;
  color: var(--ph-ink);
}

.ph-button--ghost:hover {
  border-color: var(--ph-ebony);
  background: var(--ph-ebony);
  color: var(--ph-ivory);
}

.ph-button--brass {
  --primary-color: var(--ph-ebony);
  --primary-hover: var(--ph-ebony);
  border-color: var(--ph-brass-light);
  background: var(--ph-brass-light);
  color: var(--ph-ebony);
}

.ph-button--brass:hover {
  border-color: #efd496;
  background: #efd496;
  color: var(--ph-ebony);
}

.ph-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 600;
  text-decoration: underline;
}

.ph-link:hover { text-decoration-thickness: 2px; }

.ph-more { margin: 2rem 0 0; }

.ph-form-help {
  margin: 1rem 0 0;
  color: var(--ph-muted);
  font-size: 0.92rem;
}

/* Small markers shaped like black keys. */
.ph-keylist {
  margin: 0 0 1.25rem;
  padding: 0;
  list-style: none;
}

.ph-keylist li {
  position: relative;
  margin-bottom: 0.55rem;
  padding-left: 1.4rem;
}

.ph-keylist li::before {
  content: "";
  position: absolute;
  top: 0.42em;
  left: 0.15rem;
  width: 0.42rem;
  height: 0.85rem;
  border-radius: 0 0 2px 2px;
  background: var(--ph-ebony);
}

/* ---------- Sections ---------- */

.ph-section { padding: clamp(3.25rem, 2rem + 5vw, 6.25rem) 0; }
.ph-section--tight { padding: clamp(2.75rem, 2rem + 3vw, 4.5rem) 0; }
.ph-section--paper { background: var(--ph-paper); }

.ph-section--ebony,
.ph-section--chestnut,
.ph-contact,
.ph-trial-card {
  --primary-color: #e0bd73;
  --primary-hover: #fbf6ec;
  --bs-link-color-rgb: 224, 189, 115;
  --bs-link-hover-color-rgb: 251, 246, 236;
  color: #f3ece0;
}

.ph-section--ebony { background: var(--ph-ebony); }
.ph-section--chestnut { background: var(--ph-chestnut); }

.ph-section--ebony .ph-eyebrow,
.ph-section--chestnut .ph-eyebrow,
.ph-contact .ph-eyebrow,
.ph-trial-card .ph-eyebrow { color: var(--ph-brass-light); }

.ph-section--ebony h2,
.ph-section--ebony h3,
.ph-section--chestnut h2 { color: #fbf6ec; }

.ph-section--ebony .ph-lead,
.ph-section--ebony .ph-heading p:last-child { color: var(--ph-soft-light); }

.ph-section--ebony .ph-keylist li::before { background: var(--ph-brass-light); }

.ph-section--keyed { padding-top: 0; }
.ph-section--keyed > .ph-keys { margin-bottom: clamp(3rem, 2rem + 4vw, 5.5rem); }

.ph-heading {
  max-width: 46rem;
  margin-bottom: clamp(1.75rem, 1.25rem + 2vw, 3rem);
}

.ph-heading h2:last-child { margin-bottom: 0; }

.ph-heading--split {
  display: grid;
  gap: 0.5rem 3rem;
  align-items: end;
  max-width: none;
}

.ph-heading--split > p {
  max-width: 34rem;
  margin: 0;
  color: var(--ph-muted);
}

@media (min-width: 992px) {
  .ph-heading--split { grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); }
  .ph-heading--split > p { justify-self: end; }
}

/* ---------- Hero ---------- */

.ph-hero {
  padding: clamp(1.75rem, 1rem + 4vw, 4.5rem) 0 clamp(2.5rem, 1.5rem + 4vw, 5rem);
  border-bottom: 1px solid var(--ph-line);
  background: var(--ph-ivory);
}

.ph-hero__grid {
  display: grid;
  gap: 2.25rem;
  align-items: center;
}

.ph-hero__copy .ph-lead { max-width: 36rem; }

.ph-hero__figure {
  position: relative;
  box-shadow: 10px 10px 0 var(--ph-chestnut);
}

.ph-hero__figure img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

@media (min-width: 992px) {
  .ph-hero__grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    gap: 4.5rem;
  }

  .ph-hero__figure { box-shadow: 18px 18px 0 var(--ph-chestnut); }
  .ph-hero__figure .ph-keys { height: 22px; }
}

.ph-hero__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0;
  margin: 1.25rem 0 0;
  padding: 1rem 0 0;
  border-top: 1px solid var(--ph-line);
  list-style: none;
}

.ph-hero__facts li {
  margin-right: 1rem;
  padding-right: 1rem;
  border-right: 1px solid var(--ph-line);
  font-size: 0.93rem;
  font-weight: 600;
}

.ph-hero__facts li:last-child {
  margin-right: 0;
  padding-right: 0;
  border-right: 0;
}

.ph-hero__paths {
  margin-top: 2rem;
  border-top: 1px solid var(--ph-line);
}

.ph-hero__paths > p {
  margin: 1rem 0 0.25rem;
  color: var(--ph-muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.ph-hero__path {
  --primary-color: var(--ph-ink);
  --primary-hover: var(--ph-chestnut);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0 1rem;
  align-items: center;
  min-height: 56px;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--ph-line);
  color: var(--ph-ink);
  text-decoration: none;
}

.ph-hero__path::after {
  content: "→";
  grid-row: 1 / span 2;
  grid-column: 2;
  color: var(--ph-chestnut);
  font-size: 1.25rem;
  transition: transform 0.2s ease;
}

.ph-hero__path span {
  font-family: var(--ph-serif);
  font-size: 1.2rem;
  font-weight: 600;
}

.ph-hero__path small {
  color: var(--ph-muted);
  font-size: 0.88rem;
}

.ph-hero__path:hover { color: var(--ph-chestnut); }
.ph-hero__path:hover::after { transform: translateX(4px); }

.ph-crumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
  font-size: 0.9rem;
}

.ph-crumbs li { display: inline-flex; align-items: center; }
.ph-crumbs li + li::before { content: "/"; margin: 0 0.6rem; color: var(--ph-muted); }
.ph-crumbs a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }
.ph-crumbs [aria-current] { color: var(--ph-muted); }

/* ---------- In-page navigation ---------- */

.ph-subnav {
  border-bottom: 1px solid var(--ph-line);
  background: var(--ph-paper);
}

.ph-subnav .container {
  display: flex;
  gap: 0 1.5rem;
  overflow-x: auto;
  scrollbar-width: thin;
}

.ph-subnav a {
  --primary-color: var(--ph-muted);
  --primary-hover: var(--ph-ink);
  display: inline-flex;
  flex: none;
  align-items: center;
  min-height: 52px;
  border-bottom: 2px solid transparent;
  color: var(--ph-muted);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
}

.ph-subnav a:hover {
  border-bottom-color: var(--ph-brass);
  color: var(--ph-ink);
}

.ph-subnav a:focus-visible { outline-offset: -3px; }

/* ---------- Home: course paths ---------- */

.ph-paths {
  display: grid;
  gap: 2.5rem;
}

@media (min-width: 768px) {
  .ph-paths { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem; }
}

@media (min-width: 1200px) {
  .ph-paths { gap: 3.5rem; }
}

.ph-path {
  display: flex;
  flex-direction: column;
  border-top: 4px solid var(--ph-ebony);
  background: var(--ph-paper);
}

.ph-path__photo img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

.ph-path__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: clamp(1.25rem, 0.9rem + 1.5vw, 2.25rem);
}

.ph-path__index {
  margin-bottom: 0.4rem;
  color: var(--ph-brass-ink);
  font-family: var(--ph-serif);
  letter-spacing: 0.08em;
}

.ph-path h3 a {
  --primary-color: var(--ph-ink);
  --primary-hover: var(--ph-chestnut);
  color: var(--ph-ink);
  text-decoration: none;
}

.ph-path h3 a:hover { color: var(--ph-chestnut); text-decoration: underline; }

.ph-path__meta {
  color: var(--ph-brass-ink);
  font-weight: 700;
}

.ph-path__note {
  color: var(--ph-muted);
  font-size: 0.93rem;
  font-style: italic;
}

.ph-path .ph-actions {
  margin-top: auto;
  padding-top: 0.5rem;
}

/* ---------- Home: reasons ---------- */

.ph-reasons {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ph-reasons li {
  padding: 1.5rem 0;
  border-top: 1px solid var(--ph-line-dark);
}

.ph-reasons p { margin: 0; color: var(--ph-soft-light); }

.ph-reasons__number {
  display: block;
  margin-bottom: 0.9rem;
  color: var(--ph-brass-light);
  font-family: var(--ph-serif);
  font-size: 2.25rem;
  line-height: 1;
}

@media (min-width: 576px) {
  .ph-reasons { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 2.5rem; }
  .ph-reasons li { padding: 1.75rem 0; }
}

@media (min-width: 1200px) {
  .ph-reasons { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ---------- Home: testimonials ---------- */

.ph-quotes {
  display: grid;
  gap: 2.25rem 2.5rem;
}

@media (min-width: 768px) {
  .ph-quotes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1200px) {
  .ph-quotes { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.ph-quote {
  display: flex;
  flex-direction: column;
  padding-top: 1.25rem;
  border-top: 2px solid var(--ph-ebony);
}

.ph-quote blockquote {
  margin: 0 0 1.25rem;
  font-family: var(--ph-serif);
  font-size: 1.12rem;
  line-height: 1.55;
}

.ph-quote blockquote p { margin: 0; }

.ph-quote figcaption {
  display: flex;
  flex-direction: column;
  margin-top: auto;
  color: var(--ph-muted);
  font-size: 0.92rem;
}

.ph-quote figcaption strong { color: var(--ph-ink); }
.ph-quote .ph-link { align-self: flex-start; }

/* ---------- Home: facilities and trial ---------- */

.ph-facility {
  display: grid;
  gap: 2rem;
}

@media (min-width: 992px) {
  .ph-facility { grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); gap: 4.5rem; align-items: center; }
}

.ph-facility__copy p:last-child { margin-bottom: 0; }

.ph-trial-card {
  padding: clamp(1.5rem, 1rem + 2vw, 2.5rem);
  border-top: 4px solid var(--ph-brass-light);
  background: var(--ph-ebony);
}

.ph-trial-card h3 { color: #fbf6ec; font-size: clamp(1.4rem, 1.2rem + 0.8vw, 1.8rem); }
.ph-trial-card p { color: var(--ph-soft-light); }
.ph-trial-card .ph-actions { margin-top: 1rem; }

/* ---------- Home: videos ---------- */

.ph-videos {
  display: grid;
  gap: 2.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 768px) {
  .ph-videos { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem; }
}

.ph-video__frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--ph-ebony);
}

.ph-video__frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.ph-video h3 { margin: 1rem 0 0; font-size: 1.15rem; }

/* ---------- Home: mission, identity, metrics ---------- */

.ph-about {
  display: grid;
  gap: 3rem;
}

@media (min-width: 992px) {
  .ph-about { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5rem; }
}

.ph-mission {
  margin: 0;
  padding: 0;
  list-style: none;
}

.ph-mission li {
  display: grid;
  grid-template-columns: 2.5rem minmax(0, 1fr);
  gap: 1rem;
  padding: 1.1rem 0;
  border-top: 1px solid var(--ph-line);
}

.ph-mission li p { margin: 0; }

.ph-mission__n {
  color: var(--ph-brass-ink);
  font-family: var(--ph-serif);
  font-size: 1.4rem;
  line-height: 1.2;
}

.ph-metrics {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ph-metrics li {
  padding: 1.5rem 0;
  border-top: 1px solid var(--ph-line-dark);
}

.ph-metrics__value {
  display: block;
  margin-bottom: 0.6rem;
  color: var(--ph-brass-light);
  font-family: var(--ph-serif);
  font-size: clamp(3rem, 2rem + 4vw, 4.75rem);
  line-height: 1;
}

.ph-metrics__label { display: block; max-width: 20rem; color: #f3ece0; }

.ph-metrics__note {
  margin: 2rem 0 0;
  color: #eadfcf;
  font-size: 0.88rem;
}

@media (min-width: 768px) {
  .ph-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ph-metrics li { padding: 0.5rem 2rem; border-top: 0; border-left: 1px solid var(--ph-line-dark); }
  .ph-metrics li:first-child { padding-left: 0; border-left: 0; }
}

/* ---------- Galleries ---------- */

.ph-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 768px) {
  .ph-gallery { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.75rem; }
}

@media (min-width: 1200px) {
  .ph-gallery { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

.ph-gallery--trio { grid-template-columns: repeat(3, minmax(0, 1fr)); }

@media (min-width: 768px) {
  .ph-gallery--six { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 1200px) {
  .ph-gallery--trio { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ph-gallery--six { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}

.ph-gallery__thumb {
  display: block;
  overflow: hidden;
  background: var(--ph-line);
}

.ph-gallery__thumb img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  transition: transform 0.35s ease, opacity 0.2s ease;
}

.ph-gallery__thumb:hover img { transform: scale(1.04); opacity: 0.92; }

.ph-more--posts { padding-bottom: 2.5rem; }

/* ---------- Locations ---------- */

.ph-locations {
  display: grid;
  gap: 2.5rem;
}

@media (min-width: 992px) {
  .ph-locations { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 4rem; }
}

.ph-locations__list {
  display: grid;
  gap: 0 2rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 576px) {
  .ph-locations__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.ph-locations__list li {
  padding: 1rem 0 0.5rem;
  border-top: 1px solid var(--ph-line);
}

.ph-locations__list h3 { margin: 0.2rem 0; font-size: 1.15rem; }
.ph-locations__list p { margin: 0; color: var(--ph-muted); font-size: 0.95rem; }

.ph-locations__number {
  color: var(--ph-brass-ink);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ph-contact {
  align-self: start;
  padding: clamp(1.5rem, 1rem + 2vw, 2.25rem);
  border-top: 4px solid var(--ph-brass-light);
  background: var(--ph-ebony);
}

.ph-contact h3 { color: #fbf6ec; }
.ph-contact dl { margin: 0; }

.ph-contact dl div {
  padding: 0.6rem 0;
  border-top: 1px solid var(--ph-line-dark);
}

.ph-contact dt {
  color: var(--ph-brass-light);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ph-contact dd { margin: 0; }

.ph-contact dd a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

/* ---------- Registration ---------- */

.ph-signup { background: var(--ph-paper); }

.ph-signup__grid {
  display: grid;
  gap: 2rem;
}

@media (min-width: 992px) {
  .ph-signup__grid { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: 4rem; align-items: start; }
}

.ph-signup__contact {
  display: grid;
  gap: 0.25rem;
  margin: 1.5rem 0 0;
}

.ph-signup__contact div { display: flex; flex-wrap: wrap; align-items: center; gap: 0 0.75rem; }

.ph-signup__contact dt {
  min-width: 5rem;
  color: var(--ph-muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ph-signup__contact dd { margin: 0; }

.ph-signup__contact a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 600;
}

.ph-signup__form {
  padding: clamp(1rem, 0.5rem + 2vw, 2rem);
  border: 1px solid var(--ph-line);
  border-top: 4px solid var(--ph-ebony);
  background: #fff;
}

.ph-signup__form iframe,
.ph-trial-modal iframe {
  display: block;
  width: 100%;
  border: 0;
}

/* ---------- Children ---------- */

.ph-spec {
  display: grid;
  margin: 0;
  border-top: 2px solid var(--ph-ebony);
}

.ph-spec div {
  padding: 1rem 1.25rem 1rem 0;
  border-bottom: 1px solid var(--ph-line);
}

.ph-spec dt {
  margin-bottom: 0.25rem;
  color: var(--ph-brass-ink);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ph-spec dd {
  margin: 0;
  font-family: var(--ph-serif);
  font-size: 1.15rem;
  line-height: 1.4;
}

@media (min-width: 576px) {
  .ph-spec { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 2rem; }
}

@media (min-width: 992px) {
  .ph-spec { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.ph-numbered {
  display: grid;
  gap: 0 4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 992px) {
  .ph-numbered { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.ph-numbered > li {
  display: grid;
  grid-template-columns: 2.5rem minmax(0, 1fr);
  gap: 1rem;
  padding: 1.5rem 0 0.5rem;
  border-top: 1px solid var(--ph-line);
}

.ph-numbered__n {
  color: var(--ph-brass-ink);
  font-family: var(--ph-serif);
  font-size: 2rem;
  line-height: 1;
}

.ph-outcomes {
  display: grid;
  gap: 0 3rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 768px) {
  .ph-outcomes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.ph-outcomes li {
  display: grid;
  grid-template-columns: 3.25rem minmax(0, 1fr);
  gap: 1rem;
  align-items: baseline;
  padding: 1rem 0;
  border-top: 1px solid var(--ph-line-dark);
}

.ph-outcomes__note {
  color: var(--ph-brass-light);
  font-family: var(--ph-serif);
  font-size: 1.15rem;
  font-style: italic;
}

.ph-formats {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .ph-formats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem; }
}

.ph-format {
  padding: clamp(1.25rem, 1rem + 1.5vw, 2.25rem);
  border-top: 4px solid var(--ph-ebony);
  background: var(--ph-paper);
}

.ph-format--solo { border-top-color: var(--ph-brass); }
.ph-format dl { margin: 1.25rem 0 0; }

.ph-format dl div {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.25rem 1rem;
  padding: 0.7rem 0;
  border-top: 1px solid var(--ph-line);
}

.ph-format dt { color: var(--ph-muted); font-weight: 600; }
.ph-format dd { margin: 0; font-weight: 600; text-align: right; }

/* ---------- Adults ---------- */

.ph-style-index {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 0 0 2.5rem;
  padding: 0;
  border: 1px solid var(--ph-ebony);
  background: var(--ph-ebony);
  list-style: none;
}

@media (min-width: 768px) {
  .ph-style-index { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* Each course style is drawn as a white key with a black key at its top edge. */
.ph-style-index a {
  --primary-color: var(--ph-ink);
  --primary-hover: var(--ph-ink);
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  height: 100%;
  min-height: 7rem;
  padding: 2.5rem 1rem 1rem;
  background: var(--ph-paper);
  color: var(--ph-ink);
  text-decoration: none;
  transition: background-color 0.2s ease;
}

.ph-style-index a::before {
  content: "";
  position: absolute;
  top: 0;
  right: 1rem;
  width: 0.9rem;
  height: 2.1rem;
  border-radius: 0 0 2px 2px;
  background: var(--ph-ebony);
}

.ph-style-index a:hover { background: #fff; }
.ph-style-index a:focus-visible { outline-offset: -4px; }

.ph-style-index span {
  color: var(--ph-brass-ink);
  font-family: var(--ph-serif);
  font-size: 0.9rem;
}

.ph-style-index strong {
  font-family: var(--ph-serif);
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.25;
}

.ph-style-index small { color: var(--ph-muted); font-size: 0.82rem; }

.ph-table-wrap {
  overflow-x: auto;
  border-top: 2px solid var(--ph-ebony);
}

.ph-price-table {
  width: 100%;
  min-width: 36rem;
  border-collapse: collapse;
  font-size: 0.93rem;
}

.ph-price-table caption {
  padding: 0.75rem 0;
  caption-side: top;
  color: var(--ph-muted);
  font-size: 0.85rem;
}

.ph-price-table th,
.ph-price-table td {
  padding: 0.75rem 0.75rem 0.75rem 0;
  border-bottom: 1px solid var(--ph-line);
  text-align: left;
  vertical-align: top;
}

.ph-price-table thead th {
  color: var(--ph-muted);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ph-price-table tbody th {
  font-family: var(--ph-serif);
  font-size: 1.05rem;
  white-space: nowrap;
}

.ph-price-table--compact { min-width: 0; }
.ph-price-table td { white-space: nowrap; }
.ph-price-note { margin-top: 1rem; color: var(--ph-muted); font-size: 0.93rem; }

@media (max-width: 575px) {
  .ph-price-table--compact { font-size: 0.85rem; }
  .ph-price-table--compact tbody th { font-size: 0.95rem; }
}

.ph-style {
  padding: clamp(3rem, 2rem + 4vw, 5.5rem) 0;
  border-top: 1px solid var(--ph-line);
}

.ph-style--alt { background: var(--ph-paper); }

.ph-style__head {
  display: grid;
  gap: 1.5rem 4rem;
  margin-bottom: 2rem;
}

.ph-style__head p:last-child { margin-bottom: 0; }

.ph-style__photo img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

@media (min-width: 992px) {
  .ph-style__head { grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); align-items: end; }
  .ph-style__photo img { aspect-ratio: 3 / 2; }
}

.ph-levels { border-top: 2px solid var(--ph-ebony); }
.ph-level { border-bottom: 1px solid var(--ph-line); }

.ph-level summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.3rem 1rem;
  align-items: center;
  min-height: 56px;
  padding: 1.1rem 0;
  cursor: pointer;
  list-style: none;
}

.ph-level summary::-webkit-details-marker { display: none; }
.ph-level summary:focus-visible { outline-offset: 2px; }

.ph-level__count {
  font-family: var(--ph-serif);
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.2;
}

.ph-level__price {
  grid-column: 1;
  color: var(--ph-chestnut);
  font-size: 1rem;
  font-weight: 600;
}

.ph-level__toggle {
  position: relative;
  grid-row: 1 / span 2;
  grid-column: 2;
  width: 44px;
  height: 44px;
  border: 1px solid var(--ph-line);
}

.ph-level__toggle::before,
.ph-level__toggle::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 14px;
  height: 2px;
  margin: -1px 0 0 -7px;
  background: var(--ph-ink);
  transition: transform 0.2s ease;
}

.ph-level__toggle::after { transform: rotate(90deg); }
.ph-level[open] .ph-level__toggle::after { transform: rotate(0deg); }
.ph-level summary:hover .ph-level__toggle { border-color: var(--ph-ink); }

.ph-level__body { padding: 0.25rem 0 1.5rem; }
.ph-level__body .ph-keylist { margin: 0; }

@media (min-width: 768px) {
  .ph-keylist--columns { column-count: 2; column-gap: 3rem; }
  .ph-keylist--columns li { break-inside: avoid; }
}

.ph-style__cta { margin-top: 2rem; }

/* ---------- Thank you ---------- */

.ph-thanks { padding: clamp(2rem, 1rem + 4vw, 5rem) 0; }

.ph-thanks__grid {
  display: grid;
  gap: 2.5rem;
}

@media (min-width: 992px) {
  .ph-thanks__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 4.5rem; align-items: center; }
}

.ph-thanks__letter {
  padding: clamp(1.5rem, 1rem + 2.5vw, 3rem);
  border-top: 4px solid var(--ph-ebony);
  background: var(--ph-paper);
}

.ph-thanks__photo img { aspect-ratio: 1; object-fit: contain; }

.ph-thanks__call { font-weight: 600; }
.ph-thanks__url { overflow-wrap: anywhere; }

.ph-thanks__signature {
  margin: 1.75rem 0 0;
  padding-top: 1.25rem;
  border-top: 1px solid var(--ph-line);
  font-family: var(--ph-serif);
  font-size: 1.2rem;
  font-style: italic;
}

@media (max-width: 991.98px) {
  .ph-thanks__photo { order: 2; }
}

/* ---------- Modals (rendered outside .ph-page) ---------- */

.ph-modal .modal-content {
  border: 0;
  border-top: 4px solid var(--ph-ebony);
  border-radius: 4px;
  background: var(--ph-paper);
  color: var(--ph-ink);
}

.ph-modal .modal-header {
  align-items: flex-start;
  gap: 1rem;
  border-bottom: 1px solid var(--ph-line);
}

.ph-modal .modal-title { margin: 0; font-size: clamp(1.15rem, 1rem + 0.6vw, 1.45rem); }

.ph-modal .modal-header .btn-close {
  box-sizing: border-box;
  flex: none;
  width: 44px;
  height: 44px;
  margin: -0.35rem -0.35rem 0 auto;
  padding: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='m2 2 12 12M14 2 2 14' fill='none' stroke='%23211a16' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-size: 0.9rem;
  background-color: transparent;
  transform: none;
  box-shadow: none;
  opacity: 0.9;
}

.ph-modal .btn-close:hover { opacity: 1; }

.ph-modal .btn-close:focus,
.ph-modal .btn-close:focus-visible {
  box-shadow: none;
  opacity: 1;
}

.ph-modal .btn-close:focus-visible { outline: 3px solid var(--ph-brass); outline-offset: 2px; }

.ph-photo-modal .modal-body { margin: 0; padding: 1rem; }

.ph-photo-modal .modal-body img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 78vh;
  object-fit: contain;
  background: var(--ph-ebony);
}

.ph-photo-modal figcaption a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 600;
}

/* ---------- Small screens and motion ---------- */

@media (max-width: 575.98px) {
  .ph-actions .ph-button { flex: 1 1 100%; }
  .ph-hero__figure { box-shadow: 6px 6px 0 var(--ph-chestnut); }
  .ph-level__count { font-size: 1.3rem; }
  .ph-quote blockquote { font-size: 1.05rem; }
}

@media (prefers-reduced-motion: reduce) {
  .ph-page *,
  .ph-page *::before,
  .ph-page *::after,
  .ph-modal * {
    transition: none !important;
    scroll-behavior: auto !important;
  }

  .ph-gallery__thumb:hover img,
  .ph-hero__path:hover::after { transform: none; }
}
