/* A small, searchable library keeps every desk destination available. */
.desk-library [hidden], #paper-toolbar[hidden], #desk-no-results[hidden] { display: none !important; }
.example-mount[hidden] { display: none !important; }
.mobile-picker { display: none; }
.desk-layout { grid-template-columns: minmax(220px,.65fr) minmax(550px,2fr); align-items: start; }
.invitation { align-self: start; padding-top: 8px; }
.invitation h1, .is-embedded .invitation h1 { font-size: clamp(48px,4.7vw,64px); margin: 19px 0 16px; letter-spacing: -3px; }
.intro { margin-bottom: 23px; font-size: 14px; }
.desk-library .selection-label { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 9px; }
#desk-total { font-size: 10px; }
.desk-search-wrap { display: flex; align-items: center; gap: 9px; padding: 0 12px; border: 1px solid #c2d6df8c; border-radius: 4px; background: #183b50c9; }
.desk-search-wrap svg { width: 17px; height: 17px; fill: none; stroke: #f5f8f8; stroke-width: 1.6; flex-shrink: 0; }
#desk-search { width: 100%; min-height: 44px; border: 0; background: none; color: #fff; font: inherit; font-size: 12px; min-width: 0; }
#desk-search::placeholder { color: #e0eaf0; }
.desk-library .studies { position: relative; display: block; max-height: clamp(240px,32vh,360px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #c9e0e4 #244558; margin: 8px -7px 0; padding: 0 7px 7px; }
.desk-group-label { position: sticky; top: 0; z-index: 1; font-size: 10px; font-weight: 600; letter-spacing: .4px; margin: 10px 0 7px; padding: 7px 3px; color: #e8f3f6; background: #1c4054; }
.desk-library .study-choice { min-height: 46px; padding: 9px 11px; margin-bottom: 5px; gap: 9px; border-radius: 3px; width: 100%; }
.desk-library .study-choice:not([aria-selected=true]) { background: #163a4bd6; border-color: #aec8d147; }
.desk-library .study-choice[aria-selected=true] { background: #f0f6f3; box-shadow: 0 3px 12px #173d4433; }
.desk-library .study-choice[aria-selected=true]::before { top: 10px; bottom: 10px; }
.desk-library .choice-number { font-size: 10px; min-width: 17px; letter-spacing: 0; }
.desk-library .study-choice strong { font-size: 12px; line-height: 1.4; font-weight: 500; flex: 1; }
.choice-selected { visibility: hidden; }
.choice-selected svg { width: 15px; height: 15px; }
.study-choice[aria-selected=true] .choice-selected { visibility: visible; color: #0a48a9; }
#desk-no-results { font-size: 12px; line-height: 1.6; }
#desk-clear { min-height: 44px; background: none; color: #fff; text-decoration: underline; font: inherit; padding: 0 6px; }
.hub-link { margin-top: 12px; }
.paper-heading h2 { max-width: none; }
.folio-tab { max-width: calc(100% - 40px); min-width: 150px; }
#folio-topic { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.paper-toolbar { padding: 12px 26px 0 34px; }
.full-tool-summary { margin: 10px 0 2px; color: #385361; font-size: 12px; line-height: 1.5; max-width: 70ch; }
.full-tool-summary[hidden] { display: none; }
.view-switch { display: inline-flex; border: 1px solid #c7d7dd; background: #e6eef1; border-radius: 5px; padding: 3px; gap: 3px; }
.view-switch button { min-height: 44px; padding: 0 16px; background: none; color: #385361; border-radius: 3px; font-size: 12px; }
.view-switch button[aria-pressed=true] { background: #fff; color: #233e4c; box-shadow: 0 1px 5px #2448581a; }
.paper-footer p { max-width: 33ch; font-size: 11px; }
.live-tool-viewport { position: relative; width: 100%; height: clamp(460px,65dvh,730px); overflow: hidden; background: #fff; border: 1px solid #cedbe0; border-radius: 2px; }
.live-tool-viewport iframe { display: block; border: 0; transform-origin: top left; }
.live-tool-viewport iframe:focus-visible { outline: 3px solid #1e40af; outline-offset: -3px; }
.live-tool-waiting { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; flex-direction: column; background: #f5f8f8; color: #263e4a; font-size: 13px; padding: 20px; text-align: center; }
.live-tool-waiting[hidden] { display: none; }
.live-tool-waiting a { min-height: 44px; display: inline-flex; align-items: center; text-underline-offset: 4px; }
.is-live .example-mount { padding: 12px 14px 0 22px; min-height: 0; }
.is-live .paper-header { padding-top: 19px; padding-bottom: 17px; }
.is-live .paper-heading h2 { font-size: 23px; }
.is-live .sheet-number { font-size: 28px; }
.is-live .desk-layout { padding-top: 30px; }
@media(min-width:901px) and (max-height:850px) {
  .desk-library .studies { max-height: 220px; }
  .invitation h1, .is-embedded .invitation h1 { font-size: 50px; margin: 14px 0; }
  .intro { margin-bottom: 17px; }
  .desk-layout, .is-embedded .desk-layout { padding-top: 28px; }
}
@media(max-width:1100px) and (min-width:901px) {
  .desk-layout { grid-template-columns: 220px minmax(0,1fr); gap: 26px; }
  .desk-library .study-choice strong { font-size: 11px; }
}
@media(max-width:900px) {
  .desk-layout { display: flex; flex-direction: column; align-items: stretch; }
  .invitation { display: block; align-self: stretch; padding-top: 0; }
  .desk-library { display: none; }
  .mobile-picker { display: flex; flex-direction: column; gap: 7px; color: #fff; font-size: 11px; }
  .mobile-picker select { width: 100%; min-height: 48px; padding: 10px 36px 10px 15px; font: 500 14px 'DM Sans',Arial,sans-serif; color: #243b49; border: 1px solid #d4e4e9; border-radius: 4px; background: #f0f6f5; }
  .mobile-picker select:focus-visible { outline: 3px solid #1e40af; outline-offset: 3px; }
  .is-embedded .mobile-picker>span { display: none; }
  .is-embedded .desk-layout { gap: 38px; padding-top: 14px; }
  .is-live .folio { max-width: none; }
  .paper-toolbar { padding: 12px 20px 0 23px; }
  .is-live .paper-footer p { display: none; }
  .is-live .paper-footer { justify-content: flex-end; }
}
@media(max-width:540px) {
  /* Long explanations keep their backing sheet within the phone width. */
  .folio .paper-stack { transform: none; }
  .view-switch { display: flex; }
  .view-switch button { flex: 1; padding: 0 9px; font-size: 12px; }
  .paper-toolbar { padding: 10px 14px 0 20px; }
  .is-live .folio { width: calc(100% + 28px); margin-inline: -14px; }
  .is-live .paper-stack { display: none; }
  .is-live .paper { border: 0; border-radius: 0; }
  .is-live .paper::before, .is-live .paper-header { display: none; }
  .is-live .example-mount { padding: 0; }
  .is-live .paper-toolbar { padding: 8px 14px; }
  .live-tool-viewport { height: max(500px,68dvh); border: 0; }
  .is-live .paper-footer { margin: 0 14px; padding: 10px 0; }
  .is-live .full-tool { min-height: 44px; }
  .is-live .desk-caption { left: 16px; right: 16px; }
}

/* Native launch keeps a framing-restricted tool in the same collection. */
.native-tool{padding:clamp(20px,4vw,42px) 10px 28px;color:#263e4a}
.native-tool h3{font-size:clamp(27px,3vw,40px);font-weight:500;letter-spacing:-.04em;line-height:1.1;margin:0 0 16px}
.native-tool-intro{max-width:46ch;font-size:14px;line-height:1.7;color:#526a77;margin:0 0 30px}
.native-tool-route{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));list-style:none;margin:0 0 32px;padding:0;border-block:1px solid #d3dfe3}
.native-tool-route li{min-width:0;padding:20px 14px 23px 0;display:grid;gap:14px}
.native-tool-route li+li{padding-left:18px;border-left:1px solid #d3dfe3}
.native-tool-number{color:#0a48a9;font-size:11px;font-variant-numeric:tabular-nums}
.native-tool-route strong{font-size:13px;font-weight:500;line-height:1.5}
.native-tool-open{display:inline-flex;align-items:center;justify-content:center;gap:18px;min-height:48px;padding:12px 20px;background:#1e40af;color:white;text-decoration:none;font-size:13px;font-weight:600;border-radius:4px;box-shadow:0 3px 0 #0a48a9}
.native-tool-open:hover{background:#0c51bc}
.native-tool-open svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.6}
.native-tool-note{font-size:12px;color:#526a77;line-height:1.6;max-width:48ch;margin:18px 0 0}
.is-launch .paper-footer p{max-width:35ch}
@media(max-width:540px){.native-tool{padding:16px 0 20px}.native-tool-intro{font-size:13px}.native-tool-route{grid-template-columns:1fr}.native-tool-route li,.native-tool-route li+li{display:flex;align-items:center;gap:15px;padding:13px 0;border-left:0}.native-tool-route li+li{border-top:1px solid #d3dfe3}.native-tool-route strong{font-size:13px}.native-tool-open{width:100%;padding-inline:12px;gap:12px}.is-launch .paper-footer p{display:none}.is-launch .paper-footer{justify-content:flex-end}}
/* Search recovery sits directly under the field: suggestions and Clear. */
#desk-no-results { margin: 8px 0 4px; }
.search-suggest { min-height: 44px; padding: 0 6px; background: none; border: 0; color: inherit; font: inherit; text-decoration: underline; cursor: pointer; }
