.cx-library { flex: 0 0 auto; min-width: 0; padding: 31px clamp(22px, 3vw, 42px) 36px; border-bottom: 1px solid var(--line); }
.cx-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 23px; }
.cx-heading .ch-mono { color: #666; font-size: 11px; }
.cx-heading h2 { margin: 9px 0 8px; color: #171717; font: 500 clamp(26px, 3vw, 37px)/1.1 var(--display); letter-spacing: -.055em; }
.cx-heading p { margin: 0; color: #666; font-size: 12px; }
.cx-example-note { flex: 0 0 auto; color: #666; font-size: 11px; line-height: 1.7; text-align: right; }
.cx-filters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 15px; }
.cx-filters button { display: flex; align-items: center; gap: 12px; min-height: 34px; padding: 6px 11px; border: 1px solid #e3e3e1; border-radius: 8px; background: #fff; color: #666; font-size: 12px; }
.cx-filters button span { color: #666; font: 400 11px/1 var(--mono); }
 .cx-filters button.is-active { border-color: #c7c7c5; background: #f4f4f2; color: #171717; }@media (hover: hover) and (pointer: fine){.cx-filters button:hover{ border-color: #c7c7c5; background: #f4f4f2; color: #171717; }}
.cx-workspace { display: grid; grid-template-columns: minmax(215px, 29%) minmax(0, 1fr); align-items: stretch; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.cx-browser { min-width: 0; background: #fcfcfb; border-right: 1px solid var(--line); }
.cx-list-label { padding: 14px 15px; border-bottom: 1px solid var(--line); color: #666; font-size: 11px; }
.cx-list { max-height: 520px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #d5d5d2 transparent; }
.cx-item { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 8px; width: 100%; min-height: 75px; padding: 15px 13px; border: 0; border-bottom: 1px solid var(--line); border-left: 2px solid transparent; background: transparent; color: #666; text-align: left; }
@media (hover: hover) and (pointer: fine){.cx-item:hover { background: #f3f3f1; }}
.cx-item.is-active { border-left-color: #222; background: #efefed; color: #171717; }
.cx-number { padding-top: 2px; color: #666; font: 400 11px/1.4 var(--mono); }
.cx-item strong { display: block; font-size: 12px; font-weight: 500; line-height: 1.4; }
.cx-item small { display: block; margin-top: 5px; color: #666; font-size: 11px; line-height: 1.45; }
.cx-detail { min-width: 0; background: #fff; }
.cx-detail-heading { padding: 22px 23px 18px; border-bottom: 1px solid var(--line); }
.cx-detail-heading > .ch-mono { color: #666; font-size: 11px; }
.cx-detail-heading h3 { margin: 7px 0; color: #222; font-size: 21px; font-weight: 500; line-height: 1.2; letter-spacing: -.035em; }
.cx-detail-heading > p { max-width: 650px; margin: 0; color: #666; font-size: 12px; line-height: 1.6; }
.cx-flow { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.cx-input { min-width: 0; padding: 19px; border-right: 1px solid var(--line); }
.cx-context > .ch-mono, .cx-questions > .ch-mono, .cx-reading > .ch-mono { display: block; margin-bottom: 13px; color: #666; font-size: 11px; }
.cx-source { margin: 0 0 10px; padding: 11px 12px; border: 1px solid #e8e8e5; border-radius: 10px; background: #fafaf8; scroll-margin: 20px; }
.cx-source > span { display: block; color: #666; font-size: 11px; line-height: 1.5; }
.cx-source b { margin-right: 5px; color: #666; font: 400 11px/1 var(--mono); }
.cx-source p { margin: 6px 0 0; color: #444; font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
.cx-source.is-cited { border-color: #4c5c83; background: #f3f5fa; }
.cx-source em { display: block; margin-top: 5px; color: #405bb1; font-size: 11px; font-style: normal; }
.cx-questions { margin-top: 21px; }
.cx-question { display: flex; align-items: flex-start; gap: 9px; width: 100%; padding: 10px 0; border: 0; border-top: 1px solid var(--line); background: #fff; color: #666; text-align: left; font-size: 12px; line-height: 1.5; }
.cx-question > span { flex: 0 0 auto; color: #aaa; }
.cx-question.is-active, .cx-question.is-active > span{ color: #171717; }@media (hover: hover) and (pointer: fine){ .cx-question:hover { color: #171717; }}
.cx-inspect { display: flex; align-items: center; justify-content: space-between; gap: 15px; width: 100%; min-height: 37px; margin-top: 13px; padding: 9px 12px; border: 1px solid #171717; border-radius: 8px; background: #171717; color: #fff; font-size: 12px; }
@media (hover: hover) and (pointer: fine){.cx-inspect:hover { background: #333; }}
.cx-output { min-width: 0; background: #fdfdfc; }
.cx-reading { min-width: 0; padding: 19px; }
.cx-reading h4 { margin: 0 0 17px; color: #333; font-size: 15px; font-weight: 500; line-height: 1.45; letter-spacing: -.015em; }
.cx-reading-empty h4 { margin-top: 31px; max-width: 220px; color: #555; font-size: 22px; font-weight: 400; letter-spacing: -.04em; line-height: 1.2; }
.cx-reading-empty > p { margin: 0; color: #666; font-size: 12px; line-height: 1.7; }
.cx-reading-hint { display: block; margin-top: 35px; padding-top: 14px; border-top: 1px solid var(--line); color: #666; font: 400 11px/1.8 var(--mono); }
.cx-observations { margin: 0; padding: 0; list-style: none; }
.cx-observations > li { margin-bottom: 17px; }
.cx-observations p, .cx-open p, .cx-next p { margin: 0; color: #555; font-size: 12px; line-height: 1.65; overflow-wrap: anywhere; }
.cx-citations { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 7px; }
.cx-citations button { min-height: 28px; padding: 5px 7px; border: 1px solid #e0e3eb; border-radius: 5px; background: #f7f8fb; color: #405b91; text-align: left; font-size: 11px; line-height: 1.5; }
@media (hover: hover) and (pointer: fine){.cx-citations button:hover { background: #edf0f8; }}
.cx-citations button > span { margin-right: 4px; font-family: var(--mono); }
.cx-open, .cx-next { margin-top: 15px; padding-top: 13px; border-top: 1px solid var(--line); }
.cx-open strong, .cx-next strong { display: block; margin-bottom: 5px; color: #555; font-size: 11px; font-weight: 600; }
.cx-footer { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 12px 18px; border-top: 1px solid var(--line); color: #666; font-size: 11px; line-height: 1.6; }
.cx-footer button { flex: 0 0 auto; padding: 5px 0; border: 0; background: transparent; color: #405bb1; font-size: 12px; }
.ch-hero-copy { padding-top: 20px; padding-bottom: 20px; }
.ch-hero-copy .ch-examples-jump { min-height: 29px; margin-top: 10px; padding: 0; border: 0; background: transparent; color: #666; font-size: 11px; }
@media (hover: hover) and (pointer: fine){.ch-hero-copy .ch-examples-jump:hover { color: #171717; text-decoration: underline; }}
@media (max-width: 1100px) {
  .cx-workspace { grid-template-columns: minmax(185px, 29%) minmax(0, 1fr); }
  .cx-flow { grid-template-columns: minmax(0, 1fr); }
  .cx-input { border-right: 0; border-bottom: 1px solid var(--line); }
  .cx-context { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .cx-context > .ch-mono { grid-column: 1 / -1; margin-bottom: 3px; }
  .cx-source { margin-bottom: 0; }
  .cx-reading-empty h4 { max-width: none; margin-top: 0; font-size: 18px; }
  .cx-reading-hint { margin-top: 15px; }
}
@media (max-width: 680px) {
  .cx-library { padding: 25px 20px; }
  .cx-heading { align-items: flex-start; flex-direction: column; gap: 10px; margin-bottom: 17px; }
  .cx-example-note { text-align: left; }
  .cx-workspace { grid-template-columns: minmax(0, 1fr); }
  .cx-browser { border-right: 0; border-bottom: 1px solid var(--line); }
  .cx-list { max-height: 200px; }
  .cx-item { min-height: 63px; padding: 12px; }
  .cx-detail-heading { padding: 20px 16px 16px; }
  .cx-input, .cx-reading { padding: 16px; }
  .cx-context { display: block; }
  .cx-context > .ch-mono { margin-bottom: 13px; }
  .cx-source { margin-bottom: 9px; }
  .cx-footer { align-items: flex-start; flex-direction: column; gap: 4px; padding: 12px 16px; }
  .cx-question { min-height: 44px; }
}

/* Home cards share the same soft outer corners as the example library. */
.console-home .ch-feature-grid { gap: 1px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--line); }
.console-home .ch-feature-grid > button { border: 0; }
.console-home .ch-feature-grid > button:focus-visible,
.cx-workspace button:focus-visible { outline-offset: -3px; }
.console-home .ch-art-card { border-radius: 10px; }
.console-home .ch-hero-copy .ch-primary { border-radius: 12px; }
.console-home .ch-quick-note { border-radius: 12px; }
.console-home .ch-quick-action:first-of-type { border-radius: 8px 8px 0 0; }
.console-home .ch-quick-action:nth-of-type(2) { border-radius: 0 0 8px 8px; }

/* Keep the larger library easy to find and move through without adding visual weight. */
.cx-search { display: flex; align-items: center; gap: 12px; margin: 0 0 15px; }
.cx-search label { flex: 0 0 auto; color: #555; font-size: 11px; }
.cx-search input { width: min(100%, 340px); min-width: 0; height: 36px; padding: 8px 10px; border: 1px solid #dededb; border-radius: 8px; background: #fff; color: #333; font-size: 12px; }
.cx-search input::placeholder { color: #666; }
.cx-search-count { flex: 0 0 auto; margin-left: auto; color: #666; font: 400 11px/1.4 var(--mono); }
.cx-no-results { align-self: center; padding: 28px 23px; }
.cx-no-results h3 { margin: 0 0 8px; color: #333; font-size: 16px; font-weight: 500; }
.cx-no-results p { margin: 0 0 14px; color: #666; font-size: 12px; }
.cx-no-results button, .cx-return-reading { min-height: 32px; padding: 5px 8px; border: 1px solid #dce0e7; border-radius: 6px; background: #fff; color: #405b91; font-size: 11px; }
.cx-return-reading { margin-top: 9px; }
.cx-return-reading span { margin-left: 7px; }
.cx-citations button.is-current-citation { border-color: #7182a7; }
.cx-traversal { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 18px; border-top: 1px solid var(--line); }
.cx-traversal > span { color: #666; font: 400 11px/1.4 var(--mono); }
.cx-traversal button { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 34px; padding: 6px 8px; border: 1px solid #e0e0de; border-radius: 7px; background: #fff; color: #444; font-size: 11px; }
@media (hover: hover) and (pointer: fine){.cx-traversal button:hover:not(:disabled), .cx-return-reading:hover, .cx-no-results button:hover { background: #f4f5f7; }}
@media (max-width: 680px) {
  .cx-search { flex-wrap: wrap; gap: 7px 12px; }
  .cx-search label { flex-basis: 100%; }
  .cx-search input { flex: 1; height: 40px; }
  .cx-traversal { padding: 10px 12px; }
  .cx-traversal button, .cx-return-reading, .cx-citations button, .cx-no-results button { min-height: 40px; }
}
