/* Scoped home palette and interaction contract. Generated from tokens.json.
   User documents, reader settings and other views do not inherit these tokens. */
body.studio-page.home-view {
  --hc-type-item-title-size: 14px;
  --hc-type-item-title-weight: 500;
  --hc-type-item-title-line: 22px;
  --hc-type-body-size: 14px;
  --hc-type-body-weight: 400;
  --hc-type-body-line: 22px;
  --hc-type-secondary-size: 13px;
  --hc-type-secondary-weight: 400;
  --hc-type-secondary-line: 21px;
  --hc-type-meta-size: 12px;
  --hc-type-meta-weight: 400;
  --hc-type-meta-line: 18px;
  --bg: #f6f7f8;
  --ink: #1b304d;
  --muted: #536880;
  --line: #dde2e8;
  --panel: #ffffff;
  --accent: #1d57ae;
  --hc-link: #1d57ae;
  --hc-secondary-ink: #536880;
  --hc-hover: transparent;
  --hc-focus: #1d57ae;
  --hc-heading: transparent;
  --hc-button-solid: #245ec5;
  --hc-button-hover: #174ca7;
  --hc-button-active: #123d88;
  --hc-button-soft: transparent;
  --hc-button-soft-hover: transparent;
  --hc-button-soft-active: transparent;
  --hc-button-ink: #1d57ae;
  --hc-panel-shadow: none;
  --hc-button-shadow: none;
  --hc-motion-fast: 120ms;
  --hc-button-raise: -1px;
  --hc-button-press: 1px;
  --hc-motion-enter: 180ms;
  --hc-motion-ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  background-color: var(--bg);
}
body.studio-page.home-view.dark {
  --bg: #071321;
  --ink: #e2eefc;
  --muted: #a8c0d8;
  --line: #355572;
  --panel: #102236;
  --accent: #a6d4ff;
  --hc-link: #a6d4ff;
  --hc-secondary-ink: #a8c0d8;
  --hc-hover: transparent;
  --hc-focus: #b8ddff;
  --hc-heading: transparent;
  --hc-button-solid: #285fb5;
  --hc-button-hover: #3270c9;
  --hc-button-active: #204e97;
  --hc-button-soft: transparent;
  --hc-button-soft-hover: transparent;
  --hc-button-soft-active: transparent;
  --hc-button-ink: #b8ddff;
  --hc-panel-shadow: none;
  --hc-button-shadow: none;
}
/* Quiet content surfaces; focus outlines and button states carry interaction. */
body.home-view .home-capabilities :is(.hc-capability-item,.hc-continue-item,.hc-personal-preference,.hc-topic-editorial) {
  transition: background-color var(--hc-motion-fast) ease;
}
body.home-view :is(.home-capabilities,.hc-dialog,.hc-domain-dialog) :is(button,a,input,textarea,select):focus-visible {
  outline: 2px solid var(--hc-focus);
  outline-offset: 3px;
}
body.home-view :is(.home-capabilities,.hc-dialog,.hc-domain-dialog) :is(button,a) {
  transition: color var(--hc-motion-fast) ease, background-color var(--hc-motion-fast) ease, border-color var(--hc-motion-fast) ease, translate var(--hc-motion-fast) ease, box-shadow var(--hc-motion-fast) ease;
}
@media (hover:hover) and (pointer:fine) {
  body.home-view .hc-teacher-banner {
    transition: translate var(--hc-motion-enter) var(--hc-motion-ease);
  }
  body.home-view .hc-teacher-entry:hover .hc-teacher-banner { translate: 0 -2px; }
}
body.home-view :is(.hc-dialog,.hc-domain-dialog)[open] {
  animation: hc-dialog-enter var(--hc-motion-enter) var(--hc-motion-ease);
}
body.home-view :is(.hc-dialog,.hc-domain-dialog)[open]::backdrop {
  animation: hc-backdrop-enter var(--hc-motion-enter) ease-out;
}
@keyframes hc-dialog-enter {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes hc-backdrop-enter { from { opacity: 0; } to { opacity: 1; } }
/* Surfaces and controls share a visible hierarchy, independent of legacy gradients. */
body.studio-page.home-view .home-capabilities :is(#hc-reading,#hc-integrations,#hc-works,#hc-reports,#hc-tools,#hc-domains,.hc-memory-regions,.hc-memory-summary-region) {
  background: var(--panel);
  border-color: var(--line);
  box-shadow: var(--hc-panel-shadow);
}
body.home-view .home-capabilities :is(.hc-section>header,.hc-work-tabs,.hc-capability-toolbar,.hc-empty) {
  background: none;
}
body.home-view .home-capabilities .hc-capability-symbol {
  background: none;
  color: var(--hc-link);
}
body.home-view .home-capabilities :is(.hc-invite-actions button,.hc-report-placeholder>button[data-hc-login]) {
  background: var(--hc-button-soft);
  color: var(--hc-button-ink);
  border-color: var(--line);
  box-shadow: none;
}
body.home-view .home-capabilities :is(.hc-invite-actions button.primary,.hc-report-placeholder>button[data-hc-login]) {
  --hc-primary-background: var(--hc-button-solid);
  background: var(--hc-button-solid);
  color: white;
  box-shadow: var(--hc-button-shadow);
  filter: none;
}
body.home-view .home-capabilities :is(.hc-work-tabs>button,.hc-agent-connect,.hc-continue-action,.hc-capability-copy,.hc-capability-help,.hc-section>header a,.hc-section>header button) {
  color: var(--hc-link);
}
@media (hover:hover) and (pointer:fine) {
  body.home-view .home-capabilities :is(.hc-invite-actions button,.hc-report-placeholder>button[data-hc-login]):not(:disabled):not([aria-disabled=true]):hover {
    background: var(--hc-button-soft-hover);
    border-color: var(--hc-link);
    translate: 0 var(--hc-button-raise);
    box-shadow: var(--hc-button-shadow);
  }
  body.home-view .home-capabilities :is(.hc-invite-actions button.primary,.hc-report-placeholder>button[data-hc-login]):not(:disabled):not([aria-disabled=true]):hover {
    --hc-primary-background: var(--hc-button-hover);
    background: var(--hc-button-hover);
    color: white;
  }
  body.home-view .home-capabilities :is(.hc-work-tabs>button,.hc-agent-connect,.hc-continue-action,.hc-section>header a,.hc-section>header button):not([role=tab]):not(:disabled):hover {
      text-decoration: underline;
    text-underline-offset: 3px;
  }
  body.home-view .home-capabilities :is(.hc-capability-copy,.hc-capability-help):not(:disabled):hover {
    color: var(--hc-button-ink);
    translate: 0 var(--hc-button-raise);
  }
}
body.home-view .home-capabilities :is(.hc-invite-actions button,.hc-report-placeholder>button[data-hc-login]):not(:disabled):not([aria-disabled=true]):active {
  background: var(--hc-button-soft-active);
  translate: 0 var(--hc-button-press);
  box-shadow: none;
}
body.home-view .home-capabilities :is(.hc-invite-actions button.primary,.hc-report-placeholder>button[data-hc-login]):not(:disabled):not([aria-disabled=true]):active {
  --hc-primary-background: var(--hc-button-active);
  background: var(--hc-button-active);
  color: white;
}
body.home-view .home-capabilities :is(.hc-capability-copy,.hc-capability-help,.hc-work-tabs>button):not(:disabled):active {
  translate: 0 var(--hc-button-press);
}
body.home-view .home-capabilities button:disabled {
  translate: none;
  box-shadow: none;
  cursor: not-allowed;
}

@media (prefers-reduced-motion:reduce) {
  body.studio-page.home-view { --hc-button-raise: 0px; --hc-button-press: 0px; }
  body.home-view :is(.home-capabilities,.hc-dialog,.hc-domain-dialog),
  body.home-view :is(.home-capabilities,.hc-dialog,.hc-domain-dialog) *,
  body.home-view :is(.hc-dialog,.hc-domain-dialog)::backdrop {
    animation: none;
    transition: none;
  }
  body.home-view .hc-teacher-entry:hover .hc-teacher-banner,
  body.home-view .home-capabilities :is(button,a):is(:hover,:active) { translate: none; }
}
@media (forced-colors:active) {
  body.home-view :is(.home-capabilities,.hc-dialog,.hc-domain-dialog) :focus-visible {
    outline-color: Highlight;
  }
}

/* The shared sprouting-book illustration fills empty reading and preference areas.
   Status and recovery actions remain real text, below the decorative artwork. */
body.home-view .hc-reading-content:has(>.hc-empty) {
  display: flex;
}
body.home-view :is(#hc-memory-overview,#hc-preferences):has(>.hc-empty) {
  display: flex;
  flex-direction: column;
}
body.home-view :is(#hc-memory-overview,#hc-preferences):has(>.hc-empty)>header {
  flex-shrink: 0;
}
body.home-view :is(.hc-reading-content,#hc-memory-overview,#hc-preferences)>.hc-empty {
  flex: 1;
  flex-direction: column;
  flex-wrap: nowrap;
  justify-content: flex-end;
  gap: 8px;
  text-align: center;
}
body.home-view :is(.hc-reading-content,#hc-memory-overview,#hc-preferences)>.hc-empty::before {
  content: "";
  display: block;
  width: 100%;
  min-height: 88px;
  flex: 1 1 0;
  background: url('assets/home-reading-invite-800.opt-v1.webp') center / contain no-repeat;
  background-image: image-set(url('assets/home-reading-invite-480.opt-v1.webp') 1x, url('assets/home-reading-invite-800.opt-v1.webp') 2x);
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.9;
  pointer-events: none;
}
