.examples-description { max-width: 41rem; }
.example-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1rem, 2.8vw, 2rem); margin-top: 1.75rem; }
.example-card { display: flex; flex-direction: column; min-width: 0; padding: .35rem; border: 1px solid #ded8cc; border-radius: 1.05rem; background: #fffcf5; }
.example-screen { height: clamp(14.5rem, 27vw, 20rem); min-width: 0; padding: clamp(.75rem, 2.2vw, 1.4rem); border-radius: .76rem; }
.thumb-copy { min-width: 0; }
.thumb-copy > p:not(.thumb-name) { font-size: .875rem; line-height: 1.35; }
.thumb-label { font-weight: 650; }
.thumb-name { margin-block: .35rem .5rem; font: clamp(1.58rem, 4.2vw, 3.4rem)/.98 var(--serif); letter-spacing: -.055em; overflow-wrap: anywhere; }
.thumb-image { display: block; width: 100%; height: 100%; min-height: 0; object-fit: contain; }

.thumb-photo { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); grid-template-rows: minmax(0, 1fr); align-items: center; gap: clamp(.7rem, 2.2vw, 1.55rem); background: linear-gradient(90deg, #dfc6a5 0 35%, #f4e8d4 35%); color: #3c2b23; }
.thumb-photo .thumb-image { width: auto; max-width: 100%; justify-self: center; border-radius: .18rem; }
.thumb-photo .thumb-label { color: #6a4936; }

.thumb-beauty { display: grid; grid-template-rows: auto minmax(0, 1fr); gap: .7rem; text-align: center; background: #57263e; color: #fff2f5; }
.thumb-beauty .thumb-name { margin-block: .15rem .28rem; font-size: clamp(1.65rem, 3.65vw, 2.55rem); }
.thumb-beauty .thumb-copy > p:not(.thumb-name) { color: #f8d7e3; }
.thumb-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: minmax(0, 1fr); gap: .55rem; justify-self: center; width: min(100%, 19rem); }
.thumb-pair .thumb-image { border-radius: .32rem; }

.thumb-psychologist { display: grid; grid-template-rows: auto minmax(0, 1fr); justify-items: center; gap: .5rem; text-align: center; background: radial-gradient(ellipse at 50% 65%, #d7e4cf, #f0f4e9 75%); color: #284940; }
.thumb-psychologist .thumb-name { margin-block: .25rem 0; font-size: clamp(1.58rem, 3.5vw, 2.55rem); }
.thumb-psychologist .thumb-image { width: auto; max-width: 100%; border: .22rem solid #fffdf4; border-radius: .5rem; box-shadow: 0 .35rem 1rem #314b3422; }

.thumb-tutor { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .84fr); grid-template-rows: minmax(0, 1fr); align-items: center; gap: clamp(.6rem, 2vw, 1.25rem); background: linear-gradient(135deg, #182843, #243e70); color: #f7faff; }
.thumb-tutor .thumb-name { font: 730 clamp(1.5rem, 3.6vw, 3.05rem)/1.02 var(--sans); letter-spacing: -.062em; }
.thumb-tutor .thumb-label { color: #c6dbff; }
.thumb-tutor .thumb-image { border-radius: .42rem; }
.thumb-tags { display: flex; flex-wrap: wrap; gap: .2rem .3rem; margin-top: .7rem; }
.thumb-tags span { padding: .12rem .32rem; border: 1px solid #738cb8; border-radius: .16rem; font-size: .875rem; line-height: 1.25; }

.example-caption { display: flex; flex: 1; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 1rem; padding: .95rem .8rem .72rem; }
.example-caption h3 { font-size: 1.15rem; line-height: 1.25; }
.example-caption p { margin-top: .25rem; color: var(--muted); }
.example-open {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: .45rem .85rem;
  border: 1px solid currentColor;
  border-radius: .45rem;
  background: transparent;
  color: var(--accent);
  font: 650 .95rem/1.35 var(--sans);
  cursor: pointer;
}

.example-open:hover { background: #f6e8dd; }
body:has(.example-dialog[open]) { overflow: hidden; }

.example-dialog {
  position: fixed;
  inset: 0;
  width: min(66rem, calc(100% - 2rem));
  height: min(53rem, calc(100dvh - 2rem));
  max-width: none;
  max-height: none;
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 1.5rem 5rem #15171045;
}

.example-dialog::backdrop { background: #181914b8; }
.example-window { display: grid; grid-template-rows: auto minmax(0, 1fr); height: 100%; }

.example-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .6rem;
  padding: .5rem clamp(.75rem, 3vw, 1.4rem);
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  font-size: .875rem;
  font-weight: 650;
}

.example-close {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  min-height: 2.65rem;
  padding: .35rem .65rem;
  border: 1px solid var(--line);
  border-radius: .45rem;
  background: white;
  color: var(--ink);
  font: inherit;
  white-space: nowrap;
  cursor: pointer;
}

.example-close:hover { background: #ebe8dd; }
.example-close span { font-size: 1.25rem; line-height: .9; }
.example-scroll { overflow: auto; overscroll-behavior: contain; overflow-anchor: none; }

.demo-page {
  --demo-paper: #fcf7ec;
  --demo-tint: #f0e5d1;
  --demo-ink: #3a2b23;
  --demo-accent: #754733;
  --demo-heading: var(--serif);
  background: var(--demo-paper);
  color: var(--demo-ink);
}

.demo-beauty { --demo-paper: #fff9fb; --demo-tint: #f6e5ed; --demo-ink: #4a2c3c; --demo-accent: #752f53; }
.demo-psychologist { --demo-paper: #f6f8f1; --demo-tint: #e7efe3; --demo-ink: #29463e; --demo-accent: #365a51; }
.demo-tutor { --demo-paper: #f6f9ff; --demo-tint: #e6eefc; --demo-ink: #152745; --demo-accent: #2853a0; --demo-heading: var(--sans); }

.demo-inner { width: min(55rem, calc(100% - clamp(2rem, 8vw, 5rem))); margin-inline: auto; }
.demo-hero-inner { display: grid; gap: clamp(1.2rem, 4vw, 3rem); align-items: center; padding-block: clamp(1.65rem, 5.5vw, 4rem); }
.demo-role, .demo-location { font-size: .95rem; font-weight: 680; }
.demo-role { color: var(--demo-accent); }
.demo-location { margin-top: .85rem; }
.demo-hero h2 { margin-top: .5rem; font: 400 clamp(2.5rem, 7vw, 5.4rem)/.99 var(--demo-heading); letter-spacing: -.06em; overflow-wrap: anywhere; }
.demo-intro { max-width: 33rem; margin-top: .9rem; font-size: clamp(1.05rem, 2.2vw, 1.23rem); }
.demo-cover { min-width: 0; }
.demo-page img { display: block; max-width: 100%; height: auto; object-fit: contain; }
.demo-actions { display: flex; align-items: center; flex-wrap: wrap; gap: .55rem 1rem; margin-top: 1.25rem; }

.demo-photo .demo-hero { background: linear-gradient(90deg, #e8d7bb 0 31%, var(--demo-paper) 31%); }
.demo-photo .demo-hero-inner { grid-template: 'portrait intro' auto / minmax(0, .81fr) minmax(0, 1.19fr); }
.demo-photo .demo-hero-copy { grid-area: intro; }
.demo-photo .demo-cover { grid-area: portrait; justify-self: center; padding: .43rem; border: 1px solid #d2bda4; background: #fff9ed; box-shadow: -.6rem .65rem 0 #8f665331; }
.demo-photo .demo-portrait { width: auto; max-height: 27rem; }

.demo-beauty .demo-hero { background: #57263e; color: #fff5f8; }
.demo-beauty .demo-hero-inner { justify-items: center; gap: 1.6rem; text-align: center; }
.demo-beauty .demo-role, .demo-beauty .demo-hero .demo-link { color: #fbd3e5; }
.demo-beauty .demo-hero .demo-button { background: #fff2f7; color: #57263e; }
.demo-beauty .demo-intro, .demo-psychologist .demo-intro { margin-inline: auto; }
.demo-beauty .demo-actions, .demo-psychologist .demo-actions { justify-content: center; }
.demo-beauty .demo-cover { width: min(100%, 31rem); }
.demo-nails-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(.55rem, 2vw, 1.1rem); }
.demo-nails-image { width: 100%; border-radius: .65rem; }

.demo-psychologist .demo-hero { background: radial-gradient(ellipse at 50% 35%, #dbe9da, #f2f6ed 70%); }
.demo-psychologist .demo-hero-inner { grid-template: 'portrait' auto 'intro' auto / minmax(0, 1fr); justify-items: center; text-align: center; }
.demo-psychologist .demo-hero-copy { grid-area: intro; max-width: 40rem; }
.demo-psychologist .demo-cover { grid-area: portrait; padding: .48rem; border-radius: .68rem; background: #fffcf5; box-shadow: 0 .55rem 1.2rem #31504624; }
.demo-psychologist .demo-portrait { width: auto; max-height: 13.4rem; border-radius: .36rem; }
.demo-psychologist .demo-hero h2 { font-size: clamp(2.5rem, 6.1vw, 4.75rem); }

.demo-tutor .demo-hero { background: linear-gradient(135deg, #162541, #203a65); color: #f7faff; }
.demo-tutor .demo-hero-inner { grid-template-columns: minmax(0, 1.17fr) minmax(0, .83fr); }
.demo-tutor .demo-hero h2 { font-weight: 750; }
.demo-tutor .demo-role, .demo-tutor .demo-hero .demo-link { color: #d0e1ff; }
.demo-tutor .demo-hero .demo-button { background: #cbe0ff; color: #142644; }
.demo-tutor .demo-location { display: inline-block; padding: .35rem .55rem; border: 1px solid #758fb9; border-radius: .26rem; }
.demo-tutor .demo-cover { display: grid; justify-items: center; padding: .65rem; border: 1px solid #6683b4; border-radius: .75rem; background: #2a4778; }
.demo-tutor .demo-portrait { width: auto; max-height: 23.5rem; border-radius: .38rem; }

.demo-button, .demo-link {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 2.85rem;
  padding: .45rem .9rem;
  border: 1px solid transparent;
  border-radius: .43rem;
  background: var(--demo-accent);
  color: white;
  font: 675 .925rem/1.25 var(--sans);
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.demo-button:hover { filter: brightness(.88); }
.demo-link { padding-inline: .2rem; background: transparent; color: var(--demo-accent); text-decoration: underline; text-underline-offset: .25em; }
.demo-link:hover { text-decoration-thickness: 2px; }
.demo-page h3 { font: 400 clamp(1.85rem, 4.6vw, 3.2rem)/1.09 var(--demo-heading); letter-spacing: -.05em; }
.demo-tutor h3 { font-weight: 670; }
.demo-page h4 { margin: 0; font-size: 1rem; font-weight: 720; }

.demo-about, .demo-work, .demo-prices, .demo-contact { padding-block: clamp(1.65rem, 5vw, 3.7rem); }
.demo-about p { max-width: 43rem; margin-top: .8rem; font-size: 1.05rem; }
.demo-about-with-portrait { display: grid; grid-template-columns: minmax(0, .62fr) minmax(0, 1.38fr); align-items: center; gap: clamp(1rem, 4vw, 2.5rem); border-top: 1px solid #64344b2b; }
.demo-about-portrait { width: min(100%, 13rem); justify-self: center; border-radius: .65rem; }
.demo-psychologist .demo-about { max-width: 40rem; text-align: center; }
.demo-tutor .demo-about { border-top: 1px solid #34588c38; }
.demo-work { background: var(--demo-tint); }
.demo-gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: clamp(.65rem, 3vw, 1.35rem); margin-top: 1.2rem; }
.demo-beauty .demo-gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.demo-gallery figure { margin: 0; }
.demo-gallery-image { width: 100%; border-radius: .45rem; }
.demo-photo .demo-gallery figure { padding: .4rem .4rem .65rem; border: 1px solid #d3bfa9; background: #fff9ed; }
.demo-photo .demo-gallery-image { aspect-ratio: 1; border-radius: .1rem; }
.demo-beauty .demo-gallery-image { aspect-ratio: 540 / 676; }
.demo-gallery figcaption { margin-top: .4rem; font-size: .9rem; font-weight: 650; }
.demo-beauty .demo-gallery figcaption { text-align: center; }

.demo-topics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; margin: 1.2rem 0 0; padding: 0; list-style: none; }
.demo-topics li { padding: .85rem; border: 1px solid #29323026; border-radius: .55rem; background: var(--demo-paper); }
.demo-topics p { margin-top: .35rem; font-size: .925rem; }
.demo-psychologist .demo-topics { grid-template-columns: minmax(0, 1fr); gap: 0; border-top: 1px solid #365a5140; }
.demo-psychologist .demo-topics li { display: grid; grid-template-columns: minmax(0, .75fr) minmax(0, 1.25fr); align-items: baseline; gap: .25rem 1rem; padding: .9rem 0; border: 0; border-bottom: 1px solid #365a5140; border-radius: 0; background: transparent; }
.demo-psychologist .demo-topics p { margin-top: 0; }
.demo-tutor .demo-topics li { padding: 1rem; border: 1px solid #9db6e0; border-top: .25rem solid #3c65aa; border-radius: .45rem; }

.demo-price-list { margin: 1.15rem 0 0; padding: 0; border-top: 1px solid #29323038; list-style: none; }
.demo-price-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .55rem 1rem; align-items: start; padding-block: .85rem; border-bottom: 1px solid #29323038; }
.demo-price-list p { margin-top: .2rem; font-size: .925rem; }
.demo-price-list strong { font-size: 1.05rem; white-space: nowrap; }
.demo-beauty .demo-price-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .7rem; border-top: 0; }
.demo-beauty .demo-price-list li { grid-template-columns: minmax(0, 1fr); gap: .75rem; padding: .9rem; border: 1px solid #dab8c9; border-radius: .55rem; background: #fff1f7; }
.demo-beauty .demo-price-list strong { color: #752f53; font-size: 1.18rem; }
.demo-psychologist .demo-price-list li { padding-block: 1.15rem; }
.demo-tutor .demo-price-list strong { color: #2853a0; }

.demo-contact { background: var(--demo-accent); color: white; }
.demo-contact p { max-width: 39rem; margin-top: .65rem; }
.demo-contact .demo-contact-note { color: #fffdf0; font-size: .9rem; }
.demo-contact .demo-button { margin-top: 1.1rem; background: var(--demo-paper); color: var(--demo-accent); }
.demo-contact .demo-button:focus-visible { outline-color: white; }

@media (max-width: 40rem) {
  .example-grid { grid-template-columns: minmax(0, 1fr); }
  .example-screen { height: clamp(14.5rem, 62vw, 19rem); }
  .thumb-name { font-size: clamp(1.75rem, 7vw, 2.65rem); }
  .thumb-beauty .thumb-name, .thumb-psychologist .thumb-name { font-size: clamp(1.75rem, 6vw, 2.45rem); }
  .thumb-tutor .thumb-name { font-size: clamp(1.65rem, 6.2vw, 2.45rem); }
  .demo-photo .demo-hero-inner { grid-template: 'intro' auto 'portrait' auto / minmax(0, 1fr); }
  .demo-photo .demo-hero { background: var(--demo-paper); }
  .demo-photo .demo-portrait, .demo-tutor .demo-portrait { max-height: 19rem; }
  .demo-tutor .demo-hero-inner { grid-template-columns: minmax(0, 1fr); }
  .demo-hero h2 { font-size: clamp(2.45rem, 9.5vw, 4.2rem); }
  .demo-topics, .demo-beauty .demo-price-list { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 30rem) {
  .example-dialog { width: calc(100% - .75rem); height: calc(100dvh - .75rem); border-radius: .75rem; }
  .demo-gallery, .demo-beauty .demo-gallery { grid-template-columns: minmax(0, 1fr); }
  .demo-beauty .demo-gallery figure { width: min(100%, 20rem); justify-self: center; }
  .demo-psychologist .demo-topics li { grid-template-columns: minmax(0, 1fr); }
  .demo-about-with-portrait { grid-template-columns: minmax(0, 1fr); }
}
