/* Consolidated styles for index.html */

@font-face {
  font-family: "Lora";
  src: url("./assets/fonts/Lora-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Onest";
  src: url("./assets/fonts/Onest-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* --- base layout (was inline <style> in index-v4.html) --- */
:root {
  --bg: #ffffff;
  --ink: #292a2c;
  --muted: #6a6b70;
  --accent: #c36f41;
  --surface: #f6f9fa;
  --book-bg: #f2f5fa;
  --rule: #d9d8da;
  --radius: 24px;
  --section-gap: 100px;
  --grid-gap: 34px;
  --text-leading: 1.4;
  --heading-tracking: -0.02em;
  --heading-font: "Lora", Georgia, serif;
  --body-font: "Onest", Arial, sans-serif;
  --book-angle: 15deg;
  --book-horizontal: 15;
  --book-vertical: 8;
  --book-duration: 500ms;
  --book-depth: 17.65px;
  --book-shadow-alpha: 0.2;
  --fading-rule: linear-gradient(
    90deg,
    transparent,
    var(--rule) 18%,
    var(--rule) 82%,
    transparent
  );
  --fading-rule-left: linear-gradient(
    90deg,
    transparent,
    var(--rule) 18%,
    var(--rule)
  );
  --corner-light: radial-gradient(
    ellipse at 100% 0%,
    rgb(67 134 225 / 0.05),
    transparent 34%
  );
}
* {
  box-sizing: border-box;
}
html {
  scroll-padding-top: 120px;
}
html.fragment-navigation body {
  visibility: hidden;
}
body {
  margin: 0;
  color: var(--ink);
  line-height: 1.5;
  font-family: var(--body-font);
  background: var(--bg);
}
a {
  color: inherit;
  text-decoration: none;
}
a:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 6px;
}
img {
  display: block;
  max-width: 100%;
  height: auto;
}
button {
  user-select: none;
}
p,
h1,
h2,
h3,
figure {
  margin: 0;
}
::selection {
  background: var(--book-bg);
}
.skip {
  position: absolute;
  top: -100px;
  padding: 12px;
  background: white;
  z-index: 20;
}
.skip:focus {
  top: 0;
}
.shell {
  margin: auto;
  grid-template-columns: 205px minmax(0, 1fr);
  display: block;
  max-width: 1240px;
  border: 0;
  padding: 0 40px;
}
.rail {
  display: flex;
  border-right: 1px solid var(--rule);
  font-size: 0.875rem;
  height: auto;
  position: sticky;
  top: 0;
  z-index: 5;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border: 0;
  width: 100%;
  padding: 22px max(40px, calc((100% - 1160px) / 2));
  background: rgb(255 255 255 / 82%);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 0;
  padding-bottom: 29px;
}
.rail-title {
  line-height: 1.2;
  letter-spacing: -0.03em;
  font-family: var(--heading-font);
  font-size: 1.5rem;
  font-weight: 400;
  white-space: nowrap;
}
.rail nav {
  margin-top: 100px;
  display: flex;
  margin: 0;
  gap: 1.5em;
  font-size: 1rem;
  position: relative;
}
.rail nav a {
  display: flex;
  gap: 11px;
  align-items: center;
}
.rail nav a:before {
  content: "";
  width: 5px;
  height: 5px;
  background: transparent;
  display: none;
}
.rail nav a[aria-current] {
  text-decoration: underline;
  text-underline-offset: 7px;
  color: var(--accent);
}
.rail nav a[aria-current]:before {
  background: var(--accent);
}
main {
  min-width: 0;
  padding: 0;
}
.opening {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.85fr);
  gap: 0;
  align-items: start;
  padding: 90px 0 25px;
}
.portrait {
  grid-column: 2;
  grid-row: 1;
  align-self: start;
  position: relative;
  margin: 0;
  padding: 0;
  background: none;
  border-radius: 0;
  box-shadow: none;
  max-width: none;
  width: auto;
}
.portrait::after {
  /* An inset box-shadow on an <img> itself never renders - the browser
     paints the image's own pixels on top of it regardless of color or
     opacity. Painting it here instead, on a generated box matching the
     photo's own width/aspect-ratio (not the whole figure, which also
     includes the caption below), puts it above the image in paint order. */
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  aspect-ratio: 4/4.5;
  border-radius: var(--radius) 0 var(--radius) 0;
  box-shadow: inset 0px 12px 15px rgba(255, 255, 255, 0.3);
  pointer-events: none;
}
.portrait img {
  object-fit: cover;
  width: 100%;
  aspect-ratio: 4/4.5;
  object-position: center 20%;
  border-radius: var(--radius) 0 var(--radius) 0;
  /* The outer part of the .book-panel-style shadow (this one does render
     on an <img> - only the inset part doesn't, see .portrait::after). */
  box-shadow:
    0px 6px 36px -24px rgba(41, 42, 44, 0.18),
    0px 2px 8px -2px rgba(41, 42, 44, 0.06);
}
figcaption {
  color: var(--muted);
  font-size: 0.75rem;
  margin-top: 10px;
}
.introduction {
  padding-top: 4px;
  grid-column: 1;
  grid-row: 1;
  position: relative;
  z-index: 1;
  padding: 0 44px 0 0;
  max-width: none;
}
.introduction p + p {
  margin-top: 22px;
  max-width: 440px;
  color: var(--muted);
}
.section {
  border-top: 1px solid var(--ink);
  border: 0;
  padding: 0;
  margin-top: var(--section-gap);
}
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2.19em;
  margin-bottom: 2em;
}
h2 {
  font-size: 0.875rem;
  font-weight: 400;
}
.section-head small {
  color: var(--muted);
  font-size: 0.875rem;
}
details {
  border-top: 1px solid var(--rule);
  padding: 16px 0;
}
summary {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  cursor: pointer;
  list-style: none;
  font-size: 1rem;
}
summary::-webkit-details-marker {
  display: none;
}
summary:after {
  content: "+";
  color: var(--accent);
}
details[open] summary:after {
  content: "−";
}
details p {
  color: var(--muted);
  font-size: 0.875rem;
  margin-top: 14px;
  padding-right: 25px;
}
.book-panel {
  display: grid;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 2.81em 3.44em;
  grid-template-columns: 0.7fr 1.3fr;
  gap: 50px;
  box-shadow:
    inset 0px 12px 15px rgba(255, 255, 255, 0.6),
    0px 6px 36px -24px rgba(41, 42, 44, 0.18),
    0px 2px 8px -2px rgba(41, 42, 44, 0.06);
}
.book-object {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  perspective: 1100px;
  min-height: 340px;
  overflow: visible;
}
.book-object img {
  box-shadow: none;
  width: min(215px, 100%);
  border-radius: 3px;
}
.book-copy h3 {
  font-size: clamp(1.875rem, 3.2vw, 2.75rem);
  line-height: 1.1;
  font-weight: 400;
  letter-spacing: -0.04em;
  margin: 5px 0 25px;
}
.book-copy p {
  font-size: 0.875rem;
}
.book-copy p + p {
  margin-top: 16px;
}
.book-copy .audience {
  color: var(--ink);
  display: inline-block;
  padding: 0.4em 0.7em;
  background: rgb(255 255 255 / 65%);
  border-radius: calc(var(--radius) / 3);
  font-size: 0.875rem;
  line-height: 1.5;
}
.publications {
  display: grid;
  column-gap: 38px;
  gap: 0 var(--grid-gap);
  grid-template-columns: 1.15fr 1fr;
}
.publication {
  display: flex;
  flex-direction: column;
  align-items: start;
  padding: 1.63em 0;
  border-top: 0;
  position: relative;
}
.publication:first-child {
  padding-right: 25px;
  background: var(--surface);
  border: 0;
  border-radius: var(--radius);
  padding: 2em;
  grid-row: span 2;
}
.publication .category {
  color: var(--accent);
  margin-top: 0;
  margin-bottom: 20px;
  font-size: 0.875rem;
}
.publication h3 {
  font-weight: 400;
  letter-spacing: -0.025em;
  font-size: 1.625rem;
  line-height: 1.25;
}
.publication:first-child h3 {
  font-size: clamp(1.75rem, 3vw, 2.375rem);
  line-height: 1.22;
}
.publication p {
  font-size: 0.875rem;
  color: var(--muted);
  margin-top: 20px;
}
.publication a {
  margin-top: 25px;
  text-decoration: underline;
  text-underline-offset: 5px;
  font-size: 1rem;
}
.contact-row {
  grid-template-columns: 1fr 1.4fr;
  gap: 42px;
  border-top: 1px solid var(--rule);
  display: block;
  padding: 0.94em 0;
}
.contact-row dt {
  font-size: 1.125rem;
  color: var(--ink);
  margin-bottom: 0.28em;
}
.contact-row dd {
  margin: 0;
  font-size: 1rem;
  letter-spacing: 0;
  color: var(--muted);
}
.contact-row a,
.social-link {
  display: inline-flex;
  align-items: center;
  overflow-wrap: anywhere;
}
.contact-row a span {
  font-size: 1.125rem;
  color: var(--accent);
}
footer {
  border-top: 1px solid var(--ink);
  padding: 20px 0 30px;
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  margin-top: var(--section-gap);
  border-color: var(--rule);
  font-size: 0.875rem;
  padding-bottom: 85px;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

/* --- v3-refinement.css --- */
.portrait figcaption {
  padding: 0;
  margin: 16px 0 0;
  max-width: none;
  width: 100%;
  font-size: 0.75rem;
  line-height: 1.5;
  color: var(--muted);
}
h1,
h2,
h3 {
  font-family: var(--heading-font);
  letter-spacing: var(--heading-tracking);
  font-weight: 400;
}
h1 {
  font-size: clamp(2.125rem, 4.2vw, 3.5rem);
  line-height: 1.16;
}
.introduction p {
  font-size: 1.25rem;
  line-height: var(--text-leading);
  margin-top: 26px;
  color: var(--muted);
}
.section-head h2 {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  line-height: 1.2;
}
.section-head p {
  max-width: 370px;
  color: var(--muted);
  font-size: 1rem;
  line-height: var(--text-leading);
}
.book-copy h2 {
  font-size: clamp(1.875rem, 3.6vw, 2.75rem);
  line-height: 1.2;
  margin: 0.43em 0 0.77em;
}
.book-copy p:not(.audience) {
  font-size: 1rem;
  line-height: var(--text-leading);
}
.publication p:not(.category) {
  font-size: 1rem;
  line-height: var(--text-leading);
}
form {
  background: var(--surface);
  padding: 0.8em 2em 2em;
  border-radius: var(--radius);
}
.field-honeypot {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
form h3 {
  font-size: 1.625rem;
  margin-bottom: 22px;
}
form label {
  display: block;
  font-size: 1rem;
  margin: 15px 0 6px;
}
.field-error {
  display: none;
}
form input.has-error,
form textarea.has-error {
  border-color: #c0392b;
}
form input,
form select,
form textarea {
  width: 100%;
  font: 1rem/1.4 var(--body-font);
  padding: 0.69em 0.81em;
  border: 1px solid var(--rule);
  border-radius: calc(var(--radius) / 3);
  background: var(--bg);
  color: var(--ink);
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease;
}
.consent-control {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 20px;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--muted);
}
.consent-control input {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  margin: 1px 0 0;
  accent-color: var(--accent);
}
.consent-control a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.legal-document {
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
  padding-top: 96px;
}
.legal-document h2 {
  margin-top: 2.5em;
  font: 400 1.5rem/1.3 var(--heading-font);
  letter-spacing: var(--heading-tracking);
}
.legal-document p,
.legal-document li {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.6;
}
.legal-document p + p,
.legal-document h2 + p {
  margin-top: 1em;
}
.legal-document-updated {
  margin-top: 2.5em;
  font-size: 0.8125rem !important;
}
form input:focus-visible,
form textarea:focus-visible,
form select:focus-visible {
  border-color: var(--accent);
  outline: none;
}
form input:-webkit-autofill,
form input:-webkit-autofill:hover,
form input:-webkit-autofill:focus {
  /* Chrome ignores a plain background on autofilled fields - an inset
     shadow the size of the field is the only reliable way to paint over
     its own yellow fill. The absurdly long transition delay stops the
     yellow from flashing before this shadow takes effect. */
  box-shadow: 0 0 0 1000px var(--bg) inset;
  -webkit-text-fill-color: var(--ink);
  caret-color: var(--ink);
  transition: background-color 5000s ease-in-out 0s;
}
form textarea {
  resize: vertical;
  min-height: 114px;
  max-height: 500px;
}
.form-submit-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 8px 16px;
  margin-top: 20px;
}
form button[type="submit"] {
  flex: 0 0 auto;
}
.form-note,
#form-status {
  font-size: 0.875rem;
  color: var(--muted);
  margin: 0;
}
#form-status {
  flex: 1 1 160px;
  min-width: 160px;
}
#form-status.has-error {
  color: #c0392b;
}
.form-success {
  display: grid;
  place-items: center;
  gap: 16px;
  min-height: 320px;
  padding: 40px 24px;
  text-align: center;
  background: var(--surface);
  border-radius: var(--radius);
}
.form-success[hidden] {
  display: none;
}
.form-success-title {
  margin: 0;
  max-width: 26em;
  font: 400 1.75rem/1.3 var(--heading-font);
  letter-spacing: var(--heading-tracking);
}
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

/* Refinement after the second typography and colour review. */
.contact-footer {
  display: block;
  background: var(--surface);
  color: var(--ink);
  border: 0;
  border-radius: var(--radius) var(--radius) 0 0;
  margin: var(--section-gap) 0 0;
  padding: 3.44em 2.5em 5em;
  font-size: 1rem;
  padding-top: 2.38em;
  padding-bottom: 3em;
}
.contact-footer form {
  background: var(--bg);
}
.contact-footer form input,
.contact-footer form select,
.contact-footer form textarea,
.contact-footer .custom-select-trigger {
  background: var(--surface);
}
.contact-footer .section-head {
  margin-bottom: 22px;
  align-items: center;
}
.book-volume {
  position: relative;
  width: min(215px, 100%);
  aspect-ratio: 738.74/1024;
  transform-style: preserve-3d;
  transition: transform 350ms ease-out;
  transform: rotateX(var(--turn-x, 0deg))
    rotateY(var(--turn-y, var(--book-angle)));
  transition-duration: var(--book-duration);
  will-change: transform;
}
.book-front-window {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 2px;
  transform: translateZ(var(--book-depth));
  backface-visibility: hidden;
}
.book-front-window .book-front {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: calc(100% / 0.859);
  max-width: none;
}
.book-back {
  position: absolute;
  inset: 0;
  background: transparent;
  border-radius: 2px;
  transform: translateZ(calc(var(--book-depth) * -1));
  backface-visibility: hidden;
  box-shadow:
    8px 20px 32px -10px rgb(29 39 43 / var(--book-shadow-alpha)),
    2px 5px 10px -3px rgb(29 39 43 / var(--book-shadow-alpha));
}
.book-spine {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 16.41%;
  background-image: url("./assets/images/book-cover.webp");
  background-size: 709.22% 100%;
  background-position: left;
  background-repeat: no-repeat;
  translate: 0 0 calc(var(--book-depth) * -1);
  right: auto;
  left: 0;
  transform: rotateY(-90deg);
  transform-origin: left center;
  backface-visibility: hidden;
}
.book-bottom {
  position: absolute;
  bottom: 1px;
  left: 2px;
  right: 0;
  height: calc(var(--book-depth) * 2);
  background: repeating-linear-gradient(
    0deg,
    #f6f2e8 0px,
    #f6f2e8 2px,
    #dad5c9 2px,
    #dad5c9 3px
  );
  transform: rotateX(90deg);
  transform-origin: center bottom;
  translate: 0 0 calc(var(--book-depth) * -1);
  backface-visibility: hidden;
}
@media (prefers-reduced-motion: reduce) {
  .book-volume {
    transition: none;
  }
}

/* Shared text actions: em-based spacing, wrapping underline and SVG motion. */
.action-link,
.publication .action-link {
  display: inline;
  max-width: 100%;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--accent);
  text-decoration: none;
  cursor: pointer;
  margin-top: 1.5em;
  text-align: left;
  transition: color 160ms ease;
}
.publication .action-link {
  font-size: 1rem;
}
.action-link .action-label {
  padding-bottom: 0.13em;
  background-image: linear-gradient(currentColor, currentColor);
  background-position: 0 100%;
  background-size: 100% 1px;
  background-repeat: no-repeat;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.book-toggle .action-label {
  padding-bottom: 0;
  background-image: none;
}
.book-toggle .action-label-text {
  padding-bottom: 0.13em;
  background-image: linear-gradient(currentColor, currentColor);
  background-position: 0 100%;
  background-size: 100% 1px;
  background-repeat: no-repeat;
}
.book-toggle:hover .action-label-text,
.book-toggle:focus-visible .action-label-text {
  background-size: 0 1px;
}
.book-toggle-label {
  display: inline-grid;
  justify-items: start;
}
.book-toggle-label .action-label {
  grid-area: 1 / 1;
  display: inline-flex;
  align-items: center;
  opacity: 0;
  pointer-events: none;
}
.book-toggle-label .action-label[data-state="collapsed"] {
  opacity: 1;
  pointer-events: auto;
}
.book-toggle[aria-expanded="true"] .book-toggle-label .action-label[data-state="collapsed"] {
  opacity: 0;
  pointer-events: none;
}
.book-toggle[aria-expanded="true"] .book-toggle-label .action-label[data-state="expanded"] {
  opacity: 1;
  pointer-events: auto;
}
.action-link svg,
.contact-row svg,
.social-link svg {
  display: inline-block;
  width: 1em;
  height: 1em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: -0.25em;
  margin-left: 0.5em;
  transition: transform 180ms ease;
}
.action-link:focus-visible {
  color: var(--ink);
  text-decoration: none;
}
.action-link:focus-visible .action-label {
  background-size: 0 1px;
}
.action-link:focus-visible svg {
  transform: translate(0.17em, -0.17em);
}
.hero-button:focus-visible svg {
  transform: translateX(0.25em);
}
.introduction > .action-link {
  display: inline-block;
}
.book-copy > .action-link {
  display: inline-block;
}
/* The two rules above target every direct-child action-link, but the
   hero-button CTAs need to stay inline-flex or their icon gap collapses. */
.introduction > .cta-button,
.book-copy > .cta-button {
  display: inline-flex;
}
.book-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5em;
}
.book-toggle svg {
  transition: none;
}
.book-toggle:hover svg,
.book-toggle:focus-visible svg {
  transform: none;
}
.book-toggle[aria-expanded="true"] svg {
  rotate: 180deg;
}
.publication h3 a {
  font: inherit;
  line-height: inherit;
  margin: 0;
  text-decoration: none;
  color: inherit;
  transition: color 160ms ease;
}
.book-story {
  grid-column: 1/-1;
  padding-top: 2em;
  border-top: 1px solid rgb(41 42 44 / 18%);
}
.book-story[hidden] {
  display: none;
}
.book-story h3 {
  font-size: 1.75rem;
  margin-bottom: 22px;
}
.book-story-text {
  max-width: 780px;
  margin-left: auto;
}
.book-story p {
  font-size: 1rem;
  line-height: var(--text-leading);
  margin-bottom: 20px;
}
.book-story .action-link {
  display: inline-block;
}
.book-bottom {
  background: #eee9de;
}
.form-section {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 3.44em;
  align-items: start;
}
.form-section .section-head {
  display: block;
}
.form-section .section-head p {
  max-width: 38ch;
  margin-top: 22px;
}
.form-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25em;
}
.form-select-label {
  display: block;
  font-size: 1rem;
  margin: 15px 0 6px;
}
.custom-select {
  position: relative;
  overflow-anchor: none;
}
.custom-select-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  font: 1rem/1.4 var(--body-font);
  padding: 0.69em 0.81em;
  border: 1px solid var(--rule);
  border-radius: calc(var(--radius) / 3);
  background: var(--bg);
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease;
}
.custom-select-trigger:focus-visible {
  border-color: var(--accent);
  outline: none;
}
.custom-select-trigger svg {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-left: 12px;
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.6;
  transition: transform 160ms ease;
}
.custom-select[data-open="true"] .custom-select-trigger svg {
  transform: rotate(180deg);
}
.custom-select-options {
  position: absolute;
  z-index: 6;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  display: none;
  flex-direction: column;
  padding: 6px;
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: calc(var(--radius) / 3);
  box-shadow: 0 12px 30px -12px rgb(0 0 0 / 0.18);
}
.custom-select[data-open="true"] .custom-select-options {
  display: flex;
}
.custom-select-option {
  display: block;
  margin: 0;
  padding: 0.55em 0.65em;
  border-radius: calc(var(--radius) / 4);
  font-size: 1rem;
  cursor: pointer;
  transition: background 160ms ease;
}
.custom-select-input {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.custom-select-option:hover {
  background: var(--surface);
}
.custom-select-option.is-selected {
  color: var(--accent);
}
.footer-contacts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.88em;
  margin: 0;
}
.contact-footer .section-head h2 {
  font-size: 1.875rem;
}
.contact-row svg {
  flex-shrink: 0;
}
@media (prefers-reduced-motion: reduce) {
  .book-volume,
  .action-link,
  .action-link svg,
  .social-link svg,
  .publication h3 a {
    transition: none;
  }
  .action-link:hover svg,
  .action-link:focus-visible svg {
    transform: none;
  }
}

/* Header boundary and a single travelling section marker. */
.rail:after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  translate: -50% 0;
  width: min(100%, 1400px);
  height: 1px;
  background: linear-gradient(
    to right,
    transparent,
    var(--rule) calc(50% - 580px),
    var(--rule) calc(50% + 580px),
    transparent
  );
  pointer-events: none;
}
.rail nav a,
.rail nav a[aria-current] {
  text-decoration: none;
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0 1px;
  transition: color 160ms ease;
  background-image: linear-gradient(90deg, currentColor, currentColor);
}
.rail nav a:focus-visible {
  background-size: 100% 1px;
  color: var(--accent);
}
/* Inset dividers and firmer strokes give the practice section more definition. */
.book-story > h3,
.book-story-text {
  max-width: 780px;
  margin-left: auto;
  margin-right: auto;
}
.form-section .section-head .form-guidance {
  font-size: 0.875rem;
  padding-top: 1.43em;
  border-top: 1px solid var(--rule);
  color: var(--muted);
}
.contact-footer .section-head p {
  font-size: 1rem;
  max-width: 31ch;
  margin: 0;
}
@media (hover: hover) and (pointer: fine) {
}
@media (prefers-reduced-motion: reduce) {
  .rail nav a {
    transition: none;
  }
}
@media (hover: hover) and (pointer: fine) {
}
@media (prefers-reduced-motion: reduce) {
}

/* --- v4-content.css --- */
.introduction h1 {
  font-size: clamp(2.25rem, 3.7vw, 3.125rem);
  line-height: 1.18;
  max-width: none;
  letter-spacing: -0.035em;
}
.introduction .experience-note {
  margin-top: 2em;
  padding: 0 0 0 1.14em;
  max-width: 31ch;
  font-size: 1rem;
  color: var(--muted);
  position: relative;
}
.original-social {
  margin-top: 25px;
  border-top: 1px solid var(--rule);
  padding-top: 18px;
  font-size: 0.875rem;
}
.social-link {
  color: var(--muted);
}
@media (hover: hover) {
  .social-link:hover svg {
    transform: translate(0.17em, -0.17em);
  }
}
.social-note {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 8px;
}
.footer-legal {
  margin: 28px 0 0;
  font-size: 0.8125rem;
  color: var(--muted);
}
.footer-legal a {
  text-decoration: underline;
  text-underline-offset: 0.16em;
}
.reviews-section .section-head p {
  max-width: 600px;
  margin-top: 14px;
}
.review-controls {
  display: flex;
  gap: 10px;
  align-self: flex-end;
}
.review-controls button {
  display: grid;
  place-items: center;
  background: var(--bg);
  color: var(--ink);
  border: 1px solid var(--rule);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  cursor: pointer;
  padding: 0.63em;
  transition:
    color 160ms ease,
    border-color 160ms ease,
    opacity 160ms ease;
}
.review-controls svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.review-controls button:disabled {
  opacity: 0.3;
  cursor: default;
}
.reviews-strip {
  display: flex;
  align-items: start;
  gap: var(--grid-gap);
  overflow-x: auto;
  scroll-snap-type: x proximity;
  padding: 4px 2px 18px;
  scrollbar-color: var(--rule) transparent;
  padding-bottom: 32px;
  scrollbar-width: none;
}
.review-shot {
  flex: 0 0 auto;
  display: block;
  border: 1px solid var(--rule);
  border-radius: calc(var(--radius) / 2);
  padding: 0;
  overflow: hidden;
  background: var(--surface);
  scroll-snap-align: start;
  cursor: pointer;
}
.review-shot img {
  display: block;
  height: clamp(16.25rem, 29vw, 22.5rem);
  width: auto;
  max-width: none;
  object-fit: contain;
}
.reviews-window {
  position: relative;
  overflow: hidden;
}
.reviews-window:before,
.reviews-window:after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 28px;
  width: 54px;
  z-index: 1;
  pointer-events: none;
  opacity: 1;
  transition: opacity 150ms ease;
}
.reviews-window:before {
  left: 0;
  background: linear-gradient(to right, var(--bg), transparent);
}
.reviews-window:after {
  right: 0;
  background: linear-gradient(to left, var(--bg), transparent);
}
.reviews-window.at-start:before,
.reviews-window.at-end:after {
  opacity: 0;
}
.reviews-strip::-webkit-scrollbar {
  display: none;
}
@media (prefers-reduced-motion: reduce) {
  .reviews-window:before,
  .reviews-window:after {
    transition: none;
  }
}

/* Quiet lighting on filled surfaces; the white page and paper edges stay flat. */
.practice-study .care-statement,
.publications .publication:first-child,
#request-form,
.contact-footer,
.book-panel,
.review-shot {
  background-image:
    var(--corner-light),
    linear-gradient(135deg, #fbfcfd, var(--surface) 58%, #f6f9fa);
  border: 1px solid #e0eeee;
}

/* --- composition-study.css --- */
.study-switch {
  max-width: 1240px;
  margin: 0 auto;
  padding: 16px 40px 0;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  font: 0.75rem/1.4 var(--body-font);
  color: var(--muted);
}
.introduction > p:not(.experience-note) {
  max-width: 38ch;
  margin-top: 1.6em;
}
.introduction .action-link {
  margin-top: 32px;
}
.practice-study {
  margin-top: 4.375em;
  padding-top: 25px;
}
.practice-study > .section-head {
  padding-top: 22px;
  border-top: 1px solid var(--rule);
  margin-bottom: 54px;
}
.practice-study > .section-head h2 {
  font: 400 1rem/1.4 var(--body-font);
  letter-spacing: 0;
  color: var(--muted);
}
.practice-overview {
  display: block;
}
.case-lead {
  max-width: 680px;
  padding: 0 0 48px;
}
.case-lead h3 {
  line-height: 1.18;
  color: var(--accent);
  max-width: none;
  letter-spacing: -0.035em;
  font-size: clamp(2rem, 3.5vw, 2.875rem);
}
.case-lead p {
  font-size: 1.125rem;
  line-height: 1.5;
  margin: 18px 0 0;
  max-width: 54ch;
}
.practice-note {
  padding-bottom: 25px;
}
.practice-note + .practice-note {
  padding-top: 25px;
  border-top: 1px solid var(--rule);
  padding-left: 2em;
  position: relative;
  border-left: 0;
}
.practice-note h3 {
  font: 400 1.375rem/1.3 var(--heading-font);
  letter-spacing: var(--heading-tracking);
  margin: 0;
}
.practice-note p {
  font-size: 1rem;
  line-height: 1.55;
  color: var(--muted);
  margin-top: 14px;
}
.practice-closing {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-top: 56px;
  padding-top: 2.4em;
  align-items: start;
  gap: 40px;
}
.care-statement {
  background: var(--surface);
  padding: 32px;
  border-radius: 0 var(--radius) var(--radius) var(--radius);
}
.care-statement h3,
.education-note h3 {
  font: 400 1.375rem/1.3 var(--heading-font);
  letter-spacing: var(--heading-tracking);
  color: var(--ink);
  margin-bottom: 14px;
}
.care-statement p,
.education-note p {
  font: 400 1rem/1.55 var(--body-font);
  color: var(--muted);
}
.education-note {
  padding: 32px 0;
}

/* --- v4-expression.css --- */
/* Local experiment: stronger landmarks, tactile CTA, contained portrait motion. */
.cta-button {
  display: inline-flex;
  align-items: center;
  gap: 1.2em;
  padding: 0.7em 1.35em;
  border: 0;
  border-radius: calc(var(--radius) / 3);
  background: #387594;
  color: #fff;
  font: 600 1.125rem/1.4 var(--body-font);
  cursor: pointer;
  box-shadow:
    inset 0 1px 2px rgba(255, 255, 255, 0.5),
    8px 14px 24px -12px rgb(29 39 43 / var(--book-shadow-alpha)),
    2px 5px 10px -3px rgb(29 39 43 / var(--book-shadow-alpha));
  transition: background 160ms ease;
}
.cta-button:hover,
.cta-button:focus-visible {
  background: #2d6480;
}
/* Higher specificity than the generic .action-link:hover/:focus-visible
   color swap, which would otherwise turn hero-button text dark on hover. */
.action-link.cta-button:hover,
.action-link.cta-button:focus-visible {
  color: #fff;
}
.hero-button {
  display: inline-flex;
  align-items: center;
}
.hero-button .action-label {
  background: none;
  padding: 0;
}
.hero-button svg {
  flex-shrink: 0;
  margin: 0;
}
/* Three complementary aspects, not a wall of stacked explanations. */
.practice-details {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: auto auto;
  gap: 14px 2em;
  padding-top: 2.4em;
}
.practice-note,
.practice-note + .practice-note {
  display: grid;
  grid-row: span 2;
  grid-template-rows: subgrid;
  padding: 0;
  border: 0;
}
.practice-note p {
  margin-top: 0;
}

/* Centered chapter headings are deliberately distinct from article titles. */
#articles > .section-head,
#reviews > .section-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin-bottom: 44px;
}
#articles > .section-head h2,
#reviews > .section-head > div:first-child {
  width: 100%;
}
#articles > .section-head h2,
#reviews .section-head h2 {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(1.125rem, 3vw, 2.625rem);
  font-size: clamp(2rem, 4vw, 3.125rem);
  font-weight: 700;
  line-height: 1.15;
  text-align: center;
}
.chapter-heading h2::before,
#articles > .section-head h2::before,
#reviews .section-head h2::before {
  margin-top: 5px;
  content: "";
  height: 1px;
  flex: 1;
  min-width: 16px;
  background: var(--fading-rule-left);
}
.chapter-heading h2::after,
#articles > .section-head h2::after,
#reviews .section-head h2::after {
  margin-top: 5px;
  content: "";
  height: 1px;
  flex: 1;
  min-width: 16px;
  background: var(--fading-rule-left);
  transform: scaleX(-1);
}
#reviews .section-head p {
  max-width: none;
  text-align: center;
  margin-top: 18px;
}
#reviews .review-controls {
  margin-left: auto;
}
.practice-study > .chapter-heading {
  padding: 0;
  border: 0;
  margin-bottom: 44px;
}
.practice-study > .chapter-heading h2 {
  display: flex;
  align-items: center;
  gap: clamp(1.125rem, 3vw, 2.625rem);
  width: 100%;
  font: 700 clamp(2rem, 4vw, 3.125rem)/1.15 var(--heading-font);
  color: var(--ink);
  text-align: center;
}
.practice-details,
.practice-closing,
.book-story,
.contact-row,
.original-social,
.form-section .section-head .form-guidance {
  position: relative;
  border-top: 0;
}
.practice-details::before,
.practice-closing::before,
.book-story::before,
.contact-row::before,
.original-social::before,
.form-section .form-guidance::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 1px;
  background: var(--fading-rule);
  pointer-events: none;
}
.practice-note + .practice-note::before {
  content: "";
  position: absolute;
  left: -1em;
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(
    transparent,
    var(--rule) 18%,
    var(--rule) 82%,
    transparent
  );
}
.introduction .experience-note::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--accent);
}
.publication:nth-child(n + 3)::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 1px;
  background: var(--fading-rule);
}
.action-link:not(.hero-button) .action-label {
  background-image: linear-gradient(90deg, currentColor, currentColor);
}
.action-link.book-toggle .action-label {
  background-image: none;
}
.reviews-carousel {
  position: relative;
  padding: 0;
}
#reviews .reviews-carousel > .review-controls {
  position: absolute;
  inset: 50% -56px auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
  margin: -22px 0 0;
}
.reviews-carousel > .review-controls button {
  pointer-events: auto;
}
@media (prefers-reduced-motion: reduce) {
  .cta-button {
    transition: none;
  }
}

/* --- scroll reveal: CSS-driven, hidden only when JS is confirmed working (see the no-js/js class swap in <head>) --- */
.js .case-lead,
.js .practice-note,
.js .care-statement,
.js .education-note,
.js #articles .section-head,
.js .publication,
.js .book-panel,
.js .reviews-section,
.js .form-section,
.js .contact-footer {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 520ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 520ms cubic-bezier(0.22, 1, 0.36, 1);
}
.js .case-lead.revealed,
.js .practice-note.revealed,
.js .care-statement.revealed,
.js .education-note.revealed,
.js #articles .section-head.revealed,
.js .publication.revealed,
.js .book-panel.revealed,
.js .reviews-section.revealed,
.js .form-section.revealed,
.js .contact-footer.revealed {
  opacity: 1;
  transform: translateY(0);
}
.js .no-transition {
  transition: none;
}
@media (prefers-reduced-motion: reduce) {
  .js .case-lead,
  .js .practice-note,
  .js .care-statement,
  .js .education-note,
  .js #articles .section-head,
  .js .publication,
  .js .book-panel,
  .js .reviews-section,
  .js .form-section,
  .js .contact-footer {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* --- hover-only effects: gated on (hover:hover) so touch devices never pick them up, instead of unwinding them with (hover:none) --- */
@media (hover: hover) {
  a:hover {
    color: var(--accent);
  }
  .publication a:hover {
    text-decoration-thickness: 2px;
  }
  .action-link:hover,
  .publication .action-link:hover {
    color: var(--ink);
    text-decoration: none;
  }
  .action-link:hover .action-label {
    background-size: 0 1px;
  }
  .action-link:hover svg {
    transform: translate(0.17em, -0.17em);
  }
  .book-toggle:hover svg {
    transform: none;
  }
  .contact-row a:hover {
    color: var(--accent);
  }
  .contact-row a:hover svg {
    transform: translate(0.17em, -0.17em);
  }
  .publication h3 a:hover {
    color: var(--accent);
    text-decoration: none;
  }
  .rail nav a:hover {
    background-size: 100% 1px;
    color: var(--accent);
  }
  .review-controls button:not(:disabled):hover {
    color: var(--accent);
    border-color: var(--accent);
  }
  .hero-button:hover svg {
    transform: translateX(0.25em);
  }
  .article-body > .action-link:hover svg {
    transform: translateX(-0.25em);
  }
}

/* --- small phones: clamp() minimums and fixed paddings are still too large below ~480px --- */

/* --- reviews lightbox: fade-only, dark blurred backdrop, no swipe --- */
.reviews-dialog {
  position: fixed;
  inset: 0;
  margin: auto;
  width: min(1100px, 96vw);
  height: min(850px, 94dvh);
  max-width: 96vw;
  max-height: 94dvh;
  padding: 18px;
  border: 0;
  border-radius: 16px;
  background: transparent;
  color: #fff;
  overflow: visible;
  opacity: 0;
  transition: opacity 220ms ease;
}
.reviews-dialog[open] {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.reviews-dialog.open {
  opacity: 1;
}
.reviews-dialog::backdrop {
  background: rgb(10 12 14 / 0.78);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity 220ms ease;
}
.reviews-dialog.open::backdrop {
  opacity: 1;
}
.legal-dialog {
  position: fixed;
  inset: 0;
  width: min(820px, 94vw);
  max-width: 94vw;
  max-height: 90dvh;
  margin: auto;
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  opacity: 0;
  transition: opacity 220ms ease;
}
.legal-dialog[open] {
  display: block;
}
.legal-dialog.open {
  opacity: 1;
}
.legal-dialog::backdrop {
  background: rgb(10 12 14 / 0.78);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity 220ms ease;
}
.legal-dialog.open::backdrop {
  opacity: 1;
}
.legal-dialog-panel {
  position: relative;
  max-height: 90dvh;
  overflow: auto;
  overflow-x: hidden;
  padding: 48px clamp(24px, 6vw, 64px);
  border-radius: var(--radius);
  background: var(--bg);
}
.legal-dialog-content.article-body {
  max-width: none;
  padding: 0;
}
.legal-dialog-loading,
.legal-dialog-error {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
}
.legal-dialog-error a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 0.16em;
}
.legal-dialog-close {
  position: sticky;
  top: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  float: right;
  width: 40px;
  height: 40px;
  margin: -28px -28px 0 20px;
  padding: 8px;
  border: 1px solid var(--rule);
  border-radius: 50%;
  background: var(--bg);
  color: var(--ink);
  cursor: pointer;
}
.legal-dialog-close svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
}
.consent-control a[data-legal-dialog] {
  cursor: pointer;
}
.review-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 0 0 auto;
  font-size: 0.875rem;
}
.review-stage {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  gap: 15px;
  align-items: center;
  flex: 1;
  min-height: 0;
}
.review-full {
  height: 100%;
  width: 100%;
  object-fit: contain;
  min-height: 0;
}
.review-caption {
  flex: 0 0 auto;
  font-size: 0.75rem;
  color: rgb(255 255 255 / 0.8);
  text-align: center;
}
.reviews-dialog .review-close,
.reviews-dialog .review-prev,
.reviews-dialog .review-next {
  display: grid;
  place-items: center;
  background: rgb(255 255 255 / 0.1);
  color: #fff;
  border: 1px solid rgb(255 255 255 / 0.4);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  cursor: pointer;
  padding: 10px;
  transition:
    background 160ms ease,
    border-color 160ms ease;
}
.reviews-dialog svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
@media (hover: hover) {
  .reviews-dialog .review-close:hover,
  .reviews-dialog .review-prev:hover,
  .reviews-dialog .review-next:hover {
    background: rgb(255 255 255 / 0.2);
    border-color: #fff;
  }
}
@media (prefers-reduced-motion: reduce) {
  .reviews-dialog,
  .reviews-dialog::backdrop,
  .legal-dialog,
  .legal-dialog::backdrop {
    transition: none;
  }
}

/* --- consolidated breakpoints: 375 / 480 / 768 / 960 / 1200 --- */
@media (max-width: 1200px) {
  .rail:after {
    width: 100%;
    background: var(--rule);
  }
}

@media (max-width: 960px) {
  .shell {
    grid-template-columns: 155px minmax(0, 1fr);
  }
  .rail {
    padding: 28px 18px;
  }
  .opening,
  .practice-details,
  .book-panel,
  .contact-row {
    gap: 25px;
  }
  .book-panel {
    padding: 28px;
  }
  .portrait {
    margin: 0;
  }
  .introduction {
    padding-right: 28px;
  }
  .introduction h1 {
    font-size: 2.375rem;
  }
  .care-statement {
    padding: 28px;
  }
  .education-note {
    padding-top: 28px;
  }
}

@media (max-width: 768px) {
  .shell {
    padding: 0 22px;
  }
  .rail {
    align-items: center;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 22px;
    padding-bottom: 27px;
  }
  .rail-title {
    font-size: 1.375rem;
  }
  .rail nav {
    display: inline-flex;
    flex-grow: 1;
    justify-content: flex-end;
    gap: 10px;
    font-size: 0.875rem;
    flex-wrap: wrap;
  }
  .rail nav a:before {
    display: none;
  }
  /* column-reverse (not a grid with an explicit row order) so the DOM
     order - portrait figure, then introduction - visually flips to text
     first, photo last; photo-first read worse once this was single
     column. Matches the same pattern already used at 480px below. */
  .opening {
    display: flex;
    flex-direction: column-reverse;
    align-items: stretch;
    gap: 28px;
    padding-top: 35px;
  }
  .introduction {
    padding: 0;
  }
  .introduction h1 {
    font-size: clamp(2rem, 7vw, 2.75rem);
    max-width: none;
  }
  .introduction > p:not(.experience-note) {
    max-width: 45ch;
  }
  .introduction p + p {
    font-size: 0.875rem;
    margin-top: 16px;
  }
  .portrait {
    width: 100%;
    max-width: 420px;
    margin: 0 0 28px;
  }
  .portrait img {
    aspect-ratio: 4/4.5;
  }
  .portrait figcaption {
    font-size: 0.75rem;
    max-width: none;
  }
  .section {
    margin-top: calc(var(--section-gap) * 0.75);
  }
  .section-head {
    display: block;
    margin-bottom: 25px;
  }
  .section-head p,
  .section-head small {
    display: block;
    margin-top: 16px;
  }
  .practice-study > .section-head {
    margin-bottom: 30px;
  }
  .practice-overview,
  .practice-closing {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .practice-closing {
    margin-top: 40px;
    padding-top: 28px;
  }
  .case-lead {
    padding: 0 0 36px;
  }
  .case-lead h3 {
    font-size: 2rem;
  }
  .case-lead p {
    font-size: 1.125rem;
    max-width: 42ch;
    margin-top: 16px;
  }
  .practice-details {
    grid-template-columns: 1fr;
    gap: 28px;
    padding-top: 28px;
  }
  .practice-note,
  .practice-note + .practice-note {
    display: block;
    grid-row: auto;
    padding: 0;
    border: 0;
  }
  .practice-note + .practice-note {
    padding-top: 28px;
    border-top: 0;
  }
  .practice-note + .practice-note::before {
    left: 0;
    width: auto;
    height: 1px;
    right: 0;
    bottom: auto;
    background: var(--fading-rule);
  }
  .practice-note h3 {
    max-width: none;
    margin: 0;
  }
  .practice-note p {
    margin-top: 12px;
  }
  .education-note {
    padding: 0;
  }
  .care-statement {
    padding: 28px;
  }
  .book-panel {
    grid-template-columns: 1fr;
    padding: 28px;
    gap: 28px;
  }
  .book-object {
    justify-content: flex-start;
    padding: 10px 0 15px;
    min-height: 290px;
  }
  .book-object img {
    width: 135px;
  }
  .book-story-text {
    margin-left: 0;
  }
  .publications {
    grid-template-columns: 1fr;
  }
  .publication:first-child {
    grid-row: auto;
  }
  .publication:first-child h3 {
    font-size: 1.875rem;
  }
  .form-section {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .footer-contacts {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .contact-row {
    grid-template-columns: 1fr;
    gap: 7px;
  }
  .contact-footer {
    margin-left: -22px;
    margin-right: -22px;
    padding: 38px 22px 80px;
  }
  .contact-footer .section-head p {
    margin-top: 12px;
    max-width: none;
  }
  .reviews-section .section-head {
    display: flex;
  }
  .review-controls {
    flex-shrink: 0;
  }
  .reviews-carousel {
    padding: 0 44px;
  }
  #reviews .reviews-carousel > .review-controls {
    inset: 50% 0 auto;
  }
  footer {
    gap: 22px;
  }
  /* Hero: the paragraph inherited .introduction p's 1.25rem desktop size
     unchanged (only the shorter experience-note got a mobile override via
     p + p), and the CTA button's em-based padding+1.125rem text scales up
     with it - both read oversized next to the photo. */
  .introduction > p:not(.experience-note) {
    font-size: 1rem;
  }
  .cta-button {
    padding: 0.6em 1.1em;
    font-size: 1rem;
  }
  /* .portrait sets width:auto (desktop relies on the grid column instead),
     which shrinks it to the image's intrinsic size once the grid collapses
     to a single column here - force it back to the column's full width. */
  .portrait {
    width: 100%;
  }
  /* The gap above each section heading is tuned for the desktop reading
     rhythm - on a phone, with the portrait photo already taking most of
     the first screen, the same gap before "Практика" reads as a stall. */
  .practice-study {
    margin-top: calc(var(--section-gap) * 0.4);
  }
  /* care-statement (highlighted) sits between two plain items in source
     order; stacked full-width that reads as arbitrary rather than
     intentional - move it after education-note instead. Its border-radius
     cuts the top-left corner to visually continue into a second column on
     desktop; alone in a single column there's no second column to
     continue into, so round all four corners. */
  .care-statement {
    order: 1;
    border-radius: var(--radius);
  }
  .publication:first-child {
    padding: 1.5em;
  }
  /* Book: put the CTA first and the text toggle beneath it, not side by
     side wrapping unpredictably. */
  .book-panel {
    padding: 22px;
  }
  .book-actions {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5em;
  }
  .book-copy > .cta-button {
    order: 1;
  }
  .book-toggle {
    order: 2;
    font-size: 0.875rem;
  }
  /* Reviews: every card shares one height, so they're sized as if the
     widest screenshot were a square - real reviews are always portrait or
     square phone screenshots, so a real square (or taller) one tops out
     at exactly 80vw and everything narrower stays under that. max-height
     is a separate hard ceiling for landscape viewports, where 80vw could
     otherwise exceed half the screen's height. Drop the arrow buttons -
     this is a swipe surface on a touch screen - and their side padding
     along with them. */
  .reviews-carousel {
    padding: 0;
  }
  .review-shot img {
    height: 80vw;
    max-height: 50vh;
    width: auto;
    max-width: none;
  }
  #reviews .reviews-carousel > .review-controls {
    display: none;
  }
  /* legal-dialog-close leans on a negative margin to sit half outside the
     panel's own padding - safe at the desktop 48px/64px padding, but at
     the clamp()'s 24px mobile floor a -28px pull overshoots it, which is
     exactly what caused the horizontal scroll and the clipped-looking
     button. */
  .legal-dialog-close {
    margin: -20px -20px 0 16px;
  }
}

@media (max-width: 480px) {
  .portrait {
    max-width: 340px;
    width: 85%;
    align-self: flex-start;
  }
  .introduction {
    padding: 0;
  }
  h1 {
    font-size: 2.25rem;
  }
  .book-panel,
  .contact-layout,
  .publications {
    grid-template-columns: 1fr;
  }
  .book-object {
    justify-content: center;
    min-height: 280px;
  }
  .book-object img {
    width: 165px;
  }
  .publication:first-child {
    grid-row: auto;
    margin-bottom: 20px;
  }
  .section-head h2 {
    font-size: 1.875rem;
  }
  form {
    padding: 24px;
  }
  .rail nav a {
    white-space: nowrap;
  }
  footer {
    font-size: 0.75rem;
  }
  .book-volume {
    width: 170px;
    --book-depth: 13.95px;
  }
  .contact-footer .section-head {
    margin-bottom: 28px;
  }
  .form-pair {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .book-story h3 {
    font-size: 1.5rem;
  }
  .review-controls {
    gap: 6px;
  }
  .review-controls button {
    width: 38px;
    height: 38px;
  }
  /* .reviews-dialog .review-prev/.review-next (base rule) is two classes -
     more specific than the one-class-one-tag .review-stage button this
     used to be, so it kept winning at 44px regardless of this rule,
     while .review-stage's own grid columns (below) did narrow to 32px -
     the buttons no longer fit the column they're sized for. */
  .reviews-dialog .review-prev,
  .reviews-dialog .review-next {
    width: 32px;
    height: 40px;
    padding: 5px;
  }
  :root {
    --section-gap: 40px;
    --grid-gap: 18px;
    --radius: 16px;
  }
  .shell {
    padding: 0 16px;
  }
  .rail {
    padding: 10px 16px;
    gap: 6px;
  }
  .rail-title {
    font-size: 1.25rem;
  }
  .rail nav {
    font-size: 0.75rem;
  }
  .opening {
    padding-top: 24px;
    padding-bottom: 32px;
  }
  .section-head {
    gap: 1.25em;
    margin-bottom: 1.25em;
  }
  .practice-study > .chapter-heading,
  #articles > .section-head,
  #reviews > .section-head {
    margin-bottom: 28px;
  }
  .practice-details {
    gap: 20px;
    padding-top: 20px;
  }
  .practice-closing {
    gap: 20px;
  }
  .book-panel {
    gap: 20px;
  }
  .introduction h1 {
    font-size: 1.625rem;
    line-height: 1.22;
  }
  .introduction .experience-note {
    font-size: 0.875rem;
  }
  .chapter-heading h2,
  #articles > .section-head h2,
  #reviews .section-head h2 {
    font-size: 1.875rem;
    gap: 12px;
  }
  .case-lead {
    padding-bottom: 32px;
  }
  .case-lead h3 {
    font-size: 1.625rem;
  }
  .case-lead p {
    font-size: 1.125rem;
    margin-top: 16px;
  }
  .practice-note h3,
  .care-statement h3,
  .education-note h3 {
    font-size: 1.25rem;
  }
  .care-statement {
    padding: 20px;
  }
  .care-statement p {
    font-size: 1rem;
  }
  .education-note p {
    font-size: 1rem;
  }
  .publication:first-child h3 {
    font-size: 1.5rem;
  }
  .publication h3 {
    font-size: 1.25rem;
  }
  .book-panel {
    padding: 18px;
  }
  .book-copy h2 {
    font-size: 1.625rem;
    margin: 8px 0 16px;
  }
  .book-story h3 {
    font-size: 1.25rem;
  }
  .form-section .section-head {
    padding: 0;
  }
  .form-section {
    gap: 24px;
  }
  form {
    padding: 18px;
  }
  .contact-footer {
    margin-left: -16px;
    margin-right: -16px;
    padding: 24px 16px 32px;
  }
  .contact-footer .section-head h2 {
    font-size: 1.375rem;
  }
  .review-stage {
    grid-template-columns: 32px minmax(0, 1fr) 32px;
    gap: 5px;
  }
  .reviews-dialog {
    padding: 12px;
  }
}

@media (max-width: 375px) {
  .opening {
    grid-template-columns: 1fr;
  }
  .rail nav {
    flex-basis: 100%;
    justify-content: space-between;
  }
}

/* Desktop practice: one entry point, three methods, two closing principles. */
@media (min-width: 769px) {
  .practice-study > .chapter-heading {
    margin-bottom: 30px;
  }
  .practice-study .case-lead {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    align-items: center;
    gap: clamp(28px, 4vw, 52px);
    max-width: none;
    padding: 32px 36px;
    background: #faf4ef;
    border-radius: 16px;
  }
  .practice-study .case-lead h3 {
    margin: 0;
    font: 400 clamp(1.875rem, 3vw, 2.5rem)/1.16 var(--heading-font);
    letter-spacing: -0.035em;
  }
  .practice-focus-label {
    display: block;
    color: var(--ink);
  }
  .practice-focus-title {
    display: block;
    color: #99542e;
  }
  .practice-study .case-lead p {
    margin: 0;
    max-width: 42ch;
    font-size: 1.0625rem;
    line-height: 1.55;
  }
  .practice-study .practice-details {
    margin-top: 32px;
    padding-top: 0;
    border-top: 0;
    gap: 16px 40px;
  }
  .practice-study .practice-details::before {
    display: none;
  }
  /* .practice-closing's ::before (a mobile-only fading top-line, added
     for when this block was plain stacked text with no background of
     its own) is redundant here - on desktop it's a bordered/rounded
     card, whose own background already reads as "a new section". */
  .practice-study .practice-closing::before {
    display: none;
  }
  .practice-study .practice-note h3 {
    padding-top: 18px;
    font-size: 1.375rem;
    line-height: 1.25;
  }
  .practice-study .practice-closing {
    margin-top: 36px;
    padding: 26px 32px;
    gap: 48px;
    background: var(--surface);
    border-radius: var(--radius);
  }
  .practice-study .care-statement,
  .practice-study .education-note {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: none;
  }
  .practice-study .care-statement h3,
  .practice-study .education-note h3 {
    margin-bottom: 10px;
    font-size: 1.25rem;
  }
}

/* --- article body: prose typography for content-collection articles --- */
.article-body {
  max-width: 760px;
  margin: 0 auto;
  padding-top: 40px;
  padding-bottom: 80px;
}
.article-body > .category {
  color: var(--accent);
  font-size: 0.875rem;
  margin-bottom: 12px;
}
.article-body > h1 {
  font-size: clamp(2rem, 4vw, 2.75rem);
  line-height: 1.18;
  letter-spacing: -0.035em;
  margin-bottom: 8px;
}
.article-body h2 {
  font-family: var(--heading-font);
  font-weight: 400;
  font-size: 1.5rem;
  letter-spacing: var(--heading-tracking);
  margin-top: 2.2em;
  margin-bottom: 0.7em;
}
.article-body h3 {
  font-family: var(--heading-font);
  font-weight: 400;
  font-size: 1.125rem;
  margin-top: 1.6em;
  margin-bottom: 0.5em;
}
.article-body h4,
.article-body h5,
.article-body h6 {
  color: var(--ink);
  font-family: var(--body-font);
  font-weight: 700;
  line-height: 1.3;
  margin-top: 1.5em;
  margin-bottom: 0.5em;
}
.article-body h4 { font-size: 1rem; }
.article-body h5 { font-size: 0.9375rem; }
.article-body h6 { font-size: 0.875rem; }
.article-body p {
  font-size: 1rem;
  line-height: var(--text-leading);
  color: var(--muted);
  margin-top: 1.2em;
}
.article-body a:not(.action-link) {
  color: var(--ink);
  text-decoration-color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.16em;
}
.article-body a:not(.action-link):hover {
  color: var(--accent);
}
.article-body strong { color: var(--ink); }
.article-body code {
  padding: 0.12em 0.36em;
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.88em;
  background: var(--surface);
  border-radius: 0.2em;
}
.article-body pre {
  overflow-x: auto;
  margin-top: 1.5em;
  padding: 1.15rem 1.25rem;
  color: var(--ink);
  border-radius: var(--radius);
  background: #f5f6f5;
  border: 1px solid #dde1df;
}
.article-body pre code {
  padding: 0;
  color: inherit;
  font-size: 0.84rem;
  line-height: 1.6;
  background: transparent;
  border-radius: 0;
}
.article-body blockquote {
  margin: 2em 0;
  padding: 1.2em 1.5em;
  background: var(--surface);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.article-body blockquote p {
  margin: 0;
  color: var(--ink);
}
.article-body ul,
.article-body ol {
  margin-top: 1.2em;
  padding-left: 1.3em;
  color: var(--muted);
}
.article-body li {
  margin: 0.5em 0;
  line-height: var(--text-leading);
}
.article-body li::marker {
  color: var(--accent);
}
.article-body li > ul,
.article-body li > ol {
  margin-top: 0.4em;
}
.article-body input[type="checkbox"] {
  width: 1em;
  height: 1em;
  margin: 0 0.5em 0 0;
  accent-color: var(--accent);
  vertical-align: -0.1em;
}
.article-body hr {
  height: 1px;
  margin: 2.75em 0;
  border: 0;
  background: var(--fading-rule);
}
.article-body img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  margin: 2em 0;
  border-radius: var(--radius);
}
.article-body table {
  display: block;
  width: 100%;
  overflow-x: auto;
  margin: 1.75em 0;
  border-collapse: collapse;
  color: var(--muted);
  font-size: 0.9375rem;
  line-height: 1.45;
}
.article-body th,
.article-body td {
  min-width: 9rem;
  padding: 0.8em 0.9em;
  text-align: left;
  vertical-align: top;
  border: 1px solid var(--rule);
}
.article-body th {
  color: var(--ink);
  font-weight: 700;
  background: var(--surface);
}
.article-body tr:nth-child(even) td { background: color-mix(in srgb, var(--surface) 58%, transparent); }
.article-body :is(sup, .footnote-ref) {
  font-size: 0.75em;
}
.article-body .footnotes {
  margin-top: 2.5em;
  padding-top: 1.25em;
  color: var(--muted);
  border-top: 1px solid var(--rule);
  font-size: 0.875rem;
}
.article-body > .action-link {
  display: inline-flex;
  align-items: center;
  margin-top: 3em;
}
.article-body > .action-link svg {
  margin-left: 0;
  margin-right: 0.5em;
  vertical-align: baseline;
}
.article-body > .action-link:focus-visible svg {
  transform: translateX(-0.25em);
}
@media (max-width: 480px) {
  .article-body {
    padding-top: 24px;
  }
}
