/* Phase 2: homepage only. Phase 1 studio palette; no app/tool selectors. */
#public-view {
  --home-paper: var(--creator-paper);
  --home-ink: var(--creator-ink);
  --home-muted: var(--creator-muted);
  --home-lavender: var(--creator-lavender);
  --home-yellow: var(--creator-yellow);
  --home-mint: var(--creator-mint);
  --home-coral: var(--creator-coral);
  --home-sky: var(--creator-sky);
  background: var(--home-paper);
  color: var(--home-ink);
}
#public-view .ch-main { max-width: 1240px; margin: auto; padding: 0 32px 72px; }
#public-view.pub-canvas { background: var(--home-paper); }
#public-view .ch-main::before { content: none; }
#public-view .ch-main * { box-sizing: border-box; }
#public-view .ch-search-band { width: min(100%, 900px); margin: 26px auto 0; position: relative; z-index: 1; }
#public-view .ch-tool-search { display: flex; align-items: center; gap: 12px; min-height: 66px; padding: 7px 8px 7px 16px; border: 1.5px solid var(--home-ink); border-radius: 14px; background: #fffefa; box-shadow: 3px 3px 0 var(--home-ink); transition: border-color .16s ease, box-shadow .16s ease; }
#public-view .ch-tool-search:focus-within { border-color: var(--creator-focus); box-shadow: 3px 3px 0 var(--home-ink), 0 0 0 4px color-mix(in srgb, var(--creator-focus) 18%, transparent); }
#public-view .ch-tool-search-icon { flex: 0 0 22px; width: 22px; height: 22px; color: var(--home-ink); stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
#public-view .ch-tool-search input { flex: 1 1 auto; min-width: 0; height: 48px; padding: 0; border: 0; outline: 0; background: transparent; color: var(--home-ink); font: 600 16px/1.3 var(--pub-font); }
#public-view .ch-tool-search input::placeholder { color: #706a77; opacity: 1; font-weight: 450; }
#public-view .ch-search-shortcut { display: inline-flex; align-items: center; gap: 4px; flex: 0 0 auto; color: var(--home-muted); font: 600 11px/1 var(--pub-font); white-space: nowrap; }
#public-view .ch-search-shortcut kbd { padding: 4px 6px; border: 1px solid #c8c0d1; border-radius: 5px; background: #f5f1fb; color: var(--home-ink); font: inherit; }
#public-view .ch-search-submit { display: inline-flex; align-items: center; justify-content: center; gap: 8px; flex: 0 0 auto; min-height: 48px; padding: 0 16px; border: 1px solid var(--home-ink); border-radius: 9px; background: var(--home-lavender); box-shadow: 1px 2px 0 var(--home-ink); color: var(--home-ink); font: 750 14px/1 var(--pub-font); cursor: pointer; transition: transform .16s ease, background-color .16s ease, box-shadow .16s ease; }
#public-view .ch-search-submit svg { width: 17px; height: 17px; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
#public-view .ch-search-submit:hover { background: var(--home-mint); transform: translateY(1px); box-shadow: 0 1px 0 var(--home-ink); }
#public-view .ch-search-caption { margin: 10px 0 0; color: var(--home-muted); text-align: center; font-size: 12px; line-height: 1.4; }
#public-view .ch-main :is(h1,h2,h3):where(:not(.ch-scheduler-demo *)) { color: var(--home-ink); font-weight: 800; letter-spacing: -.035em; }
#public-view .ch-main h2:where(:not(.ch-scheduler-demo *)) { font-size: var(--pub-type-heading); line-height: 1.15; }
#public-view .ch-main h3:where(:not(.ch-scheduler-demo *)) { font-size: var(--pub-type-subheading); line-height: 1.25; }
#public-view .ch-main p:where(:not(.ch-scheduler-demo *)) { line-height: 1.6; }
#public-view .ch-section { padding-top: 60px; scroll-margin-top: 100px; }
#public-view .ch-anchor { display: block; height: 0; scroll-margin-top: 100px; }
#public-view .ch-eyebrow { font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 14px; }
#public-view .ch-section-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
#public-view .ch-section-head p { color: #605c66; max-width: 450px; margin-top: 10px; }
#public-view .ch-tool-directory-head { align-items: end; margin-bottom: 18px; }
#public-view .ch-tool-directory-head h2 { max-width: 620px; }
#public-view .ch-tool-directory-head > p { max-width: 360px; }
#public-view .ch-hero { text-align: center; padding: 42px 0 12px; }
#public-view #hero-tagline { font-size: var(--pub-type-display); line-height: 1.12; letter-spacing: -.035em; margin: 0 0 16px; animation: none; transform: none; opacity: 1; color: var(--home-ink); }
#public-view #hero-tagline span { background: var(--home-lavender); padding: 0 .08em; box-decoration-break: clone; }
#public-view .ch-lead { font-size: var(--pub-type-lead); max-width: 660px; margin: 0 auto; color: var(--creator-muted); }
@media (min-width: 1025px) {
  #public-view .ch-lead { max-width: 100%; font-size: clamp(16px, 1.6vw, 18px); }
}
#public-view .ch-button { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 11px 19px; font-weight: 750; font-size: 15px; border: 2px solid var(--home-ink); border-radius: 7px; color: var(--home-ink); background: #fffefa; box-shadow: 3px 3px 0 var(--home-ink); text-decoration: none; cursor: pointer; }
#public-view .ch-button:hover { background: var(--home-yellow); }
#public-view .ch-button:disabled { opacity: .7; cursor: wait; }
#public-view .ch-small { font-size: 13px; color: #605c66; margin-top: 18px; }
#public-view .ch-preview { background: var(--home-lavender); padding: 14px; border: 2px solid var(--home-ink); border-radius: 12px; box-shadow: 6px 6px 0 var(--home-ink); transform: rotate(1deg); }
#public-view .ch-preview-top { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; font-weight: 750; margin-bottom: 12px; }
#public-view .ch-preview img { width: 100%; height: auto; border: 1px solid var(--home-ink); border-radius: 5px; background: var(--home-paper); }
#public-view .ch-preview figcaption { font-size: 13px; padding-top: 12px; }
#public-view .ch-note-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: center; gap: 16px; border-block: 1px solid var(--home-ink); padding: 16px 0; font-size: 13px; font-weight: 650; }
#public-view .ch-note-strip > span { min-width: 0; overflow-wrap: anywhere; }
#public-view .ch-note-strip > span:nth-child(1) { text-align: left; }
#public-view .ch-note-strip > span:nth-child(2) { text-align: center; }
#public-view .ch-note-strip > span:nth-child(3) { text-align: right; }
#public-view .ch-note-mobile { display: none; }
#public-view .ch-workflows { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
#public-view .ch-workflow { padding: 22px; border: 1.5px solid var(--home-ink); border-radius: 8px; background: #fffefa; }
#public-view .ch-workflow:first-child { background: var(--home-lavender); box-shadow: 4px 4px 0 var(--home-ink); }
#public-view .ch-status { display: inline-block; border: 1px solid var(--home-ink); border-radius: 4px; padding: 3px 7px; font-size: 11px; font-weight: 750; margin-bottom: 12px; background: var(--home-paper); }
#public-view .ch-workflow:first-child .ch-status { background: var(--home-mint); }
#public-view .ch-workflow-live { background: #e9f3ec; }
#public-view .ch-workflow-live .ch-status { background: var(--home-mint); }
#public-view .ch-workflow p { font-size: 14px; margin-top: 12px; }
#public-view .ch-text-link { display: inline-block; color: var(--home-ink); font-size: 14px; font-weight: 750; text-decoration: underline; text-underline-offset: 4px; padding-block: 10px; }
#public-view .ch-tools { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); grid-auto-rows: 1fr; gap: 12px; }
#public-view .ch-tool { display: flex; flex-direction: column; align-items: start; padding: 16px; min-width: 0; height: 100%; color: var(--home-ink); text-decoration: none; border: 1px solid var(--home-ink); border-radius: 8px; background: #fffefa; box-shadow: 1px 2px 0 #29262e; }
#public-view .ch-tool:hover { box-shadow: 3px 3px 0 var(--home-ink); }
#public-view .ch-tool-featured { border-width: 1.5px; box-shadow: 3px 3px 0 var(--home-ink); }
#public-view .ch-tool-featured-primary { background: var(--home-lavender); }
#public-view .ch-tool-featured-secondary { background: #e9f3ec; }
#public-view .ch-tool-featured .ch-tool-mark { background: var(--home-mint); }
#public-view .ch-tool-featured-secondary .ch-tool-mark { background: var(--home-sky); }
#public-view .ch-tool-featured h3 { font-size: 17px; }
#public-view .ch-tool-mark { display: grid; place-items: center; width: 36px; height: 36px; flex: 0 0 36px; border: 1px solid var(--home-ink); border-radius: 7px; background: var(--home-lavender); color: var(--home-ink); margin-bottom: 12px; }
#public-view .ch-tool-mark svg { display: block; width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
#public-view .ch-tool:nth-child(5n+2) .ch-tool-mark { background: var(--home-mint); }
#public-view .ch-tool:nth-child(5n+3) .ch-tool-mark { background: var(--home-yellow); }
#public-view .ch-tool:nth-child(5n+4) .ch-tool-mark { background: var(--home-coral); }
#public-view .ch-tool:nth-child(5n) .ch-tool-mark { background: var(--home-sky); }
#public-view .ch-main .ch-tool h3 { min-height: 2.6em; font-size: var(--pub-type-card-title); line-height: 1.3; letter-spacing: -.015em; overflow-wrap: anywhere; }
#public-view .ch-tool p { font-size: var(--pub-type-caption); margin-top: 6px; color: #605c66; }
#public-view .ch-tool:last-child { background: var(--home-yellow); }
#public-view .ch-tool[hidden], #public-view .ch-filters[hidden] { display: none; }
#public-view .ch-tool-directory { padding-top: 0; }
#public-view .ch-filters { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0 0 24px; }
#public-view .ch-filters button { font: 600 var(--pub-type-label)/1.3 var(--pub-font); color: var(--home-ink); background: var(--creator-white); border: 1px solid #8f8896; border-radius: 999px; padding: 8px 14px; min-height: 40px; cursor: pointer; }
#public-view .ch-filters button[aria-pressed="true"] { background: var(--home-ink); color: var(--creator-white); }
#public-view .ch-filters button:hover { border-color: var(--creator-focus); box-shadow: 0 0 0 1px var(--creator-focus); }
#public-view .ch-visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
#public-view .ch-note-strip { margin-top: 18px; }
#public-view .ch-studio-layout { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr); align-items: stretch; gap: 18px; }
#public-view .ch-studio-preview { display: flex; flex-direction: column; margin: 0; min-width: 0; padding: 12px; border: 1px solid var(--home-ink); border-radius: 8px; background: #fffefa; box-shadow: 2px 2px 0 var(--home-ink); }
#public-view .ch-studio-preview img { display: block; width: 100%; height: 100%; min-height: 240px; max-height: 370px; object-fit: contain; background: #f1eef5; border-radius: 4px; }
#public-view .ch-studio-preview figcaption { padding: 10px 2px 0; color: var(--home-muted); font-size: var(--pub-type-caption); line-height: 1.4; }
#public-view .ch-workflows { grid-template-columns: 1fr; grid-template-rows: repeat(2, 1fr); }
#public-view .ch-studio-layout .ch-workflows { grid-template-columns: 1fr; grid-template-rows: repeat(2, minmax(0, 1fr)); }
#public-view .ch-workflow { display: flex; flex-direction: column; align-items: flex-start; padding: 18px; }
#public-view .ch-workflow p { margin: 8px 0 4px; }
#public-view .ch-workflow .ch-text-link { margin-top: auto; }
#public-view .sc-nav, #public-view .sc-nav-inner { min-height: 64px; }
#public-view .sc-nav-inner { padding-block: 8px; }
#public-view .sc-brand { font-size: 24px; }
#public-view .sc-brand .sc-brand-icon { width: 32px; height: 32px; min-width: 32px; }
#public-view .sc-links { align-items: center; }
#public-view .sc-links > a, #public-view .sc-links > button { font-size: var(--pub-type-nav); }
#public-view .ch-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; padding: 28px; background: var(--home-mint); border: 1.5px solid var(--home-ink); border-radius: 8px; }
#public-view .ch-step-num { font-size: 12px; font-weight: 800; display: block; margin-bottom: 12px; }
#public-view .ch-steps p { font-size: 14px; margin-top: 8px; }
#public-view .ch-resources { display: grid; grid-template-columns: 1fr 1fr 1.25fr; gap: 20px; }
#public-view .ch-resource { padding: 24px; border: 1.5px solid var(--home-ink); border-radius: 8px; background: var(--home-sky); }
#public-view .ch-resource:nth-child(2) { background: var(--home-coral); }
#public-view .ch-resource:nth-child(3) { background: var(--home-yellow); }
#public-view .ch-resource p { font-size: 14px; margin-block: 12px; }
#public-view .ch-resource .ch-button { margin-top: 8px; }
#public-view .ch-scheduler-demo { margin-top: 24px; border: 1px solid var(--home-ink); border-radius: 8px; overflow: hidden; }
#public-view .ch-scheduler-demo summary { cursor: pointer; padding: 18px 22px; font-weight: 700; }
#public-view .ch-scheduler-demo .pub-home-showcase { margin: 0; padding-top: 24px; }
#public-view .ch-closing { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--home-ink); }
#public-view :is(a,button,summary):focus-visible { outline: 3px solid #6844a5; outline-offset: 5px; }
@media (max-width: 1024px) {
  #public-view .ch-hero { gap: 28px; }
  #public-view .ch-tools { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  #public-view .ch-studio-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  #public-view .sc-links { background: var(--home-paper); }
}
@media (min-width: 761px) and (max-width: 1024px) {
  #public-view .ch-resources { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #public-view .ch-resource:last-child { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  #public-view .ch-main { padding: 0 22px 40px; }
  #public-view .ch-search-band { margin-top: 22px; }
  #public-view .ch-tool-search { min-height: 58px; gap: 8px; padding-left: 12px; }
  #public-view .ch-search-shortcut { display: none; }
  #public-view .ch-search-submit { min-height: 44px; padding: 0 12px; }
  #public-view .ch-hero { grid-template-columns: 1fr; padding-top: 36px; gap: 30px; }
  #public-view #hero-tagline { font-size: clamp(30px, 7vw, 44px); }
  #public-view .ch-tools { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #public-view .ch-tool { padding: 14px; }
  #public-view .ch-workflows { grid-template-columns: 1fr; }
  #public-view .ch-studio-layout { grid-template-columns: 1fr; }
  #public-view .ch-studio-preview img { height: auto; min-height: 0; max-height: 280px; }
  #public-view .ch-tool-directory { padding-top: 0; }
  #public-view .ch-preview { transform: none; max-width: 580px; }
  #public-view .ch-note-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; padding-block: 12px; font-size: clamp(10px, 3vw, 12px); line-height: 1.35; }
  #public-view .ch-note-desktop { display: none; }
  #public-view .ch-note-mobile { display: inline; }
  #public-view .ch-section { padding-top: 42px; }
  #public-view .ch-section-head, #public-view .ch-closing { display: block; }
  #public-view .ch-tool-directory-head { margin-bottom: 16px; }
  #public-view .ch-tool-directory-head > p { max-width: 34rem; }
  #public-view .ch-steps { grid-template-columns: 1fr 1fr; padding: 22px; }
  #public-view .ch-resources { grid-template-columns: 1fr; }
  #public-view .ch-closing .ch-button { margin-top: 18px; }
}
@media (max-width: 380px) {
  #public-view .ch-workflows, #public-view .ch-tools { grid-template-columns: 1fr; }
  #public-view .ch-tool-search { gap: 7px; padding-left: 10px; }
  #public-view .ch-tool-search-icon { flex-basis: 20px; width: 20px; height: 20px; }
  #public-view .ch-search-submit { gap: 5px; padding-inline: 10px; font-size: 13px; }
  #public-view .ch-search-submit svg { width: 15px; height: 15px; }
  #public-view .ch-steps { gap: 20px 14px; padding: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  #public-view .ch-main *, #public-view .sc-nav * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* Homepage polish: keep the established composition while tightening the
   vertical rhythm and card interiors for a calmer, more compact scan. */
#public-view .ch-main { padding-bottom: 64px; }
#public-view .ch-hero { padding: 38px 0 14px; }
#public-view .ch-section { padding-top: 52px; }
#public-view .ch-section-head { gap: 20px; margin-bottom: 20px; }
#public-view .ch-tool { padding: 15px; }
#public-view .ch-tool-mark { width: 34px; height: 34px; flex-basis: 34px; margin-bottom: 10px; }
#public-view .ch-tool p { line-height: 1.5; }
#public-view .ch-studio-layout { gap: 16px; }
#public-view .ch-studio-preview { padding: 10px; }
#public-view .ch-workflow { padding: 16px; }
#public-view .ch-steps { gap: 20px; padding: 24px; }
#public-view .ch-resource { padding: 20px; }
#public-view .ch-resource p { margin-block: 10px; }

@media (max-width: 760px) {
  #public-view .ch-main { padding-bottom: 40px; }
  #public-view .ch-hero { padding: 36px 0 12px; }
  #public-view .ch-section { padding-top: 40px; }
  #public-view .ch-section-head { gap: 16px; margin-bottom: 18px; }
  #public-view .ch-tool { padding: 14px; }
  #public-view .ch-tool-mark { width: 34px; height: 34px; flex-basis: 34px; }
  #public-view .ch-steps { gap: 18px 14px; padding: 22px; }
  #public-view .ch-resource { padding: 18px; }
}

@media (max-width: 380px) {
  #public-view .ch-steps { gap: 20px 14px; padding: 18px; }
}
