/* LADIVO 332 — restrained public navigation and discovery polish.
 * Load after navigation331.css and discovery331.css.
 * Intentionally no body, global button/input, editor, checkout or canvas rules.
 * Optional header hook: .video332-nav on an ordinary link to video.php.
 */
.site-header.header85.focus316-header,
#header85-mobile-menu,
#workspace249-dialog,
main :is(.focus316-home, .catalog322, .study-page, .directory331) {
  --lv332-ink: #32283e;
  --lv332-muted: #6b5e78;
  --lv332-purple: #7044ce;
  --lv332-purple-hover: #6035b8;
  --lv332-purple-down: #542b9f;
  --lv332-soft: #f4effb;
  --lv332-soft-hover: #ece2f8;
  --lv332-line: #ded5e8;
  --lv332-focus: #7044ce;
}

/* Navigation stays compact. Solid colour is reserved for AI and actions. */
.site-header.header85.focus316-header {
  background: #fff;
  border-bottom-color: #e8e1ee;
  box-shadow: 0 2px 12px #33234005;
}
.site-header.header85.focus316-header > .desktop-nav {
  gap: 5px !important; /* Override the 316 navigation's 12px !important gap. */
}
.site-header.header85.focus316-header .desktop-nav > a,
.site-header.header85.focus316-header .templates328-quick > a {
  box-sizing: border-box;
  min-height: 44px;
  border-radius: 10px;
  line-height: 1.3;
  text-decoration: none;
  transition: background-color 170ms ease, border-color 170ms ease, color 170ms ease;
}
.site-header.header85.focus316-header .desktop-nav > a:not(.sova327-nav) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 12px;
  border: 1px solid transparent;
  background: transparent;
  color: #58446d !important; /* 328 sets the template colour with !important. */
  font-size: 14px;
  font-weight: 650;
  white-space: nowrap;
}
.site-header.header85.focus316-header .desktop-nav > a:not(.sova327-nav):hover,
.site-header.header85.focus316-header .templates328-quick > a:not(.sova327-nav):hover {
  color: #53318b !important;
  background: var(--lv332-soft);
  border-color: #ded1ee;
}
.site-header.header85.focus316-header .desktop-nav > a:not(.sova327-nav)[aria-current="page"],
.site-header.header85.focus316-header .templates328-quick > a:not(.sova327-nav)[aria-current="page"] {
  color: #53318b !important;
  background: #eee5fa;
  border-color: #bda4dc;
  box-shadow: inset 0 -2px 0 #8458b9;
}
.site-header.header85.focus316-header .desktop-nav > a.sova327-nav,
.site-header.header85.focus316-header .templates328-quick > a.sova327-nav {
  background: var(--lv332-purple);
  border-color: var(--lv332-purple);
  color: #fff !important;
  box-shadow: none;
}
.site-header.header85.focus316-header .desktop-nav > a.sova327-nav:hover,
.site-header.header85.focus316-header .templates328-quick > a.sova327-nav:hover {
  background: var(--lv332-purple-hover);
  border-color: var(--lv332-purple-hover);
}
.site-header.header85.focus316-header .desktop-nav > a.sova327-nav[aria-current="page"],
.site-header.header85.focus316-header .templates328-quick > a.sova327-nav[aria-current="page"] {
  box-shadow: inset 0 -3px 0 #d9c7fa;
}
.site-header.header85.focus316-header .workspace249-launch,
.site-header.header85.focus316-header .p29-account-link,
.site-header.header85.focus316-header .mobile-menu-button {
  min-height: 44px;
  box-sizing: border-box;
  border-radius: 10px;
  transform: none;
  transition: background-color 170ms ease, border-color 170ms ease, color 170ms ease;
}
.site-header.header85.focus316-header .workspace249-launch {
  background: var(--lv332-soft);
  border-color: var(--lv332-line);
  color: #59377b;
  font-weight: 650;
}
.site-header.header85.focus316-header .workspace249-launch:hover,
.site-header.header85.focus316-header .workspace249-launch[aria-expanded="true"],
.site-header.header85.focus316-header .mobile-menu-button[aria-expanded="true"] {
  background: var(--lv332-soft-hover);
  border-color: #bda4dc;
  color: #53318b;
}
.site-header.header85.focus316-header .mobile-menu-button { min-width: 44px; }
#header85-mobile-menu > a {
  min-height: 44px;
  box-sizing: border-box;
  border-radius: 9px;
  color: #58446d;
}
#header85-mobile-menu > a:hover,
#header85-mobile-menu > a[aria-current="page"] { background: #eee5fa; color: #53318b; }

/* Calm surfaces: only real controls receive interaction feedback. */
main .focus316-home .navigation331-task,
main .directory331 .navigation331-group,
main .study-page .s47-card {
  border-color: var(--lv332-line);
  background: #fff;
  box-shadow: 0 2px 10px #38254f03;
}
main .study-page .s47-card:hover { box-shadow: 0 2px 10px #38254f03; }
main .focus316-home .navigation331-task > p,
main .study-page .s47-card p,
main .study-page .s47-section-title p,
#workspace249-dialog .navigation331-status,
#workspace249-dialog .navigation331-group-note { color: var(--lv332-muted); }

/* Explicit discovery links, filters and file actions share one rhythm. */
main .focus316-home .navigation331-primary,
main .study-page .s47-open,
main .study-page .s47-quick > a,
main .study-page .study331-sections > a,
main .study-page .s47-filters > a,
main .catalog322 .templates328-sections > a,
main .catalog322 .catalog225-access > a,
main .catalog322 .catalog161-selected > a,
main .catalog322 .catalog204-edit {
  box-sizing: border-box;
  min-height: 44px;
  border-radius: 10px;
  line-height: 1.4;
  transition: background-color 170ms ease, border-color 170ms ease, color 170ms ease;
  transform: none;
}
main .focus316-home .navigation331-primary,
main .study-page .s47-open {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 13px;
  background: var(--lv332-soft);
  color: #59378a;
  font-weight: 700;
  text-decoration: none;
}
main .focus316-home .navigation331-primary:hover,
main .study-page .s47-open:hover,
main .study-page .s47-quick > a:hover,
main .study-page .study331-sections > a:hover,
main .catalog322 .catalog225-access > a:hover {
  background: var(--lv332-soft-hover);
  color: #4d277e;
  border-color: #baa1d7;
}
main .study-page .s47-filters > a[aria-current="page"],
main .catalog322 .templates328-sections > a[aria-current="page"],
main .catalog322 .catalog225-access > a[aria-current="page"] {
  background: var(--lv332-purple);
  border-color: var(--lv332-purple);
  color: #fff;
}
main .focus316-home .navigation331-primary:active,
main .study-page .s47-open:active,
main .study-page .s47-quick > a:active,
main .study-page .study331-sections > a:active,
.site-header.header85.focus316-header .workspace249-launch:active,
#workspace249-dialog [data-workspace249-close]:active {
  background: #e3d5f3;
  color: #4d277e;
  border-color: #aa88ce;
  box-shadow: inset 0 0 0 1px #aa88ce;
  transform: none;
}
main .study-page .s47-filters > a[aria-current="page"]:hover,
main .catalog322 .templates328-sections > a[aria-current="page"]:hover,
main .catalog322 .catalog225-access > a[aria-current="page"]:hover {
  background: var(--lv332-purple-hover);
  border-color: var(--lv332-purple-hover);
  color: #fff;
}
main .focus316-home .navigation331-related > a,
main .focus316-home .focus316-free-link,
main .focus316-home .showcase321 header > a,
main .catalog322 .formats331 > a,
main .directory331 .navigation331-group li > a,
#workspace249-dialog .navigation331-group li > a,
#workspace249-dialog .workspace249-footer > a {
  min-height: 44px;
  box-sizing: border-box;
  color: #624b78;
  text-underline-offset: 4px;
}
main .focus316-home .navigation331-related { gap: 2px 16px; }
main .focus316-home .navigation331-related > a { font-size: 13px; }
main .focus316-home .showcase321-card:hover img { transform: none; }
main .focus316-home .showcase321-card:hover .showcase321-art { border-color: #ac8dce; }
main .study-page .s47-card h3 a:hover { color: #6035a0; text-decoration: underline; text-underline-offset: 4px; }
main .study-page .s47-guidance > summary { min-height: 44px; line-height: 1.5; box-sizing: border-box; padding: 10px 0; }

/* Inputs are limited to discovery forms, never study/editor content fields. */
main .catalog322 .catalog225-search input[type="search"],
main .catalog322 .catalog225-search select,
main .catalog322 .catalog322-filter select,
main .study-page #s47-search,
main .study-page #study-search,
#workspace249-dialog #navigation331-search {
  box-sizing: border-box;
  min-height: 46px;
  min-width: 0;
  border: 1px solid #bfb0cf;
  border-radius: 10px;
  padding: 11px 13px;
  background-color: #fff;
  color: var(--lv332-ink);
  font-size: 16px;
  line-height: 1.4;
  transition: border-color 170ms ease, box-shadow 170ms ease;
}
main .catalog322 .catalog225-search input::placeholder,
main .study-page #s47-search::placeholder,
main .study-page #study-search::placeholder,
#workspace249-dialog #navigation331-search::placeholder { color: #756680; opacity: 1; }
main .catalog322 .catalog225-search input[type="search"]:focus,
main .catalog322 .catalog225-search select:focus,
main .catalog322 .catalog322-filter select:focus,
main .study-page #s47-search:focus,
main .study-page #study-search:focus,
#workspace249-dialog #navigation331-search:focus {
  border-color: var(--lv332-focus);
  outline: 2px solid var(--lv332-focus);
  outline-offset: 2px;
  box-shadow: none;
}
main .focus316-home .trial327-home > a,
main .catalog322 .context331 > a,
main .catalog322 .catalog225-search > button,
main .catalog322 .catalog322-filter > button {
  min-height: 46px;
  border: 1px solid var(--lv332-purple);
  border-radius: 10px;
  background: var(--lv332-purple);
  color: #fff;
  box-shadow: none;
  line-height: 1.4;
  transform: none;
  transition: background-color 170ms ease, border-color 170ms ease;
}
main .focus316-home .trial327-home > a:hover,
main .catalog322 .context331 > a:hover,
main .catalog322 .catalog225-search > button:hover,
main .catalog322 .catalog322-filter > button:hover {
  background: var(--lv332-purple-hover);
  border-color: var(--lv332-purple-hover);
  transform: none;
}
main .focus316-home .trial327-home > a:active,
main .catalog322 .context331 > a:active,
main .catalog322 .catalog225-search > button:active,
main .catalog322 .catalog322-filter > button:active,
.site-header.header85.focus316-header .desktop-nav > a.sova327-nav:active,
.site-header.header85.focus316-header .templates328-quick > a.sova327-nav:active {
  background: var(--lv332-purple-down);
  border-color: var(--lv332-purple-down);
  transform: none;
}
main .catalog322 .catalog225-search > button:disabled,
main .catalog322 .catalog322-filter > button:disabled {
  background: #eee9f3;
  color: #776983;
  border-color: #d8cede;
  cursor: not-allowed;
}

/* Keyboard indication is additive; no focus removal and no artificial tabindex. */
.site-header.header85.focus316-header :is(a, button):focus-visible,
#header85-mobile-menu > a:focus-visible,
#workspace249-dialog :is(a, button):focus-visible,
main .focus316-home :is(a, summary):focus-visible,
main .catalog322 :is(.templates328-sections a, .catalog225-access a, .catalog161-selected a, .catalog204-edit, .favorite-button, .formats331 a, .context331 a, .catalog225-search button, .catalog322-filter button, summary):focus-visible,
main .study-page :is(.s47-card a, .s47-filters a, .study331-sections a, .s47-guidance summary, .ws-filters button, .shelf17-paths button):focus-visible,
main .directory331 a:focus-visible {
  outline: 3px solid #7044ce;
  outline-offset: 3px;
}
main .catalog322 .favorite-button { min-width: 44px; min-height: 44px; }
#workspace249-dialog [data-workspace249-close] { border-radius: 11px; background: #f4effb; color: #59377b; }
#workspace249-dialog [data-workspace249-close]:hover { background: #e7dcf4; }
#workspace249-dialog .navigation331-group li > a:hover,
main .directory331 .navigation331-group li > a:hover { background: #f4effb; color: #53318b; }

@media (max-width: 1180px) and (min-width: 1000px) {
  .site-header.header85.focus316-header { gap: 10px; padding-left: 20px !important; padding-right: 20px !important; }
  .site-header.header85.focus316-header > .desktop-nav { gap: 2px !important; }
  .site-header.header85.focus316-header .desktop-nav > a { padding-left: 9px !important; padding-right: 9px !important; font-size: 13px; }
}
@media (max-width: 999px) {
  /* :has only changes the row if the optional fourth direct link is present. */
  .site-header.header85.focus316-header .templates328-quick:has(.video332-nav) { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
  .site-header.header85.focus316-header .templates328-quick > a:not(.sova327-nav) {
    border: 1px solid #ded5e8;
    background: #f8f5fc;
    color: #58446d !important;
    font-weight: 650;
  }
  .site-header.header85.focus316-header .templates328-quick > a { padding: 9px 6px; }
}
@media (max-width: 460px) {
  .site-header.header85.focus316-header .templates328-quick > a { font-size: 12px; gap: 4px; }
  /* Preserve 331’s compact two-column task grid; related actions can wrap. */
  main .focus316-home .navigation331-related { gap: 0 8px; }
  main .focus316-home .navigation331-related > a { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .site-header.header85.focus316-header :is(a, button),
  #workspace249-dialog :is(a, button, input),
  main .focus316-home :is(a, img),
  main .catalog322 :is(.templates328-sections a, .catalog225-access a, .catalog161-selected a, .catalog204-edit, .catalog225-search input, .catalog225-search select, .catalog225-search button, .catalog322-filter select, .catalog322-filter button),
  main .study-page :is(.s47-card, .s47-card a, .study331-sections a, .s47-filters a, #s47-search, #study-search) {
    transition: none;
    animation: none;
  }
}
@media (forced-colors: active) {
  .site-header.header85.focus316-header a[aria-current="page"],
  main .catalog322 a[aria-current="page"],
  main .study-page .s47-filters a[aria-current="page"] {
    outline: 2px solid Highlight;
    outline-offset: -3px;
  }
}

/* The mobile header has a quick-link row; never cover the first menu items. */
@media(max-width:999px){#header85-mobile-menu:not([hidden]){top:var(--lv332-header-height,128px);max-height:calc(100dvh - var(--lv332-header-height,128px));overscroll-behavior:contain;overflow-y:auto;padding-bottom:max(16px,env(safe-area-inset-bottom))}}
