/* Therapy styles (/resources/therapy-styles), in the same reading room as the other guides
   (guide.css + guide-reader.js): one chapter at a time, the short version taped at the top and the
   bottom line always showing after the chapters. Page pieces:
   - green and red flags are two pinned cards; each line carries a small pennant (sage or brick);
   - the five comparison dimensions are paper strips with a label tab;
   - common labels are paper luggage tags, gently tilted; the warning term is the brick tag;
   - the profile questions are a notepad; the research findings are index cards;
   - the questions to ask while observing are a dusk card, as on the other guides.
   No drawn pictures. Motion respects prefers-reduced-motion. */

.p-therapy .therapy-guide .guide-sections > .accordion { margin-bottom: 0; }

/* the short version: the taped note above the chapters */
.p-therapy .ts-short { margin: 10px 0 26px; rotate: .3deg; }
.p-therapy .ts-short > .callout-h { color: var(--blue-ink); }
.p-therapy .ts-short p { font-size: 17.5px; }

/* ---------- flags ---------- */
.p-therapy .flags-grid { gap: 26px; margin: 14px 0 22px; align-items: start; }
.p-therapy .flags-grid > .content-card {
  --c: var(--sage); --ink: var(--sage-ink);
  position: relative; margin: 0; padding: 32px 20px 16px; border: 0; border-radius: 6px;
  background: #fff; box-shadow: 0 1px 1px rgba(60, 40, 10, .06), 0 20px 30px -22px rgba(60, 40, 10, .55);
  border-top: 8px solid var(--c);
}
.p-therapy .flags-grid > .content-card--gold { --c: var(--brick); --ink: var(--brick-ink); rotate: .4deg; }
.p-therapy .flags-grid > .content-card--mist { rotate: -.4deg; }
.p-therapy .flags-grid > .content-card::before {
  content: ""; position: absolute; top: -16px; left: 50%; width: 24px; height: 24px; margin-left: -12px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff 0 12%, var(--c) 34%, rgba(0, 0, 0, .35) 130%); box-shadow: 0 5px 6px -2px rgba(0, 0, 0, .35);
}
.p-therapy .therapy-guide .flags-grid h2 { margin: 0 0 12px; font: 400 clamp(28px, 2.8vw, 32px)/1 var(--f-hand); color: var(--ink); letter-spacing: 0; }
.p-therapy .guide-sections .flags-grid ul:not([class]) > li { padding-left: 28px; font-size: 15.5px; line-height: 1.58; margin-bottom: .75em; }
.p-therapy .guide-sections .flags-grid ul:not([class]) > li::before { /* a pennant on a pole */
  content: ""; left: 4px; top: .3em; width: 13px; height: 14px; border-radius: 0; box-shadow: -2px 0 0 0 var(--navy);
  background: var(--c); clip-path: polygon(0 0, 100% 35%, 0 70%);
}
.p-therapy .guide-sections .flags-grid ul:not([class]) > li::after {
  content: ""; position: absolute; left: 2px; top: .3em; width: 2px; height: 1.05em; border-radius: 1px; background: var(--navy);
}
.p-therapy .flags-grid + p { padding: 14px 18px; border-radius: 12px; background: #faf6ec; border: 1px dashed #dcc995; font-size: 16.5px; }

/* ---------- comparing approaches: five paper strips ---------- */
.p-therapy .therapy-guide .compare-table { display: block; margin: 12px 0 10px; border: 0; }
.p-therapy .therapy-guide .compare-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.p-therapy .therapy-guide .compare-table tbody { display: grid; gap: 14px; }
.p-therapy .therapy-guide .compare-table tr {
  --c: var(--gold);
  display: grid; grid-template-columns: 11em minmax(0, 1fr); align-items: center; gap: 18px;
  padding: 14px 18px 14px 0; border-radius: 6px 16px 16px 6px; background: #fff; border: 1px solid #ecdfc2;
  box-shadow: 0 14px 22px -18px rgba(60, 40, 10, .55);
}
.p-therapy .therapy-guide .compare-table tr:nth-child(2) { --c: var(--blue-ink); }
.p-therapy .therapy-guide .compare-table tr:nth-child(3) { --c: var(--sage-ink); }
.p-therapy .therapy-guide .compare-table tr:nth-child(4) { --c: var(--brick); }
.p-therapy .therapy-guide .compare-table tr:nth-child(5) { --c: var(--navy); }
.p-therapy .therapy-guide .compare-table tbody th {
  position: relative; width: auto; margin-left: -8px; padding: 10px 14px 10px 18px; border: 0; white-space: normal;
  background: var(--c); color: #fff; border-radius: 4px 12px 12px 4px; font: 600 16px/1.2 var(--f-display);
  box-shadow: 0 6px 10px -6px rgba(60, 40, 10, .6);
}
.p-therapy .therapy-guide .compare-table tr:nth-child(1) th { color: var(--navy); }
.p-therapy .therapy-guide .compare-table tbody td { padding: 0; border: 0; font-size: 16.5px; line-height: 1.55; color: var(--text); }

/* ---------- common labels: tags on a string ---------- */
.p-therapy .style-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 22px; margin: 18px 0 24px;
}
.p-therapy .style-grid > .icon-tile {
  --tilt: -1deg;
  position: relative; padding: 26px 20px 18px; border: 0; border-radius: 8px 8px 18px 18px; background: var(--paper);
  box-shadow: 0 14px 20px -14px rgba(60, 40, 10, .6), inset 0 0 0 1px rgba(122, 91, 19, .14);
  rotate: var(--tilt); transform-origin: 50% -22px;
}
.p-therapy .style-grid > .icon-tile:nth-child(2n) { --tilt: 1deg; }
.p-therapy .style-grid > .icon-tile::after { /* punched hole */
  content: ""; position: absolute; left: 50%; top: 9px; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%;
  background: var(--cream); box-shadow: inset 0 1px 2px rgba(60, 40, 10, .35);
}
.p-therapy .style-grid > .icon-tile h3 { margin: 0 0 6px; padding: 0; font-size: 18.5px; line-height: 1.3; color: var(--navy); }
.p-therapy .style-grid > .icon-tile h3::after { display: none; }
.p-therapy .style-grid > .icon-tile p { font-size: 15.5px; line-height: 1.6; color: var(--text); }
.p-therapy .style-grid > .icon-tile:last-child { background: var(--brick-soft); box-shadow: 0 14px 20px -14px rgba(60, 40, 10, .6), inset 0 0 0 2px rgba(169, 84, 47, .45); }
.p-therapy .style-grid > .icon-tile:last-child h3 { color: var(--brick-ink); }
@media (prefers-reduced-motion: no-preference) and (hover: hover) {
  .p-therapy .style-grid > .icon-tile { transition: rotate .5s var(--spring); }
  .p-therapy .style-grid > .icon-tile:hover { rotate: 0deg; }
}
.p-therapy .style-grid + p { padding: 14px 18px; border-radius: 12px; background: #faf6ec; border: 1px dashed #dcc995; font-size: 16.5px; }

/* intros inside chapters */
.p-therapy .ts-intro { font-size: 18px !important; color: var(--navy) !important; }
.p-therapy .ts-compat { margin-top: 24px; padding: 16px 18px; border-radius: 12px; background: var(--gold-soft); color: var(--navy); }

/* ---------- research: index cards ---------- */
.p-therapy .research-grid { gap: 20px; margin: 14px 0 20px; }
.p-therapy .research-grid > .content-card {
  --c: var(--gold);
  position: relative; margin: 0; padding: 24px 20px 18px; border: 1px solid #ecdfc2; border-radius: 4px 4px 16px 4px; background: #fff;
  box-shadow: 0 1px 0 #efe4cb, 0 16px 26px -20px rgba(60, 40, 10, .55);
}
.p-therapy .research-grid > .content-card::before { content: ""; position: absolute; left: -1px; right: -1px; top: -1px; height: 7px; border-radius: 4px 4px 0 0; background: var(--c); }
.p-therapy .research-grid > .content-card:nth-child(4n+2) { --c: var(--blue); }
.p-therapy .research-grid > .content-card:nth-child(4n+3) { --c: var(--sage); }
.p-therapy .research-grid > .content-card:nth-child(4n+4) { --c: var(--brick); }
.p-therapy .research-grid h3 { margin: 0 0 10px; padding: 0 0 10px; font-size: 18.5px; line-height: 1.3; color: var(--navy); border-bottom: 2px solid rgba(169, 84, 47, .38); }
.p-therapy .research-grid h3::after { display: none; }
.p-therapy .research-grid p { font-size: 15.5px; line-height: 1.6; }
.p-therapy .research-grid p:last-child { margin-bottom: 0; }

/* ---------- questions while observing: a dusk card ---------- */
.p-therapy .observe-panel {
  position: relative; overflow: hidden; margin: 6px 0 4px; padding: clamp(24px, 4vw, 36px); border-radius: 26px; color: #efe9da;
  background:
    radial-gradient(1.5px 1.5px at 9% 8%, rgba(255,255,255,.8), transparent),
    radial-gradient(2px 2px at 38% 4%, rgba(255,255,255,.65), transparent),
    radial-gradient(1.5px 1.5px at 66% 10%, rgba(255,255,255,.5), transparent),
    radial-gradient(1.5px 1.5px at 94% 26%, rgba(255,255,255,.55), transparent),
    radial-gradient(620px 300px at 88% 0%, rgba(247, 206, 120, .16), transparent 70%),
    linear-gradient(180deg, var(--navy) 0%, var(--navy-deep) 100%);
  box-shadow: var(--shadow-lift);
}
.p-therapy .observe-list { gap: 10px; }
.p-therapy .observe-list > li {
  padding: 14px 14px 14px 56px; border-radius: 14px; background: rgba(255, 252, 245, .07); box-shadow: inset 0 0 0 1px rgba(239, 233, 218, .14);
  color: #efe9da; font-size: 16.5px;
}
.p-therapy .observe-list > li::before {
  left: 12px; top: 12px; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  background: #f3d78e; color: var(--navy); font: 600 15px/1 var(--f-display);
}
.p-therapy .observe-list strong { color: #fff; }

/* the bottom line, always showing after the chapters */
.p-therapy .guide-sections > .ts-bottom { margin-top: 30px; }

@media (max-width: 640px) {
  .p-therapy .flags-grid, .p-therapy .research-grid { grid-template-columns: 1fr; }
  .p-therapy .style-grid { grid-template-columns: 1fr; gap: 36px; }
  .p-therapy .therapy-guide .compare-table tr { grid-template-columns: 1fr; gap: 10px; padding: 0 16px 14px 0; }
  .p-therapy .therapy-guide .compare-table tbody th { justify-self: start; margin-top: 12px; }
  .p-therapy .therapy-guide .compare-table tbody td { padding-left: 16px; }
}
@media print {
  .p-therapy .observe-panel { background: #fff; color: #000; box-shadow: none; border: 1px solid #ccc; }
  .p-therapy .observe-list > li, .p-therapy .observe-list strong { color: #000; }
}
