/* Interior public pages use the homepage palette and local Manrope. */
.public-content {
  --canvas: #fff;
  --surface: #fff;
  --text: var(--lp-text);
  --text-muted: var(--lp-secondary);
  --text-subtle: var(--lp-muted);
  --link: var(--lp-brand);
  --action: var(--lp-brand);
  --action-hover: var(--lp-brand-hover);
  --on-action: #fff;
  --border: var(--lp-border);
  --surface-subtle: #f5f9f6;
  --surface-selected: var(--lp-brand-soft);
  --surface-hover: #f5f9f6;
}
.public-content :where(h1, h2, h3) {
  font-weight: 750;
  line-height: 1.2;
  letter-spacing: -0.035em;
}
.public-content h1 {
  font-size: clamp(2rem, 4.6vw, 3.5rem);
}
.public-content h2 {
  font-size: clamp(1.75rem, 3.1vw, 2.75rem);
}
.public-content h3 {
  font-size: 1.375rem;
}
.public-content :where(h1, h2, h3, p) {
  margin-bottom: 1.25rem;
}
.public-content a {
  color: var(--lp-brand);
  text-decoration: underline;
  text-underline-offset: 4px;
}
.public-content a:hover {
  color: var(--lp-brand-hover);
}
.public-content .wrap {
  width: min(var(--lp-container), calc(100% - var(--lp-space-80)));
  margin-inline: auto;
}
.public-content .section {
  padding-block: var(--lp-space-80);
}
.public-content .button {
  min-height: 52px;
  padding: 14px 24px;
  border-radius: var(--lp-radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--lp-brand);
  color: white;
  font-weight: 650;
  text-align: center;
  text-decoration: none;
  transition: background 0.18s;
}
.public-content .button:hover {
  background: var(--lp-brand-hover);
}
.public-content .lead {
  font-size: 1.25rem;
  line-height: 1.6;
  max-width: 42rem;
  color: var(--lp-secondary);
}
.public-content .eyebrow {
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.065em;
  text-transform: uppercase;
  color: var(--lp-muted);
}
.public-content .helper {
  font-size: 0.875rem;
  color: var(--lp-secondary);
}

#main figure {
  margin: 32px 0;
}

#main figcaption {
  margin-top: 12px;
  font-size: 14px;
  color: var(--text-muted);
}

#main .section {
  padding-block: 80px;
}

#main .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 12px 24px;
  border-radius: 8px;
  background: var(--action);
  color: var(--on-action);
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  line-height: 1.4;
  white-space: normal;
  text-align: center;
}

#main .button:hover {
  background: var(--action-hover);
  color: var(--on-action);
}

#main .button.small {
  min-height: 44px;
  padding: 10px 18px;
}

#main .eyebrow {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.065em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 20px;
}

#main .lead {
  font-size: 21px;
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 640px;
  margin-bottom: 32px;
}

#main .art-label {
  position: absolute;
  right: 0;
  bottom: 50px;
  font-size: 15px;
  line-height: 1.5;
  border-left: 2px solid var(--action);
  padding-left: 16px;
  color: var(--text-muted);
}

#main .actions {
  display: flex;
  gap: 24px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

#main .text-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
}

#main .helper {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}

#main .section-heading {
  max-width: 700px;
  margin-bottom: 44px;
}

#main .section-heading > p:not(.eyebrow) {
  max-width: 560px;
  color: var(--text-muted);
}

#main .section-heading.inline {
  max-width: none;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-end;
}

#main .feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

#main .feature-card {
  display: block;
  padding: 32px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 12px;
  color: var(--text);
  text-decoration: none;
}

#main .feature-card:hover {
  background: var(--surface-hover);
  color: var(--text);
}

#main .feature-card h3 span {
  float: right;
  color: var(--link);
}

#main .feature-card h2 {
  font-size: 24px;
}

#main .feature-card p {
  margin: 0;
  color: var(--text-muted);
}

#main details {
  border-bottom: 1px solid var(--border);
  padding: 20px 0;
}

#main summary {
  cursor: pointer;
  font-size: 19px;
  font-weight: 500;
  min-height: 44px;
}

#main details p {
  margin-top: 16px;
  color: var(--text-muted);
}

#main .article-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
}

#main .article-card {
  border-top: 1px solid var(--border);
  padding-top: 24px;
}

#main .article-card img {
  border-radius: 12px;
  margin-bottom: 24px;
}

#main .article-card h2 {
  font-size: 24px;
  line-height: 1.35;
}

#main .article-card h2 a {
  color: var(--text);
  text-decoration: none;
}

#main .article-card h2 a:hover {
  color: var(--link);
}

#main .article-card p:not(.eyebrow) {
  font-size: 16px;
  color: var(--text-muted);
}

#main .article-card .eyebrow {
  font-size: 13px;
  margin-bottom: 12px;
}

#main .breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 40px;
  color: var(--text-muted);
}

#main .breadcrumbs a:after {
  content: "/";
  margin-left: 12px;
  color: var(--text-subtle);
}

#main .page-heading {
  max-width: 860px;
  margin-bottom: 48px;
}

#main .topics {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

#main .topics a {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 16px;
  text-decoration: none;
  min-height: 44px;
}

#main .pagination {
  display: flex;
  justify-content: center;
  gap: 24px;
  align-items: center;
  margin-top: 48px;
  font-size: 15px;
  flex-wrap: wrap;
}

#main .pagination a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

#main .reading-layout {
  max-width: 850px;
}

#main .article-heading h1 {
  font-size: clamp(32px, 4vw, 52px);
}

#main .article-heading .eyebrow {
  display: block;
}

#main .cover img,
#main .product-shot img {
  border: 1px solid var(--border);
  border-radius: 12px;
}

#main .toc {
  background: var(--surface-subtle);
  border-radius: 12px;
  padding: 24px;
  margin-block: 32px;
}

#main .toc ol {
  padding-left: 24px;
  margin-bottom: 0;
}

#main .toc a {
  font-size: 16px;
}

#main .prose {
  font-size: 18px;
  line-height: 1.8;
}

#main .prose h2 {
  font-size: 30px;
  margin-top: 48px;
}

#main .prose h3 {
  font-size: 23px;
  margin-top: 32px;
}

#main .prose p {
  margin-bottom: 24px;
}

#main .prose ul,
#main .prose ol {
  padding-left: 28px;
  margin-bottom: 28px;
}

#main .prose li {
  margin: 8px 0;
}

#main .prose blockquote {
  margin: 32px 0;
  padding: 8px 0 8px 24px;
  border-left: 3px solid var(--action);
  color: var(--text-muted);
}

#main .callout {
  padding: 24px;
  border-radius: 12px;
  background: var(--surface-subtle);
  margin-block: 32px;
}

#main .callout p {
  margin: 8px 0 0;
}

#main .table-scroll {
  overflow: auto;
  margin-block: 32px;
  border: 1px solid var(--border);
  border-radius: 8px;
}

#main table {
  border-collapse: collapse;
  width: 100%;
  font-size: 16px;
  min-width: 420px;
}

#main th,
#main td {
  text-align: left;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}

#main th {
  background: var(--surface-subtle);
}

#main .author {
  border-block: 1px solid var(--border);
  padding-block: 24px;
  margin-block: 48px;
}

#main .author p {
  font-size: 15px;
  color: var(--text-muted);
  margin: 8px 0 0;
}

#main .article-cta {
  background: var(--surface-selected);
  padding: 32px;
  border-radius: 16px;
}

#main .article-cta h2 {
  font-size: 28px;
}

#main .article-cta p {
  color: var(--text-muted);
}

#main .empty {
  grid-column: 1/-1;
}

#main .product-link {
  padding-block: 12px;
}

@media (max-width: 1000px) {
  #main .section {
    padding-block: 64px;
  }

  #main .article-grid {
    gap: 24px;
  }
}

@media (max-width: 700px) {
  #main .lead {
    font-size: 18px;
  }

  #main .section {
    padding-block: 48px;
  }

  #main .section-heading {
    margin-bottom: 32px;
  }

  #main .feature-card {
    padding: 24px;
  }

  #main .section-heading.inline {
    align-items: flex-start;
    flex-direction: column;
    gap: 0;
  }

  #main .breadcrumbs {
    margin-bottom: 28px;
    font-size: 13px;
  }

  #main .page-heading {
    margin-bottom: 32px;
  }

  #main .reading-layout h1 {
    font-size: 34px;
  }

  #main .prose {
    font-size: 17px;
  }

  #main .prose h2 {
    font-size: 26px;
  }

  #main .article-cta {
    padding: 24px;
  }

  #main .article-cta h2 {
    font-size: 25px;
  }

  #main .button {
    min-height: 48px;
  }

  #main .actions {
    gap: 12px 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  #main html {
    scroll-behavior: auto;
  }

  #main * {
    animation: none !important;
    transition: none !important;
  }
}

#main .legal-footer {
  flex-basis: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}

#main .legal-footer a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

#main .legal-index {
  max-width: 1000px;
}

#main .legal-document-list {
  display: grid;
  gap: 12px;
  margin: 32px 0;
}

#main .legal-document-link {
  display: grid;
  gap: 8px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  text-decoration: none;
}

#main .legal-document-link span {
  color: var(--text-muted);
  font-size: 0.9rem;
}

#main .legal-prose {
  overflow-wrap: anywhere;
}

#main .legal-prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

#main .legal-prose th,
#main .legal-prose td {
  padding: 12px;
  border: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

@media (max-width: 600px) {
  #main .legal-document-link {
    padding: 18px;
  }

  #main .legal-prose table {
    display: block;
    overflow-x: auto;
  }
}

@media print {
  #main .legal-prose table {
    display: table;
  }

  #main .reading-layout {
    width: 100%;
    max-width: none;
    padding: 0;
  }
}

@media (max-width: 900px) {
  .public-content .wrap {
    width: calc(100% - 48px);
  }
  .public-content .section {
    padding-block: 64px;
  }
}
@media (max-width: 600px) {
  .public-content .wrap {
    width: calc(100% - 32px);
  }
  .public-content .section {
    padding-block: 48px;
  }
}
@media print {
  .lp-header,
  .lp-footer,
  .lp-skip {
    display: none !important;
  }
}

@media screen {
  #main.public-content > .section:first-child {
    padding-top: var(--lp-space-24);
  }
}

#main .feature-card,
#main .article-card {
  min-width: 0;
}
#main .feature-card {
  border-radius: var(--lp-radius-md);
}
@media (max-width: 700px) {
  #main .feature-grid,
  #main .article-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Reusable accents for public content; the shared shell stays untouched. */
.public-content .public-handnote {
  font: 600 2.125rem/0.95 "LP Caveat", cursive;
  color: var(--lp-brand);
}
.public-content .public-callout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--lp-space-32);
  padding: var(--lp-space-32);
  border-radius: var(--lp-radius-md);
  background: #0e4a32;
  color: white;
}
#main .public-callout h2 {
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  margin-bottom: var(--lp-space-8);
}
#main .public-callout p {
  margin: 0;
  color: #d6e8dd;
}
#main .public-callout .lp-button {
  color: var(--lp-brand);
  text-decoration: none;
  flex-shrink: 0;
}

/* Blog components inherit typography, buttons, tokens and container from the site. */
#main .public-blog a {
  text-decoration: none;
}
#main .public-blog .breadcrumbs a {
  text-decoration: underline;
}
#main .blog-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--lp-space-32);
  margin-bottom: var(--lp-space-32);
}
#main .blog-heading h1 {
  font-size: clamp(2.25rem, 5.5vw, 4.75rem);
  line-height: 1.1;
  letter-spacing: -0.045em;
  margin-bottom: var(--lp-space-12);
}
#main .blog-heading .lead {
  max-width: 43rem;
  margin: 0;
  font-size: 1.25rem;
}
#main .blog-heading__note {
  display: flex;
  align-items: center;
  gap: var(--lp-space-12);
  flex-shrink: 0;
  text-align: center;
  transform: rotate(-7deg);
}
#main .blog-featured {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  background: linear-gradient(115deg, #eff7f2, #e7f0e9);
  border: 1px solid var(--lp-border);
  border-radius: var(--lp-radius-md);
  overflow: hidden;
  margin-bottom: var(--lp-space-32);
}
#main .blog-featured__copy {
  padding: var(--lp-space-32);
  min-width: 0;
}
#main .blog-badge {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 14px;
  margin-bottom: var(--lp-space-16);
  font-size: 0.75rem;
  line-height: 1.4;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.035em;
  background: #dff0e7;
  color: var(--lp-brand);
  border-radius: var(--lp-radius-sm);
}
#main .blog-featured h2 {
  font-size: clamp(1.75rem, 2.75vw, 2.5rem);
  line-height: 1.25;
  margin-bottom: var(--lp-space-16);
}
#main .blog-featured h2 a,
#main .blog-card h2 a {
  color: var(--lp-text);
}
#main .blog-featured h2 a:hover,
#main .blog-card h2 a:hover {
  color: var(--lp-brand);
}
#main .blog-featured__copy > p {
  color: var(--lp-secondary);
  font-size: 1.125rem;
  margin-bottom: var(--lp-space-24);
}
#main .blog-featured__art {
  height: 100%;
  min-height: 340px;
  align-self: stretch;
}
#main .blog-art {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}
#main .blog-art > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
#main .blog-photo {
  display: block;
  width: 100%;
  height: 100%;
}
#main .blog-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
#main .blog-featured .blog-photo {
  mask-image: linear-gradient(to right, transparent, black 18%);
}
#main .blog-illustration {
  display: block;
  width: 100%;
  height: 100%;
  padding: var(--lp-space-16);
}
#main .blog-illustration img {
  width: 100%;
  height: 100%;
  max-height: 420px;
  object-fit: contain;
}
#main .blog-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--lp-space-24);
  margin-bottom: var(--lp-space-24);
  scroll-margin-top: 120px;
}
#main .blog-topics {
  display: flex;
  flex-wrap: wrap;
  gap: var(--lp-space-12);
}
#main .blog-topics a {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 10px 20px;
  border: 1px solid var(--lp-border);
  border-radius: var(--lp-radius-sm);
  color: var(--lp-secondary);
  font-size: 0.875rem;
  font-weight: 600;
}
#main .blog-topics a:hover {
  background: var(--lp-brand-soft);
  color: var(--lp-brand);
}
#main .blog-topics a[aria-current] {
  color: white;
  background: var(--lp-brand);
  border-color: var(--lp-brand);
}
#main .blog-search {
  display: flex;
  align-items: center;
  min-width: 0;
  width: 300px;
  flex-shrink: 0;
  border: 1px solid var(--lp-border);
  border-radius: var(--lp-radius-sm);
  background: white;
}
#main .blog-search:focus-within {
  outline: 3px solid var(--lp-focus);
  outline-offset: 3px;
}
#main .blog-search input {
  width: 100%;
  min-width: 0;
  height: 46px;
  padding: 12px 0 12px 16px;
  border: 0;
  border-radius: inherit;
  outline: none;
  background: transparent;
  color: var(--lp-text);
  font: inherit;
  font-size: 0.875rem;
}
#main .blog-search input::placeholder {
  color: var(--lp-muted);
  opacity: 1;
}
#main .blog-search button {
  width: 46px;
  height: 46px;
  flex-shrink: 0;
  border: 0;
  border-radius: var(--lp-radius-sm);
  background: transparent;
  color: var(--lp-brand);
}
#main .blog-search button:hover {
  background: var(--lp-brand-soft);
}
#main .blog-results {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--lp-space-16);
  margin-bottom: var(--lp-space-24);
}
#main .blog-results p {
  margin: 0;
  overflow-wrap: anywhere;
}
#main .blog-grid {
  /* A lone result retains the reference's vertical card proportions. */
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--lp-space-24);
}
#main .blog-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border: 1px solid var(--lp-border);
  border-radius: var(--lp-radius-md);
  overflow: hidden;
  background: white;
}
#main .blog-card__art {
  aspect-ratio: 12 / 5;
  background: linear-gradient(120deg, #f3f7f4, #e5eee7);
}
#main .blog-card__copy {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: var(--lp-space-24);
}
#main .blog-card .eyebrow {
  margin-bottom: var(--lp-space-12);
  font-size: 0.75rem;
  color: var(--lp-muted);
  align-self: flex-start;
}
#main .blog-card h2 {
  font-size: 1.5rem;
  line-height: 1.35;
  margin-bottom: var(--lp-space-12);
}
#main .blog-card__copy > p {
  color: var(--lp-secondary);
  margin-bottom: var(--lp-space-24);
}
#main .blog-card__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--lp-space-12);
  margin-top: auto;
}
#main .blog-read {
  display: inline-flex;
  align-items: center;
  gap: var(--lp-space-12);
  min-height: 44px;
  font-weight: 700;
  font-size: 0.875rem;
}
#main .blog-empty {
  grid-column: 1 / -1;
  padding: var(--lp-space-48) var(--lp-space-24);
  background: var(--lp-brand-soft);
  border-radius: var(--lp-radius-md);
  text-align: center;
}
#main .blog-empty h2 {
  font-size: 1.75rem;
}
#main .blog-callout {
  margin-top: var(--lp-space-48);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 230px;
  gap: var(--lp-space-24);
  overflow: hidden;
}
#main .blog-callout h2 {
  font-size: clamp(1.5rem, 2vw, 1.75rem);
}
#main .blog-callout__note {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--lp-space-12);
  color: #d6e8dd;
  font-size: 1.75rem;
  line-height: 1;
  text-align: center;
  transform: rotate(-6deg);
}
#main .blog-callout__note img {
  position: absolute;
  width: 130px;
  height: 136px;
  opacity: 0.1;
  transform: translate(-8px, 6px) rotate(14deg);
  pointer-events: none;
}
@media (max-width: 1100px) {
  #main .blog-heading__note {
    font-size: 1.75rem;
  }
  #main .blog-featured__copy {
    padding: var(--lp-space-32);
  }
  #main .blog-toolbar {
    flex-wrap: wrap;
  }
  #main .blog-callout {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  #main .blog-callout__note {
    grid-column: 1 / -1;
    justify-self: end;
  }
}
@media (max-width: 700px) {
  #main .blog-heading {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--lp-space-24);
  }
  #main .blog-heading__note {
    align-self: flex-end;
    font-size: 1.75rem;
    margin-block: -8px 8px;
  }
  #main .blog-heading__note svg {
    height: 52px;
    width: 32px;
  }
  #main .blog-featured,
  #main .blog-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  #main .blog-featured__copy {
    padding: var(--lp-space-24);
  }
  #main .blog-featured__art {
    min-height: 0;
    height: 260px;
  }
  #main .blog-featured .blog-photo {
    mask-image: linear-gradient(to bottom, transparent, black 18%);
  }
  #main .blog-heading .lead {
    font-size: 1rem;
  }
  #main .blog-featured__copy > p {
    font-size: 1rem;
  }
  #main .blog-search {
    width: 100%;
  }
  #main .blog-topics {
    gap: var(--lp-space-8);
  }
  #main .blog-topics a {
    padding-inline: 14px;
  }
  #main .public-callout {
    flex-direction: column;
    align-items: flex-start;
    padding: var(--lp-space-24);
    gap: var(--lp-space-24);
  }
  #main .blog-callout {
    grid-template-columns: minmax(0, 1fr);
  }
  #main .blog-callout__note {
    margin-block: var(--lp-space-8);
  }
}

/* Reference book: shared public tokens, typography, links and callout. */
#main .book { --book-gap: var(--lp-space-24); }
#main .book-hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  min-height: 220px;
  margin-block: -12px var(--lp-space-24);
}
#main .book-hero__copy { position: relative; z-index: 2; width: 70%; padding-block: var(--lp-space-24); }
#main .book-hero h1 { font-size: clamp(2.125rem, 4.6vw, 3.75rem); line-height: 1.12; letter-spacing: -0.045em; margin-bottom: var(--lp-space-16); }
#main .book-hero .lead { max-width: 42rem; font-size: 1.125rem; line-height: 1.6; margin: 0; }
#main .book-hero__art { position: absolute; inset: -12px 0 0 auto; width: 42%; z-index: -1; }
#main .book-photo, #main .book-photo img { display: block; width: 100%; height: 100%; }
#main .book-photo img { object-fit: cover; }
#main .book-hero__art .book-photo { mask-image: linear-gradient(90deg, transparent, black 32%); }
#main .book-hero__art img { object-position: right center; }
#main .book-hero__note { position: absolute; top: 8px; right: 27%; display: flex; align-items: center; gap: 8px; transform: rotate(-8deg); font-size: 2rem; z-index: 3; }
#main .book-search { width: 100%; margin-bottom: var(--lp-space-16); }
#main .book-search input { height: 56px; padding: 12px 16px 12px 0; font-size: 1rem; }
#main .book-search button { width: 56px; height: 56px; display: grid; place-items: center; }
#main .book-shortcuts { display: flex; flex-wrap: wrap; align-items: center; gap: var(--lp-space-12); font-size: .875rem; margin-bottom: var(--lp-space-32); }
#main .book-shortcuts > span { margin-right: 4px; }
#main .book-shortcuts a { display: flex; align-items: center; min-height: 40px; padding: 7px 16px; border: 1px solid var(--lp-border); border-radius: var(--lp-radius-sm); color: var(--lp-secondary); }
#main .book-shortcuts a:hover { background: var(--lp-brand-soft); color: var(--lp-brand); }
#main .book-section { margin-top: var(--lp-space-32); }
#main .book-section h2 { font-size: clamp(1.75rem, 3vw, 2.5rem); line-height: 1.2; margin-bottom: var(--lp-space-16); }
#main .book-chapters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--book-gap); }
#main .book-chapter { position: relative; isolation: isolate; display: flex; flex-direction: column; min-width: 0; min-height: 322px; padding: var(--lp-space-24); border: 1px solid var(--lp-border); border-radius: var(--lp-radius-sm); overflow: hidden; background: white; }
#main .book-chapter__art { position: absolute; top: 0; right: 0; width: 58%; height: 230px; z-index: -1; mask-image: linear-gradient(90deg, transparent, black 27%); }
#main .book-chapter__art > img { width: 100%; height: 100%; object-fit: cover; }
#main .book-chapter__art img { object-position: 65% center; }
#main .book-chapter__copy { width: 58%; min-height: 176px; }
#main .book-chapter__number { display: block; font-size: 1.5rem; line-height: 1; color: var(--lp-brand); margin-bottom: var(--lp-space-16); }
#main .book-chapter h3 { font-size: 1.375rem; line-height: 1.24; margin-bottom: var(--lp-space-12); letter-spacing: -.035em; }
#main .book-chapter h3 a { color: var(--lp-text); }
#main .book-chapter h3 a:hover { color: var(--lp-brand); }
#main .book-chapter p { color: var(--lp-secondary); font-size: .875rem; line-height: 1.55; margin: 0; }
#main .book-chapter__links { display: grid; gap: 8px; margin-block: var(--lp-space-16) var(--lp-space-12); }
#main .book-chapter__links a { font-size: .8125rem; line-height: 1.5; width: fit-content; background: rgb(255 255 255 / 94%); border-radius: 4px; }
#main .book-chapter__links a:hover { text-decoration: underline; }
#main .book-chapter__open { margin-top: auto; align-self: flex-start; }
#main .book-section-heading { display: flex; justify-content: space-between; gap: var(--lp-space-24); align-items: center; margin-bottom: var(--lp-space-16); }
#main .book-section-heading h2 { margin-bottom: var(--lp-space-8); }
#main .book-section-heading p { margin: 0; color: var(--lp-secondary); font-size: 1rem; }
#main .book-routes { padding: var(--lp-space-24); border-radius: var(--lp-radius-md); background: #eff7f3; }
#main .book-routes__note { display: flex; align-items: center; gap: 12px; white-space: nowrap; font-size: 2rem; transform: rotate(-7deg); }
#main .book-route-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--lp-space-16); }
#main .book-route { min-width: 0; padding: 20px; background: white; border-radius: var(--lp-radius-sm); }
#main .book-route__heading { display: flex; align-items: flex-start; gap: var(--lp-space-12); }
#main .book-icon { flex-shrink: 0; width: 24px; height: 24px; color: var(--lp-brand); }
#main .book-route h3 { margin-bottom: var(--lp-space-4); font-size: 1.0625rem; letter-spacing: -.025em; }
#main .book-route p { margin: 0; color: var(--lp-secondary); font-size: .8125rem; line-height: 1.5; }
#main .book-route__steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--lp-space-12); margin: var(--lp-space-24) 0 0; padding: 0; list-style: none; }
#main .book-route__steps li { position: relative; text-align: center; min-width: 0; }
#main .book-route__steps li:not(:last-child)::after { content: '→'; position: absolute; right: -12px; top: 0; color: var(--lp-brand); }
#main .book-route__steps a { display: grid; justify-items: center; gap: 8px; color: var(--lp-secondary); font-size: .8125rem; min-height: 52px; }
#main .book-route__steps a:hover { color: var(--lp-brand); text-decoration: underline; }
#main .book-route__steps span { display: grid; place-items: center; width: 27px; height: 27px; border: 1px solid var(--lp-brand); border-radius: 50%; color: var(--lp-brand); font-size: .875rem; }
#main .book-tools { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--lp-space-24); }
#main .book-tool-panel { min-width: 0; border: 1px solid var(--lp-border); border-radius: var(--lp-radius-sm); padding: 20px; }
#main .book-tool-panel h3 { font-size: 1.125rem; margin-bottom: var(--lp-space-12); }
#main .book-tool-panel ul { display: grid; gap: 8px; list-style: none; margin: 0; padding: 0; }
#main .book-tool-panel li > a, #main .book-tool-label { display: flex; align-items: center; gap: var(--lp-space-16); min-height: 48px; padding: 8px 12px; border: 1px solid var(--lp-border); border-radius: 8px; font-size: .875rem; color: var(--lp-secondary); }
#main .book-tool-panel li > a:hover { background: var(--lp-brand-soft); color: var(--lp-brand); }
#main .book-tool-arrow { margin-left: auto; color: var(--lp-brand); }
#main .book-latest .blog-card { display: grid; grid-template-columns: 36% minmax(0, 1fr); border-radius: var(--lp-radius-sm); }
#main .book-latest .blog-card__art { aspect-ratio: auto; min-height: 180px; }
#main .book-latest .blog-card__copy { padding: var(--lp-space-16); }
#main .book-latest .blog-card h2 { font-size: 1.125rem; margin-bottom: var(--lp-space-8); line-height: 1.4; }
#main .book-latest .blog-card .eyebrow { display: none; }
#main .book-latest .blog-card__copy > p { font-size: .8125rem; margin-bottom: 8px; }
#main .book-latest .blog-card time { font-size: .75rem; }
#main .book .blog-callout { margin-top: var(--lp-space-32); }
@media (max-width: 1100px) {
  #main .book-hero__copy { width: 68%; }
  #main .book-hero__note { right: 24%; top: -12px; font-size: 1.75rem; }
  #main .book-chapters { gap: 16px; }
  #main .book-chapter { padding: 20px; }
  #main .book-chapter h3 { font-size: 1.25rem; }
  #main .book-chapter__copy { width: 66%; }
  #main .book-chapter__art { width: 49%; }
  #main .book-route-grid { grid-template-columns: minmax(0, 1fr); }
  #main .book-route { display: grid; grid-template-columns: minmax(0, 1fr) 48%; gap: 24px; align-items: center; }
  #main .book-route__steps { margin: 0; }
}
@media (max-width: 900px) {
  #main .book-chapters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #main .book-hero { min-height: 236px; }
  #main .book-hero__copy { width: 75%; }
  #main .book-hero__note { top: -4px; right: 0; font-size: 1.5rem; }
  #main .book-hero__art { top: 12px; opacity: .6; }
  #main .book-hero .lead { max-width: 30rem; font-size: 1rem; }
  #main .book-routes__note { font-size: 1.625rem; }
  #main .book-latest .blog-card { grid-template-columns: minmax(0, 1fr); }
  #main .book-latest .blog-card__art { aspect-ratio: 12 / 5; min-height: 0; }
}
@media (max-width: 700px) {
  #main .book-hero { display: block; margin-top: 0; padding-bottom: 0; }
  #main .book-hero__copy { width: 100%; padding-top: 0; }
  #main .book-hero h1 { max-width: 20rem; }
  #main .book-hero__art { position: relative; width: 100%; height: 190px; margin-top: -8px; opacity: 1; inset: auto; }
  #main .book-hero__art .book-photo { mask-image: linear-gradient(90deg, transparent, black 20%); }
  #main .book-hero__note { top: auto; bottom: 64px; right: auto; left: 0; font-size: 1.875rem; }
  #main .book-chapters { grid-template-columns: minmax(0, 1fr); }
  #main .book-chapter { min-height: 286px; padding: 20px; }
  #main .book-chapter__copy { width: 58%; min-height: 164px; }
  #main .book-chapter h3 { font-size: 1.375rem; }
  #main .book-chapter__art { width: 54%; height: 216px; }
  #main .book-section-heading { flex-wrap: wrap; gap: 16px; }
  #main .book-routes { padding: 20px; }
  #main .book-routes__note { margin-left: auto; }
  #main .book-route { display: block; padding: 16px; }
  #main .book-route__steps { margin-top: 20px; }
  #main .book-tools { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  #main .book-latest .blog-card { grid-template-columns: minmax(0, 1fr); }
  #main .book-shortcuts { gap: 8px; }
  #main .book-shortcuts > span { width: 100%; }
  #main .book-shortcuts a { padding-inline: 12px; }
}
@media (min-width: 701px) {
  #main .book-search { margin-bottom: var(--lp-space-24); }
}

/* Let enlarged text reflow beside artwork instead of clipping inside cards. */
#main .book-chapter, #main .book-route, #main .book-tool-panel { container-type: inline-size; }
#main .book-section-heading > div { min-width: 0; max-width: 100%; }
#main .book-route__steps { display: flex; flex-wrap: wrap; }
#main .book-route__steps li { flex: 1 1 3.75rem; }
@container (max-width: 17rem) {
  #main .book-chapter__copy { width: 100%; min-height: 0; order: 1; }
  #main .book-chapter__art { position: relative; inset: auto; width: 100%; height: auto; aspect-ratio: 4 / 3; order: 2; mask-image: none; z-index: 0; margin-block: 12px; }
  #main .book-chapter__art img { object-fit: contain; }
  #main .book-chapter__links { order: 3; }
  #main .book-chapter__open { order: 4; }
}
@container (max-width: 18rem) {
  #main .book-tool-panel li > a, #main .book-tool-label { flex-wrap: wrap; gap: 8px; }
  #main .book-tool-label > span, #main .book-tool-panel li > a > span:not(.book-tool-arrow) { flex: 1 1 100%; }
}
@media (max-width: 700px) {
  #main .book-section h2 { font-size: calc(1.15rem + 1.5vw); }
  #main .book-routes__note { white-space: normal; max-width: calc(100% - 16px); margin-right: 16px; font-size: calc(1rem + 1.4vw); }
  #main .book-hero__note svg { width: 32px; height: 54px; }
}
@media (max-width: 700px) {
  #main .book-hero h1 { font-size: calc(1.5rem + 2.5vw); }
}
#main .book { container-type: inline-size; }
@container (max-width: 40rem) {
  #main .book-section-heading { flex-wrap: wrap; }
  #main .book-routes__note { white-space: normal; max-width: calc(100% - 16px); margin-right: 16px; font-size: calc(1rem + 1.4vw); }
}
@container (max-width: 17rem) {
  #main .book-chapter h3 { font-size: clamp(1rem, 9cqw, 1.375rem); }
}
#main .book-chapter__art { width: 50%; mask-image: linear-gradient(90deg, transparent, black 42%); }
@media (max-width: 1100px) and (min-width: 701px) {
  #main .book-chapters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  #main .book-hero__note { text-shadow: 0 1px 4px #fff, 0 0 10px #fff; }
}
@container (max-width: 17rem) {
  #main .book-chapter__art { width: 100%; mask-image: none; }
}
