/* Ampersand's editorial treatment, with Persimmon's original botanical palette.
   This layer is article-only; the playground and model card keep their styles. */
body.persimmon-page {
  --accent: #68774d;
  --card: #faf9f6;
  --card-line: #dfe1d6;
  --hero-ink: #35432e;
  --hero-muted: #5f6855;
  --hero-bg: #e8edde;
  --hero-pill: #ffffff80;
  --hero-line: rgb(53 67 46 / .22);
  --card-shadow: 0 1px 2px rgb(47 56 38 / .04), 0 22px 44px -30px rgb(47 56 38 / .24);
}
.persimmon-page .site-header { background: color-mix(in srgb, var(--bg) 84%, transparent); backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2); }
.persimmon-page .hero-art {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 35%);
  align-items: center;
  gap: 32px;
  width: auto;
  height: auto;
  min-height: clamp(440px, 50svh, 520px);
  margin: 0;
  padding: 36px clamp(32px, 5vw, 72px);
  border-radius: 28px;
  background: var(--hero-bg);
  box-shadow: inset 0 0 0 1px rgb(53 67 46 / .06);
  isolation: isolate;
}
.persimmon-page .hero-heading {
  grid-area: 1 / 1;
  position: relative;
  inset: auto;
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0;
  transform: none;
  text-align: left;
  color: var(--hero-ink);
}
.persimmon-page .hero-heading h1 { color: var(--hero-ink); font-size: clamp(64px, 7.6vw, 104px); line-height: .98; letter-spacing: -.04em; font-variation-settings: 'opsz' 72; }
.persimmon-page .hero-heading .article-subtitle { margin-top: 18px; font-size: clamp(22px, 2.2vw, 28px); line-height: 1.35; }
.persimmon-page .hero-heading .article-meta { margin-top: 16px; color: var(--hero-muted); font: 400 17px/1.5 var(--serif); }
.persimmon-page .hero-heading .hero-actions { gap: 12px; margin-top: 20px; }
.persimmon-page .hero-actions a { min-height: 44px; padding: 0 18px; gap: 6px; border: 1px solid var(--hero-line); border-radius: 999px; background: var(--hero-pill); color: var(--hero-ink); font: 500 14px/1 var(--sans); }
.persimmon-page .hero-actions .hero-action-primary { background: var(--hero-ink); border-color: var(--hero-ink); color: white; }
.persimmon-page .hero-actions a:hover { background: white; color: var(--hero-ink); }
.persimmon-page .hero-actions .hero-action-primary:hover { background: #48543e; color: white; }
.persimmon-page .hero-actions .hero-action-link span { color: inherit; font-size: 19px; opacity: .65; }
.persimmon-page .persimmon-painting-surface { grid-area: 1 / 2; position: relative; width: 100%; max-width: 360px; aspect-ratio: 1; justify-self: center; overflow: hidden; border-radius: 24px; background: #e8edde; }
.persimmon-page .hero-art-poster, .persimmon-page .hero-art-frame { inset: 0; width: 100%; height: 100%; transform: scale(1.45); transform-origin: 50% 59%; }
.persimmon-page .hero-art-poster img { inset: 59% auto auto 50%; width: auto; height: 100%; transform: translate(-50%, -59%); }

/* Keep labels and controls in Inter; prose and section titles follow Ampersand. */
.persimmon-page .article-content > :is(p, ul, ol):not([class]),
.persimmon-page .margin-note-row > p,
.persimmon-page .persimmon-intro-copy > p { font: 400 20px/1.62 var(--serif); letter-spacing: -.004em; text-wrap: pretty; }
.persimmon-page .persimmon-intro-copy > p:first-child { font: 400 25px/1.5 var(--serif); letter-spacing: -.01em; }
.persimmon-page .article-content > h2[id] { margin: 80px 0 28px; font-size: clamp(42px, 4.4vw, 56px); line-height: 1.05; letter-spacing: -.03em; text-wrap: balance; }
.persimmon-page .article-content > h3[id] { margin: 64px 0 16px; font-size: 31px; line-height: 1.2; letter-spacing: -.018em; }
.persimmon-page .article-content a { text-decoration-color: color-mix(in srgb, var(--accent) 45%, transparent); text-underline-offset: .2em; }
.persimmon-page .article-content code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; }
.persimmon-page :is(.hero-metric, .eval-figure, .mtt-flow, .trickle-example) { padding: 24px; border: 1px solid var(--card-line); border-radius: 20px; background: var(--card); box-shadow: var(--card-shadow); }
.persimmon-page .playground-example { border-color: var(--card-line); border-radius: 20px; background: var(--card); box-shadow: var(--card-shadow); }
/* The exported plots include opaque paper behind their axes and labels.
   Give every layer the card's paper so no rectangular inset remains. */
.persimmon-page .eval-plot-scroll { --plot-paper: var(--card); }
.persimmon-page .eval-plot-scroll svg :is([fill="#f3f2ed"], [fill="#f8f7f3"], [style*="fill: #f3f2ed"], [style*="fill: #f8f7f3"]) { fill: var(--card) !important; }
.persimmon-page .article-rail .article-toc :is(a, .toc-label) { color: var(--muted); }
.persimmon-page .article-rail .article-toc ol { border-left: 1px solid var(--card-line); }
.persimmon-page .article-rail .article-toc a { margin-left: -1px; padding: 6px 0 6px 16px; border: 0; border-radius: 0; }
.persimmon-page .article-rail .article-toc a:hover { background: none; color: var(--ink); }
.persimmon-page .article-rail .article-toc a.active { background: none; color: var(--ink); -webkit-text-stroke: 0; box-shadow: inset 2px 0 0 var(--accent); }

@media screen and (min-width: 1120px) {
  .persimmon-page :is(.hero-metric, .eval-figure, .mtt-flow, .trickle-example) { width: auto; margin-inline: -28px; padding: 28px; }
}
@media screen and (max-width: 1119px) { .persimmon-page .article-shell { width: calc(100% - 48px); } }
@media screen and (max-width: 900px) {
  .persimmon-page .hero-art { grid-template-columns: minmax(0, 1fr); gap: 24px; min-height: 0; padding: 32px 24px 28px; }
  .persimmon-page .hero-heading { max-width: 650px; justify-self: center; text-align: center; }
  .persimmon-page .hero-heading .article-subtitle { margin-inline: auto; }
  .persimmon-page .hero-actions { justify-content: center; }
  .persimmon-page .persimmon-painting-surface { grid-area: 2 / 1; max-width: 300px; }
}
@media screen and (max-width: 700px) {
  .persimmon-page .article-shell { width: calc(100% - 24px); }
  .persimmon-page .hero-art { margin-top: 4px; border-radius: 22px; }
  .persimmon-page .hero-heading h1 { font-size: clamp(45px, 14.5vw, 68px); }
  .persimmon-page .hero-heading .article-subtitle { font-size: 22px; }
  .persimmon-page .hero-actions { gap: 10px; }
  .persimmon-page .hero-actions a { padding-inline: 14px; font-size: 13px; }
  .persimmon-page .article-content { width: calc(100% - 16px); }
  .persimmon-page :is(.hero-metric, .eval-figure, .mtt-flow, .trickle-example) { padding: 20px 16px; }
  .persimmon-page .article-content > h2[id] { margin-top: 60px; font-size: 38px; }
}
/* The shared circle control sets data-site-theme. Keep its dark paper in all
   article layers, while preserving the painting's authored light palette. */
@media screen {
  html[data-site-theme="dark"] body.persimmon-page {
    --accent: #b9c9a3;
    --card: #222228;
    --card-line: #41404a;
    --card-shadow: 0 1px 2px #0002, 0 22px 44px -30px #0008;
    --hero-bg: #242c25;
    --hero-ink: #eef0e8;
    --hero-muted: #bdc5b7;
    --hero-pill: #ffffff0a;
    --hero-line: #c5cfb94d;
  }
  html[data-site-theme="dark"] .persimmon-page .hero-art { background: var(--hero-bg); box-shadow: inset 0 0 0 1px var(--hero-line); }
  html[data-site-theme="dark"] .persimmon-page .hero-heading,
  html[data-site-theme="dark"] .persimmon-page .hero-heading h1,
  html[data-site-theme="dark"] .persimmon-page .hero-heading .hero-action-link { color: var(--hero-ink); }
  html[data-site-theme="dark"] .persimmon-page .hero-heading .article-meta { color: var(--hero-muted); }
  html[data-site-theme="dark"] .persimmon-page .hero-heading .hero-action-primary { background: var(--accent); color: #20261d; border-color: var(--accent); }
  html[data-site-theme="dark"] .persimmon-page .hero-actions a:hover { background: #ffffff14; color: var(--hero-ink); }
  html[data-site-theme="dark"] .persimmon-page .hero-actions .hero-action-primary:hover { background: #ced9bd; color: #20261d; }
  html[data-site-theme="dark"] .persimmon-page .hero-heading::before { background: none; }
  html[data-site-theme="dark"] .persimmon-page .hero-art::before { opacity: .3; }
  html[data-site-theme="dark"] .persimmon-page .hero-art[data-dissolving="true"]::before { opacity: 0; }
  html[data-site-theme="dark"] .persimmon-page .mtt-source-human { --mtt-color: #bac8ac; --mtt-tint: #2d352c; }
  html[data-site-theme="dark"] .persimmon-page .mtt-source-model { --mtt-color: #dfad91; --mtt-tint: #392e29; }
}
@media print {
  .persimmon-page .hero-art { display: block; min-height: 0; padding: 24px; }
  .persimmon-page .persimmon-painting-surface { display: none; }
  .persimmon-page :is(.hero-metric, .eval-figure, .mtt-flow, .trickle-example) { box-shadow: none; }
  .persimmon-page .article-content > :is(p, ul, ol):not([class]),
  .persimmon-page .margin-note-row > p,
  .persimmon-page .persimmon-intro-copy > p { font-size: 11pt; }
}
