/* The site shell supplies the PadelYoda fonts; system fonts work offline. */
.yh {
  --yh-ink: var(--py-navy);
  --yh-muted: var(--py-muted);
  --yh-paper: var(--py-paper);
  --yh-card: var(--py-surface);
  --yh-link: var(--py-link);
  --yh-line: var(--py-line);
  color: var(--yh-ink);
  background: var(--yh-paper);
  font: 1rem/1.6 Manrope, system-ui, sans-serif;
  padding-block: clamp(2rem, 5vw, 4.5rem);
  overflow-wrap: break-word;
}
.yh *, .yh *::after, .yh *::before { box-sizing: border-box; }
.yh h1, .yh h2, .yh h3 { font-family: Barlow, "Arial Narrow", system-ui, sans-serif; color: var(--yh-ink); font-weight: 800; line-height: 1.08; margin: 0; }
.yh h1 { font-size: clamp(3.4rem, 8.6vw, 6.8rem); letter-spacing: -.025em; }
.yh h1 > span { color: var(--yh-link); }
.yh h2 { font-size: clamp(2rem, 3.2vw, 2.8rem); letter-spacing: -.013em; }
.yh h3 { font-size: 1.48rem; }
.yh a { color: var(--yh-link); text-decoration: underline; text-underline-offset: .2em; text-decoration-thickness: .085em; font-weight: 750; }
.yh a:hover { text-decoration-thickness: .14em; }
.yh :focus-visible { outline: 3px solid var(--yh-link); outline-offset: 3px; }
.yh #contents, .yh-article { scroll-margin-top: 1.5rem; }
.yh-hero { display: flex; align-items: center; justify-content: space-between; column-gap: clamp(1rem, 5vw, 5rem); padding-bottom: clamp(2rem, 4.4vw, 3.7rem); }
.yh-hero p { margin: .9rem 0 0; max-width: 60ch; font-size: clamp(1.05rem, 1.55vw, 1.24rem); line-height: 1.52; color: var(--yh-muted); }
.yh-portrait { height: auto; width: clamp(6rem, 10vw, 8rem); flex: none; }
.yh-starts, .yh-links { display: flex; flex-wrap: wrap; align-items: baseline; gap: .65rem 1.15rem; }
.yh-starts { margin-top: 1.3rem; align-items: center; }
.yh-starts a { display: inline-flex; align-items: center; min-height: 2.8rem; }
.yh-starts a:first-child { color: var(--yh-ink); background: var(--py-action); border: 1px solid var(--yh-ink); border-radius: var(--py-button-radius); padding: .55rem 1rem; text-decoration: none; }
.yh-starts a:first-child:hover { background: var(--py-action-hover); color: white; }
.yh-contents { border-top: 2px solid var(--yh-ink); padding-block: 1.7rem clamp(2rem, 4vw, 3rem); }
.yh-contents ul { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; }
.yh-contents li { padding: 0; margin: 0; }
.yh-contents a {
  height: 100%; position: relative; display: block; padding: .95rem 2.4rem 1.2rem 1.1rem;
  color: var(--yh-ink); text-decoration: none; border: 1px solid var(--yh-line); border-radius: .4rem; background: var(--yh-card);
}
.yh-contents a:hover { border-color: var(--yh-link); background: #f8fcf7; }
.yh-contents a:hover .yh-toc-title, .yh-contents a:focus-visible .yh-toc-title { text-decoration: underline; text-underline-offset: .19em; }
.yh-toc-title, .yh-toc-summary { display: block; }
.yh-toc-title { color: var(--yh-ink); font-size: 1.08rem; font-weight: 800; line-height: 1.32; }
.yh-toc-summary { color: var(--yh-muted); font-size: .93rem; line-height: 1.43; font-weight: 500; margin-top: .35rem; }
.yh-arrow { color: var(--yh-link); position: absolute; right: .8rem; top: .68rem; font-size: 1.3rem; font-weight: 750; }
.yh-article { display: grid; grid-template-columns: minmax(10rem, .86fr) minmax(0, 2fr); gap: clamp(1.2rem, 4vw, 4.4rem); border-top: 1px solid var(--yh-line); padding: clamp(2rem, 4.2vw, 3.8rem) 0; }
.yh-article:target { border-top-color: var(--yh-link); }
.yh-article-heading h2 { max-width: 17ch; }
.yh-copy { min-width: 0; max-width: 75ch; }
.yh-copy p, .yh-copy ol { margin: 0; }
.yh-copy > * + * { margin-top: 1.1rem; }
.yh-copy > p + p, .yh-copy > ol + p { margin-top: 1rem; }
.yh-copy > h3:not(:first-child) { margin-top: 1.5rem; }
.yh-copy h3 + p, .yh-copy h3 + ol { margin-top: .4rem; }
.yh-copy ol { padding-left: 1.5rem; }
.yh-copy li { margin: .55rem 0 0; padding-left: .2rem; }
.yh-copy li:first-child { margin-top: 0; }
.yh-copy li::marker { color: var(--yh-link); font-weight: 800; }
.yh-matrix { border-collapse: collapse; width: 100%; text-align: left; font-size: .96rem; line-height: 1.45; }
.yh-matrix caption { text-align: left; color: var(--yh-ink); font-weight: 800; padding-bottom: .55rem; }
.yh-matrix th, .yh-matrix td { padding: .61rem .65rem; border-bottom: 1px solid var(--yh-line); vertical-align: top; text-align: left; overflow-wrap: anywhere; }
.yh-matrix thead th { background: var(--py-mint); font-weight: 800; }
.yh-matrix tbody th { background: var(--yh-card); font-weight: 750; }
.yh-matrix tbody td { background: #faf9f1; font-weight: 400; }
#formats .yh-matrix { table-layout: fixed; }
#formats .yh-matrix thead th:first-child { width: 30%; }
#formats .yh-matrix th[scope="row"] { max-width: none; overflow-wrap: normal; word-break: normal; }
.yh-links { align-items: center; margin-top: 1.25rem; font-size: .96rem; }
.yh-links a, .yh-original { display: inline-flex; align-items: center; min-height: var(--py-control-height); }
.yh-back { display: inline-flex; align-items: center; min-height: var(--py-control-height); color: var(--yh-muted) !important; padding-block: .35rem; font-size: .87rem; }
@media (max-width: 56rem) {
  .yh-contents ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .yh-article { grid-template-columns: minmax(0,.72fr) minmax(0,1.7fr); gap: 1.5rem; }
}
@media (max-width: 42rem) {
  #formats .yh-matrix { table-layout: auto; }
  #formats .yh-matrix thead th:first-child { width: 38%; }
  .yh-portrait { display: none; }
  .yh-article { display: block; }
  .yh-article-heading h2 { max-width: 100%; margin-bottom: .95rem; }
}
@media (max-width: 32rem) {
  .yh-contents ul { grid-template-columns: minmax(0,1fr); gap: .5rem; }
  .yh-contents a { padding-block: .8rem; }
  .yh-matrix { font-size: .89rem; }
  .yh-matrix th, .yh-matrix td { padding: .5rem .35rem; }
}
@media print {
  .yh { width: 100%; padding: 0; background: #fff; }
  .yh-contents, .yh-portrait, .yh-back, .yh-starts { display: none; }
  .yh-article { display: block; padding: 1.3rem 0; }
  .yh-article-heading h2 { max-width: 100%; margin-bottom: .5rem; }
  .yh-article h2, .yh-article h3, .yh-matrix caption { break-after: avoid; }
  .yh-matrix tr { break-inside: avoid; }
}

.yh-examples h3 { margin-top: 1.5rem; }
.yh-copy .yh-examples ol {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 13rem), 1fr));
  gap: 1.1rem;
  margin: 1rem 0 .75rem;
  padding: 0;
  list-style: none;
}
.yh-examples ol li { margin: 0; padding: 0; min-width: 0; }
.yh-examples .yh-image-link {
  display: flex;
  height: 100%;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--yh-line);
  border-radius: .45rem;
  background: var(--yh-card);
  text-decoration: none;
}
.yh-thumbnail { position: relative; display: block; width: 100%; flex: none; aspect-ratio: 16 / 10; background: #e4e9df; border-bottom: 1px solid var(--yh-line); }
.yh-thumbnail img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; padding: .45rem; object-fit: contain; }
.yh-image-title { padding: .65rem .85rem .8rem; line-height: 1.35; }
.yh-image-link:is(:hover,:focus-visible) { border-color: var(--yh-link); }
.yh-image-link:is(:hover,:focus-visible) .yh-image-title { text-decoration: underline; text-underline-offset: .17em; }

.yh-viewer { box-sizing: border-box; padding: 0; width: min(70rem, calc(100% - 2rem)); max-width: none; max-height: calc(100dvh - 2rem); background: var(--py-surface); color: var(--py-navy); border: 1px solid #abbdb7; border-radius: .6rem; overflow: auto; font: 600 1rem/1.4 Manrope, sans-serif; }
.yh-viewer::backdrop { background: rgb(7 22 51 / 78%); }
.yh-viewer[open] { display: grid; grid-template-rows: auto minmax(0,1fr) auto; }
.yh-viewer-head, .yh-viewer-foot { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .65rem clamp(.75rem, 2vw, 1.35rem); }
.yh-viewer h2 { margin: 0; font: 800 clamp(1.35rem, 3vw, 2rem)/1.1 Barlow, sans-serif; }
.yh-viewer button { margin: 0; min-height: 2.75rem; min-width: 2.75rem; padding: .35rem .65rem;  }

.yh-viewer-stage { display: grid; grid-template: minmax(0, 1fr) / minmax(0, 1fr); place-items: center; min-height: 0; padding: .45rem; background: #e2e8df; }
.yh-viewer-stage img { display: block; width: auto; height: auto; max-width: 100%; max-height: min(72dvh, calc(100dvh - 12rem), 54rem); object-fit: contain; }
.yh-viewer-foot { flex-wrap: wrap; }
.yh-viewer-controls { display: flex; align-items: center; gap: .65rem; }
.yh-viewer-count { font-variant-numeric: tabular-nums; }
.yh-original { color: var(--py-link); text-underline-offset: .2em; }
.yh-viewer :focus-visible { outline: 3px solid var(--py-link); outline-offset: 2px; }
@media (max-width: 38rem) {
  .yh-viewer { width: calc(100% - .8rem); max-height: calc(100dvh - .8rem); }
  .yh-viewer-foot { font-size: .875rem; }
}
