/* Shared studio styling for the complete journal and migrated pages. */
.yd-home .yd-site-logo { display: block; width: 32px; height: 32px; flex: none; border-radius: 0; }
.yd-home .yd-room-greeting > svg { color: #a57b45; }
.yd-home .yd-room-brand { gap: 10px; }

/* Every journal entry stays in the HTML. Filters enhance the complete list. */
.yd-journal-tools { padding: 20px; margin-bottom: 18px; border: 2px solid #ad90bc; background: #ece0f2; box-shadow: 3px 3px 0 #d1bbdc; }
.yd-journal-search label { display: block; font: 500 .92rem/1.4 var(--yd-pixel); margin-bottom: 8px; }
.yd-journal-search > div { display: flex; align-items: center; min-height: 48px; gap: 11px; padding: 0 12px; border: 2px solid #9473a5; background: #fffaf0; }
.yd-journal-search > div > span { font: 500 1.6rem/1 var(--yd-pixel); color: #80598f; }
.yd-home .yd-journal-search input { flex: 1; min-width: 0; width: 100%; border: 0; background: transparent; padding: 10px 0; color: #44354e; font-size: .9rem; border-radius: 0; }
.yd-journal-search > div:focus-within { outline: 3px solid #75508a; outline-offset: 3px; }
.yd-journal-search input:focus { outline: none; }
.yd-journal-search input::placeholder { color: #73617d; opacity: 1; }
.yd-journal-search button { width: 44px; height: 44px; flex-shrink: 0; border: 0; background: transparent; font: 500 1.5rem/1 var(--yd-pixel); }
.yd-journal-search button:hover { background: #ead9f0; }
.yd-home .yd-journal-filters { margin-top: 17px; gap: 8px; }
.yd-journal-filters button { font-size: .85rem; padding-inline: 12px; }
.yd-home .yd-journal-count { font: 500 .82rem/1.6 var(--yd-pixel); color: #725881; margin: 0 0 18px; }
.yd-journal-empty { padding: 35px 24px; text-align: center; border: 2px dashed #b095bd; background: #f7edf5; }
.yd-home .yd-journal-empty h3 { text-align: center; font-size: 1.7rem; }
.yd-journal-empty p { color: #6c5976; margin: 10px 0 20px; font-size: .9rem; }
.yd-journal-entry { scroll-margin-top: 20px; }
.yd-journal-entry img { background: #e9def0; }

/* Standalone URLs use the same framed-window language as the room. */
.yd-document { background-color: #e9e3f3; background-image: radial-gradient(#c6b7d63b 1px,transparent 1px); background-size: 12px 12px; }
.yd-document .yd-room-header { width: min(1180px,calc(100% - 40px)); min-height: 82px; }
.yd-document .yd-document-return { margin-left: auto; }
.yd-document-main { width: min(1160px,calc(100% - 48px)); margin: 0 auto 30px; }
.yd-document-frame { background: #fff8ed; border: 3px solid #80618f; box-shadow: 7px 7px 0 #c5b0d1; }
.yd-document-bar { display: flex; justify-content: space-between; gap: 18px; padding: 9px 18px; border-bottom: 2px solid #80618f; background: #dfccec; font: 500 .86rem/1.5 var(--yd-pixel); }
.yd-document-bar > span:last-child { color: #8c668b; letter-spacing: 3px; }
.yd-studio-page { padding: 0; }
.yd-document .yd-studio-page { padding: clamp(22px,4vw,45px); }
.yd-home .yd-page-back { display: inline-flex; align-items: center; min-height: 44px; font: 500 .9rem/1.5 var(--yd-pixel); color: #745184; text-decoration: underline; text-underline-offset: 5px; margin-bottom: 20px; }
.yd-page-back:hover { color: #452954; }
.yd-page-intro { max-width: 840px; margin-bottom: 27px; }
.yd-page-intro .yd-eyebrow { margin-bottom: 13px; font-size: .76rem; color: #765787; }
.yd-home .yd-page-intro :is(h1,h2) { font-size: clamp(2.3rem,4.5vw,3.7rem); line-height: 1.05; letter-spacing: -.025em; }
.yd-page-intro :is(h1,h2) > span { display: inline-block; color: #b18750; font-size: .6em; vertical-align: middle; }
.yd-page-intro > p:last-child { max-width: 740px; margin-top: 20px; color: #685575; font-size: .98rem; line-height: 1.8; }
.yd-data-specs { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); margin: 0 0 27px; background: #eee3f5; border: 2px solid #b196c0; }
.yd-data-specs > div { padding: 17px 19px; }
.yd-data-specs > div + div { border-left: 1px solid #c1a9ce; }
.yd-data-specs span { display: block; margin-bottom: 7px; color: #755d82; font: 500 .7rem/1.5 var(--yd-pixel); }
.yd-data-specs strong { display: block; font-weight: 500; font-size: .87rem; line-height: 1.5; }
.yd-data-window { border: 2px solid #8c6b9a; background: #fffaf0; box-shadow: 4px 4px 0 #ccb5d4; }
.yd-data-window-bar { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 9px 18px; border-bottom: 2px solid #8c6b9a; background: #dfcdeb; font: 500 .86rem/1.5 var(--yd-pixel); }
.yd-trend-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 23px 24px 12px; }
.yd-home .yd-trend-heading :is(h2,h3) { font-size: 1.7rem; }
.yd-trend-heading p { font-size: .8rem; color: #6c5878; margin-top: 6px; }
.yd-trend-heading .yd-ui-button { flex-shrink: 0; }
.yd-ui-button:disabled { opacity: .6; cursor: wait; }
.yd-home .yd-data-status { font-size: .82rem; line-height: 1.7; margin: 0 24px; padding: 0 0 17px; color: #6c5878; }
[data-load-state="error"] .yd-data-status { color: #7f3854; }
.yd-trend-list { padding: 0; margin: 0; list-style: none; }
.yd-trend-item { border-top: 1px dashed #cbb5d5; margin: 0 24px; }
.yd-home .yd-trend-link { display: grid; grid-template-columns: 35px minmax(0,1fr) auto; gap: 16px; align-items: center; padding: 18px 0; }
.yd-trend-link:hover { background: #f3e8f6; }
.yd-trend-rank { font: 500 1.3rem/1 var(--yd-pixel); color: #8e6d9e; }
.yd-trend-info { min-width: 0; }
.yd-trend-info > strong { display: block; font-size: 1rem; font-weight: 600; overflow-wrap: anywhere; }
.yd-trend-seed { display: inline-block; margin-top: 6px; background: #ece1f2; border: 1px solid #d5c2df; padding: 2px 7px; font-size: .7rem; color: #725c7c; }
.yd-trend-growth { text-align: right; white-space: nowrap; color: #486d49; }
.yd-trend-growth strong { display: block; font: 500 1.18rem/1.4 var(--yd-pixel); }
.yd-trend-growth small { display: block; font-size: .65rem; margin-top: 3px; color: #74617e; }
.yd-trend-growth.is-breakout { color: #9b4c6c; }
.yd-data-note { display: flex; justify-content: space-between; align-items: center; gap: 25px; padding: 15px 24px; border-top: 1px solid #c9b1d1; background: #f1e7f5; font-size: .75rem; color: #715a7d; }
.yd-data-note p { max-width: 600px; }
.yd-data-note a { flex-shrink: 0; text-decoration: underline; text-underline-offset: 3px; padding-block: 8px; }
.yd-page-note { display: flex; align-items: flex-start; gap: 16px; margin-top: 27px; padding: 21px 23px; border: 2px dashed #b39ac0; background: #f3e8ef; }
.yd-note-star { font: 500 1.6rem/1 var(--yd-pixel); color: #a17c46; padding-top: 3px; }
.yd-home .yd-page-note :is(h2,h3) { font-size: 1.4rem; }
.yd-page-note p { color: #705b7c; font-size: .85rem; line-height: 1.8; margin-top: 9px; }
.yd-page-note a { display: inline-block; margin-top: 10px; padding-block: 5px; font: 500 .9rem/1.5 var(--yd-pixel); text-decoration: underline; text-underline-offset: 4px; }
.yd-report-window .yd-data-window-bar { background: #deebd0; }
.yd-report-toolbar { display: flex; justify-content: space-between; gap: 18px; align-items: center; padding: 16px 20px; border-bottom: 1px solid #cebad5; }
.yd-report-toolbar p { font-size: .78rem; color: #705b7c; }
.yd-report-toolbar a { flex-shrink: 0; }
.yd-report-viewport { width: 100%; overflow-x: auto; background: #faf8f6; scrollbar-color: #ac8cbb #eee0f4; }
.yd-home .yd-report-viewport iframe { display: block; width: 100%; min-width: 740px; height: auto; aspect-ratio: 1200 / 898; border: 0; background: #fff; }
.yd-report-fallback { border-top: 1px solid #c8b2d2; background: #eef1e8; padding: 13px 20px; font-size: .75rem; color: #5f6b55; }
.yd-report-fallback a { text-decoration: underline; text-underline-offset: 3px; }
.yd-policy-layout { display: grid; grid-template-columns: 190px minmax(0,1fr); gap: 30px; align-items: start; }
.yd-home .yd-policy-nav { position: sticky; top: 0; display: flex; flex-direction: column; width: 100%; padding: 16px; gap: 8px; background: #eadef2; border: 2px solid #b59cc1; box-shadow: 3px 3px 0 #d0bada; backdrop-filter: none; z-index: auto; }
.yd-policy-nav > span { font: 500 .7rem/1.5 var(--yd-pixel); margin-bottom: 6px; color: #765c84; }
.yd-policy-nav a { display: flex; align-items: center; min-height: 44px; font: 500 .88rem/1.4 var(--yd-pixel); }
.yd-policy-nav a:hover { text-decoration: underline; text-underline-offset: 4px; }
.yd-policy-copy { max-width: 75ch; min-width: 0; padding: 24px 27px; border: 2px solid #c1a9cc; background: #fffaf2; font-size: .94rem; line-height: 1.9; }
.yd-policy-copy > p { margin: 0 0 20px; }
.yd-policy-copy > p:first-child { font-size: .79rem; color: #745b80; padding-bottom: 16px; border-bottom: 1px dashed #c8b1d3; }
.yd-home .yd-policy-copy :is(h2,h3) { margin: 28px 0 13px; font-size: 1.5rem; scroll-margin-top: 16px; }
.yd-policy-copy ul { list-style: square; padding-left: 21px; margin: 0 0 18px; }
.yd-policy-copy li + li { margin-top: 10px; }
.yd-policy-copy a { text-decoration: underline; text-underline-offset: 3px; overflow-wrap: anywhere; color: #73518a; }
.yd-policy-copy small { font-size: .84rem; }
.yd-redirect { padding: 35px; }
.yd-redirect p { margin: 20px 0; }

@media (max-width:850px) {
  .yd-data-specs > div { padding: 15px; }
  .yd-data-specs strong { font-size: .78rem; }
  .yd-policy-layout { grid-template-columns: 1fr; gap: 20px; }
  .yd-home .yd-policy-nav { position: static; display: grid; grid-template-columns: 1fr 1fr; gap: 3px 15px; }
  .yd-policy-nav > span { grid-column: 1/-1; }
}
@media (max-width:600px) {
  .yd-home .yd-site-logo { width: 28px; height: 28px; }
  .yd-home .yd-journal-tools { padding: 15px; }
  .yd-home .yd-journal-filters { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
  .yd-journal-filters button { font-size: .76rem; padding-inline: 7px; }
  .yd-journal-filters button span { margin-left: 4px; font-size: .7rem; }
  .yd-home .yd-journal-search input { font-size: 16px; }
  .yd-journal-search > div > span { display: none; }
  .yd-document .yd-room-header { width: calc(100% - 28px); min-height: 78px; }
  .yd-document .yd-document-return { font-size: .8rem; }
  .yd-document-main { width: calc(100% - 22px); margin-bottom: 20px; }
  .yd-document-frame { border-width: 2px; box-shadow: 4px 4px 0 #c5b0d1; }
  .yd-document-bar { padding: 8px 12px; font-size: .76rem; }
  .yd-document .yd-studio-page { padding: 20px 16px; }
  .yd-home .yd-page-intro :is(h1,h2) { font-size: clamp(2.1rem,8.5vw,3rem); }
  .yd-page-intro > p:last-child { font-size: .9rem; }
  .yd-page-back { margin-bottom: 15px; }
  .yd-data-specs { grid-template-columns: 1fr; }
  .yd-data-specs > div { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 12px; }
  .yd-data-specs > div + div { border-left: 0; border-top: 1px solid #c1a9ce; }
  .yd-data-specs span { margin: 0; font-size: .65rem; }
  .yd-data-specs strong { text-align: right; font-size: .76rem; }
  .yd-trend-heading { flex-wrap: wrap; gap: 12px; padding: 20px 15px 12px; }
  .yd-home .yd-data-status { margin-inline: 15px; font-size: .76rem; }
  .yd-trend-item { margin-inline: 15px; }
  .yd-home .yd-trend-link { grid-template-columns: 24px minmax(0,1fr); gap: 8px 12px; padding-block: 16px; }
  .yd-trend-info > strong { font-size: .92rem; }
  .yd-trend-growth { grid-column: 2; display: flex; align-items: baseline; gap: 10px; text-align: left; }
  .yd-trend-growth strong { font-size: 1.1rem; }
  .yd-trend-growth small { margin: 0; }
  .yd-data-note { flex-direction: column; align-items: flex-start; gap: 6px; padding: 14px 15px; }
  .yd-page-note { gap: 10px; padding: 18px 15px; }
  .yd-note-star { font-size: 1.25rem; }
  .yd-report-toolbar { align-items: flex-start; flex-direction: column; padding: 15px; gap: 12px; }
  .yd-report-fallback { padding: 13px 15px; }
  .yd-policy-copy { padding: 20px 17px; }
  .yd-home .yd-policy-copy :is(h2,h3) { font-size: 1.35rem; }
  .yd-home .yd-policy-nav { padding: 12px; }
  .yd-policy-nav a { font-size: .8rem; }
}
@media print {
  .yd-journal-tools, .yd-page-back, .yd-document-return { display: none !important; }
  .yd-home .yd-journal-entry[hidden] { display: grid !important; }
  .yd-home .yd-journal-list[hidden] { display: block !important; }
  .yd-home .yd-journal-empty { display: none !important; }
  .yd-document-main { width: 100%; }
  .yd-document-frame { border: 0; box-shadow: none; }
  .yd-policy-layout { display: block; }
  .yd-policy-nav { display: none !important; }
}

/* The missing-page screen is a small pixel-world detour, with direct escape routes. */
.yd-lost .yd-document-main { max-width: 820px; }
.yd-lost-scene { padding: 36px clamp(18px,5vw,65px) 42px; text-align: center; }
.yd-lost-sky { display: flex; justify-content: center; align-items: center; gap: clamp(35px,10vw,100px); color: #b58bb8; }
.yd-lost-sky > span:first-child { align-self: flex-start; margin-top: 15px; font-size: 2rem; }
.yd-lost-sky > span:last-child { align-self: flex-end; font-size: 2.6rem; color: #85a6ad; }
.yd-home .yd-lost-number { font: 600 clamp(6rem,18vw,10rem)/1 var(--yd-pixel); color: #b9accf; text-shadow: 4px 4px 0 #7f668e; margin: 15px 0 20px; }
.yd-lost-scene .yd-eyebrow { color: #745982; margin: 0 0 13px; }
.yd-home .yd-lost-scene h1 { font-size: clamp(2rem,5vw,3rem); line-height: 1.15; margin: 0 auto 20px; }
.yd-lost-scene h1 + p { max-width: 480px; margin: 0 auto 25px; font-size: .96rem; line-height: 1.8; color: #6b5875; }
.yd-lost-paths { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 16px; margin-top: 24px; font-size: .85rem; }
.yd-lost-paths a { display: inline-flex; min-height: 44px; align-items: center; text-decoration: underline; text-underline-offset: 4px; }
.yd-lost-paths > span { color: #b39259; }
